query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e22104f22c094e25339cd5ef35c69cf4
Show or hide x axis
[ { "docid": "b425798daef6ae5f269612fac47460ed", "score": "0.5974532", "text": "public function setXVisibility($visibility = false)\n {\n $this->ensureX();\n $this->data['x']['show'] = $visibility;\n }", "title": "" } ]
[ { "docid": "b3745f58fbd21fa9baa7c37e76892de3", "score": "0.6143473", "text": "public function plotXAxis($xlims) {\n\t\t$this->plotAtt['xrange'] = \"set xrange [\". $xlims['xmin']. \":\" . $xlims['xmax'] . \"]\\n\";\n\t\n\t\tif (isset($xlims['x2min'])) {\n\t\t\t$this->plotAtt['x2range'] = \"set x2range [\". $xlims['x2min'] . \":\" . $xlims['x2max'] . \"]\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "1afd441b39340a7482c67370d16b918f", "score": "0.60591", "text": "public function plotXAxis($xlims) {\r\n $this->plotAttribs['xrange'] = \"set xrange [\" . $xlims['xmin'] . \":\" . $xlims['xmax'] . \"]\\n\";\r\n\r\n if (isset($xlims['x2min'])) {\r\n $this->plotAttribs['x2range'] = \"set x2range [\" . $xlims['x2min'] . \":\" . $xlims['x2max'] . \"]\\n\";\r\n }\r\n }", "title": "" }, { "docid": "b65801be41c2e57cb19f57bf00b4cee4", "score": "0.5695321", "text": "function HideTicks($aHideMinor=true,$aHideMajor=true) {\n $this->scale->ticks->SupressMinorTickMarks($aHideMinor);\n $this->scale->ticks->SupressTickMarks($aHideMajor);\n }", "title": "" }, { "docid": "3ee482a4c1b1c2a162818dd416950e98", "score": "0.5668161", "text": "function HideEmptyXY($val=true) {\n $this->drawempty_x = $this->drawempty_y = !$val;\n }", "title": "" }, { "docid": "49006d3b89a98102846f1d5171af395f", "score": "0.56668645", "text": "function HideFirstTickLabel($aShow=false) {\n $this->show_first_label=$aShow;\n }", "title": "" }, { "docid": "bf04cffc369d2406f34c993c7028af28", "score": "0.5577002", "text": "function SupressTickMarks($aHide=true) {\n $this->supress_tickmarks=$aHide;\n }", "title": "" }, { "docid": "024984895d65d3af6202ea41083e76de", "score": "0.5485762", "text": "function SetUseHorizontalScrollBar($show){}", "title": "" }, { "docid": "15a2187e51d375278b49bf0ce2ecaaa4", "score": "0.5438214", "text": "public function setAxes($x=\"\",$y=\"\") {\n\t\tif($x === YES) {\n\t\t\t$x=\"\";\n\t\t\t$showX = YES;\n\t\t}\n\t\t\n\t\tif($y === YES) {\n\t\t\t$y = \"\";\n\t\t\t$showY = YES;\n\t\t}\n\t\t\n\t\tif(strlen($x) > 0 && strlen($y) > 0) {\n\t\t\t$this->axesString = \"&chxt=x,y\";\n\t\t\t$this->axesString .= \"&chxl=\" . \"0:|\" . $x . \"|1:|\" . $y;\n\t\t} elseif(strlen($x) > 0) {\n\t\t\t$this->axesString = \"&chxt=x\" . ($showY ? \",y\" : \"\");\n\t\t\t$this->axesString .= \"&chxl=\" . \"0:|\".$x.($showY ? \"1:\" : \"\");\n\t\t} elseif(strlen($y) > 0) {\n\t\t\t$this->axesString = \"&chxt=\" . ($showX ? \"x,\" : \"\") . \"y\";\n\t\t\t$this->axesString .= \"&chxl=\" . ($showX ? \"0:1:|\" : \"1:|\") . $y;\n\t\t}\n\n\t}", "title": "" }, { "docid": "a39c8c186915d0195d76ea662ebde1a3", "score": "0.5385536", "text": "public function xAxis(array $categories = [], string $type = 'category', string $title = '', array $others = [])\n {\n $info = [\n 'type' => $type,\n // 'categories' => $categories,\n // 'tickAmount' => 3,\n 'tickPlacement' => 'on',\n // 'min' => null,\n // 'max' => null,\n // 'range' => null,\n // 'floating' => false,\n // 'decimalsInFloat' => null,\n // 'overwriteCategories' => null,\n // 'position' => 'bottom',\n // 'labels' => [\n // 'show' => true,\n // 'rotate' => -45,\n // 'rotateAlways' => false,\n // 'hideOverlappingLabels' => true,\n // 'showDuplicates' => false,\n // 'trim' => false,\n // 'minHeight' => null,\n // 'maxHeight' => 120,\n // 'style' => [\n // 'colors' => [],\n // 'fontSize' => '12px',\n // 'fontFamily' => 'Helvetica, Arial, sans-serif',\n // 'fontWeight' => 400,\n // 'cssClass' => 'apexcharts-xaxis-label',\n // ],\n // 'offsetX' => 0,\n // 'offsetY' => 0,\n // // 'format' => null,\n // // 'formatter' => null,\n // 'datetimeUTC' => true,\n // 'datetimeFormatter' => [\n // 'year' => 'yyyy',\n // 'month' => \"MMM 'yy\",\n // 'day' => 'dd MMM',\n // 'hour' => 'HH:mm',\n // ],\n // ],\n // 'axisBorder' => [\n // 'show' => true,\n // 'color' => '#78909C',\n // 'height' => 1,\n // 'width' => '100%',\n // 'offsetX' => 0,\n // 'offsetY' => 0\n // ],\n // 'axisTicks' => [\n // 'show' => true,\n // 'borderType' => 'solid',\n // 'color' => '#78909C',\n // 'height' => 6,\n // 'offsetX' => 0,\n // 'offsetY' => 0\n // ],\n 'title' => [\n 'text' => $title,\n // 'offsetX' => 0,\n // 'offsetY' => 0,\n // 'style' => [\n // 'color' => null,\n // 'fontSize' => '12px',\n // 'fontFamily' => 'Helvetica, Arial, sans-serif',\n // 'fontWeight' => 600,\n // 'cssClass' => 'apexcharts-xaxis-title',\n // ],\n ],\n ];\n if (!empty($categories)) {\n $info['categories'] = $categories;\n }\n $info = array_merge($info, $others);\n $this->set('xAxis', $info);\n return $this;\n }", "title": "" }, { "docid": "1ddaf558c2dbade976c61bfa87d62788", "score": "0.5375394", "text": "public function display_trends() {\n\t\t$this->graph->set( 'show_controls', false );\n\t\t$this->graph->set( 'x_mode', 'time' );\n\t\t$this->graph->display();\n\t}", "title": "" }, { "docid": "41761e337d17524edcbd0f6484631f12", "score": "0.5345596", "text": "public function display_trends() {\n\t\t$this->graph->set( 'show_controls', false );\n\t\t$this->graph->set( 'x_mode', 'time' );\n\t\t$this->graph->set( 'currency', false );\n\t\t$this->graph->display();\n\t}", "title": "" }, { "docid": "83ac375ed8fca72fa74b31bae6f67326", "score": "0.5161476", "text": "public function setXTickValues($values)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['values'] = $values;\n }", "title": "" }, { "docid": "1f0d510efb1224c7d297c012a6c9e3c6", "score": "0.5076106", "text": "public function xAxis($value) {\n return $this->setProperty('xAxis', $value);\n }", "title": "" }, { "docid": "114e33350aaa24d3abf1dc7f4b481420", "score": "0.503607", "text": "function SetScrollLineX($x){}", "title": "" }, { "docid": "c85858b904cb4d9777ce7ff03e5cb14c", "score": "0.5034281", "text": "public function get_x_axis_label()\n {\n return $this->x_axis_label;\n }", "title": "" }, { "docid": "9ec96c9383407923cb078b3310e4d4e2", "score": "0.5020889", "text": "public function yAxis(bool $show = true, array $others = [])\n {\n $info = [\n 'show' => $show,\n 'showAlways' => $show,\n // showForNullSeries: true,\n // seriesName: null,\n // opposite: false,\n // reversed: false,\n // logarithmic: false,\n // 'tickAmount' => $tickAmount,\n // min: 6,\n // max: 6,\n // forceNiceScale: false,\n // floating: false,\n // decimalsInFloat: null,\n 'labels' => [\n 'show' => $show,\n // align: 'right',\n // minWidth: 0,\n // maxWidth: 160,\n // style: {\n // colors: [],\n // fontSize: '12px',\n // fontFamily: 'Helvetica, Arial, sans-serif',\n // fontWeight: 400,\n // cssClass: 'apexcharts-yaxis-label',\n // },\n // offsetX: 0,\n // offsetY: 0,\n // rotate: 0,\n // formatter: (value) => {\n // return val\n // },\n ],\n // axisBorder: {\n // show: true,\n // color: '#78909C',\n // offsetX: 0,\n // offsetY: 0\n // },\n 'axisTicks' => [\n 'show' => $show,\n // borderType: 'solid',\n // color: '#78909C',\n // width: 6,\n // offsetX: 0,\n // offsetY: 0\n ],\n // title: {\n // text: null,\n // rotate: -90,\n // offsetX: 0,\n // offsetY: 0,\n // style: {\n // color: null,\n // fontSize: '12px',\n // fontFamily: 'Helvetica, Arial, sans-serif',\n // fontWeight: 600,\n // cssClass: 'apexcharts-yaxis-title',\n // },\n // },\n // crosshairs: {\n // show: true,\n // position: 'back',\n // stroke: {\n // color: '#b6b6b6',\n // width: 1,\n // dashArray: 0,\n // },\n // },\n 'tooltip' => [\n 'enabled' => $show,\n // offsetX: 0,\n ],\n ];\n $info = array_merge($info, $others);\n $this->set('yAxis', $info);\n return $this;\n }", "title": "" }, { "docid": "8300430409da4f207dd3e1fcf881607a", "score": "0.50165856", "text": "public function setXTickCentered($centered = false)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['centered'] = $centered;\n }", "title": "" }, { "docid": "431295904ddca63aa33894d0d3af8e60", "score": "0.49410135", "text": "function HideFirstLastLabel() {\n // automatically generated scale values. However, that\n // will not affect manually specified value, e.g text-scales.\n // therefor we also make a kludge here to supress manually\n // specified scale labels.\n $this->scale->ticks->SupressLast();\n $this->scale->ticks->SupressFirst();\n $this->show_first_label = false;\n $this->show_last_label = false;\n }", "title": "" }, { "docid": "8493c36d8fa420efcb85ebf907267d7b", "score": "0.49382102", "text": "public function plotGrid() {\n\t\t$this->plotAtt['grid'] = \"set grid\\n\";\n\t}", "title": "" }, { "docid": "9644fa0bc03d529b58ae694ecb32c946", "score": "0.49287435", "text": "public function setYVisibility($visibility = true)\n {\n $this->ensureY();\n $this->data['y']['show'] = $visibility;\n }", "title": "" }, { "docid": "c609d8d7d4dccd47d4f85fc66b325897", "score": "0.49163875", "text": "public function setVisible() {\r\n\t\t$this->visible_initial = true;\r\n\t}", "title": "" }, { "docid": "6f1675d38a4e8a23ff2c0568c6754000", "score": "0.49077836", "text": "function setDisableAxis($axis)\n {\n $this->axisDisabled = $axis;\n }", "title": "" }, { "docid": "341e01a0d83253900c9431683c9cfc18", "score": "0.48940906", "text": "public function getXAxis()\n {\n return $this->getAsObject($this->xAxis);\n }", "title": "" }, { "docid": "29bcb69e145ac4a06b1417ddd007ba0d", "score": "0.48407444", "text": "public function plotGrid() {\r\n $this->plotAttribs['grid'] = \"set grid\\n\";\r\n }", "title": "" }, { "docid": "cdbaa8268bb9b2db6234a7d5ebc6d9f9", "score": "0.48377118", "text": "public function setShowHorizontalScroll($showHorizontalScroll): void\n {\n $this->showHorizontalScroll = (bool) $showHorizontalScroll;\n }", "title": "" }, { "docid": "ebad850aec5618834bc47bf7f6c384c4", "score": "0.48297283", "text": "function SupressMinorTickMarks($aHide=true) {\n $this->supress_minor_tickmarks=$aHide;\n }", "title": "" }, { "docid": "f8b5faa1868b8af08ef7d1744ac9dd11", "score": "0.48150232", "text": "public function setX($value) {\n $this->x = $value;\n }", "title": "" }, { "docid": "1172ceae6107f2ea5390817de9fbda2d", "score": "0.4766689", "text": "public function set_x_axis_label($x_axis_label)\n {\n $this->x_axis_label = $x_axis_label;\n }", "title": "" }, { "docid": "9ed189467d8159c9317f2c015fea8090", "score": "0.47135153", "text": "public function forceControlsToDisplay()\n {\n $this->showControls = true;\n }", "title": "" }, { "docid": "e3dcdb0a8dd10b514feefd18119b95d0", "score": "0.4694387", "text": "public function get_show_gridlines()\n {\n return $this->show_gridlines;\n }", "title": "" }, { "docid": "746c3302c5ed28361028f690e383e4d3", "score": "0.4683351", "text": "public function set_show_gridlines($show_gridlines)\n {\n $this->show_gridlines = $show_gridlines;\n }", "title": "" }, { "docid": "bf99b37fb9fe518bfd922aa189009df4", "score": "0.46680492", "text": "function SetCaretLineVisible($show){}", "title": "" }, { "docid": "e93df2012a6b0cf42ab24472225ee1e6", "score": "0.46457404", "text": "public function axes($value) {\n return $this->setProperty('axes', $value);\n }", "title": "" }, { "docid": "213cbdaca69e3dd9ae70f66aac71cb7c", "score": "0.4626045", "text": "public function getShowHorizontalScroll()\n {\n return $this->showHorizontalScroll;\n }", "title": "" }, { "docid": "1071dafc37ba100f3e181fd6a44f7c17", "score": "0.45949304", "text": "protected function initAxis()\n {\n $this->yAxis = new ezcGraphChartElementNumericAxis();\n $this->yAxis->font->minFontSize = 7;\n $this->yAxis->font->maxFontSize = 8;\n\n $this->xAxis = new ezcGraphChartElementLabeledAxis();\n $this->xAxis->font->minFontSize = 7;\n $this->xAxis->font->maxFontSize = 8;\n }", "title": "" }, { "docid": "0d6f41011d18f1487afd66507c92f17c", "score": "0.45847654", "text": "function setShowGraphEnd($showGraph)\n {\n $this->showGraphEnd = (bool) $showGraph;\n }", "title": "" }, { "docid": "35a80663d37886110f55e16426311269", "score": "0.45830625", "text": "public function setAxisTitles(string $xTitle = null, string $yTitle = null): void\n {\n $options = [\n 'scales' => [\n 'x' => [\n 'title' => [\n 'text' => $xTitle ?? ($this->model ? $this->model->getField($this->xField)->getCaption() : ''),\n 'display' => true,\n ],\n ],\n 'y' => [\n 'title' => [\n 'text' => $yTitle ?? ($this->model ? $this->model->getField($this->yField)->getCaption() : ''),\n 'display' => true,\n ],\n ],\n ],\n /* @todo maybe this can be used to tweak label to include city names? See example chart in demos.\n 'plugins' => [\n 'tooltip' => [\n 'enabled' => true,\n 'mode' => 'point',\n 'callbacks' => [\n 'label' => new JsFunction(['context'], [\n new JsExpression(<<<'EOF'\n let label = context.dataset.label || \"\";\n let value = context.parsed.y;\n if (label) {\n label += \": \";\n }\n return label + (value ? Number(value).toLocaleString(undefined, {minimumFractionDigits: ' . $digits . ', maximumFractionDigits: ' . $digits . '}) : \"No Data\");\n EOF),\n ]),\n ],\n ],\n ],\n */\n ];\n\n $this->setOptions($options);\n }", "title": "" }, { "docid": "94ef58c5d2d2d6cafc3988101f8a249c", "score": "0.45709664", "text": "function AnnotationSetVisible($visible){}", "title": "" }, { "docid": "36daa3b94aeaad0e31e57e92b2cf525f", "score": "0.45292047", "text": "public function enableScaleControl() {\n\t\t$this->scale_control = true;\n\t}", "title": "" }, { "docid": "c7da644e31c1f6417b897dcbd1489a76", "score": "0.45199767", "text": "public function axis($value) {\n return $this->setProperty('axis', $value);\n }", "title": "" }, { "docid": "c7da644e31c1f6417b897dcbd1489a76", "score": "0.45199767", "text": "public function axis($value) {\n return $this->setProperty('axis', $value);\n }", "title": "" }, { "docid": "086a358a29280e9dbaf42a0c43cd199d", "score": "0.4513293", "text": "function SetXOffset($newOffset){}", "title": "" }, { "docid": "b07f6ea0fab6630f9eb2bff4e8f18a0d", "score": "0.44927675", "text": "public function setXTickCulling($culling)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['culling'] = $culling;\n }", "title": "" }, { "docid": "1bd72d95e69a03e0ae99ff15e318ea5b", "score": "0.44901747", "text": "public function add_x_labels($labels)\r\n\t{\r\n\t\t$this->x_labels = array_merge($this->x_labels, $labels);\r\n\t}", "title": "" }, { "docid": "3ef3d51533816f53b09e167832815e48", "score": "0.44864726", "text": "public function setXTickMultiline($multiline = false)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['multiline'] = $multiline;\n }", "title": "" }, { "docid": "a737cf43c9d690005330ff7808485328", "score": "0.4485214", "text": "public function disableScaleControl() {\n\t\t$this->scale_control = true;\n\t}", "title": "" }, { "docid": "cc08e9ac1cdcec78ff30ee0714208c26", "score": "0.4471712", "text": "public function isDualAxisChart()\n\t{\n\t\treturn in_array(strval($this->Type), [\"4031\", \"4131\", \"4141\"]);\n\t}", "title": "" }, { "docid": "7ce421bf1f70f3f0779c843d7a0cf77d", "score": "0.4453499", "text": "function GetScrollLineX(){}", "title": "" }, { "docid": "15f728c31c5960c00dd71434c4bb802c", "score": "0.44412515", "text": "public function hide() {\n $this->setShow(false);\n $this->sendToClient();\n }", "title": "" }, { "docid": "abdfe7ce230e83b3df301d573bb44403", "score": "0.4435064", "text": "function SetXLabelOffset($aLabelOff,$aTickOff=-1) {\n $this->xlabel_offset=$aLabelOff;\n if( $aTickOff==-1 ) {\n // Same as label offset\n $this->xtick_offset=$aLabelOff;\n }\n else {\n $this->xtick_offset=$aTickOff;\n }\n if( $aLabelOff>0 ) {\n $this->SupressLast(); // The last tick wont fit\n }\n }", "title": "" }, { "docid": "f242ea58433289cede0a887f8bb21297", "score": "0.4433184", "text": "function SetUseVerticalScrollBar($show){}", "title": "" }, { "docid": "88d161ed171017cfab11c84bde80a99c", "score": "0.44252455", "text": "function UpdateColumnVisibility($idx, $show){}", "title": "" }, { "docid": "5f4a8887663009f33619351c57942392", "score": "0.44216168", "text": "public function hideComponent() {\n $this->props->setValue('core.isHidden', true);\n }", "title": "" }, { "docid": "64e4ada7f4e22f8ed2ba64130b06d863", "score": "0.44169793", "text": "public function getXAxisLabels() {\n $query = \"SELECT DISTINCT(Years) FROM $this->tableName\";\n $result = mysql_query($query) or die(\"Nao deu para executar o query \" . $query . \" pq \" . mysql_error());\n\n $xLabels = array();\n while ($row = mysql_fetch_array($result)) {\n $xLabels[] = $row['Years'];\n }\n\n return $xLabels;\n }", "title": "" }, { "docid": "a49e964c1b8c78eef4682c8383202c05", "score": "0.44093275", "text": "public function setXTickOuter($outer = true)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['outer'] = $outer;\n }", "title": "" }, { "docid": "d36d8bfa68493f675d48c528738e0c70", "score": "0.43869433", "text": "public function setAbsX($x) {\n\t\t$this->x = floatval($x);\n\t}", "title": "" }, { "docid": "8a48621e570870d09c6fee8c93e6edbb", "score": "0.43840975", "text": "function Hide(){}", "title": "" }, { "docid": "8a48621e570870d09c6fee8c93e6edbb", "score": "0.43840975", "text": "function Hide(){}", "title": "" }, { "docid": "8a48621e570870d09c6fee8c93e6edbb", "score": "0.43840975", "text": "function Hide(){}", "title": "" }, { "docid": "250853549fe197f7185980af4aca9f5a", "score": "0.43828106", "text": "function HideLine($aHide=true) {\n $this->hide_line = $aHide;\n }", "title": "" }, { "docid": "11da6893f3ea64325f7261bb2c002643", "score": "0.43681276", "text": "function HidePanels(){}", "title": "" }, { "docid": "c492067e5deed9a1a9fcd064710320f9", "score": "0.4334058", "text": "function hiddenSeries($series){\n\t\techo \"<input type='text' name='viewSeriesId' value='$series' style='display:none'></input>\";\n\t}", "title": "" }, { "docid": "649988139c1ac933115119ee3f3c704c", "score": "0.43270507", "text": "function HideColumn($idx){}", "title": "" }, { "docid": "5044dd6419c7bc364bbf8a628211d518", "score": "0.43184972", "text": "public function setXTickFormat($format)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['format'] = $format;\n }", "title": "" }, { "docid": "635365d95817ff8a39543ee0efd5dfc8", "score": "0.4313616", "text": "public function setXTickCount($count)\n {\n $this->ensureXTick();\n $this->data['x']['tick']['count'] = $count;\n }", "title": "" }, { "docid": "d26cc02db8fccb467b6eecb0d5a1ac86", "score": "0.43073225", "text": "public function show(Plot $plot)\n {\n //\n }", "title": "" }, { "docid": "c705e195e666e8dcb265a85c66622d1a", "score": "0.42938656", "text": "public function setXMax($max)\n {\n $this->ensureX();\n $this->data['x']['max'] = $max;\n }", "title": "" }, { "docid": "0d549b5466cad4897893555d915e646d", "score": "0.42911053", "text": "function GetUseHorizontalScrollBar(){}", "title": "" }, { "docid": "a8b8de149600f0989c9848afb637f92f", "score": "0.42904514", "text": "function EnsureVisible($n){}", "title": "" }, { "docid": "2020ca1ab8d9dd7b4cc160621a03eccc", "score": "0.4284826", "text": "function IsScrollbarAlwaysShown($orient){}", "title": "" }, { "docid": "4c62b8550b58efad9e7a018a8d1e7bfc", "score": "0.42784566", "text": "function GetSetShown(){}", "title": "" }, { "docid": "2f1126339091402271b0211f306c0f54", "score": "0.42702025", "text": "public function setVisible(array $visible)\n {\n $this->visible = $visible;\n }", "title": "" }, { "docid": "155572e0649f8a356e4e95570af90fda", "score": "0.42674822", "text": "public function plotKey($request) {\r\n if ($request == 'outside') {\r\n $this->plotAttribs['key'] = \"set key outside\\n\";\r\n }\r\n if ($request == FALSE) {\r\n $this->plotAttribs['key'] = \"set nokey\\n\";\r\n }\r\n }", "title": "" }, { "docid": "507c0925b6bb9cbf92c887e0f739ca33", "score": "0.4266767", "text": "public function &set_visible($is_visible=true);", "title": "" }, { "docid": "6e93cca10aa6f652c8d449402d89756e", "score": "0.4257826", "text": "function SetSashVisible(wxSashEdgePosition $edge, $visible){}", "title": "" }, { "docid": "b734070aab9d4cffc2a98ace11776223", "score": "0.42484486", "text": "function HideColLabels(){}", "title": "" }, { "docid": "054150a591fc914858474bff8c6c8dd4", "score": "0.424347", "text": "function ShowHidden($show){}", "title": "" }, { "docid": "d8371a865c52a55f2e81722f22d32cc3", "score": "0.4243054", "text": "function ShowPanels($show=true){}", "title": "" }, { "docid": "d361e6999d90409e4d7ab6021269b475", "score": "0.42408708", "text": "public static function showVisibility(): bool\n {\n return static::hideVisibility() === false;\n }", "title": "" }, { "docid": "5d08eec889e5f33b65a21a9409d1d145", "score": "0.4232964", "text": "public function setXStep($xstep) {\n $this->xstep = $xstep;\n }", "title": "" }, { "docid": "a625a41ea4941aba5cb36c35c0b9b36a", "score": "0.42290068", "text": "public function toggleVisible() {\n\n\t\tif ($this->visible == 1)\n\t\t\t$v = 0;\n\t\telse\n\t\t\t$v = 1;\n\t\t\t\n\t\t$query = \"update \" . $this->contentType . \" set visible = \" . $v . \" where id = \" . $this->id;\n\n\t\t$result = mysql_query($query) or die($_SERVER['PHP_SELF'] . ' Could not toggle visibility ' . $this->contentType . ': ' . mysql_errno() . ': ' . mysql_error() . \"\\n<br>\" . $query);\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "22e5113b081fed1d0a7f57fda66c2d55", "score": "0.42287904", "text": "function showCheckboxes($show = false) {\r\n $_SESSION['displaydata'][$_SESSION [\"displaydata\"] [\"name\"]][\"show_checkboxes\"] = $show;\r\n }", "title": "" }, { "docid": "a63ce1b39da94ce4acde56ff4f86083b", "score": "0.42246556", "text": "public function set_show_data_only($flag=true) { $this->show_data_only = (bool)$flag; }", "title": "" }, { "docid": "f19e4f2bcb889550e2cdbb813b67b46c", "score": "0.42227656", "text": "function show_admin_bar( $show ) {\n\tglobal $show_admin_bar;\n\t$show_admin_bar = (bool) $show;\n}", "title": "" }, { "docid": "e025659cebab19b438222ae918bd8c05", "score": "0.42203623", "text": "public function set_x($x)\n {\n $this->x = $x;\n }", "title": "" }, { "docid": "ee6a4f9165874b8a80e1c0bb41157296", "score": "0.42198464", "text": "public function xTitle ($title)\n {\n $this->_graph->xaxis->title->Set($title);\n return $this;\n }", "title": "" }, { "docid": "2e50269785475d0d00b0a1fce1596f14", "score": "0.42164266", "text": "function EnableHolidayDisplay($display=true){}", "title": "" }, { "docid": "441f67549f0788a3658d4b9073e45618", "score": "0.42099246", "text": "function ShowColumn($idx, $show=true){}", "title": "" }, { "docid": "24bc56386f7e7e6653b6b08a6b1575aa", "score": "0.41975102", "text": "public static function taxonomyShowAdminColumn(): bool\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a6f194889fc58d64174bd9a699dad3c7", "score": "0.41972956", "text": "function get_x_input ($chart_name='state_aviation_data')\n{\n $x_data = array();\n \n switch($chart_name)\n {\n case 'annual_inspection_data':\n {\n // list all the dates\n $x_data = array(\n\n // the name of the chart\n 'chart_name' => $chart_name\n\n // the field title tjhat will appear in the x axis\n , 'x_title' => 'year'\n\n // the sql to retrieve x values\n , 'sql' => array('2011', '2012', '2013', '2014', '2015', '2016')\n \n // do not run the sql \n , 'run_sql' => false\n\n );\n break;\n }\n case 'state_airport_data':\n case 'state_aircraft_data':\n default:\n {\n /* Australia 11, Canada 34, Germany 77, Japan 101, South Africa 274, UAE 299, UK 300, US 301*/\n \n $x_data = array(\n\n // the name of the chart\n 'chart_name' => $chart_name\n\n // the field title tjhat will appear in the x axis\n , 'x_title' => 'state_code'\n\n // the sql to retrieve x values\n , 'sql' => get_read_sql('tbl_states')\n // include the x values in the where clause\n .' AND `tbl_states`.`state_id` IN (11, 34, 77, 101, 274, 299, 300, 301)'\n \n // run the sql \n , 'run_sql' => true\n\n );\n }\n }\n return $x_data;\n}", "title": "" }, { "docid": "7df5a9e5cb1eda120365992f62c92e95", "score": "0.41966805", "text": "public function isTitleVisible()\n {\n return true;\n }", "title": "" }, { "docid": "d3ad4acc3c67096db37bc7349f46a8dd", "score": "0.41873708", "text": "public static function hideVisibility(): bool\n {\n return config(static::$filename.'.hide_visibility', false);\n }", "title": "" }, { "docid": "63facf321bba145dcc5f2d7edde3e941", "score": "0.41749856", "text": "public function executeLineChartData()\r\n\t{\r\n\t\t$chartData = array();\r\n\t\tfor( $i = 0; $i < 7; $i++ )\r\n\t\t{\r\n\t\t\t$chartData[] = rand(0, 50);\r\n\t\t}\r\n\r\n\t\t//Create new stGraph object\r\n\t\t$g = new stGraph();\r\n\r\n\t\t// Chart Title\r\n\t\t$g->title( 'stOfcPlugin example', '{font-size: 20px;}' );\r\n\t\t$g->bg_colour = '#E4F5FC';\r\n\t\t$g->set_inner_background( '#E3F0FD', '#CBD7E6', 90 );\r\n\t\t$g->x_axis_colour( '#8499A4', '#E4F5FC' );\r\n\t\t$g->y_axis_colour( '#8499A4', '#E4F5FC' );\r\n\r\n\t\t//Use line_dot to set line dots diameter, text, color etc.\r\n\t\t$g->line_dot(2, 3, '#3495FE', 'Number of downloads per day', 10);\r\n\r\n\t\t//In case of line chart data should be passed to stGraph object\r\n\t\t//unsing set_data\r\n\t\t$g->set_data( $chartData );\r\n\r\n\t\t//Setting labels for X-Axis\r\n\t\t$g->set_x_labels( array( 'Mon','Tue','Wed','Thu','Fri','Sat','Sun' ) );\r\n\r\n\t\t//to set the format of labels on x-axis e.g. font, color, step\r\n\t\t$g->set_x_label_style( 10, '#18A6FF', 0, 1 );\r\n\r\n\t\t//set maximum value for y-axis\r\n\t\t//we can fix the value as 20, 10 etc.\r\n\t\t//but its better to use max of data\r\n\t\t$g->set_y_max( max($chartData) );\r\n\r\n\t\t$g->y_label_steps( 5 );\r\n\r\n\t\t// display the data\r\n\t\techo $g->render();\r\n\r\n\t\techo $g->render();\r\n\r\n\t\treturn sfView::NONE;\r\n\t}", "title": "" }, { "docid": "ae02ff9bf2ed272f40dd57f93106911b", "score": "0.4174698", "text": "public function set_show_checkbox($var) {\r\n\t\tif ($var) self::$show_checkbox = $var;\r\n\t}", "title": "" }, { "docid": "e1a985881dc27c2e1b2f12ae6409028d", "score": "0.41670987", "text": "public function setXMin($min)\n {\n $this->ensureX();\n $this->data['x']['min'] = $min;\n }", "title": "" }, { "docid": "2214e01675b885c8896d40b67dec61fa", "score": "0.41660228", "text": "public function actionGraph1() {\r\n $bars = array(5, 5, 5, 1, 8, 6, 5, 8, 7, 1, 2, 3);\r\n $dates = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\r\n $graph = new Chart();\r\n $graph->addBars($bars, 'ff0000');\r\n $graph->addXLabels($dates, '000000');\r\n $graph->addYScale('000000');\r\n $graph->output();\r\n }", "title": "" }, { "docid": "fba83a4556f9a8133e3e619e79faf725", "score": "0.41613007", "text": "public function disableControls()\n {\n $this->showControls = false;\n }", "title": "" }, { "docid": "f73e066f8e8658acddb8662b94c37939", "score": "0.4158088", "text": "public static function updateColumnChart(){\n\t}", "title": "" }, { "docid": "7f8e71fdebf200607a49600ecdf90bcf", "score": "0.41480768", "text": "public function isShowOutOfStock()\n {\n return true;\n }", "title": "" }, { "docid": "aabbde8fdba808540d9576a3c0ab8dc9", "score": "0.41465887", "text": "public function setIsVisibleAttribute($value){\n $this->attributes['is_visible'] = !empty($value)?: 0;\n }", "title": "" } ]
c73415729045a4e31ea553746c01c8f5
Share lock the selected rows in the table.
[ { "docid": "c4860902bdcd8913c5f045b6966b9cc0", "score": "0.63122743", "text": "public static function sharedLock()\n { \n return \\Illuminate\\Database\\Query\\Builder::sharedLock();\n }", "title": "" } ]
[ { "docid": "defbb2812c8ed7fee8c8e94a4de0e6dc", "score": "0.61648583", "text": "public function sharedLock($sqlQuery){ }", "title": "" }, { "docid": "defbb2812c8ed7fee8c8e94a4de0e6dc", "score": "0.61648583", "text": "public function sharedLock($sqlQuery){ }", "title": "" }, { "docid": "827db99ae81d6117d410ee6683ce4daa", "score": "0.58517236", "text": "public function sharedLock();", "title": "" }, { "docid": "398385c70562b4b26e229dd07ce8acd6", "score": "0.5686441", "text": "private function lock()\n {\n return $this->model->action('keyword','lock',\n array('job' => 'lock',\n 'id_key' => (int)$this->current_id_key,\n 'by_id_user' => (int)$this->controllerVar['loggedUserId']) );\n }", "title": "" }, { "docid": "2b5327f63d0b25d973efe6e3f5ee3c1a", "score": "0.5596985", "text": "public function lockForUpdate();", "title": "" }, { "docid": "2b5327f63d0b25d973efe6e3f5ee3c1a", "score": "0.5596985", "text": "public function lockForUpdate();", "title": "" }, { "docid": "c89b343fbb970a138caf2898ce11a2e6", "score": "0.5552355", "text": "public function lock();", "title": "" }, { "docid": "c89b343fbb970a138caf2898ce11a2e6", "score": "0.5552355", "text": "public function lock();", "title": "" }, { "docid": "51faba102f813c25485cd80315ccc1a5", "score": "0.552568", "text": "function lock($table, $mode=\"write\") {\r\n $this->connect();\r\n \r\n $query=\"lock tables \";\r\n if (is_array($table)) {\r\n while (list($key,$value)=each($table)) {\r\n if ($key==\"read\" && $key!=0) {\r\n $query.=\"$value read, \";\r\n } else {\r\n $query.=\"$value $mode, \";\r\n }\r\n }\r\n $query=substr($query,0,-2);\r\n } else {\r\n $query.=\"$table $mode\";\r\n }\r\n $res = @mysql_query($query, $this->Link_ID);\r\n if (!$res) {\r\n $this->halt(\"lock($table, $mode) failed.\");\r\n return 0;\r\n }\r\n return $res;\r\n }", "title": "" }, { "docid": "2e58b3dc9a3ce78e927106ca0870cb74", "score": "0.5518757", "text": "private static function _lock_for_read()\n\t{\n\t\tDB::query(null,'SET AUTOCOMMIT = 0')->execute();\n\t\tDB::query(null,'LOCK TABLES '.self::MAIN_TABLE.' READ')->execute();\n\t}", "title": "" }, { "docid": "2bc33000c36ce11897279f76ec9503aa", "score": "0.5494674", "text": "private function getLocks()\n {\n $row = 0;\n \n foreach($this->tplVar['keys'] as $node)\n {\n // lock the user to edit\n $result = $this->model->action('keyword','lock',\n array('job' => 'is_locked',\n 'id_key' => (int)$node['id_key'],\n 'by_id_user' => (int)$this->viewVar['loggedUserId']) );\n \n if(($result !== TRUE) && ($result !== FALSE))\n {\n $this->tplVar['keys'][$row]['lock'] = TRUE; \n } \n else\n {\n $this->tplVar['keys'][$row]['lock'] = FALSE; \n }\n \n $row++;\n } \n }", "title": "" }, { "docid": "3ee3b1a25219b1c750d31875a94426db", "score": "0.5452202", "text": "public static function lockForUpdate()\n { \n return \\Illuminate\\Database\\Query\\Builder::lockForUpdate();\n }", "title": "" }, { "docid": "3cdc19bcf2470675c97dba11287d4508", "score": "0.54165554", "text": "function locktable($table,$mode=\"write\")\n {\n $table = str_replace(\"ALTPREFIX\",$this->altprefix,$table);\n $table = str_replace(\"PREFIX\",$this->tableprefix,$table);\n $result = $this->lock($table,$mode);\n return($result);\n }", "title": "" }, { "docid": "d8d8004f683478c387c6a8e19e876ca8", "score": "0.5416069", "text": "private static function _lock_for_read()\n {\n DB::query(null,'SET AUTOCOMMIT = 0')->execute();\n DB::query(null,'LOCK TABLES '.self::CARS_TABLE.' READ')->execute();\n }", "title": "" }, { "docid": "6fe73fb910770fedc2350edae2d2621b", "score": "0.5370564", "text": "public function getSelectedRows();", "title": "" }, { "docid": "5e123f4f64cc63af785238edddd26c4b", "score": "0.53478706", "text": "protected function _lockStockItems($productId = NULL)\n {\n $resource = Mage::getSingleton('core/resource');\n $adapter = $resource->getConnection('core_read');\n $select = $adapter->select()->forUpdate(TRUE)\n ->from(['stock_item' => $resource->getTableName('cataloginventory/stock_item')], 'item_id');\n if (is_numeric($productId)) {\n $select->where('stock_item.product_id = ?', $productId);\n } elseif (is_array($productId)) {\n $select->where('stock_item.product_id IN (?)', $productId);\n }\n $adapter->query($select)->closeCursor();\n }", "title": "" }, { "docid": "054c688458efa435fefabf6c83997693", "score": "0.52790284", "text": "abstract public function lockTable($tableName);", "title": "" }, { "docid": "8d8e128aabe68aa46adb68ebf6a4afc8", "score": "0.5256096", "text": "abstract protected function lockInternal();", "title": "" }, { "docid": "293a17da9c6c4b5513811a82ea15b359", "score": "0.52487826", "text": "private static function _lock_for_write()\n\t{\n\t\tDB::query(null,'SET AUTOCOMMIT = 0')->execute();\n\t\tDB::query(null,'LOCK TABLES '.self::MAIN_TABLE.' WRITE')->execute();\n\t}", "title": "" }, { "docid": "daceb46821a5214c3f3854d6b343aed4", "score": "0.5235197", "text": "private function getLocks()\n {\n foreach($this->viewVar['textes'] as $key => $text)\n {\n // lock the user to edit\n $result = $this->model->action('misc','lock',\n array('job' => 'is_textlocked',\n 'id_text' => (int)$text['id_text'],\n 'by_id_user' => (int)$this->controllerVar['loggedUserId']) );\n\n if(($result !== TRUE) && ($result !== FALSE))\n {\n $this->viewVar['textes'][$key]['lock'] = TRUE;\n }\n else\n {\n $this->viewVar['textes'][$key]['lock'] = FALSE;\n }\n }\n }", "title": "" }, { "docid": "666676869c4a35ee2c7dd387e97dff27", "score": "0.5228025", "text": "private static function _lock_for_write()\n {\n DB::query(null,'SET AUTOCOMMIT = 0')->execute();\n DB::query(null,'LOCK TABLES '.self::CARS_TABLE.' WRITE')->execute();\n }", "title": "" }, { "docid": "35166c6c03fc16b93e30c5ad2693308d", "score": "0.5227333", "text": "public static function lock($value = true)\n { \n return \\Illuminate\\Database\\Query\\Builder::lock($value);\n }", "title": "" }, { "docid": "188a6f41f540750f6cd22425645aabdb", "score": "0.51960206", "text": "public function sharedLock(string $sqlQuery): string;", "title": "" }, { "docid": "41a06710fe1e6683caae443a8c6710f2", "score": "0.5181723", "text": "public function getSharedBySocieteId($id) {\n\t\treturn ($this->_db->fetchAll(\"SELECT * FROM ANNUAIRE_SHARE s, USER u WHERE u.USER_ID = s.USER_ID AND s.SOCIETE_ID = ?\", Array($id)));\n\t}", "title": "" }, { "docid": "4c2dcf1d78ae0738af6a3cf9fcd06b9c", "score": "0.5162338", "text": "public function bulkLock(Request $request)\n {\n return $this->bulk($request, 'lock', 'updated');\n }", "title": "" }, { "docid": "ef6b9a1ce64cd3397a4d0560ef1aa194", "score": "0.5154836", "text": "function lock();", "title": "" }, { "docid": "fac820078c15e00eec2454b128875328", "score": "0.51069725", "text": "public function supportsLocking();", "title": "" }, { "docid": "16d9381429f27e5f4c2728202360e02a", "score": "0.50960946", "text": "public function lockTable($table) {\n $this->setQuery('LOCK TABLES ' . $this->quoteName($table) . ' WRITE')->execute();\n\n return $this;\n }", "title": "" }, { "docid": "f90328b942a80922fa1f71a3abd6609a", "score": "0.5094077", "text": "public function lockTable($table)\n\t{\n\t\t$this->setQuery('LOCK TABLES ' . $this->quoteName($table) . ' WRITE')->execute();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "af0ed266bc6143da06dea96feeea17fd", "score": "0.4993553", "text": "public function lock(ParDataPartnership $par_data_partnership);", "title": "" }, { "docid": "2c7fce2fcd9bbc2cfa9287310eba1f0b", "score": "0.49786708", "text": "function lock() {\r\n\r\n // set the \"locked\" private attribute of the control\r\n $this->set_attributes(array('locked' => true));\r\n\r\n }", "title": "" }, { "docid": "63a4ccc13706f4091e4ec1d4e4866d30", "score": "0.49754038", "text": "public function updatedSelectAll(): void\n {\n if (count($this->getSelected()) === (clone $this->baseQuery())->pluck($this->getPrimaryKey())->count()) {\n $this->clearSelected();\n } else {\n $this->setAllSelected();\n }\n }", "title": "" }, { "docid": "f986a0bc70bfa16f6befa815430ebe23", "score": "0.49305665", "text": "final public function lock () {\n }", "title": "" }, { "docid": "f986a0bc70bfa16f6befa815430ebe23", "score": "0.49305665", "text": "final public function lock () {\n }", "title": "" }, { "docid": "eb49293c162ed1788ff225ce93c7042e", "score": "0.48785716", "text": "function sync_row($db1_row, $db2_row, $table, $db1_con, $db2_con) {\n\t$columns = fetch_columns($table, $db1_con);\n\t$column_datatypes = get_column_datatypes($columns);\n\t$pk = get_primary_key($table, $db1_con);\n\t$pk_id = $db1_row[$pk];\n\t\n\t//sorts which columns and elements need updates and which ones don't\n\t$sorted_db1_cols = check_row_for_updates($db1_row, $db2_row, $table, $db1_con, $db2_con);\n\t\n\t//updates rows\n\t$db1_updated_columns = $sorted_db1_cols[0];\n\t$db1_remaining_columns = $sorted_db1_cols[1];\n\t$db1_updated_elements = $sorted_db1_cols[2];\n\t$db1_remaining_elements = $sorted_db1_cols[3];\n\tupdate_query($db1_updated_columns, $db1_remaining_columns, $db1_updated_elements, $pk_id, $table, $db2_con);\n}", "title": "" }, { "docid": "904c3b486681a15a2e464fc004813d95", "score": "0.48507118", "text": "function getLocks();", "title": "" }, { "docid": "abf8950da9873eb4abb30797aae1f3df", "score": "0.48153394", "text": "private function lockDB_r()\n {\n $this->fdb->flock(LOCK_SH) or die('Error: Unable to lock DB for reading.');\n }", "title": "" }, { "docid": "722e19cf26a878a00355e9e720a653e8", "score": "0.48085174", "text": "public function lock($tablename, $type) {\n return $this->link->query('LOCK TABLES '.$tablename.' '.$type.';');\n }", "title": "" }, { "docid": "a1485f8e1b9a5fdddcd0271206ff69a0", "score": "0.47824898", "text": "public function lock($operation);", "title": "" }, { "docid": "34c7147ade8c8c96da1f4a5565ee8e34", "score": "0.47771347", "text": "public function setLock() {\n\n\t\t$this->lock = true;\n\t\treturn $this;\n\t\n\t}", "title": "" }, { "docid": "4b16b5b1ec77473f7b1354e7643af54d", "score": "0.47705057", "text": "public function testLockAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "63448378868ca323c58177206985cb44", "score": "0.47612205", "text": "public function getSharedByContactId($id) {\n\t\treturn ($this->_db->fetchAll(\"SELECT * FROM ANNUAIRE_SHARE s, USER u WHERE u.USER_ID = s.USER_ID AND s.CONTACT_ID = ?\", Array($id)));\n\t}", "title": "" }, { "docid": "8d1010faa2b86a92e39d6e8c556efd0f", "score": "0.4721177", "text": "public function updatedSelected(): void\n {\n $this->setSelectAllDisabled();\n }", "title": "" }, { "docid": "0ccd6b875332c5327af2232310ab389e", "score": "0.47043288", "text": "function freeze() {\n parent::freeze();\n foreach (array_keys($this->_rows) as $key) {\n foreach (array_keys($this->_rows[$key]) as $key2) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n }", "title": "" }, { "docid": "4d64ea0c08473832a35cdf342f2ca7e5", "score": "0.46654028", "text": "function points_for_share($data){\n\t\tglobal $DB;\n\n\t\t$DB->query_exec(\"SELECT shared FROM phpsession WHERE u_id = {$data['u_id']} \");\n\t\t$db_shared_empty = $DB->fetch();\n\n\t\tif ( empty( $db_shared_empty ) ) {\n\t\t\t$DB->query_exec(\"INSERT INTO phpsession (u_id) VALUES ( {$data['u_id']} ) \");\n\t\t}\n\n\t\t$db_shared_empty = $db_shared_empty[0]['shared'];\n\n\t\tif ( isset($_SESSION['user']->shared) ) { \n\t\t\tif ( $_SESSION['user']->shared != $db_shared_empty ) {\n\t\t\t\t$DB->query_exec(\"UPDATE phpsession SET shared = {$_SESSION['user']->shared} WHERE u_id={$data['u_id']};\");\n\t\t\t}\n\t\t}\n\n\t\t$DB->query_exec(\"SELECT shared FROM phpsession WHERE u_id = {$data['u_id']} \");\n\t\t$db_shared = $DB->fetch();\n\t\t$db_shared = $db_shared[0]['shared'];\n\n\t\t\n\t\t$_SESSION['user']->shared = $db_shared;\n\n\n\n if ($_SESSION['user']->shared > 0) {\n $points_to_skip = 0;\n } else {\n $points_to_skip = 15;\n }\n \n\n\n\t\t$u_total_score = get_user_total_score($data['u_id']);\n\t\t$u_level_score = get_user_score_for_level($data['u_id']);\n\n\n\t\t$new_total_score = $u_total_score + $points_to_skip;\n\t\t$new_level_score = $u_level_score + $points_to_skip;\n\n\t\t// записали в базу, обновили общее к-во баллов\n\t\t$DB->query_exec(\"UPDATE users SET total_score={$new_total_score}, score_for_level={$new_level_score} WHERE id={$data['u_id']};\");\n\n\t\tif ( !empty($data['q_id']) ) {\n\t\t\t$DB->query_exec(\"INSERT INTO shared (u_id,q_id,provider,score) VALUES ( {$data['u_id']}, {$data['q_id']}, '{$data['provider']}', '{$points_to_skip}')\");\n\t\t}\n\t\tif ( !empty($data['level']) ) {\n\t\t\t$DB->query_exec(\"INSERT INTO shared (u_id,level,provider,score) VALUES ( {$data['u_id']}, {$data['level']}, '{$data['provider']}', '{$points_to_skip}')\");\n\t\t}\n\n\t\tupdate_user_level($data['u_id']);\n\n\n \t$_SESSION['user']->shared++;\n \t$DB->query_exec(\"UPDATE phpsession SET shared = {$_SESSION['user']->shared} WHERE u_id={$data['u_id']};\");\n\n\n \t$res['text'] = \"баллы успешно начислены\";\n\n \treturn json_decode($res);\n }", "title": "" }, { "docid": "706cc10bb28d82ae04e8dd3f8b16edbb", "score": "0.46628848", "text": "public function lock($mode=true);", "title": "" }, { "docid": "fccb67a259a268a034ff94cba67464b8", "score": "0.46611065", "text": "public function lock(): void\n {\n $this->locked = true;\n }", "title": "" }, { "docid": "96a7967ad2fb9aaf02b0a5b58291cd8a", "score": "0.46590823", "text": "function canSelectRows()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "a95b1149801bbe12f3ca148c901a2958", "score": "0.4654509", "text": "function pdo_lock_tables($tables)\n{\n $table_str = implode(', ', $tables);\n\n if (config('database.default') == 'pgsql') {\n // PgSql table locking syntax:\n // http://www.postgresql.org/docs/8.1/static/sql-lock.html\n pdo_query('BEGIN WORK');\n $locked = pdo_query('LOCK TABLE ' . $table_str);\n if (!$locked) {\n pdo_query('COMMIT WORK');\n }\n return $locked;\n } else {\n // MySQL table locking:\n // http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html\n return pdo_query('LOCK TABLES ' . $table_str . ' WRITE');\n }\n}", "title": "" }, { "docid": "6c339fcbf3dbca37a0a06d734e916873", "score": "0.46488777", "text": "public function lock($value = true);", "title": "" }, { "docid": "5e56906fd515758d4647bb10af3a3e1c", "score": "0.4636178", "text": "function syncItems($table,$items,$where=[]){\n\t\tDb::startTransaction();\n\t\t//collect ids to exclude from delete\n\t\t$ids = [];\n\n\t\tforeach((array)$items as $item){\n\t\t\t$keys = Control::$model->flatMatchedKeys($table,$item);\n\t\t\t$itemWhere = array_merge($where,Arrays::extract($keys,$in));\n\t\t\t$id = \\Db::row($table,$itemWhere,'id');\n\t\t\tif($id){\n\t\t\t\t$ids[] = $id;\n\t\t\t\t\\Db::update($table,$item,$itemWhere);\n\t\t\t}else{\n\t\t\t\t$id = \\Db::insert($table,array_merge($where,$item));\n\t\t\t\t$ids[] = $id;\n\t\t\t}\n\t\t}\n\t\t$where['\"'] = 'id not in ('.implode(',',$ids).')';\n\t\t\\Db::query('delete',$where);\n\n\t\tDb::commitTransaction();\n\t\t\\Hook::run('userAction','interest update');\n\t}", "title": "" }, { "docid": "6818cc8dd79e246e2d5ecbbc0fafe56f", "score": "0.46339378", "text": "public function lockElement($jobId);", "title": "" }, { "docid": "7b0ff1a76d7327a87df5a5131ddee5ce", "score": "0.46223637", "text": "abstract public function lockTables(array $tableNames);", "title": "" }, { "docid": "9e9aaa07fc8ca82c8b586e40bc629cc7", "score": "0.4608217", "text": "public function setAllSelected(): void\n {\n $this->setSelectAllEnabled();\n $this->setSelected((clone $this->baseQuery())->pluck($this->getPrimaryKey())->map(fn ($item) => (string) $item)->toArray());\n }", "title": "" }, { "docid": "524355da52446f4d73039778d19163ed", "score": "0.46028712", "text": "public function lockTable(PDO $con, $table)\n {\n $con->exec(\"LOCK TABLE \" . $table . \" WRITE\");\n }", "title": "" }, { "docid": "035157e7978c56e31c88c873e153acc5", "score": "0.46008074", "text": "public function optimisticLock()\n {\n return null;\n }", "title": "" }, { "docid": "19d6d9ba5df46cc6d9e4af22316c6382", "score": "0.45935446", "text": "function lock(Sabre_DAV_Lock $lockInfo);", "title": "" }, { "docid": "9e101043354dcc83b3bf1cef7af927d4", "score": "0.45683417", "text": "public function getRowsetAll($srow=array())\n {\n }", "title": "" }, { "docid": "10b5e116c67d5363e7042727348b8381", "score": "0.45665863", "text": "public function lock()\n {\n parent::lock();\n foreach ($this->containers as $container) {\n $container->lock();\n }\n }", "title": "" }, { "docid": "414b62aea0e0b02731c55cca302a4897", "score": "0.4537813", "text": "public function canSelectRows()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "740ab1fccdda815ee7d972f256c008c5", "score": "0.452314", "text": "public function unlock() {\r\n return $this->link->query('UNLOCK TABLES;');\r\n }", "title": "" }, { "docid": "a60fc395c1b209e59ce961620a9e3668", "score": "0.4522003", "text": "public function lock()\n {\n $this->getPidFileHandler()->lock();\n }", "title": "" }, { "docid": "1697708aa9f63129f4e1b4dc4aa42988", "score": "0.45216006", "text": "public function sharedLock($sharedLock = null)\n {\n $this->_params['shared_lock'] = (boolean) $sharedLock;\n\n return $this;\n }", "title": "" }, { "docid": "89fcba5d731a354bfaf844d407708a97", "score": "0.44989857", "text": "public function synchroUsers(){}", "title": "" }, { "docid": "ab368c903005429a69f9fcb9eda48a1f", "score": "0.4485165", "text": "public function setShared($shared){ }", "title": "" }, { "docid": "940812b105f435b7fadc47e1f352c476", "score": "0.44705275", "text": "private function fetchTargetRows()\n {\n $model = $this->targetModel();\n $source = $model->source();\n\n $sql = strtr(\n 'SELECT %key FROM `%table`',\n [\n '%table' => $source->table(),\n '%key' => $this->oldPrimaryKey(),\n ]\n );\n\n return $source->db()->query($sql, PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "b350b5a8f3de5f8281c2172194fe1ffa", "score": "0.4456903", "text": "private static function lock($keys)\n\t{\n\t\tif (is_array($keys)) {\n\t\t\t$db = JFactory::getDbo();\n\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->update($db->quoteName('#__jcomments_mailq'));\n\t\t\t$query->set($db->quoteName('session_id') . ' = ' . $db->Quote(self::getSessionId()));\n\t\t\t$query->where($db->quoteName('session_id') . ' IS NULL');\n\t\t\t$query->where($db->quoteName('id') . ' IN (' . implode(',', $keys) . ')');\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t}\n\t}", "title": "" }, { "docid": "38314c375c44fb8739fa026e76005f33", "score": "0.44390258", "text": "function _lock_tables($tables) {\n if ($tables) {\n $tables_escaped = array();\n foreach ($tables as $table) {\n $tables_escaped[] = '`'. db_escape_table($table) .'` WRITE';\n }\n $this->query('LOCK TABLES '. implode(', ', $tables_escaped));\n }\n }", "title": "" }, { "docid": "fa2b61f5d8e16f6c98df4d0d70a32f60", "score": "0.44279197", "text": "public function writeLock(): Lock;", "title": "" }, { "docid": "851b61750733e1695d63466b02051397", "score": "0.4409001", "text": "public static function updateLock($table, $record) {\n\t\t$queryUpdate = $GLOBALS ['TYPO3_DB']->sql_query ( 'UPDATE tx_crud_locks SET tstamp = ' . time () . ' WHERE crud_table = \"' . $table . '\" AND crud_record = ' . $record . ' AND crud_user = \"' . $GLOBALS ['TSFE']->fe_user->user [\"username\"] . '\" AND crud_session=\"' . $GLOBALS ['TSFE']->fe_user->id . '\"' );\n\n\t\treturn $queryUpdate;\n\t}", "title": "" }, { "docid": "bc0e1b6243c449e517963f5b8166dee8", "score": "0.4396581", "text": "function copy(){\n\t\t\t$table_id = FSInput::get('id',0,'int');\n\t\t\t$lang_sort = FSInput::get('lang');\n\t\t\tif(!$table_id || !$lang_sort)\n\t\t\t\treturn;\n\t\t\t$table = $this ->getTable($table_id);\t\n\t\t\t$table_name = $table -> table_name;\t\t\t\n\t\t\t\n\t\t\t$this -> synchronize_table($table_name, $table_name.'_'.$lang_sort );\n\t\t\t$this -> remove_data_excess($table_name, $table_name.'_'.$lang_sort );\n\t\t\t$this -> copy_data($table_name, $table_name.'_'.$lang_sort);\n\t\t\t\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ff44f95cca6b7c25d437bcc243db7791", "score": "0.4396373", "text": "public function lockKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "938360a14b5d9366547e96f8c68cdc8a", "score": "0.43944475", "text": "public function lockAction ()\n {\n $request = $this->getRequest();\n $test_info_id = $request->getParam('test_info_id');\n \n $sessional = new Acad_Model_Test_Sessional(array('test_info_id'=>$test_info_id));\n \n $result = $sessional->setLock(true);\n if ($result) {\n echo 'Successfully saved!! Affected: '.$result;\n }\n }", "title": "" }, { "docid": "6471f5bc09b4ce591e17ceab5d8a2657", "score": "0.43932185", "text": "public function sharedList_get()\n\t{\t\n\t\t$userId = $this->encrypt->decode(rawurldecode($_GET['share']));\t\n\t\t$listinfo = $this->WishlistModel->getListInfo($userId);\n\t\t$username =$this->WishlistModel->getListOwner($userId);\n\t\t$listitems = $this->WishlistModel->getItemsForSharedList($userId);\n\t\t$this->load->view('sharing', array ('listname' => $listinfo['name'],'listdescription' => $listinfo['description'],'username' => $username['username'],'listitems' => $listitems));\n\t}", "title": "" }, { "docid": "d14ea9031ec237c852e098481f01430b", "score": "0.43889424", "text": "function lock(string $key): void;", "title": "" }, { "docid": "38e9264884cd21c10b533c25adff80f8", "score": "0.43795875", "text": "function GetLockedTasks() {\r\n return $this->GetByCondition(\"t1.\".self::TRANSACTION_GUID.\"='\".SqlQuote($this->TransactionGuid).\"'\");\r\n }", "title": "" }, { "docid": "707d1154eb133443f0c4cee25b9bcf13", "score": "0.43702847", "text": "public function getAllUserShares() {\n $this->debug->append(\"STA \" . __METHOD__, 4);\n if (! $data = $this->memcache->get(STATISTICS_ALL_USER_SHARES)) {\n $data['share_id'] = 0;\n $data['data'] = array();\n }\n $stmt = $this->mysqli->prepare(\"\n SELECT\n ROUND(IFNULL(SUM(IF(our_result='Y', IF(s.difficulty=0, POW(2, (\" . $this->config['difficulty'] . \" - 16)), s.difficulty), 0)), 0) / POW(2, (\" . $this->config['difficulty'] . \" - 16)), 0) AS valid,\n ROUND(IFNULL(SUM(IF(our_result='N', IF(s.difficulty=0, POW(2, (\" . $this->config['difficulty'] . \" - 16)), s.difficulty), 0)), 0) / POW(2, (\" . $this->config['difficulty'] . \" - 16)), 0) AS invalid,\n u.id AS id,\n u.donate_percent AS donate_percent,\n u.is_anonymous AS is_anonymous,\n u.username AS username\n FROM \" . $this->share->getTableName() . \" AS s,\n \" . $this->user->getTableName() . \" AS u\n WHERE u.username = SUBSTRING_INDEX( s.username, '.', 1 )\n AND UNIX_TIMESTAMP(s.time) > IFNULL(\n (\n SELECT MAX(b.time)\n FROM \" . $this->block->getTableName() . \" AS b\n ) ,0 )\n AND s.id > ?\n GROUP BY u.id\");\n if ($stmt && $stmt->bind_param('i', $data['share_id']) && $stmt->execute() && $result = $stmt->get_result()) {\n $data_new = array();\n while ($row = $result->fetch_assoc()) {\n if (! array_key_exists($row['id'], $data['data'])) {\n $data['data'][$row['id']] = $row;\n } else {\n $data['data'][$row['id']]['valid'] += $row['valid'];\n $data['data'][$row['id']]['invalid'] += $row['invalid'];\n $data['data'][$row['id']]['donate_percent'] = $row['donate_percent'];\n $data['data'][$row['id']]['is_anonymous'] = $row['is_anonymous'];\n }\n }\n $data['share_id'] = $this->share->getMaxShareId();\n return $this->memcache->setCache(STATISTICS_ALL_USER_SHARES, $data);\n }\n // Catchall\n $this->debug->append(\"Unable to fetch all users round shares: \" . $this->mysqli->error);\n return false;\n }", "title": "" }, { "docid": "1dce444d459a8b195f1b045ef5918043", "score": "0.43701836", "text": "function lockAndRead() {\n\t\t\t$this->lock();\n\t\t\treturn $this->read();\n\t\t}", "title": "" }, { "docid": "4d2ca313613219e611916e8acc96e6c0", "score": "0.4357128", "text": "public function selectedRows() {\n\t\treturn $this->selectedRows;\n\t}", "title": "" }, { "docid": "fe3cb7c053a10e7943747df6726c1723", "score": "0.43563408", "text": "public function lockTable($tableName)\n {\n $this->setQuery('LOCK TABLES ' . $this->quoteName($tableName) . ' WRITE')->execute();\n\n return $this;\n }", "title": "" }, { "docid": "4381a63d892a4d101991481f7430f688", "score": "0.43551046", "text": "private static function db_get_share(){\n\t\t$query=OC_DB::prepare(\"SELECT * FROM `*PREFIX*share` \");\n\t\t$result=$query->execute();\n\t\t\n $rtn = array();\n \n\t\twhile($row=$result->fetchRow()) {\n\t\t\t$rtn[] = $row;\n\t\t}\n\t\treturn $rtn;\n\t}", "title": "" }, { "docid": "5b220e65d93c9e43e02ce2ba97d140ea", "score": "0.43445373", "text": "function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['ks_id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "9b1f3266841073eeac418c3ea9a31e98", "score": "0.4335003", "text": "public function lock() : bool;", "title": "" }, { "docid": "ec980b0b317adea317e3851078cfb66a", "score": "0.43330154", "text": "function sync_data($table, $db1_con, $db2_con) {\n\t$db1_data = fetch_data($table, $db1_con);\n\t$db2_data = fetch_data($table, $db2_con);\n\t$i = 0; \n\tforeach ($db1_data as $db1_row) {\n\t\t$db2_row = $db2_data[$i];\n\t\tif ($db2_row !== $db1_row) {\n\t\t\tsync_row($db1_row, $db2_row, $table, $db1_con, $db2_con);\t\n\t\t}\n\t\t$i++;\t\n\t}\n\t\n}", "title": "" }, { "docid": "1945dec6d8547fd533f391824ffe65fb", "score": "0.43325886", "text": "public function requireLock(string $lockName, string $lockedByTitle, string $lockedByIPNo, string $sessionId = ''): array;", "title": "" }, { "docid": "5a0d8f3fa7beb90c27a2102cbefdf45c", "score": "0.4329148", "text": "public function crossUpdateFromSelect($table)\n {\n return $this->getAdapter()->updateFromSelect($this, $table);\n }", "title": "" }, { "docid": "450a15fcd76e0368a024d98b050be24d", "score": "0.43290228", "text": "function action_multiupdate()\n {\n $data = $this->getEntity()->m_postvars['atkdatagriddata'];\n foreach ($data as $entry) {\n $entry = $this->getEntity()->updateRecord($entry, $this->getEntity()->m_editableListAttributes);\n $record = $this->getEntity()->select($entry['atkprimkey'])->mode('edit')->firstRow();\n $record = array_merge($record, $entry);\n $this->getEntity()->updateDb($record, true, '', $this->getEntity()->m_editableListAttributes);\n }\n\n $this->getEntity()->getDb()->commit();\n die('true');\n }", "title": "" }, { "docid": "8e2ff08d57c1b9fe928c302a988644a1", "score": "0.43184963", "text": "public function __sleep()\r\n\t{\r\n\t\treturn array('rowid');\r\n\t}", "title": "" }, { "docid": "b9523f640ce078c3e955c800f015cfeb", "score": "0.4305719", "text": "function setLocked($l) {\n\t\t$this->set(\"locked\",$l);\n\t}", "title": "" }, { "docid": "0c2ce90edaa7b851152d4553e54dec14", "score": "0.43016142", "text": "protected function _getPrimaryKey()\n {\n if (!is_array($this->_primary)) {\n throw new \\RuntimeException(\"The primary key must be set as an array\");\n }\n\n $primary = array_flip($this->_primary);\n $array = array_intersect_key($this->_data, $primary);\n\n if (count($primary) != count($array)) {\n throw new \\RuntimeException(\n sprintf(\"Table '%s' does not have the same primary key as the row.\", get_class($this->_table)));\n }\n\n return $array;\n }", "title": "" }, { "docid": "67fab05c72c78a0cc400cef56ebc33ba", "score": "0.42971078", "text": "public function lock($key, $quiet = FALSE) {}", "title": "" }, { "docid": "c5c1ccd1f9781d7b1230214f70c06308", "score": "0.42919442", "text": "public function set($data=null)\n\t{\n\n\t\tif (!$data) $data = array();\n\n\t\t//must have at least edit permissions\n\t\tif ($this->isLocked($data[\"token\"]))\n\t\t{\n\t\t\t$this->throwError(_I18N_OBJECT_LOCKED_ERROR);\n\t\t\treturn false;\n\t\t}\n\n\t\t//make sure we aren't trying to do an exclusive lock on a shared lock\n\t\t$locks = $this->get($this->objectId);\n\t\tif ($locks[\"count\"] > 0 && $locks[0][\"scope\"]==\"1\" && $data[\"scope\"]==\"2\")\n\t\t{\n\t\t\t$this->throwError(_I18N_OBJECT_LOCK_SHARED_ERROR);\n\t\t\treturn false;\n\t\t}\n\n\t\t//create a client token if not passed one\n\t\tif (!$data[\"token\"]) $data[\"token\"] = $this->createToken();\n\n\t\t$now = time();\n\t\t\n\t\t//if timeout is set to infinity, make it last until 2031. this is\n\t\t//for indefinite checkouts\n\t\tif ($data[\"timeout\"]==\"-1\") $data[\"timeout\"] = strtotime(\"2031-12-31\") - $now; \n\n\t\t//set some defaults\n\t\tif (!$data[\"timeout\"]) \t$data[\"timeout\"] = \"1800\";\t\t\t\t//default to 30 min timeout\n\t\tif (!$data[\"scope\"]) \t\t$data[\"scope\"] = \"2\";\t\t\t\t\t\t\t//default to exclusive lock\n\t\tif (!$data[\"depth\"]) \t\t$data[\"depth\"] = \"0\";\t\t\t\t\t\t\t//default to direct lock\n\t\tif (!$data[\"uri\"]) \t\t\t$data[\"uri\"] = $this->path;\t\t\t\t//default to current object's path\n\t\tif (!$data[\"owner\"]) \t\t$data[\"owner\"] = USER_LOGIN;\t\t\t//default to current user login\n\n\t\t$sql = \"SELECT object_id FROM docmgr.dm_locks WHERE object_id='\".$this->objectId.\"' AND token='\".$data[\"token\"].\"'\";\n\t\t$info = $this->DB->single($sql);\n\n\t\t//setup the query\n\t\t$opt = null;\n\t\t$opt[\"owner\"] = $data[\"owner\"];\n\t\t$opt[\"timeout\"] = $data[\"timeout\"];\n\t\t$opt[\"scope\"] = $data[\"scope\"];\n\t\t$opt[\"depth\"] = $data[\"depth\"];\n\t\t$opt[\"uri\"] = $data[\"uri\"];\n\t\t$opt[\"created\"] = $now;\n\n\t\t//update the lock\t\t\t\t\n\t\tif ($info)\n\t\t{\n\t\t\t$opt[\"where\"] = \"object_id='\".$this->objectId.\"' AND token='\".$data[\"token\"].\"'\";\n\t\t\t$this->DB->update(\"docmgr.dm_locks\",$opt);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$opt[\"account_id\"] = USER_ID;\n\t\t\t$opt[\"account_name\"] = USER_FN.\" \".USER_LN;\n\t\t\t$opt[\"object_id\"] = $this->objectId;\n\t\t\t$opt[\"token\"] = $data[\"token\"];\n\t\t\t$this->DB->insert(\"docmgr.dm_locks\",$opt);\n\t\t}\n\n\t\tif ($this->DB->error()) $this->throwError($this->DB->error());\n\t\telse\n\t\t{\n\n\t\t\t//log the checkout\n\t\t\tlogEvent('OBJ_LOCKED',$this->objectId);\n\t\t\t \n\t\t\t//send a subscription alert\n\t\t\t$n = new NOTIFICATION_DOCMGR();\n $n->send($this->objectId,\"OBJ_LOCK_NOTIFICATION\"); \n\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0548e87e70adb5ddb641f88a55026186", "score": "0.42895135", "text": "function unlocktable()\n {\n $result = $this->unlock();\n return($result);\n }", "title": "" }, { "docid": "a31e17405e1b58955d38b2ada31c7782", "score": "0.42749804", "text": "public function locksystemAction()\n {\n $artId = $this->_request->getParam('artId');\n $mode = $this->_request->getParam('mode');\n $stage = $this->_request->getParam('stage');\n $submenuId = $this->_request->getParam('submenuId');\n $participate_obj = new EP_Participation_Participation();\n\n $lock_obj = new Ep_User_LockSystem();\n $userId=$this->adminLogin->userId ;\n if($mode == 'lock')\n {\n $checkLock = $lock_obj->lockExist($artId);\n if($checkLock == 'NO')\n {\n $lock_obj->article_id=$artId ;\n $lock_obj->user_id=$this->adminLogin->userId ;\n $lock_obj->lock_status=\"yes\" ;\n $lock_obj->insert();\n }\n else\n {\n $user_id=$this->adminLogin->userId ;\n $data = array(\"lock_status\"=>\"yes\", \"user_id\"=>$user_id);////////updating\n $query = \"article_id= '\".$artId.\"'\";\n $lock_obj->updateLockSystem($data,$query);\n }\n }\n else\n {\n $data = array(\"lock_status\"=>\"no\");////////updating\n $query = \"article_id= '\".$artId.\"' AND user_id='\".$userId.\"'\";\n $lock_obj->updateLockSystem($data,$query);\n $data = array(\"status\"=>\"under_study\");////////updating\n $query = \"article_id= '\".$artId.\"' AND status='on_hold'\";\n $participate_obj->updateParticipation($data,$query);\n }\n }", "title": "" }, { "docid": "7f1274b3e9a1e9f8972b0ada94ed268f", "score": "0.4274139", "text": "function writeWithLock($content) {\n\t\t\t$this->lock();\n\t\t\t$this->writeAndUnlock($content);\n\t\t}", "title": "" }, { "docid": "24ffe1e66f1a9a427c46e749f036b003", "score": "0.42717397", "text": "public function enableMultiQuery();", "title": "" }, { "docid": "d0c36b93808cf2a8c0455953d2855044", "score": "0.42701513", "text": "public function lock($key = null)\n {\n if (null === $key) {\n $this->setMetadata('_READONLY', true);\n\n return $this;\n }\n if (isset($this[$key])) {\n $this->setMetadata('_LOCKS', [$key => true]);\n }\n\n return $this;\n }", "title": "" }, { "docid": "01142961bb6e3ad99de139e7bbeb8e10", "score": "0.42668176", "text": "function Ajw_selecteditems()\n\t{\n\t\t$this->EE =& get_instance();\n\n\t\t$id = $this->EE->TMPL->fetch_param('id'); \n\t\t$name = $this->EE->TMPL->fetch_param('name'); \n\n\t\t$sql = \"SELECT ajw_selecteditems_cache \n\t\t\tFROM exp_ajw_selecteditems \n\t\t\tWHERE ajw_selecteditems_id = \\\"\" . $id . \"\\\" \n\t\t\tOR ajw_selecteditems_name = \\\"\" . $name . \"\\\" LIMIT 1\";\n\t\t\n\t\t$query = $this->EE->db->query($sql); \n\n\t\t$tagdata = $this->EE->TMPL->tagdata;\n\n\t\t$count = 0;\n\t\tif ($query->num_rows() > 0) {\n\n\t\t\t$row = $query->row();\n\t\t\t$tagdata = $this->EE->TMPL->swap_var_single(\"ajw_selecteditems\", $row->ajw_selecteditems_cache, $tagdata);\n\t\t\t$this->return_data = $tagdata;\n\n\t\t} else {\n\t\t\t\n\t\t\t$tagdata = $this->EE->TMPL->swap_var_single(\"ajw_selecteditems\", '0', $tagdata);\n\t\t\t$this->return_data = $tagdata;\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "afd94ae8e313d0c88e8a27a1e7867f0a", "score": "0.42531013", "text": "function DeleteRows() {\r\n\t\tglobal $conn, $Language, $Security, $st_master_kelas_kelompok;\r\n\t\t$DeleteRows = TRUE;\r\n\t\t$sSql = $st_master_kelas_kelompok->SQL();\r\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE) {\r\n\t\t\treturn FALSE;\r\n\t\t} elseif ($rs->EOF) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\r\n\t\t\t$rs->Close();\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tif (!$Security->CanDelete()) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t// Clone old rows\r\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\r\n\t\tif ($rs)\r\n\t\t\t$rs->Close();\r\n\r\n\t\t// Call row deleting event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$DeleteRows = $st_master_kelas_kelompok->Row_Deleting($row);\r\n\t\t\t\tif (!$DeleteRows) break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t\t$sKey = \"\";\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$sThisKey = \"\";\r\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= EW_COMPOSITE_KEY_SEPARATOR;\r\n\t\t\t\t$sThisKey .= $row['kode_otomatis'];\r\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t\t\t$DeleteRows = $conn->Execute($st_master_kelas_kelompok->DeleteSQL($row)); // Delete\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t\tif ($DeleteRows === FALSE)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\r\n\t\t\t\t$sKey .= $sThisKey;\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// Set up error message\r\n\t\t\tif ($st_master_kelas_kelompok->CancelMessage <> \"\") {\r\n\t\t\t\t$this->setFailureMessage($st_master_kelas_kelompok->CancelMessage);\r\n\t\t\t\t$st_master_kelas_kelompok->CancelMessage = \"\";\r\n\t\t\t} else {\r\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t} else {\r\n\t\t}\r\n\r\n\t\t// Call Row Deleted event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$st_master_kelas_kelompok->Row_Deleted($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $DeleteRows;\r\n\t}", "title": "" }, { "docid": "ca55d1a39d623acaa622e6a16681d8ba", "score": "0.42506763", "text": "public function listShareableUsers()\n {\n $user_id = (int) $this->auth->getStorage()->read()->user_id;\n $account_id = (int) $this->auth->getStorage()->read()->account_id;\n return $this->mapper->listShareableUsers($account_id, $user_id);\n }", "title": "" } ]
48b7ea76d3686aa04a99afbb9d0bf6fe
/ STATIC extras will not be copied. the creator shall create its own extras
[ { "docid": "b36bbc3804e5ff0f6f1ed24a5f402258", "score": "0.0", "text": "public static function copy($pac,$new_extras=array()){\n $user=0;\n $src=0;\n $trg=0;\n $ddata=0;\n $extras=$new_extras;\n //check if the input is a PacClass\n if(is_a($pac,'PacClass')){\n $pac_array=$pac->get_array();\n $user=$pac_array['user'];\n $src=$pac_array['src'];\n $trg=$pac_array['trg'];\n $raws=$pac_array['raws'];\n $ddata=$pac_array['ddata'];\n }\n $new_pac=new PacClass($user,$src,$trg,$raws,$ddata,$extras);\n return $new_pac;\n }", "title": "" } ]
[ { "docid": "07a66e61b416b54466ee6d2af07a5486", "score": "0.6808519", "text": "public function extra();", "title": "" }, { "docid": "e8bf673873b7404949ff4f2bc234b77b", "score": "0.61910665", "text": "public function getExtra();", "title": "" }, { "docid": "e8bf673873b7404949ff4f2bc234b77b", "score": "0.61910665", "text": "public function getExtra();", "title": "" }, { "docid": "0f2e47b984bc64e00a67ec504b1750a1", "score": "0.6075256", "text": "function extraStatics() {\n\t\treturn array(\n\t\t\t'db' => array(\n\t\t\t\t'Weight' => 'Float',\n\t\t\t\t'OldID' => 'Int',\n\t\t\t\t)\n\t\t\t);\n\t}", "title": "" }, { "docid": "8bbd554cb06dd2ce16c4ed06d9fd1aa8", "score": "0.5994092", "text": "public function extra3(){\n \t// body\n \t\n }", "title": "" }, { "docid": "c5e87988c3a83414e2fc289629498e4f", "score": "0.5966795", "text": "public function extra1(){\n \t// body\n \t\n }", "title": "" }, { "docid": "a12a608910a3f10aafd27fab3d35374e", "score": "0.594365", "text": "function extraStatics() {\n\t\treturn array(\n\t\t\t'db' => array(\n\t\t\t\t'HasGooglePlusOne' => 'Boolean',\n\t\t\t\t'PlusOneButtonSize' => \"Enum('standard, small, medium, tall')\"\n\t\t\t),\n\t\t\t'defaults' => array(\n\t\t\t\t'PlusOneButtonSize' => 'standard'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "fd66d65c36acee06ffcb40c11988e66d", "score": "0.59408844", "text": "public function extra2(){\n \t// body\n \t\n }", "title": "" }, { "docid": "a108d68a17108afe23c5935843ad54f8", "score": "0.59171486", "text": "public function extraStatics() {\n\t\treturn array (\n\t\t\t'db' => array(\n\t\t\t\t'Syndicated' => 'Boolean',\n\t\t\t\t'Syndicate' => 'Boolean',\n\t\t\t\t'SyndicatorSourceID' => 'Int'\n\t\t\t),\n\t\t\t'defaults' => array(\n\t\t\t\t'Syndicate' => true\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "c418e55967b688307a0276bd8b91b870", "score": "0.57830733", "text": "final public function __construct(array $attrs){static::_init($attrs);}", "title": "" }, { "docid": "eae4e422ec5288ea947bdaf953f85c43", "score": "0.56463015", "text": "public static function getExtras()\r\n {\r\n return self::$extras;\r\n }", "title": "" }, { "docid": "04b82bff69ed1e3a03ff07c82eea334a", "score": "0.5595272", "text": "public function additional_scripts() {}", "title": "" }, { "docid": "60e3545f7a60a97b0f82b3ab44e4c238", "score": "0.55873424", "text": "function add_attributes_fields(){\n require_once envato_market()->plugin_dir . 'inc/attributes/attributes-fields.php';\n }", "title": "" }, { "docid": "f96192af028f706113dd3ef556f03b80", "score": "0.5562151", "text": "function wponion_load_core_assets( $extra = array() ) {\n\t\twponion_load_asset( 'wponion-core' );\n\n\t\tif ( is_array( $extra ) ) {\n\t\t\tforeach ( $extra as $slug ) {\n\t\t\t\twponion_load_asset( $slug );\n\t\t\t}\n\t\t} else {\n\t\t\twponion_load_asset( $extra );\n\t\t}\n\t}", "title": "" }, { "docid": "b9d6435d013eebc85331b0bb73dcd3d3", "score": "0.5526212", "text": "protected function additionalCreationData()\n {\n return array();\n }", "title": "" }, { "docid": "c0302c0eef9a9cf9645b44e4fd0af35d", "score": "0.5500128", "text": "function rt_asset_include() {\n\n\t//require_once RT_ASSET_PATH_VENDOR . 'redux/ReduxCore/framework.php';\n\trequire_once RT_ASSET_PATH_VENDOR . 'taxonomy-metadata.php';\n\n\tglobal $rtast_app_autoload, $rtast_admin_autoload, $rtast_admin_metabox_autoload;\n\t$rtast_app_autoload = new RT_WP_Autoload( RT_ASSET_PATH_APP );\n\t$rtast_admin_autoload = new RT_WP_Autoload( RT_ASSET_PATH_ADMIN );\n\t$rtast_admin_metabox_autoload = new RT_WP_Autoload( RT_ASSET_PATH_ADMIN . 'meta-box/' );\n\n}", "title": "" }, { "docid": "ccb654c1481148e579a7ae6164638974", "score": "0.5453073", "text": "public function getExtras();", "title": "" }, { "docid": "3f01561c095e02f5d404c805f3b4ed5f", "score": "0.54528445", "text": "function extraStatics() {\n return array(\n 'db' => array(\n 'GoogleAnalyticsCode'\t\t=> 'VarChar(150)',\n 'GoogleVerificationCode'\t=> 'VarChar(255)',\n 'LearnLink'\t\t\t=> 'VarChar(150)',\n 'CreateLink'\t\t\t=> 'VarChar(150)',\n 'FindLink'\t\t\t=> 'VarChar(150)',\n 'ShareLink'\t\t\t=> 'VarChar(150)',\n 'MyEventsLink'\t\t\t=> 'VarChar(150)',\n 'MyResultsLink'\t\t\t=> 'VarChar(150)',\n 'MyAccountLink'\t\t\t=> 'VarChar(150)',\n 'MyEventsTitle'\t\t\t=> 'VarChar(150)',\n 'MyResultsTitle'\t\t=> 'VarChar(150)',\n 'MyAccountTitle'\t\t=> 'VarChar(150)',\n 'CreateAccountContent'\t\t=> 'HTMLText',\n 'LoginContent'\t\t\t=> 'HTMLText',\n 'MyEventsContent'\t\t=> 'HTMLText',\n 'MemberDefaultMessage'\t\t=> 'HTMLText',\n 'MemberFormTitle'\t\t=> 'VarChar(250)',\n 'FooterFAQLink' => 'VarChar(250)',\n 'FooterCol1title' => 'VarChar(250)',\n 'FooterCol1content' => 'HTMLText',\n 'FooterCol2title' => 'VarChar(250)',\n 'FooterCol2content' => 'HTMLText',\n 'FooterCol3title' => 'VarChar(250)',\n 'FooterCol3content' => 'HTMLText',\n 'HelpEmail' => 'VarChar(250)',\n\t\t\t\t'FooterSocialMediaMessage'\t\t=> 'VarChar(250)'\n )\n );\n }", "title": "" }, { "docid": "b9c5ef023204fb3911dfa77212983275", "score": "0.5432702", "text": "function cextras_autoriser(){}", "title": "" }, { "docid": "2f05d1265bfa09917bc555c1794b7706", "score": "0.5272408", "text": "function meta();", "title": "" }, { "docid": "52103087911fbbe6def6f83ea9f904db", "score": "0.5254963", "text": "private function __construct()\n {\n $this->fs = new Filesystem();\n $this->extra = self::$composer->getPackage()->getExtra();\n }", "title": "" }, { "docid": "afa446f46b62230043adef1685bf318a", "score": "0.5251056", "text": "function &getExtra()\n {\n if ( isset( $this->_extra ) ) {\n return $this->_extra;\n }\n $this->_extra = \"\";\n return $this->_extra;\n }", "title": "" }, { "docid": "79f3cbf76dd4fdfe70a892416820e46c", "score": "0.5238727", "text": "protected function helperUseManifest() {\n\t\t// Create a new instance of the manifest.\n\t\tglobal $flush;\n\t\t$manifest = new JackalopeManifest(BASE_PATH, false, $flush);\n\n\t\t// Overwrite the test one.\n\t\tSS_ClassLoader::instance()->pushManifest($manifest);\n\t\tSapphireTest::set_test_class_manifest($manifest);\n\t}", "title": "" }, { "docid": "79f3cbf76dd4fdfe70a892416820e46c", "score": "0.5238727", "text": "protected function helperUseManifest() {\n\t\t// Create a new instance of the manifest.\n\t\tglobal $flush;\n\t\t$manifest = new JackalopeManifest(BASE_PATH, false, $flush);\n\n\t\t// Overwrite the test one.\n\t\tSS_ClassLoader::instance()->pushManifest($manifest);\n\t\tSapphireTest::set_test_class_manifest($manifest);\n\t}", "title": "" }, { "docid": "61bb68380f50da98cd5443d991950096", "score": "0.523228", "text": "function onMeta() {\n\t\t###### -> Construct should add this module to the onMeta array\n\t\tif (!is_dir(CONS_FMANAGER.CONS_FMANAGER_SAFE)) safe_mkdir(CONS_FMANAGER.CONS_FMANAGER_SAFE);\n\t\tif (!isset($this->parent->dimconfig['default_fm_time']))\n\t\t\t$this->parent->dimconfig['default_fm_time'] = 30; // default expiration date, set 0 to none\n\n\t}", "title": "" }, { "docid": "9d8e01182776bb06f0bf61db0c72e087", "score": "0.5231584", "text": "function setExtra( $extra )\n {\n $this->_extra = \" \" . $extra;\n }", "title": "" }, { "docid": "11e996c95524fcd7a64aa8b24912caf1", "score": "0.52207434", "text": "function genesis_starter_page_header_attr( $atts ) {\n\n // $atts['itemref'] = 'site-banner';\n $atts['role'] = 'banner';\n\n return $atts;\n\n}", "title": "" }, { "docid": "408fef26fd7cbf4fe65b2c51b830cb28", "score": "0.5218066", "text": "private function custom()\n {\n if (file_exists(PATH_HOME . \"public/dash/menu.json\"))\n $this->addMenuJson(PATH_HOME . \"public/dash/menu.json\");\n\n if (file_exists(PATH_HOME . \"public/dash/{$_SESSION['userlogin']['setor']}/menu.json\"))\n $this->addMenuJson(PATH_HOME . \"public/dash/{$_SESSION['userlogin']['setor']}/menu.json\");\n\n foreach (Helper::listFolder(PATH_HOME . VENDOR) as $lib) {\n if (file_exists(PATH_HOME . VENDOR . \"{$lib}/public/dash/menu.json\"))\n $this->addMenuJson(PATH_HOME . VENDOR . \"{$lib}/public/dash/menu.json\");\n if (file_exists(PATH_HOME . VENDOR . \"{$lib}/public/dash/{$_SESSION['userlogin']['setor']}/menu.json\"))\n $this->addMenuJson(PATH_HOME . VENDOR . \"{$lib}/public/dash/{$_SESSION['userlogin']['setor']}/menu.json\");\n }\n }", "title": "" }, { "docid": "e114d41179e8bdd765be61e8c273fc50", "score": "0.5205341", "text": "protected function newParsedownextra()\n {\n return new ParsedownExtra;\n }", "title": "" }, { "docid": "b534c245e7ac272aeeb4bc85a1b2a97f", "score": "0.5193997", "text": "function addExtraAssets(){\n\t\t$base = JURI::base(true);\n\t\t$regurl = '#(http|https)://([a-zA-Z0-9.]|%[0-9A-Za-z]|/|:[0-9]?)*#iu';\n\t\tforeach(array(T3_PATH, T3_TEMPLATE_PATH) as $bpath){\n\t\t\t//full path\n\t\t\t$afile = $bpath . '/etc/assets.xml';\n\t\t\tif(is_file($afile)){\n\t\t\t\t\n\t\t\t\t//load xml\n\t\t\t\t$axml = JFactory::getXML($afile);\n\t\t\t\t//parse stylesheets first if exist\n\t\t\t\tif($axml){\n\t\t\t\t\tforeach($axml as $node => $nodevalue){\n\t\t\t\t\t\t//ignore others node\n\t\t\t\t\t\tif($node == 'stylesheets' || $node == 'scripts'){\n\t\t\t\t\t\t\tforeach ($nodevalue->file as $file) {\n\t\t\t\t\t\t\t\t$compatible = $file['compatible'];\n\t\t\t\t\t\t\t\tif($compatible) {\n\t\t\t\t\t\t\t\t\t$parts = explode(' ', $compatible);\n\t\t\t\t\t\t\t\t\t$operator = '='; //exact equal to\n\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\tif(count($parts) == 2){\n\t\t\t\t\t\t\t\t\t\t$operator = $parts[0];\n\t\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//compare with Joomla version\n\t\t\t\t\t\t\t\t\tif(!version_compare(JVERSION, $operand, $operator)){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$url = (string)$file;\n\t\t\t\t\t\t\t\tif(substr($url, 0, 2) == '//'){ //external link\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else if ($url[0] == '/'){ //absolute link from based folder\n\t\t\t\t\t\t\t\t\t$url = is_file(JPATH_ROOT . $url) ? $base . $url : false; \n\t\t\t\t\t\t\t\t} else if (!preg_match($regurl, $url)) { //not match a full url -> sure internal link\n\t\t\t\t\t\t\t\t\t$url = T3Path::getUrl($url);\t\t// so get it\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif($url){\n\t\t\t\t\t\t\t\t\tif($node == 'stylesheets'){\n\t\t\t\t\t\t\t\t\t\t$this->addStylesheet($url);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->addScript($url);\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}\n\n\t\t\n\t}", "title": "" }, { "docid": "5b53cdbd24ac42a14b55265f4109f4f8", "score": "0.51671124", "text": "public static function settings_to_extras() {\n\n\t\t\t\treturn [\n\t\t\t\t\t'title_margin' => 'title_margin',\n\t\t\t\t\t'title_border_color' => 'title_border_color',\n\t\t\t\t\t'title_style_type' => 'title_style_type',\n\t\t\t\t];\n\t\t\t}", "title": "" }, { "docid": "037964ff591f7a1085cdb1a07c332295", "score": "0.5159726", "text": "function load_doc_extras() {\n\t\t// Todo: make this conditional with a filter or a constant\n\t\trequire_once( BP_DOCS_INCLUDES_PATH . 'addon-taxonomy.php' );\n\t\t$this->taxonomy = new BP_Docs_Taxonomy;\n\n\t\trequire_once( BP_DOCS_INCLUDES_PATH . 'addon-hierarchy.php' );\n\t\t$this->hierarchy = new BP_Docs_Hierarchy;\n\n\t\t// Don't load the History component if post revisions are disabled\n\t\tif ( defined( 'WP_POST_REVISIONS' ) && WP_POST_REVISIONS ) {\n\t\t\trequire_once( BP_DOCS_INCLUDES_PATH . 'addon-history.php' );\n\t\t\t$this->history = new BP_Docs_History;\n\t\t}\n\n\t\t// Load the wikitext addon\n\t\trequire_once( BP_DOCS_INCLUDES_PATH . 'addon-wikitext.php' );\n\t\t$this->wikitext = new BP_Docs_Wikitext;\n\n\t\tdo_action( 'bp_docs_load_doc_extras' );\n\t}", "title": "" }, { "docid": "88d8dd1a231beae5b760eec714cf12b7", "score": "0.5152137", "text": "final protected function __construct()\n {\n /* Class is a utility class */\n }", "title": "" }, { "docid": "9c2fc34bd1ded10922c36972ab4c1579", "score": "0.51375425", "text": "public function getAdditionalInfo();", "title": "" }, { "docid": "562625219c5434b63989e8175211afcd", "score": "0.5111397", "text": "public static function init() {\n\n\t\tif ( function_exists( 'visual_composer' ) ) {\n\t\t\tremove_action( 'wp_head', array( visual_composer(), 'addMetaData' ) );\n\t\t}\n\n\t\tif ( function_exists( 'vc_set_default_editor_post_types' ) ) {\n\t\t\tvc_set_default_editor_post_types( array( 'page', 'portfolio', 'staff' ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "0c7e39bb77453049a7fd6a3d703b61c7", "score": "0.5105986", "text": "function rt_asset_init() {\n\n\trt_asset_include();\n\n\tglobal $rt_wp_ast;\n\t$rt_wp_ast = new RT_WP_Assets();\n}", "title": "" }, { "docid": "69339ae338157bde917846deaa51ca3a", "score": "0.5099273", "text": "protected function _includeThemeAssets(){\n $this->addHeaderItem('<meta name=\"google-translate-customization\" content=\"3567b59082bacffd-3fff6379e3eabe3a-g94318f2bd40049ae-b\"></meta>');\n $this->addHeaderItem( '<meta id=\"clinicaToolsDir\" value=\"'.CLINICA_TOOLS_URL.'\" />' );\n $this->addHeaderItem( $this->getHelper('html')->css('clinica.app.css', self::PACKAGE_HANDLE) );\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.min.js', self::PACKAGE_HANDLE) );\n \n // ie8 stylesheet\n $ie8 = \"<!--[if lt IE 9]>\\n\" . $this->getHelper('html')->css('ie8.css', self::PACKAGE_HANDLE) . \"\\n<![endif]-->\";\n $this->addHeaderItem( $ie8 );\n \n // footer stuff (usually javascript)\n $this->addFooterItem( $this->getHelper('html')->javascript('libs/bootstrap.min.js', self::PACKAGE_HANDLE) );\n $this->addFooterItem( $this->getHelper('html')->javascript('clinica.app.js', self::PACKAGE_HANDLE) );\n }", "title": "" }, { "docid": "fc12023e9cfd9cfda886309e9ad14849", "score": "0.5099193", "text": "protected function onConstruct() {}", "title": "" }, { "docid": "4383223dbd1587cc6da097e763aecd9c", "score": "0.50935435", "text": "protected function extraLinks() {\n }", "title": "" }, { "docid": "67b238f58d85d61f7e698b8cc37d3f28", "score": "0.50832826", "text": "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->utility[] = \"marc\";\r\n\t\t$this->utility[] = \"alt_scripts\"; // @todo remove this when ready to render this to xml properly\r\n\t}", "title": "" }, { "docid": "dc4dedd8b6ffba449b34612421d2937e", "score": "0.50781184", "text": "public function getExtra()\n\t{\n\t\treturn $this->extra;\n\t}", "title": "" }, { "docid": "26040cf98517cf864a8c3a76ebe05bcc", "score": "0.50680524", "text": "public static function init(){\n\t\tself::warning(\"This method should never be called directly - should calling the App version\");\n\t}", "title": "" }, { "docid": "3b3f4774444ef79a698b507d6c5a1c3e", "score": "0.5066918", "text": "public function initialize()\n {\n add_filter('script_loader_tag', [$this, 'add_integrity_attribute'], 10, 2);\n add_filter('style_loader_tag', [$this, 'add_integrity_attribute'], 10, 2);\n }", "title": "" }, { "docid": "a83081969e5a14e516943adbc2b37a7d", "score": "0.50618124", "text": "public function __construct() {\n\t\tthrow new UseOnlyAsStatic( 'The Globals class is to be used statically only.', 1 );\n\t}", "title": "" }, { "docid": "a20062e0d270fce81e3de2f511ece8e0", "score": "0.50594175", "text": "public function get_extra() {\r\n\t\treturn $this->extra;\r\n\t}", "title": "" }, { "docid": "b242ee8e63886790e8c084a60e95c676", "score": "0.5051264", "text": "public function __construct(array $extra = array())\n {\n $this\n ->setExtra($extra);\n }", "title": "" }, { "docid": "cdaae41233e2cb2099059479dd390acd", "score": "0.50468475", "text": "static function __StaticInit() {\n\t\tself::$vc_mapping = apply_filters( 'wpp_shortcode_parameter_vc_mapping', self::$vc_mapping );\n\t}", "title": "" }, { "docid": "87a2294da032859449816db3712a4228", "score": "0.50396276", "text": "public function get_extra() {\n\t\treturn $this->extra;\n\t}", "title": "" }, { "docid": "2f56c0608a5f2146ad55086edb4402d3", "score": "0.50387627", "text": "public function buildExtension() {\n\t}", "title": "" }, { "docid": "262d558ab5ac970737298bf79ee93995", "score": "0.5034092", "text": "function initAssets()\n\t{\n\t}", "title": "" }, { "docid": "5d516facb772e290aa7ee6a6bd809d55", "score": "0.50216746", "text": "public static function static_binding(){\n\t\tEM_Taxonomy_Frontend::$taxonomy_name = self::$taxonomy_name; \n\t\tEM_Taxonomy_Frontend::$this_class = self::$this_class;\n\t\tEM_Taxonomy_Frontend::$tax_class = self::$tax_class;\n\t\tEM_Taxonomy_Frontend::$option_name = self::$option_name;\n\t\tEM_Taxonomy_Frontend::$option_name_plural = self::$option_name_plural;\n\t}", "title": "" }, { "docid": "e02d33ddcf4b95136ac090b82ae544d4", "score": "0.5021292", "text": "public function getExtra() {\n return $this->extra;\n }", "title": "" }, { "docid": "0ee845ae5b444a7e96e5b5bd8c4d67bf", "score": "0.5011798", "text": "function be_site_inner_attr( $attributes ) {\n\t// Add the attributes from .entry, since this replaces the main entry\n\t$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );\n\treturn $attributes;\n}", "title": "" }, { "docid": "4431537000d4e2d81049327c68452342", "score": "0.50065523", "text": "private function constants() {\n\n\t\t}", "title": "" }, { "docid": "174b5f70eb0875c2ada7ed44220db29c", "score": "0.50034857", "text": "function triggerCopyModuleExtraKeys(&$obj)\n\t{\n\t\t$oDocumentModel = getModel('document');\n\t\t$documentExtraKeys = $oDocumentModel->getExtraKeys($obj->originModuleSrl);\n\n\t\tif(is_array($documentExtraKeys) && is_array($obj->moduleSrlList))\n\t\t{\n\t\t\t$oDocumentController=getController('document');\n\t\t\tforeach($obj->moduleSrlList AS $key=>$value)\n\t\t\t{\n\t\t\t\tforeach($documentExtraKeys AS $extraItem)\n\t\t\t\t{\n\t\t\t\t\t$oDocumentController->insertDocumentExtraKey($value, $extraItem->idx, $extraItem->name, $extraItem->type, $extraItem->is_required , $extraItem->search , $extraItem->default , $extraItem->desc, $extraItem->eid) ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1e5e516ec4b2c72a9c0ed1ce745d244a", "score": "0.49965996", "text": "public function getStaticProperties(){}", "title": "" }, { "docid": "36eeb9149b220d9492d12c5234372507", "score": "0.4995708", "text": "public function getExtend(){}", "title": "" }, { "docid": "36eeb9149b220d9492d12c5234372507", "score": "0.4995708", "text": "public function getExtend(){}", "title": "" }, { "docid": "2d485f5918430079f7a45c29c274ca30", "score": "0.49931452", "text": "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"plugin\";\n\n\t\t// plugins must be public.\n\t\t$this->access_id = ACCESS_PUBLIC;\n\t}", "title": "" }, { "docid": "0c007dff1aa9aa7b616092ac42e6c3b0", "score": "0.49914858", "text": "function search_get_additional_modules() {\n $extras = array(/* additional keywords go here */);\n $ret = array();\n foreach($extras as $extra) {\n $temp->name = $extra;\n $ret[] = clone($temp);\n } \n return $ret;\n}", "title": "" }, { "docid": "0e1f3042f57b6707b1c76b709f5609ae", "score": "0.4989079", "text": "public function getStaticVariables(){}", "title": "" }, { "docid": "1cc3a502c24d9cff2f1827696171e993", "score": "0.49864486", "text": "public function additional_styles() {}", "title": "" }, { "docid": "f31c9c767b5821a885264ab9e6429fbd", "score": "0.49835053", "text": "function onExtra($name)\n\t{\n\t\t$output = NULL;\n\t\tif($name == \"header\")\n\t\t{\n\t\t\t$jqCDN = $this->yellow->config->get(\"jqueryCdn\");\n\t\t\t$bsJS = $this->yellow->config->get(\"bootstrapCdnJS\");\n\t\t\t$bsCSS = $this->yellow->config->get(\"bootstrapCdnCSS\");\n\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$jqCDN}jquery.min.js\\\"></script>\\n\";\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$bsJS}bootstrap.min.js\\\"></script>\\n\";\n\t\t\t$output .= \"<link rel=\\\"stylesheet\\\" href=\\\"{$bsCSS}bootstrap.min.css\\\">\\n\";\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "04d00b470cd291dad8f316eadb77361e", "score": "0.49763203", "text": "function kreativ_attributes_site_inner( $attributes ) {\r\n\t$attributes['role'] = 'main';\r\n\t$attributes['itemprop'] = 'mainContentOfPage';\r\n\treturn $attributes;\r\n}", "title": "" }, { "docid": "906f9bde516a54f194a0fba01e6de443", "score": "0.4975841", "text": "public function __construct()\n {\n DeveloppementTools::shareVar(['Module' => $this, 'Extra' => (new ExtraController()), 'TrixBot' => (new TrixCoreController())]);\n }", "title": "" }, { "docid": "525e48efb1ecd87329283f621c903d57", "score": "0.49727905", "text": "public function addExtra(\n \\tabs\\api\\utility\\ResourceExtra $extra\n ) {\n $this->extras[$extra->getCode() . '_' . $extra->getBrand()] = $extra;\n }", "title": "" }, { "docid": "db225f739ea256a268f11a45db192c5f", "score": "0.49661854", "text": "function gc_add_site_description_class( $attributes ) {\n\t\tif ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) {\n\t\t\t$attributes['class'] .= ' screen-reader-text';\n\t\t\treturn $attributes;\n\t\t}\n\t\telse {\n\t\t\treturn $attributes;\n\t\t}\n\t }", "title": "" }, { "docid": "41ad9768014ea6cfbd0ff4b4e78d36d2", "score": "0.4963142", "text": "private function __construct() {\n\t\tadd_action( 'wp_head', array( $this, 'render_manifest_link' ) );\n\t\tadd_action( 'amp_post_template_head', array( $this, 'render_manifest_link' ) );\n\t\tadd_action( 'template_redirect', array( $this, 'render_manifest_json' ), 2 );\n\t}", "title": "" }, { "docid": "41d2699582ce5843ee091b95e386c7cf", "score": "0.49624658", "text": "public function setExtra($value);", "title": "" }, { "docid": "c8735f73803e97d425dac7906bb53b10", "score": "0.49591553", "text": "public function init_custom() {\n \n require_once 'custom-functions.php';\n \n }", "title": "" }, { "docid": "cd9ee9edeef5725ce75de3f8d7446a9f", "score": "0.49517956", "text": "public function extend(): void\n {\n\n }", "title": "" }, { "docid": "f534dda7147b123da1c3d4ab62be39d4", "score": "0.49516997", "text": "protected function after_setup() {}", "title": "" }, { "docid": "04e32ccd635521533ee160de9f0574ca", "score": "0.4945504", "text": "public static function createFromGlobals();", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49393335", "text": "protected function init() {}", "title": "" }, { "docid": "22d8c95f8d04fc6d63d0ff2cd76fb51b", "score": "0.49374878", "text": "protected function before_setup() {}", "title": "" }, { "docid": "38dfa3a714e8d25127687d677e3ef7c2", "score": "0.493085", "text": "function add_defer_attribute($tag, $handle) {\n if( is_admin() ){return $tag;} //если в админке\n // добавьте дескрипторы (названия) скриптов в массив ниже\n if ($GLOBALS['first_time_defer']) {\n global $wp_scripts;\n $check_deps = array('jquery');\n foreach( $wp_scripts->registered as $script ) {\n foreach ($script->deps as $dep) {\n if (!in_array($dep,$check_deps)) {\n $check_deps[] = $dep;\n $check_deps[] = $script->handle;\n break;\n }\n $GLOBALS['scripts_to_defer'][] = $script->handle;\n }\n }\n $GLOBALS['first_time_defer'] = false;\n $GLOBALS['scripts_to_defer'] = array_unique($GLOBALS['scripts_to_defer']);\n }\n\n //$tag = str_replace('src=\"https://smartcloudconnect.io/','src=\"/',$tag);\n\n if( $handle == 'jquery-core' ) { //|| $handle == 'jquery-migrate'\n return $tag;\n }\n\n if ( in_array($handle,$GLOBALS['scripts_to_defer']) ){\n// return str_replace(' src', 'id=\"'.$handle.'-js\" defer src', $tag);\n// return str_replace(' src', 'defer=\"defer\" src', $tag);\n return str_replace(' src', 'defer=\"defer\" src', $tag);\n } else {\n return str_replace(' src', 'defer=\"defer\" src', $tag);\n// return str_replace(' src', 'id=\"'.$handle.'-js\" async src', $tag);\n return str_replace(' src', 'async=\"async\" src', $tag);\n }\n}", "title": "" }, { "docid": "297a25dfaa9f175d8c6d0eda64e56544", "score": "0.4926136", "text": "function addGravatarCopyright()\n{\n global $context;\n\n if ($context['current_action'] == 'credits') {\n $context['copyrights']['mods'][] = '<a href=\"https://mysmf.net/mods/gravatar-4-smf\" target=\"_blank\">Gravatar 4 SMF</a> &copy; 2010-2022, digger';\n }\n}", "title": "" }, { "docid": "a8f63dd4a56132d34aabfdc3ad4c9aec", "score": "0.4923804", "text": "public static function globally(){}", "title": "" }, { "docid": "8b86e3cc823ce642233b34e78348b262", "score": "0.49216485", "text": "protected function _setup() {}", "title": "" }, { "docid": "bc53c9974dac52ed839d75240ff20ae2", "score": "0.49191505", "text": "public function getExtraData(): array;", "title": "" }, { "docid": "557e1ebd386dfc87523dc64cdace1434", "score": "0.49175417", "text": "protected function _initProd() {\n //TODO fill\n }", "title": "" }, { "docid": "809fcc37254b264d67348839e8b45234", "score": "0.49137712", "text": "public static function settings_to_extras() {\n\n\t\t\t\treturn [\n\t\t\t\t\t'content_break_point' => 'content_break_point',\n\t\t\t\t];\n\t\t\t}", "title": "" }, { "docid": "1e68ad29c88d45ac4f866b0fcbc9d7b2", "score": "0.4897793", "text": "function __construct($file_path) {\r\n parent::__construct($file_path);\r\n # create and store additional data required for this asset\r\n $this->set_extended_data($file_path);\r\n }", "title": "" }, { "docid": "c28e95d18a0d6fcdac6ab1eb11590b98", "score": "0.48953506", "text": "function __construct()\n {\n parent::__construct();\n \n # I18n (Loads text-domain) or the translations\n add_action('init', \n array(&$this, 'load_text_domain') );\n\n # Instantiate again the attribute, to not be null.\n # I just copy and paste for the original\n $this->lib = new View_Own_Post_Media_Only_Library('view_own_post_media_only');\n }", "title": "" }, { "docid": "a31c61e663f739a7fd60308de80bc50f", "score": "0.48939565", "text": "protected function _init()\n {\n // init function to overwrite at modules\n }", "title": "" }, { "docid": "245329599bfd29af9916a275d5c6343c", "score": "0.48922038", "text": "public function onTwigSiteVariables()\n {\n // Register built-in CSS assets\n if ($this->config->get('plugins.musiccard.built_in_css')) {\n $this->grav['assets']\n ->add('plugin://musiccard/assets/css/music-card.css');\n }\n \n // Register built-in JS assets\n if ($this->config->get('plugins.musiccard.built_in_js')) {\n $this->grav['assets']\n ->add('plugin://musiccard/assets/js/color-thief.js');\n $this->grav['assets']\n ->add('plugin://musiccard/assets/js/music-card.js');\n }\n // Register built-in font assets\n $this->grav['assets']\n ->add('plugin://musiccard/assets/fonts/css/logos.css');\n \n // Register assets from MusicCard Services\n $assets = $this->musiccard->getAssets();\n foreach ($assets as $asset) {\n $this->grav['assets']->add($asset);\n }\n }", "title": "" }, { "docid": "23f85957e04ff9cf46799a7ad045eeec", "score": "0.48892194", "text": "abstract protected static function create();", "title": "" }, { "docid": "fcfcafbdea50e125ec97172fe2fa5d1d", "score": "0.4888451", "text": "public static function import()\n {\n $extension = static::getInstance();\n\n if ($menu = $extension->menu()) {\n if ($extension->validateMenu($menu)) {\n extract($menu);\n static::createMenu($title, $path, $icon);\n }\n }\n\n if ($permission = $extension->permission()) {\n if ($extension->validatePermission($permission)) {\n extract($permission);\n static::createPermission($name, $slug, $path);\n }\n }\n }", "title": "" }, { "docid": "fdbdcb79d28b352df05e0a6f52f33e4e", "score": "0.48866087", "text": "function my_inventory_assets() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0c9148a2d4a80aec9abc57423331a912", "score": "0.48821104", "text": "function yolo_init(&$App) {\n\n App::$theme_info['extends'] = 'redbasic';\n\n\n}", "title": "" }, { "docid": "4aa4fb1ec022ba843f53f90b5266cd96", "score": "0.48799774", "text": "final function __construct(){ }", "title": "" }, { "docid": "7182bfe7fa05fc7d5dbd82da9a6051f5", "score": "0.48750314", "text": "function __construct($file_path) {\n $this->set_extended_data($file_path);\n # create and store data required for this asset\n parent::__construct($file_path);\n }", "title": "" }, { "docid": "b6e596b12bff9285357d6d6c2d9c5f62", "score": "0.48733363", "text": "public function add_attributes() {\n\n\t\t// Add rel=\"nofollow\" & target=\"_blank\" for external links.\n\t\t$this->add_noopener = $this->do_filter( 'noopener', true );\n\t\t$this->nofollow_link = Helper::get_settings( 'general.nofollow_external_links' );\n\t\t$this->nofollow_image = Helper::get_settings( 'general.nofollow_image_links' );\n\t\t$this->new_window_link = Helper::get_settings( 'general.new_window_external_links' );\n\t\t$this->remove_class = $this->do_filter( 'link/remove_class', false );\n\t\t$this->is_dirty = false;\n\n\t\tif ( $this->nofollow_link || $this->new_window_link || $this->nofollow_image || $this->add_noopener || $this->remove_class ) {\n\t\t\t$this->filter( 'the_content', 'add_link_attributes', 11 );\n\t\t}\n\t}", "title": "" }, { "docid": "8537142f8173576c1a1ce2c849a66aa0", "score": "0.48715797", "text": "public function extend(){\n\t\t$this->add_class_prefixes(\n\t\t\tapply_filters( 'siteorigin_widgets_field_class_prefixes', array() ),\n\t\t\t'base'\n\t\t);\n\n\t\t$this->add_class_paths(\n\t\t\tapply_filters( 'siteorigin_widgets_field_class_paths', array() ),\n\t\t\t'base'\n\t\t);\n\t}", "title": "" }, { "docid": "958d63b90761d215b26f6cee48cb2e8d", "score": "0.48715484", "text": "public function __construct() {\n\t\tadd_action( Loader::INLINE_HEAD_ACTION, [ $this, 'generate' ] );\n\t\tadd_action( 'amp_post_template_head', [ $this, 'generate' ] );\n\t}", "title": "" }, { "docid": "84f63f30e51469d289a5b1f25bec4376", "score": "0.48706278", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t\n\t\t$this->initilize_entry();\n\t}", "title": "" }, { "docid": "79ae43aad11fe3c46581efd10da9d82b", "score": "0.48701295", "text": "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n JQueryUI::registerYiiJQueryUICss();\n JQueryUI::registerYiiJQueryUIScript();\n $this->addAssetInfo( \"titleBox.css\", dirname(__FILE__) . \"/assets/common\" );\n $this->addAssetInfo( \"titleBox.js\", dirname(__FILE__) . \"/assets/common\" );\n $this->addYiiGemsCommonCss();\n $this->addGradientAssets(array(\n $this->headerGradient, $this->contentGradient\n ));\n }", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.48699093", "text": "final private function __construct(){}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.48699093", "text": "final private function __construct(){}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.48699093", "text": "final private function __construct(){}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.48699093", "text": "final private function __construct(){}", "title": "" } ]
1a14515f54119c95518e521642a69710
end common month day year combo
[ { "docid": "9cedca0455e37a71f8369ec0f24a84c7", "score": "0.0", "text": "public function get_genmonth_combo($selmonth = 0, $smallop = 0){\r\n for ($k = 1; $k <= 12; $k++){\r\n if ($k < 10){ $kk = \"0\".$k; }else{ $kk = $k; }\r\n if ($smallop == 1){\r\n $ds = $this->lmonthid[$k];\r\n }else{\r\n $ds = $this->lmonth[$k];\r\n }\r\n\r\n ?>\r\n <option value=\"<?php echo $kk; ?>\" <?php if ($selmonth == $k){ echo ' selected=\"selected\"'; } ?>><?php echo $ds; ?></option>\r\n <?php \r\n }\r\n }", "title": "" } ]
[ { "docid": "c7c39800084d8f4ba20efe5f6ea44789", "score": "0.6705234", "text": "public function endYear()\n {\n $day = $this->format('L') ? 30 : 29;\n\n return $this->setDateTime($this->year, 12, $day, 23, 59, 59);\n }", "title": "" }, { "docid": "127d02a4f6e8afcff61634f12c372a05", "score": "0.64676654", "text": "public function toYearEnd() {\n\t\t$m = $this->toDayStart()->toMonthStart()->month();\n\t\treturn $this->addMonth(13 - $m)->subSec();\n\t}", "title": "" }, { "docid": "287852e179f622c09d20e6ccdb6bcd26", "score": "0.6234068", "text": "public function getYearEnd()\n {\n $ical = new Ical(\"http://www.education.gouv.fr/download.php?file=http://cache.media.education.gouv.fr/ics/Calendrier_Scolaire_Zone_B.ics\");\n $array = $ical->events();\n return $date = $array[6]['DTSTART'];\n }", "title": "" }, { "docid": "784427e657ab1de50eacadaf717b3640", "score": "0.6214476", "text": "public abstract function get_max_year();", "title": "" }, { "docid": "36cf141767beeeff08b37bf64c48fc77", "score": "0.620408", "text": "function GetYearAfterOptions($end)\n{\n\t$year = date(\"Y\");\n\t\t\n\t$array = array();\n\t\t\n\tfor($i = $year; $i <= ($year + $end); $i++)\n\t{\n\t\t$array[] = $i;\n\t}\n\t\t\n\treturn $array;\n}", "title": "" }, { "docid": "2e5ec0019d689007a587ee91cdefa7d2", "score": "0.61617696", "text": "function get_day_end($day = null, $month = null, $year = null)\n\t{\n\t $newdate = clone $this;\n\t $newdate->setDate(\n\t $year?$year:$this->year,\n\t $month?$month:$this->month,\n\t $day?$day:$this->day);\n\t $newdate->setTime(23, 59, 59);\n\t return $newdate;\n\t}", "title": "" }, { "docid": "d62fb15a4abb134d10160334106d5f8c", "score": "0.61264485", "text": "function getFullEndDate() {\n\t\t$date = \"--\";\n\t\tif(!isEmptyString($this->geEndYear())){\n\t\t\t$date = $this->getEndYear();\n\t\t}\n\t\tif(!isEmptyString($this->getEndMonth()) && !isEmptyString($this->getEndYear())){\n\t\t\t$months = getAllMonthsAsShortNames();\n\t\t\t$date = $months[$this->getEndMonth()].\", \".$this->getEndYear();\n\t\t}\n\t\treturn $date;\n\t}", "title": "" }, { "docid": "acfbb79812ef14365ffda25bd9e2c84a", "score": "0.60235", "text": "function daysinamonth()\n {\n switch($this->c_Month)\n {\n case 1: return 31;\n case 2: if($this->isleapyear){ return 28; } else { return 29; }\n case 3: return 31;\n case 4: return 30;\n case 5: return 31;\n case 6: return 30;\n case 7: return 30;\n case 8: return 31;\n case 9: return 30;\n case 10: return 31;\n case 11: return 30;\n case 12: return 31;\n }\n }", "title": "" }, { "docid": "9eccf7fc1b2609ee840cd3c8010608a5", "score": "0.6020675", "text": "private function endDay($month, $day, $year)\n\t{\n\t\treturn mktime(23, 59, 59, $month, $day, $year);\n\t}", "title": "" }, { "docid": "14063c7645a6361736dc263e7b30d8d2", "score": "0.60093707", "text": "function GetYearOptions($start,$end)\n{\n\t$year = date(\"Y\");\n\t$array = array();\n\t\t\n\tfor($i = $year - $start; $i <= ($year - $end); $i++)\n\t{\n\t\t$array[] = $i;\n\t}\n\t\t\n\treturn $array;\n}", "title": "" }, { "docid": "809ec846fa4353183a76bafc7863834f", "score": "0.5933121", "text": "function rebuild($year, $month)\r\n\t{\r\n\t\t$rr = $this->rrule;\r\n\t\tif ($year != $this->lastyear)\r\n\t\t{\r\n\t\t\t$this->yearlen = 365+DateAndTime::IsLeapYear($year);\r\n\t\t\t$this->nextyearlen = 365+DateAndTime::IsLeapYear($year+1);\r\n\t\t\t$firstyday = new DateAndTime($year, 1, 1);\r\n\t\t\t$this->yearordinal = $firstyday->ToOrdinalDay();\r\n\t\t\t$this->yearweekday = ($firstyday->DayOfWeek() + 6) % 7;\t// convert to 0 as Monday\r\n\t\t\t\r\n\t\t\t$wday = new DateAndTime($year, 1, 1);\r\n\t\t\t$wday = ($wday->DayOfWeek() + 6) % 7;\t// convert to 0 as Monday\r\n\t\t\t\r\n\t\t\tif ($this->yearlen == 365)\r\n\t\t\t{\r\n\t\t\t\t$this->mmask = &RecurrenceRuleIteratorInfo::$M365MASK;\r\n\t\t\t\t$this->mdaymask = &RecurrenceRuleIteratorInfo::$MDAY365MASK;\r\n\t\t\t\t$this->nmdaymask = &RecurrenceRuleIteratorInfo::$NMDAY365MASK;\r\n\t\t\t\t$this->mrange = &RecurrenceRuleIteratorInfo::$M365RANGE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->mmask = &RecurrenceRuleIteratorInfo::$M366MASK;\r\n\t\t\t\t$this->mdaymask = &RecurrenceRuleIteratorInfo::$MDAY366MASK;\r\n\t\t\t\t$this->nmdaymask = &RecurrenceRuleIteratorInfo::$NMDAY366MASK;\r\n\t\t\t\t$this->mrange = &RecurrenceRuleIteratorInfo::$M366RANGE;\r\n\t\t\t}\r\n\t\t\t$this->wdaymask = RecurrenceRuleIteratorInfo::$WDAYMASK;\t// make a copy\r\n\t\t\tarray_splice($this->wdaymask, 0, $wday);\r\n\t\t\t\r\n\t\t\tif (!$rr->ByWeekNo())\r\n\t\t\t{\r\n\t\t\t\t$this->wnomask = NULL;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->wnomask = array();\r\n\t\t\t\tfor ($i = 0; $i < $this->yearlen+7; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($this->wnomask, 0);\r\n\t\t\t\t}\r\n\t\t\t\t#no1wkst = firstwkst = $this->{wdaymask.index($rr->{wkst)\r\n\t\t\t\t$no1wkst = (7 - $this->yearweekday + $rr->Wkst()) % 7;\r\n\t\t\t\t$firstwkst = $no1wkst;\r\n\t\t\t\t$wyearlen;\r\n\t\t\t\tif ($no1wkst >= 4)\r\n\t\t\t\t{\r\n\t\t\t\t\t$no1wkst = 0;\r\n\t\t\t\t\t// Number of days in the year, plus the days we got\r\n\t\t\t\t\t// from last year.\r\n\t\t\t\t\t$wyearlen = $this->yearlen + ($this->yearweekday - $rr->Wkst()) % 7;\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// Number of days in the year, minus the days we\r\n\t\t\t\t\t// left in last year.\r\n\t\t\t\t\t$wyearlen = $this->yearlen - $no1wkst;\r\n\t\t\t\t}\r\n\t\t\t\tlist($div, $mod) = array(Utilities::Div($wyearlen, 7), $wyearlen % 7);\r\n\t\t\t\t$numweeks = $div+Utilities::Div($mod, 4);\r\n\t\t\t\tforeach ($rr->ByWeekNo() as $n)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($n < 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$n += $numweeks+1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($n > 0 && $n <= $numweeks)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$i;\r\n\t\t\t\t\t\tif ($n > 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$i = $no1wkst+($n-1)*7;\r\n\t\t\t\t\t\t\tif ($no1wkst != $firstwkst)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$i -= 7-$firstwkst;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$i = $no1wkst;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor ($j = 0; $j < 7; $j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->wnomask[$i] = 1;\r\n\t\t\t\t\t\t\t$i += 1;\r\n\t\t\t\t\t\t\tif ($this->wdaymask[$i] == $rr->Wkst())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (Utilities::ArrayContains($rr->ByWeekNo(), 1))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check week number 1 of next year as well\r\n\t\t\t\t\t// TODO: Check -numweeks for next year.\r\n\t\t\t\t\t$i = $no1wkst+$numweeks*7;\r\n\t\t\t\t\tif ($no1wkst != $firstwkst)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$i -= 7-$firstwkst;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($i < $this->yearlen)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// If week starts in next year, we\r\n\t\t\t\t\t\t// don't care about it.\r\n\t\t\t\t\t\tfor ($j = 0; $j < 7; $j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->wnomask[$i] = 1;\r\n\t\t\t\t\t\t\t$i += 1;\r\n\t\t\t\t\t\t\tif ($this->wdaymask[$i] == $rr->Wkst())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif ($no1wkst)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check last week number of last year as\r\n\t\t\t\t\t// well. If no1wkst is 0, either the year\r\n\t\t\t\t\t// started on week start, or week number 1\r\n\t\t\t\t\t// got days from last year, so there are no\r\n\t\t\t\t\t// days from last year's last week number in\r\n\t\t\t\t\t// this year.\r\n\t\t\t\t\t$lnumweeks;\r\n\t\t\t\t\tif (!Utilities::ArrayContains($rr->ByWeekNo(), -1))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$lyearweekday = new DateAndTime($year-1, 1, 1);\r\n\t\t\t\t\t\t$lyearweekday = ($lyearweekday->DayOfWeek() + 6) % 7;\t// convert to 0 as Monday\r\n\t\t\t\t\t\t$lno1wkst = (7-$lyearweekday+$rr->Wkst()) % 7;\r\n\t\t\t\t\t\t$lyearlen = 365 + DateAndTime::IsLeapYear($year-1);\r\n\t\t\t\t\t\tif ($lno1wkst >= 4)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$lno1wkst = 0;\r\n\t\t\t\t\t\t\t$lnumweeks = Utilities::Div(52+($lyearlen+($lyearweekday-$rr->Wkst())%7)%7,4);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$lnumweeks = Utilities::Div(52+($this->yearlen-$no1wkst)%7,4);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$lnumweeks = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (Utilities::ArrayContains($rr->ByWeekNo(), $lnumweeks))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor ($i = 0; $i < $no1wkst; $i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->wnomask[$i] = 1;\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\t\r\n\t\tif ($rr->ByNWeekday() && ($month != $this->lastmonth || $year != $this->lastyear))\r\n\t\t{\r\n\t\t\t$ranges = array();\r\n\t\t\tif ($rr->Frequency() == RecurrenceRuleConstants::$YEARLY)\r\n\t\t\t{\r\n\t\t\t\tif ($rr->ByMonth())\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($rr->ByMonth() as $month)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tarray_push($ranges, array($this->mrange[$month-1], $this->mrange[$month]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$ranges = array(array(0, $this->yearlen));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($rr->Frequency() == RecurrenceRuleConstants::$MONTHLY)\r\n\t\t\t{\r\n\t\t\t\t$ranges = array(array($this->mrange[$month-1], $this->mrange[$month]));\r\n\t\t\t}\r\n\t\t\tif (count($ranges))\r\n\t\t\t{\r\n\t\t\t\t// Weekly frequency won't get here, so we may not\r\n\t\t\t\t// care about cross-year weekly periods.\r\n\t\t\t\t$this->nwdaymask = array();\r\n\t\t\t\tfor ($i = 0; $i < $this->yearlen; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($this->nwdaymask, 0);\r\n\t\t\t\t}\r\n\t\t\t\tforeach ($ranges as $range)\r\n\t\t\t\t{\r\n\t\t\t\t\tlist($first, $last) = $range;\r\n\t\t\t\t\t$last -= 1;\r\n\t\t\t\t\tforeach ($rr->ByNWeekday() as $wd)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlist($wday, $n) = $wd;\r\n\t\t\t\t\t\t$i;\r\n\t\t\t\t\t\tif ($n < 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$i = $last+($n+1)*7;\r\n\t\t\t\t\t\t\t$i -= ($this->wdaymask[$i]-$wday)%7;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$i = $first+($n-1)*7;\r\n\t\t\t\t\t\t\t$i += (7-$this->wdaymask[$i]+$wday)%7;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($i >= $first && $i <= $last)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->nwdaymask[$i] = 1;\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\t\r\n\t\tif ($rr->ByEaster())\r\n\t\t{\r\n\t\t\t$this->eastermask = array();\r\n\t\t\tfor ($i = 0; $i < $this->yearlen+7; $i++)\r\n\t\t\t{\r\n\t\t\t\tarray_push($this->eastermask, 0);\r\n\t\t\t}\r\n\t\t\t$eyday = DateAndTime::GetEaster($year).ToOrdinalDay() - $this->yearordinal;\r\n\t\t\tforeach ($rr->ByEaster() as $offset)\r\n\t\t\t{\r\n\t\t\t\t$this->eastermask[$eyday+$offset] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->lastyear = $year;\r\n\t\t$this->lastmonth = $month;\r\n\t}", "title": "" }, { "docid": "597339f934c57c822224b4b89041911d", "score": "0.5918984", "text": "private function _qry_all_date_of_year($year,$filter=-1)\n {\n\n //So ngay cua nam: 365 ? 366\n $v_count_days_of_year = jwDate::dateDiff(1,1,$year,31,12,$year);\n $v_begin_date_string = $year. '-01-01';\n\n if (DATABASE_TYPE == 'MSSQL')\n {\n $sql = 'Select\n b.C_DATE_YYMMDD\n ,b.C_DATE_DDMMYY\n From (\n Select\n a.C_DATE C_DATE_YYMMDD\n , Convert(varchar(20),a.C_DATE,103) as C_DATE_DDMMYY\n , DAYOFWEEK(a.C_DATE) C_WEEK_DAY\n From (';\n $sql .= \"Select '$v_begin_date_string' AS C_DATE\";\n for ($i=1; $i<=$v_count_days_of_year; $i++)\n {\n $sql .= \" Union Select DateAdd(day,$i, '$v_begin_date_string') AS C_DATE\";\n }\n }\n elseif (DATABASE_TYPE == 'MYSQL')\n {\n $sql = \"Select\n b.C_DATE_YYMMDD\n ,b.C_DATE_DDMMYY\n From (\n Select\n a.C_DATE C_DATE_YYMMDD\n , DATE_FORMAT(a.C_DATE,'%d-%m-%Y') AS C_DATE_DDMMYY\n , DAYOFWEEK(a.C_DATE) C_WEEK_DAY\n From (\";\n $sql .= \"Select '$v_begin_date_string' AS C_DATE\";\n for ($i=1; $i<=$v_count_days_of_year; $i++)\n {\n $sql .= \"\\n Union Select AddDate('$v_begin_date_string', INTERVAL $i DAY) AS C_DATE\";\n }\n }\n\n $sql .= ') a ) b ';\n\n $arr_default_date_off_ddmm = explode(',', _CONST_DEFAULT_DATE_OFF);\n $arr_all_dateoff_yyyymmdd = array();\n foreach ($arr_default_date_off_ddmm as $day_and_month)\n {\n $v_full_date_off_ddmmyyyy = str_replace('/', '-',trim($day_and_month)) . '-' .$year;\n $arr_all_dateoff_yyyymmdd[] = jwDate::ddmmyyyy_to_yyyymmdd($v_full_date_off_ddmmyyyy);\n }\n\n if ($filter == 0) //Chi lay ngay nghi\n {\n $sql .= ' Where b.C_WEEK_DAY In ( '. replace_bad_char(_CONST_DEFAULT_DW_OFF) . ')';\n foreach ($arr_all_dateoff_yyyymmdd as $date_off)\n {\n $sql .= \" Or Datediff(b.C_DATE_YYMMDD, '$date_off')= 0\";\n }\n }\n elseif ($filter == 1) //Chi lay ngay lam viec\n {\n $sql .= ' Where b.C_WEEK_DAY Not In ( '. replace_bad_char(_CONST_DEFAULT_DW_OFF) . ')';\n foreach ($arr_all_dateoff_yyyymmdd as $date_off)\n {\n $sql .= \" And Datediff(b.C_DATE_YYMMDD, '$date_off') != 0\";\n }\n }\n\n //return $this->db->CacheGetAssoc($v_count_days_of_year * 86400, $sql);\n return $this->db->GetAssoc($sql);\n }", "title": "" }, { "docid": "7c4b6b84307873be3023249384f6c694", "score": "0.5915589", "text": "private function buildDayMonthYear($day, $month, $year, $min_max, $expression)\n\t{\n\t\tif (!(int)$day && !(int)$month && !(int)$year) {\n\t\t\t$date = Func::isNull();\n\t\t}\n\t\telse {\n\t\t\t$day_has_joker = $this->hasJoker($day);\n\t\t\t$month_has_joker = $this->hasJoker($month);\n\t\t\t$year_has_joker = $this->hasJoker($year);\n\t\t\tif (!$day_has_joker && !$month_has_joker && !$year_has_joker) {\n\t\t\t\t// none has wildcard\n\t\t\t\t$date_begin = date('Y-m-d H:i:s', mktime(0, 0, 0, $month, $day, $year));\n\t\t\t\t$date_end = date('Y-m-d H:i:s', mktime(0, 0, -1, $month, $day + 1, $year));\n\t\t\t\t$date = $this->buildDateOrPeriod($date_begin, $date_end, $min_max);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// at least one has wildcard\n\t\t\t\tif ($min_max != self::NOT_A_RANGE_VALUE) {\n\t\t\t\t\t//we can not have wildcard on a range value\n\t\t\t\t\tthrow new Data_List_Exception(\n\t\t\t\t\t\t$expression, Loc::tr('You can not have a wildcard on a range value')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t// 000: all have wildcards\n\t\t\t\t\t($day_has_joker && $month_has_joker && $year_has_joker)\n\t\t\t\t\t// 001: day has wildcard, month has wildcard, year may be computed\n\t\t\t\t\t|| ($day_has_joker && $month_has_joker && !$year_has_joker)\n\t\t\t\t) {\n\t\t\t\t\t// no need to correct anything!\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t// 010: day has wildcard, month may be computed, year has wildcard\n\t\t\t\t\t($day_has_joker && !$month_has_joker && $year_has_joker)\n\t\t\t\t) {\n\t\t\t\t\tif ($month < 1 || $month > 12) {\n\t\t\t\t\t\tthrow new Data_List_Exception(\n\t\t\t\t\t\t\t$expression, Loc::tr('You can not put a formula on month when year has wildcard')\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t// 011: day has wildcard, month may be computed, year may be computed\n\t\t\t\t\t($day_has_joker && !$month_has_joker && !$year_has_joker)\n\t\t\t\t) {\n\t\t\t\t\t// try to correct month and year\n\t\t\t\t\t$time = mktime(0, 0, 0, $month, 1, $year);\n\t\t\t\t\t$year = date('Y', $time);\n\t\t\t\t\t$month = date('m', $time);\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t// 100: day may be computed, month has wildcard, year has wildcard\n\t\t\t\t\t(!$day_has_joker && $month_has_joker && $year_has_joker)\n\t\t\t\t\t// 101: day may be computed, month has wildcard, year may be computed\n\t\t\t\t\t|| (!$day_has_joker && $month_has_joker && !$year_has_joker)\n\t\t\t\t) {\n\t\t\t\t\t//So we should take care if day is <1 or >31 //TODO:what about 30? 29? 28?\n\t\t\t\t\tif ($day < 1 || $day > 31) {\n\t\t\t\t\t\tthrow new Data_List_Exception(\n\t\t\t\t\t\t\t$expression, Loc::tr('You can not put a formula on day when month has wildcard')\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlist($day, $month, $year) = $this->padDateParts($day, $month, $year);\n\t\t\t\t$date = Func::like(\"$year-$month-$day __:__:__\");\n\t\t\t}\n\t\t}\n\t\treturn $date;\n\t}", "title": "" }, { "docid": "fde62fcacf5afb958b7628be9bc51240", "score": "0.5902768", "text": "public function endOfYear()\n {\n return $this->setDate($this->year, 12, 31)->endOfDay();\n }", "title": "" }, { "docid": "95ec6b30ed7daef7998794c6cfbb18cc", "score": "0.5867119", "text": "public function finish_year ($year)\n {\n }", "title": "" }, { "docid": "1e5f4c5ee30e1352484bb292f8d406e0", "score": "0.5862477", "text": "function isSameYear(){\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $ret_bool = false;\r\n \r\n if($start_map['year'] == $stop_map['year']){\r\n \r\n $ret_bool = true;\r\n \r\n }else{\r\n \r\n if(($stop_map['mon'] == 1) && ($stop_map['mday'] == 1) && $this->isMidnight($stop_map)){\r\n \r\n $ret_bool = ($start_map['year'] + 1) == $stop_map['year'];\r\n \r\n }//if\r\n \r\n }//if/else\r\n \r\n \r\n return $ret_bool;\r\n }", "title": "" }, { "docid": "92b428a7e4db73087ae6ebdfc6226075", "score": "0.58425444", "text": "function dayOfYear($date)\r\n{\r\n $dateArray = dateParser($date);\r\n $month = 0;\r\n $day = 1;\r\n $year = 2;\r\n $daysInMonth = 0;\r\n $dayOfYear = 0;\r\n $index = 1;\r\n \r\n while($index < $dateArray[$month])\r\n{\r\n \r\n $switchVariable = $dateArray[$month];\r\n\r\n switch($switchVariable)\r\n {\r\n case 1:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 2:\r\n if($dateArray[$year] % 4 == 0 && ($dateArray[$year] % 100 != 0))\r\n {\r\n $daysInMonth = 29;\r\n }\r\n elseif(($dateArray[$year] % 4 == 0) && ($dateArray[$year] % 400 == 0))\r\n {\r\n $daysInMonth = 29;\r\n }\r\n else\r\n {\r\n $daysInMonth = 28;\r\n }\r\n break;\r\n \r\n case 3:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 4:\r\n $daysInMonth = 30;\r\n break;\r\n \r\n case 5:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 6:\r\n $daysInMonth = 30;\r\n break;\r\n \r\n case 7:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 8:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 9:\r\n $daysInMonth = 30;\r\n break;\r\n \r\n case 10:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n case 11:\r\n $daysInMonth = 30;\r\n break;\r\n \r\n case 12:\r\n $daysInMonth = 31;\r\n break;\r\n \r\n default:\r\n $daysInMonth = 0;\r\n }\r\n \r\n $dayOfYear += $daysInMonth;\r\n $index++;\r\n}\r\n \r\n $dayOfYear += $dateArray[$day];\r\n \r\n return $dayOfYear;\r\n \r\n}", "title": "" }, { "docid": "ffffe78afedeb6524469c12e5e0bb816", "score": "0.58205175", "text": "function getYearDays($evenMonthDays, $oddMonthDays, $totalMonthInYear){\n\n\t$evenOddCount = getEvenOddCount($totalMonthInYear);\n\t$totalDays = 0;\n\t$totalDays += ($evenOddCount['even'] * $evenMonthDays);\n\t$totalDays += ($evenOddCount['odd'] * $oddMonthDays);\n\treturn $totalDays;\n}", "title": "" }, { "docid": "dbc5ee354657ce7193373d8e1bde7585", "score": "0.58202195", "text": "public function years($start = false, $end = false);", "title": "" }, { "docid": "b2c369e75a87306b12ae0b3fb8575de7", "score": "0.5818229", "text": "public abstract function get_min_year();", "title": "" }, { "docid": "8877dfb830045598431f36d6b31e149d", "score": "0.57710165", "text": "function endMonth($date, $nbre){\n $date = format_dateDate($date); \n \n\n $day = explode('/',$date)[0];\n $month=explode('/',$date)[1];\n $year=explode('/',$date)[2];\n for ($i=1; $i <=$nbre ; $i++) { \n $month++;\n if($month==13){\n $month=1;\n $year++; \n }\n }\n $datefin= date('Y-m-d', strtotime(''.$day.'-'.$month.'-'.$year.''));\n\n return $datefin;\n }", "title": "" }, { "docid": "25717650a44ddea51f4c900bda2af0dd", "score": "0.576385", "text": "private function day_of_year($month, $day)\n\t{\n\t\treturn $month <= 6 ?\n\t\t\t\t(($month - 1) * 31 + $day) :\n\t\t\t\t186 + (($month - 6 - 1) * 30 + $day);\n\t}", "title": "" }, { "docid": "40240d33ef5734c3aba08137dabea4aa", "score": "0.57358444", "text": "function calculateYear($y)\r\n { $arr=array(); // this will hold all return values\r\n\t$reserves=array(); // Sunday gospels held for Theophany stepback\r\n\t$floats=array(); // \"floating\" feasts\r\n\t$nodaily=array(\"499\"); // daily readings are suppressed\r\n\t$noparemias=array(\"499\"); // see below\r\n\t$getparemias=array(\"499\"); // see below\r\n\t$arr['id'] = $y;\r\n\t$pascha = $this->calculatePascha($y); $arr['pascha_jd'] = $pascha;\r\n\r\n// get pdays\r\n\t$arr['finding'] = gregoriantojd(2,24,$y) - $pascha;\r\n\t$arr['annunciation'] = gregoriantojd(3,25,$y) - $pascha;\r\n\t $arr['annunciation_weekday'] = $this->dow($arr['annunciation']);\r\n\t$arr['peterpaul'] = gregoriantojd(6,29,$y) - $pascha;\r\n\t$arr['beheading'] = gregoriantojd(8,29,$y) - $pascha;\r\n\t$arr['nativity_theotokos'] = gregoriantojd(9,8,$y) - $pascha;\r\n\t$arr['elevation'] = gregoriantojd(9,14,$y) - $pascha;\r\n\t $arr['elevation_weekday'] = $this->dow($arr['elevation']);\r\n\t$xa = $this->ssba($arr['elevation'], $arr['elevation_weekday']);\r\n\t $arr['sat_bef_elevation'] = $xa[0];\r\n\t $arr['sun_bef_elevation'] = $xa[1];\r\n\t $arr['sat_aft_elevation'] = $xa[2];\r\n\t $arr['sun_aft_elevation'] = $xa[3];\r\n\t$arr['lucan_jump'] = 168 - $arr['sun_aft_elevation'];\r\n\t$j = gregoriantojd(7,16,$y) - $pascha; $wd = $this->dow($j);\r\n\t if ($wd < 4) { $j -= $wd; } else { $j += 7 - $wd; }\r\n\t $arr['fathers_six'] = $j;\r\n\t$j = gregoriantojd(10,11,$y) - $pascha; $wd = $this->dow($j);\r\n//\t if ($wd > 0) { $j += 7 - $wd; }\r\n\t if ($wd < 4) { $j -= $wd; } else { $j += 7 - $wd; }\r\n\t $arr['fathers_seven'] = $j;\r\n\t$j = gregoriantojd(10,26,$y) - $pascha; $wd = $this->dow($j);\r\n\t $arr['demetrius_saturday'] = $j - $wd - 1;\r\n\t$j = gregoriantojd(11,1,$y) - $pascha; $wd = $this->dow($j);\r\n\t $arr['synaxis_unmercenaries'] = $j + 7 - $wd;\r\n\t$arr['nativity'] = gregoriantojd(12,25,$y) - $pascha;\r\n\t $arr['nativity_weekday'] = $this->dow($arr['nativity']);\r\n\t$arr['forefathers'] = $arr['nativity'] - 14 + ((7 - $arr['nativity_weekday']) % 7);\r\n\t$xa = $this->ssba($arr['nativity'], $arr['nativity_weekday']);\r\n\t $arr['sat_bef_nativity'] = $xa[0];\r\n\t $arr['sun_bef_nativity'] = $xa[1];\r\n\t $arr['sat_aft_nativity'] = $xa[2];\r\n\t $arr['sun_aft_nativity'] = $xa[3];\r\n\t$arr['theophany'] = gregoriantojd(1,6,$y+1) - $pascha;\r\n\t $arr['theophany_weekday'] = $this->dow($arr['theophany']);\r\n\t$xa = $this->ssba($arr['theophany'], $arr['theophany_weekday']);\r\n\t $arr['sat_bef_theophany'] = $xa[0];\r\n\t $arr['sun_bef_theophany'] = $xa[1];\r\n\t $arr['sat_aft_theophany'] = $xa[2];\r\n\t $arr['sun_aft_theophany'] = $xa[3];\r\n\r\n// assemble floats ***see reference for index numbers\r\n\tfor ($i=1001; $i<1038; $i++) {$floats[$i]=499;}\r\n\t$floats[1001] = $arr['fathers_six'];\r\n\t$floats[1002] = $arr['fathers_seven'];\r\n\t$floats[1003] = $arr['demetrius_saturday'];\r\n\t$floats[1004] = $arr['synaxis_unmercenaries'];\r\n\tif ($arr['sat_bef_elevation']==$arr['nativity_theotokos']) {$floats[1005] = $arr['elevation'] - 1;}\r\n\t else {$floats[1006] = $arr['sat_bef_elevation'];}\r\n\t$floats[1007] = $arr['sun_bef_elevation'];\r\n\t$floats[1008] = $arr['sat_aft_elevation'];\r\n\t$floats[1009] = $arr['sun_aft_elevation'];\r\n\t$floats[1010] = $arr['forefathers'];\r\n\tif ($arr['sat_bef_nativity']==$arr['nativity']-1)\r\n\t { $floats[1013]=$arr['nativity']-2;\r\n\t $floats[1012]=$arr['sun_bef_nativity'];\r\n\t $floats[1015]=$arr['nativity']-1; }\r\n\t elseif ($arr['sun_bef_nativity']==$arr['nativity']-1)\r\n\t { $floats[1013]=$arr['nativity']-3;\r\n\t $floats[1011]=$arr['sat_bef_nativity'];\r\n\t $floats[1016]=$arr['nativity']-1; }\r\n\t else\r\n\t { $floats[1014]=$arr['nativity']-1;\r\n\t $floats[1011]=$arr['sat_bef_nativity'];\r\n\t $floats[1012]=$arr['sun_bef_nativity']; }\r\n\tif ($arr['nativity_weekday']==0)\r\n\t { $floats[1017]=$arr['sat_aft_nativity'];\r\n\t $floats[1020]=$arr['nativity']+1;\r\n\t $floats[1024]=$arr['sun_bef_theophany'];\r\n\t $floats[1026]=$arr['theophany']-1; }\r\n\t elseif ($arr['nativity_weekday']==1)\r\n\t { $floats[1017]=$arr['sat_aft_nativity'];\r\n\t $floats[1021]=$arr['sun_aft_nativity'];\r\n\t $floats[1023]=$arr['theophany']-5;\r\n\t $floats[1026]=$arr['theophany']-1; }\r\n\t elseif ($arr['nativity_weekday']==2)\r\n\t { $floats[1019]=$arr['sat_aft_nativity'];\r\n\t $floats[1021]=$arr['sun_aft_nativity'];\r\n\t $floats[1027]=$arr['sat_bef_theophany'];\r\n\t $floats[1023]=$arr['theophany']-5;\r\n\t $floats[1025]=$arr['theophany']-2; }\r\n\t elseif ($arr['nativity_weekday']==3)\r\n\t { $floats[1019]=$arr['sat_aft_nativity'];\r\n\t $floats[1021]=$arr['sun_aft_nativity'];\r\n\t $floats[1022]=$arr['sat_bef_theophany'];\r\n\t $floats[1028]=$arr['sun_bef_theophany'];\r\n\t $floats[1025]=$arr['theophany']-3; }\r\n\t elseif ($arr['nativity_weekday']==4 || $arr['nativity_weekday']==5)\r\n\t { $floats[1019]=$arr['sat_aft_nativity'];\r\n\t $floats[1021]=$arr['sun_aft_nativity'];\r\n\t $floats[1022]=$arr['sat_bef_theophany'];\r\n\t $floats[1024]=$arr['sun_bef_theophany'];\r\n\t $floats[1026]=$arr['theophany']-1; }\r\n\t elseif ($arr['nativity_weekday']==6)\r\n\t { $floats[1018]=$arr['nativity']+6;\r\n\t $floats[1021]=$arr['sun_aft_nativity'];\r\n\t $floats[1022]=$arr['sat_bef_theophany'];\r\n\t $floats[1024]=$arr['sun_bef_theophany'];\r\n\t $floats[1026]=$arr['theophany']-1; }\r\n\t$floats[1029] = $arr['sat_aft_theophany'];\r\n\t$floats[1030] = $arr['sun_aft_theophany'];\r\n\t$no_daily_ann=false;\r\n\tif ($arr['annunciation_weekday']==6)\r\n\t { $floats[1032]=$arr['annunciation']-1;\r\n\t $floats[1033]=$arr['annunciation'];\r\n\t $no_daily_ann=true; }\r\n\telseif ($arr['annunciation_weekday']==0)\r\n\t { $floats[1034]=$arr['annunciation']; }\r\n\telseif ($arr['annunciation_weekday']==1)\r\n\t { $floats[1035]=$arr['annunciation']; }\r\n\telse\r\n\t { $floats[1036]=$arr['annunciation']-1;\r\n\t $floats[1037]=$arr['annunciation']; }\r\n\r\n// assemble nodaily\r\n\t$nodaily[]=$arr['sun_bef_theophany'];\r\n\t$nodaily[]=$arr['sun_aft_theophany'];\r\n\t$nodaily[]=$arr['theophany']-5;\r\n\r\n\tif ($arr['sat_bef_theophany'] != ($arr['theophany']-1))\r\n\t{ $nodaily[]=$arr['theophany']-1; }\r\n\r\n\t$nodaily[]=$arr['theophany'];\r\n\tif ($arr['sat_aft_theophany']==$arr['theophany']+1) {$nodaily[]=$arr['theophany']+1;}\r\n//\tif ($arr['finding']==-43) {$nodaily[]=$arr['finding'];}\r\n\t$nodaily[]=$arr['forefathers'];\r\n\t$nodaily[]=$arr['sun_bef_nativity'];\r\n\t$nodaily[]=$arr['nativity']-1;\r\n\t$nodaily[]=$arr['nativity'];\r\n\t$nodaily[]=$arr['nativity']+1;\r\n\t$nodaily[]=$arr['sun_aft_nativity'];\r\n\tif ($no_daily_ann) {$nodaily[]=$arr['annunciation'];}\r\n\r\n// assemble reserves, first get previous and next paschas\r\n\t$arr['previous_pascha_jd'] = $this->calculatePascha($y-1);\r\n\t$arr['previous_pascha'] = $arr['previous_pascha_jd'] - $pascha;\r\n\t$arr['next_pascha_jd'] = $this->calculatePascha($y+1);\r\n\t$arr['next_pascha'] = $arr['next_pascha_jd'] - $pascha;\r\n\t$x = $arr['next_pascha'] - 84;\r\n\t$i = floor(($x - $arr['sun_aft_theophany']) / 7); $arr['extra_sundays'] = $i;\r\n\tif ($i)\r\n\t{ $z = $arr['forefathers'] + $arr['lucan_jump'] + 7;\r\n\t for ($x=$z; $x<=266; $x+=7) {$reserves[]=$x;}\r\n\t $i -= count($reserves);\r\n\t if ($i>0)\r\n\t { $x = 175 - ($i*7); for ($i=$x; $i<169; $i+=7) {$reserves[]=$i;} } }\r\n\r\n// minor feasts on weekdays in lent have their paremias moved to previous day \r\n\t$pamonths=array(2, 2, 3, 3, 4, 4, 4, 4);\r\n\t$padays=array(24, 27, 9, 31, 7, 23, 25, 30);\r\n\tforeach ($pamonths as $k=>$v)\r\n\t { $xp = gregoriantojd($v,$padays[$k],$y) - $pascha; $xd=$this->dow($xp);\r\n\t if ($xp > -44 && $xp < -7 && $xd > 1)\r\n\t { $noparemias[] = $xp; $getparemias[] = $xp - 1; } }\r\n\r\n// add other arrays\r\n\t$arr['reserves']=$reserves;\r\n\t$arr['floats']=$floats;\r\n\t$arr['nodaily']=$nodaily;\r\n\t$arr['noparemias']=$noparemias;\r\n\t$arr['getparemias']=$getparemias;\r\n\treturn $arr; }", "title": "" }, { "docid": "5b33717c8c594af086ca897668d68c9f", "score": "0.5734785", "text": "public function modelYear()", "title": "" }, { "docid": "1ea7418d5aadd358249850eeb63ed05e", "score": "0.56862855", "text": "function mergeDate($month,$day,$year)\n {\n if($month == \"\" || $month == null || $month == \"0\")\n $month == \"00\";\n if($day == \"\" || $day == null || $day == \"0\")\n $day == \"00\";\n if($year == \"\" || $year == null || $year == \"0\")\n $year = \"0000\";\n return $month . \"/\" . $day . \"/\" . $year;\n }", "title": "" }, { "docid": "67b6c8d61d41ada085c7278755a82922", "score": "0.56827", "text": "function getLeapAndNonLeapYearBetweenYears($startY, $endY){\n\tglobal $leapYearDiff, $yearTotalDays, $leapYearTotalDays;\n\t$leapYearCount = 0;\n\t$nonLeapYearCount = 0;\n\t$totalDaysBetweenDates = 0;\n\tfor($i=$startY;$i<=$endY;$i++){\n\n\t\tif(($i%$leapYearDiff) == 0){\n\t\t\t$leapYearCount++;\n\t\t}else{\n\t\t\t$nonLeapYearCount++;\n\t\t}\n\t}\n\t$totalDaysBetweenDates += ($leapYearCount * $leapYearTotalDays);\n\t$totalDaysBetweenDates += ($nonLeapYearCount * $yearTotalDays);\n\treturn $totalDaysBetweenDates;\n\n}", "title": "" }, { "docid": "25e26758bf29938c265f5de000dd21e7", "score": "0.5680564", "text": "public function calculateDaysFronStartOfCalendar($year, $month, $day) {\n \t$year = $year > 0 ? $year -1 : 0;\n \t$month = $month > 0 ? $month-1 : 0;\n \t$day = $day > 0 ? $day -1 : 0;\n\n \t\n \t$types = $this->getCalendarPeriodTypes();\n if ($types == null || count($types) <= 0) {\n throw new LetoException(\"This calendar does not define any periods.\");\n }\n \tif (count($types) < 3) {\n \t\tthrow new LetoException(\"Calendar does not support years. Year \\\"\" . $year . \"\\\" is invalid for this calendar.\");\n \t}\n \t\n \t$MONTH_INDEX = 1; $monthType = $types[$MONTH_INDEX];\n \t$YEAR_INDEX = 2; $yearType = $types[$YEAR_INDEX];\n \n $currentType = $types[count($types) - 1];\n $structures = $currentType->getPossibleStructures();\n if ($structures == null || count($structures) <= 0) {\n throw new LetoException(\"This calendar does not define any structure for the period type \\\"\" \n . $currentType->getName() . \", so it is not defined how long in days this period could be.\");\n }\n if (count($structures) > 1) {\n throw new LetoException(\"The biggest possible period type \\\"\" . $currentType->getName() \n . \"\\\" in this calendar has \" . count($structures) \n . \" possible structures, but just one was expected. It is not defined which one should be used.\");\n }\n \n $daysElapsed = 0;\n \n $structure = $structures[0];\n \n $yearsInPeriod = $structure->getTotalLengthInPeriodTypes($yearType);\n $daysInPeriod = $structure->getTotalLengthInDays();\n $reminder = $year % $yearsInPeriod;\n $periods = ($year - $reminder) / $yearsInPeriod;\n $daysElapsed += ($periods * $daysInPeriod);\n $year = $reminder;\n \n $j = 0; // Just to prevent unfortunate endless loops. \n $limit = 2*count($types); // Usually that would be just count($types), but just in case.\n while (($structures = $structure->getSubPeriods() ) != null && count($structures) > 0 && $year > 0 && $j++ < $limit) {\n for ($i = 0; $i < count($structures); $i++) {\n $structure = $structures[$i];\n if ($year <= 0) {\n break 2;\n }\n\n $yearsInPeriod = $structure->getTotalLengthInPeriodTypes($yearType);\n $daysInPeriod = $structure->getTotalLengthInDays();\n if ($yearsInPeriod <= $year) {\n $daysElapsed += $daysInPeriod;\n $year = $year - $yearsInPeriod;\n } else {\n break;\n }\n }\n }\n \n if ($year > 0) {\n \tthrow new LetoException(\"Internal error while calculating years in date.\");\n }\n \n $j = 0;\n while (($structures = $structure->getSubPeriods() ) != null && count($structures) > 0 && $month > 0 && $j < $limit) {\n for ($i = 0; $i < count($structures); $i++) {\n $structure = $structures[$i];\n if ($month <= 0) {\n break 2;\n }\n\n $monthsInPeriod = $structure->getTotalLengthInPeriodTypes($monthType);\n $daysInPeriod = $structure->getTotalLengthInDays();\n if ($monthsInPeriod <= $month) {\n \t$daysElapsed += $daysInPeriod;\n \t$month = $month - $monthsInPeriod;\n } else {\n \tbreak;\n }\n }\n }\n \n if ($month > 0) {\n \tthrow new LetoException(\"Internal error while calculating months in date.\");\n }\n \n $j = 0;\n while (($structures = $structure->getSubPeriods() ) != null && count($structures) > 0 && $day > 0 && $j < $limit) {\n for ($i = 0; $i < count($structures); $i++) {\n $structure = $structures[$i];\n if ($day <= 0) {\n break 2;\n }\n $daysInPeriod = $structure->getTotalLengthInDays();\n if ($daysInPeriod <= $day) {\n \t$daysElapsed += $daysInPeriod;\n \t$day = $day - $daysInPeriod;\n } else {\n \tbreak;\n }\n }\n }\n \n if ($day > 0) {\n \tthrow new LetoException(\"Internal error while calculating days in date.\");\n }\n return $daysElapsed;\n \t\n }", "title": "" }, { "docid": "dd8a87c356f5df1ed6bc94d9b9e18ecd", "score": "0.5676244", "text": "public function endOfCentury()\n {\n $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY;\n\n return $this->setDate($year, 12, 31)->endOfDay();\n }", "title": "" }, { "docid": "683207830c8e6e585a792b85118473d2", "score": "0.5676242", "text": "public function testEndOfMonth2(){\n //Note: This all uses PHPs internal date calculation stuff, so this should work anyway. I'm reinventing the wheel, I promise.\n $leapMonth = CovleDate::fromString(\"2016-02-02 12:45:12\");\n $end = $leapMonth->getEndOfMonth();\n\n $this->assertEquals(\"2016\", $end->getYear());\n $this->assertEquals(\"02\", $end->getMonth());\n $this->assertEquals(\"29\", $end->getDay());\n\n $this->assertEquals(\"23\", $end->getHour());\n $this->assertEquals(\"59\", $end->getMinutes());\n $this->assertEquals(\"59\", $end->getSeconds());\n\n }", "title": "" }, { "docid": "8114a900eeda8a8cd9a8883816cdadcb", "score": "0.5667769", "text": "function _generate_reporting_range($year) {\n static $start_date;\n static $reporting_month;\n if (!isset($start_date)) {\n $start_date = variable_get('ercore_start_date');\n }\n if (!isset($reporting_month)) {\n $reporting_month = intval(variable_get('ercore_reporting_month'));\n }\n $last_month = $reporting_month - 1;\n $last_day = date('t', strtotime($last_month . '/1/' . $year));\n\n if ($year == $start_date['year']) {\n $second_year = array();\n $second_year['month'] = $last_month;\n $second_year['day'] = $last_day;\n $second_year['year'] = $start_date['year'] + 1;\n\n $date1 = implode('/', $start_date);\n $date2 = implode('/', $second_year);\n return array(\n ercore_admin_unix_date($date1),\n ercore_admin_unix_date($date2),\n );\n }\n else {\n $date1 = $reporting_month . '/1/' . $year;\n $next_year = $year + 1;\n $date2 = $last_month . '/' . $last_day . '/' . $next_year;\n\n return array(\n ercore_admin_unix_date($date1),\n ercore_admin_unix_date($date2),\n );\n }\n}", "title": "" }, { "docid": "d2cd762e37cd78479a5260a9e8e8da04", "score": "0.5658944", "text": "public function testYearToDate(): void\n {\n // and second do not take place in same day.\n do {\n $sheet = $this->getSpreadsheet()->createSheet();\n $dtStart = new DateTimeImmutable();\n $startDay = (int) $dtStart->format('d');\n $startMonth = (int) $dtStart->format('m');\n $sheet->getCell('A1')->setValue('Date');\n $sheet->getCell('A2')->setValue('=TODAY()');\n // cache result for consistency in later calculations\n $sheet->getCell('A2')->getCalculatedValue();\n $sheet->getCell('A3')->setValue('=DATE(YEAR(A2), 12, 31)');\n $sheet->getCell('A4')->setValue('=A3 + 1');\n $sheet->getCell('A5')->setValue('=DATE(YEAR(A2), 1, 1)');\n $sheet->getCell('A6')->setValue('=A5 - 1');\n\n $this->maxRow = $maxRow = 6;\n $autoFilter = $sheet->getAutoFilter();\n $autoFilter->setRange(\"A1:A$maxRow\");\n $columnFilter = $autoFilter->getColumn('A');\n $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n $columnFilter->createRule()\n ->setRule(\n Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n '',\n Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE\n )\n ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n $autoFilter->showHideRows();\n $dtEnd = new DateTimeImmutable();\n $endDay = (int) $dtEnd->format('d');\n } while ($startDay !== $endDay);\n\n $expected = ($startMonth === 12 && $startDay === 31) ? [2, 3, 5] : [2, 5];\n self::assertEquals($expected, $this->getVisibleSheet($sheet));\n }", "title": "" }, { "docid": "9998725330cfd3ce055cf542d5f7478f", "score": "0.5658423", "text": "function ercore_start_end_dates_displayed() {\n $ercore_date = variable_get('ercore_start_date');\n $argument_date_format = variable_get('date_format_ercore_date_format_month_day_year');\n $default = date_create(implode('/', $ercore_date));\n $dates['start'] = date_format($default, $argument_date_format);\n $dates['end'] = date($argument_date_format, strtotime('+1 year'));\n $new_dates = $dates['start'] . ' to ' . $dates['end'];\n return $new_dates;\n}", "title": "" }, { "docid": "e40a034b73224b1948b7d5201de2c383", "score": "0.56452817", "text": "public static function date_fix_date(&$month,&$day,&$year,$unix=true){\n\t\t if($month>12){\n\t\t\t while ($month>12){\n\t\t\t\t $month-=12;//subtract a $year\n\t\t\t\t $year++;//add a $year\n\t\t\t }\n\t\t } else if ($month<1){\n\t\t\t while ($month<1){\n\t\t\t\t $month +=12;//add a $year\n\t\t\t\t $year--;//subtract a $year\n\t\t\t }\n\t\t }\n\t\t if ($day>31){\n\t\t\t while ($day>31){\n\t\t\t\t if ($month==2){\n\t\t\t\t\t if (DateHelper::is_leap_year($year)){//subtract a $month\n\t\t\t\t\t\t $day-=29;\n\t\t\t\t\t } else{\n\t\t\t\t\t\t $day-=28;\n\t\t\t\t\t }\n\t\t\t\t\t $month++;//add a $month\n\t\t\t\t } else if (DateHelper::month_hasThirtyOneDays($month)){\n\t\t\t\t\t $day-=31;\n\t\t\t\t\t $month++;\n\t\t\t\t } else{\n\t\t\t\t\t $day-=30;\n\t\t\t\t\t $month++;\n\t\t\t\t }\n\t\t\t }//end while\n\t\t\t while ($month>12){ //recheck $months\n\t\t\t\t $month-=12;//subtract a $year\n\t\t\t\t $year++;//add a $year\n\t\t\t }\n\t\t } else if ($day<1){\n\t\t\t while ($day<1){\n\t\t\t\t $month--;//subtract a $month\n\t\t\t\t if ($month==2){\n\t\t\t\t\t if (DateHelper::is_leap_year($year)){//add a $month\n\t\t\t\t\t\t $day+=29;\n\t\t\t\t\t }else{\n\t\t\t\t\t\t $day+=28;\n\t\t\t\t\t }\n\t\t\t\t } else if (DateHelper::month_hasThirtyOneDays($month)){\n\t\t\t\t\t $day+=31;\n\t\t\t\t } else{\n\t\t\t\t\t $day+=30;\n\t\t\t\t }\n\t\t\t }//end while\n\t\t\t while ($month<1){//recheck $months\n\t\t\t\t $month+=12;//add a $year\n\t\t\t\t $year--;//subtract a $year\n\t\t\t }\n\t\t } else if ($month==2){\n\t\t\t if (DateHelper::is_leap_year($year)&&$day>29){\n\t\t\t\t $day-=29;\n\t\t\t\t $month++;\n\t\t\t } else if($day>28){\n\t\t\t\t $day-=28;\n\t\t\t\t $month++;\n\t\t\t }\n\t\t } else if (!DateHelper::month_hasThirtyOneDays($month)&&$day>30){\n\t\t\t $day-=30;\n\t\t\t $month++;\n\t\t }\n\t\t if ($year<1900) $year=1900;\n\t\t if ($unix){\n\t\t\t return \"$year-$month-$day\";\n\t\t } else{\n\t\t\t return \"$month-$day-$year\";\n\t\t }\n\t }", "title": "" }, { "docid": "7315748c638ef38d1d58f0125232380e", "score": "0.56421405", "text": "public function nep_to_eng($yy, $mm, $dd)\n {\n $def_eyy = 1943;\n $def_emm = 4;\n $def_edd = 14 - 1; // initial english date.\n $def_nyy = 2000;\n $def_nmm = 1;\n $def_ndd = 1; // iniital equivalent nepali date.\n $total_eDays = 0;\n $total_nDays = 0;\n $a = 0;\n $day = 4 - 1;\n $m = 0;\n $y = 0;\n $i = 0;\n $k = 0;\n $numDay = 0;\n $month = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n $lmonth = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n // Check for date range\n $chk = $this->_is_in_range_nep($yy, $mm, $dd);\n if ($chk !== true) {\n die($chk);\n } else {\n // Count total days in-terms of year\n for ($i = 0; $i < ($yy - $def_nyy); $i++) {\n for ($j = 1; $j <= 12; $j++) {\n $total_nDays += $this->_bs[$k][$j];\n }\n $k++;\n }\n // Count total days in-terms of month\n for ($j = 1; $j < $mm; $j++) {\n $total_nDays += $this->_bs[$k][$j];\n }\n // Count total days in-terms of dat\n $total_nDays += $dd;\n // Calculation of equivalent english date...\n $total_eDays = $def_edd;\n $m = $def_emm;\n $y = $def_eyy;\n while ($total_nDays != 0) {\n if ($this->is_leap_year($y)) {\n $a = $lmonth[$m];\n } else {\n $a = $month[$m];\n }\n $total_eDays++;\n $day++;\n if ($total_eDays > $a) {\n $m++;\n $total_eDays = 1;\n if ($m > 12) {\n $y++;\n $m = 1;\n }\n }\n if ($day > 7) {\n $day = 1;\n }\n $total_nDays--;\n }\n\n $numDay = $day;\n $this->_eng_date['year'] = $y;\n $this->_eng_date['month'] = $m;\n $this->_eng_date['date'] = $total_eDays;\n $this->_eng_date['day'] = $this->_get_day_of_week($day);\n $this->_eng_date['nmonth'] = $this->_get_english_month($m);\n $this->_eng_date['num_day'] = $numDay;\n\n return $this->_eng_date;\n }\n }", "title": "" }, { "docid": "3725a1c04980a068cd02b6378d609b4e", "score": "0.5636527", "text": "static function getServiceYearRange ()\r\n\t{\r\n\t\t$year = date(\"Y\");\r\n\r\n\t\treturn range($year-1,$year+10);\r\n\t}", "title": "" }, { "docid": "12795c7eb620db921cb19105bc6f58e5", "score": "0.562652", "text": "function get_schoolyear_end($sy_id)\n{\n\t$year = intval($sy_id / 10);\n\t$semester = $sy_id % 10;\n\tif( $semester>2 ) $year++;\n\treturn $year * 10 + 2;\n}", "title": "" }, { "docid": "750e4245c0ac36dff05132eb0502b47e", "score": "0.56152505", "text": "public function get_year_permastruct()\n {\n }", "title": "" }, { "docid": "e14224618be833fb94f9491a1a49b25d", "score": "0.56122303", "text": "function draw_small_calendar($month,$year) {\n\t\t$unavailables = Array();\n\t\t$non_default_price_days = Array();\n\t\t\n\t\t\n\t// find all unavailable days in the selected month. First...\n\n\t// find 1st of month as day of year\n\t\t$string = $year . \"-\" . $month . \"-01\";\n\t\t$dt = strtotime($string);\n\t\t$current_month_start_as_day = date('z', $dt);\n\t\t\n\t// find 1st of next month as day of year by making yy-mm-dd format and doing strtotime(). If month is December, find last day of December instead.\n\t\t \n\t\tif ($month == 12) {\n\t\t\t$next_month = 1;\n\t\t\t$string = $year . \"-\" . $month . \"-31\";\n\t\t} else {\n\t\t\t$next_month = ($month + 1);\n\t\t\t$string = $year . \"-\" . ($next_month) . \"-01\";\n\t\t}\n\t\t \t$dt = strtotime($string);\n\t\t \t$next_month_start_as_day = date('z', $dt);\n\t\t \t\n\t// select all entries between those two days of year\n\t\t \t\n\t\t if ($month == 12 ) {\n\t\t\t$query = \"select * from unavailable where year = $year and day_of_year >= $current_month_start_as_day and day_of_year < 366\";\n\t\t \t$result = mysql_query($query) or die(mysql_error());\n\t\t} else {\n\t\t\t$query = \"select * from unavailable where year = $year and day_of_year >= $current_month_start_as_day and day_of_year < $next_month_start_as_day\";\n\t\t \t$result = mysql_query($query) or die(mysql_error());\n\t\t}\n\t \t \n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t\t$unavailable_day_of_year = $row['day_of_year'];\n\t\t \t \n\t\t\t$offset = intval($unavailable_day_of_year) * 86400;\n\t\t\t$date = mktime( 0, 0, 0, 1, 1, date('Y') )+$offset;\n\t\t\t$formatted_day = date( \"d\", $date );\n\t\t\t\n\t\t \t$unavailables[] = $formatted_day;\n\t\t}\n\t\t\n /* draw table */\n\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table heading */\n\n $heading = array(\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"); \n\n $calendar .= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$heading).'</td></tr>';\n\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\n $days_in_this_week = 1;\n\n $day_counter = 0;\n\n $dates_array = array(); \n\n\n /* print \"blank\" days until the first of the current week */\n\n for($x = 0; $x < $running_day; $x++) {\n\n $calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\n\n $days_in_this_week++;\n\n }//endfor\n\n /* keep going with days */\n\n for ($list_day=1;$list_day<=$days_in_month;$list_day++) {\n\n if ( in_array($list_day, $unavailables) && $list_day == date(\"j\",mktime(0,0,0,$month)) && $month == date(\"n\") && $year == date(\"Y\")) {\n\t\n\t\t\t\t$calendar .= '<td class=\"calendar-day booked-day calendar-day-current\">';\n\t\t\t\t\n\t\t\t} elseif ($list_day == date(\"j\",mktime(0,0,0,$month)) && $month == date(\"n\") && $year == date(\"Y\")) {\n\n $calendar .= '<td class=\"calendar-day available-day calendar-day-current\">'; \n\n } elseif (in_array($list_day, $unavailables)) {\n\t\n\t\t\t\t$calendar .= '<td class=\"calendar-day booked-day\">';\n\t\t\t\t\n \t\t} else {\n \t\t\t\t\n\t\t\t\t$calendar .= '<td class=\"calendar-day available-day\">'; \n\n }\n\n /* add in the day number */\n\n\t\t\t$calendar .= '<div class=\"small-day-number\">'.$list_day.'</div>';\n\n // /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n // \t\t\t\tif (in_array($list_day, $unavailables)) {\n // \t\t$calendar .= '<span class=\"bookedtext\">Booked!</span>';\n // \t\t\t\t} else {\n // \t\t\t \t\t\n // \t\t\t\t\tif (array_key_exists($list_day, $non_default_price_days)) {\n // \t\t\t\t\n // \t\t\t\t\t\t$calendar .= '<p class=\"availabletext\">Available!</p><p class=\"pricetext\">$' . $non_default_price_days[$list_day] . '</p>';\n // \t\t\t\t\t} else {\n // \t\t\t\t\t\t$calendar .= '<p class=\"availabletext\">Available!</p><p class=\"pricetext\">$' . $default_price . '</p>';\n // \t\t\t\t\t}\n // \t\t\t\t}\n // \t\t\t\t\n // \t\t\t\t\n $calendar .= '</td>';\n\n if($running_day == 6) {\n\n $calendar .= '</tr>'; \n\n if(($day_counter+1) != $days_in_month) {$calendar .= '<tr class=\"calendar_row\">';}\n\n $running_day = -1;\n\n $days_in_this_week = 0; \n \n }//endif\n\n $days_in_this_week++; $running_day++; $day_counter++;\n\n }//endfor \n\n\n /* finish the rest of the days in the week */\n\n if($days_in_this_week < 8) {\n\n for($x=1;$x <= (8-$days_in_this_week);$x++) {\n\n $calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\n\n }\n\n }//endif\n\n /* final row */\n\n $calendar.= '</tr>';\n\n /* end the table */\n\n $calendar.= '</table>';\n\n /* all done, return result */\n\n return $calendar; \n\n }", "title": "" }, { "docid": "a68571d24dc15a8a5d0d4e7b6b045337", "score": "0.557436", "text": "function dsi_get_current_anno_scolastico($year = true){\n $today_month = date(\"n\");\n if($today_month < 8){\n if($year) return date(\"Y\")-1; else return dsi_convert_anno_scuola(date(\"Y\")-1);\n }else{\n if($year) return date(\"Y\"); else return dsi_convert_anno_scuola(date(\"Y\"));\n }\n\n}", "title": "" }, { "docid": "67ca91e20d5871d34ed8248dc78e0058", "score": "0.55583113", "text": "public function eng_to_nep($yy, $mm, $dd)\n {\n // Check for date range\n $chk = $this->_is_in_range_eng($yy, $mm, $dd);\n if ($chk !== true) {\n die($chk);\n } else {\n // Month data.\n $month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n // Month for leap year\n $lmonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n $def_eyy = 1944; // initial english date.\n $def_nyy = 2000;\n $def_nmm = 9;\n $def_ndd = 17 - 1; // inital nepali date.\n $total_eDays = 0;\n $total_nDays = 0;\n $a = 0;\n $day = 7 - 1;\n $m = 0;\n $y = 0;\n $i = 0;\n $j = 0;\n $numDay = 0;\n // Count total no. of days in-terms year\n for ($i = 0; $i < ($yy - $def_eyy); $i++) { //total days for month calculation...(english)\n if ($this->is_leap_year($def_eyy + $i) === true) {\n for ($j = 0; $j < 12; $j++) {\n $total_eDays += $lmonth[$j];\n }\n } else {\n for ($j = 0; $j < 12; $j++) {\n $total_eDays += $month[$j];\n }\n }\n }\n // Count total no. of days in-terms of month\n for ($i = 0; $i < ($mm - 1); $i++) {\n if ($this->is_leap_year($yy) === true) {\n $total_eDays += $lmonth[$i];\n } else {\n $total_eDays += $month[$i];\n }\n }\n // Count total no. of days in-terms of date\n $total_eDays += $dd;\n $i = 0;\n $j = $def_nmm;\n $total_nDays = $def_ndd;\n $m = $def_nmm;\n $y = $def_nyy;\n // Count nepali date from array\n while ($total_eDays != 0) {\n $a = $this->_bs[$i][$j];\n\n $total_nDays++; //count the days\n $day++; //count the days interms of 7 days\n if ($total_nDays > $a) {\n $m++;\n $total_nDays = 1;\n $j++;\n }\n\n if ($day > 7) {\n $day = 1;\n }\n\n if ($m > 12) {\n $y++;\n $m = 1;\n }\n\n if ($j > 12) {\n $j = 1;\n $i++;\n }\n\n $total_eDays--;\n }\n $numDay = $day;\n $this->_nep_date['year'] = $this->convert_to_nepali_number($y);\n $this->_nep_date['month'] = $this->convert_to_nepali_number($m);\n $this->_nep_date['date'] = $this->convert_to_nepali_number($total_nDays);\n $this->_nep_date['day'] = $this->_get_day_of_week($day);\n $this->_nep_date['nmonth'] = $this->_get_nepali_month($m);\n $this->_nep_date['num_day'] = $this->convert_to_nepali_number($numDay);\n\n return $this->_nep_date;\n }\n }", "title": "" }, { "docid": "d034715f2236852b566aa03d2e981326", "score": "0.5552068", "text": "public function lastday($month, $day, $year) {\n $jday2 = \"\";\n $this->jdate2 = \"\";\n $this->lastdayen = date(\"d\", mktime(0, 0, 0, $month + 1, 0, $year));\n list( $jyear, $jmonth, $jday ) = $this->gregorianToJalali($year, $month, $day);\n $lastdatep = $jday;\n $jday = $jday2;\n while ($jday2 != \"1\") {\n if ($day < $this->lastdayen) {\n $day++;\n list( $jyear, $jmonth, $jday2 ) = $this->gregorianToJalali($year, $month, $day);\n if ($this->jdate2 == \"1\")\n break;\n if ($this->jdate2 != \"1\")\n $lastdatep++;\n }\n else {\n $day = 0;\n $month++;\n if ($month == 13) {\n $month = \"1\";\n $year++;\n }\n }\n }\n return $lastdatep - 1;\n }", "title": "" }, { "docid": "758fb36793d86897adc95c05d9de1a3b", "score": "0.5549905", "text": "public function genrateFinacialYearEndDate($pdate = NULL, $sdate = NULL, $edate = NULL,$action = NULL) { \n\t\t\n\t\tfor($i=0; $i<date('Y', strtotime($edate)); $i++ ){\n\t\t\tif(strtotime($user['pdate']) >= strtotime($user['sdate']) && strtotime($user['pdate']) <= strtotime($user['edate'])){\n\t\t\t\techo $edate;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\t$sdate = date('Y-m-d', strtotime('-1 year', strtotime($sdate)));\n\t\t\t\t$edate = date('Y-m-d', strtotime('-1 year', strtotime($edate)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3a2d8dd16b42403be1aafbd19b09904b", "score": "0.5547366", "text": "public function finish_month ($month, $year)\n {\n }", "title": "" }, { "docid": "cf70297cbb858538443d0f9d89ddf0dd", "score": "0.55376744", "text": "private function convert_to_gregorian_algorithm_b($year, $month, $day, $hour = 0, $minute = 0) {\n $delta = 1;\n\n // Added - delta=1 on jd to comply isna rulling.\n $part1 = $this->int_part((11 * $year + 3) / 30);\n $part2 = $this->int_part(($month - 1) / 2);\n $jd = $part1 + 354 * $year + 30 * $month - $part2 + $day + 1948440 - 385 - $delta;\n\n if ($jd > 2299160 ) {\n $l = $jd + 68569;\n $n = $this->int_part((4 * $l) / 146097);\n $l = $l - $this->int_part((146097 * $n + 3) / 4);\n $i = $this->int_part((4000 * ($l + 1)) / 1461001);\n $l = $l - $this->int_part((1461 * $i) / 4) + 31;\n $j = $this->int_part((80 * $l) / 2447);\n $d = $l - $this->int_part((2447 * $j) / 80);\n $l = $this->int_part($j / 11);\n $m = $j + 2 - 12 * $l;\n $y = 100 * ($n - 49) + $i + $l;\n } else {\n $j = $jd + 1402;\n $k = $this->int_part(($j - 1) / 1461);\n $l = $j - 1461 * $k;\n $n = $this->int_part(($l - 1) / 365) - $this->int_part($l / 1461);\n $i = $l - 365 * $n + 30;\n $j = $this->int_part((80 * $i) / 2447);\n $d = $i - $this->int_part((2447 * $j) / 80);\n $i = $this->int_part($j / 11);\n $m = $j + 2 - 12 * $i;\n $y = 4 * $k + $n + $i - 4716;\n }\n\n $date = array(\n 'year' => $y,\n 'month' => $m,\n 'day' => $d,\n 'hour' => $hour,\n 'minute' => $minute\n );\n\n return $date;\n }", "title": "" }, { "docid": "5a4e2cf4333d8fa5a53d77daee8ee949", "score": "0.5521475", "text": "public function getYearTablet();", "title": "" }, { "docid": "b99753f12544fa6db7a67ccbe75e522b", "score": "0.5499279", "text": "function dayYear_To_YearMonthDay($d, $y) {\r\n\t\t$month = '';\r\n\t\t$day = $d;\r\n\t\tif ($day < 32) {\r\n\t\t\t$month = '1';\r\n\t\t}\r\n\t\telseif ($day < 60) {\r\n\t\t\t$month = '2';\r\n\t\t\t$day = $day - 31;\r\n\t\t}\r\n\t\telseif ($day < 91) {\r\n\t\t\t$month = '3';\r\n\t\t\t$day = $day - 59;\r\n\t\t}\r\n\t\telseif ($day < 121) {\r\n\t\t\t$month = '4';\r\n\t\t\t$day = $day - 90;\r\n\t\t}\r\n\t\telseif ($day < 152) {\r\n\t\t\t$month = '5'; \r\n\t\t\t$day = $day - 120;\r\n\t\t}\r\n\t\telseif ($day < 182) {\r\n\t\t\t$month = '6';\r\n\t\t\t$day = $day - 151;\r\n\t\t}\r\n\t\telseif ($day < 213) {\r\n\t\t\t$month = '7';\r\n\t\t\t$day = $day - 181;\r\n\t\t}\r\n\t\telseif ($day < 244) {\r\n\t\t\t$month = '8';\r\n\t\t\t$day = $day - 212;\r\n\t\t}\r\n\t\telseif ($day < 274) {\r\n\t\t\t$month = '9';\r\n\t\t\t$day = $day - 243;\r\n\t\t}\r\n\t\telseif ($day < 305) {\r\n\t\t\t$month = '10';\r\n\t\t\t$day = $day - 273;\r\n\t\t}\r\n\t\telseif ($day < 335) {\r\n\t\t\t$month = '11';\r\n\t\t\t$day = $day - 304;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$month = '12';\r\n\t\t\t$day = $day - 334;\r\n\t\t}\r\n\t\t//$date = date_create_from_format(\"M j Y\", \"$month $day $y\");\r\n $date = new DateTime();\r\n $date->setDate($y, $month, $day); \r\n \r\n\t\treturn date_format($date, \"Y-m-d\");\r\n\t}", "title": "" }, { "docid": "ba9b81cfa250af74fd95f98dec392d9a", "score": "0.5493724", "text": "public function february($end, $days, $checkYear)\n {\n if ($end[1] == 3 && $checkYear[0] % 4 == 0) {\n $days++;\n }\n return $days;\n }", "title": "" }, { "docid": "604a283c305fb22b81ea90a5ac80e3b5", "score": "0.5477886", "text": "function us_bank_holiday($year){\n unset($res);\n\n //new years\n $date = mktime(0,0,0,1,1,$year);\n $org_date = $date;\n if(date('w',$date) == 0){\n $date = mktime(0,0,0,1,2,$year);\n }\n if(date('w',$date) == 6){\n $date = mktime(0,0,0,12,31,$year - 1);\n }\n if($date <> $org_date){\n $res[$date] = \"(observed)\";\n $res[$org_date] = \"New Year's Day\";\n }else{\n $res[$date] = \"New Year's Day\";\n }\n\n //MLK\n $mon = 0;\n $day = 14;\n while ($mon == 0){\n $day ++;\n $date = mktime(0,0,0,1,$day,$year);\n if(date('w',$date) == 1){\n $mon = 1;\n }\n }\n $res[$date] = \"mlk day\";\n\n //President's Day\n $mon = 0;\n $day = 14;\n while ($mon == 0){\n $day ++;\n $date = mktime(0,0,0,2,$day,$year);\n if(date('w',$date) == 1){\n $mon = 1;\n }\n }\n $res[$date] = \"President's day\";\n\n //Memorial Day\n $mon = 0;\n $day = 32;\n while ($mon == 0){\n $day --;\n $date = mktime(0,0,0,5,$day,$year);\n if(date('w',$date) == 1){\n $mon = 1;\n }\n }\n $res[$date] = \"Memorial day\";\n\n //Independence Day\n $date = mktime(0,0,0,7,4,$year);\n $org_date = $date;\n if(date('w',$date) == 0){\n $date = mktime(0,0,0,7,5,$year);\n }\n if(date('w',$date) == 6){\n $date = mktime(0,0,0,7,3,$year);\n }\n if($date <> $org_date){\n $res[$date] = \"(observed)\";\n $res[$org_date] = \"Independence Day\";\n }else{\n $res[$date] = \"Independence Day\";\n }\n\n //Labor Day\n $mon = 0;\n $day = 0;\n while ($mon == 0){\n $day ++;\n $date = mktime(0,0,0,9,$day,$year);\n if(date('w',$date) == 1){\n $mon = 1;\n }\n }\n $res[$date] = \"Labor day\";\n\n //Columbus Day\n $mon = 0;\n $day = 7;\n while ($mon == 0){\n $day ++;\n $date = mktime(0,0,0,10,$day,$year);\n if(date('w',$date) == 1){\n $mon = 1;\n }\n }\n $res[$date] = \"Columbus day\";\n\n //Veteran's Day\n $date = mktime(0,0,0,11,11,$year);\n $org_date = $date;\n if(date('w',$date) == 0){\n $date = mktime(0,0,0,11,12,$year);\n }\n if(date('w',$date) == 6){\n $date = mktime(0,0,0,11,10,$year);\n }\n if($date <> $org_date){\n $res[$date] = \"(observed)\";\n $res[$org_date] = \"Veteran's Day\";\n }else{\n $res[$date] = \"Veteran's Day\";\n }\n\n //Thanksgiving Day\n $mon = 0;\n $day = 21;\n while ($mon == 0){\n $day ++;\n $date = mktime(0,0,0,11,$day,$year);\n if(date('w',$date) == 4){\n $mon = 1;\n }\n }\n $res[$date] = \"Thanksgiving day\";\n\n //Christmas Day\n $date = mktime(0,0,0,12,25,$year);\n $org_date = $date;\n if(date('w',$date) == 0){\n $date = mktime(0,0,0,12,26,$year);\n }\n if(date('w',$date) == 6){\n $date = mktime(0,0,0,12,24,$year);\n }\n $res[$date] = \"Christmas\";\n if($date <> $org_date){\n $res[$date] = \"(observed)\";\n $res[$org_date] = \"Christmas Day\";\n }else{\n $res[$date] = \"Christmas Day\";\n }\n return $res;\n}", "title": "" }, { "docid": "38f25868b9dbb3c6179df31591113a2f", "score": "0.5469021", "text": "function ercore_admin_view_start_end_dates() {\n $ercore_date = variable_get('ercore_start_date');\n $argument_date_format = 'Y-m';\n $default = date_create(implode('/', $ercore_date));\n $default_date['start'] = date_format($default, $argument_date_format);\n $default_date['end'] = date($argument_date_format, strtotime('+1 year'));\n return $default_date;\n}", "title": "" }, { "docid": "e068800366cab8531ce194890eacdc1f", "score": "0.54668623", "text": "private function _resolveLastDayOfMonth($year, $month) {\n $expression = $this->getExpression();\n $isAllDaysOfWeek = $expression->getDayOfWeek()->isFullRange();\n $isAllDaysOfMonth = $expression->getDay()->isFullRange();\n $day = null;\n\n $tmp = strtotime($year.'-'.$month.'-'.date('t', strtotime($year.'-'.$month))); // get last day\n if ($isAllDaysOfWeek === false && $isAllDaysOfMonth === false) {\n while(true) {\n if (in_array(date('w', $tmp), $expression->getDayOfWeek()->parse())) {\n $day = date('d', $tmp);\n break;\n }\n\n if (date('d', $tmp) == $expression->getDay()->getLast()) {\n $day = date('d', $tmp);\n }\n\n $tmp = strtotime(date('Y-m-d', $tmp).' -1day');\n }\n } elseif ($isAllDaysOfMonth === true && $isAllDaysOfWeek === false) {\n while(true) {\n if (in_array(date('w', $tmp), $expression->getDayOfWeek()->parse())) {\n $day = date('d', $tmp);\n break;\n }\n\n $tmp = strtotime(date('Y-m-d', $tmp).' -1day');\n }\n } elseif ($isAllDaysOfWeek === true) {\n foreach (array_reverse($expression->getDay()->parse()) as $item) {\n if ($item <= date('d', $tmp)) {\n $day = $item;\n break;\n }\n }\n }\n\n return str_pad($day, 2, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "2c65712fef450debb5aedf3bfa629139", "score": "0.54651684", "text": "function get_last_date_this_year() {\n return $this->mdate($this->dateFormat, mktime(24, 0, 0, 1, -1, $this->mdate(\"Y\")+1));\n }", "title": "" }, { "docid": "65169b2e6af1010f1445f0253264022f", "score": "0.5460688", "text": "function genDate(){\n\t\techo \"<option value=00>- เลือกปี -</option>\";\n\t\t$year = 2542; \n\t\t$current_year = date(\"Y\",strtotime(\"now\"))+543;\n\t\t$count_year = $current_year;\n \tfor ($count_year;$count_year>=$year;$count_year--){\n\t\t\t\t\tif($count_year == $current_year){\n\t\t\t\t\t\techo '<option value=\"'.substr($count_year,2,2).'\" selected> '.$count_year.'</option>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<option value=\"'.substr($count_year,2,2).'\"> '.$count_year.'</option>';\n\t\t\t\t\t}\n\t\t\t }\n\t\t}", "title": "" }, { "docid": "a0cd2103ee7e42fa9fcbf1fee6d433aa", "score": "0.54556614", "text": "function get_tharu_date($yy, $mm, $dd)\n{\n $cal = new Nepali_Calendar();\n $tharu_date = $cal->eng_to_nep($yy, $mm, $dd);\n $tharu_date = dtn_convert_to_tharu($tharu_date);\n\n return $tharu_date;\n}", "title": "" }, { "docid": "35c0f4cf330ab526cf7ac961890678d3", "score": "0.5453465", "text": "private function getEndRange () {\n return date('Y-m-d', mktime(0, 0, 0, date('m')+2, date('d'), date('Y')));\n }", "title": "" }, { "docid": "c7ae82f230e586d5ac8e904105d92768", "score": "0.5444002", "text": "function system_get_begin_year(){\n\t$today = getdate();\n\tif($today['mon']>BEGINYEAR_MONTH){\n\t\t$year = $today['year'];\n\t}else{\n\t\tif($today['mon']<BEGINYEAR_MONTH){\n\t\t\t$year = $today['year']-1;\n\t\t}else{\n\t\t\tif($today['mday']>BEGINYEAR_DAY){\n\t\t\t\t$year = $today['year'];\n\t\t\t}else{\n\t\t\t\t$year = $today['year']-1;\n\t\t\t}\n\t\t}\n\t}\n\treturn $year;\n}", "title": "" }, { "docid": "f647f23714354a6476bd3b478124c4d1", "score": "0.5442748", "text": "protected function daysYear($month, $day) {\n $days = 0;\n for ($i = 1; $i < $month; $i ++) {\n $days += static::$daysMonthJalali[$i];\n }\n return ($days + $day);\n }", "title": "" }, { "docid": "602cfde8ab7c2637ccd7a627e3f30667", "score": "0.5431646", "text": "function calendar (int $month_of_year, int $year) {\n\t\t\n\t\t$day_of_week = $this->numberDayOfWeek(); // name of week\n\n\t\t$this->day_of_month = date ('j', mktime (0,0,0,$month_of_year,1,$year)); //first day of month \n\t\t\n\t\t$current_month = array();\n\t\t$arr = array();\n\t\t\n\t\t// add.array where keys are day of week and values - days in month\n\t\tfor ($i=0; $i<date ('t', mktime (0,0,0,$month_of_year,1,$year)); $i++) {\n\t\t\tfor ($j=0; $j<count($day_of_week); $j++) {\n\t\t\t\tif ($this->day_of_month <= date ('t', mktime (0,0,0,$month_of_year,1,$year))) {\n\t\t\t\t\t $current_month[$j][$i] = $this->day_of_month ++;\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\n\t\tswitch (date ('w', mktime (0,0,0,$month_of_year,1,$year))) {\n\t\t\t case \"1\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t$arr[$day_of_week[$i]] = $current_month[$i];\n\t\t\t\t\t\t}\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"2\": {\n\t\t\t\t\t\tfor ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i==6) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[0]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+1]] = $current_month[$i];\n\t\t\t\t\t\t}\n\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"3\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i>=5) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[$i-5]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+2]] = $current_month[$i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"4\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i>=4) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[$i-4]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+3]] = $current_month[$i];\n\t\t\t\t\t\t}\n\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"5\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i>=3) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[$i-3]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+4]] = $current_month[$i];\n\t\t\t\t\t\t}\n\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"6\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i>=2) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[$i-2]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+5]] = $current_month[$i];\n\t\t\t\t\t\t}\n\t\t\t break;\n\t\t\t }\n\t\t\t case \"0\": {\n\t\t\t\t for ($i=0; $i<count($day_of_week); $i++) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i>=1) {\n\t\t\t\t\t\t\t\t$arr[$day_of_week[$i-1]] = $current_month[$i];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $arr[$day_of_week[$i+6]] = $current_month[$i];\n\t\t\t\t\t\t}\n\t\t\t break;\n\t\t\t }\n\t\t\t \n\t\t\t default: break;\n\t\t\n\t }\n\t\t\n\t\t$k = key($arr);\n\n\t\tfor ($i=1; $i<count($arr); $i++) {\n\t\t\tif ($i < $k) {\n\t\t\t\tarray_unshift($arr[$i], 0);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tksort($arr);\n\t\t\n\t\treturn $arr;\n\t\t\n\t}", "title": "" }, { "docid": "fc53f16e09fcdd4d88a775fbe35d7c74", "score": "0.5430111", "text": "public function getDayCalendar($month,$year){\n\t\t\n\t\t$thismonth = $month.$year;\n\t\t$date \t= date('Y-m-d',strtotime('first day of'.$thismonth));\n\t\t$last_date = date('Y-m-d',strtotime('last day of'.$thismonth));\n\t\t\n\t\t$monthArr = array();\n\t\t$i=0;\n\t\twhile (strtotime($date) <= strtotime($last_date)) {\n\t\t\t$monthArr[$i]['date'] = $date;\n\t\t\t$date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($date)));\n\t\t\t$day = date('l',strtotime($date));\n\t\t\t$monthArr[$i]['day'] = $day;\n\t\t\tif ($day == \"Sunday\") {\n\t\t\t\t$monthArr[$i]['daytype'] = 'H';\n\t\t\t} else {\n\t\t\t\t$monthArr[$i]['daytype'] = 'W';\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $monthArr;\n\t}", "title": "" }, { "docid": "e057f0f076f7105b2583dca00312e731", "score": "0.5428569", "text": "function get_yearwisegraph($courseid, $startdt, $enddt, $courseloc){\n global $DB;\n //here getting enroll course data.\n $enrollsql='';\n $enrollsql.=\"SELECT cc.id,cc.timeenrolled FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timeenrolled IS NOT NULL\";\n if($courseid > 1){\n $enrollsql.=\" AND cc.course = '$courseid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $enrollsql.=\" AND cc.timeenrolled BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($courseloc)){\n $enrollsql.=\" AND u.city = '$courseloc'\"; \n }\n $enrolldates=$DB->get_records_sql($enrollsql);\n $convdate=[];\n if(!empty($enrolldates)){\n foreach ($enrolldates as $enrolldate) { \n if(!empty($enrolldate->timeenrolled)){\n $convdate[]=date('Y', $enrolldate->timeenrolled);\n }\n }\n }\n $userenrolconvyear = array_count_values($convdate);\n\n//getting completion dates.\n $sql='';\n $sql.=\"SELECT cc.id,cc.timecompleted FROM {course_completions} cc\n INNER JOIN {user} u ON cc.userid = u.id WHERE cc.timecompleted IS NOT NULL\";\n if($courseid > 1){\n $sql.=\" AND cc.course = '$courseid' \"; \n }\n\n if(!empty($startdt) && !empty($enddt)){\n $sql.=\" AND cc.timecompleted BETWEEN \".$startdt.\" AND \".$enddt.\" \"; \n }\n\n if(!empty($courseloc)){\n $sql.=\" AND u.city = '$courseloc'\"; \n }\n $completiondata=$DB->get_records_sql($sql);\n $cmpletiondate=[];\n if(!empty($completiondata)){\n foreach ($completiondata as $compledata) {\n if(!empty($compledata)){\n $cmpletiondate[]=date('Y',$compledata->timecompleted);\n } \n }\n }\n $usercompleconvyear = array_count_values($cmpletiondate);\n $returnarray = array('enrolldata'=>$userenrolconvyear,\n 'completiondata'=>$usercompleconvyear);\n return $returnarray;\n}", "title": "" }, { "docid": "c26294dae865c37b723924f3b46e21f1", "score": "0.5425817", "text": "public function getSubsribedInMonth($month, $year)\n {\n\n }", "title": "" }, { "docid": "73f2d43af4a39adaebfc3c6aaa88aa0f", "score": "0.5417757", "text": "function hitung_umur($tanggal_lahir) {\r\n list($year,$month,$day) = explode(\"-\",$tanggal_lahir);\r\n $year_diff = date(\"Y\") - $year;\r\n $month_diff = date(\"m\") - $month;\r\n $day_diff = date(\"d\") - $day;\r\n if ($month_diff < 0) $year_diff--;\r\n elseif (($month_diff==0) && ($day_diff < 0)) $year_diff--;\r\n return $year_diff;\r\n}", "title": "" }, { "docid": "9013d650df297722c4b45ba4e781bb97", "score": "0.5416681", "text": "function getLastDate($year, $month, $day, $dateSpan, $pattern){\n\tglobal $daysInSingleMonth;\n\n\tif($day - $dateSpan > 0){\n\t\treturn getDateAccordingtoPattern($year, $month, $day - $dateSpan, $pattern);\n\t} elseif (($month - 1) > 0) {\n\t\tif(($month - 1) == 2){\n\t\t\treturn getDateAccordingtoPattern($year, $month - 1, (($year%4==0)?29:28) + $day -$dateSpan, $pattern);\n\t\t} else {\n\t\t\treturn getDateAccordingtoPattern($year, $month - 1, $daysInSingleMonth[$month - 2] + $day - $dateSpan, $pattern);\n\t\t}\n\t} else{\n\t\treturn getDateAccordingtoPattern($year - 1, 12, $day + 31 - $dateSpan, $pattern); // December always has 31 days\n\t}\n}", "title": "" }, { "docid": "13accebd6ff9985b7e88fe699209a364", "score": "0.54162115", "text": "function get_day_combo($selectedday, $month, $year, $required)\n{\n $option_string = '';\n // get last day of the month\n if (trim($month) != '' && trim($year) != '') {\n $lastday = date('d', strtotime('last day of ' . $month . ', ' . $year));\n } else {\n $lastday = 31;\n }\n\n // Returning data for a drop down\n if ($required == 'combo') {\n if (trim($selectedday) == '') {\n $option_string .= \"<option value='' selected>- Day -</option>\";\n }\n\n for ($i = 1; $i < ($lastday + 1); $i++) {\n $option_string .= \"<option value='\" . $i . \"'\";\n if ($selectedday == $i) {\n $option_string .= \" selected\";\n }\n\n $option_string .= \">\" . $i . \"</option>\";\n }\n } else if ($required == 'lastday') {\n $option_string = $lastday;\n }\n\n return $option_string;\n}", "title": "" }, { "docid": "4bb1de5d5aec1329686915a039498039", "score": "0.541574", "text": "protected function computeDayOfYear()\n {\n $this->dayOfYear = ($this->month - 1) * 30 + $this->day;\n }", "title": "" }, { "docid": "1e7d9e22c9602d9bc28393f4d28644f4", "score": "0.5406949", "text": "function toAcademicYear($inMySQLDate){\n \n // $thisDate = strtotime($inMySQLDate);\n \n $dateArray= getDateArray($inMySQLDate);\n $calendarYear = $dateArray['Year'];\n $calendarMonth = $dateArray['Month'];\n $calendarDay = $dateArray['Day'];\n $academicYearPart1 = 'notSet';\n $academicYearPart2 = 'alsoNotSet';\n \n $academicYearPart1 = $calendarYear;\n $academicYearPart2 = strval(intval($calendarYear)-1);\n \n \n if ( (intval($calendarMonth) >= AY_END_MONTH) && ( intval($calendarDay)>=AY_END_DAY ) )\n {\n $academicYearPart1 = $calendarYear;\n $academicYearPart2 = strval(intval($calendarYear)+1);\n }\n\n \n \n $academicYear = 'AY '.$academicYearPart1.'-'.$academicYearPart2;\n \n return $academicYear;\n \n \n \n}", "title": "" }, { "docid": "f9e3e70d6436976bb85918a7b716c43f", "score": "0.5398094", "text": "function copyrightYear(){\nreturn date('Y');\n}", "title": "" }, { "docid": "98765339c94096241acc7aed7bd7d1fd", "score": "0.5397834", "text": "function get_days($end_date){\n\t$counter = 0;\n $no_included = ['Mon','Tue','Wed','Thu','Fri'];\n $end_date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($end_date)));\n //echo date('N',strtotime('2019-03-31'));\n while($counter == 0){\n if(date(\"N\",strtotime($end_date)) <= 5) {\n \t//echo date(\"N\",strtotime($start_date));\n $counter++;\n }else\n $end_date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($end_date)));\n\n }\n $month = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August','September', 'October', 'November', 'December'];\n $t = (int)(trim(explode('-',$end_date)[1]));\n $end_month = $month[$t-1];\n $end_year = explode('-',$end_date)[0];\n $end_day = explode('-',$end_date)[2];\n $date = ''.$end_month.' '.$end_day.', '.$end_year.'.';\n return $date;\n}", "title": "" }, { "docid": "56f6922ddb4a798cc82d08bf63b9df47", "score": "0.5377106", "text": "function get_total_day_in_month($month, $year)\n {\n return date(\"d\",mktime(0,0,0,$month,0,$year));\n //return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\n }", "title": "" }, { "docid": "f8f9375e751e393300f88f8ffeb37f4f", "score": "0.536736", "text": "function get_day_by_index_this_year($month_index)\n\t{\n\t\t$newdate = clone $this;\n\t\t$newdate->setDate($this->year, $month_index+1, 1);\n $newdate->setDate($newdate->year, $newdate->month, $newdate->days_in_month);\n\t\t$newdate->setTime(0, 0);\n\t\treturn $newdate;\n\t}", "title": "" }, { "docid": "86a4f77e8ea40dc4cf2b780d6631a45d", "score": "0.53669673", "text": "function get_first_date_last_year($y=1) {\n return $this->mdate($this->dateFormat, mktime(0, 0, 0, 1, 1, $this->mdate(\"Y\")-$y));\n }", "title": "" }, { "docid": "0c23e83154249468d86f00a88cab40e6", "score": "0.5360721", "text": "private function getYear() {\r\n\t\t$year = array ();\r\n\t\t\r\n\t\t$year [] = 'null';\r\n\t\t$i = date ( \"Y\", strtotime ( $this->oldDate ) );\r\n\t\tfor($i; $i <= date ( \"o\" ); $i ++) {\r\n\t\t\t$year [] = $i;\r\n\t\t}\r\n\t\treturn $year;\r\n\t}", "title": "" }, { "docid": "e469c882ad779048c8d79b5290139a8f", "score": "0.5360448", "text": "private function _daysInMonth($month=null,$year=null){\n \n if(null==($year))\n $year = date(\"Y\",time()); \n \n if(null==($month))\n $month = date(\"m\",time());\n \n return date('t',strtotime($year.'-'.$month.'-01'));\n }", "title": "" }, { "docid": "e469c882ad779048c8d79b5290139a8f", "score": "0.5360448", "text": "private function _daysInMonth($month=null,$year=null){\n \n if(null==($year))\n $year = date(\"Y\",time()); \n \n if(null==($month))\n $month = date(\"m\",time());\n \n return date('t',strtotime($year.'-'.$month.'-01'));\n }", "title": "" }, { "docid": "bc1b8f87df4fc928b807d6d9ca1cc7b1", "score": "0.5348209", "text": "function bad_days_in_month($month, $year){\n // calculate number of days in a month\n return ($month==2) ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) \n : ( ($month - 1) % 7 % 2 ? 30 : 31 );\n }", "title": "" }, { "docid": "e07da1906c33659b9e3992136e542f43", "score": "0.53453207", "text": "public function set_period($y, $m) {\n // 3. fix wrong values \n if ( ($y < $this-year) || ($m < 1) || ($m > 12)) {\n $this->year= $this->this_year;\n $this->month= $this->this_month;\n } else {\n $this->year = $y;\n $this->month = $m;\n }\n // Get the previous period\n if ($this->month == 1) {\n $this->prev_month = 12;\n $this->prev_year = $this->year - 1;\n } else {\n $this->prev_month = $this->month - 1;\n $this->prev_year = $this->year;\n }\n // Get the next period\n if ($this->month == 12) {\n $this->next_month = 1;\n $this->next_year = $this->year + 1;\n } else {\n $this->next_month = $this->month + 1;\n $this->next_year = $this->year;\n }\n $this->month_start = strtotime($this->year.\"-\".$this->month.\"-01 00:00:00\"); \n $this->days_in_month = strftime('%d', strtotime($this->next_year.\"-\".$this->next_month.\"-01 00:00:00\")-1);\n }", "title": "" }, { "docid": "9ad006f920193dc95ef799ab48062877", "score": "0.53342026", "text": "function getExtremeDay($month, $year){\r\n\t\r\n\tswitch($month){\r\n\t\t\r\n\t\tcase 1: case 3: case 5: case 7:\r\n\t\tcase 8: case 10: case 12:{\r\n\t\t\t\r\n\t\t\treturn 31;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tcase 2: {\r\n\t\t\t\r\n\t\t\tif (isLeapYear($year) === true)\r\n\t\t\t\treturn 29;\r\n\t\t\telse\r\n\t\t\t\treturn 28;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tcase 4: case 6:\r\n\t\tcase 9: case 11: {\r\n\t\t\treturn 30;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tdefault: return false;\r\n\t}\t\r\n}", "title": "" }, { "docid": "96729b35e79f8bb310616d38bbddc154", "score": "0.5330232", "text": "protected function applyDayMonthYear($expr, $min_max)\n\t{\n\t\t// three values with a middle slash\n\t\tif (substr_count($expr, SL) == 2) {\n\t\t\tlist($one, $two, $three) = explode(SL, $expr);\n\t\t\tif (Loc::date()->format == 'd/m/Y') {\n\t\t\t\t// day/month/year\n\t\t\t\t$day = $one;\n\t\t\t\t$month = $two;\n\t\t\t\t$year = $three;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// month/day/year\n\t\t\t\t$day = $two;\n\t\t\t\t$month = $one;\n\t\t\t\t$year = $three;\n\t\t\t}\n\t\t\tif (!$this->computeDay($day)) {\n\t\t\t\t// bad expression ?\n\t\t\t\tthrow new Data_List_Exception($expr, Loc::tr('Error in day expression'));\n\t\t\t}\n\t\t\tif (!$this->computeMonth($month)) {\n\t\t\t\t// bad expression ?\n\t\t\t\tthrow new Data_List_Exception($expr, Loc::tr('Error in month expression'));\n\t\t\t}\n\t\t\tif (!$this->computeYear($year)) {\n\t\t\t\t// bad expression ?\n\t\t\t\tthrow new Data_List_Exception($expr, Loc::tr('Error in year expression'));\n\t\t\t}\n\t\t\treturn $this->buildDayMonthYear($day, $month, $year, $min_max, $expr);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e18c087a344cd1637a1cbf7888763d2d", "score": "0.5329502", "text": "function currentFinancialYear($date = \"\") {\r\n if (!empty($date)) {\r\n $month = date('m', strtotime($date));\r\n $year = date('Y', strtotime($date));\r\n } else {\r\n $month = date('m');\r\n $year = date('Y');\r\n $markerdate = date('d');\r\n }\r\n\r\n ($month > 3) ? ( ($month == 4) ? ($markerdate > 5 ? $check = 0 : $check = 1) : $check = 0 ) : $check = 1;\r\n\r\n if ($check) {\r\n // if ($month <= 4 && $markerdate <= 05) {\r\n $year = ($year - 1) . ' / ' . $year;\r\n } else {\r\n $year = $year . ' / ' . ($year + 1);\r\n }\r\n return $year;\r\n }", "title": "" }, { "docid": "990395c93672a8ca94618cb3c1eae583", "score": "0.5326261", "text": "public function daysInYear() {\n\t\treturn 365 + ((int) parent::format('L') ? 1 : 0);\n\t}", "title": "" }, { "docid": "4355abb80223b99a162a369c3c271888", "score": "0.5325134", "text": "function salaryEntryCalendar( $month, $year){\n\n date_default_timezone_set('America/Los_Angeles');\n\n if(request()->route()->parameters != null) {\n $month = request()->route()->parameters['month'];\n $year = request()->route()->parameters['year'];\n }\n\n if (empty($month)) {\n $month = date('m');\n\n }\n if (empty($year)) {\n $year = date('Y');\n\n }\n //number of days integer\n $num_days=cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\n //epoch seconds of first day of month\n $first_day_month = mktime(0,0,0, $month, 1, $year);\n\n //epoch seconds converted to first day of month\n $first=strftime('%w', $first_day_month);\n $wordy_month = strftime(\"%B\", $first_day_month);\n $prev_month = $month -1;\n $prev_year= $year;\n if ($prev_month <= 0)\n { $prev_month=12;\n $prev_year = $year-1;\n }\n $previous_month_link =\"<a class='btn btn-secondary' href='/salary/calendar/$prev_month/$prev_year'><i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> Previous Month</a>\";\n $next_month = $month + 1;\n $next_year= $year;\n if ($next_month >= 13)\n { $next_month=1;\n $next_year = $year+1;\n }\n $next_month =\"<a class='btn btn-secondary' href='/salary/calendar/$next_month/$next_year'>Next Month <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a>\";\n\n\n $days = array('Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat');\n\n $cal = '';\n $cal .= '<div id=\"calendar\"><br/><br/><input name=\"hidemonth\" type=\"hidden\" value=\"'.$month.'\"><input name=\"hideyear\" type=\"hidden\" value=\"'.$year.'\">\n <h1 class=\"text-center verlag-bold timesheet-portal-header\">'.$wordy_month .'&nbsp;'. $year. '</h1><br/><div id=\"calender_nav\">'\n .$previous_month_link . str_repeat(\"&nbsp;\", 50) . $next_month. '</div> <br/> <table class=\"table verlag-bold\"><tr>';\n foreach($days as $days) { $cal.= '<th>'.$days.'</th>';\n }\n $cal.= '<tr>';\n $day=0;\n\n //second row - first week of the month\n while ($day < $first)\n {\n $cal.= '<td>'.'&nbsp;'.'</td>';\n $day++;\n }\n\n // Print the days of the week starting with 1\n $day=1;\n while ($day <= 7- $first) {\n $cal.= '<td>'. $day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n //Loop to do the in between rows\n $day= 7 - $first + 1;\n for ($count = 0 ; $count < 7; $count++)\n { $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n $day = 7 - $first + 1 + 7;\n for ($count = 0 ; $count < 7; $count++)\n {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n $day= 7 - $first + 1 + 14;\n for ($count = 0 ; $count < 7; $count++)\n {\n $cal.= '<td>'.$day.' <select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n // Final loop to do the last row\n $cal.= '</tr><tr>';\n\n $day = 7 - $first + 1 + 21;\n\n while ($day <= $num_days){\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n if ($day >=31 && $first >= 5){\n $cal.= \"</tr>\";\n while ($day <= $num_days) {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n }\n if ($day >= 30 && $first >=6) {\n $cal.= \"</tr>\";\n while ($day <= $num_days) {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select> </td>';\n $day++;\n }\n }\n }\n $cal.= '</tr></table>';\n $cal.= '<br/>';\n\n echo $cal;\n\n}", "title": "" }, { "docid": "6a30d0e1d1f42070efd161590806e241", "score": "0.5309778", "text": "function d_builddate($day,$month,$year)\r\n {\r\n $day = $day + 0; $month = $month + 0;\r\n switch ($month)\r\n {\r\n case 2:\r\n if ($year%4 == 0) { $maxday = 29; }\r\n else { $maxday = 28; }\r\n break;\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n $maxday = 30;\r\n break;\r\n default:\r\n $maxday = 31;\r\n break;\r\n }\r\n if ($day > $maxday) { $day = $maxday; }\r\n if ($day < 10) { $day = '0' . $day; }\r\n if ($month < 10) { $month = '0' . $month; }\r\n $date = $year . '-' . $month . '-' . $day;\r\n return $date;\r\n }", "title": "" }, { "docid": "edde938069f8c12d4a07dd52c9432342", "score": "0.5307927", "text": "function ercore_this_date_range() {\n $reporting_month = variable_get('ercore_reporting_month');\n $start_date = variable_get('ercore_start_date');\n $start_date = new DateTime($start_date['year'] . '-' . $start_date['month'] . '-' . $start_date['day'] . ' 00:00:00');\n $today_month = date('m');\n if ($today_month < $reporting_month) {\n $current_start = new DateTime((date('Y') - 1) . '-' . $reporting_month . '-01 00:00:00');\n }\n else {\n $current_start = new DateTime(date('Y') . '-' . $reporting_month . '-01 00:00:00');\n }\n if ($start_date > $current_start) {\n $current_start = $start_date;\n }\n return $current_start;\n}", "title": "" }, { "docid": "0ef3f2c0ffd7aa8f02a81ecca784b214", "score": "0.53039926", "text": "function isSameMonth(){\r\n \r\n $ret_bool = false;\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n \r\n if($this->isSameYear()){\r\n $ret_bool = ($start_map['mon'] == $stop_map['mon']);\r\n }//if\r\n \r\n if(!$ret_bool){\r\n if(($start_map['mday'] === 1) && $this->isMidnight($stop_map)){\r\n \r\n $start_month = $start_map['mon'];\r\n $start_year = $start_map['year'];\r\n \r\n list($start_month,$start_year) = parse_date_get::nextMonth($start_map['mon'],$start_map['year']); \r\n $ret_bool = ($start_month == $stop_map['mon']) && ($start_year == $stop_map['year']);\r\n \r\n }//if\r\n }//if\r\n \r\n return $ret_bool;\r\n \r\n }", "title": "" }, { "docid": "9152df80ba8c55d26524f57207869f9b", "score": "0.5303094", "text": "public function endMonth()\n {\n return $this->setDateTime($this->year, $this->month, $this->daysInMonth, 23, 59, 59);\n }", "title": "" }, { "docid": "2840b2ac2baf7e735ce7f785030a9d16", "score": "0.52976465", "text": "public static function create($start, $end) {\n $oneDay = new DateInterval('P1D');\n\n $currentDate = clone $start;\n $prevMonth = $currentDate->format(\"M\");\n $prevYear = $currentDate->format(\"Y\");\n\n $years = array();\n\n do {\n $currentMonth = $currentDate->format(\"M\");\n $currentYear = $currentDate->format(\"Y\");\n\n if ($currentMonth !== $prevMonth) {\n $years[$prevYear][$prevMonth] = \"((\".implode(\"|\",$years[$prevYear][$prevMonth]).\") $prevMonth)\";\n }\n\n if ($currentYear !== $prevYear) {\n $years[$prevYear] = \"((\".implode(\"|\", $years[$prevYear]).\") $prevYear)\";\n }\n\n // add day to current month array of days\n $day = $currentDate->format(\"d\");\n\n if ($day[0] === \"0\") { // 0 is sometimes omitted\n $day = \"0?\".$day[1];\n }\n\n $years[$currentYear][$currentMonth][] = $day;\n\n $endDiff = $end->diff($currentDate);\n\n $prevMonth = $currentMonth;\n $prevYear = $currentYear;\n $currentDate->add($oneDay);\n\n } while($endDiff->d > 0 || $endDiff->m > 0 || $endDiff->y > 0);\n\n $years[$currentYear][$currentMonth] = \"((\".implode(\"|\",$years[$currentYear][$currentMonth]).\") $currentMonth)\";\n $years[$currentYear] = \"((\".implode(\"|\",$years[$currentYear]).\") $currentYear)\";\n\n return self::DAY_NAMES.implode(\"|\", $years).\".*\";\n }", "title": "" }, { "docid": "9f5532e1ffc039dcf75edb448817034c", "score": "0.52899927", "text": "function vernEndOfMonth($date)\n{\n $yyyy = substr($date, 0, 4);\n $mm = substr($date, 5, 2);\n $dd = substr($date, 8, 2);\n return date(\"Y-m-d H:i:s\", mktime(23, 59, 59, $mm + 1, 0, $yyyy));\n}", "title": "" }, { "docid": "eeef9b3c11a70898ee24db3d247b9845", "score": "0.5287743", "text": "public function testSubYear()\n {\n $this->assertEquals('2011-05-01', $this->date->subYears(2)->toDateString());\n }", "title": "" }, { "docid": "609a3eef247ec36e76765805bd05d33c", "score": "0.5287711", "text": "function GetDaysInMonth($month, $year) \n{\nreturn $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31); \n}", "title": "" }, { "docid": "11f88c99dcfdb7e486b6146f0c4b1fe8", "score": "0.52854735", "text": "public function year()\n {\n\n $this->config = include 'CalendarSettings/' . ucfirst($this->calendar_type) . '.php';\n\n return $this->config[ 'day_of_year' ]( $this->date_time );\n\n }", "title": "" }, { "docid": "f990caaed80477752e593ffdbfed8200", "score": "0.52765965", "text": "function seasonOfChristmas($info, $endDate)\n {\n $dates = array();\n $startDate = mktime (0,0,0,1,1,$info->getYear());\n \n $cal = new calendary($startDate);\n\n $sundays = 0;\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n \n $key = 'maryMotherOfGod';\n $cal->setLiteralDay('maryMotherOfGod');\n $cal->setRank('SOLEMNITY');\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n\n \n if ($info->isEpiphanyOnSix())\n $endDate = mktime(0,0,0,1,6,$info->getYear());\n else\n {\n $endDate = strtotime ('+'.(7-$cal->getDayOfWeek()).' days', $startDate);\n }\n \n\n $startDate = strtotime ('+1 day', $startDate);\n\n while ( $startDate < $endDate)\n {\n \n $cal = new Calendary($startDate);\n \n if ($cal->getDayOfWeek() == 0)\n {\n $key = 'secondSundayOfChristmas';\n $cal->setLiteralDay('Second Sunday of Christmas');\n $cal->setRank('SUNDAY');\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n }\n else \n {\n $key = $cal->getLiteralDow().'BeforeEpiphany';\n $cal->setLiteralDay($cal->getLiteralDow().' before Epiphany');\n $cal->setRank('WEEKDAY_OF_EPIPHANY');\n $cal->setLiturgicalWeek($sundays+1);\n }\n\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n $startDate = strtotime ('+1 day', $startDate);\n }\n\n $cal = new calendary($startDate);\n \n $key = 'epiphanyOfOurLord';\n $cal->setLiteralDay('Epiphany of Our Lord');\n $cal->setRank('SOLEMNITY');\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n if ($cal->getDay() == 7 || $cal->getDay() == 8)\n {\n $endDate = strtotime ('+1 days', $startDate);\n }\n else\n {\n $endDate = strtotime ('+'.(7-$cal->getDayOfWeek()).' days', $startDate);\n }\n \n $startDate = strtotime ('+1 day', $startDate);\n\n while ( $startDate < $endDate)\n {\n \n $cal = new Calendary($startDate);\n \n $key = $cal->getLiteralDow().'AfterEpiphany';\n $cal->setLiteralDay($cal->getLiteralDow().' after Epiphany');\n $cal->setRank('WEEKDAY_OF_EPIPHANY');\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n $startDate = strtotime ('+1 day', $startDate);\n } \n\n $cal = new calendary($startDate);\n \n $key = 'baptismOfTheLord';\n $cal->setLiteralDay('Baptism of the Lord');\n $cal->setRank('SOLEMNITY');\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n return ($dates);\n \n }", "title": "" }, { "docid": "366430be24243839a7e747db31615050", "score": "0.5266389", "text": "public function qry_all_date_off($year)\n {\n //Kiem tra da khoi tao du lieu chua?\n if ($this->db->getOne('Select count(*) From t_cores_calendar Where C_YEAR=?', array($year)) > 0)\n {\n if (DATABASE_TYPE == 'MSSQL')\n {\n $stmt = 'Select C_DATE as C_DATE_YYMMDD\n , Convert(VarChar(10), C_DATE, 103) C_DATE_DDMMYY\n From t_cores_calendar\n Where C_YEAR=? And C_OFF=1\n Order By C_DATE Asc';\n }\n elseif (DATABASE_TYPE == 'MYSQL')\n {\n $stmt = \"Select C_DATE as C_DATE_YYMMDD\n , DATE_FORMAT(C_DATE,'%d-%m-%Y') AS C_DATE_DDMMYY\n From t_cores_calendar\n Where C_YEAR=? And C_OFF=1\n Order By C_DATE Asc\";\n }\n\n $params = array($year);\n return $this->db->getAssoc($stmt, $params);\n }\n else\n {\n return $this->_qry_all_date_of_year($year, 0);\n }\n }", "title": "" }, { "docid": "d99bdf3517cc59c207778e36739f36a8", "score": "0.52660185", "text": "public function days($month, $year = false);", "title": "" }, { "docid": "870bcfcc56cd07dd0497b7a0346518a3", "score": "0.5265122", "text": "function fecha_final($fechor){\n\t$fechor = cambia_fechaHora($fechor);\n $dia = intval(substr($fechor,0,2));\n\t$mes = intval(substr($fechor,3,2));\n\t$anio = intval(substr($fechor,6,4));\n\t$hora = intval(substr($fechor,11,2));\n\t$min = intval(substr($fechor,14,2));\n\t///AÑO///\n\t$year = date(\"Y\");\n\tif($year > $anio){\n\t\t$calc = $year - $anio;\n\t\t$Y = \"y-$calc\";\n\t}else if($year < $anio){\n\t\t$calc = $anio - $year;\n\t\t$Y = \"y+$calc\";\n\t}else{\n\t\t$Y = \"y\";\n\t}\n\t///MES///\n\t$month = date(\"m\");\n\tif($month > $mes){\n\t\t$calc = $month - $mes;\n\t\t$M = \"m-$calc\";\n\t}else if($month < $mes){\n\t\t$calc = $mes - $month;\n\t\t$M = \"m+$calc\";\n\t}else{\n\t\t$M = \"m\";\n\t}\n\t///DIA///\n\t$day = date(\"d\");\n\tif($day > $dia){\n\t\t$calc = $day - $dia;\n\t\t$D = \"d-$calc\";\n\t}else if($day < $dia){\n\t\t$calc = $dia - $day;\n\t\t$D = \"d+$calc\";\n\t}else{\n\t\t$D = \"d\";\n\t}\n\t///H ///\n\treturn \"end: new Date($Y, $M, $D, $hora, $min),\";\n}", "title": "" }, { "docid": "a2cb7bf89922dbd794c7e014e07ed6a2", "score": "0.5262255", "text": "static public function ano() {\r\n\t\treturn date ( \"Y\" );\r\n\t}", "title": "" }, { "docid": "9b6b370cd976906780f9e8218f9f79d9", "score": "0.5261956", "text": "function get_last_date_last_year($y=1) {\n return $this->mdate($this->dateFormat, mktime(24, 0, 0, 1, -1, $this->mdate(\"Y\")-($y-1)));\n }", "title": "" }, { "docid": "5236a7ed9a4d5cfb3540262d045ecc3a", "score": "0.526137", "text": "public function get_year() {\n\t\t\t$this_month = intval(date('m'));\n\t\t\t$months = array();\n\t\t\t$start_month = 5; // May - Temporarily changed to August\n\t\t\t$start_year = date('Y');\n\t\t\tif($this_month < $start_month) $start_year = date('Y')-1;\n\t\t\treturn $start_year;\n\t}", "title": "" }, { "docid": "3a23f60db7d5281f6601ed2824ec0fdb", "score": "0.5248304", "text": "public function get_empcode_last_period()\n\t{\n\t\t$period = $this->input->post('filter_period');\n\t\t$year = $this->input->post('filter_year');\n\t\t$start_date = get_from_date_period($period,$year);\n\t\t$end_date = get_to_date_period($period,$year);\n\t\t/*untuk mendapatkan periode bulan sebelumnya*/\n\t\tif ($period == 1) {\n\t\t\t$get_period = get_date_period($period = 12, $year-1); // untuk awal bulan maka di buat khuusus\n\t\t}\n\t\telse{\n\t\t\t$get_period = get_date_period($period, $year);\n\t\t}\n\t\t/*untuk mendapatkan periode bulan sebelumnya*/\n\n\t\t$start_date_model_emp = $get_period->start_date;\n\t\t$end_date_model_emp = $get_period->end_date;\n\n\t\t$start_date_input = date_input($start_date);\n\t\t$end_date_input = date_input($end_date);\n\n\t\t$empcode = $this->emp_attribute->get_empcode_by_period_gang_activity($start_date_model_emp, $end_date_model_emp);\n\t\t/*validasi cek data master romzil*/\n\t\t$cek = $this->cek_master($start_date_input, $end_date_input);\n\t\tif ($cek == 0) {\n\t\t\t/*jika tidak ada data master*/\n\t\t\t$data['inputerror'][] = 'filter_period';\n\t\t\t//$data['inputerror'][] = 'f_empcode';\n\t\t\t$data['error_string'][] = 'Master data not yet inputed, Call IT!!';\n\t\t\t$data['status'] = FALSE;\n\t\t\techo json_encode($data);\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// cek jika data sudah ada\n\t\t\t$cek_current = $this->cek_data_current_period($period, $year);\n\t\t\tif ($cek_current == 0) {\n\t\t\t\t\t/*jika tidak ada data master*/\n\t\t\t\t\tforeach ($empcode as $key) {\n\t\t\t\t\t\t//echo \"insert into \". $key['empcode']. \"where date between\". $start_date_input .\"and \".$end_date_input.\"<br>\";\n\t\t\t\t\t\t$this->emp_attribute->copy_data($key['empcode'], $start_date_input, $end_date_input);\n\t\t\t\t\t\techo json_encode(array(\"status\" => TRUE));\n\t\t\t\t\t}\n\t\t\t\techo json_encode(array(\"status\"=> true));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\t/*jika ada data master*/\n\t\t\t\t$data['inputerror'][] = 'filter_period';\n\t\t\t\t//$data['inputerror'][] = 'f_empcode';\n\t\t\t\t$data['error_string'][] = 'Data Last Month has been inputed.';\n\t\t\t\t$data['status'] = FALSE;\n\t\t\t\techo json_encode($data);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//print_r($empcode);\n\t}", "title": "" }, { "docid": "8993147ccb1d617adf1a365613bc7987", "score": "0.5247932", "text": "function dtlCurrentYear() {\n return date('Y');\n}", "title": "" }, { "docid": "dc6c1a51c456219674ace02421b9b6f1", "score": "0.5242117", "text": "function days_in_month($month, $year) {\r\n return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\r\n }", "title": "" }, { "docid": "fbc9fd26dffba4e739743dfbc808cbee", "score": "0.52411336", "text": "protected function getMonthEnd($month, $year) {\n\t\treturn mktime(0, 0, -1, $month + 1, 1, $year);\n\t}", "title": "" }, { "docid": "52f1c8fc4b1ec62d75dd67eb0c4d1f20", "score": "0.5240849", "text": "function mk_getLastDayofMonth($mon,$year)\n\t{\n\t\tfor ($tday=28; $tday <= 31; $tday++)\n\t\t{\n\t\t\t$tdate = getdate(mktime(0,0,0,$mon,$tday,$year));\n\t\t\tif ($tdate[\"mon\"] != $mon)\n\t\t\t{ break; }\n\t\t}\n\t\t$tday--;\n\t\treturn $tday;\n\t}", "title": "" } ]
df683ae4914c900174fea3cbe6214fa9
setTributeCity() Set the value of [tribute_state] column.
[ { "docid": "27431d9bdb744cac2d64a52510e16baf", "score": "0.6134862", "text": "public function setTributeState($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tribute_state !== $v) {\n\t\t\t$this->tribute_state = $v;\n\t\t\t$this->modifiedColumns[] = DonationPeer::TRIBUTE_STATE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "17b0658fb84d0811b206c96e79ec1d84", "score": "0.6937016", "text": "public function setTributeCity($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tribute_city !== $v) {\n\t\t\t$this->tribute_city = $v;\n\t\t\t$this->modifiedColumns[] = DonationPeer::TRIBUTE_CITY;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bd495408a2a7d8fc18dedbdfcdf15dc5", "score": "0.64079934", "text": "public function setCity(string $city = null);", "title": "" }, { "docid": "9ed09bada991738eea5eda8d0f013125", "score": "0.6391949", "text": "public function setState($city_id, $state)\n {\n\n }", "title": "" }, { "docid": "962c7e42893531edc8471c458b777770", "score": "0.6358067", "text": "public function setCity($city)\r\n {\r\n $this->_city = $city;\r\n }", "title": "" }, { "docid": "02b82aedc929c95896e5bfc28e44b6df", "score": "0.6327315", "text": "public function setCity( string $city )\n\t{\n\t\t$this->city = $city;\n\t}", "title": "" }, { "docid": "187f2b2d15eaf02b165602452b81b4a0", "score": "0.62709224", "text": "public function setCity(?string $value): void {\n $this->getBackingStore()->set('city', $value);\n }", "title": "" }, { "docid": "34891fe502130b5e849f8c00ddec033c", "score": "0.6242104", "text": "public function getTributeCity()\n\t{\n\t\treturn $this->tribute_city;\n\t}", "title": "" }, { "docid": "a835ea297670badef8295c6e7ffe74aa", "score": "0.6164864", "text": "public function setCity($city) {\n\t\t$this->city = $city;\n\t}", "title": "" }, { "docid": "b0af956236d4543f635eb2cebe963f04", "score": "0.6116756", "text": "public function setCityAttribute($value)\n {\n $this->attributes['city'] = sanitizeString($value)[0];\n }", "title": "" }, { "docid": "e99a2a65a7df91f8ae3cc3d0b5b7b5e0", "score": "0.6116393", "text": "public function setCity($city)\n {\n $this->city = $city;\n }", "title": "" }, { "docid": "e99a2a65a7df91f8ae3cc3d0b5b7b5e0", "score": "0.6116393", "text": "public function setCity($city)\n {\n $this->city = $city;\n }", "title": "" }, { "docid": "83e01bd87b53dd0705738999dd922fa3", "score": "0.60545343", "text": "public function setCity($city)\n {\n if ($this->_validation->validateIsString($city)) {\n $this->_city = $city;\n } else {\n throw new PiRatepay_Paypage_Util_ValidationException(110);\n }\n }", "title": "" }, { "docid": "db2c7d2c22e6f72aab427ff6532efb7c", "score": "0.58401906", "text": "public function setCity($value)\n {\n return $this->set(self::city, $value);\n }", "title": "" }, { "docid": "e339e40ed42c4076fb588dc1f1479ab3", "score": "0.58330536", "text": "public function set_city($tmp_city)\n {\n //data type checking and validation happens here\n settype($tmp_city, \"string\");\n \n if(!isset($tmp_city) || $tmp_city=='')\n {\n throw new Exception('City cannot be empty');\n }\n \n $tmp_city = strip_tags($tmp_city);\n \n if(!$this->is_only_letters_and_spaces($tmp_city))\n {\n throw new Exception('Only letters and spaces allowed in city');\n }\n \n $this->city = $tmp_city;\n }", "title": "" }, { "docid": "25448be2357adcd33cff2cc88440d504", "score": "0.5765315", "text": "public function setCityCounty($cityCounty)\r\n {\r\n $this->_cityCounty = $cityCounty;\r\n }", "title": "" }, { "docid": "aaba9ba3824da226393e4363fdcae9c5", "score": "0.5727623", "text": "public function setCity($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->city !== $v) {\n $this->city = $v;\n $this->modifiedColumns[GroupOrderSubCustomerTableMap::CITY] = true;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "5d4a4511b23a56ece63d785882f1ac63", "score": "0.565808", "text": "public function setCity($val)\n {\n $this->_propDict[\"city\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "58412d75086929256594a4db9a9ebbf8", "score": "0.5452862", "text": "public function setCityId(int $id)\n {\n $this->city_id = $id;\n }", "title": "" }, { "docid": "45bdeda37bb1e13d3df05e31e36edc83", "score": "0.54387975", "text": "public function setFiniteState($state){\n $this->state = $state;\n $this->save();\n }", "title": "" }, { "docid": "8bf8da0fe3dbecdd0bce9f04dcce4ccb", "score": "0.54349196", "text": "public function setCountry($city_id, $country)\n {\n\n }", "title": "" }, { "docid": "8c934c4304a7f742b4f9691ba873b0c2", "score": "0.53929263", "text": "public function setCity($city)\n {\n $this->_city = $city;\n return $this;\n }", "title": "" }, { "docid": "f81787eb44c74384c81930af5c6a8652", "score": "0.53683627", "text": "public function updateCity()\n {\n return $this->update($this->cityUrl, 'SxGeoCity');\n }", "title": "" }, { "docid": "cb55aeb887448f3a33d6c2dbc696e3c7", "score": "0.5316148", "text": "public function setCity($city = null)\n {\n // validation for constraint: string\n if (!is_null($city) && !is_string($city)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($city)), __LINE__);\n }\n if (is_null($city) || (is_array($city) && empty($city))) {\n unset($this->City);\n } else {\n $this->City = $city;\n }\n return $this;\n }", "title": "" }, { "docid": "ba0ebccf74a79a8f2c5f563c0c55b080", "score": "0.52894735", "text": "private function set_stateid($state) {\n $this->cm->state = $state;\n }", "title": "" }, { "docid": "45f98c5f6cfc5366f35414b70003f8c5", "score": "0.5275779", "text": "public function setCityStateZip($citystatezip='')\n {\n $this->citystatezip = urlencode($citystatezip);\n return $this;\n }", "title": "" }, { "docid": "db09183353b53c0e9a5b8e37914a240c", "score": "0.5272589", "text": "public function setCity($city) {\n $this->city = $city;\n return $this;\n }", "title": "" }, { "docid": "69c93c5af2c1f2fb8e06194804bbe21b", "score": "0.5228397", "text": "public function setCityName($value)\n {\n return $this->set(self::city_name, $value);\n }", "title": "" }, { "docid": "14c9aa6a9e292d7047bf841cb9471d99", "score": "0.51682454", "text": "public function getState($city_id)\n {\n\n }", "title": "" }, { "docid": "f1f47774751b9f23b24eac39c9110530", "score": "0.51652575", "text": "public function setViewState($attribute, $value)\n\t{\n\t\tTViewstate::Save($this, $attribute, $value);\n\t}", "title": "" }, { "docid": "f9d430199e2ef60c75b3d913bf762ce9", "score": "0.5116777", "text": "public function setCityIdAttribute($value)\n {\n if (is_integer($value)) {\n $this->attributes['city_id'] = $value;\n } else {\n $this->attributes['city_id'] = City::getCityFromAutoComplete($value);\n }\n }", "title": "" }, { "docid": "2656b605baece16c373b9fdff10c2d31", "score": "0.51027155", "text": "public function setCityIdAttribute($input)\n {\n $this->attributes['city_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "ec8f1a809ff4f02053fbd21690eb0872", "score": "0.5093983", "text": "private static function mapCities() {\n\t\t$metros = adb_system::getCities();\n\n\t\tforeach ($metros as $metro) {\n\t\t\t$metro->mapCity();\n\t\t\t$metro->mapZip();\n\t\t}\n\t}", "title": "" }, { "docid": "6e2157b5871e5def31e6607a8ce0b3b5", "score": "0.5076314", "text": "public function getTributeState()\n\t{\n\t\treturn $this->tribute_state;\n\t}", "title": "" }, { "docid": "562df9bcacaa0912bc00ee0812a574f1", "score": "0.50648624", "text": "public function setState($state)\n {\n $this->state |= $state;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "25eacedaec6a204f9f4ff6205e8207e6", "score": "0.5040387", "text": "public function setCity($city)\n {\n $this->city = $city;\n\n return $this;\n }", "title": "" }, { "docid": "98f0fb7c5fae04b8846b0c0ba322ebe8", "score": "0.50384057", "text": "public static function set_state( $state ) {\n\t\t$_SESSION['customer']['state'] = $state;\n\t}", "title": "" }, { "docid": "d52fd2b6d55ed667a71859cd45e78baf", "score": "0.5006227", "text": "public function setRecipientCity($recipientCity)\r\n {\r\n $this->_recipientCity = $recipientCity;\r\n }", "title": "" }, { "docid": "e8750be841f55c89297de4ff9913458a", "score": "0.50039566", "text": "public function set_state($state) {\n global $DB;\n\n $this->set_stateid($state);\n $DB->update_record('local_extension_cm', $this->cm);\n\n \\local_extension\\utility::cache_invalidate_request($this->requestid);\n }", "title": "" }, { "docid": "970eb1cb76d71b5e896d8635b38224c5", "score": "0.49758193", "text": "function update_state($state) {\n\tglobal $dbh, $stes_tbl, $cities_tbl, $cats_tbl;\n\t\t\n\t$pr_limit = 5000;\n\t$pr_start = 0;\n\t\n\t// reset script timeout\n\tset_time_limit(0);\n\n\t// get rows count\n\t$sql_query = \"SELECT\n\t\t\t\t\t\tcount(*) as rcount\n\t\t\t\t\t FROM\n\t\t\t\t\t\tstate_city_category scc\n\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t \turl_names un ON scc.id = un.parent_id\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tscc.state = '\".$state.\"'\n\t\t\t\t\t AND\n\t\t\t\t\t \tun.id IS NULL\n\t\t\t\t ;\";\n\t\t\t\t \n\t$rows = $dbh->queryRow($sql_query);\n\t$row_cnt = $rows['rcount'];\n\n\t// break run into pages\n\tfor($i = $pr_start;$i < $row_cnt; $i += $pr_limit) {\n\t\n\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tscc.id,\n\t\t\t\t\t\tscc.state,\n\t\t\t\t\t\tscc.city,\n\t\t\t\t\t\tscc.category\n\t\t\t\t\t FROM\n\t\t\t\t\t\tstate_city_category scc\n\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t \turl_names un ON scc.id = un.parent_id\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tscc.state = '\".$state.\"'\n\t\t\t\t\t AND\n\t\t\t\t\t \tun.id IS NULL\n\t\t\t\t\t LIMIT \".$i.\",\".$pr_limit.\"\n\t\t\t\t\t ;\";\n\t\t\t\t\t \n\t\techo 'Set: '.$i.'<br>';\n\t\t\n\t\t$rows = $dbh->queryAll($sql_query);\n\t\tforeach($rows as $cur_city) {\n\t\t\n\t\t// reset script timeout\n\t\tset_time_limit(0);\n\t\t\n\t\t\t\t// pull related cit cat information\n\t\t\t\t$stes_tbl->get_db_vars($cur_city['state']);\n\t\t\t\t$cities_tbl->get_db_vars($cur_city['city']);\n\t\t\t\t$cats_tbl->get_db_vars($cur_city['category']);\n\t\t\t\t\n\t\t\t\t// check for existing category\n\t\t\t\tif ($cats_tbl->id > 0) {\n\t\t\t\t\t\n\t\t\t\t\t// build new url string\n\t\t\t\t\t$url_string = $cities_tbl->city . '-' . $stes_tbl->acn;\n\t\t\t\t\t\n\t\t\t\t\t$categories_list = array();\n\t\t\t\t\t$categories_list[] = $cats_tbl->category_name;\n\t\t\t\t\tif ($cats_tbl->parent_category_id > 0) {\n\t\t\t\t\t\t$cats_tbl->get_db_vars($cats_tbl->parent_category_id);\n\t\t\t\t\t\t$categories_list[] = $cats_tbl->category_name;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t//\t\t\t// resort categories array\n\t\t//\t\t\tkrsort($categories_list);\n\t\t\t\t\t\n\t\t\t\t\t// set categories list\n\t\t\t\t\t$categories_list = implode('-',$categories_list);\n\t\t\t\t\t\n\t\t\t\t\t// finish new url string\n\t\t\t\t\t$url_string .= '-'.$categories_list;\n\t\t\t\t\t\n\t\t\t\t\t// cleanup url string\n\t\t\t\t\t$url_string = strtolower(preg_replace('/[^a-zA-Z0-9]/', '-', $url_string));\n\t\t\n\t\t\t\t\t$url_array = array();\n\t\t\t\t\t$url_array_res = array();\n\t\t\t\t\t$url_array = explode('-',$url_string);\n\t\t\t\t\tforeach($url_array as $url_part) {\n\t\t\t\t\t\tif (!empty($url_part)) {\n\t\t\t\t\t\t\t$url_array_res[] = $url_part;\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$url_string = implode('-',$url_array_res);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$sql_query = \"INSERT INTO\n\t\t\t\t\t\t\t\t\turl_names\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\tparent_id,\n\t\t\t\t\t\t\t\t\turl_name\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t VALUES\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$update_vals = array('citiescate',\n\t\t\t\t\t\t\t\t\t\t$cur_city['id'],\n\t\t\t\t\t\t\t\t\t\t$url_string\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\t$stmt = $dbh->prepare($sql_query);\t\t\t\t\t \n\t\t\t\t\t$stmt->execute($update_vals);\n\t\t\t\n\t\t\t\t\t$sql_query = \"SELECT\n\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t FROM\n\t\t\t\t\t\t\t\turl_names\n\t\t\t\t\t\t\t ORDER BY\n\t\t\t\t\t\t\t\tid DESC\n\t\t\t\t\t\t\t LIMIT 1\n\t\t\t\t\t\t\t ;\";\n\t\t\t\t\t$rows = $dbh->queryRow($sql_query);\n\t\t\t\t\t\n\t\t\t\t\t$sql_query = \"UPDATE\n\t\t\t\t\t\t\t\t\tstate_city_category\n\t\t\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t\t\turl_name = ?\n\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\tid = ?\n\t\t\t\t\t\t\t\t ;\";\n\t\t\t\t\t\t\t \n\t\t\t\t\t$update_vals = array($rows['id'],\n\t\t\t\t\t\t\t\t\t\t$cur_city['id']\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$stmt = $dbh->prepare($sql_query);\t\t\t\t\t \n\t\t\t\t\t$stmt->execute($update_vals);\n\t\t\t\t} else {\n\t\t\t\t\t// if category does not exist remove city state category assignment\n\t\t\t\t\t$sql_query = \"DELETE FROM\n\t\t\t\t\t\t\t\t\tstate_city_category\n\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\tid = ?\n\t\t\t\t\t\t\t\t ;\";\n\t\t\t\t\t\t\t \n\t\t\t\t\t$update_vals = array(\n\t\t\t\t\t\t\t\t\t\t$cur_city['id']\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$stmt = $dbh->prepare($sql_query);\t\t\t\t\t \n\t\t\t\t\t$stmt->execute($update_vals);\n\t\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d4f093255c079c6fdb47cedf340fdf65", "score": "0.49556693", "text": "public function setMerchantCity ( string $merchantCity )\n\t{ \n\t\t$this->mpm->getEmv('60')->setValue(Cast::upperStr(Cast::cleanStr($merchantCity)));\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cd72e1a154420d5b7453fd62cfb75584", "score": "0.49383226", "text": "function get_city_state( $index )\n{\n\tglobal $jne;\n\n\t$data = $jne->getData();\n\tif( $city = $data[$index] ) {\n\t\treturn JNE_normalize(sprintf('%s, %s', \n\t\t\t\t\ttrim($city['kecamatan']),\n\t\t\t\t\t$city['kota']\n\t\t\t\t));\t\n\t}\n\n\treturn $index;\n}", "title": "" }, { "docid": "99dc768f17fa8b85cc78aaca606dba0c", "score": "0.4919635", "text": "public function setCity(string $City)\n {\n if (\n $City !== null &&\n (strlen($City) > 50)\n ) {\n throw new \\Exception(\"City must have maximum length of 50\");\n }\n $this->City = $City;\n\n return $this;\n }", "title": "" }, { "docid": "ee7a32d1d3815f479f853262d6f402e6", "score": "0.48813385", "text": "private function _setState($state)\n\t{\n\t\t$this->_state = $this->_state | $state;\n\t}", "title": "" }, { "docid": "09bd9f9d74fb66dd3acdd08364a9f2cb", "score": "0.4877674", "text": "public function testSetTypeTri() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setTypeTri(\"typeTri\");\n $this->assertEquals(\"typeTri\", $obj->getTypeTri());\n }", "title": "" }, { "docid": "b65f102e791170c42f3ccb5ade92b1c6", "score": "0.4867513", "text": "function set_state($state)\n {\n $this->_state = $state;\n }", "title": "" }, { "docid": "7a9898b40a8966ce8303428655c0320d", "score": "0.4847184", "text": "public function getCityCode()\n {\n return $this->city_code;\n }", "title": "" }, { "docid": "9ecebb3431bb9d07ce9bae486c572fe4", "score": "0.48466918", "text": "public function getCity()\r\n {\r\n return $this->_city;\r\n }", "title": "" }, { "docid": "1872eb1f12231cae8f58ca199e2771cf", "score": "0.48420155", "text": "public function setState(string $threatType, string $threatEntryType, string $platformType, string $state): void;", "title": "" }, { "docid": "87f2d76de2f6f0f839331338248c79d1", "score": "0.48310378", "text": "public function getStateCity() {\n extract($_GET);\n $path = base_url();\n $url = $path . 'api/user/Registeruser_api/getStateCity?state=' . $state;\n //create a new cURL resource\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array());\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n print_r($response_json);\n }", "title": "" }, { "docid": "bb33bd91f5117244c492e67378a88758", "score": "0.4822097", "text": "public function getCity() {\n return $this->city;\n }", "title": "" }, { "docid": "1a2390cda30e075387fdad903cbe184c", "score": "0.4818049", "text": "public function setCities(?array $cities): self\n {\n $this->cities = $cities;\n\n return $this;\n }", "title": "" }, { "docid": "db64e3c2b89a9535d9aa6548b2aef6de", "score": "0.48149058", "text": "public function set_state( $itemId, $state = 'read'){\n $post_fields = array(\n \"i\" => $itemId,\n \"a\" => 'user/-/state/com.google/'.$state,\n );\n //print_r( $post_fields );\n return $this ->edit_do('edit-tag?client='.$this -> client, $post_fields);\n }", "title": "" }, { "docid": "cbb0d5895bf858e660d1a2951c3d9884", "score": "0.48114625", "text": "public function set_ville($ville)\n {\n $this->ville = $ville;\n }", "title": "" }, { "docid": "3feb1433cd55cfbf9d7a80a556dd57c2", "score": "0.47990966", "text": "public function actionUpdatecities() {\n $stateID = Yii::$app->request->post('id');\n return Yii::$app->commonmethod->updateCities($stateID);\n }", "title": "" }, { "docid": "1a7c6dce1b94acab975897757a76381a", "score": "0.47936115", "text": "public function setTributeZipcode($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tribute_zipcode !== $v) {\n\t\t\t$this->tribute_zipcode = $v;\n\t\t\t$this->modifiedColumns[] = DonationPeer::TRIBUTE_ZIPCODE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "dfc27117e44133d37e34567b95514781", "score": "0.47863963", "text": "private function saveCity(){\n\t\t$id_city=null;\n\t\t// jen pokud je znamy\n\t\tif($this->ip_info_db_detail['cityName']){\n\t\t\t// zjisti jestli uz neni v db\n\t\t\t$query=\"SELECT id FROM geolocation_cities WHERE city='\".$this->ip_info_db_detail['cityName'].\"' LIMIT 1\";\n\t\t\t$res=$this->query($query);\n\t\t\tif($res && mysql_num_rows($res)){\n\t\t\t\t$id_city=mysql_result($res, 0);\n\t\t\t}\n\t\t\t// pokud neni tak ulozi\n\t\t\tif(!$id_city && $this->id_country && $this->id_region && $this->ip_info_db_detail['cityName'] && $this->ip_info_db_detail['cityName']!='-'){\n\t\t\t\t$query=\"INSERT INTO geolocation_cities SET\n\t\t\t\t\t`id_country`=\".$this->id_country.\",\n\t\t\t\t\t`id_region`=\".$this->id_region.\",\n\t\t\t\t\t`city`='\".$this->ip_info_db_detail['cityName'].\"',\n\t\t\t\t\t`zip_code`='\".($this->ip_info_db_detail['zipCode'] && $this->ip_info_db_detail['zipCode']!='-' ? $this->ip_info_db_detail['zipCode'] : false).\"',\n\t\t\t\t\t`latitude`='\".($this->ip_info_db_detail['latitude'] && $this->ip_info_db_detail['latitude']!='-' ? $this->ip_info_db_detail['latitude'] : false).\"',\n\t\t\t\t\t`longitude`='\".($this->ip_info_db_detail['longitude'] && $this->ip_info_db_detail['longitude']!='-' ? $this->ip_info_db_detail['longitude'] : false).\"',\n\t\t\t\t\t`timezone`='\".($this->ip_info_db_detail['timeZone'] && $this->ip_info_db_detail['timeZone']!='-' ? $this->ip_info_db_detail['timeZone'] : false).\"'\n\t\t\t\t\t\t\";\n\t\t\t\t$res=$this->query($query);\n\t\t\t\tif($res){\n\t\t\t\t\t$id_city=$this->lastInsertId();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->id_city=$id_city;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3d3ca75812f3d85b3124e0c94ce38344", "score": "0.47848013", "text": "protected function putState($state)\n {\n }", "title": "" }, { "docid": "639b4b721551164f6b262c7732e3364d", "score": "0.47573906", "text": "public function getCityCode()\n\t{\n\t\treturn $this->cityCode;\n\t}", "title": "" }, { "docid": "07952a9f08b0b864fd1f43522315f40e", "score": "0.47459766", "text": "public function setState($state){\n $this->state = $this->state | $state;\n Database::getInstance()->query(\"UPDATE session SET state = (state | \" . $state . \") WHERE session_id={$this->id}\");\n }", "title": "" }, { "docid": "ba0b81991746cbc649b8c5622b24e8ef", "score": "0.47430104", "text": "private function setState($state)\r\n {\r\n \r\n // regex checks to make sure string is between 2-40 characters and only contains letters and white spaces\r\n if(preg_match($this->stateRegex, $state) == true)\r\n {\r\n $this->state = $state;\r\n }\r\n else{\r\n die(\"<h2> Error - Invaild State Name - Must be between 1 and 40 characters in length and contain only letters and white spaces\");\r\n }\r\n }", "title": "" }, { "docid": "a6a41303251e834b8504f58d95a05352", "score": "0.4742652", "text": "public function getCityCounty()\r\n {\r\n return $this->_cityCounty;\r\n }", "title": "" }, { "docid": "2642d8b60e4488b61498d88cf5ed7a3c", "score": "0.4738203", "text": "public function setState($state)\r\n {\r\n $this->_state = $state;\r\n }", "title": "" }, { "docid": "2642d8b60e4488b61498d88cf5ed7a3c", "score": "0.4738203", "text": "public function setState($state)\r\n {\r\n $this->_state = $state;\r\n }", "title": "" }, { "docid": "a208a69440f303f054e757db761211b6", "score": "0.47372964", "text": "public function testSetJrnTri() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setJrnTri(\"jrnTri\");\n $this->assertEquals(\"jrnTri\", $obj->getJrnTri());\n }", "title": "" }, { "docid": "e6985155853c20e41e5912e18d472cc4", "score": "0.47370905", "text": "public function getCityId()\n {\n return $this->city_id;\n }", "title": "" }, { "docid": "e6985155853c20e41e5912e18d472cc4", "score": "0.47370905", "text": "public function getCityId()\n {\n return $this->city_id;\n }", "title": "" }, { "docid": "8cb603f8d9cb2a3eb942a047d10c9595", "score": "0.47364524", "text": "public function get_city()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b7ce1d090829020685a8bde8bd96c53a", "score": "0.47318846", "text": "public function getCity()\n {\n return $this->city;\n }", "title": "" }, { "docid": "b1a352a6abb58fc16676a7bbf0f1a0d2", "score": "0.47234654", "text": "public function getCity()\n {\n return $this->_city;\n }", "title": "" }, { "docid": "d5601c41fefdc0133d1ed90ce9188ace", "score": "0.47176", "text": "public function setState($state)\n\t\t{\r\n\t\t\t$this->state = $state;\n\t\t}", "title": "" }, { "docid": "e27adf6f04594708d6978114cbfd9c02", "score": "0.47113118", "text": "public function testSetGetCity($city, $country, $region)\n {\n $location = new Location($city, $country, $region);\n\n $result = $location->getCity();\n\n $this->assertSame($city, $result);\n }", "title": "" }, { "docid": "cbbe2e228789d0d281182c1eea05d572", "score": "0.46998468", "text": "public function setCity($City)\n {\n $this->city = $City;\n\n return $this;\n }", "title": "" }, { "docid": "439ab64a2a2c8b371c829b0812dcda20", "score": "0.4689456", "text": "public function getCity() {\n return $this->city;\n }", "title": "" }, { "docid": "dc70060de673d016c297a83020901580", "score": "0.46827838", "text": "public function setState($state);", "title": "" }, { "docid": "f99a20827fa5959e786cdceb50fa1fd8", "score": "0.4676386", "text": "public function setState($state) {\n\t\t$this->state = $state;\n\t}", "title": "" }, { "docid": "91f421cb5f98917c83784dbb9215d910", "score": "0.4675187", "text": "public function city_is($city)\n\t{\n\t\tif (!$this->joined_carwash)\n\t\t{\n\t\t\t$this->joined_carwash = true;\n\t\t\t$this->query->join($this->ENTITY_TABLE, $this->TABLE.'.cw_id', '=', $this->ENTITY_TABLE.'.id');\n\t\t}\n\n\t\t$this->query->where('city', '=', $city);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1e2e9665bd98e4b6b1a0cfa585c2c3a0", "score": "0.46693143", "text": "function getcity()\n\t{\n\t return $this->city;\n\t}", "title": "" }, { "docid": "c9ac721c2bddfe51af049ec054926afc", "score": "0.4667773", "text": "public function setIsCultureSkillAttribute($value): void\n {\n if ($value === null) {\n $value = false;\n }\n $this->attributes['is_culture_skill'] = $value;\n }", "title": "" }, { "docid": "13258e740c53a8d73099472e780abb34", "score": "0.4657025", "text": "public function setStateOrProvince($stateOrProvince)\n {\n $this->stateOrProvince = $stateOrProvince;\n }", "title": "" }, { "docid": "c228892507f9dcc1398efbe3301ebbdc", "score": "0.46516755", "text": "public function getCity() {\n\t\treturn $this->city;\n\t}", "title": "" }, { "docid": "a28a5a44417c80d06c4f9f5271ecc5e6", "score": "0.46479073", "text": "public function setSettlement($settlement)\n {\n $this->settlement = $settlement;\n }", "title": "" }, { "docid": "fccd7308ae92789a82e51689295c04cc", "score": "0.46257648", "text": "protected function putState($state)\n {\n if (isset($state['text'])) {\n $this->Text = $state['text'];\n }\n }", "title": "" }, { "docid": "4387bd5db18db980586b477d0dc80be0", "score": "0.4618614", "text": "public function testSetTransTriEtablissement() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setTransTriEtablissement(\"transTriEtablissement\");\n $this->assertEquals(\"transTriEtablissement\", $obj->getTransTriEtablissement());\n }", "title": "" }, { "docid": "c9bb345dd7640b8884446da07266682f", "score": "0.4605341", "text": "public function set_ville($_ville)\n {\n $this->_ville = $_ville;\n\n return $this;\n }", "title": "" }, { "docid": "9b29b9ad51ed84a5fd8b8edaa30b32ba", "score": "0.46035352", "text": "public function getCity()\n {\n\n return $this->city;\n }", "title": "" } ]
12e14862cbf702bc6f8e538baa7e01b9
Get the best score for all members of a section
[ { "docid": "066967d30b225fc0680a70cfb5ddd46c", "score": "0.5784961", "text": "public function getAllMembersBest($semester, $sectionId, $assignTag) {\n\t\t$pdo = $this->pdo;\n\t\t$members = new Members($this->config);\n\n\t\t$sql = <<<SQL\nselect member.id as memberid, quiztag, maxpoints, max(points) as points \nfrom $this->tablename quiztry\njoin $members->tablename member\non quiztry.memberid = member.id\nwhere member.semester=? and member.section =? and assigntag=?\ngroup by member.id, assigntag, quiztag\nSQL;\n\t\t$stmt = $pdo->prepare($sql);\n\t\t$stmt->execute([$semester, $sectionId, $assignTag]);\n\n\t\t$ret = [];\n\t\tforeach($stmt->fetchAll(\\PDO::FETCH_ASSOC) as $row) {\n\t\t\tif(!isset($ret[$row['memberid']])) {\n\t\t\t\t$ret[$row['memberid']] = [];\n\t\t\t}\n\n\t\t\t$ret[$row['memberid']][$row['quiztag']] =\n\t\t\t\t[\n\t\t\t\t\t'points' => $row['points'],\n\t\t\t\t\t'maxpoints' => $row['maxpoints']\n\t\t\t\t];\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" } ]
[ { "docid": "e921b5ce4c64c1e2960181d1bd3964e2", "score": "0.6577346", "text": "function evaluate(&$tr, $sectionName) {\n $score = $this->initScore + $tr->count($sectionName);\n krsort($this->itemScoreMap);\n foreach ($this->itemScoreMap as $items => $mappedScore) {\n if ($score >= $items) {\n if ($mappedScore >= $this->minScore) {\n return $mappedScore;\n } else {\n return $this->minScore;\n }\n }\n }\n return $this->minScore; // When all else fails\n }", "title": "" }, { "docid": "1f271b8e368532c2376f9411809ceb4d", "score": "0.6382567", "text": "function evaluate(&$tr, $sectionName) {\n $score = $this->initScore + $tr->sumValues($sectionName);\n //echo \"score=$score\\n\";\n //var_dump($tr->getMessageList($sectionName));\n krsort($this->pointScoreMap); // Sort array by key in reverse order\n //echo \"pointScoreMap after sort:\";\n //var_dump($this->pointScoreMap);\n foreach ($this->pointScoreMap as $points=>$mappedScore) {\n //echo \"points=$points, mappedScore=$mappedScore\\n\";\n if ($score >= $points) {\n if ($mappedScore >= $this->minScore) {\n return $mappedScore;\n } else {\n return $this->minScore;\n }\n }\n }\n return $this->minScore; // When all else fails\n }", "title": "" }, { "docid": "58d0972b87f05dc4b5d4ec6ccdd36f74", "score": "0.6296977", "text": "function evaluate(&$tr, $sectionName) {\n // Calculate score from assigned test points\n $score = $this->initScore + $tr->sumValues($sectionName);\n if ($this->maxScore > 0 and $score > $this->maxScore) {\n $score = $this->maxScore;\n }\n if ($score < $this->minScore and $this->maxScore > 0) {\n $score = $this->minScore;\n }\n if ($tr->getProperty(\"ReadmeExists\") === false) {\n $score = 0;\n }\n return $score;\n }", "title": "" }, { "docid": "77e7d38c10593e99b5f7c969c5d8aa6c", "score": "0.5986663", "text": "function evaluate(&$tr, $sectionName) {\n return $this->maxScore;\n }", "title": "" }, { "docid": "32da198816d561c49f4337c670c82088", "score": "0.589927", "text": "function BestResult() {\n $this->UpdateScores();\n $bestScore = -1.0;\n $bestPhrase = '';\n $bestPosition = -1;\n $bestResultIndex = -1;\n foreach ($this->scores as $phrase => $scores1) {\n foreach ($scores1 as $position => $scores2) {\n foreach ($scores2 as $resultIndex => $score) {\n if (($bestPhrase == '') or\n ($score > $bestScore) or\n (($score == $bestScore) and // tie break with importance:\n ($this->termArray->results[$phrase][$resultIndex][\"importance\"] > $this->termArray->results[$bestPhrase][$bestResultIndex][\"importance\"]))) {\n $bestScore = $score;\n $bestPhrase = $phrase;\n $bestPosition = $position;\n $bestResultIndex = $resultIndex;\n }\n }\n }\n }\n return $this->termArray->results[$bestPhrase][$bestResultIndex];\n }", "title": "" }, { "docid": "8cf87328c5ea3fba1f7bcd21777253ea", "score": "0.58769", "text": "function evaluate(&$tr, $sectionName) {\n $score = $this->initScore + $tr->sumValues($sectionName);\n $score *= $this->multiplier;\n if ($score < $this->minScore) {\n $score = $this->minScore;\n //echo \"Assigning minimum score: $this->minScore\\n\";\n }\n if ($this->maxScore > 0 and $score > $this->maxScore) {\n $score = $this->maxScore;\n }\n return round($score, $this->precision);\n }", "title": "" }, { "docid": "36a8f700df093d8c29489f72edd28e84", "score": "0.58411646", "text": "function get_index_biggest_score($users)\r\n{\r\n $highest_score = -1;\r\n $index = -1;\r\n\r\n $current_pos = 0;\r\n foreach ($users as $user) {\r\n $digit = $user->get_digit_game_high_score();\r\n $subtract = $user->get_subtract_game_high_score();\r\n $add = $user->get_add_game_high_score();\r\n $score = ($digit + $subtract + $add) / 3;\r\n if($score > $highest_score){\r\n $highest_score = $score;\r\n $index = $current_pos;\r\n }\r\n\r\n $current_pos = $current_pos + 1;\r\n }\r\n\r\n return $index;\r\n}", "title": "" }, { "docid": "7944ca9a067672533583652c505517f7", "score": "0.5799256", "text": "public function getAllUserScore();", "title": "" }, { "docid": "cafdd1e9efd24a0c3385576109457e9d", "score": "0.57609904", "text": "function evaluate(&$tr, $sectionName) {\n // Calculate score from assigned test points\n $score = $this->initScore + $tr->sumValues($sectionName);\n if ($tr->messageExists(\"No source code files found\")\n OR $tr->getProperty(\"no_files\") == true) {\n $score = 0;\n } else {\n $errCount = $tr->count($sectionName);\n $score = $score - $errCount;\n if ($score < $this->minScore) $score = $this->minScore;\n }\n return $score;\n }", "title": "" }, { "docid": "7d27edc10d7739ab04d4d51a904b4789", "score": "0.56483257", "text": "private function mainScore()\n {\n $score = $this->lookup[$this->player1->points] . '-';\n $score .= $this->tied() \n ? 'All' \n : $this->lookup[$this->player2->points];\n return $score;\n }", "title": "" }, { "docid": "e3d0434d62f790ac6a44361a2d2eedd9", "score": "0.5563617", "text": "function get_top_ten($top_hundred)\n{\n\t$candidates = array();\n\tforeach($top_hundred as $candidate)\n\t{\n\t\t$net_tag_score = 0;\n\t\t$answer_score_sum = 0;\n\t\t$answer_count_sum = 0;\n\t\t$question_score_sum = 0;\n\t\t$question_count_sum = 0;\n\t\tforeach($candidate['relevant_tags'] as $tag_name=> $tag){\n\t\t\tprint(\"tag info\\n\");\n\t\t\tprint_r($tag);\n\t\t\t$answer_score_sum += $tag['answer_score'];\n\t\t\t$answer_count_sum += $tag['answer_count'];\n\t\t\t$question_score_sum += $tag['question_score'];\n\t\t\t$question_count_sum += $tag['question_count'];\n\t\t}\t\n\t\tif(($answer_count_sum + $question_count_sum) != 0)\n\t\t\t$net_tag_score = ($answer_score_sum + $question_score_sum)/($answer_count_sum + $question_count_sum) + ($answer_count_sum + $question_count_sum); \n\t\telse $net_tag_score;\n\t\techo \"score \".$net_tag_score.\"\\n\";\n\t\t$candidate['score'] = $net_tag_score;\n\t\t$candidates[$candidate['id']] = $candidate;\n\t}\n\tusort($candidates,\"compare_scores\");\n\tprint_candidates_to_file($candidates);\n\treturn $candidates;\n}", "title": "" }, { "docid": "30cc835e4a691e3f32de0f8cb3c8bc2b", "score": "0.5521347", "text": "private function getMaxScore() {\n $score = $this->cache->get('maxscore', 60);\n\n if (!$score) {\n // Level total\n $levels_score = $this->getMaxLevelsScore();\n\n // Medal total\n $sql = 'SELECT SUM(`reward`) AS `score`\n FROM medals\n INNER JOIN medals_colours\n ON medals_colours.colour_id = medals.colour_id';\n $st = $this->db->prepare($sql);\n $st->execute();\n $medals = $st->fetch();\n\n $score = $levels_score + $medals->score;\n\n $this->cache->set('maxscore', $score);\n }\n\n return $score;\n }", "title": "" }, { "docid": "bfed3ad808413652749043190135dea0", "score": "0.55065024", "text": "function quiz_calculate_best_attempt($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case QUIZ_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt;\n }\n break;\n\n case QUIZ_GRADEAVERAGE: // need to do something with it :-)\n case QUIZ_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt;\n }\n return $final;\n\n default:\n case QUIZ_GRADEHIGHEST:\n $max = -1;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n $maxattempt = $attempt;\n }\n }\n return $maxattempt;\n }\n}", "title": "" }, { "docid": "bfed3ad808413652749043190135dea0", "score": "0.55065024", "text": "function quiz_calculate_best_attempt($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case QUIZ_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt;\n }\n break;\n\n case QUIZ_GRADEAVERAGE: // need to do something with it :-)\n case QUIZ_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt;\n }\n return $final;\n\n default:\n case QUIZ_GRADEHIGHEST:\n $max = -1;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n $maxattempt = $attempt;\n }\n }\n return $maxattempt;\n }\n}", "title": "" }, { "docid": "8825dfeede7294cd2e93bbedf52f7a28", "score": "0.54983276", "text": "public function getTeam2Score();", "title": "" }, { "docid": "9a1ec5b892ea9bc29bd0f01a5c72fd81", "score": "0.5490475", "text": "function quiz_calculate_best_attempt($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt;\n }\n break;\n\n case GRADEAVERAGE: // need to do something with it :-)\n case ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt;\n }\n return $final;\n\n default:\n case GRADEHIGHEST:\n $max = -1;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n $maxattempt = $attempt;\n }\n }\n return $maxattempt;\n }\n}", "title": "" }, { "docid": "ca2a4d1ef6a6c536536cade2be258fbe", "score": "0.54801106", "text": "function quiz_calculate_best_grade($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt->sumgrades;\n }\n break;\n\n case ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->sumgrades;\n }\n return $final;\n\n case GRADEAVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->sumgrades;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case GRADEHIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n }\n }\n return $max;\n }\n}", "title": "" }, { "docid": "af44b744378112ec5b77cca23228c9cd", "score": "0.5460416", "text": "function scoringUser()\n {\n $intOutput = 0;\n $arrAllowed = array(1, 2, 3, 6, 8, 23);\n foreach ($this->arrUserData as $intKey => $arrUserAnswers) {\n if (in_array($this->arrSurveyItems[$intKey]['question_type'], $arrAllowed)) {\n $arrQuestionAnswers = $this->answersArray($this->arrSurveyItems[$intKey]['answers']);\n foreach ($arrUserAnswers as $arrUserSingle) {\n foreach ($arrUserSingle as $intUserAnswer) {\n $intOutput += (int)$arrQuestionAnswers[$intUserAnswer][1];\n }\n }\n }\n }\n\n return $intOutput;\n }", "title": "" }, { "docid": "322799182a1af4658b4e016858e58047", "score": "0.54529494", "text": "function calResult($num,$count, &$minVote){\n $bestParticipant = array();\n $counter = 0;\n foreach($count as $key => $value){\n if($counter == $num-1){\n $minVote = $value;\n }\n if($value < $minVote){\n break;\n } \n $bestParticipant[$key] = $value;\n $counter++;\n }\n return $bestParticipant;\n}", "title": "" }, { "docid": "d5ca9d6ba283d9bf7fb5a959f425c564", "score": "0.5422636", "text": "function service_get_restaurant_score($uid, $rid, $preferences, $i)\n{\n $categories = $preferences[0];\n $category_ratings = $preferences[1];\n $foods = $preferences[2];\n $food_ratings = $preferences[3];\n\n if (defined('PROFILING'))\n start_timer(\"\\tpolarity scoring\", $i);\n\n // Get restaurant polarity scoring component\n $query = db()->prepare('Select polarity from restaurants where rid = ?');\n $query->execute(array($rid));\n $result = $query->fetch();\n $res_polarity = $result['polarity'];\n\n if (defined('PROFILING'))\n stop_timer(\"\\tpolarity scoring\", $i);\n\n // skip restaurant if polarity = 0\n if ($res_polarity == 0) {\n return NULL;\n }\n\n if (defined('PROFILING'))\n start_timer(\"\\tcategory scoring\", $i);\n\n // Get category scoring component\n $sql = 'SELECT cid from restaurant_categories where rid = ?';\n $query = db()->prepare($sql);\n $query->execute(array($rid));\n $cat_ids = $query->fetchAll();\n\n $max_cat_rating = 0;\n foreach ($cat_ids as $cid)\n {\n if (in_array($cid['cid'], $categories))\n {\n // Get category preference rating\n $rating = $category_ratings[$uid][$cid['cid']];\n $max_cat_rating = max($max_cat_rating, $rating);\n }\n }\n $max_cat_score = 0.2*$max_cat_rating;\n\n if (defined('PROFILING'))\n {\n stop_timer(\"\\tcategory scoring\", $i);\n start_timer(\"\\tfood scoring\", $i);\n }\n\n // Get food scoring component\n $max_food_score = 0;\n\n // See if restaurant has corresponding attribute\n foreach ($foods as $fid)\n {\n // See if restaurant has corresponding attribute\n $sql = 'SELECT polarity from restaurant_attributes ra where ra.aid = (select f.aid from foods f where f.fid = ?)';\n $query = db()->prepare($sql);\n $query->execute(array($fid));\n\n if ($query->rowCount() > 0)\n {\n $food_polarity = $query->fetch();\n $rating = $food_ratings[$uid][$fid];\n $max_food_score = max($max_food_score, ($rating * 0.2 * $food_polarity['polarity']));\n }\n }\n\n if (defined('PROFILING'))\n stop_timer(\"\\tfood scoring\", $i);\n\n return array('rid' => $rid, 'score' => 40*$max_cat_score + 40*$max_food_score + 20*$res_polarity);\n}", "title": "" }, { "docid": "c8944309feff8b8ede79da9f1950ee4e", "score": "0.5419324", "text": "function resscore ($ratedobject, $cvr_arrays) {\n $advanced_values = $cvr_arrays['advanced_values'];\n $resfields = $cvr_arrays['resfields'];\n \n $field = $ratedobject->field;\n $resfield = $resfields[$field];\n \n $articles = $ratedobject->articles;\n \n $maxscore = $advanced_values[\"maxscore\"];\n \n $count_articles = count($articles);\n \n // get object data\n \n $citations = $ratedobject->citations;\n $maxcitations = $ratedobject->maxcitations;\n \n for ($i = 0; $i < $count_articles; $i++) {\n \n $citation = $citations[$i];\n $googscholar = $maxcitations[$i];\n \n // loop only if scores are set\n if ($citation || $googscholar) {\n \n $citation = intval ($citation);\n $googscholar = intval ($googscholar);\n // 2001-2012 - retrieved 10 March 2012 (rounded up): WOK / Google Scholar for 10 years\n // agriculture = 900/1400, 800, 600, 600, 600, 600 \n // biomed = 14100/19900, 10100, 4700, 3400, 3400, 3300\n // chemistry = 15700/64100, 8200, 7100, 5300, 3700, 3700\n // clinmed = 9200/?, 6400/6400, 5900, 4900, 5000, 4500 \n // computer = 8100/10200, 7700, 7100, 4600, 3900, 3200\n // economics = 1000/4900, 900, 900, 900, 700, 700 \n // engineering = 2100/4800, 2000, 1600, 1500, 1400, 1200\n // environment/ecology = 4500/5800, 2100, 1800, 1700, 1700, 1600\n // geosciences = 2000/2700, 2000, 2000, 1700, 1400, 1300\n // infectious = 2600/3900, 2500, 2500, 2400, 2400, 2400\n // material = 4300/5500, 4000, 4000, 3400, 2500, 1900, 1800\n // mathematics = 2800/7500, 2700, 1700, 1200, 1000, 800\n // microbio = 1800/2400, 1400, 1200, 1200, 1100, 1100, 1100\n // molbio = 5900/14000, 5500, 4700, 3500, 3100, 3100\n // multi = 800/1200, 500, 500, 500, 400, 400\n // neuro = 3100/4385, 2600, 2300, 1900, 1700, 1700\n // pharma = 1400/5200, 1200, 1100, 1100, 1000, 1000\n // physics = 5600/7500, 4200, 4000, 3600, 3200, 3100\n // plantanimal = 2000/2600, 1400, 1400, 1400, 1400, 1300\n // psycho = 2800/6100, 2400, 1900, 1900, 1700, 1600\n // social = 900/2200, 800, 700, 700, 700, 700\n // space = 5200/8600, 2800, 2400, 2100, 1900, 1800, 1800\n // take reasonable MAXIMUM as double the first value (for ~20-30 years); \n if ($resfield[1] == \"chemistry\") $maximum = 31400;\n elseif ($resfield[1] == \"biomed\") $maximum = 28200; \n elseif ($resfield[1] == \"computer\") $maximum = 16200;\n elseif ($resfield[1] == \"molbio\") $maximum = 11800;\n // genmed - unknown - classify conservatively as clinmed\n elseif (($resfield[1] == \"clinmed\") || ($resfield[1] == \"genmed\")) $maximum = 18400;\n elseif ($resfield[1] == \"physics\") $maximum = 11200;\n elseif ($resfield[1] == \"space\") $maximum = 10400;\n elseif (($resfield[1] == \"environmental\") || ($resfield[1] == \"ecology\")) $maximum = 9000;\n elseif ($resfield[1] == \"material\") $maximum = 8600;\n elseif ($resfield[1] == \"neuro\") $maximum = 6200;\n elseif ($resfield[1] == \"mathematics\") $maximum = 5600;\n elseif ($resfield[1] == \"psycho\") $maximum = 5600;\n elseif ($resfield[1] == \"infectious\") $maximum = 5200;\n elseif ($resfield[1] == \"engineering\") $maximum = 4200;\n elseif ($resfield[1] == \"geosciences\") $maximum = 4000;\n elseif (($resfield[1] == \"plantanimal\") || ($resfield[1] == \"animal\")) $maximum = 4000;\n elseif ($resfield[1] == \"microbio\") $maximum = 3600;\n elseif ($resfield[1] == \"pharma\") $maximum = 2800;\n elseif ($resfield[1] == \"economics\") $maximum = 2000;\n elseif ($resfield[1] == \"social\") $maximum = 1800;\n elseif ($resfield[1] == \"multi\") $maximum = 1600;\n elseif ($resfield[1] == \"agriculture\") $maximum = 900;\n // if it is not set, take a maximum max\n else $maximum = 50000;\n // for Google Scholar, take double value\n $maxgoogle = 2 * $maximum;\n // use log to minimize huge differences\n $score1 = log($citation)/log($maximum) * 100;\n $score2 = log($googscholar)/log($maxgoogle) * 100;\n \n // Do not allow errors to continue...\n if ($score1 > $maxscore) $score1 = $maxscore;\t\n elseif ($score1 < 0) $score1 = 0;\n if ($score2 > $maxscore) $score2 = $maxscore;\t\n elseif ($score2 < 0) $score2 = 0;\n \n $score = $score1 * $advanced_values[\"WOK\"] + $score2 * $advanced_values[\"GOOG\"];\n \n $scores_array = array(\"$score\") ;\n } \n }\n //First, select the maximum score in research\n $score = max($scores_array);\n \n // Proof that scores are within limits >=0, <100\n if ($score > $maxscore) $score = $maxscore;\t\n elseif ($score < 0) $score = 0;\n \n return $score;\n }", "title": "" }, { "docid": "4b31835bfd6e7a93e3c74997b0305a90", "score": "0.5411353", "text": "function get_score()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_SCORE);\r\n }", "title": "" }, { "docid": "c49f416011f8a142e52c77dec709c177", "score": "0.5406854", "text": "function quiz_calculate_best_grade($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case QUIZ_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt->sumgrades;\n }\n break;\n\n case QUIZ_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->sumgrades;\n }\n return $final;\n\n case QUIZ_GRADEAVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->sumgrades;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case QUIZ_GRADEHIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n }\n }\n return $max;\n }\n}", "title": "" }, { "docid": "c49f416011f8a142e52c77dec709c177", "score": "0.5406854", "text": "function quiz_calculate_best_grade($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case QUIZ_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt->sumgrades;\n }\n break;\n\n case QUIZ_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->sumgrades;\n }\n return $final;\n\n case QUIZ_GRADEAVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->sumgrades;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case QUIZ_GRADEHIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n }\n }\n return $max;\n }\n}", "title": "" }, { "docid": "e81ab87eedf097443d22f9a4aa516bdb", "score": "0.5384855", "text": "private function getBestIndividual($generation)\n {\n $individuals = $this->individualDAO->loadAllIndividuals($generation);\n\n $i = 0;\n $bestIndividual = $individuals[$i];\n for (; $i < count($individuals) && $bestIndividual->score == null; $i++)\n {\n if ($individuals[$i]->score != null)\n {\n $bestIndividual = $individuals[$i];\n break;\n }\n }\n\n for (; $i < count($individuals); $i++)\n {\n if ($individuals[$i]->score != null && $bestIndividual->score < $individuals[$i]->score)\n {\n $bestIndividual = $individuals[$i];\n break;\n }\n }\n\n if ($bestIndividual->score == null)\n {\n return null;\n }\n return $bestIndividual->properties;\n }", "title": "" }, { "docid": "2954df0861940d3d515eb027365149b3", "score": "0.5383881", "text": "function calculateAllRecommendations() {\n\t\t$totalAssessmentScore = 0;\n\t\t$maxAssessmentScore = 0;\n\t\t\n\t\t$recommendations = array();\n\t\t$minValue = $this->getMinimumValue();\n\t\t$maxValue = $this->getMaximumValue();\n\t\t\n\t\t$result = $this->getResult();\n\t\t$answers = $result->getAnswers();\n\t\t\n\t\t// Build the category array\n\t\t$categoryArray = array();\n\t\tforeach((array) $answers as $answer) {\n\t\t\t$category = tx_wecassessment_category::find($answer->getCategoryUID());\n\t\t\tif(is_object($category)) {\n\t\t\t\t$sorting = $category->getSorting();\n\t\t\t\t$categoryArray[$sorting]['uid'] = $category->getUID();\n\t\t\t\t$categoryArray[$sorting]['answers'][$answer->getQuestionUID()] = $answer;\n\t\t\t\t$categoryArray[$sorting]['totalScore'] += $answer->getWeightedScore();\n\t\t\t\t\n\t\t\t\t$categoryArray[$sorting]['maxScore'] += abs($answer->getWeight()) * $this->getMaximumValue();\n\t\t\t\t$categoryArray[$sorting]['weightedAnswerCount'] += abs($answer->getWeight());\n\t\t\t\t$weightedAnswerCount += abs($answer->getWeight());\n\t\t\t\t\n\t\t\t\t$totalAssessmentScore += $answer->getWeightedScore();\n\t\t\t\t$maxAssessmentScore += abs($answer->getWeight()) * $this->getMaximumValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tksort($categoryArray);\n\n\t\t// Hack to include perfect score\n\t\tif($maxAssessmentScore == $totalAssessmentScore) {\n\t\t\t$totalAssessmentScore -= .0001;\n\t\t}\n\t\t\n\t\t// Total Assessment Recommendations\n\t\tif($weightedAnswerCount == 0) {\n\t\t\t$score = 0;\n\t\t} else {\n\t\t\t$score = $totalAssessmentScore / $weightedAnswerCount;\n\t\t}\n\t\t\n\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\tif($score < $minValue) {\n\t\t\t$score = $minValue;\n\t\t}\n\t\t\n\t\t$recommendation = &$this->calculateRecommendation($score);\n\t\tif(is_object($recommendation)) {\n\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t$recommendations[0] = $recommendation;\n\t\t}\n\t\t\n\t\t// Category Recommendations\n\t\tforeach((array) $categoryArray as $sorting => $children) {\n\t\t\t$category = tx_wecassessment_category::find($children['uid']);\n\t\t\t\n\t\t\t// Hack to include perfect score\n\t\t\tif($children['maxScore'] == $children['totalScore']) {\n\t\t\t\t$children['totalScore'] -= .0001;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif($children['weightedAnswerCount'] == 0) {\n\t\t\t\t$categoryScore = 0;\n\t\t\t} else {\n\t\t\t\t$categoryScore = $children['totalScore'] / ($children['weightedAnswerCount']);\n\t\t\t}\n\t\t\t\n\t\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\t\tif($categoryScore < $minValue) {\n\t\t\t\t$categoryScore = $minValue;\n\t\t\t}\n\t\t\t\n\t\t\t$recommendation = &$category->calculateRecommendation($categoryScore);\n\t\t\t\n\t\t\tif(is_object($recommendation)) {\n\t\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t\t$recommendations[] = $recommendation;\n\t\t\t}\n\t\t\t\n\t\t\tforeach((array) $children['answers'] as $answer) {\n\t\t\t\t$question = $answer->getQuestion();\n\t\t\t\t$questionScore = $answer->getValue();\n\t\t\t\t\n\t\t\t\t// Hack to include perfect score\n\t\t\t\tif($questionScore == $this->getMaximumValue()) {\n\t\t\t\t\t$questionScore -= .0001;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\t\t\tif($questionScore < $minValue) {\n\t\t\t\t\t$questionScore = $minValue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$recommendation = $question->calculateRecommendation($questionScore);\n\t\t\t\tif(is_object($recommendation)) {\n\t\t\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t\t\t$recommendations[] = $recommendation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $recommendations;\n\t}", "title": "" }, { "docid": "d42f2e4bf483c8349badb424e663f9cd", "score": "0.53822184", "text": "private function getScore()\n {\n $score = [];\n $score_area = $this->_parser->find('h2', 1)->next_sibling();\n if ($score_area->tag == 'table') {\n foreach ($score_area->find('tr') as $each_score) {\n $temp_score = [];\n\n $temp_score['type'] = $this->getScoreType($each_score);\n $temp_score['vote'] = $this->getScoreVote($each_score);\n $temp_score['percent'] = $this->getScorePercent($each_score);\n\n $score[] = $temp_score;\n }\n }\n\n return $score;\n }", "title": "" }, { "docid": "14e02ec999d800dca5b9c956bd8b540d", "score": "0.537734", "text": "public function mostPeople() {\n $max = -1;\n $index = -1;\n foreach ($this->data as $key => $place) {\n if ($place->getPeople() > $max) {\n $max = $place->getPeople();\n $index = $key;\n }\n }\n if($this->data[$index]->getPeople() == 0 ){\n $min = 999999;\n foreach ($this->data as $key => $place) {\n if ($place->countTaxis() < $min) {\n $min = $place->countTaxis();\n $index = $key;\n }\n } \n }\n return $this->data[$index];\n }", "title": "" }, { "docid": "e2a7df78a68493a348d3abb0d4daa946", "score": "0.53709334", "text": "public function maxScore()\n {\n return $this->hits['max_score'];\n }", "title": "" }, { "docid": "0727d2a86522a86f9f0ae269df7216a6", "score": "0.5361541", "text": "function quiz_get_best_grade($quiz, $userid) {\nif (!$grade = get_record('quiz_grades', 'quiz', $quiz->id, 'userid', $userid)) {\n return NULL;\n }\n\n return (round($grade->grade,$quiz->decimalpoints));\n}", "title": "" }, { "docid": "0727d2a86522a86f9f0ae269df7216a6", "score": "0.5361541", "text": "function quiz_get_best_grade($quiz, $userid) {\nif (!$grade = get_record('quiz_grades', 'quiz', $quiz->id, 'userid', $userid)) {\n return NULL;\n }\n\n return (round($grade->grade,$quiz->decimalpoints));\n}", "title": "" }, { "docid": "303a8bb32a0648896cdd917a8317f541", "score": "0.53595835", "text": "function evaluate(&$tr, $sectionName) {\n $score = $this->initScore + $tr->sumValues($sectionName);\n if ($tr->getProperty(\"dbloaded\") == false\n and $tr->messageExists(\"No SQL files to load\")) {\n $score = 0;\n } else if ($tr->getProperty(\"dbloaded\") == false) {\n $score = 1;\n }\n if ($score < 0) $score = 0;\n if ($score == 0 and $tr->getProperty(\"dbloaded\") == true) {\n $score = 1;\n }\n return $score;\n }", "title": "" }, { "docid": "effa2a42d0abb7ec643923c5e5d6f95f", "score": "0.5355531", "text": "public function score()\n {\n if($this->hasAWinner()) {\n return 'Win for ' . $this->leader()->name;\n }\n\n if($this->hasTheAdvantage()) {\n return 'Advantage ' . $this->leader()->name;\n }\n\n if($this->inDeuce()) {\n return 'Deuce';\n }\n\n return $this->generalScore();\n }", "title": "" }, { "docid": "6e9ef3b32d15a2b6078337b73fe86971", "score": "0.5343746", "text": "public function score(/*SearchCrit*/$sc) {\n $lev = $sc->lev($this->lastName, $this->firstName); \n $this->_score = 100 - $lev;\n }", "title": "" }, { "docid": "cd93eb74be5c0279eea6412c3330a35e", "score": "0.53336155", "text": "public function getScore()\n {\n $totalScore = 0;\n $totalQuestions = 0;\n foreach ($this->getEvaluationAnswers() as $index => $evaluationAnswer) {\n $totalScore += $evaluationAnswer->getAnswer()->getScore();\n $totalQuestions++;\n }\n if (($totalQuestions * 3) == 0)\n return 0;\n else\n return round(($totalScore / ($totalQuestions * 3)) * 100);\n }", "title": "" }, { "docid": "9f60f1a1cbca816b1520159079c07d9a", "score": "0.5291818", "text": "function score(&$tr, $sectionName) {\n assert(is_object($tr));\n if (get_class($tr) !== \"TestResult\") {\n die(\"tr is not a TestResult\".get_class($tr));\n }\n return $this->evaluate($tr, $sectionName);\n }", "title": "" }, { "docid": "e827ad11610dc49691869fe1186dc8d9", "score": "0.529166", "text": "public function getMaxPossibleScore() : int;", "title": "" }, { "docid": "660d98366168912025dca5fe78034b7f", "score": "0.5291476", "text": "public function getscore($userid){\n\t\t$myscore=user::where('id',$userid)\n\t\t->select('textscore')\n\t\t->first();\n\t\t//foreach($score as $myscore){\n\t\t\t\n\t\t\treturn $myscore->textscore;\n\t//\t}\n\t\t\n\t}", "title": "" }, { "docid": "89cd5dc3a484b675237a7badec310a95", "score": "0.52685124", "text": "function computeTeamMemberScore(User $user)\n {\n /** @var Group $group */\n $group = $user->group;\n\n if($group == null)\n {\n return null;\n }\n\n $submittedGroupMembers = $this->getTeamMembers($group);\n\n // Addition of all the scores\n $userScore = 0;\n /** @var User $groupMember */\n foreach ($submittedGroupMembers as $groupMember)\n {\n if($groupMember->getSubmittedPeerEvaluationTeamMember($this, $user) != null)\n {\n $userScore += $groupMember->getSubmittedPeerEvaluationTeamMember($this, $user)->grade;\n //echo 'Score:'.$groupMember->name.':'.$groupMember->getSubmittedPeerEvaluationTeamMember($this, $user)->grade.'<br/>';\n }\n }\n\n // Average score\n $userScore = $userScore / $submittedGroupMembers->count();\n //echo 'User Score Total:'.$userScore.'<br/>';\n\n $allGroupMembers = $this->getAllTeamMembers($group);\n // 100% contribution score\n $fullContributionScore = 100 / $allGroupMembers->count();\n //echo 'Full Contribution Score:'.$fullContributionScore.'<br/>';\n\n // Actual score\n $score = round(($userScore / $fullContributionScore) * 100, 2);\n //echo 'Actual Score:'.$score.'<br/>';\n\n if($score > 100)\n {\n //$score = 100;\n }\n\n return $score;\n }", "title": "" }, { "docid": "aec4201e6de87cbf7a67e86f956d0592", "score": "0.52650124", "text": "function calcScoreBetweenPeople($p1, $p2)\n{\n global $scoreDevDev, $scoreDevMan, $scoreManDev, $scoreManMan;\n if ($p1 instanceof Developer) {\n if ($p2 instanceof Developer) {\n if (!isset($scoreDevDev[$p1->id][$p2->id])) {\n $score = getPairScore($p1, $p2);\n $scoreDevDev[$p1->id][$p2->id] = $score;\n $scoreDevDev[$p2->id][$p1->id] = $score;\n }\n } else {\n if (!isset($scoreDevMan[$p1->id][$p2->id])) {\n $score = getPairScore($p1, $p2);\n $scoreDevMan[$p1->id][$p2->id] = $score;\n $scoreManDev[$p2->id][$p1->id] = $score;\n }\n }\n }\n if ($p1 instanceof Manager) {\n if (!isset($scoreManMan[$p1->id][$p2->id])) {\n $score = getPairScore($p1, $p2);\n $scoreManMan[$p1->id][$p2->id] = $score;\n $scoreManMan[$p2->id][$p1->id] = $score;\n }\n }\n}", "title": "" }, { "docid": "67398ac35f897259c74a48a68c9abbbe", "score": "0.5257526", "text": "public function calculate(){\n \n $this->testScores = 0;\n\n for($i = 0; $i < count($this->scores); $i++){\n $this->testScores += $this->scores[$i];\n }\n\n $this->testScores = $this->testScores / count($this->scores);\n\n if((int)$this->testScores >= 90){\n\n return \"O\";\n\n } elseif((int)$this->testScores >= 80){\n\n return \"E\";\n\n } elseif((int)$this->testScores >= 70){\n\n return \"A\";\n\n } elseif((int)$this->testScores >= 55){ \n\n return \"P\";\n\n } elseif((int)$this->testScores >= 40){\n\n return \"D\";\n\n } elseif((int)$this->testScores < 40){\n\n return \"T\";\n }\n\n \n }", "title": "" }, { "docid": "32fb7a938a2b5bed7d252e88187e95b6", "score": "0.52516675", "text": "function getMaxScore() {\n return $this->maxScore;\n }", "title": "" }, { "docid": "31b947ba5e9e49399de4b6751e32cd2f", "score": "0.5251168", "text": "public function getScore($guid){\n $done = $this->JACKED->MySQL->get(\n \"function:SUM(weight) AS score\", \n $this->config->dbt_votes, \n 'target = \\'' . $guid . '\\''\n );\n if($done){\n return $done;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "80f2751b02c10e00680227b3756d2378", "score": "0.5233341", "text": "public function getScore(): float {\n return $this->isOK() ? self::MAX_SCORE : self::MIN_SCORE;\n }", "title": "" }, { "docid": "a7fb42749cbce841246020c98ee0164c", "score": "0.5227912", "text": "private function courseCalculator() {\n\t\t$file = file_get_contents('./courseList.txt', FILE_USE_INCLUDE_PATH);\n\t\t$file = explode(\",\", $file);\n\t\t$counter = count($file);\n\t\t$ListOfCourses = array();\n\t\t$count = 0;\n\t\t/** Gets course name and difficulty ranking from array and assigns them to a fixed location in the second \n\t\t * dimension of the array\n\t\t */\n\t\tfor ($i = 0; $i < $counter; $i=$i+2) {\n\t\t\t$ListOfCourses[$count][0] = $file[$i];\n\t\t\t$ListOfCourses[$count][1] = $file[$i+1];\n\t\t\t$count++;\n\t\t}\n\t\t$courseNameDifficulty = 0;\n\t\t/** Goes through the array of courses */\n\t\tfor ($i = 0; $i < count($ListOfCourses); $i++) {\n\t\t\t$a = $ListOfCourses[$i][0];\n\t\t\t/** If the course that the user entered matches one in the array, then that course's difficulty is now\n\t\t\t * courseNameDifficulty\n\t\t\t */\n\t\t\tif (strpos($a, $this->studentCourse) !== false) {\n\t\t\t\t$courseNameDifficulty = $courseNameDifficulty + $ListOfCourses[$i][1];\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn $courseNameDifficulty;\n\t}", "title": "" }, { "docid": "d4e534b21d4f6a92bf70b062d86b76ea", "score": "0.5227828", "text": "public function maxScore()\n {\n return $this->test->maxScore();\n }", "title": "" }, { "docid": "e1c61796ab26995d62122c487290db72", "score": "0.52226055", "text": "private function calculateScorePerRound(){\n\n $allRound = $this->userProgress->getAllRound();\n if ($allRound === 0){\n return 0;\n }else{\n return round($this->userProgress->getScore() / ($allRound));\n }\n }", "title": "" }, { "docid": "0861ca80ddeba70c9150098d869394b5", "score": "0.5221351", "text": "function evaluate(&$tr, $sectionName) {\n // Calculate score from non-compiler tests\n $score = $this->initScore + $tr->sumValues($sectionName);\n $compiles = $tr->getProperty(\"compiles\");\n $warnings = $tr->getProperty(\"warnings\");\n if (!$compiles) {\n $score = 0;\n } else if ($warnings > 1) { // sumValues takes off first point 10/31/16\n $score -= $warnings; // 1 point each warning\n if ($score < 1) $score = 1;\n }\n return $score;\n }", "title": "" }, { "docid": "9724f8f53e41beabc4201c0c0099a528", "score": "0.5219297", "text": "function countHightestGameScoreByUserId($user_id)\n{\n $query=\"select user_id,sum(leader_board_score) as game_score from game_score_leaderboard where user_id=$user_id order by leader_board_score DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "639c50e9bd9df6b2057316345f3f63b4", "score": "0.51978856", "text": "public function minScore()\n {\n return $this->test->minScore();\n }", "title": "" }, { "docid": "ab6f0e198c74290c090a77820959e613", "score": "0.5195113", "text": "public function getScore($combinaison)\n {\n return COMBINAISONS_POINTS[$combinaison];\n }", "title": "" }, { "docid": "63b03d38e6ad25b330e7617d9f0c1563", "score": "0.51642346", "text": "function smarty_modifier_normalize_relevance($score, $maxScore)\n{\n $result = ($score / $maxScore) * 100;\n\n $modifier = 1;\n while(($maxScore * 10) < 1) {\n $modifier *= 2;\n $maxScore *= 10;\n }\n $result /= $modifier;\n\n $relevance = 25;\n if($result > 75) {\n $relevance = 100;\n }\n elseif($result > 50) {\n $relevance = 75;\n }\n elseif($result > 25) {\n $relevance = 50;\n }\n elseif($result > 12) {\n $relevance = 25;\n }\n\n return $relevance;\n}", "title": "" }, { "docid": "2f34c904a52a8bc47e3d3569802345ac", "score": "0.5164194", "text": "function compute_score($friend_1, $friend_2, $tf, $term_list, $idf) {\n\n\t$sumxx = .0001;\n\t$sumxy = .0001;\n\t$sumyy = .0001;\n\t$x = .0001;\n\t$y = .0001;\n\t$count = 0;\n\n\tforeach($term_list as $term) {\n\t\t\n\t\tif (array_key_exists($term, $tf[$friend_1]) === True && array_key_exists($term, $idf) === True) {\n\t\t\t$x = $tf[$friend_1][$term]*$idf[$term];\n\t\t\t$count++;\n\t\t} else {\n\t\t\t$x = 0;\n\t\t}\n\t\tif (array_key_exists($term, $tf[$friend_2]) === True && array_key_exists($term, $idf) === True) {\n\t\t\t$y = $tf[$friend_2][$term]*$idf[$term];\n\t\t\t$count++;\n\t\t} else {\n\t\t\t$y = 0;\n\t\t}\n\n\t\t$sumxx += $x * $x;\n\t\t$sumxy += $x * $y;\n\t\t$sumyy += $y * $y;\t\n\t\n\t}\n\n\t//echo \"Total number of non-zero calculations: \" . $count . \"\\n\"; \n\n\treturn $sumxy/sqrt($sumxx*$sumyy);\n\n}", "title": "" }, { "docid": "ed9075ae7a37475e95b6afdc1c815994", "score": "0.5162754", "text": "public static function scoring($category)\n\t{\n\t\t$games = new Games();\n\t\t$players = new Players();\n\t\t$config = Config::instance();\n\n\t\t// Check it's a valid category\n\t\tif (!in_array($category, array_column($config->categories, 0)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get a list of players and set up default values\n\t\t$results = array();\n\t\tforeach($players->getPresent() AS $p)\n\t\t{\n\t\t\t$results[$p['PlayerID']] =\n\t\t\t\t\t\tarray_merge($p, [\n\t\t\t\t'TotalPoints' => 0,\n\t\t\t\t'Points' => [],\n\t\t\t\t'RankStr' => '',\n\t\t\t]);\n\t\t}\n\n\t\t// Step through each complete round\n\t\tfor($i = 1; $i <= $games->getLastCompleteResults(); $i++)\n\t\t{\n\t\t\t// Get the results for this round\n\t\t\tforeach($games->getRoundResults($i) AS $r)\n\t\t\t{\n\t\t\t\t// Sum the total points for this category\n\t\t\t\t$results[$r['PlayerID']]['TotalPoints'] += $r[$category];\n\t\t\t\t// Set the points for this category in this round\n\t\t\t\t$results[$r['PlayerID']]['Points'][$i] = (int) $r[$category];\n\n\t\t\t\t// Regenerate the RankStr\n\t\t\t\t$results[$r['PlayerID']]['RankStr'] =\n\t\t\t\t\t\t// Most significant: total points\n\t\t\t\t\t\t// Next: highest score\n\t\t\t\t\t\tsprintf('%04d%04d',\n\t\t\t\t\t\t\t\t$results[$r['PlayerID']]['TotalPoints'],\n\t\t\t\t\t\t\t\tmax($results[$r['PlayerID']]['Points']));\n\t\t\t}\n\t\t}\n\n\t\t// Sort by RankStr\n\t\tusort($results, function(&$a, &$b) {\n\t\t\tif ($a['RankStr'] != $b['RankStr'])\n\t\t\t{\n if ($a['TotalPoints'] != $b['TotalPoints'])\n {\n return $a['TotalPoints'] < $b['TotalPoints'] ? 1 : -1;\n } else {\n return max($a['Points']) < max($b['Points']) ? 1 : -1;\n }\n#\t\t\t\treturn $a['RankStr'] < $b['RankStr'] ? 1 : -1;\n\t\t\t} else {\n\t\t\t\treturn Sorting::byName($a, $b);\n\t\t\t}\n\t\t});\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "5e907e3dbe0e966307b5c3b54d6a482a", "score": "0.51616454", "text": "public function getEightsAndHigherPerson($member_id)\n {\n $sql = $this->rpsdb->prepare(\"SELECT\n c.Competition_Date,\n c.Classification,\n if(c.Classification = 'Beginner', 1,\n if(c.Classification = 'Advanced', 2,\n if(c.Classification = 'Salon', 3, 0))) AS \\\"Class_Code\\\",\n c.Medium,\n e.Title,\n e.Server_File_Name,\n e.Award,\n e.Member_ID\nFROM competitions c, entries e\nWHERE c.ID = e.Competition_ID AND\n e.Member_ID = %s AND\n e.Score >= 8\nORDER BY c.Competition_Date, Class_Code, c.Medium, e.Score\",\n $member_id);\n $result = $this->rpsdb->get_results($sql, ARRAY_A);\n $return = $this->mapArrayEntry($result);\n\n return $return;\n }", "title": "" }, { "docid": "365658c0d44cdad4d4c939f51ac7944c", "score": "0.5159791", "text": "function getPercentageScore($maxPts, $pts)\n{\n return round((intval($pts)*100)/intval($maxPts), 2);\n}", "title": "" }, { "docid": "a957b869a7a984d853f9d19f4d7b9be4", "score": "0.51555645", "text": "function quiz_get_best_grade($quizid, $userid) {\n if (!$grade = get_record(\"quiz_grades\", \"quiz\", $quizid, \"userid\", $userid)) {\n return \"\";\n }\n\n return (round($grade->grade,0));\n}", "title": "" }, { "docid": "04d7fb0a9f02735558288bcb739464cc", "score": "0.5121464", "text": "public function getScore() : int {\n return $this->grid->getScore();\n }", "title": "" }, { "docid": "5d7b85527e9a31685270aebe75726c1a", "score": "0.51180476", "text": "public function getMaxLevelsScore() {\n $sql = 'SELECT SUM(`value`) AS `score`\n FROM levels\n INNER JOIN levels_data\n ON levels_data.level_id = levels.level_id AND levels_data.key = \"reward\"';\n $st = $this->db->prepare($sql);\n $st->execute();\n $row = $st->fetch();\n\n return $row->score;\n }", "title": "" }, { "docid": "9b8d268f223f33c359fa4d3c2b9a6f94", "score": "0.51172745", "text": "function get_user_score_for_level($user_id){\n \tglobal $DB;\n\t\t$DB->query_exec(\"SELECT score_for_level FROM users WHERE id = '{$user_id}'\");\n\t\t$total_score = $DB->fetch();\n\t\t$total_score = $total_score[0]['score_for_level'];\n\t\treturn $total_score;\n }", "title": "" }, { "docid": "82b564b527428547d289eb81137e22dc", "score": "0.51100475", "text": "private function getPenaltyScore()\n {\n $result = 0;\n\n // Adjacent modules in row having same color, and finder-like patterns\n for ($y = 0; $y < $this->size; $y++) {\n $runColor = false;\n $runX = 0;\n $runHistory = [0, 0, 0, 0, 0, 0, 0];\n $padRun = $this->size;\n for ($x = 0; $x < $this->size; $x++) {\n if ($this->modules[$y][$x] == $runColor) {\n $runX++;\n if ($runX == 5) {\n $result += self::PENALTY_N1;\n } elseif ($runX > 5) {\n $result++;\n }\n } else {\n self::finderPenaltyAddHistory($runX + $padRun, $runHistory);\n $padRun = 0;\n if (!$runColor) {\n $result += $this->finderPenaltyCountPatterns($runHistory) * self::PENALTY_N3;\n }\n $runColor = $this->modules[$y][$x];\n $runX = 1;\n }\n }\n $result += $this->finderPenaltyTerminateAndCount($runColor, $runX + $padRun, $runHistory) * self::PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for ($x = 0; $x < $this->size; $x++) {\n $runColor = false;\n $runY = 0;\n $runHistory = [0, 0, 0, 0, 0, 0, 0];\n $padRun = $this->size;\n for ($y = 0; $y < $this->size; $y++) {\n if ($this->modules[$y][$x] == $runColor) {\n $runY++;\n if ($runY == 5) {\n $result += self::PENALTY_N1;\n } elseif ($runY > 5) {\n $result++;\n }\n } else {\n self::finderPenaltyAddHistory($runY + $padRun, $runHistory);\n $padRun = 0;\n if (!$runColor) {\n $result += $this->finderPenaltyCountPatterns($runHistory) * self::PENALTY_N3;\n }\n $runColor = $this->modules[$y][$x];\n $runY = 1;\n }\n }\n $result += $this->finderPenaltyTerminateAndCount($runColor, $runY + $padRun, $runHistory) * self::PENALTY_N3;\n }\n\n // 2*2 blocks of modules having same color\n for ($y = 0; $y < $this->size - 1; $y++) {\n for ($x = 0; $x < $this->size - 1; $x++) {\n $color = $this->modules[$y][$x];\n if ($color == $this->modules[$y][$x + 1]\n && $color == $this->modules[$y + 1][$x]\n && $color == $this->modules[$y + 1][$x + 1]\n ) {\n $result += self::PENALTY_N2;\n }\n }\n }\n\n // Balance of black and white modules\n $black = 0;\n foreach ($this->modules as $row) {\n foreach ($row as $color) {\n if ($color) {\n $black++;\n }\n }\n }\n $total = $this->size * $this->size; // Note that size is odd, so black/total != 1/2\n // Compute the smallest integer k >= 0 such that (45-5k)% <= black/total <= (55+5k)%\n $k = \\ceil(\\abs($black * 20 - $total * 10) / $total) - 1;\n $result += $k * self::PENALTY_N4;\n\n return $result;\n }", "title": "" }, { "docid": "1a639d7e21c69c6b96806281f7c56c5e", "score": "0.5078414", "text": "function evaluate(&$tr, $sectionName) {\n $each = $this->each;\n $eachLate = $this->eachLate;\n $eachWrong = $this->eachWrong;\n $totalProblems = $tr->getProperty(\"totalProblems\");\n $correctOnTime = $tr->getProperty(\"correctOnTime\");\n $correctLate = $tr->getProperty(\"correctLate\");\n $wrong = $tr->getProperty(\"incorrect\");\n $missingCodeLab = $tr->getProperty(\"missingCodeLab\");\n //var_dump($totalProblems, $correctOnTime, $correctLate, $wrong, $missingCodeLab);\n //echo \"each=$each, eachLate=$eachLate, eachWrong=$eachWrong\\n\";\n\n // Calculate max score\n $maxCodeLab = $totalProblems * max($each, $eachLate, $eachWrong);\n if ($this->maxScore <= 0) {\n $this->maxScore = $maxCodeLab;\n }\n\n // Calculate score from non-CodeLab exercises\n $score = $this->initScore + $tr->sumValues($sectionName);\n\n // Calculate CodeLab contribution to score\n $actualCodeLab = $correctOnTime * $each + $correctLate * $eachLate\n + $wrong * $eachWrong;\n $score = ceil($score - ($maxCodeLab - $actualCodeLab));\n if ($score > $this->maxScore) $score = $this->maxScore;\n if ($score < $this->minScore) $score = $this->minScore;\n //echo \"score=$score, maxCodeLab=$maxCodeLab actualCodeLab=$actualCodeLab\\n\";\n\n // Additional messages\n if (1 == $missingCodeLab) {\n $msg = \"Not registered with CodeLab\";\n $score = 0; // added 9/10/2018\n $tr->add($sectionName, \"CodeLabTest\", $msg, 0);\n } else if ($score < $this->maxScore) {\n $eachRound3 = round($each, 3);\n $msg = \"CodeLab correct on time: $correctOnTime / $totalProblems (x$eachRound3 each)\";\n $tr->add($sectionName, \"CodeLabTest\", $msg, 0);\n }\n// if ($eachWrong !== 0 && $wrong > 0 && $score < $this->maxScore) {\n if ($wrong > 0 && $score < $this->maxScore) { // 2/11/2019\n $eachWrongRound3 = round($eachWrong, 3);\n $msg = \"CodeLab incorrect but attempted: $wrong ($eachWrongRound3 each)\";\n $tr->add($sectionName, \"CodeLabTest\", $msg, 0);\n }\n if ($eachLate !== 0 && $correctLate > 0 && $score < $this->maxScore) {\n $eachLateRound3 = round($eachLate, 3);\n $msg = \"CodeLab correct but late: $correctLate ($eachLateRound3 each)\";\n $tr->add($sectionName, \"CodeLabTest\", $msg, 0);\n }\n\n return $score;\n }", "title": "" }, { "docid": "053324d31ee3da507e4d3aec353515e8", "score": "0.5074204", "text": "public function getScore() \n {\n return $this->score;\n }", "title": "" }, { "docid": "e8baa2709137a863a09341f2bd355b68", "score": "0.50723624", "text": "function get_efficiency($ids) {\r\n\tglobal $DB, $CFG;\r\n\t\r\n\t// Gets the stats by criteria\r\n\t$sqlcriteria = \"\n\t\t\t\tSELECT co.fullname,\n\t\t\t\tco.id AS courseid,\n\t\t\t\te.id AS emarkingid,\n\t\t\t\ta.id AS criterionid,\n\t\t\t\ta.description,\n\t\t\t\tround(avg(b.score),1) AS avgscore,\n\t\t\t\tround(stddev(b.score),1) AS stdevscore,\n\t\t\t\tround(min(b.score),1) AS minscore,\n\t\t\t\tround(max(b.score),1) AS maxscore,\n\t\t\t\tround(avg(b.score)/t.maxscore,1) AS effectiveness,\n\t\t\t\tt.maxscore AS maxcriterionscore\n\t\n\t\t\t\tFROM {emarking_submission} AS s\n\t\t\t\tINNER JOIN {emarking} AS e ON (s.emarking IN ($ids) AND s.emarking=e.id)\n\t\t\t\tINNER JOIN {emarking_draft} AS dr ON (s.id=dr.submissionid AND dr.qualitycontrol=0 AND dr.status >= 20)\n\t INNER JOIN {course_modules} AS cm ON e.id=cm.instance\n\t\t\t\tINNER JOIN {context} AS c ON cm.id=c.instanceid\n\t\t\t\tINNER JOIN {grading_areas} AS ga ON c.id=ga.contextid\n\t\t\t\tINNER JOIN {grading_definitions} AS gd ON ga.id=gd.areaid\n\t\t\t\tINNER JOIN {grading_instances} AS i ON (gd.id=i.definitionid)\n\t\t\t\tINNER JOIN {gradingform_rubric_fillings} AS f ON i.id=f.instanceid\n\t\t\t\tINNER JOIN {gradingform_rubric_criteria} AS a ON f.criterionid=a.id\n\t\t\t\tINNER JOIN {gradingform_rubric_levels} AS b ON f.levelid=b.id\n\t\t\t\tINNER JOIN (SELECT s.id AS emarkingid,\n\t\t\t\t a.id AS criterionid,\n\t\t\t\t max(l.score) AS maxscore\n\t\t\t\t FROM {emarking} AS s\n\t\t\t\t\t\t\tINNER JOIN {course_modules} AS cm ON (s.id = cm.instance)\n\t\t\t\t\t\t\tINNER JOIN {context} AS c ON (c.instanceid = cm.id)\n\t\t\t\t\t\t\tINNER JOIN {grading_areas} AS ar ON (ar.contextid = c.id)\n\t\t\t\t\t\t\tINNER JOIN {grading_definitions} AS d ON (ar.id = d.areaid)\n\t\t\t\t\t\t\tINNER JOIN {gradingform_rubric_criteria} AS a ON (d.id = a.definitionid)\n\t\t\t\t\t\t\tINNER JOIN {gradingform_rubric_levels} AS l ON (a.id = l.criterionid)\n\t\t\t\t\t\t\tGROUP BY s.id, l.criterionid) AS t ON (s.emarking=t.emarkingid AND a.id = t.criterionid)\n\t\t\t\tINNER JOIN {course} AS co ON e.course=co.id\n\t\t\t\tGROUP BY s.emarking,a.id\n\t\t\t\tORDER BY a.description,emarkingid\";\r\n\t\r\n\t$criteriastats = $DB->get_recordset_sql ( $sqlcriteria );\r\n\t$count = count ( $criteriastats );\r\n\t\r\n\t$parallels_names_criteria = '';\r\n\t$effectiveness = array ();\r\n\t$effectivenessnum = 0;\r\n\t$effectivenesscriteria = array ();\r\n\t$effectivenesseffectiveness = array ();\r\n\t$lastdescription = random_string ();\r\n\t$lastcriteria = '';\r\n\t$parallels_ids = array ();\r\n\tforeach ( $criteriastats as $stats ) {\r\n\t\t\r\n\t\tif (! isset ( $parallels_ids [$stats->courseid] )) {\r\n\t\t\t$parallels_names_criteria .= \"'$stats->fullname (N=$count)',\";\r\n\t\t\t$parallels_ids [$stats->courseid] = $stats->fullname;\r\n\t\t}\r\n\t\t$description = trim ( preg_replace ( '/\\s\\s+/', ' ', $stats->description ) );\r\n\t\t$criteriaid = $stats->criterionid;\r\n\t\t// FIXME fix when the name of two descriptions are the same\r\n\t\tif ($lastdescription !== $description) {\r\n\t\t\t\r\n\t\t\t$effectivenesscriteria [0] [\"criterion\" . $effectivenessnum] = $description;\r\n\t\t\t$effectivenesscriteria [0] [\"count\"] = $effectivenessnum + 1;\r\n\t\t\t$lastdescription = $description;\r\n\t\t}\r\n\t\t$effectivenesseffectiveness [0] [\"rate\" . $effectivenessnum] = $stats->effectiveness;\r\n\t\t$effectivenessnum ++;\r\n\t}\r\n\t\r\n\treturn array (\r\n\t\t\t$effectivenesscriteria,\r\n\t\t\t$effectivenesseffectiveness \r\n\t);\r\n}", "title": "" }, { "docid": "05d175d06218b5b56a10ca7af125db86", "score": "0.50664604", "text": "function get_highest_score_rows($allrows, $lookingfor)\n {\n $bestResponse = array();\n $last_high_score = 0;\n $tmpArr = array();\n //loop through the results\n foreach ($allrows as $all => $subrow)\n {\n if (!isset ($subrow['score']))\n {\n continue;\n }\n elseif ($subrow['score'] > $last_high_score)\n {\n $tmpArr = array();\n //if higher than last score then reset tmp array and store this result\n $tmpArr[] = $subrow;\n $last_high_score = $subrow['score'];\n }\n elseif ($subrow['score'] == $last_high_score)\n {\n //if same score as current high score add to array\n $tmpArr[] = $subrow;\n }\n }\n //there may be any number of results with the same score so pick any random one\n $bestResponse = (count($tmpArr) > 0) ? $tmpArr[array_rand($tmpArr)] : false;\n if (false !== $bestResponse) $bestResponse['template'] = get_winning_category($bestResponse['aiml_id']);\n $cRes = count($tmpArr);\n runDebug(__FILE__, __FUNCTION__, __LINE__, \"Best Responses: \" . print_r($tmpArr, true), 4);\n runDebug(__FILE__, __FUNCTION__, __LINE__, \"Will use randomly picked best response chosen out of $cRes responses with same score: \" . $bestResponse['aiml_id'] . \" - \" . $bestResponse['pattern'], 2);\n //return the best response\n return $bestResponse;\n }", "title": "" }, { "docid": "1677ca05bbdf2649e46b83ffa43e0c5d", "score": "0.5060287", "text": "public function calculate()\n\t{\n\t\t$calculated = $this->shouldUseAvg() ? $this->average() : $this->subtract();\n\n\t\treturn $this->determineScore($calculated);\n\t}", "title": "" }, { "docid": "8a767b65d22c83044d860598c33bf856", "score": "0.50598055", "text": "function getHightestGameScoreLeaderBoard()\n{\n $query=\"SELECT gsl.user_id as user_id,gu.user_name AS user_name,gu.photo AS user_image,gsl.leader_board_score AS game_score\n FROM\n game_score_leaderboard gsl\n INNER JOIN glogin_users gu \n ON (gsl.user_id = gu.id) ORDER BY game_score DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "016963dc0927cfacd457726d414ca07f", "score": "0.50430614", "text": "function getScore()\n{\n global $REQUESTS, $ORIGINAL_VIDEOS, $ENDPOINTS;\n $score = 0;\n $totQty = 0;\n foreach ($REQUESTS as $request) {\n $video = $ORIGINAL_VIDEOS[$request->videoId];\n $endpoint = $ENDPOINTS[$request->endpointId];\n $dcLatency = $endpoint->dcLatency;\n $saved = 0;\n foreach ($video->inCaches as $cache) {\n if ($endpoint->cacheLatencies[$cache->id])\n $saved = max($saved, ($dcLatency - $endpoint->cacheLatencies[$cache->id]));\n }\n $score += $saved * $request->quantity;\n $totQty += $request->quantity;\n }\n return floor($score / $totQty * 1000);\n}", "title": "" }, { "docid": "90e3881d40158469e8a4ae4fe495f590", "score": "0.50402737", "text": "public function getScoreInfo(): array\n {\n return $this->results;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.50360847", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "7605cb2a37e4223b2d6ff1e1c18ce231", "score": "0.5025373", "text": "private function scoreSubjects()\n {\n $this->updateJobStatus(\"Scoring {$this->context}s\", true);\n $outputMsgs = [];\n\n $subjectCount = count($this->subjects);\n if ($subjectCount) {\n $criteria = $this->ranking->formula->criteria;\n $this->createProgressBar(count($this->subjects) * count($criteria));\n\n foreach ($criteria as $criterion) {\n $metricId = $criterion->metric_id;\n $weight = $criterion->weight;\n list($minValue, $maxValue) = $this->getValueRange($metricId);\n if (!isset($minValue)) {\n $this->incrementProgressBar($subjectCount);\n continue;\n }\n $step = 1;\n foreach ($this->subjects as &$subject) {\n /** @var School|SchoolDistrict $subject */\n foreach ($subject->statistics as $statistic) {\n if ($statistic->metric_id != $metricId) {\n continue;\n }\n $value = $statistic->numeric_value;\n $metricScore = ($value / $maxValue) * $weight;\n $subject->score += $metricScore;\n $outputMsgs[] = \"Metric $metricId score for $subject->name: $metricScore\";\n }\n\n $this->incrementProgressBar();\n $overallProgress = $this->getOverallProgress($step, count($this->subjects));\n $this->updateJobProgress($overallProgress);\n $step++;\n }\n }\n }\n\n $this->getIo()->overwrite(' - Done');\n $this->getIo()->out('Results:');\n foreach ($outputMsgs as $outputMsg) {\n $this->getIo()->out(\" - $outputMsg\");\n }\n }", "title": "" }, { "docid": "c5ef43fe97adb5a0fe60dc7d703e5de9", "score": "0.5022733", "text": "private function getScoreMax()\n\t{\n\t\treturn self::SCORE_MAX;\n\t}", "title": "" }, { "docid": "75b65949f53f2e130871fe18878bad32", "score": "0.5011962", "text": "public function getScore()\n\t{\n\t\treturn $this->score;\n\t}", "title": "" }, { "docid": "766065285882db4a65aaf44fa535d308", "score": "0.5003227", "text": "public function computeS()\n {\n $a = $this->st;\n\n\n // Get the 'score voor' attribute\n $b = $this->st;\n\n\n // Compute the difference and return the result\n return $a - $b;\n }", "title": "" }, { "docid": "a410f8f0aa2111f16e3ce25323e21722", "score": "0.49980548", "text": "public function getSectionTotalStudent()\n {\n $total_students = Student::whereClass($this->class)\n ->whereSection($this->section)->count();\n\n return $total_students;\n }", "title": "" }, { "docid": "b2722ac90dc25f8bcecd1c5913e4bea2", "score": "0.499522", "text": "public function testOverallRank()\n {\n $this->Percentile = new PercentileController();\n $file = WWW_ROOT.'files/students-test.csv'; //Support txt or csv files. //Get the Students ID, name & GPA Details\n $studentData = $this->Percentile->readFile($file);\n\n $percentileModel = new Percentile();\n //Call Student Entity\n $studentsDataArray = $percentileModel->constructData($studentData);\n\n $students = $this->Percentile->calculatePercentile($studentsDataArray);//print_r($students); exit;\n\t\t$results = array();\n foreach ($students as $key => $value)\n {\n $results[$key] = array($value['name'],$value['gpa'],$value['percentile']);\n }\n $this->assertEquals($this->studentList, $results);\n }", "title": "" }, { "docid": "4c31a0d1e21904c9f8b6313e8be35990", "score": "0.4983844", "text": "function calculateTeamScore($team) {\n\t$score = 0;\n\tfor ($i = 0; $i < count($team); $i++) {\n\t\t$score += $team[$i]['weight'];\n\t}\n\treturn $score;\n}", "title": "" }, { "docid": "90568fb1a081b4d422757b4dc0347fa5", "score": "0.49807814", "text": "public function getScore(){\n\t\t$base = 30; //Ben's request\n\t\t$passes = $this->printreport == null ? 0 : $this->printreport->PASS;\n\t\t$lines = 0; //for quantity of all lines\n\t\tforeach($this->reportLines as $line) {\n\t\t\t$lines += $line->QUANTITY;\n\t\t}\n\t\treturn $base + $passes * $lines;\n\t}", "title": "" }, { "docid": "85bdcab9857a51e7a481d8426493fdf8", "score": "0.49779445", "text": "public function getTotalScore()\n {\n return $this->totalScore;\n }", "title": "" }, { "docid": "c42abe1d1a6e7fb61b2a6225e2ef27f5", "score": "0.4970122", "text": "public function calculate(){\n\n $average = array_sum($this->testScores) / count($this->testScores);\n\n if($average<40){\n return \"T\";\n } else if($average<55){\n return \"D\";\n }else if($average<70){\n return \"P\";\n }else if($average<80){\n return \"A\";\n }else if($average<90){\n return \"E\";\n }else if($average<=100){\n return \"O\";\n }\n }", "title": "" }, { "docid": "ec0a7627c2caca82bb693a3bf11d4780", "score": "0.4963729", "text": "public function getScore(): Score\n {\n return $this->score;\n }", "title": "" }, { "docid": "1481d922978d2eb93df3708e9c10c134", "score": "0.4962417", "text": "public function getScore()\r\n {\r\n return $this->score;\r\n }", "title": "" }, { "docid": "73ff8a84b463e982635aed537fa089c7", "score": "0.4954575", "text": "public function getScore() {\n return $this->score;\n }", "title": "" }, { "docid": "73ff8a84b463e982635aed537fa089c7", "score": "0.4954575", "text": "public function getScore() {\n return $this->score;\n }", "title": "" }, { "docid": "3e8abbd20ce03399b8b5e88ce0108b89", "score": "0.495097", "text": "function performIntel($data){\n extract($data);\n //Set total score to 0\n $totalScore = 0;\n \n //Calculate working score\n if($working == \"Yes\"){ //working\n if($working_hour == \"Yes\"){ //working less than 20 hours\n $totalScore += 2;\n }else{ //working more than 20 hours\n $totalScore += 3;\n }\n }else{ //not working\n $totalScore += 0;\n }\n \n //Calculate children score\n if($children == \"Yes\"){ //have children\n $totalScore += 2;\n if($children_number == \"Less than 5\"){ //have less than 5 children\n $totalScore += 2;\n }else{ //have 5 and more children\n $totalScore += 5;\n }\n \n if($children_age == \"0 - 12\"){ //last child is between 0 and 12 years\n $totalScore += 5;\n }else{ //last child is above 12 years\n $totalScore += 3;\n }\n \n if($children_help == \"Yes\"){ //have help with child\n $totalScore += -1;\n }else{ //have no help with child\n $totalScore += 1;\n }\n }else{ //have no children\n $totalScore += 0; \n }\n \n //Calculate self motivation score\n if($self_motivation == \"Yes\"){ //have self Motivation\n $totalScore += -1;\n }else{ //have no self Motivation\n $totalScore += 1;\n }\n \n //Calculate GPA improvement score\n if($improve_gpa == \"Yes\"){ //wants to improve GPA\n $totalScore += 2;\n }else{ //doesn't wants to improve GPA\n $totalScore += 0;\n }\n \n //Calculate athlete score\n if($athlete == \"Yes\"){//An athlete\n $totalScore += 3;\n }else{//Not an athlete\n $totalScore += 0; \n }\n \n //Calculate extra curricular score\n if($extra_cirricular == \"Yes\"){//involved in extra curricular activities\n $totalScore += 2;\n }else{//not involved in extra curricular activities\n $totalScore += 0;\n }\n \n return $totalScore;\n }", "title": "" }, { "docid": "675f80f01d8086f12782c0f37a7791c4", "score": "0.4945141", "text": "public function getFittest() {\n $fittest = $this->people[0]; //create a starting point for fitness person0\n\t\t\n // Loop through individuals to find fittest\n for ($i = 0; $i < $this->size(); $i++) {\n if ($fittest->getFitness() >= $this->people[$i]->getFitness() ) {\n $fittest = $this->people[$i];\n\t\t\t\t//echo \"\\nPopulation:getFittest() is now: \".$this->people[$i]->getFitness();\n }\n\t\t\t\n }\n\t\t \n return $fittest;\n }", "title": "" }, { "docid": "0e8b4e05e96d37ced20e972927abde2f", "score": "0.4941557", "text": "function getGameScoreByUserId($user_id,$game_id)\n{\n $query=\"select user_id,game_id,user_game_score_id,createdAt,updatedAt,user_game_score from user_game_score where user_id=$user_id AND game_id=$game_id order by user_game_score_id DESC limit 0,15\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "61826c41b77e0308158729faddae9136", "score": "0.4932487", "text": "function block_ranking_get_students($limit = null) {\n global $COURSE, $DB, $PAGE;\n\n // Get block ranking configuration.\n $cfgranking = get_config('block_ranking');\n\n // Get limit from default configuration or instance configuration.\n if (!$limit) {\n if (isset($cfgranking->rankingsize) && trim($cfgranking->rankingsize) != '') {\n $limit = $cfgranking->rankingsize;\n } else {\n $limit = 10;\n }\n }\n\n $context = $PAGE->context;\n\n $userfields = user_picture::fields('u', array('username'));\n $sql = \"SELECT\n DISTINCT $userfields, r.points\n FROM\n {user} u\n INNER JOIN {role_assignments} a ON a.userid = u.id\n INNER JOIN {ranking_points} r ON r.userid = u.id AND r.courseid = :r_courseid\n INNER JOIN {context} c ON c.id = a.contextid\n WHERE a.contextid = :contextid\n AND a.userid = u.id\n AND a.roleid = :roleid\n AND c.instanceid = :courseid\n AND r.courseid = :crsid\n ORDER BY r.points DESC, u.firstname ASC\n LIMIT \" . $limit;\n $params['contextid'] = $context->id;\n $params['roleid'] = 5;\n $params['courseid'] = $COURSE->id;\n $params['crsid'] = $COURSE->id;\n $params['r_courseid'] = $COURSE->id;\n\n $users = array_values($DB->get_records_sql($sql, $params));\n\n return $users;\n}", "title": "" }, { "docid": "fcc76a472465f874203aa1d587304d93", "score": "0.49290645", "text": "public function rank(){\n $post_weight = 10;\n $tagged_weight = 10;\n $i_liked_weight = 7;\n $comment_weight = 5;\n $messages_weight = 3;\n $like_weight = 3;\n $photos_weight = 3;\n\n\n foreach($this->friend_points[\"posts\"] as $friend_id => $points){\n $this->addRankedPoints($friend_id, $points * $post_weight);\n }\n\n foreach($this->friend_points[\"comments\"] as $friend_id => $points){\n $this->addRankedPoints($friend_id, $points * $comment_weight);\n }\n\n foreach($this->friend_points[\"likes\"] as $friend_id => $points){\n $this->addRankedPoints($friend_id, $points * $like_weight);\n }\n\n foreach($this->friend_points[\"tags\"] as $friend_id => $points){\n $this->addRankedPoints($friend_id, $points * $tagged_weight);\n }\n\n foreach($this->friend_points[\"i_liked\"] as $friend_id => $points){\n $this->addRankedPoints($friend_id, $points * $i_liked_weight);\n }\n\n\n foreach($this->friend_points[\"photos\"] as $friend_id => $points){\n //cap max instances at 5\n if($points > 5){\n $points = 5;\n }\n $this->addRankedPoints($friend_id, $points * $photos_weight);\n }\n\n foreach($this->friend_points[\"messages\"] as $friend_id => $points){\n //cap max instances at 5\n if($points > 5){\n $points = 5;\n }\n $this->addRankedPoints($friend_id, $points * $messages_weight);\n }\n\n arsort($this->friend_weighted_points);\n\n return;\n }", "title": "" }, { "docid": "31c3d371c69205b4f934946c1d7f4a7c", "score": "0.49287042", "text": "function get_user_total_score($user_id){\n \tglobal $DB;\n\t\t$DB->query_exec(\"SELECT total_score FROM users WHERE id = '{$user_id}'\");\n\t\t$total_score = $DB->fetch();\n\t\t$total_score = $total_score[0]['total_score'];\n\t\treturn $total_score;\n }", "title": "" }, { "docid": "d2605c14379a45dbce078ba9094f5326", "score": "0.4921656", "text": "function selectFittest(array $generation)\n{\n\tfor($i = 0; $i < 80; $i++) {\n\t\t$test = new Test(new Map());\n\t\tforeach($generation as $ix => $bot) {\n\t\t\t$generation[$ix]['scores'][$i] = $test->runTest($bot['robot'], 150);\n\t\t}\n\t\tunset($test);\n\t}\n\tforeach($generation as $ix => $bot) {\n\t\t$generation[$ix]['avg'] = array_sum($generation[$ix]['scores']) / count($generation[$ix]['scores']);\n\t}\n\tusort($generation, 'sortByAvg');\n\treturn array_slice($generation, 0, 2);\n}", "title": "" } ]
6376b26a2162c81fbb3320e88fad664b
Connect to the database.
[ { "docid": "e9a2652486a1579bb95d10c643843a75", "score": "0.0", "text": "public function connect(array $dbconfig): void\n {\n $this->link = mysqli_connect($dbconfig[\"host\"], $dbconfig[\"user\"], $dbconfig[\"password\"], $dbconfig[\"name\"]);\n }", "title": "" } ]
[ { "docid": "dd3934e0e49bccce7c7a9c968c9fc5db", "score": "0.78343344", "text": "public function dbConnect() {\n\t}", "title": "" }, { "docid": "b941b785d0a82d47faf3842c4539ce3c", "score": "0.7798632", "text": "public function connect()\n {\n $db_connection = pg_connect(\"host=localhost dbname=DBNAME user=USERNAME password=PASSWORD\");\n }", "title": "" }, { "docid": "052d96b53c9e5ba052d99383d9dda1c7", "score": "0.7787398", "text": "private function dbConnect()\r\t{\r\t}", "title": "" }, { "docid": "256bbc26bb56111d9cb24cde3e7d5cdf", "score": "0.77249795", "text": "static function connect() {\n $config = DatabaseConfig::database();\n\n $dsn_properties = [\n 'dbname' => $config['dbname'],\n 'host' => $config['host'],\n 'port' => $config['port'],\n 'charset' => 'utf8',\n ];\n\n $dsn = 'mysql:';\n\n foreach ($dsn_properties as $property => $value)\n {\n $dsn .= \"{$property}={$value};\";\n }\n\n $dbconfig = [\n 'dsn' => $dsn,\n 'user' => $config['dbuser'],\n 'password' => $config['dbpass'],\n 'options' => array(\n PDO::ATTR_EMULATE_PREPARES => false,\n PDO::NULL_TO_STRING => false\n ),\n ];\n\n try\n {\n $db = new PDO(\n $dbconfig['dsn'],\n $dbconfig['user'],\n $dbconfig['password'],\n $dbconfig['options']\n );\n }\n\n catch (PDOException $e)\n {\n die('Failed to connect to the database<pre>' . $e->getMessage() .'</pre>');\n }\n\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n self::$_db = $db;\n }", "title": "" }, { "docid": "f281a1bc30afd1261885ffe20da92d3c", "score": "0.77167195", "text": "function connectToDB() \n {\n $this->connectToDBNewWay();\n }", "title": "" }, { "docid": "764037fed018e89ec36bbd66e1cba184", "score": "0.76822275", "text": "public function connect() {\n $db = mysql_connect(self::server, self::username, $this->password);\n\t\tif (!$db){\n\t\t\tdie('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->name, $db);\n }", "title": "" }, { "docid": "764037fed018e89ec36bbd66e1cba184", "score": "0.76822275", "text": "public function connect() {\n $db = mysql_connect(self::server, self::username, $this->password);\n\t\tif (!$db){\n\t\t\tdie('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->name, $db);\n }", "title": "" }, { "docid": "f21148ad079467bc3b3299859cead06a", "score": "0.766089", "text": "public function connect()\n {\n $this->db = $this->getContainer()->get('database')->shared(\n [\n 'connection' => 'default'\n ]\n );\n }", "title": "" }, { "docid": "d80d6d6b6b3fd71169a6db0a02aea4b1", "score": "0.76377046", "text": "public function connect() {\n\n // create a connection\n if(Validator::isa($this->connection,\"null\")) \n $this->connection = new Connection(\n $this->setup->get(\"type\"),$this->setup->get(\"host\"),\n $this->setup->get(\"port\"),$this->setup->get(\"db\"),\n $this->setup->get(\"user\"),$this->setup->get(\"pass\"),\n $this->conoptions);\n\n // set the connections database handle\n $this->connection->get();\n }", "title": "" }, { "docid": "c66dcd6758b7738feabcb4d02ef0a6a8", "score": "0.7632394", "text": "protected function _connect(): void\n {\n $this->getDbal()->connect();\n }", "title": "" }, { "docid": "b28bdb68cdce7c96f23d2dbc0746e361", "score": "0.76127", "text": "public static function connectDb ()\r\n {\r\n $dbconf = self::$dbkeyObj->getDbConfig();\r\n Wdb::connect($dbconf[\"HOST\"], $dbconf[\"PORT\"], $dbconf[\"DB_USER\"], $dbconf[\"DB_PASSWORD\"], $dbconf[\"DB_NAME\"]);\r\n Wdb::setCharset(\"utf8\");\r\n }", "title": "" }, { "docid": "f971619d4bafc24efc08df89570a9df9", "score": "0.7612084", "text": "public function connect() {\n \tif ($this->file == null) {\n \t\t\tthrow new DatabaseException('No database specified (Correct your \"connectors.xml\").',\n\t\t\t\tDatabaseException::ERR_NO_DATABASE_SPECIFIED);\n \t\t}\n \t\t\n \t\ttry {\n\t\t\t$this->dbConnection = new PDO('sqlite:' . $this->file);\t\t\t\n\t\t} catch(PDOException $exception) {\n\t\t\tthrow new DatabaseException('Establishing database connection failed (' .\n\t\t\t\t\t$exception->getMessage() . ').', \n\t\t\t\tDatabaseException::ERR_CONNECTION_FAILED);\n\t\t}\n }", "title": "" }, { "docid": "920c28770b3023b48bfaadd1b43a8b79", "score": "0.7555291", "text": "abstract function database_connect();", "title": "" }, { "docid": "5b95577a78d0218d751b70e84a02d855", "score": "0.75220776", "text": "public function connectDB() {\n\t\t$mysqlConnect = mysql_connect($this -> hostname, $this -> username, $this -> password);\n\t\t@mysql_select_db($this -> database) or die( \"Unable to select database\");\n\t}", "title": "" }, { "docid": "ffecb4f8f55bdf7f2d3300fc045f64e8", "score": "0.7511737", "text": "public function connect()\n {\n global $db;\n\n\n try\n {\n if (file_exists(self::DB_PATH))\n {\n $db = simplexml_load_file(self::DB_PATH);\n }\n else\n {\n throw new Exception(\"Error: Cannot connect to database!\");\n }\n\n\n if (!$db)\n {\n throw new Exception('Error: Cannot open database!');\n }\n }\n catch (Exception $e)\n {\n echo '<div>' . $e->getMessage() . '</div>';\n }\n }", "title": "" }, { "docid": "3c2488c74b034b74b7b9584c444f942f", "score": "0.74991786", "text": "protected function connectToDB() {\n\t\ttry {\n\t\t\t$this->dbh = new PDO(MYSQL_DSN, DB_USERNAME, DB_PASSWORD);\n\t\t\t$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch (PDOException $e) {\n \t\terror_log(\"FeedAggregator::DBManager::connectToDB: \".$e->getMessage(), 0);\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "60da71b929f440eb69878d8fdcaf42ec", "score": "0.7495118", "text": "public function connect() {\n\t\t$this->db = @mysqli_connect(DATABASE_HOSTNAME, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME);\n\t\tif (mysqli_connect_errno($this->db)) {\n\t\t\techo \"<h1>DATABASE ERROR! (see the serverlog for more informations)</h1>\";\n\t\t\terror_log(\"[trans2late] DB connection failed: \".mysqli_error($this->db));\n\t\t}\n\t\t$this->db->set_charset(\"utf8\");\n\t}", "title": "" }, { "docid": "760a85832763cb5b63f9e6667c10a725", "score": "0.74862146", "text": "public function connect()\n {\n if (Cache::isConnected($this->defaultConnection, 'mysql') === false) {\n $db = $this->prepareConnection();\n $dsn = $this->getDsn($db);\n $pdo = $this->createConnection($dsn);\n $this->configureEncoding($pdo, $db);\n $this->configureTimezone($pdo, $db);\n\n // Cache the connection\n Cache::cacheConnection($this->defaultConnection, 'mysql', $pdo);\n }\n }", "title": "" }, { "docid": "6bdf4f63b250c2da54ed48ee876ee44d", "score": "0.7456926", "text": "function connect()\n\t{\n\t\t$this->connection_write = $this->db_connect();\n\t\t$this->multiserver = false;\n\t\t$this->connection_read =& $this->connection_write;\n\t\t$this->database = DB_DATABASE;\n\t\tif ($this->connection_write)\n\t\t{\n\t\t\t$this->select_db($this->database);\n\t\t}\n\t}", "title": "" }, { "docid": "2a9ed88940d297d6e37cbf94c4d83b63", "score": "0.74511725", "text": "private function connectDB()\n\t{\n\t\t$o_dbconfig = new ConfigDB();\n\t\t$v_dbconfig = $o_dbconfig->listDBConfig();\n\t\t\n\t\tif(count($v_dbconfig))\n\t\t{\n\t\t\t$this->o_db = new DDDatabase();\n\t\t\tforeach($v_dbconfig AS $key => $value)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->o_db->setConnectSettings($key, $value);\n\t\t\t\t}\n\t\t\t\tcatch (DDDException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->output($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c9870340eab16fefdeaa65432d92ce8a", "score": "0.74476534", "text": "protected function connect()\n {\n\n $pgsql_con_string = 'host='.$this->conf['dbhost']\n .' port='.$this->conf['dbport']\n .' dbname='.$this->conf['dbname']\n .' user='.$this->conf['dbuser']\n .' password='.$this->conf['dbpwd'];\n\n $this->dbUrl = $this->conf['dbhost'];\n $this->dbPort = $this->conf['dbport'];\n $this->databaseName = $this->conf['dbname'];\n $this->dbUser = $this->conf['dbuser'];\n $this->dbPwd = $this->conf['dbpwd'];\n\n if (DEBUG) {\n $pgsql_con_debug = 'host='.$this->conf['dbhost']\n .' port='.$this->conf['dbport']\n .' dbname='.$this->conf['dbname']\n .' user='.$this->conf['dbuser']\n .' password=******************';\n\n Log::config('PG: Constring '.$pgsql_con_debug);\n }\n\n if (Log::$levelConfig)\n Log::config('DbVerbindungsparameter: '. $pgsql_con_string);\n\n if (!$this->connectionRead = pg_pconnect($pgsql_con_string)) {\n\n throw new LibDb_Exception\n (\n 'Konnte Die Datenbank Verbindung nicht herstellen :'.pg_last_error(),\n $pgsql_con_string\n );\n\n }\n\n $this->connectionWrite = $this->connectionRead;\n\n if ($this->schema) {\n $this->setSearchPath($this->schema);\n } elseif (isset($this->conf['dbschema'])) {\n $this->schema = $this->conf['dbschema'];\n $this->setSearchPath($this->conf['dbschema']);\n } else {\n $this->schema = 'public';\n }\n\n }", "title": "" }, { "docid": "d99b2acaed98c82252cda0f8e2c35379", "score": "0.74189115", "text": "protected function connectDatabase()\n {\n if (!$this->databaseConfig) {\n return null;\n }\n\n $this->databaseConnection = ConnectionManager::create($this->databaseConfig);\n }", "title": "" }, { "docid": "88502bfda79d83bf8181ca6a65030956", "score": "0.7407679", "text": "private function connection()\n\t{\n\t\t//echo \"Creating new connection.\\n\";\n\t\ttry\n\t\t{\n\t\t\t//create or open the database\n\t\t\t$this->_db_handle = new PDO($this->_db_conf['connection']);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo $e->getMessage().\"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "5f5b64812fcdee86afa094ef9a325895", "score": "0.7401215", "text": "private function openDatabaseConnection()\n {\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "b799e06cbe83702ec02674e2702e24d7", "score": "0.7377568", "text": "private static function connectToDatabase()\n {\n $db_dsn = 'mysql:host=localhost;dbname=php';\n $db_username = 'php';\n $db_password = 'php';\n\n try {\n self::$db = new PDO($db_dsn, $db_username, $db_password);\n self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "eedfe3d5b764023c075605071cccdbd0", "score": "0.7365142", "text": "public function connect() {\n\t\t$dsn = \"mysql:host=\".self::HOST.\";dbname=\".self::DBNAME.\";charset=utf8mb4\";\n\t\t$options = [\n\t\t\tPDO::ATTR_EMULATE_PREPARES => false,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\tPDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n\t\t];\n\t\ttry {\n\t\t\t$pdo = new PDO($dsn, self::USER, self::PWD, $options);\n\t\t\techo \"Connected\";\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage());\n\t\t\texit('Something weird happened');\n\t\t}\n\t}", "title": "" }, { "docid": "e43028df5552929d2d525f52d7efa8cd", "score": "0.7361764", "text": "static function connectToDb() {\n CommonDao::requireFileIn(\"/../util/\", \"config.php\");\n if (ConfigUtil::isProduction()) {\n $dbUser = \"rotiss_kebrahim\";\n $dbPass = \"timebomb\";\n } else {\n $dbUser = \"root\";\n $dbPass = \"karma\";\n }\n\n $dbh=mysql_connect (\"localhost\", $dbUser, $dbPass) or\n die ('I cannot connect to the database because: ' . mysql_error());\n mysql_select_db (\"rotiss_baseball\");\n }", "title": "" }, { "docid": "fff24dbd66e256b8fda179a62691178e", "score": "0.7356725", "text": "public function connect()\n {\n if ($this->_con == null) {\n $dsn = \"\" . $this->_config['driver'] . \":host=\" . $this->_config['host'] . \";dbname=\" . $this->_config['dbname'];\n try {\n $this->_con = new PDO($dsn, $this->_config['username'], $this->_config['password']);\n $this->_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n } catch (PDOException $e) {\n die(\"Erreur connexion bdd : \" . $e->getMessage());\n }\n }\n }", "title": "" }, { "docid": "7eafd52f8fca18de6667846a67e2a005", "score": "0.735294", "text": "public function connect()\r\n\t{\r\n\t\tif($this->_connection) return;\r\n\r\n\t\t$con = $this->persist ? 'mysql_pconnect' : 'mysql_connect';\r\n\t\tif(!function_exists($con)) {\r\n\t\t\tthrow new RuntimeException(\"PHP database module missing \"\r\n\t\t\t . \"(no such function: '$con')\");\r\n\t\t}\r\n\r\n\t\t$this->_connection = @$con($this->host, $this->user, $this->password);\r\n\t\tif(!$this->_connection) {\r\n\t\t\tthrow new RuntimeException(\"Could not connect to database server \"\r\n\t\t\t . \"(host=$this->host,user=$this->user,password=\"\r\n\t\t\t . str_repeat('*', strlen($this->password)) . \")\");\r\n\t\t}\r\n\t\tif(!mysql_select_db($this->database, $this->_connection)) {\r\n\t\t\tthrow new RuntimeException(\"Could not select database '\"\r\n\t\t\t . $this->database . \"': \" . mysql_error($this->_connection));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "069c7e650cd2403ab427eadac754ba26", "score": "0.7345011", "text": "public function connect() {\n\t\tglobal $CFG;\n\n\t\ttry {\n\t\t\t\\SkylarK\\Fizz\\FizzConfig::setDB($CFG->db_uri, $CFG->db_user, $CFG->db_pass);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tdie($e->getMessage());\n\t\t\texit(0);\n\t\t}\n\n\t\t$this->_pdo = \\SkylarK\\Fizz\\FizzConfig::getDB();\n\t}", "title": "" }, { "docid": "97d5d04a83ef3bc3833a870bc5f54c68", "score": "0.73377115", "text": "private static function dbConnect()\n {\n if (!self::$dbc)\n {\n // @TODO: Connect to database\n self::$dbc = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);\n self::$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n echo self::$dbc->getAttribute(PDO::ATTR_CONNECTION_STATUS) . \"\\n\";\n echo \"good connection\" . \"\\n\";\n \n }\n }", "title": "" }, { "docid": "af4dd34d78aba69e5e549a73c0a06ff5", "score": "0.7331167", "text": "public function connect()\n {\n if (!@mysql_connect($this->dbHost, $this->dbUser, $this->dbPass)) {\n echo mysql_error();\n trigger_error(\"<b>Can't connect to MySQL server</b></b>\");\n }\n\n if (!@mysql_select_db($this->dbName)) {\n echo mysql_error();\n trigger_error(\"<b>Can't select database</b>\");\n }\n }", "title": "" }, { "docid": "79393962d93743f6b2d22663f20c5536", "score": "0.73231846", "text": "protected function connectDB()\n {\n if (!isset($this->config->db->driver))\n throw new \\RuntimeException(\"DB driver not defined in dbvc.json\");\n \n $class = __CLASS__ . '\\\\DB\\\\' . ucfirst($this->config->db->driver);\n $this->db = new $class($this->config->db);\n }", "title": "" }, { "docid": "58764d14df039947996926481dc218f2", "score": "0.7316097", "text": "protected function connect() {\n\t\t$this -> conn = mysql_connect($this -> host, $this -> user, $this -> pass);\n\t\t$this -> dba = mysql_select_db($this -> dba, $this -> conn);\n\t}", "title": "" }, { "docid": "8d2f59fa2fd91a8755ff1ae2d56dfb53", "score": "0.7315824", "text": "public static function connect()\n {\n try {\n self::$conn = mysqli_connect(self::$host, self::$username, self::$password, self::$dbname);\n } catch (Exception $e) {\n echo \"<pre>\".$e.\"</pre>\";\n }\n }", "title": "" }, { "docid": "ac7bbfee08289d1329885e4be0e992dc", "score": "0.7315647", "text": "protected function dbConnect() {\n try {\n $this->db = new PDO (\"mysql:host=$this->servername;dbname=$this->dbname\", $this->username, $this->password);\n } catch (PDOException $e) {\n echo \"Errore: \" . $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "295c05bcc2945856d417f9b4ad7f5d51", "score": "0.72979766", "text": "private function connect() {\n\t\t\n\t\t$dsn = 'mysql:dbname=' . $this->dbname . ';host=' . $this->host . '';\n\t\t\n\t\ttry {\n\t\t\t$this->pdo = new PDO(\n\t\t\t\t$dsn,\n\t\t\t\t$this->user,\n\t\t\t\t$this->password,\n\t\t\t\tarray(\n\t\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8, time_zone = '+00:00'\",\n\t\t\t\t\tPDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,\n\t\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\t\t\tPDO::ATTR_EMULATE_PREPARES => false,\n\t\t\t\t\tPDO::ATTR_PERSISTENT => true\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->bConnected = true;\n\t\t} catch (PDOException $e) {\n\t\t\tthrow new Exception(\"Exception while connection to the database: \" . $e->getMessage());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fe82e360caaed78a5efc1cdfb5ba9e2f", "score": "0.72862756", "text": "protected static function dbConnect()\n {\n\n if (!self::$dbc)\n {\n // Connect to database\n \n self::$dbc = new PDO('mysql:host=' . $_ENV['DB_HOST'] . ';dbname=' . $_ENV['DB_NAME'], $_ENV['DB_USER'], $_ENV['DB_PASS']);\n\n self::$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n }\n }", "title": "" }, { "docid": "99a03a771f26476d4c23f2027f611cb1", "score": "0.7283387", "text": "public function connect(){\n\t\t\tif($this->connection){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$options = [\n\t\t\t \\PDO::ATTR_EMULATE_PREPARES => false,\n\t\t\t \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n\t\t \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC,\n\t\t ];\n\n\t\t\ttry{\n\t\t\t\t$dsn = \"{$this->getDriver()}:\";\n\t\t\t\tswitch($this->getDriver()){\n\t\t\t\t\tcase \"sqlsrv\":\n\t\t\t\t\t\t$options[\\PDO::SQLSRV_ATTR_FETCHES_NUMERIC_TYPE] = true;\n\t\t\t\t\t\t$dsn.=\"server={$this->getHostname()};Database={$this->getDatabase()}\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"mysql\":\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$options[\\PDO::ATTR_AUTOCOMMIT] = 0;\n\n\t\t\t\t\t\t$dsn.=\"host={$this->getHostname()};dbname={$this->getDatabase()};charset=latin1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$newConnection = new \\PDO($dsn,$this->getUsername(), $this->getPassword(), $options);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tLogger::fatal_error(MessageUtility::DATABASE_CONNECT_ERROR, $e->getMessage().\".\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->connection = $newConnection;\n \t\t$this->connection->beginTransaction();\n\t\t}", "title": "" }, { "docid": "d7649c221e6716b134d72fb9f9ad60e9", "score": "0.727831", "text": "public function connect() {\n // Cancel if connection is already established\n if ($this->handler != null) {\n return;\n }\n\n // Connect to server\n $handler = mysql_connect(DB_HOST, DB_USER, DB_PASSW, false, 65536);\n\n if (!$handler) {\n throw new DatabaseException(\"Cannot connect to database\");\n }\n\n // Open database\n $db = mysql_select_db(DB_NAME, $handler);\n\n if (!$db) {\n throw new DatabaseException(\"Cannot select database\");\n }\n\n $this->handler = $handler;\n }", "title": "" }, { "docid": "764209e7f4786fbf44e4ce239a18c824", "score": "0.72596115", "text": "public function connect()\r\n {\r\n $this->connection = mysql_connect( $this->db_host, $this->db_user, $this->db_password );\r\n\r\n // Check if connected to the server.\r\n if( !$this->connection )\r\n die( 'Could not connect: ' . mysql_error() );\r\n\r\n // Open the database driftdb.\r\n return mysql_select_db( \"driftdb\", $this->connection );\r\n }", "title": "" }, { "docid": "974d46c9507271e7aedbb7c81552deab", "score": "0.7255935", "text": "public function connect() {\r\n\t\t\t$this->connection = mysqli_connect($this->host, $this->user, $this->password, $this->database);\r\n\t\t\tif (mysqli_connect_errno($this->connection)) { //failed to connect\r\n\t\t\t\tdie(\"Failed to connect with error: \" . mysqli_connect_error());\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b5e2be6ca98d2edc32b37650b8768233", "score": "0.7228448", "text": "public function connect()\n {\n echo '连上了sqlite';\n }", "title": "" }, { "docid": "be55582fac30c85901cb58265dff1440", "score": "0.7228382", "text": "private function connectToDatabase() {\n if($this->settings != null) {\n $mysqlCreds = $this->settings['mysql_creds'];\n mysql_connect($mysqlCreds['host'], $mysqlCreds['username'], $mysqlCreds['password']) or die( mysql_error());\n mysql_select_db($this->settings['db_name']) or die(mysql_error());\n }\n }", "title": "" }, { "docid": "6699733a34a8df6edfad650826f0bc5c", "score": "0.7224545", "text": "private function Connect()\n {\n $this->connection = new mysqli($this->server, $this->user, $this->password, $this->dbname);\n if (mysqli_connect_errno()) {\n echo \"Error: Could not connect to database.\";\n exit;\n }\n }", "title": "" }, { "docid": "0c1dc3fc3004c21654b5b5a278550a1f", "score": "0.7221151", "text": "private function dbConnect() {\n if( !(defined('DB_NAME') && defined('DB_USER') && defined('DB_PASS') && defined('DB_HOST')) ) {\n return;\n }\n $this->em = new ORM\\EntityManager([\n ORM\\EntityManager::OPT_CONNECTION => ['mysql', DB_NAME, DB_USER, DB_PASS, DB_HOST]\n ]);\n }", "title": "" }, { "docid": "baa98f92f3d5a419cae87ef2c225b519", "score": "0.7221085", "text": "private final function db_connect(){\n \n try{\n \n \t$this->con = new PDO(\"{$this->db_driver}:host={$this->db_host};dbname={$this->db_name}\", \"$this->db_username\", \"$this->db_password\");\n \n }catch( PDOException $e ){\n \n echo $this->wrap( $this->makeResponse( 500, $e->getMessage() ) );\n exit;\n \n }\n \n \n }", "title": "" }, { "docid": "a1bb48448d60a5ab572b798d2f278424", "score": "0.7197156", "text": "private function connectDB() {\n\t\t$configObj = new Config();\n\t\t$settings = $configObj->getAllConfig();\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host={$settings['DB_HOST']};dbname={$settings['DB_NAME']}\", $settings['DB_USERNAME'], $settings['DB_PASSWORD']);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\tcatch(PDOException $e) {\n\t\t\techo \"Error: \" . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "47a3bd5d3ecc70e726d12632a41ec3bd", "score": "0.7196278", "text": "function dbConnect()\n\t{\n\t\t$this->link = new mysqli($this->host, $this->username, $this->password, $this->schema);\n\t\t\n\t\t// check connection \n\t\tif($this->link->connect_errno)\n\t\t{\n\t\t\texit($lang['dbError']);\n\t\t}\n\t}", "title": "" }, { "docid": "62c67c2c66e4b4a68d204bd64b07f2c6", "score": "0.71943545", "text": "function connect() {\n\t\t\n\t\t$this->connection = mysql_connect($this->url, $this->user, $this->password);\n\t\tif(! $this->connection )\n\t\t{\n\t\t die('Could not connect: ' . mysql_error());\n\t\t}\n\t\tmysql_select_db($this->db);\n\t}", "title": "" }, { "docid": "a914fec89b81759fc2cdefa9aea546d6", "score": "0.7193167", "text": "public static function connect ()\n\t{\n\t\t# We need to access the information from the config file which is stored in an array called $config.\n\t\trequire ROOT_DIR.'_config.php';\n\n\t\tQuery::$database = $config['database'];\n\n\t\t# Attempt to make the connection and assign the resulting resource to the static $link property.\n\t\tQuery::$link = mysql_connect($config['server'], $config['user'], $config['password']);\n\n\t\t# It is possible there was a connection failure...\n\t\tif (Query::$link == false)\n\t\t{\n\t\t\t# If so, we must reset the link property to 0 (as it is useless to us).\n\t\t\tQuery::$link = 0;\n\t\t\t# We must also inform the caller that the connection couldn't be made.\n\t\t\tthrow new Exception('Connection to database server could not be made.');\n\t\t}\n\n\t\t# We need to select the relevant database to use.\n\t\tif (!mysql_select_db($config['database'], Query::$link))\n\t\t{\n\t\t\t# The database couldn't be selected (though the connection has been made) - it probably doesn't\n\t\t\t# exist. Throw an exception to indicate error.\n\t\t\tthrow new Exception('Error occured when selecting database to use.');\n\t\t}\n\t}", "title": "" }, { "docid": "bf3313ace467ad990c1ce77e1760b60a", "score": "0.7190679", "text": "private function dbConnect() {\n try {\n if (!$this->_conn = mysql_connect($this->_host . \":\" . $this->_port, $this->_dbUser, $this->_dbPwd))\n throw new Exception(\"Can't connect to server.\");\n\n if (!mysql_select_db($this->_dbName, $this->_conn))\n throw new Exception(\"Can't select database.\");\n } catch (Exception $e) {\n $this->exception($e);\n }\n }", "title": "" }, { "docid": "64dd6b1be5c965985fde6e016de8334e", "score": "0.71888375", "text": "function connect()\n {\n $this->setDsn(\"mysql:host=\".HOSTNAME.\";dbname=\".DBNAME);\n $this->setUsername(USERNAME);\n $this->setPassword(PASSWORD);\n parent::connect();\n }", "title": "" }, { "docid": "bef7618c5bc8fdcd67c1ba6f0df8510f", "score": "0.71883816", "text": "private function openDatabaseConnection() {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "1c261378a9242ed7b38b519306db945b", "score": "0.7182131", "text": "function connect_db() \n\t{\n\t}", "title": "" }, { "docid": "82fecfa2f245c56dbcd0442d03e00e0f", "score": "0.7177532", "text": "private function _openDatabaseConnection()\n {\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = [\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\n ];\n\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "65df3363fdd7ee254a7306cc92e10d33", "score": "0.71728987", "text": "protected function openConnection()\r\n {\r\n $connection = $this->_config->global->resources->default_setup->connection;\r\n $dbName = (string)$connection->dbname;\r\n $host = (string)$connection->host;\r\n $user = (string)$connection->username;\r\n $password = (string)$connection->password;\r\n $this->_db = new PDO('mysql:dbname='.$dbName.';host='.$host, $user, $password);\r\n }", "title": "" }, { "docid": "333e0df877b667450c318c6e9bc2869d", "score": "0.71689117", "text": "private function openDatabaseConnection()\n {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "a32c24d67fa2e2b9f43a2e64905fd691", "score": "0.7159967", "text": "private function _connect(){\n\t\t$this->_db = new PDO($this->_config['dsn'], $this->_config['dbuser'], $this->_config['dbpass']);\n\t}", "title": "" }, { "docid": "13a8db88acc05f283c6dc8354d8c1fe2", "score": "0.71489173", "text": "private function connect(){\n\t\t try{\n\t\t\t $this->connection = new PDO(self::DRIVER.':host='.self::HOST.';dbname='.self::DB_NAME, self::USER, self::PASS);\n\t\t }catch(PDOException $e){\n\t\t\t echo $e->getMessage();\n\t\t }\n\t }", "title": "" }, { "docid": "07644ecb0e956189e77e04064c095a1a", "score": "0.71455646", "text": "function connectToDb()\n {\n //require_once MODELS.'Database.php';\n $vars = \"../includes/global.php\";\n $this->db = new Database($vars);\n }", "title": "" }, { "docid": "a882badd945eeba52471e5ed0b4acd90", "score": "0.7142976", "text": "private function connect(){\n\t\t\ttry{\n switch($this->dbDriver){\n case \"odbc\":\n $this->db = new PDO(\"$this->dbDriver:Driver={SQL Server};Server=$this->hostname;Database=$this->database;\", $this->username, $this->password);\n default:\n $this->db = new PDO(\"$this->dbDriver:host=$this->hostname;dbname=$this->database;$this->charSet\", $this->username, $this->password);\n }\n\t\t\t\t$this->error_handling();\n\t\t\t}catch(PDOException $e){\n\t\t\t\tdie($e);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "62c2eb7887a74db4659df8734971a1a2", "score": "0.71402276", "text": "static public function connect() {\n $database = new Database();\n\n return $database->getPDO();\n }", "title": "" }, { "docid": "a288a3e3beefb54028d93f0673221410", "score": "0.7138374", "text": "function connect() {\n\t\t//Get database information\n\t\trequire_once('../app/config.php');\n\t\t//Get constants from database file\n\t\trequire_once('../app/database.php');\n\t\t$config = new GarageSale\\Config();\n\t\n\t\t// select the type of database to use\n\t\t$db_config = $config->databases['mysql'];\n\t\n\t\t/* ---------------------------------------\n\t\t * load values from the configuration file\n\t\t */\n\t\n\t\t// host of database\n\t\t$host = $db_config['host'];\n\t\t// name of database\n\t\t$database = $db_config['database'];\n\t\t// user name to login\n\t\t$username = $db_config['username'];\n\t\t// password to log in\n\t\t$password = $db_config['password'];\n\t\t// prefix to use for table namesf\n\t\t$prefix = $db_config['prefix'];\n\t\t\n\t\t$con = mysqli_connect($host,$username,$password,$database);\n\n // returing connection cursor\n return $con;\n }", "title": "" }, { "docid": "540f71de1bf8a17138bf0167091f003e", "score": "0.71325445", "text": "private function connectToDatabase() {\n $this->db = new Database();\n if (!$this->db->isConnected()) {\n $error_message = $this->db->getErrorMessage();\n $template = $this->twig->load('database_error.twig');\n echo $template->render(['error_message' => $error_message]);\n exit();\n }\n }", "title": "" }, { "docid": "8a10af37be1f3b4975bdf81b2596673e", "score": "0.71308", "text": "public function connect(){\n try {\n $arg = sprintf(\"%s:host=%s; port=%s; dbname=%s\", $this->_sMethod, $this->_sHost, $this->_iPort, $this->_sDbname);\n $this->_oPdo = new PDO($arg, $this->_sAccount, $this->_sPasswd);\n $this->execute();\n } catch(PDOException $e){\n var_dump($e->getMessage());\n }\n }", "title": "" }, { "docid": "dd1baff9e2cb9e673c4937027511914b", "score": "0.71300423", "text": "public function connect() {\n\t\tif(!$this->connected) {\n\t\t\t$this->link = new mysqli(\n\t\t\t\t$this->config['host'],\n\t\t\t\t$this->config['user'],\n\t\t\t\t$this->config['pass'],\n\t\t\t\t$this->config['data'],\n\t\t\t\t$this->config['port'],\n\t\t\t\t$this->config['sock']\n\t\t\t);\n\t\t\t\n\t\t\t// As stated in the manual, this is not the \"real\"\n\t\t\t// way to do it, but we need combatibility\n\t\t\tif(mysqli_connect_error()) {\n\t\t\t\tthrow new DatabaseException('Connection error: ' . $this->link->connect_error, $this->link->connect_errno);\n\t\t\t} else {\n\t\t\t\t$this->connected = true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a1f12b7c97727e2ac366a8cc01cc80df", "score": "0.7128089", "text": "protected function connect() {\n\t\t/**\n\t\t * Try and connect to the database, this information can be\n\t\t * configured in the inc/config.php file do not change them here.\n\t\t */\n\t\ttry {\n\t\t\t$this->db = new PDO('mysql:host='.DB_HOST.';port='.DB_PORT.';dbname='.DB_NAME.';', DB_USER, DB_PASS);\n\t\t} catch (PDOException $e) {\n\t\t\t// Kill the application as the connection to the database failed.\n\t\t\tdie('DB Connection Failed: ' . $e->getMessage());\n\t\t}\n\n\t\t$this->settings = $this->get_settings();\n\n\t\tif ( !isset($_SESSION['CSRF_TOKEN']) )\n\t\t\t$this->csrf_token();\n\t}", "title": "" }, { "docid": "64f7beec2a916243141b477f434e7518", "score": "0.7123243", "text": "function connect()\n\t{\n\t\t$this->conn = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass)\n\t\t\tor die('Error connecting to mysql');\n\t\tmysql_select_db($this->dbname);\n\t}", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.71132344", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "69b91395f3728d8d23ca3054991515cb", "score": "0.7107081", "text": "public function connect()\n {\n if ($this->pdo) {\n return;\n }\n\n // connect\n $this->profiler->start(__FUNCTION__);\n list($dsn, $username, $password, $options, $queries) = $this->args;\n $this->pdo = new PDO($dsn, $username, $password, $options);\n $this->profiler->finish();\n\n // connection-time queries\n foreach ($queries as $query) {\n $this->exec($query);\n }\n }", "title": "" }, { "docid": "9f7d90e27d75044360d96a2cf948ab0d", "score": "0.7096678", "text": "public function connect()\n {\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n if (!$this->isConnected) {\n $this->dbobj = new mysqli($this->host, $this->username, $this->password, $this->db, $this->port, $this->socket);\n $this->isConnected = true;\n $this->transactionOpen = false;\n }\n }", "title": "" }, { "docid": "42aaf3fcde6f39872af8d5f390ea86ba", "score": "0.70913696", "text": "private function dbConnect() {\n\t\t$this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n\t\tif($this->db)\n\t\t\tmysql_select_db(self::DB,$this->db);\n\t}", "title": "" }, { "docid": "9f3fbad2e7267696bb2fb94cc0ac149c", "score": "0.70730215", "text": "private function connect()\n {\n try\n {\n $this->primaryDbConnection = new PDO(PRIMARYDBTYPE.':host='.PRIMARYDBSERVER.';dbname='.PRIMARYDBNAME, PRIMARYDBUSER, PRIMARYDBPASSWORD);\n $this->primaryDbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->localDbConnection = new PDO(LOCALDBTYPE.':host='.LOCALDBSERVER.';dbname='.LOCALDBNAME, LOCALDBUSER, LOCALDBPASSWORD);\n $this->localDbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $someException)\n {\n $this->logFile->write('Error: ' . $someException->getMessage());\n throw $someException;\n }\n }", "title": "" }, { "docid": "d0a89d36614d4bc332a7b4aea5bf41e4", "score": "0.7063707", "text": "private static function connect() {\n // Connect to the database.\n self::$connection = mysql_connect(self::$server, self::$username, self::$password)\n or die (\"Connection Error: \".mysql_error());\n \n // Select the database.\n mysql_select_db(self::$database) \n or die (\"Error selecting DB: \".mysql_error());\n }", "title": "" }, { "docid": "f95349cc98cb9a2a2e4e93569158c117", "score": "0.7057746", "text": "private function connect()\r\n {\r\n $options = [\r\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\r\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\r\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC,\r\n \\PDO::ATTR_EMULATE_PREPARES => false,\r\n ];\r\n $host = $_ENV['DB_HOST'];\r\n $port = $_ENV['DB_PORT'];\r\n $database = 'INFORMATION_SCHEMA'; // $_ENV['DB_DATABASE'];\r\n $user = $_ENV['DB_USERNAME'];\r\n $pwd = $_ENV['DB_PASSWORD'];\r\n $charset = 'utf8mb4';\r\n\r\n $dsn = \"mysql:host=$host;dbname=$database;charset=$charset\";\r\n try {\r\n $this->pdo = new \\PDO($dsn, $user, $pwd, $options);\r\n } catch (\\PDOException $e) {\r\n throw new \\PDOException($e->getMessage(), (int)$e->getCode());\r\n }\r\n }", "title": "" }, { "docid": "f419bfb4757ecf951bd533a826548670", "score": "0.70384824", "text": "public function connect()\n {\n if ($this->m_link_id == null) {\n Tools::atkdebug(\"db::connect -> Don't switch use current db\");\n\n return $this->doConnect($this->m_host, $this->m_user, $this->m_password, $this->m_database, $this->m_port, $this->m_charset);\n }\n\n return self::DB_SUCCESS;\n }", "title": "" }, { "docid": "bdbda30df0e5f9bd520b2d905af5a9f3", "score": "0.7032242", "text": "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "1f79989a81eea59700cc19634ee9a79c", "score": "0.70292926", "text": "private function Connect(){\n\t\t$dsn = sprintf('%s:host=%s;dbname=%s;port=%s',\n\t\t\t$this->connection_parameters->offsetGet('type'),\n\t\t\t$this->connection_parameters->offsetGet('hostname'),\n\t\t\t$this->connection_parameters->offsetGet('database'),\n\t\t\t$this->connection_parameters->offsetGet('port')\n\t\t);\n\t\t\n\t\t$options = array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\t\t\n\t\ttry {\n\t\t\t$this->connection = new PDO($dsn, $this->connection_parameters->offsetGet('username'), $this->connection_parameters->offsetGet('password'), $options);\n\t\t\treturn true;\n\t\t} catch(PDOException $e) {\n\t\t\t$this->error = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "65b9c7d3f4fcfc855b58e366f3f66201", "score": "0.70232195", "text": "private function dbconnect()\n\t\t{\n\t\t\t$this->database = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass, true) or die(\"MySQL Error: \" . mysql_error());\n\t\t\tmysql_select_db($this->dbname, $this->database) or die(\"MySQL Error: \" . mysql_error());\n\t\t\t\n\t\t\tif(!$this->database){ die('Could not connect: ' . mysql_error()); }\n\t\t}", "title": "" }, { "docid": "960fca9663c67d6a83f51edd883b0b88", "score": "0.7022618", "text": "public function databaseConnect(){\n /*Creates a new instance of the PDO called $db.\n * NOTE: the use of DSN, DB_USER and so on. These variable live in the dbsettings file.\n */\n $db = new PDO(DSN,DB_USER,DB_PASS);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }", "title": "" }, { "docid": "e15fde89e95ea4776674bc8a0d2cd0c5", "score": "0.7020539", "text": "private function dbConnect()\r\n {\r\n // Connexion to db_nickname\r\n $this->dbConnect = new PDO('mysql:dbname='.self::DB_NAME.';host='.self::HOST, self::LOGIN, self::PWD, array( PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\r\n\r\n }", "title": "" }, { "docid": "e602c34df44a7db575be40323744d394", "score": "0.70160526", "text": "public function connect() {\n $this->link = mysqli_connect($this->host,$this->username,$this->password) or \n die(\"Could not connect. \" . mysqli_connect_error());\n mysqli_select_db($this->link, $this->database) or die(\"Could not select database. \" . mysqli_error($link));\n \n return $this->buildMovieDB();\n }", "title": "" }, { "docid": "b432c30cb1e5a24ea43f1d15a5f35142", "score": "0.701299", "text": "function DBConnect()\r\n\t{\r\n\t\trequire_once(CLASSES.'Database.php');\r\n\t\t$settings = $this->conf['database'];\r\n\t\t$connstring = $settings['driver'].\":\".$settings['server'].\":\".$settings['name'];\r\n\t\treturn new Database($connstring,$settings['user'],$settings['password'],true);\r\n\t}", "title": "" }, { "docid": "de2a95266d5e86354ea08c9b28aa5aad", "score": "0.6999742", "text": "public function connect() {\n if (is_resource($this->link))\n return $this->link;\n\n // Import conenction variables\n extract($this->dbConfig['connection']);\n\n // Persisten connections enabled?\n $connect = ($this->dbConfig['persistent'] === true) ?\n 'pg_pconnect' : 'pg_connect';\n \n // Build the connection info\n $port = isset($port) ? 'port=\\''.$port.'\\'' : '';\n // if no host, connect with the socket\n $host = isset($host) ? 'host=\\''.$host.'\\' '.$port : '';\n\n $connectionString = \"$host dbname='$database' user='$user' password='$pass'\";\n\n // Make the connection and select the database\n if ($this->link = $connect($connectionString)) {\n if ($charset = $this->dbConfig['character_set'])\n echo $this->setCharset($charset);\n\n // Clear password after successful connect\n $this->dbConfig['connection']['pass'] = null;\n\n return $this->link;\n }\n\n return false;\n }", "title": "" }, { "docid": "37b63940b70384a0330a78505b469b8c", "score": "0.69995344", "text": "function connect ( )\n\t{\n\t\tglobal $db_host, $db_name, $db_user, $db_pass;\n\n\t\tif( $this -> connected )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$this -> db = pg_connect( \"host='$db_host' dbname='$db_name' user='$db_user' password='$db_pass'\" );\n\t\t//$this -> db = pg_connect( \"dbname='esco_rb' user='mtc'\" );\n\n\t\t\t\n\n\t\tif( $this -> db == false )\n\t\t{\n\t\t\techo 'Errore durante la connesione al database: '.pg_last_error();\n\t\t\treturn false;\n\t\t}\n\n\t\t$this -> connected = true;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "957afb405adf3257f4c92c5b2d78b2a9", "score": "0.69973797", "text": "function connect_to_db() {\n global $link, $dbname;\n\n mysqli_select_db($link, $dbname);\n }", "title": "" }, { "docid": "b8afa4ddb6a79bebeb512776b6286a8d", "score": "0.6984648", "text": "private function connect(){\n try {\n $this->pdo = new PDO($this->connectionString, $this->user['username'], $this->user['password']);\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $e) {\n print '<p class=\"error\">Connessione al database fallita!';\n if(DEBUG==true){\n print '<br />'.$e->getMessage();\n }\n print '</p>';\n die();\n }\n }", "title": "" }, { "docid": "43fa3534ecbb4f6c6e8b3b4ed870e5da", "score": "0.697767", "text": "protected function establish_connection()\n\t{\n\t\t// if ( ! $this->connection)\n\t\t// {\n\t\t// \t$this->connection = $this->load->database('default', TRUE);\n\t\t// }\n\t\t// else\n\t\t// {\n\t\t// \t$this->connection = $this->load->database($this->connection, TRUE);\n\t\t// }\n\t\t$this->connection = $this->db;\n\t}", "title": "" }, { "docid": "191ee1be066fa1da18af79356745d0d0", "score": "0.69772506", "text": "public static function connect() {\r\n\t\r\n\t\tglobal $ebs_db_host;\r\n\t\tglobal $ebs_db_user;\r\n\t\tglobal $ebs_db_password;\r\n\t\t\r\n\t\treturn self::get_connection($ebs_db_host, $ebs_db_user, $ebs_db_password);\r\n\t}", "title": "" }, { "docid": "acdd42c8f20207e60965f286fd0968d5", "score": "0.6975648", "text": "private function connect()\n {\n try\n {\n $this->connection = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->database, $this->user, $this->password);\n } \n catch(Exception $e) \n {\n echo \"Error : \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "d2b472aac0d5a1ecd6597531ef0c7200", "score": "0.69727343", "text": "public static function connect(): void {\n\n $dbName = getenv(\"WEB_DB_NAME\");\n $host = getenv(\"WEB_DB_HOST\");\n $username = getenv(\"WEB_DB_USERNAME\");\n $password = getenv(\"WEB_DB_PASSWORD\");\n\n $dsn = \"mysql:dbname=$dbName;host=$host\";\n\n try {\n self::$databaseObject = new PDO(\n $dsn, $username, $password,\n [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]\n );\n } catch (PDOException $e) {\n echo 'Cannot connect to the database' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "a6f99e8d841b2388570636328ca0be03", "score": "0.6972652", "text": "public function db_connect()\n\t{\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "b9f5613a0e781772a74fec5040d5852e", "score": "0.69708", "text": "protected function connectToDatabase() {\n\t\tif (!include_once($this->getSettingsPath())) {\n\t\t\tregister_error('Elgg could not load the settings file. It does not exist or there is a file permissions issue.');\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!include_once(\\Elgg\\Application::elggDir()->getPath(\"engine/lib/database.php\"))) {\n\t\t\tregister_error('Could not load database.php');\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t_elgg_services()->db->setupConnections();\n\t\t} catch (DatabaseException $e) {\n\t\t\tregister_error($e->getMessage());\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e42ca00073a9887307815fb4b17857d9", "score": "0.69652694", "text": "public function setupDatabaseConnection()\n {\n $this->databaseConnection = new Database(\n $this->config['database']['host'],\n $this->config['database']['database'],\n $this->config['database']['username'],\n $this->config['database']['password'],\n $this->config['database']['driver'],\n $this->config['database']['charset']\n );\n }", "title": "" }, { "docid": "d8f322fd7a83d81b0b3b39345cd16da2", "score": "0.69628996", "text": "function connect()\n\t{\n\t\t\n\t\t// determine how to get our parameters\n\t\t$method = $this->getParameter('method', 'dsn');\n\t\t$database = $this->getParameter('database');\n\t\t// get parameters\n\t\tswitch($method) {\n\t\t\tcase 'normal' :\n\t\t\t\t// get parameters normally\n\t\t\t\t$host\t = $this->getParameter('host', 'localhost');\n\t\t\t\t$port\t = $this->getParameter('port', '');\n\t\t\t\t$dsn = 'mongodb://' . $host;\n\t\t\t\tif ($port != '') {\n\t\t\t\t\t$dsn .= ':' . $port;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'dsn' :\n\t\t\t\t$dsn = $this->getParameter('dsn');\n\t\t\t\tif($dsn == null) {\n\t\t\t\t\t// missing required dsn parameter\n\t\t\t\t\t$error = 'Database configuration specifies method \"dsn\", but is missing dsn parameter';\n\t\t\t\t\tthrow new DatabaseException($error);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\ttry {\n\t\t\t$options = array();\n\n\t\t\tif ($this->hasParameter('user')) {\n\t\t\t\t$options['user'] = $this->getParameter('user', '');\n\t\t\t}\n\t\t\tif ($this->hasParameter('password')) {\n\t\t\t\t$options['password'] = $this->getParameter('password', '');\n\t\t\t}\n\t\t\t\n\t\t\t$this->mongo = new \\MongoClient($dsn, $options);\n\t\t\t// make sure the connection went through\n\t\t\tif ($this->mongo === false)\n\t\t\t{\n\t\t\t\t// the connection's foobar'\n\t\t\t\t$error = 'Failed to create a Mongo connection';\n\t\t\t\tthrow new DatabaseException($error);\n\t\t\t}\n\t\t\t\n\t\t\t// select our database\n\t\t\tif ($database != null) {\n\t\t\t\t$this->connection = $this->mongo->selectDB($database);\n\t\t\t}\n\t\t\t// since we're not an abstraction layer, we copy the connection\n\t\t\t// to the resource\n\t\t\t$this->resource = $this->connection;\n\t\t} catch(\\MongoException $e) {\n\t\t\tthrow new DatabaseException($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "d0be7253447cc5bfa44fcbc7fc73ca24", "score": "0.6962308", "text": "public function connect()\n {\n $config = $this->container->get('settings')['database'];\n $this::buildDSN($config);\n\n try {\n $this->PDO = new Database($this->DSN, $config['user'], $config['password'], [PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING]);\n } catch (Exception $ex) {\n $this->container->logger->error('Unable to connect to the target database: ' . print_r($ex, true));\n return false;\n }\n\n $this->PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->PDO->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n $this->PDO->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n return true;\n }", "title": "" }, { "docid": "26c366d036907382eb5cc8864662980b", "score": "0.69599265", "text": "function connectDatabase() {\n global $conn;\n global $dsn;\n global $dbUser;\n global $dbPass;\n try {\n $conn = new PDO($dsn, $dbUser, $dbPass);\n }\n catch (PDOException $e) {\n echo \"Can not conntect to database:<br>\";\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "7602cd14d4551242fa00c4603e7c7208", "score": "0.6951758", "text": "private static function connect()\n {\n //se colocan las credenciales y la base a la que se va a conectar\n $server = \"localhost\";\n $database = \"tienda\";\n $username = \"tienda\";\n $password = \"tiendaflash\";\n $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => \"set names utf8\");\n self::$connection = null;\n try\n {\n self::$connection = new PDO(\"mysql:host=\".$server.\"; dbname=\".$database, $username, $password, $options);\n self::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $exception)\n {\n //mensaje en caso de error con la base\n die($exception->getMessage());\n }\n }", "title": "" }, { "docid": "7b77701dc9a4b22725bfd4070765e711", "score": "0.6933856", "text": "function connect(){\n\n\t\t$settings = core::coreSettings();\n\n\t\t$host = $settings['DB']['dbhost'];\n\t\t$db = $settings['DB']['dbname'];\n\t\t$user = $settings['DB']['dbusername'];\n\t\t$pass = $settings['DB']['dbpassword'];\n\t\t$this->link = mysql_connect($host, $user, $pass) or die(\"Error fatal \".mysql_error());\n\t\tmysql_select_db($db);\n\t\tregister_shutdown_function(array(&$this, 'close'));\n\t}", "title": "" }, { "docid": "9db9055c96dfeac3cf0e86246ded890e", "score": "0.6933451", "text": "private static function connect()\n {\n if ($this->connection) {\n return $this->connection;\n }\n\n $dsn = sprintf(\n 'mysql:host=%s;dbname=%s;charset=utf8',\n Config::DB_HOST,\n Config::DB_NAME\n );\n\n $this->connection = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD);\n\n // Throw an Exception when an error occurs\n $this->connection->setAttribute(\n PDO::ATTR_ERRMODE, \n PDO::ERRMODE_EXCEPTION\n );\n }", "title": "" } ]
5fae96547a6371fcd70755566dfc280f
The method to process payment authorisation reversal for this payment type
[ { "docid": "51819d7bbda725ece9a8c7abeba459a6", "score": "0.5784314", "text": "public abstract function processReversal();", "title": "" } ]
[ { "docid": "e85c5974dec432e7e2d3722a11ef1082", "score": "0.63220847", "text": "public function processPayment();", "title": "" }, { "docid": "a8e4bd9a1f9718dd3519203a45b116c2", "score": "0.6079053", "text": "public function paymentProcess();", "title": "" }, { "docid": "c73650ce698d9f16e634ec38ea4017d9", "score": "0.6078854", "text": "public function processPayment(){\r\n \r\n }", "title": "" }, { "docid": "66389ed8b840954cd5e7e1e76b05f4b3", "score": "0.6069566", "text": "function handle_payment_return(){}", "title": "" }, { "docid": "cfb9493f4f783f598f768c82abe7886a", "score": "0.5794663", "text": "public function execute() {\n\t\t/**\n\t\t * @var PaymentProvider\n\t\t */\n\t\t$adyen = PaymentProviderFactory::getProviderForMethod( $this->getOption( 'method' ) );\n\n\t\t// it feels like we should tell createPayment this a recurring authorise call in the event that\n\t\t// we add in the option to make non-recurring authorise calls in the future.\n\t\t$params['recurring'] = true;\n\t\t// this is a required field for Adyen createPayment calls so we put something testy in here for now\n\t\t$params['order_id'] = \"RECURRING-TEST-\" . rand( 0, 10000 );\n\n\t\t$params['recurring_payment_token'] = $this->getOption( 'token' );\n\t\t$params['processor_contact_id'] = $this->getOption( 'invoice' );\n\t\t$params['currency'] = $this->getOption( 'currency' );\n\t\t$params['amount'] = floatval( $this->getOption( 'amount' ) );\n\n\t\t// this is the Authorise call\n\t\t$createPaymentResponse = $adyen->createPayment( $params );\n\t\tif ( $createPaymentResponse->isSuccessful() ) {\n\t\t\tLogger::info( \"Recurring Payment Authorised: \" . json_encode( $createPaymentResponse->getRawResponse() ) );\n\t\t} else {\n\t\t\tLogger::info( \"Recurring Payment Attempt Failed: \" . json_encode( $createPaymentResponse->getRawResponse() ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $createPaymentResponse->requiresApproval() ) {\n\t\t\t// this is the Capture call\n\t\t\t$params['gateway_txn_id'] = $createPaymentResponse->getGatewayTxnId();\n\t\t\t$approvePaymentResponse = $adyen->approvePayment( $params );\n\t\t\tif ( $approvePaymentResponse->isSuccessful() ) {\n\t\t\t\tLogger::info(\n\t\t\t\t\t\"Recurring Payment Captured: \" . json_encode( $approvePaymentResponse->getRawResponse() )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tLogger::info(\n\t\t\t\t\t\"Recurring Payment Attempt Failed: \" . json_encode( $approvePaymentResponse->getRawResponse() )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0920fb8efb1d960a2c887a0100e8fb4a", "score": "0.5754658", "text": "public function postProcess()\n\t{\n\t\t$authorized = false;\n\t\tforeach (Module::getPaymentModules() as $module)\n\t\t{\n\t\t\tif ($module['name'] == 'allpay')\n\t\t\t{\n\t\t\t\t$authorized = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$authorized)\n\t\t{\n\t\t\t$this->allpay_warning = $this->module->l('This payment module is not available.', 'payment');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$payment_type = Tools::getValue('payment_type');\n\t\t\tif ($payment_type)\n\t\t\t{\n\t\t\t\t# Check the cart info\n\t\t\t\t$cart = $this->context->cart;\n\t\t\t\tif ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active)\n\t\t\t\t{\n\t\t\t\t\tTools::redirect(__PS_BASE_URI__.'order.php?step=1');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t# Validate the payment type\n\t\t\t\t\t$chosen_payment_desc = $this->module->getPaymentDesc($payment_type);\n\t\t\t\t\tif (empty($chosen_payment_desc))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception($this->module->l('this payment method is not available.', 'payment'));\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# Include the allPay integration class\n\t\t\t\t\t\t$invoke_result = $this->module->invokeAllpayModule();\n\t\t\t\t\t\tif (!$invoke_result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new Exception($this->module->l('allPay module is missing.', 'payment'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n # Get the customer object\n\t\t\t\t\t\t\t$customer = new Customer($this->context->cart->id_customer);\n\t\t\t\t\t\t\tif (!Validate::isLoadedObject($customer))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tTools::redirectLink(__PS_BASE_URI__.'order.php?step=1');\n\t\t\t\t\t\t\t}\n \n\t\t\t\t\t\t\t# Get the order id\n\t\t\t\t\t\t\t$cart_id = (int)$cart->id;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Set allPay parameters\n\t\t\t\t\t\t\t$aio = new AllInOne();\n\t\t\t\t\t\t\t$aio->Send['MerchantTradeNo'] = '';\n\t\t\t\t\t\t\t$aio->MerchantID = Configuration::get('allpay_merchant_id');\n\t\t\t\t\t\t\tif ($this->module->isTestMode($aio->MerchantID))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$service_url = 'https://payment-stage.allpay.com.tw/Cashier/AioCheckOut';\n\t\t\t\t\t\t\t\t$aio->Send['MerchantTradeNo'] = date('YmdHis');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$service_url = 'https://payment.allpay.com.tw/Cashier/AioCheckOut';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$aio->HashKey = Configuration::get('allpay_hash_key');\n\t\t\t\t\t\t\t$aio->HashIV = Configuration::get('allpay_hash_iv');\n\t\t\t\t\t\t\t$aio->ServiceURL = $service_url;\n\t\t\t\t\t\t\t$aio->Send['ReturnURL'] = $this->context->link->getModuleLink('allpay','response', array());\n\t\t\t\t\t\t\t$aio->Send['ClientBackURL'] = Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . '/index.php?controller=order-confirmation&id_cart=' . $cart_id . '&id_module=' . $this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key;\n\t\t\t\t\t\t\t$aio->Send['MerchantTradeDate'] = date('Y/m/d H:i:s');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Get the currency object\n\t\t\t\t\t\t\t$currency = $this->context->currency;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Set the product info\n\t\t\t\t\t\t\t$order_total = $cart->getOrderTotal(true, Cart::BOTH);\n\t\t\t\t\t\t\t$aio->Send['TotalAmount'] = $this->module->formatOrderTotal($order_total);\n\t\t\t\t\t\t\tarray_push(\n\t\t\t\t\t\t\t\t$aio->Send['Items'],\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'Name' => $this->module->l('A Package Of Online Goods', 'payment'),\n\t\t\t\t\t\t\t\t\t'Price' => $aio->Send['TotalAmount'],\n\t\t\t\t\t\t\t\t\t'Currency' => $currency->iso_code,\n\t\t\t\t\t\t\t\t\t'Quantity' => 1,\n\t\t\t\t\t\t\t\t\t'URL' => ''\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Set the trade description\n\t\t\t\t\t\t\t$aio->Send['TradeDesc'] = 'allpay_module_prestashop_1.1.1021';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Get the chosen payment and installment\n\t\t\t\t\t\t\t$type_pieces = explode('_', $payment_type);\n\t\t\t\t\t\t\t$aio->Send['ChoosePayment'] = $type_pieces[0];\n\t\t\t\t\t\t\t$choose_installment = 0;\n\t\t\t\t\t\t\tif (isset($type_pieces[1])) {\n\t\t\t\t\t\t\t\t$choose_installment = $type_pieces[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Set the extend information\n\t\t\t\t\t\t\tswitch ($aio->Send['ChoosePayment']) {\n\t\t\t\t\t\t\t\tcase PaymentMethod::Credit:\n\t\t\t\t\t\t\t\t\t# Do not support UnionPay\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['UnionPay'] = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t# Credit installment parameters\n\t\t\t\t\t\t\t\t\tif (!empty($choose_installment)) {\n\t\t\t\t\t\t\t\t\t\t$aio->SendExtend['CreditInstallment'] = $choose_installment;\n\t\t\t\t\t\t\t\t\t\t$aio->SendExtend['InstallmentAmount'] = $aio->Send['TotalAmount'];\n\t\t\t\t\t\t\t\t\t\t$aio->SendExtend['Redeem'] = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::WebATM:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::ATM:\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['ExpireDate'] = 3;\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['PaymentInfoURL'] = $aio->Send['ReturnURL'];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::CVS:\n\t\t\t\t\t\t\t\t// case PaymentMethod::BARCODE:\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['Desc_1'] = '';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['Desc_2'] = '';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['Desc_3'] = '';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['Desc_4'] = '';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['PaymentInfoURL'] = $aio->Send['ReturnURL'];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::Alipay:\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['Email'] = '-';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['PhoneNo'] = '-';\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['UserName'] = '-';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::Tenpay:\n\t\t\t\t\t\t\t\t\t$aio->SendExtend['ExpireTime'] = date('Y/m/d H:i:s', strtotime('+3 days'));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase PaymentMethod::TopUpUsed:\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\tthrow new Exception($this->module->l('this payment method is not available.', 'payment'));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Create an order\n\t\t\t\t\t\t\t$order_status_id = $this->module->getOrderStatusID('created');# Preparation in progress\n\t\t\t\t\t\t\t$this->module->validateOrder($cart_id, $order_status_id, $order_total, $this->module->displayName, $chosen_payment_desc, array(), (int)$currency->id, false, $customer->secure_key);\n\t\t\t\t\t\t\t\n # Get the order id\n $order = new Order($cart_id);\n $order_id = Order::getOrderByCartId($cart_id);\n $aio->Send['MerchantTradeNo'] .= (int)$order_id;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t# Get the redirect html\n\t\t\t\t\t\t\t$aio->CheckOut();\n\t\t\t\t\t\t}\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\t$this->allpay_warning = sprintf($this->module->l('Payment failure, %s', 'payment'), $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f2f4c25ed1038ad2592607f31d1dd5b0", "score": "0.57097113", "text": "public function processDisbursement($policynumber,$amount,$months,$paymethod,$paymentdate=null,$fee=null,$csuid=0,$transactionType='payment'){\n if(is_null($paymentdate)) $paymentdate=date(\"Y-m-d\");\n /**\n * prepair data to build transactions\n */\n $this->_policynumber=$policynumber;\n $this->_amount=$amount;\n $this->_months=$months;\n $policyDisb = new Datasource_Insurance_LegacyPolicies();\n $policy = $policyDisb->getByPolicyNumber($policynumber);\n $this->_policyname = $policy->policyName;\n $customerDisb = new Datasource_Core_LegacyCustomers();\n $customer = $customerDisb->getCustomer($policy->refNo);\n $scheduleDisb = new Datasource_Insurance_Schedules();\n $schedule = $scheduleDisb->retrieveByPolicyNumber($policynumber);\n $agentDisb = new Datasource_Core_Agents();\n $agentS = $agentDisb->getBySchemeNumber($policy->agentSchemeNumber);\n $agent = $agentDisb->fetchrow($agentS);\n $termDisb = new Datasource_Insurance_Policy_Term();\n $term = $termDisb->getPolicyTerm($policynumber,$policy->startDate);\n $this->_startdate=$policy->startDate;\n $transdata = array();\n $transdata['paymentrefno'] = $schedule->paymentRefNo;\n\t\t$transdata['policynumber'] = $policynumber;\n\t\t$transdata['paymentdate'] = $paymentdate;\n\t\t$transdata['amount']\t = $amount;\n\t\t$transdata['handlingcharge'] = (isset($fee)) ? $fee : $schedule->ddFee;\n\t\t$transdata['csuid'] \t\t = $csuid;\n\t\t$transdata['months'] = $months;\n $transdata['paymethod'] \t = $paymethod;\n\t\t$transdata['whitelabelID'] = $agent['twolettercode'];\n\t\t$transdata['agentschemeno']\t = $policy->agentSchemeNumber;\n $transdata['premier'] \t\t = ucfirst($agent['premier']);\n $transdata['salesman']\t\t = $agent['salesman'];\n $transdata['riskarea'] \t\t = $policy->riskArea;\n\t\t$transdata['riskareab']\t\t = $policy->riskAreaB;\n $transdata['isNewBusiness'] = ($term['term']==1) ? 'yes' : 'no';\n\t\t$transdata['isPaidnet'] \t = $policy->paidNet; \n $transdata['policyTermID'] = $term['id'];\n $transdata['policyname'] = $policy->policyName;\n $transdata['type'] = $transactionType;\n $this->_transID = $this->_newtransaction->saveDetails($transdata);\n $transdata['trans_id'] = $this->_transID;\n $this->_termid = $transdata['policyTermID'];\n /*\n Create transaction record for MI\n */\n \n $transupportdata = array();\n \n $this->_transIDDW = $this->_transaction->saveDetails($transdata);\n $transupportdata['trans_id'] = $this->_transIDDW;\n $transupportdata['customerTitle'] = $customer->getTitle();\n\t\t$transupportdata['customerFirstName'] = $customer->getFirstName();\n\t\t$transupportdata['customerLastName'] = $customer->getLastName();\n $transupportdata['riskAddress1'] = $policy->propertyAddress1;\n\t\t$transupportdata['riskAddress2'] = $policy->propertyAddress2;\n\t\t$transupportdata['riskAddress3'] = $policy->propertyAddress3;\n\t\t$transupportdata['riskPostcode'] = $policy->propertyPostcode;\n\t\t$transupportdata['policytype'] = $policy->policyType;\n\t\t$transupportdata['payby'] = $policy->payBy;\n\t\t$transupportdata['policyLength'] = $policy->policyLength;\n \n $this->_transactionSupport->saveDetails($transupportdata);\n \n $this->_ptranID = $this->_paymentTransaction->saveDetails($transdata);\n \n $this->_getMult($policy);\n \n /*\n calculate for disbursement\n */\n \n $this->_calculateGrossprem($policy);\n \n $this->_calculateAgentComm($policy,$agent,$term['term']);\n \n \n $policyOptionsArray = explode(\"|\", $policy->policyOptions);\n \n \n $es=array(4,28,29,30);\n foreach ($policyOptionsArray as $key => $value){\n $this->_initialise();\n $option=new Datasource_Insurance_Policy_Options($policy->policyType);\n \n $this->_optionID=$option->fetchOptionsByName($value);\n \n $this->_sumInsOption=$policyDisb->getPolicyOptionMatch($policy->policyOptions,$value,$policy->amountsCovered);\n \n if($this->_sumInsOption>0 || in_array($this->_optionID,$es)){\n $this->_premOption=$policyDisb->getPolicyOptionMatch($policy->policyOptions,$value,$policy->optionPremiums)*$this->_mult;\n $this->_discOption=$policyDisb->getPolicyOptionMatch($policy->policyOptions,$value,$policy->optionDiscounts);\n $this->_calculateAgentCommOption();\n $this->_calculateTax();\n $this->_calculateNet($policy,$value);\n $this->_storeOptionDisbursement();\n }\n \n $this->_policynetprem+=$this->_netOption;\n $this->_policyIPT+=$this->_iptOption;\n \n if($value==\"contentstp\"){\n $this->_disTcontents = $this->_netOption;\n $this->_iptTcontents = $this->_iptOption;\n $this->_premTcontents = $this->_premOption;\n $this->_sumTcontents = $this->_sumInsOption;\n \n }\n elseif($value==\"pedalcyclesp\"){\n $this->_disTpedel = $this->_netOption;\n $this->_iptTpedel = $this->_iptOption;\n $this->_premTpedel = $this->_premOption;\n $this->_sumTpedel = $this->_sumInsOption; \n }\n elseif($value==\"possessionsp\" || $value==\"specpossessionsp\"){\n $this->_disTposs += $this->_netOption;\n $this->_iptTposs += $this->_iptOption;\n $this->_premTposs += $this->_premOption;\n $this->_sumTposs += $this->_sumInsOption;\n \n }\n elseif($value==\"buildingsp\" || $value==\"buildingslflood\"){\n \t$this->_disLbuilding += $this->_netOption;\n \t$this->_iptLbuilding += $this->_iptOption;\n $this->_premLbuilding += $this->_premOption;\n $this->_sumLbuilding = $this->_sumInsOption;\n }\n elseif($value==\"buildingsAccidentalDamagep\"){\n \t$this->_disLBA = $this->_netOption;\n $this->_iptLBA = $this->_iptOption;\n $this->_premLBA = $this->_premOption;\n $this->_sumLBA = $this->_sumInsOption; \n }\n elseif($value==\"limitedcontentsp\"){\n \t$this->_disLcontents = $this->_netOption;\n $this->_iptLcontents = $this->_iptOption;\n $this->_premLcontents = $this->_premOption;\n $this->_sumLcontents = $this->_sumInsOption; \n }\n elseif($value==\"contentslp\" || $value==\"contentslflood\"){\n \t$this->_disLcontents += $this->_netOption;\n $this->_iptLcontents += $this->_iptOption;\n $this->_premLcontents += $this->_premOption;\n $this->_sumLcontents = $this->_sumInsOption;\n \t\n }\n elseif($value==\"contentslAccidentalDamagep\"){\n \t$this->_disLCA = $this->_netOption;\n $this->_iptLCA = $this->_iptOption;\n $this->_premLCA = $this->_premOption;\n $this->_sumLCA = $this->_sumInsOption; \n }\n elseif($value==\"emergencyassistance\" || $value==\"emergencyassistancestandalone\"){\n \t$this->_disES += $this->_netOption;\n $this->_iptES += $this->_iptOption;\n $this->_premES += $this->_premOption;\n $this->_sumES = $this->_sumInsOption; \n }\n elseif($value==\"emergencyassistancebahbuildings\" || $value==\"emergencyassistancebahstandalone\"){\n \t$this->_disEB += $this->_netOption;\n $this->_iptEB += $this->_iptOption;\n $this->_premEB += $this->_premOption;\n $this->_sumEB = $this->_sumInsOption; \n }\n \n //Zend_Debug::dump($this);\n }\n $this->_grosspremium=round($this->_policypremium+$this->_policyIPT,2);\n $this->_calCulateBalance();\n if($this->_policyname==\"tenantsp\"){\n \t$this->_newtransaction->updateNewTranForTenant($this);\n \n \t\t$this->_transaction->updateTranForTenant($this);\n }\n \n if($this->_policyname==\"landlordsp\"){\n \t$this->_newtransaction->updateTranForLandlord($this);\n \t$this->_transaction->updateTranForLandlord($this);\n }\n $this->_paymentTransaction->updatePaymentTransaction($this);\n \n /*\n * TODO reverse or refund disbursement\n */\n if($amount<0){\n \n }\n }", "title": "" }, { "docid": "6876f99555689a500d92c521183b97b2", "score": "0.5648085", "text": "public function executePayment();", "title": "" }, { "docid": "82d94b17088788ac8611b32371868cea", "score": "0.5587482", "text": "public abstract function processAuthorisation();", "title": "" }, { "docid": "2e651bfaad592f6dad9c17af78c0858f", "score": "0.5543587", "text": "public function process() {\n\t\tif ($this->payType == 'ACH') {\n\t\t\treturn $this->processACH(); \n\t\t}\n\n\t\t/* calculate the tamper proof seal */\n\t\t$tps = $this->calcTPS();\n\n\t\t//echo $this->account;\n\n\t\t/* fill in the fields */\n\t\t$fields = array(\n\t\t\t'ACCOUNT_ID' => $this->accountId, \n\t\t\t'USER_ID' => $this->userId, \n\t\t\t'TAMPER_PROOF_SEAL' => $tps, \n\t\t\t'TRANS_TYPE' => $this->transType, \n\t\t\t'PAYMENT_TYPE' => $this->payType, \n\t\t\t'MODE' => $this->mode, \n\t\t\t'MASTER_ID' => $this->masterId, \n\t\t\t'PAYMENT_ACCOUNT' => $this->account, \n\t\t\t'CARD_CVV2' => $this->cvv2, \n\t\t\t'CARD_EXPIRE' => $this->expire, \n\t\t\t'SSN' => $this->ssn, \n\t\t\t'BIRTHDATE' => $this->birthdate, \n\t\t\t'CUST_ID' => $this->custId, \n\t\t\t'CUST_ID_STATE' => $this->custIdState, \n\t\t\t'AMOUNT' => $this->amount, \n\t\t\t'NAME1' => $this->name1, \n\t\t\t'NAME2' => $this->name2, \n\t\t\t'ADDR1' => $this->addr1, \n\t\t\t'ADDR2' => $this->addr2, \n\t\t\t'CITY' => $this->city, \n\t\t\t'STATE' => $this->state, \n\t\t\t'ZIP' => $this->zip, \n\t\t\t'PHONE' => $this->phone, \n\t\t\t'EMAIL' => $this->email, \n\t\t\t'COUNTRY' => $this->country, \n\t\t\t'MEMO' => $this->memo, \n\t\t\t'CUSTOM_ID' => $this->customid1, \n\t\t\t'CUSTOM_ID2' => $this->customid2, \n\t\t\t'ORDER_ID' => $this->orderId, \n\t\t\t'INVOICE_ID' => $this->invoiceId, \n\t\t\t'AMOUNT_TIP' => $this->tip, \n\t\t\t'AMOUNT_TAX' => $this->tax, \n\t\t\t'DO_REBILL' => $this->doRebill, \n\t\t\t'REB_FIRST_DATE' => $this->rebDate, \n\t\t\t'REB_EXPR' => $this->rebExpr, \n\t\t\t'REB_CYCLES' => $this->rebCycles, \n\t\t\t'REB_AMOUNT' => $this->rebAmount, \n\t\t\t'DO_AUTOCAP' => $this->doAutocap, \n\t\t\t'AVS_ALLOWED' => $this->avsAllowed, \n\t\t\t'CVV2_ALLOWED' => $this->cvv2Allowed, \n\t\t\t'CUSTOMER_IP' => $_SERVER['REMOTE_ADDR'],\n\t\t\t'DUPLICATE_OVERRIDE' => 1\n\t\t\t);\n\t\t\t\n\t\t/* perform the transaction */\n\t\t$ch = curl_init();\n\n\t\tcurl_setopt($ch, CURLOPT_URL, self::POST_URL);\n\t\t// Set the URL\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"BluepayPHP SDK/2.0\");\n\t\t// Cosmetic\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t// Perform a POST\n\t\t// curl_setopt($ch, CURLOPT_CAINFO, \"c:\\\\windows\\\\ca-bundle.crt\"); // Name of the file to verify the server's cert against\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t// Turns off verification of the SSL certificate.\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t// If not set, curl prints output to the browser\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));\n\n\t\t$this->response = curl_exec($ch);\n\n\t\tcurl_close($ch);\n\n\t\t/* parse the response */\n\t\t$this->parseResponse();\n\t}", "title": "" }, { "docid": "5c3783bb03062f326964ba0b6da73327", "score": "0.5502753", "text": "public function callbackhostedpaymentAction()\n {\n \t$boError = false;\n \t$formVariables = array();\n \t$model = Mage::getModel('tpg/direct');\n \t$szOrderID = $this->getRequest()->getPost('OrderID');\n \t$order = Mage::getModel('sales/order');\n $order->loadByIncrementId($szOrderID);\n $szStatus = 'canceled';\n \t\n \ttry\n \t{\n \t\t$hmHashMethod = $model->getConfigData('hashmethod');\n\t\t\t$szPassword = $model->getConfigData('password');\n\t\t\t$szPreSharedKey = $model->getConfigData('presharedkey');\n \t\t\n \t\t$formVariables['HashDigest'] = $this->getRequest()->getPost('HashDigest');\n \t\t$formVariables['MerchantID'] = $this->getRequest()->getPost('MerchantID');\n \t\t$formVariables['StatusCode'] = $this->getRequest()->getPost('StatusCode');\n \t\t$formVariables['Message'] = $this->getRequest()->getPost('Message');\n \t\t$formVariables['PreviousStatusCode'] = $this->getRequest()->getPost('PreviousStatusCode');\n \t\t$formVariables['PreviousMessage'] = $this->getRequest()->getPost('PreviousMessage');\n \t\t$formVariables['CrossReference'] = $this->getRequest()->getPost('CrossReference');\n \t\t$formVariables['Amount'] = $this->getRequest()->getPost('Amount');\n \t\t$formVariables['CurrencyCode'] = $this->getRequest()->getPost('CurrencyCode');\n \t\t$formVariables['OrderID'] = $this->getRequest()->getPost('OrderID');\n \t\t$formVariables['TransactionType'] = $this->getRequest()->getPost('TransactionType');\n \t\t$formVariables['TransactionDateTime'] = $this->getRequest()->getPost('TransactionDateTime');\n \t\t$formVariables['OrderDescription'] = $this->getRequest()->getPost('OrderDescription');\n \t\t$formVariables['CustomerName'] = $this->getRequest()->getPost('CustomerName');\n \t\t$formVariables['Address1'] = $this->getRequest()->getPost('Address1');\n \t\t$formVariables['Address2'] = $this->getRequest()->getPost('Address2');\n \t\t$formVariables['Address3'] = $this->getRequest()->getPost('Address3');\n \t\t$formVariables['Address4'] = $this->getRequest()->getPost('Address4');\n \t\t$formVariables['City'] = $this->getRequest()->getPost('City');\n \t\t$formVariables['State'] = $this->getRequest()->getPost('State');\n \t\t$formVariables['PostCode'] = $this->getRequest()->getPost('PostCode');\n \t\t$formVariables['CountryCode'] = $this->getRequest()->getPost('CountryCode');\n \t\t\n \t\tif(!IRC_PaymentFormHelper::compareHostedPaymentFormHashDigest($formVariables, $szPassword, $hmHashMethod, $szPreSharedKey))\n \t\t{\n \t\t\t$boError = true;\n \t\t\t$szNotificationMessage = \"The payment was rejected for a SECURITY reason: the incoming payment data was tampered with.\";\n \t\t\tMage::log(\"The Hosted Payment Form transaction couldn't be completed for the following reason: \".$error. \" Form variables: \".$formVariables);\n \t\t}\n \t}\n \tcatch (Exception $exc)\n \t{\n \t\t$boError = true;\n \t\t$szNotificationMessage = Iridiumcorp_Tpg_Model_Tpg_GlobalErrors::ERROR_183;\n \t\tMage::logException($exc);\n \t\tMage::log($error.\" Order ID: \".$formVariables['OrderID'].\". Exception details: \".$exc);\n \t}\n \t\n \t// check the incoming hash digest\n \tif($boError)\n \t{\n \t\t// do nothing\n \t}\n \telse\n \t{\n \t\t$szNotificationMessage = \"Payment Processor Response: \".$formVariables['Message'];\n \t\tswitch ($formVariables['StatusCode'])\n \t\t{\n \t\t\tcase \"0\":\n \t\t\t\t// TODO : maybe to update the order processing status in the Magento backend\n \t\t\t\tMage::log(\"Hosted Payment Form transaction successfully completed. Transaction details: \".print_r($formVariables, 1));\n \t\t\t\t$szStatus = 'processing';\n \t\t\t\t$boError = false;\n \t\t\t\tbreak;\n \t\t\tcase \"20\":\n \t\t\t\tMage::log(\"Duplicate Hosted Payment Form transaction. Transaction details: \".print_r($formVariables, 1));\n \t\t\t\t$szNotificationMessage = \"Payment Processor Response: \".$szMessage.\". A duplicate transaction means that a transaction with these details has already been processed by the payment provider. The details of the original transaction - Previous Transaction Response: \".$formVariables['PreviousMessage'];\n \t\t\t\tif($formVariables['PreviousStatusCode'] == \"0\")\n \t\t\t\t{\n\t \t\t\t\t$boError = false;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n\t \t\t\t\t$boError = true;\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase \"5\":\n \t\t\tcase \"30\":\n \t\t\tdefault:\n \t\t\t\tMage::log(\"Hosted Payment Form transaction couldn't be completed. Transaction details: \".print_r($formVariables, 1));\n \t\t\t\t$boError = true;\n \t\t\t\tbreak;\n \t\t}\n \t}\n \t\n \t$model->updateOrderState($order, $szStatus, $szNotificationMessage);\n\t\t\t\n \tif($boError)\n \t{\n \t\tMage::getSingleton('core/session')->addError($szNotificationMessage);\n \t\t$this->_redirect('checkout/onepage/failure');\n \t}\n \telse\n \t{\n \t\tMage::getSingleton('core/session')->addSuccess($szNotificationMessage);\n \t\t$this->_redirect('checkout/onepage/success');\n \t}\n }", "title": "" }, { "docid": "c4f6921367953f26e8a5c9db3abb459f", "score": "0.54973733", "text": "function autorizePayment() {\n \n self::setState(GopayHelper::AUTHORIZED);\n\t\t\n }", "title": "" }, { "docid": "7ba086060d1f11d20a3f47e857f51c30", "score": "0.5485181", "text": "function ReversePayment($intPayment, $intReversedBy = NULL)\n\t {\n\t \ttry\n\t \t{\n\t \t\t$oPayment\t= Payment::getForId($intPayment);\n\t \t\t$oPayment->reverse($intReversedBy);\n\t \t}\n\t \tcatch (Exception $oException)\n\t \t{\n\t \t\treturn false;\n\t \t}\n\t\t\n\t\treturn true;\n\t }", "title": "" }, { "docid": "9f6b1adbc4f75ebdf4b189fdfd23b978", "score": "0.54546607", "text": "public function postProcess()\n {\n $idOrder = Tools::getValue('id_order');\n $order = new Order($idOrder);\n $customer = $this->context->customer;\n\n if (!Validate::isLoadedObject($order) ||\n $customer->id != $order->id_customer ||\n $order->module != $this->module->name ||\n !$this->module->active\n ) {\n $this->setRedirectAfter('404');\n return;\n }\n\n if ($order->hasBeenPaid()) {\n $idLang = $this->context->language->id;\n $this->setRedirectAfter(\n $this->context->link->getPageLink('order-detail', true, $idLang, ['id_order' => $order->id])\n );\n return;\n }\n\n $paymentData = $this->collectPaymentData($order);\n\n WebToPay::redirectToPayment($paymentData, true);\n }", "title": "" }, { "docid": "05894f1d4f1fa30adacdb19967599385", "score": "0.5447374", "text": "public function handleGatewayCallback()\n {\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n if(Session::has('payment_type')){\n if(Session::get('payment_type') == 'cart_payment'){\n $payment = Paystack::getPaymentData();\n $payment_detalis = json_encode($payment);\n if(!empty($payment['data']) && $payment['data']['status'] == 'success'){\n $checkoutController = new CheckoutController;\n return $checkoutController->checkout_done(Session::get('order_id'), $payment_detalis);\n }\n Session::forget('order_id');\n flash(translate('Payment cancelled'))->success();\n return redirect()->route('home');\n }\n elseif (Session::get('payment_type') == 'wallet_payment') {\n $payment = Paystack::getPaymentData();\n $payment_detalis = json_encode($payment);\n if(!empty($payment['data']) && $payment['data']['status'] == 'success'){\n $walletController = new WalletController;\n return $walletController->wallet_payment_done(Session::get('payment_data'), $payment_detalis);\n }\n Session::forget('payment_data');\n flash(translate('Payment cancelled'))->success();\n return redirect()->route('home');\n }\n elseif (Session::get('payment_type') == 'customer_package_payment') {\n $payment = Paystack::getPaymentData();\n $payment_detalis = json_encode($payment);\n if(!empty($payment['data']) && $payment['data']['status'] == 'success'){\n $customer_package_controller = new CustomerPackageController;\n return $customer_package_controller->purchase_payment_done(Session::get('payment_data'), $payment);\n }\n Session::forget('payment_data');\n flash(translate('Payment cancelled'))->success();\n return redirect()->route('home');\n }\n elseif (Session::get('payment_type') == 'seller_package_payment') {\n $payment = Paystack::getPaymentData();\n $payment_detalis = json_encode($payment);\n if(!empty($payment['data']) && $payment['data']['status'] == 'success'){\n $seller_package_controller = new SellerPackageController;\n return $seller_package_controller->purchase_payment_done(Session::get('payment_data'), $payment);\n }\n Session::forget('payment_data');\n flash(translate('Payment cancelled'))->success();\n return redirect()->route('home');\n }\n }\n }", "title": "" }, { "docid": "b8a0a6f540c4003cbc8993f8ac9bb4ca", "score": "0.5430594", "text": "protected function _process_payment_reversed(Rb_EcommerceResponse $response, Array $data)\n\t{\n\t\t//\t\treversal. The funds have been removed from your account balance and\n\t\t//\t\treturned to the buyer. The reason for the reversal is specified in the\n\t\t//\t\tReasonCode element.\n\t\t\n\t\t$response->set('message', 'PLG_RB_ECOMMERCEPROCESSOR_PAYPAL_TRANSACTION_PAYPAL_REVERSED')\n\t\t\t\t ->set('payment_status', Rb_EcommerceResponse::NOTIFICATION);\n\t}", "title": "" }, { "docid": "861e8e141147c46875f383bcc028294b", "score": "0.5376552", "text": "public function process()\n {\n \t$this->layout = false;\n \t/*$request = new AuthorizeNetTD;\n\t\t$transactionId = \"2234120548\";\n\t\t$response = $request->getTransactionDetails($transactionId);\n\t\tpr($response);\n\t\texit;\n\t\techo $response->xml->transaction->transactionStatus;\n\n\t\texit;*/\n \t$transaction = new AuthorizeNetAIM;\n \t$transaction->setSandbox(AUTHORIZENET_SANDBOX);\n \t$transaction->setFields(\n \t\tarray(\n \t\t\t'amount' => $this->request->data['BusinessOwner']['memberShipPrice'], \n \t\t\t'card_num' => $this->request->data['BusinessOwner']['CC_Number'],\n \t\t\t'exp_date' => $this->request->data['BusinessOwner']['expiration'],\n \t\t\t'card_code' => $this->request->data['BusinessOwner']['cvv'],\n \t\t\t)\n \t\t);\n \t$response = $transaction->authorizeAndCapture();\n \t//pr($response);exit;\n \tif (isset($response->declined) && $response->declined == \"1\") {\n $errMsg = $response->response_reason_text;\n $errMsg .= \"Please try again later.\";\n $this->Session->setFlash(__($errMsg), 'flash_bad');\n $this->redirect(array('controller' => 'users', 'action' => 'payment'));\n }\n if (isset($response->error) && $response->error == \"1\") {\n $errMsg = $response->response_reason_text;\n $errMsg .= \"Please try again later.\";\n $this->Session->setFlash(__($errMsg), 'flash_bad');\n $this->redirect(array('controller' => 'users', 'action' => 'payment'));\n }\n if (isset($response->approved) && $response->approved == \"1\") {\n /* * ***********Create Subscription****************** */\n /* $subscription = new AuthorizeNet_Subscription;\n $subscription->name = 'Api Subscription';\n $subscription->intervalLength = \"1\";\n $subscription->intervalUnit = \"months\";\n $subscription->startDate = date('Y-m-d',time());\n $subscription->totalOccurrences = \"999\";\n $subscription->amount = '50';\n $subscription->creditCardCardNumber = $this->request->data['BusinessOwner']['CC_Number'];\n $subscription->creditCardExpirationDate = $this->request->data['BusinessOwner']['expiration'];\n $subscription->creditCardCardCode = $this->request->data['BusinessOwner']['cvv'];\n $subscription->billToFirstName = 'A3';\n $subscription->billToLastName = 'Logics';\n\n $request = new AuthorizeNetARB;\n $response = $request->createSubscription($subscription);\n $subscription_id = $response->getSubscriptionId(); */\n $errMsg = \"Payment Successful\";\n $this->Session->setFlash(__($errMsg), 'flash_good');\n /* * ***********Create Subscripton******************* */\n\n $this->redirect(array('controller' => 'users', 'action' => 'payment'));\n \n }\n }", "title": "" }, { "docid": "aef8cf766cfaf777fe985fa1eda758b5", "score": "0.53752565", "text": "protected function _process_payment_canceled_reversal(Rb_EcommerceResponse $response, Array $data)\n\t{\n\t\t//\t\twon a dispute with the customer, and the funds for the transaction that was\n\t\t//\t\treversed have been returned to you.\n\t\t\n\t\t$response->set('message', 'PLG_RB_ECOMMERCEPROCESSOR_PAYPAL_TRANSACTION_PAYPAL_CANCELED_REVERSAL');\n\t\t$response->set('payment_status', Rb_EcommerceResponse::NOTIFICATION);\n\t}", "title": "" }, { "docid": "ba73dc78ba11ea531b76054050ba411e", "score": "0.53547484", "text": "function handle_payment_return() {\n\t\t// !realex_redirect IPN handling code\n\t\t$new_status = false;\n\t\t//Common variables\n\t\t$amount = $_POST['AMOUNT'];\n\t\t$currency = $_POST['CURRENCY'];\n\t\t$timestamp = date('Y-m-d H:i:s', strtotime($_POST['payment_date']));\n\t\terror_log('handle_payment_return $booking_id='.$_POST['booking_id']);\n\t\t$custom_values = explode(':', $_POST['booking_id']);\n\t\t$booking_id = $custom_values[0];\n\t\t$event_id = !empty($custom_values[1]) ? $custom_values[1]:0;\n\t\t$EM_Booking = new EM_Booking($booking_id);\n\t\tif ( !empty($EM_Booking->booking_id) && count($custom_values) == 2 ) {\n\t\t\t//booking exists\n\t\t\t$EM_Booking->manage_override = true; //since we're overriding the booking ourselves.\n\t\t\t$user_id = $EM_Booking->person_id;\n\n\t\t\t// process realex_redirect response\n\t\t\tswitch ($result) {\n\t\t\tcase '00':\n\t\t\t\t// case: successful payment\n\t\t\t\t$this->record_transaction($EM_Booking, $amount, $currency, $timestamp, $_POST['order_id'], $result, '');\n\t\t\t\t//get booking metadata\n\t\t\t\t$user_data = array();\n\t\t\t\tif ( !empty($EM_Booking->booking_meta['registration']) && is_array($EM_Booking->booking_meta['registration']) ) {\n\t\t\t\t\tforeach ($EM_Booking->booking_meta['registration'] as $fieldid => $field) {\n\t\t\t\t\t\tif ( trim($field) !== '' ) {\n\t\t\t\t\t\t\t$user_data[$fieldid] = $field;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $_POST['AMOUNT'] >= $EM_Booking->get_price(false, false, true) && (!get_option('em_realex_redirect_manual_approval', false) || !get_option('dbem_bookings_approval')) ) \n\t\t\t\t{\n\t\t\t\t\t$EM_Booking->approve(true, true); //approve and ignore spaces\n\t\t\t\t}\n\t\t\t\t//else {\n\t\t\t\t//\t//TODO do something if pp payment not enough\n\t\t\t\t//\t$EM_Booking->set_status(0); //Set back to normal \"pending\"\n\t\t\t\t//}\n\t\t\t\tdo_action('em_payment_processed', $EM_Booking, $this);\n\t\t\t\tbreak;\n\t\t\tcase '101':\n\t\t\tcase '102':\n\t\t\tdefault:\n\t\t\t\t// case: denied\n\t\t\t\t$note = 'Last transaction has been reversed. Reason: Payment Denied';\n\t\t\t\t$this->record_transaction($EM_Booking, $amount, $currency, $timestamp, $_POST['order_id'], $result, $note);\n\n\t\t\t\t$EM_Booking->cancel();\n\t\t\t\tdo_action('em_payment_denied', $EM_Booking, $this);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else {\n\t\t\t// ! everything worked!! process payment\n\t\t\tif ( $result == \"00\" ) {\n\t\t\t\t$message = apply_filters('em_gateway_realex_redirect_bad_booking_email',\n\t\t\t\t'A Payment has been received by realex for a non-existent booking\n\t\t\t\t\n\t\t\t\tEvent Details : %event%\n\t\t\t\t\n\t\t\t\tIt may be that this user booking session timed out yet they proceeded with payment at a later stage.\n\t\t\t\t\n\t\t\t\tTo refund this transaction, you must go to your realex account and search for this transaction:\n\t\t\t\t\n\t\t\t\tTransaction ID : %transaction_id%\n\t\t\t\tEmail : %payer_email%\n\t\t\t\t\n\t\t\t\tWhen viewing the transaction details, you should see an option to issue a refund.\n\t\t\t\t\n\t\t\t\tIf there is still space available, the user must book again.\n\t\t\t\t\n\t\t\t\tSincerely,\n\t\t\t\tBHAA Events Manager', $booking_id, $event_id);\n\t\t\t\tif ( !empty($event_id) ) {\n\t\t\t\t\t$EM_Event = new EM_Event($event_id);\n\t\t\t\t\t$event_details = $EM_Event->name . \" - \" . date_i18n(get_option('date_format'), $EM_Event->start);\n\t\t\t\t}else { $event_details = __('Unknown', 'em-pro'); }\n\t\t\t\t$message = str_replace(array('%transaction_id%', '%payer_email%', '%event%'), array($_POST['order_id'], $_POST['payer_email'], $event_details), $message);\n\t\t\t\twp_mail(get_option('em_'. $this->gateway . \"_email\" ), __('Unprocessed payment needs refund'), $message);\n\t\t\t}else {\n\t\t\t\t//header('Status: 404 Not Found');\n\t\t\t\techo 'Error: Bad IPN request, custom ID does not correspond with any pending booking.';\n\t\t\t\t//echo \"<pre>\"; print_r($_POST); echo \"</pre>\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\t//fclose($log);\n\t}", "title": "" }, { "docid": "9dcd413aca3cee494de4f34e7f838195", "score": "0.5340329", "text": "function processPayment() {\n\n self::setState(GopayHelper::PAID);\n\t\t\n }", "title": "" }, { "docid": "e64dc0190eb2e1473442fd0312bb66d1", "score": "0.53393114", "text": "function process_payment() {\r\n global $app, $smarty;\r\n\r\n // payment id must be in session\r\n if (!isset($_SESSION['payment_id']))\r\n $app->abort('##Payment ID not set##');\r\n\r\n // handle no-charge payment\r\n if (param('amount') == 0) {\r\n store_free_payment();\r\n return 'free';\r\n }\r\n\r\n // if module key is not set, assume payment has been stored by\r\n // another process (e.g. paypal_return.php). verify that the payment\r\n // exists and is complete.\r\n if (!isset($_REQUEST['module_key'])) {\r\n require_once('payment.class.php');\r\n $tbl_payment= new Payment;\r\n $payment = $tbl_payment->get($_SESSION['payment_id']);\r\n if (!$payment->is_completed)\r\n $app->abort('##Payment not complete##');\r\n return true;\r\n }\r\n\r\n // load the module and validate the submission\r\n require_once('payment_module.class.php');\r\n $tbl_payment_module = new Payment_Module;\r\n $module = $tbl_payment_module->find('where `module_key`=?', array($_REQUEST['module_key']));\r\n if ($module->_new_row || !$module->is_enabled)\r\n $app->abort('##Invalid module_key##');\r\n $module->require_class();\r\n $obj = new $module->module_key;\r\n $module->conf = $obj->configuration();\r\n\r\n // validate the submission\r\n if (!$obj->validate())\r\n return false;\r\n\r\n if ($module->module_key == 'authorizenet') {\r\n\r\n // populate the confirmation form, which posts to service\r\n $module->action = $module->conf['MODULE_PAYMENT_AUTHORIZENET_URL'];\r\n $module->hidden = array(\r\n 'session_id' => session_id(),\r\n 'x_login' => $module->conf['MODULE_PAYMENT_AUTHORIZENET_LOGIN'],\r\n 'x_version' => '3.0',\r\n 'x_test_request' => $module->conf['MODULE_PAYMENT_AUTHORIZENET_TESTMODE'] == 'Test' ? 'TRUE' : 'FALSE',\r\n 'x_fp_sequence' => $_SESSION['payment_id'],\r\n 'x_fp_timestamp' => time(),\r\n 'x_cust_id' => @$_SESSION['user_id'],\r\n 'x_relay_response' => 'TRUE',\r\n 'x_relay_url' => $app->url('/authorizenet_return.php', array(), true, true),\r\n 'x_email' => param('email'),\r\n 'x_description' => param('url'),\r\n 'x_invoice_num' => $_SESSION['payment_id'],\r\n 'x_amount' => param('amount'),\r\n 'x_currency_code' => $module->conf['MODULE_PAYMENT_AUTHORIZENET_CURRENCY'],\r\n 'x_method' => 'CC',\r\n 'x_type' => 'AUTH_CAPTURE',\r\n 'x_card_num' => $_REQUEST['authorizenet_cc_number'],\r\n 'x_exp_date' => $_REQUEST['authorizenet_cc_expires_Month'] . $_REQUEST['authorizenet_cc_expires_Year'],\r\n );\r\n $module->hidden['x_fp_hash'] = $obj->CalculateFP(\r\n $module->hidden['x_login'],\r\n $module->conf['MODULE_PAYMENT_AUTHORIZENET_TXNKEY'],\r\n $module->hidden['x_amount'],\r\n $module->hidden['x_fp_sequence'],\r\n $module->hidden['x_fp_timestamp'],\r\n $module->hidden['x_currency_code']\r\n );\r\n load_params('amount');\r\n $smarty->assign_by_ref('module', $module);\r\n $smarty->caching = false;\r\n $smarty->display('get_pixels_authorizenet.tpl');\r\n exit;\r\n\r\n }\r\n elseif ($module->module_key == 'psigate') {\r\n\r\n // populate the confirmation form, which posts to service\r\n $module->action = $module->conf['MODULE_PAYMENT_PSIGATE_URL'];\r\n $module->hidden = array(\r\n 'Bname' => $_REQUEST['psigate_cc_owner'],\r\n 'Userid' => @$_SESSION['user_id'],\r\n 'CardNumber' => $_REQUEST['psigate_cc_number'],\r\n 'ExpMonth' => $_REQUEST['psigate_cc_expires_Month'],\r\n 'ExpYear' => substr($_REQUEST['psigate_cc_expires_Year'], 2, 2),\r\n 'Email' => param('email'),\r\n 'ChargeType' => '0',\r\n 'Result' => '0',\r\n 'MerchantID' => $module->conf['MODULE_PAYMENT_PSIGATE_MERCHANT_ID'],\r\n 'Items' => '1',\r\n 'FullTotal' => param('amount'),\r\n 'ThanksURL' => $app->url('/psigate_return.php', array('payment_id' => $_SESSION['payment_id']), true, true),\r\n 'NoThanksURL' => payment_controller_url(),\r\n );\r\n load_params('amount');\r\n $smarty->assign_by_ref('module', $module);\r\n $smarty->caching = false;\r\n $smarty->display('get_pixels_psigate.tpl');\r\n exit;\r\n\r\n }\r\n elseif ($module->module_key == 'ipayment') {\r\n\r\n // populate the confirmation form, which posts to service\r\n $module->action = str_replace('[id]', $module->conf['MODULE_PAYMENT_IPAYMENT_ID'], $module->conf['MODULE_PAYMENT_IPAYMENT_URL']);\r\n $module->hidden = array(\r\n 'silent' => '1',\r\n 'trx_paymenttyp' => 'cc',\r\n 'trxuser_id' => $module->conf['MODULE_PAYMENT_IPAYMENT_USER_ID'],\r\n 'trxpassword' => $module->conf['MODULE_PAYMENT_IPAYMENT_PASSWORD'],\r\n 'item_name' => param('url'),\r\n 'trx_currency' => $module->conf['MODULE_PAYMENT_IPAYMENT_CURRENCY'],\r\n 'trx_amount' => param('amount'),\r\n 'cc_expdate_month' => $_REQUEST['ipayment_cc_expires_Month'],\r\n 'cc_expdate_year' => $_REQUEST['ipayment_cc_expires_Year'],\r\n 'cc_number' => $_REQUEST['ipayment_cc_number'],\r\n 'cc_checkcode' => $_REQUEST['ipayment_cc_cvv'],\r\n 'addr_name' => $_REQUEST['ipayment_cc_owner'],\r\n 'redirect_url' => $app->url('/ipayment_return.php', array('payment_id' => $_SESSION['payment_id']), true, true),\r\n 'silent_error_url' => payment_controller_url(),\r\n 'cart_order_id' => $_SESSION['payment_id'],\r\n );\r\n load_params('amount');\r\n $smarty->assign_by_ref('module', $module);\r\n $smarty->caching = false;\r\n $smarty->display('get_pixels_ipayment.tpl');\r\n exit;\r\n\r\n }\r\n elseif ($module->module_key == 'cc') {\r\n // no additional processing required\r\n }\r\n elseif ($module->module_key == 'offline') {\r\n // no additional processing required\r\n }\r\n else {\r\n $app->abort('##Invalid module_key##');\r\n }\r\n\r\n // create the payment\r\n require_once('payment.class.php');\r\n $payment = new Payment;\r\n $payment->id = $_SESSION['payment_id'];\r\n $payment->payment_method = $module->module_key;\r\n $payment->is_completed = 1;\r\n $payment->completed_at = Util::epoch_to_datetime();\r\n $payment->is_verified = 1;\r\n $payment->verified_at = Util::epoch_to_datetime();\r\n $payment->verified_vars = print_r($_REQUEST, true);\r\n $payment->txn_id = '';\r\n\r\n // cc payments require offline verification\r\n if ($module->module_key == 'cc') {\r\n $payment->is_verified = 0;\r\n\r\n // if split CC digits requested, mail the middle digits separately\r\n if ($module->conf['MODULE_PAYMENT_CC_EMAIL']) {\r\n $cc_number =& $_REQUEST['cc_number'];\r\n preg_match('/^(....)(.*)(....)$/', $cc_number, $matches);\r\n $cc_digits = $matches[2];\r\n $matches[2] = str_repeat('X', strlen($matches[2]));\r\n $cc_number = $matches[1] . $matches[2] . $matches[3];\r\n $payment->verified_vars = print_r($_REQUEST, true);\r\n $app->mail($module->conf['MODULE_PAYMENT_CC_EMAIL'], 'cc_split_digits', array(\r\n '[cc_digits]' => $cc_digits,\r\n '[payment_id]' => $payment->id,\r\n '[payment_url]' => $app->url('/admin/payment_history.php', array('id' => $payment->id), true, true),\r\n ));\r\n }\r\n\r\n }\r\n\r\n // offline payments require offline verification\r\n if ($module->module_key == 'offline') {\r\n $payment->is_verified = 0;\r\n }\r\n $payment->drawing_id = param('drawing_id')?param('drawing_id'):0;\r\n $payment->save();\r\n \r\n \r\n\r\n return true;\r\n}", "title": "" }, { "docid": "f33c40d0b28adf1e11d1ffbd3e25b504", "score": "0.5321611", "text": "function postback_payment_controller()\r\n{\r\n global $app, $payment_controller;\r\n\r\n $_SERVER['REQUEST_METHOD'] = 'POST';\r\n if ($payment_controller == 'renew') {\r\n $_REQUEST['step'] = 1;\r\n require_once('region.class.php');\r\n $tbl_region = new Region;\r\n $region = $tbl_region->get(param('region_id'));\r\n $_REQUEST['id'] = $region->id;\r\n $_REQUEST['digest'] = $app->digest(array($region->id));\r\n $_REQUEST['email'] = $region->email;\r\n return('renew.php');\r\n }\r\n else {\r\n $_REQUEST['step'] = 6;\r\n return('get_pixels.php');\r\n }\r\n}", "title": "" }, { "docid": "ed6bffcd6c9ef9ae65251a708a8dc89c", "score": "0.5312515", "text": "public function ProcessPayment()\n {\n $this->layout->hide_returning_customer = true;\n $this->layout->hide_greeting = true;\n\n\n $np = Input::get('np');\n $verified = Input::get('verified');\n\n if (md5($np . $_SERVER['HTTP_HOST']) == $verified)\n {\n $this->System_Set_Payment_Received(true);\n $this->layout->content .= View::make('client_paymentcomplete');\n return;\n }\n\n\n $ClientData = $this->MerchantProcess_LTVars($client);\n\n $Processing_NextCheck_Percent = $client->Processing_NextCheck_Percent;\n $Processing_ExpiresTime_Percent = $client->Processing_ExpiresTime_Percent;\n $Action_Performed = \"Done\";\n\n if ($client->Processing_NextCheck_Percent >= 100 && $ClientData['cart_processing_type'] != 'failed')\n {\n // Client has permission to cause the next action to happen.\n $method = $client->Processing_Method;\n $NewData = [];\n\n if ($client->TProperties->cart_processing_type == 'check' && $client->TProperties->cart_processing_typeid <= $client->TProperties->cart_processing_checks && method_exists($this, $method))\n {\n // this should fix the bug with the system not having the correct percent\n\n $NewData = $this->$method($client);\n\n $Action_Performed = \"Executed {$client->Processing_Method}\";\n\n }\n else\n {\n\n //check if we're completed then?\n if ($client->Processing_Check_Completed)\n {\n $NewData['cart_processing_type'] = \"finished\"; // failed !!!\n// $NewData['cart_processing_typeid'] = ; // 4 -- method requested was not found.\n\n $Action_Performed = \"Failed to execute {$client->Processing_Method}. Method does not exists.\";\n }\n else\n {\n $NewData['cart_processing_type'] = \"failed\"; // failed !!!\n $NewData['cart_processing_typeid'] = 4; // 4 -- method requested was not found.\n $Action_Performed = \"Failed to execute {$client->Processing_Method}. Method does not exists.\";\n }\n }\n\n if (isset($NewData['cart_process_immediate']))\n {\n unset($NewData['cart_process_immediate']);\n }\n else\n $NewData['cart_processing_last_check'] = time(); // five minutes from now.\n\n $this->leadtracapi->CreateOrUpdateClient($this->campaignId, $NewData, $this->Merchant_GetSelectedClientFileNumber());\n $client = $this->Merchant_GetSelectedClient(false, true);\n $ClientData = $this->MerchantProcess_LTVars($client);\n\n }\n else\n {\n $Action_Performed = \"Not time to check\";\n }\n if ($client->TProperties->cart_processing_type == 'finished')\n $Processing_ExpiresTime_Percent = 100;\n\n $Progress1 = ['progress' => $Processing_ExpiresTime_Percent, 'text' => $ClientData['cart_processing_text']];\n $Progress2 = ['progress' => $Processing_NextCheck_Percent, 'text' => $ClientData['cart_processing_text']];\n\n $CheckResults = [\"cart_processing_check1\",\"cart_processing_check2\",\"cart_processing_check3\"];\n\n $Checks = [];\n foreach($CheckResults as $checkname)\n {\n $Checks[] = ['id' => $checkname, 'result' => @$client->TProperties->{$checkname.\"_result\"}];\n }\n $TProperties = $client->TProperties;\n $Payment = $client->ClientPayment;\n\n $Variables = array('NewData','ClientData', 'TProperties', 'Payment', 'Progress1', 'Checks', 'Progress2', 'Processing_NextCheck_Percent', 'Processing_ExpiresTime_Percent', 'Action_Performed');\n\n if (Input::get('json'))\n {\n $null = 'null';\n return compact($null);\n }\n\n $this->layout->content .= View::make('client_thankyou',\n compact($Variables, \"client\"));\n\n }", "title": "" }, { "docid": "8eae606f9851a0a77cad84f5576ec0c7", "score": "0.52917874", "text": "function refundPayment() {\n \n self::setState(GopayHelper::REFUNDED);\n\t\t\n }", "title": "" }, { "docid": "16f748319a15a47413a0bfb321f00cdc", "score": "0.52732366", "text": "public function after_process() \n {\n global $insert_id, $order;\n $transactionId = Session::getRpSessionEntry('transactionId');\n $transactionShortId = Session::getRpSessionEntry('transactionShortId');\n if (!empty($transactionId)) {\n $result = $this->_paymentConfirm($transactionId, $transactionShortId, $insert_id);\n if (!array_key_exists('error', $result)) {\n $this->_saveRpOrder($order, $insert_id);\n Session::cleanRpSession();\n } else {\n Session::cleanRpSession();\n $error = urlencode(constant(strtoupper($this->code) . '_ERROR'));\n tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $error, 'SSL'));\n }\n }\n }", "title": "" }, { "docid": "b47735678da214cf7318e29031763bdd", "score": "0.525599", "text": "public function postProcess()\n {\n $response = \\Tools::getAllValues();\n $cart_id = \\Tools::getValue('id_cart');\n $payment_state = \\Tools::getValue('payment_state');\n\n try {\n $order = Order::getByCartId($cart_id);\n\n if ($payment_state !== Cancel::CANCEL_PAYMENT_STATE) {\n $response = $this->processRawResponse($response);\n }\n\n $response_factory = new ProcessablePaymentResponseFactory(\n $response,\n $order,\n ProcessType::PROCESS_RESPONSE,\n $payment_state\n );\n\n $processing_strategy = $response_factory->getResponseProcessing();\n $processing_strategy->process();\n } catch (\\Exception $exception) {\n $this->logger->error(\n 'Error in class:'. __CLASS__ .\n ' method:' . __METHOD__ .\n ' exception: ' . $exception->getMessage()\n );\n $this->errors = $exception->getMessage();\n $this->redirectWithNotifications($this->context->link->getPageLink('order'));\n }\n }", "title": "" }, { "docid": "875628421e7acfad4faa1e6838e4c396", "score": "0.52550423", "text": "function handle_payment_return() {\n\n// For testing only\n//$_POST = $_GET;\n//error_log( print_r( $_POST, true ) );\n//var_dump( $_POST );\n\n\t\t// Security check if Payment Response Password is configured\n\t\tif( get_option('em_'. $this->gateway . \"_callback_pw\" ) != '' ) {\n\t\t\tif( get_option('em_'. $this->gateway . \"_callback_pw\" ) != $_POST['callbackPW'] ) {\n\t\t\t\tstatus_header( 403 );\n\t\t\t\techo 'Permisson denied. callbackPW incorrect.';\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif( isset( $_POST['cartId'] ) && isset( $_POST['transTime'] ) && isset( $_POST['transStatus'] ) ) {\n\n\t\t\t// Lookup booking\n\t\t\t$EM_Booking = em_get_booking( $_POST['cartId'] );\n\n\t\t\t$amount = $_POST['amount'];\n\t\t\t$currency = $_POST['currency'];\n\t\t\t$timestamp = date('Y-m-d H:i:s', $_POST['transTime'] / 1000 ); // WorldPay timestamp is miliseconds since epoch\n\n\t\t\tif( !empty($EM_Booking->booking_id) ){\n\n\t\t\t\tif( $_POST['transStatus'] == 'Y' ) {\n\t\t\t\t\t// Payment successful\n\t\t\t\t\t$this->record_transaction($EM_Booking, $amount, $currency, $timestamp, $_POST['transId'], $_POST['transStatus'], '');\n\n\t\t\t\t\tif( $amount >= $EM_Booking->get_price() && (!get_option('em_'.$this->gateway.'_manual_approval', false) ) ){\n\t\t\t\t\t\t$EM_Booking->approve(true, true); //approve and ignore spaces\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//TODO do something if worldpay payment not enough\n\t\t\t\t\t\t$EM_Booking->set_status(0); //Set back to normal \"pending\"\n\t\t\t\t\t}\n\t\t\t\t\tdo_action('em_payment_processed', $EM_Booking, $this);\n\n\t\t\t\t\t// Display thanks message and link back to custom page or my bookings\n\t\t\t\t\t$continue_link = get_option('em_'. $this->gateway . '_return_success');\n\t\t\t\t\tif( empty( $continue_link ) ) {\n\t\t\t\t\t\t$continue_link = get_permalink(get_option(\"dbem_my_bookings_page\")).'?thanks=1';\n\t\t\t\t\t}\n\t\t\t\t\techo '<WPDISPLAY FILE=header.html>';\n\t\t\t\t\techo '<WPDISPLAY ITEM=banner>';\n\t\t\t\t\techo '<p>'.get_option('em_'.$this->gateway.'_booking_feedback_thanks').'</p>';\n\t\t\t\t\techo '<p><strong>Item:</strong> '.$EM_Booking->get_event()->event_name.'<br />';\n\t\t\t\t\techo '<strong>Amount:</strong> '.$currency.$amount.'<br />';\n\t\t\t\t\techo '<strong>Booking Reference:</strong> '.$EM_Booking->booking_id.'<br /></p>';\n\t\t\t\t\techo '<p>Return to <a href=\"'.$continue_link.'\">'.get_bloginfo('name').'</a>';\n\t\t\t\t\techo '<WPDISPLAY FILE=footer.html>';\n\t\t\t\t\treturn;\n\n\t\t\t\t}else {\n\t\t\t\t\tif( $_POST['transStatus'] == 'C' ) {\n\t\t\t\t\t\t// Payment Cancelled\n\n\t\t\t\t\t\t$note = 'Transaction cancelled: '.$_POST['rawAuthMessage'];\n\t\t\t\t\t\t$this->record_transaction($EM_Booking, $amount, $currency, $timestamp, $_POST['tranId'], $_POST['tranStatus'], $note);\n\n\t\t\t\t\t\t$EM_Booking->cancel();\n\t\t\t\t\t\tdo_action('em_payment_cancelled', $EM_Booking, $this);\n\n\t\t\t\t\t\tif( empty( $continue_link ) ) {\n\t\t\t\t\t\t\t$continue_link = get_permalink(get_option(\"dbem_my_bookings_page\")).'?fail='.$strStatus;\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '<WPDISPLAY FILE=header.html>';\n\t\t\t\t\t\techo '<WPDISPLAY ITEM=banner>';\n\t\t\t\t\t\techo '<p>Payment cancelled.</p>';\n\t\t\t\t\t\techo 'Return to <a href=\"'.$continue_link.'\">'.get_bloginfo('name').'</a>';\n\t\t\t\t\t\techo '<WPDISPLAY FILE=footer.html>';\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo 'Error: Unrecognised Status received';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\t// Handle case of no booking found\n\t\t\t\tif( is_numeric( $_POST['cartId'] ) && $_POST['transStatus'] == 'Y' ){\n\t\t\t\t\t$message = apply_filters('em_gateway_worldpay_bad_booking_email',\"\nA Payment has been received by WorldPay for a non-existent booking.\n\nIt may be that this user's booking has timed out yet they proceeded with payment at a later stage.\n\nIn some cases, it could be that other payments not related to Events Manager are triggering this error.\n\nTo refund this transaction, you must go to your WorldPay account and search for this transaction:\n\nTransaction ID : %transaction_id%\nEmail : %payer_email%\n\nWhen viewing the transaction details, you should see an option to issue a refund.\n\nIf there is still space available, the user must book again.\n\nSincerely,\nEvents Manager\n\t\t\t\t\t\", $booking_id, $event_id);\n\t\t\t\t\t$EM_Event = new EM_Event($event_id);\n\t\t\t\t\t$message = str_replace(array('%transaction_id%','%payer_email%'), array($_POST['transId'], $_POST['email'] ), $message);\n\t\t\t\t\twp_mail(get_option('em_'. $this->gateway . \"_email\" ), __('Unprocessed payment needs refund'), $message);\n\t\t\t\t}else{\n\t\t\t\t\t//header('Status: 404 Not Found');\n\t\t\t\t\techo 'Error: Bad WorldPay request. No booking found.';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Did not find expected POST variables. Possible access attempt from a non WorldPay site.\n\t\t\techo 'Error: Missing POST variables. Identification is not possible. If you are not WorldPay and are visiting this page directly in your browser, this error does not indicate a problem, but simply means EM is correctly set up and ready to receive notifications from WorldPay only.';\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "8f889d2ce4aa7d365459e6fb81bebf07", "score": "0.5247691", "text": "public function refundPayment(){\n return new PermiteRealizarLaDevolucinDeUnPagoApi($this->client, $this->config, $this->headerSelector);\n }", "title": "" }, { "docid": "ba0d2a16fa342a70a98712b95d04b9c1", "score": "0.52240545", "text": "public function postProcess()\n\t{\n\t\t$cardType = $this->validatePost($_POST['cardType']);\n\t\t$cardholderName = $this->validatePost($_POST['cardholderName']);\n\t\t$cardNumber = $this->validatePost($_POST['cardNumber']);\n\t\t$cardCVC = $this->validatePost($_POST['cardCVC']);\n\t\t$cardexpDate_mo = $this->validatePost($_POST['expDate_Month']);\n\t\t$cardexpDate_yr = $this->validatePost($_POST['expDate_Year']);\n\t\t$cardExp = $cardexpDate_mo.$cardexpDate_yr;\n\t\t$cardstartDate_mo = $this->validatePost($_POST['startDate_Month']);\n\t\t$cardstartDate_yr = $this->validatePost($_POST['startDate_Year']);\n\t\t$cardStart = $cardstartDate_mo.$cardstartDate_yr;\n\t\t$cardIssue = $this->validatePost($_POST['cardIssue']);\n\n\t\t$cart = $this->context->cart;\n\n\t\tif ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active)\n\t\t\tTools::redirect('index.php?controller=order&step=1');\n\n\t\t// Check that this payment option is still available in case the customer changed his address just before the end of the checkout process\n\t\t$authorized = false;\n\t\tforeach (Module::getPaymentModules() as $module)\n\t\t\tif ($module['name'] == 'ccoffline')\n\t\t\t{\n\t\t\t\t$authorized = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\tif (!$authorized)\n\t\t\tdie($this->module->l('This payment method is not available.', 'validation'));\n\n\t\t$customer = new Customer($cart->id_customer);\n\n\t\tif (!Validate::isLoadedObject($customer))\n\t\t\tTools::redirect('index.php?controller=order&step=1');\n\n\t\t$currency = $this->context->currency;\n\t\t$total = (float)$cart->getOrderTotal(true, Cart::BOTH);\n\n\t\t//$ccpayment = new ccpayment();\n\n\t\t//if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$ccpayment->active)\n\t\t//\tTools::redirectLink(__PS_BASE_URI__.'order.php?step=1');\n\n\t\t//$customer = new Customer((int)$cart->id_customer);\n\n\t\t//$mailVars =\tarray(\n\t\t//\t'{cheque_name}' => Configuration::get('CHEQUE_NAME'),\n\t\t//\t'{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'),\n\t\t//\t'{cheque_address_html}' => str_replace(\"\\n\", '<br />', Configuration::get('CHEQUE_ADDRESS')));\n\t\t\n\t\t//from OG validate.php\n\t\t//$ccpayment->validateOrder((int)($cart->id), _PS_OS_PREPARATION_, $total, $ccpayment->displayName, NULL, array(), (int)($currency->id), false,$customer->secure_key);\n\t\t$this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);\n\n\t\t//$order = new Order($ccpayment->currentOrder);\n\t\t//echo $order->id;\n\t\t$this->module->writePaymentcarddetails($this->module->currentOrder, $cardType, $cardholderName, $cardNumber, $cardCVC, $cardExp, $cardStart, $cardIssue);\n\n\t\t//from OG validate.php\n\t\t//Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?id_cart='.$cart->id.'&id_module='.$ccpayment->id.'&id_order='.$ccpayment->currentOrder.'&key='.$order->secure_key);\n\t\tTools::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\t}", "title": "" }, { "docid": "e5e3275037800c188983c1d53f341042", "score": "0.5221307", "text": "public function ProcessPayment2()\n\t{\n\t\t$this->layout->hide_returning_customer = true;\n\t\t$this->layout->hide_greeting = true;\n\n\n\n\n\t\t$np = Input::get('np');\n\t\t$verified = Input::get('verified');\n\n\t\tif (md5($np . $_SERVER['HTTP_HOST']) == $verified)\n\t\t{\n\t\t\t$this->layout->content .= View::Make('client_thankyou', array('instantly' => true, 'client' => $this->GetClientFromSession()));\n\t\t}\n\t\telse\n\t\t$this->layout->content .= View::Make('client_thankyou', array('instantly' => false, 'client' => $this->GetClientFromSession()));\n\t\t//\t\t$this->layout->content .= \"<pre>\". print_r( $this->leadtracapi->GetClient(Session::get('fileNumber'), array('LastName')), 1).\" </pre>\";\n\n\t}", "title": "" }, { "docid": "6968d08e1b555a6363ea42c0da283956", "score": "0.52104795", "text": "function adext_payment_completed_renew( WP_Post $payment ) {\r\n\r\n if( get_post_meta( $payment->ID, \"_adverts_payment_type\", true ) != \"adverts-renewal\" ) {\r\n return;\r\n }\r\n\r\n $object_id = get_post_meta( $payment->ID, \"_adverts_object_id\", true );\r\n \r\n $post_date = current_time('mysql');\r\n $post_date_gmt = current_time('mysql', 1);\r\n \r\n $meta = maybe_unserialize( get_post_meta( $payment->ID, \"_adverts_payment_meta\", true ) );\r\n \r\n if(isset($meta[\"pricing\"][\"visible\"])) {\r\n $visible = $meta[\"pricing\"][\"visible\"];\r\n } else {\r\n $visible = 0;\r\n }\r\n \r\n $expires = get_post_meta( $object_id, \"_expiration_date\", true );\r\n\r\n if( $expires ) {\r\n \r\n // Udpdate expiration date if the Ad expires\r\n if( $expires > current_time('timestamp') ) {\r\n $publish = date( \"Y-m-d H:i:s\", $expires );\r\n } else {\r\n $publish = $post_date;\r\n }\r\n\r\n if( $visible > 0) {\r\n $expiry = strtotime( $publish . \" +$visible DAYS\" );\r\n update_post_meta( $object_id, \"_expiration_date\", $expiry );\r\n } else {\r\n delete_post_meta( $object_id, \"_expiration_date\" );\r\n }\r\n }\r\n \r\n /* @todo add activity log */\r\n \r\n wp_update_post( array(\r\n \"ID\" => $object_id,\r\n \"post_status\" => \"publish\",\r\n 'post_date' => $post_date,\r\n 'post_date_gmt' => $post_date_gmt\r\n ) );\r\n}", "title": "" }, { "docid": "a1bec9be7fbcfe647cbdf16c9244097b", "score": "0.52067137", "text": "function finishIt() {\n\t\t\n\t\t$sysConfig = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['SYSPRODUCTS']['PAYMENT'];\n\t\t$paymentType = $this->getPaymentType();\n\t\t$config = $sysConfig['types'][strtolower((string)$paymentType)];\n\t\tif (!isset($config['class']) || !file_exists($config['path'])) die ('No payment possible because I don\\'t know how to handle it!');\n\t\t\trequire_once($config['path']);\n\t\t\t$paymentObj = t3lib_div::makeInstance($config['class']);\n\t\t\n\t\t\tif (method_exists($paymentObj, 'checkExternalData')) {\n\t\t\t \t$paymentDone = $paymentObj->checkExternalData($_REQUEST, $this->MYSESSION);\n\t\t\t} else {\n\t\t\t\t$paymentDone = false;\n\t\t\t}\n\t\t\n\t\t// check if Terms are acceptes\n\t\tif (!$paymentDone && (empty($this->piVars['terms']) || ($this->piVars['terms'] != 'termschecked'))) {\n\t\t\t\n\t\t\t$this->formError['terms']=$this->pi_getLL('error_terms_not_accepted');\n\t\t\t$content=$this->handlePayment();\n\t\t\tif ($content == false)\t{\n\t\t\t\t$this->formError['terms']=$this->pi_getLL('error_terms_not_accepted');\n\t\t\t\t$content = $this->getListing();\n\t\t\t}\n\t\t\treturn $content;\n\t\t}\n\t\t\n\n\t\t\n\t\t// first of all, call the finish method from the payment class\n\t\n\t\t$sysConfig = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['SYSPRODUCTS']['PAYMENT'];\n\t\t\n\t\t$hookObjectsArr = array();\n\t\tif (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['finishIt'])) {\n\t\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['finishIt'] as $classRef) {\n\t\t\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t\t}\n\t\t}\n\t\t\t\n\t\t// handle the orders\n\t\t// &tx_commerce_pi1[artAddUid][2]=2&tx_commerce_pi1[artAddUid][1]=5\n\t\t$basket = $GLOBALS['TSFE']->fe_user->tx_commerce_basket;\n\t\t# debug($basket);\n\t\t\n\t\t// merge local lang array\n\t\tif (is_array($this->LOCAL_LANG) && isset($paymentObj->LOCAL_LANG)) {\n\t\t\tforeach ($this->LOCAL_LANG as $llKey => $llData) {\n\t\t\t\t$newLLData = array_merge($llData, $paymentObj->LOCAL_LANG[$llKey]);\n\t\t\t\t$this->LOCAL_LANG[$llKey] = $newLLData;\n\t\t\t}\n\t\t}\n\t\t$paymentObj->parentObj = $this;\n\t\tif (method_exists($paymentObj, 'hasSpecialFinishingForm') && $paymentObj->hasSpecialFinishingForm($_REQUEST)) {\n\t\t\t$content = $paymentObj->getSpecialFinishingForm($config, &$this->MYSESSION, $basket);\n\t\t\treturn $content;\n\t\t} else {\n\t\t\tif (!$paymentObj->finishingFunction($config, $this->MYSESSION, $basket)) {\n\t\t\t\t$content = $paymentObj->getLastError(1);\n\t\t\t\t$content .= $this->handlePayment();\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'postpayment')) {\n\t\t\t\t$hookObj->postpayment($paymentObj,$basket,$this);\n\t\t\t}\n\t\t}\n\t\n\t\t\n\t\t/**\n\t\t * Real finishing starts here !\n\t\t */\n\t\t// save addresses\n\t\t// get address types\n\t\t$uids = array();\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('name', 'tx_commerce_address_types', '1');\n\t\twhile ($type = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$uids[$type['name']] = $this->handleAddress($type['name']);\n\t\t}\n\t\t\n\t\t$orderData = array();\n\t\t$orderData['cust_deliveryaddress'] = ((isset($uids['delivery'])) ? $uids['delivery'] : $uids['billing']);\n\t\t// ############## THIS HAS TO BE UNIQUE IN ANOTHER WAY!!! #########\n\t\t$now = time();\n\t\t\n\t\t/*\n\t\t * Hook for generating The OrderId\n\t\t */\n\t\t\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'generateOrderId')) {\n\t\t\t\t\n\t\t\t\t$orderId = $hookObj->generateOrderId($orderId,$basket,$this);\n\t\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif (empty($orderId))\n\t\t{\n\t\t\t$orderId= uniqid('',true);\n\t\t\t/**\n\t\t\t * @see http://www.php.net/uniqid\n\t\t\t */\n\t\t}\n\t\t\n\t\t$this->orderId=$orderId;\n\t\t\n\t\t$orderData['order_id'] = $orderId;\n\t\tif (is_array($GLOBALS['TSFE']->fe_user->user)) {\n\t\t\t$orderData['cust_fe_user'] = $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t}\n\t\t$orderData['cust_invoice'] = $uids['billing'];\n\t\t$orderData['paymenttype'] = $this->getPaymentType();\n\t\t$orderData['sum_price_net'] = $basket->get_net_sum();\n\t\t$orderData['sum_price_gross'] = $basket->get_gross_sum();\n\t\t$comPid = array_keys(tx_graytree_folder_db::getFolders('commerce', 0, 'COMMERCE'));\n\t\t$ordPid = array_keys(tx_graytree_folder_db::getFolders('commerce', $comPid[0], 'Orders'));\n\t\t$incPid = array_keys(tx_graytree_folder_db::getFolders('commerce', $ordPid[0], 'Incoming'));\n\t\t$orderData['pid'] = $incPid[0];\n\t\t$orderData['crdate'] = $now;\n\t\t$orderData['tstamp'] = $now;\n\t\t\n\t\t$orderData['comment'] = $this->piVars['comment'];\n\t\t\n\t\t\t\n\t\t// insert order\n\t\t\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'preinsert')) {\n\t\t\t\t$hookObj->preinsert($orderData,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_commerce_orders', $orderData);\n\t\t$orderUid = $GLOBALS['TYPO3_DB']->sql_insert_id();\n\t\t// make orderUid avaible in hookObjects\n\t\t$this->orderUid = $orderUid;\n\t\t// call the update method from the payment class\n \t\t$paymentObj->updateOrder($orderUid, $this->MYSESSION);\n\t\t\n\t\t// save order articles\n\t\tif (is_array($basket->basket_items)) {\n\t\t\tforeach ($basket->basket_items as $artUid => $basketItem) {\n\t\t\t\t// debug($basketItem->article);\n\t\t\t\t$oaData = array();\n\t\t\t\t$oaData['pid'] = $incPid[0];\n\t\t\t\t$oaData['crdate'] = $now;\n\t\t\t\t$oaData['tstamp'] = $now;\n\t\t\t\t$oaData['article_uid'] = $artUid;\n\t\t\t\t$oaData['article_type_uid'] = $basketItem->getArticleTypeUid();\n\t\t\t\t$oaData['article_number'] = $basketItem->getOrdernumber();\n\t\t\t\t$oaData['title'] = $basketItem->getTitle();\n\t\t\t\t$oaData['subtitle'] = $basketItem->getSubtitle();\n\t\t\t\t$oaData['price_net'] = $basketItem->get_price_net();\n\t\t\t\t$oaData['price_gross'] = $basketItem->get_price_gross();\n\t\t\t\t$oaData['tax'] = $basketItem->get_tax();\n\t\t\t\t$oaData['amount'] = $basketItem->get_quantity();\n\t\t\t\t$oaData['order_uid'] = $orderUid;\n\t\t\t\t$oaData['order_id'] = $orderId;\n\t\t\t\t\n\t\t#\t\tdebug($oaData);\n\t\t\t\t// insert\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_commerce_order_articles', $oaData);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/**\n\t\t * Send the emails\n\t\t */\n\t\t$this->sendUserMail($orderId,$orderData);\n\t\t$this->sendAdminMail($orderId,$orderData);\n\t\t\n\t\t/**\n\t\t * Do the output\n\t\t */\n\t\t$content = $this->cObj->getSubpart($this->templateCode, '###FINISH###');\n\t\t$markerArray['###LISTING_BASKET###'] = $this->makeBasketView(\n\t\t\t\t\t\t\t\t$GLOBALS['TSFE']->fe_user->tx_commerce_basket,\n\t\t\t\t\t\t\t\t'###BASKET_VIEW###',\n\t\t\t\t\t\t\t\tarray(NORMALArticleType));\n\t\t\n\t\t$markerArray['###MESSAGE###']='';\n\t\t\n\t\t$markerArray['###LISTING_TITLE###'] = $this->pi_getLL('order_confirmation');\n\t\t\n\t\t\n\t\tif ($orderData['cust_deliveryaddress'])\t{\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_address', 'uid='.$orderData['cust_deliveryaddress']);\n\t\t\tif ($data= $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$deliveryAdress = $this->makeAdressView($data,'###DELIVERY_ADDRESS###');\n\t\t\t}\n\t\t}\n\t\t$content = $this->cObj->substituteSubpart($content,'###DELIVERY_ADDRESS###',$deliveryAdress);\n\t\t\n\t\t$billingAdress = '';\n\t\tif ($orderData['cust_invoice'])\t{\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_address', 'uid='.$orderData['cust_deliveryaddress']);\n\t\t\tif ($data= $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$billingAdress = $this->makeAdressView($data,'###BILLING_ADDRESS###');\n\t\t\t\t$markerArray['###CUST_NAME###']=$data['NAME'];\n\t\t\t}\n\t\t}\n\t\t$content = $this->cObj->substituteSubpart($content,'###BILLING_ADDRESS###',$deliveryAdress);\n\t\t\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'ProcessMarker')) {\n\t\t\t\t$markerArray=$hookObj->ProcessMarker($markerArray,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'postFinish'))\t{\n\t\t\t\t\t$hookObj->postFinish($basket,$this);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// at last remove some things from the session\n\t\tunset($this->MYSESSION['billing']);\n\t\tunset($this->MYSESSION['delivery']);\n\t\tunset($this->MYSESSION['payment']);\n\t\t\n\t\t$GLOBALS['TSFE']->fe_user->tx_commerce_basket->finishOrder();\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "b1d2f31c55acaf754c6dc702d88fef69", "score": "0.5165351", "text": "public function processVerifiedRequest($data)\n {\n switch ($data['txn_type'] ?? '') {\n case 'recurring_payment':\n $subscriptionId = $data['recurring_payment_id'];\n $paymentPlan = $this->em->getRepository(PaymentPlan::class)->findOneBy(\n [\n 'providerSubscriptionId' => $subscriptionId,\n 'provider' => PaymentPlan::PROVIDER_PAYPAL,\n 'active' => true,\n ]\n );\n\n if (! $paymentPlan) {\n return 404;\n }\n\n if ($data['profile_status'] !== self::PROFILE_STATUS_ACTIVE) {\n $paymentPlan->setActive(false);\n $paymentPlan->setCanceledDate(new \\DateTime());\n break;\n }\n\n $client = $paymentPlan->getClient();\n $saleId = $data['txn_id'];\n $paymentPayPal = $this->em->getRepository(PaymentPayPal::class)->findOneBy(\n [\n 'payPalId' => $saleId,\n ]\n );\n\n if ($paymentPayPal) {\n break;\n }\n\n $sale = $this->getSale($client->getOrganization(), $saleId);\n if (! $sale) {\n return 400;\n }\n\n $amount = (float) $sale->getAmount()->getTotal();\n\n $currency = $this->em->getRepository(Currency::class)->findOneBy(\n [\n 'code' => Strings::upper($sale->getAmount()->getCurrency()),\n ]\n );\n\n $paymentPayPal = new PaymentPayPal();\n $paymentPayPal->setPayPalId($saleId);\n $paymentPayPal->setState($sale->getState());\n $paymentPayPal->setOrganization($client->getOrganization());\n $paymentPayPal->setClient($client);\n $paymentPayPal->setType(PaymentPayPal::TYPE_SALE);\n $paymentPayPal->setAmount($amount);\n\n $payment = new Payment();\n $payment->setMethod(Payment::METHOD_PAYPAL_SUBSCRIPTION);\n $payment->setCreatedDate(new \\DateTime());\n $payment->setAmount($amount);\n $payment->setNote($sale->getId());\n $payment->setClient($client);\n $payment->setCurrency($currency);\n\n $invoices = $this->em->getRepository(Invoice::class)->getClientUnpaidInvoicesWithCurrency(\n $client,\n $currency\n );\n\n $this->paymentFacade->handleCreate($payment, $invoices, $paymentPayPal);\n\n break;\n case 'recurring_payment_profile_created':\n $subscriptionId = $data['recurring_payment_id'];\n /** @var PaymentPlan $paymentPlan */\n $paymentPlan = $this->em->getRepository(PaymentPlan::class)->findOneBy(\n [\n 'providerSubscriptionId' => $subscriptionId,\n 'provider' => PaymentPlan::PROVIDER_PAYPAL,\n ]\n ); // intentionally no check for active\n\n if (! $paymentPlan) {\n return 404;\n }\n\n if ($data['profile_status'] === 'Active') {\n $paymentPlan->setStatus(PaymentPlan::STATUS_ACTIVE);\n } else {\n $paymentPlan->setActive(false);\n $paymentPlan->setCanceledDate(new \\DateTime());\n $paymentPlan->setStatus(PaymentPlan::STATUS_CANCELLED);\n }\n\n /** @var Client $client */\n $client = $this->em->merge($paymentPlan->getClient());\n $client->setPayPalCustomerId($data['payer_id']);\n\n if (($data['initial_payment_status'] ?? '') === 'Completed') {\n $saleId = $data['initial_payment_txn_id'];\n $paymentPayPal = $this->em->getRepository(PaymentPayPal::class)->findOneBy(\n [\n 'payPalId' => $saleId,\n ]\n );\n\n if (! $paymentPayPal) {\n $sale = $this->getSale($client->getOrganization(), $saleId);\n if (! $sale) {\n return 400;\n }\n\n $amount = (float) $sale->getAmount()->getTotal();\n\n /** @var Currency $currency */\n $currency = $this->em->getRepository(Currency::class)->findOneBy(\n [\n 'code' => Strings::upper($sale->getAmount()->getCurrency()),\n ]\n );\n\n $paymentPayPal = new PaymentPayPal();\n $paymentPayPal->setPayPalId($saleId);\n $paymentPayPal->setState($sale->getState());\n $paymentPayPal->setOrganization($client->getOrganization());\n $paymentPayPal->setClient($client);\n $paymentPayPal->setType(PaymentPayPal::TYPE_SALE);\n $paymentPayPal->setAmount($amount);\n\n $payment = new Payment();\n $payment->setMethod(Payment::METHOD_PAYPAL_SUBSCRIPTION);\n $payment->setCreatedDate(new \\DateTime());\n $payment->setAmount($amount);\n $payment->setNote($sale->getId());\n $payment->setClient($client);\n $payment->setCurrency($currency);\n\n $invoices = $this->em->getRepository(Invoice::class)->getClientUnpaidInvoicesWithCurrency(\n $client,\n $currency\n );\n\n $this->paymentFacade->handleCreate($payment, $invoices, $paymentPayPal);\n }\n } elseif (! array_key_exists('initial_payment_status', $data)) {\n // If the start date is in the future, set payment plan to pending.\n try {\n $nextPaymentDate = new \\DateTime($data['next_payment_date'] ?? '@invalid');\n } catch (\\Exception $exception) {\n $nextPaymentDate = null;\n }\n\n if (\n $nextPaymentDate\n && $paymentPlan->getStatus() === PaymentPlan::STATUS_ACTIVE\n && $nextPaymentDate->format('Y-m-d') !== $paymentPlan->getCreatedDate()->format('Y-m-d')\n ) {\n $paymentPlan->setStatus(PaymentPlan::STATUS_PENDING);\n }\n }\n\n break;\n case 'recurring_payment_profile_suspend':\n case 'recurring_payment_suspended_due_to_max_failed_payment':\n $subscriptionId = $data['recurring_payment_id'];\n $paymentPlan = $this->em->getRepository(PaymentPlan::class)->findOneBy(\n [\n 'providerSubscriptionId' => $subscriptionId,\n 'provider' => PaymentPlan::PROVIDER_PAYPAL,\n 'active' => true,\n ]\n );\n\n if (! $paymentPlan) {\n return 200;\n }\n\n // @todo Suspend not supported (yet), cancel instead\n $this->paymentPlanFacade->cancelSubscription($paymentPlan);\n $logMessage['logMsg'] = [\n 'message' => 'Subscription %s was canceled',\n 'replacements' => $paymentPlan->getName(),\n ];\n\n $this->actionLogger->log(\n $logMessage,\n null,\n $paymentPlan->getClient(),\n EntityLog::PAYMENT_PLAN_CANCELED\n );\n\n break;\n case 'recurring_payment_profile_cancel':\n $subscriptionId = $data['recurring_payment_id'];\n $paymentPlan = $this->em->getRepository(PaymentPlan::class)->findOneBy(\n [\n 'providerSubscriptionId' => $subscriptionId,\n 'provider' => PaymentPlan::PROVIDER_PAYPAL,\n 'active' => true,\n ]\n );\n\n if (! $paymentPlan) {\n return 200;\n }\n\n $paymentPlan->setActive(false);\n $paymentPlan->setStatus(PaymentPlan::STATUS_CANCELLED);\n $paymentPlan->setCanceledDate(new \\DateTime());\n\n break;\n case 'recurring_payment_expired':\n case 'recurring_payment_failed':\n case 'recurring_payment_skipped':\n $subscriptionId = $data['recurring_payment_id'];\n $paymentPlan = $this->em->getRepository(PaymentPlan::class)->findOneBy(\n [\n 'providerSubscriptionId' => $subscriptionId,\n 'provider' => PaymentPlan::PROVIDER_PAYPAL,\n 'active' => true,\n ]\n );\n\n if (! $paymentPlan) {\n return 404;\n }\n\n if ($data['profile_status'] !== 'Active') {\n $paymentPlan->setActive(false);\n $paymentPlan->setStatus(PaymentPlan::STATUS_CANCELLED);\n $paymentPlan->setCanceledDate(new \\DateTime());\n }\n\n break;\n case '':\n default:\n return 200;\n }\n\n $this->em->flush();\n\n return 200;\n }", "title": "" }, { "docid": "201f9ed511c74b2e2de6efaaca687a29", "score": "0.51635784", "text": "private function processPayments() {\n\t\t// refactor payment class (maybe payment detail also)\n\t\t/*\n\t\tarray(8) {\n\t\t[\"AmountPaid\"]=>\n\t\tstring(3) \"100\"\n\t\t[\"Payor\"]=>\n\t\tstring(12) \"Bill Johnson\"\n\t\t[\"PaymentType\"]=>\n\t\tstring(5) \"check\"\n\t\t[\"PaymentNumber\"]=>\n\t\tstring(15) \"123456789012345\"\n\t\t[\"UnitId\"]=>\n\t\tstring(1) \"2\"\n\t\t[\"BillId\"]=>\n\t\tstring(1) \"2\"\n\t\t}\n\t\t*/\n\t \n\t\t$pmtCreationObj = new Financial_Model_PaymentCreation();\n\n\t\t$alModel = new Financial_Model_AccountLink();\n\t\t//$accountLink = $alModel->findByKey( array('search'=>array( 'name'=>'paidRent' )) );\n\t\t$alItem = array_shift($alModel->findByKey( array( 'search'=>array( 'name'=>'rentRevenue' ) ) ));\t\t\n\t\t\t\t\n\t\tif( empty( $alItem ) ){\n\t\t\t$this->setMessageState( 'noAccountLinkSet' );\n\t\t\tthrow new Exception( 'Missing Account Link in rent payments' );\n\t\t}\n\t\t \n\t\t$creditAccountId = $alItem->getDebitAccountId();\n\t\t$debitAccountId = $this->getDebitAccountId(); \n\t\tif( empty( $creditAccountId ) ){\n\t\t\t$this->setMessageState( 'noAccountLinkSet' );\n\t\t\tthrow new Exception( 'Missing Debit Id' );\n\t\t}\n\n\t\t//if( !$accountLink ) {\n\t\t//\t$this->setMessageState( 'noAccountLinkSet' );\n\t\t//\treturn false;\n\t\t//}\n\t\t//else {\n\t\t $accountLink = new Financial_Model_AccountLink(array( 'debitAccountId'=> $debitAccountId, 'creditAccountId'=>$creditAccountId ));\t\t\t\n\t\t\t$pmtCreationObj->setAccountLink( $accountLink );\n\n\t\t\tif( $this->getProcessArray() ) {\n\t\t\t\tforeach( $this->getProcessArray() as $id=>$row) {\n\t\t\t\t\t$pmtCreationObj->setAmountPaid( $row['AmountPaid'] );\n\t\t\t\t\t$pmtCreationObj->setBillId( $row['BillId'] );\n\t\t\t\t\t$pmtCreationObj->setPaymentType( $row['PaymentType'] );\n\t\t\t\t\t$pmtCreationObj->setTotalAmount( $row['AmountPaid'] );\n\t\t\t\t\t$pmtCreationObj->setPayor( $row['Payor'] );\n\n\t\t\t\t\t/*\n\t\t\t\t\t protected 'billId' => string '3' (length=1)\n\t\t\t\t\t protected 'amtPaid' => string '76.59' (length=5)\n\t\t\t\t\t protected 'transactionId' => null\n\t\t\t\t\t protected 'paymentDetailId' => null\n\t\t\t\t\t protected 'id' => null\n\t\t\t\t\t protected 'dateCreated' => null\n\t\t\t\t\t protected 'dateUpdated' => null\n\t\t */\n\t\t\t\t\tif( !$pmtCreationObj->postPayment() ) {\n\t\t\t\t\t\t$this->setMessageState( 'errorPostingPayment' );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->setMessageState( 'noRowsToProcess' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t//}\n\t}", "title": "" }, { "docid": "580288b8c2454f33340437b2e05d0819", "score": "0.5156816", "text": "function before_process() {\n global $response, $db, $order, $messageStack;\n $order->info['cc_owner_first_name'] = $_POST['cc_owner_first_name'];\n\t$order->info['cc_owner_last_name'] = $_POST['cc_owner_last_name'];\n\t$order->info['cc_billing_dob'] = $_POST['cc_billing_dob'];\n $order->info['cc_number'] = str_pad(substr($_POST['cc_number'], -4), strlen($_POST['cc_number']), \"X\", STR_PAD_LEFT);\n $order->info['cc_expires'] = ''; // $_POST['cc_expires'];\n $order->info['cc_cvv'] = '***';\n $sessID = zen_session_id();\n\n $this->include_x_type = TRUE;\n\n // DATA PREPARATION SECTION\n unset($submit_data); // Cleans out any previous data stored in the variable\n\n \n // Create a variable that holds the order time\n $order_time = date(\"F j, Y, g:i a\");\n\n // Calculate the next expected order id (adapted from code written by Eric Stamper - 01/30/2004 Released under GPL)\n $last_order_id = $db->Execute(\"select orders_id from \" . TABLE_ORDERS . \" order by orders_id desc limit 1\");\n $new_order_id = $last_order_id->fields['orders_id'];\n $new_order_id = ($new_order_id + 1);\n\t\n\t$pass_through = $new_order_id;\n\n // add randomized suffix to order id to produce uniqueness ... since it's unwise to submit the same order-number twice to authorize.net\n $new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6, 'chars');\n\t\n\t$month = substr($_POST['cc_expires'],0,2);\n\t$year = '20' . substr($_POST['cc_expires'],2,3);\n\n // Populate an array that contains all of the data to be sent to Authorize.net\n $submit_data = array( \n 'client_username' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_USERNAME),\n 'client_password' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_PASSWORD),\n\t\t\t\t\t\t 'client_token' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_TOKEN), \n 'initial_amount' => number_format($order->info['total'], 2),\n 'currency' => $order->info['currency'], \n 'account_number' => $_POST['cc_number'],\n 'expiration_month' => $month,\n\t\t\t\t\t\t 'expiration_year' =>$year,\n\t\t\t\t\t\t 'processing_type' => 'DEBIT', \n 'cvv2' => $_POST['cc_cvv'],\n\t\t\t\t\t\t 'billing_date_of_birth' => date('Ymd', strtotime($_POST['cc_biling_dob'])), \n 'pass_through' => $pass_through,\n 'billing_first_name' => $order->billing['firstname'],\n 'billing_last_name' => $order->billing['lastname'], \n 'billing_address_line_1' => $order->billing['street_address'],\n 'billing_city' => $order->billing['city'],\n 'billing_state' => $order->billing['state'],\n 'billing_postal_code' => $order->billing['postcode'],\n 'billing_country' => $order->billing['country']['title'],\n 'billing_phone_number' => $order->customer['telephone'],\n 'billing_email_address' => $order->customer['email_address'] \n );\n\n $this->notify('NOTIFY_PAYMENT_AUTHNET_EMULATOR_CHECK', array(), $submit_data);\n \n\n // force conversion to supported currencies: USD, GBP, CAD, EUR, AUD, NZD\n if ($order->info['currency'] != $this->gateway_currency) {\n global $currencies;\n $submit_data['initial_amount'] = number_format($order->info['total'] * $currencies->get_value($this->gateway_currency), 2);\n $submit_data['currency'] = $this->gateway_currency; \n }\n\n $this->submit_extras = array();\n $this->notify('NOTIFY_PAYMENT_AUTHNET_PRESUBMIT_HOOK', array(), $submit_data);\n\n unset($response);\t\n\t\t\n $response = $this->_sendRequest($submit_data);\n\t\n\t\t\t\n $this->notify('NOTIFY_PAYMENT_AUTHNET_POSTSUBMIT_HOOK', array(), $response);\n\t\n $response_code = $response['result_code'];\n $response_text = $response['status'];\n $raw_message = $response['raw_message'];\n\t$message = $response['message'];\n $this->transaction_id = $response['transaction_id'];\n\t$this->gateway_status = $response_text;\n \n \t$response_msg_to_customer = '';\n\tif($response_code != '00')\n\t{\n\t\t$gateway_error = $message;\n\t\tif($raw_message != \"\") $gateway_error = $raw_message;\n\t\t\n\t\t$response['ErrorDetails'] = $gateway_error;\t\n\t\t$response_msg_to_customer = $gateway_error;\n\t}\n\t\n\t\n if($response_code == '00') {\n $this->order_status = 1;\n \n\t $this->gateway_status = $response_text;\n\t \n\t $gateway_error = $message;\n\t\tif($raw_message != \"\") $gateway_error = $raw_message;\t\n\t \n $response['ErrorDetails'] = 'Staus: '. $response_text . ' Transaction Id: ' . $response['transaction_id'] . ' Message: ' . $gateway_error;\n\t\t$response_msg_to_customer = $gateway_error;\n\t\t$this->transaction_id .= ' ***Message: ' .$gateway_error;\n }\n\n $this->_debugActions($response, $order_time, $sessID);\n\n if (isset($response['error']) && $response['error']!= '') {\n $messageStack->add_session('checkout_payment', MODULE_PAYMENT_PAYSCOUT_INC_TEXT_COMM_ERROR . ' (' . $response['error'] . ')', 'caution');\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\n }\n\n \n // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message\n\t\n\t\t\n if ($response_code != '00') {\n $messageStack->add_session('checkout_payment', $response_msg_to_customer . ' - ' . MODULE_PAYMENT_PAYSCOUT_INC_TEXT_DECLINED_MESSAGE, 'error');\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\n }\n if($response_code == '00'){\n $this->order_status = (int)MODULE_PAYMENT_PAYSCOUT_INC_REVIEW_ORDER_STATUS_ID;\n }\n if ($response_code != '') {\n $_SESSION['payment_method_messages'] = $response_msg_to_customer;\n }\n $order->info['cc_type'] = $response_text;\n }", "title": "" }, { "docid": "8c85d0e1ed8123fe4bfa194931237a8b", "score": "0.51550806", "text": "public function processTransaction($data)\r\n {\r\n \t \r\n \t//creditCard,$order,$customer\r\n \t$customer = (object)array();\r\n \t$customer->first_name = $data->billingDetails->first_name;\r\n \t$customer->last_name = $data->billingDetails->last_name;\r\n \t\r\n \t$customer->company = $data->billingDetails->company_name;\r\n \t$customer->address = $data->billingDetails->address;\r\n \t$customer->city = $data->billingDetails->city;\r\n \t$customer->state = $data->billingDetails->region;\r\n \t$customer->zip = $data->billingDetails->postal_code;\r\n \t$customer->country = $data->billingDetails->country;\r\n\r\n \t$this->amount = $data->amount;\r\n \t$this->itemName = $data->service.\" \".$data->description;\r\n \t$this->itemNumber = $data->id;\r\n \t\r\n \t$order = array(\r\n\t\t\t'description' => $data->service.\" \".$data->description,\r\n\t\t\t'invoice_num' => $data->id\r\n \t);\r\n \t$result = new stdClass();\r\n \t \r\n \t$result->card_name = JRequest::getVar(\"card_name\",null);\r\n \t$result->card_number = JRequest::getVar(\"card_number\",null);\r\n \t$result->card_expiration_year = JRequest::getVar(\"card_expiration_year\",null);\r\n \t$result->card_expiration_month = JRequest::getVar(\"card_expiration_month\",null);\r\n \t$result->card_security_code = JRequest::getVar(\"card_security_code\",null);\r\n \t$result->amount = $data->amount;\r\n \t\r\n \t$creditCard = array(\r\n\t\t\t'exp_date' => $result->card_expiration_month.\"\".substr($result->card_expiration_year,-2),\r\n \t\t'card_num' => $result->card_number,\r\n \t\t'amount' => $result->amount\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n \t);\r\n \t\r\n \t$authorize = new AuthorizeNetAIM($this->apiLoginId,$this->transactionKey);\r\n \tif($this->mode==\"test\")\r\n\t\t\t$authorize->setSandbox(true);\r\n\t\telse \r\n\t\t\t$authorize->setSandbox(false);\r\n $authorize->setFields($creditCard);\r\n $authorize->setFields($order);\r\n $authorize->setFields($customer); \r\n\r\n $response = $authorize->authorizeAndCapture();\r\n\r\n if(isset($response->approved) && $response->approved==1){\r\n\t $result->status = PAYMENT_SUCCESS;\r\n\t $result->payment_status = PAYMENT_STATUS_PAID;\r\n }\r\n else{\r\n \t$result->status = PAYMENT_ERROR;\r\n \t$result->payment_status = PAYMENT_STATUS_FAILURE;\r\n \t$result->error_message = $response->error_message.\" \".$response->response_reason_text;\r\n }\r\n \r\n $result->transaction_id = $response->transaction_id;\r\n $result->payment_date = date(\"Y-m-d\");\r\n $result->response_code = $response->approved;\r\n $result->order_id = $data->id;\r\n $result->processor_type = $this->type;\r\n\r\n\t\treturn $result;\r\n }", "title": "" }, { "docid": "d3e432551f1e2b67562e14d9a2cc9bf1", "score": "0.51536155", "text": "function __doPayment($order, $currency, $paymentType) {\n\t\t\n\t\t$billToName = urlencode($order['Order']['billto_name']);\n\t\t\n\t\t// credit card info\n\t\t$creditCardType = urlencode($order['Order']['credit_card']);\n\t\t$creditCardNumber = urlencode($order['Order']['credit_card_number']);\n\t\t//$creditCardNumber = \"4605198024170691\";\n\t\t$creditCardExpiry = urlencode($this->__get6CharacterExpiryMonth($order['Order']['credit_card_expiry']));\n\t\t$creditCardSecurityCode = isset($order['Order']['security_code']) ? urlencode($order['Order']['security_code']) : \"\";\n\n\t\t// billing address\n\t\t$address1 = urlencode($order['Order']['billto_address']);\n\t\t$city = urlencode($order['Order']['billto_city']);\n\t\t$province = urlencode($order['Order']['billto_region']);\n\t\t$postalcode = urlencode($order['Order']['billto_postalcode']);\n\t\t$country = urlencode($order['Order']['billto_country']);\n\t\t$amount = urlencode($order['Order']['total']);\n\t\t$currency = urlencode($currency);\n\t\t\n\t\t// Add request-specific fields to the request string.\n\t\t$this->nvpStr =\t\"&PAYMENTACTION=$paymentType\" . \n\t\t\t\t\t\"&AMT=$amount\" . \n\t\t\t\t\t\"&CREDITCARDTYPE=$creditCardType\" . \n\t\t\t\t\t\"&ACCT=$creditCardNumber\" .\n\t\t\t\t\t\"&EXPDATE=$creditCardExpiry\" . \n\t\t\t\t\t\"&CVV2=$creditCardSecurityCode\" . \n\t\t\t\t\t\"&FIRSTNAME=$billToName\" . \n\t\t\t\t\t\"&LASTNAME=\".\n\t\t\t\t\t\"&STREET=$address1\" . \n\t\t\t\t\t\"&CITY=$city\" . \n\t\t\t\t\t\"&STATE=$province\" . \n\t\t\t\t\t\"&ZIP=$postalcode\" . \n\t\t\t\t\t\"&COUNTRYCODE=$country\" . \n\t\t\t\t\t\"&CURRENCYCODE=$currency\";\n\t\t\n\t\treturn $this->query(\"doDirectPayment\");\n\t}", "title": "" }, { "docid": "ef3759ab0d790cb93fe90671c2fd8e80", "score": "0.51478624", "text": "protected function _pay(){\r\n\r\n $eci = null;\r\n $this->_setMethodRedirect(null);\r\n $this->getRealexSession()->setTokenSaved(false);\r\n $this->_token = $this->_hasToken();\r\n\r\n if($this->_token){\r\n $cardType = $this->_token->getCardType();\r\n }else{\r\n throw new Mage_Payment_Model_Info_Exception('Token Not Valid');\r\n }\r\n\r\n $transConfig = $this->_requireThreedSecure($cardType);\r\n\r\n if($transConfig->getRequire3DSecure()){\r\n\r\n $this->_method = 'threedSecure';\r\n $this->_action = 'threedSecureCapture';\r\n $this->_setMessage($this->_method);\r\n $this->_setResponse($this->_method);\r\n\r\n $this->_setMpiData('eci',\r\n $this->_response->getEciValue($cardType,false)\r\n );\r\n\r\n try{\r\n $this->addPaymentInfo('3DSecure Verify Cardholder Enrollment', 'Started');\r\n $this->_prepareThreedRegister();\r\n $this->_service->saveTransaction();\r\n $this->_send(\r\n $this->_getServiceUrl(),\r\n $this->_message->prepareMessage()\r\n );\r\n $this->_response->processResult();\r\n $this->_response->isValid();\r\n\r\n if($this->_response->getUrl() == ''){\r\n $message = $this->_getHelper()->__('ThreedSecure-VerifyEnrolled Returned No Url');\r\n\r\n throw new Exception($message);\r\n }\r\n $this->_service->getPayment()->setIsTransactionPending(true);\r\n $this->_prepareAclPost();\r\n $this->_setMethodRedirect($this->_getRedirectUrl());\r\n $this->addPaymentInfo('Customer redirected to 3DSecure ACS URL', 'Started');\r\n return;\r\n\r\n }catch(Yoma_Realex_Model_Exception_NoneParticipatingCard $e) {\r\n\r\n $this->_participatingCard = false;\r\n $this->_clearMpiData();\r\n }catch(Yoma_Realex_Model_Exception_NotEnrolled $e) {\r\n //nothing to do\r\n }\r\n if($this->_participatingCard) {\r\n\r\n try {\r\n $eci = $this->_response->getEciFromThreedSecureSignature(\r\n $this->_response->getResult(),\r\n $this->_response->getEnrolled(),\r\n $cardType,\r\n $this->_getHelper()->getConfigData('realvault', 'require_liability_shift'),\r\n $transConfig\r\n );\r\n $this->_setMpiData('eci', $eci);\r\n\r\n } catch (Yoma_Realex_Model_Exception_NoLiabilityShift $e) {\r\n throw new Exception($e->getMessage());\r\n }\r\n\r\n }\r\n }\r\n\r\n $this->_capture();\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "df309b955d3be57556c96890700482bd", "score": "0.51436156", "text": "private function ccReverse() {\n $this->_requestParams['request_action'] = 'CCREVERSE';\n $response = $this->serviceConfig->executeCall($this->_requestParams);\n return $this->serviceConfig->filterResponse($response, []);\n }", "title": "" }, { "docid": "861d0da2e5c1bcafc7e5f3ce8575a14a", "score": "0.514253", "text": "function do_validate_payment()\n\t{\n\t\t$type = preg_replace( \"/[^a-zA-Z0-9\\-\\_]/\", \"\" , $this->ipsclass->input['type'] );\n\t\t\n\t\tif ( $type == \"\" )\n\t\t{\n\t\t\t$this->gateway->do_log(\"Tried to return validate but failed: No type set\");\n\t\t\t$this->_end_process();\n\t\t}\n\t\t\n\t\t//--------------------------------------\n\t\t// Try to get row in DB\n\t\t//--------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->cache_add_query( 'mod_custom', array( 'type' => $type ), 'sql_subsm_queries' );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n\t\t$method = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\tif ( ! $method['submethod_id'] )\n\t\t{\n\t\t\t$this->gateway->do_log(\"Tried to return validate but failed: No such method as '$type'\");\n\t\t\t$this->_end_process();\n\t\t}\n\t\t\n\t\t//---------------------------------------------\n\t\t// INIT Load Payment handler\n\t\t//---------------------------------------------\n\n\t\t$this->gateway->gateway = $method['submethod_name'];\n\t\t$this->gateway->gateway_init();\n\t\t\n\t\tif ( $this->gateway->error )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'subs_no_api' ) );\n\t\t}\n\t\t\n\t\t//---------------------------------------------\n\t\t// Pass off to API handler\n\t\t//---------------------------------------------\n\t\t\n\t\t$this->gateway->validate_payment( $method );\n\t}", "title": "" }, { "docid": "81be139eeaba9527362fc3e3615d5ba2", "score": "0.513764", "text": "public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n $subscription= new Subscription();\n $subscription->user_id = 1;\n $subscription->plan_id = $paymentDetails['data']['plan_id'];\n //dd($paymentDetails['data']['plan_id']);\n $subscription->payment_method = 'Paystack';\n $subscription->reference= $paymentDetails['data']['reference'];\n $subscription->amount= $paymentDetails['data']['amount'];\n $subscription->save();\n\n return redirect()-back();\n\n //dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "title": "" }, { "docid": "701f59fad4fa48bfc034b71300d65ac0", "score": "0.513659", "text": "public function paymentsave() {\n $sessionstaff = $this->Session->read('staff');\n $urlResult = array();\n $customerProfile = new AuthorizeNetCustomer;\n $customerProfile->description = $_POST['acn_desc'];\n $customerProfile->merchantCustomerId = $_POST['acnt_id'];\n $customerProfile->email = $_POST['acn_email'];\n $request = new AuthorizeNetCIM;\n $response = $request->createCustomerProfile($customerProfile);\n //checking the credential of CC info at authorize.net\n if ($response->xml->messages->message->code == 'I00001') {\n $checkpayemntdetails = $this->PaymentDetail->find('first', array(\n 'conditions' => array(\n 'PaymentDetail.clinic_id' => $sessionstaff['clinic_id'],\n )\n ));\n if($_POST['st']==0){\n $paymentdetail['PaymentDetail'] = array('doctor_id' => $_POST['id'], 'clinic_id' => $sessionstaff['clinic_id'], 'customer_account_id' => $response->xml->customerProfileId, 'created_on' => date('Y-m-d H:m:s'));\n $this->PaymentDetail->create();\n $this->PaymentDetail->save($paymentdetail);\n $setarray=array('hostedProfileReturnUrl'=>'http://' . $_SERVER['HTTP_HOST'].'/UserStaffManagement/add/1','hostedProfileReturnUrlText'=>'Return Back to Payment details page');\n }else{\n $paymentdetail['PaymentDetail'] = array('id'=>$checkpayemntdetails['PaymentDetail']['id'],'doctor_id' => $_POST['id'], 'clinic_id' => $sessionstaff['clinic_id'], 'customer_account_id' => $response->xml->customerProfileId, 'created_on' => date('Y-m-d H:m:s'));\n $this->PaymentDetail->save($paymentdetail); \n $setarray=array('hostedProfileReturnUrl'=>'http://' . $_SERVER['HTTP_HOST'].'/UserStaffManagement/edit/'.$_POST['id'],'hostedProfileReturnUrlText'=>'Return Back to Payment details page');\n }\n $request1 = new AuthorizeNetCIM;\n //getting the hosted page after authorization success.\n $response1 = $request1->getHostedProfilePageRequest($response->xml->customerProfileId,$setarray);\n if ($response1->xml->messages->message->code == 'I00001') {\n if ($_POST['id'] == 0) {\n $wdt = '-165';\n } else {\n $wdt = '95';\n }\n echo '<form method=\"post\" action=\"'.AUTHORIZENET_URL.'\" id=\"formAuthorizeNetPage\"><input type=\"hidden\" name=\"token\" value=\"' . $response1->xml->token . '\"/></form><button type=”button” onclick= \"steref(),document.getElementById(\\'formAuthorizeNetPage\\').submit();\" style=\"cursor: pointer;display: inline-block;position: absolute;left: 156px;top: ' . $wdt . 'px;\">Manage payment and shipping info.</button>';\n } else {\n echo '';\n }\n \n } else {\n echo '';\n }\n die;\n }", "title": "" }, { "docid": "a5b81868648988ddade927bf84e80689", "score": "0.51316994", "text": "public function handleGatewayCallback()\n {\n\n $paymentDetails = Paystack::getPaymentData();\n // dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n if (array_key_exists('data', $paymentDetails) && array_key_exists('status', $paymentDetails['data']) && ($paymentDetails['data']['status'] === 'success')) {\n\n $user_transaction_id = ( $paymentDetails['data']['metadata']['user_t_id']);\n $transaction = Transaction::where('id', [$user_transaction_id])->get();\n\n foreach ($transaction as $key => $value) {\n $value->status = 1;\n $value->save();\n }\n\n\n return redirect('/dashboard')\n \t \t\t->with('success-status', 'Payment Successful!, Your investment is now active.');\n }\n else{\n return redirect('/dashboard')\n \t \t\t->with('error-status', 'Payment failed!,Please try again.');\n }\n\n\n }", "title": "" }, { "docid": "112d375a5619524871ff99128bddaea6", "score": "0.5119169", "text": "public function process($data){\n\n\t\tif($data['cancel'] == 1){\n\t\t $order->getPayment()\n\t\t ->setTransactionId(null)\n\t\t ->setParentTransactionId(time())\n\t\t ->void();\n\t\t $message = 'Unable to process Payment';\n\t\t $order->registerCancellation($message)->save();\n\t\t}\n\t}", "title": "" }, { "docid": "c65697d39a0c3f6ad7a7ba52230fafeb", "score": "0.51119107", "text": "public function processCheckout();", "title": "" }, { "docid": "37847fbd3139da7326de9fdd005f45dd", "score": "0.51082563", "text": "function DecideNextStep() {\n global $my_paypalpro, $my_anrecurring, $do_as_recurring_payments;\n\n\t\t\t//print_r($_REQUEST);\n\n if (isset($_REQUEST['do_as_recurring_payments'])) {\n if ($_REQUEST['do_as_recurring_payments']!=\"OneTime\") {\n $do_as_recurring_payments = $_REQUEST['do_as_recurring_payments'];\n $_SESSION['do_as_recurring_payments'] = $_REQUEST['do_as_recurring_payments'];\n }\n }\n\n\t\t\t//if (isset($_REQUEST['get_updates'])) {\n\t\t\t//\t$_SESSION[\"get_updates\"] = $_REQUEST['get_updates'];\n\t\t\t//}\n\t\t\t\n\t\t\t//print_r($_SESSION);\n \n // User clicked the \"Checkout with PayPal\" Button\n if (isset($_REQUEST['express_checkout_x'])) {\n $my_paypalpro->PP_DoExpressCheckout();\n } else if (isset($_REQUEST['direct_payment_x'])) { // User clicked \"Pay with Credit Card\"\n if (isset($_REQUEST['Payment_Amount'])) {\n unset($_SESSION['Payment_Amount']);\n $_SESSION['Payment_Amount'] = $_REQUEST['Payment_Amount'];\n }\n if (isset($_REQUEST['anonymous'])) {\n $_SESSION['Anonymous'] = $_REQUEST['anonymous'];\n }\n else {\n $_SESSION['Anonymous'] = '0'; \n }\n header(\"Location: \" . $my_paypalpro->direct_payment_url);\n exit; \n } else if (isset($_REQUEST['login'])) { // User submits the \"FormLogin\"\n require_once('wp-includes/registration.php');\n require('wp-blog-header.php');\n \n $creds = array();\n $creds['user_login'] = $_REQUEST['user_login'];\n $creds['user_password'] = $_REQUEST['user_password'];\n\n $user = wp_signon( $creds, false );\n if ( is_wp_error($user) ) {\n $my_anrecurring->ProcessLoginErrors($user);\n } else {\n if ($user->ID > 0) {\n if ( (isset($_REQUEST['dest'])) && ($_REQUEST['dest'] != \"\") ) {\n header(\"Location: \" . urldecode($_REQUEST['dest']));\n exit; \n }\n header(\"Location: donate\");\n exit; \n }\n } \n } else if (isset($_REQUEST['register'])) { // User submits the \"FormRegister\"\n require_once('wp-includes/registration.php');\n require('wp-blog-header.php');\n global $register_name, $register_email;\n global $register_password, $register_password_confirm;\n\n $register_name = $_REQUEST['register_name'];\n $register_email = $_REQUEST['register_email'];\n $register_password = $_REQUEST['register_password'];\n $register_password_confirm = $_REQUEST['register_password_confirm'];\n \n $user = $my_anrecurring->CreateUser($register_name, $register_email, $register_password, $register_password_confirm);\n \n if ($user->ID > 0) {\n if ( (isset($_REQUEST['dest'])) && ($_REQUEST['dest'] != \"\") ) {\n header(\"Location: \" . urldecode($_REQUEST['dest']));\n exit; \n }\n header(\"Location: donate\");\n exit; \n } \n } else if (isset($_REQUEST['send_email'])) { // User submits the \"FormRegister\" \n $my_anrecurring->SendNewPassword($my_paypalpro->email_from);\n } else if (isset($_REQUEST['submitpayment_x'])) { // User submits the \"FormDirectPayment\"\n if (isset($_REQUEST['amount'])) {\n unset($_SESSION['Payment_Amount']);\n $_SESSION['Payment_Amount'] = $_REQUEST['amount'];\n } \n $my_paypalpro->PP_ProcessPayment();\n } else if (isset($_REQUEST['confirm_button_x'])) { // User submits the \"FormConfirmPayment\"\n $my_paypalpro->PP_ConfirmPayment();\n } else if (isset($_REQUEST['token'])) { // User comes back from PayPal and has to review the payment\n $my_paypalpro->PP_ProcessReview();\n } else if (isset($_REQUEST['save_modify_amount'])) { // User saves the new payment amount\n $my_paypalpro->PP_SaveModifyDonation();\n } else if (isset($_REQUEST['save_modify_method'])) { // User saves the payment modification\n global $pp_errors;\n $my_paypalpro->PP_SaveModifyMethod();\n if ((!isset($pp_errors)) || (count($pp_errors) == 0) ){\n header(\"Location: \" . $my_paypalpro->donation_dashboard_url);\n }\n } else if (isset($_REQUEST['cancel_donation_button'])) { // User cancels his recurring donation\n $cancel = trim(stripslashes($_POST['cancel_donation_button']));\n if ($cancel == \"Yes\") {\n $my_paypalpro->PP_CancelDonation();\n }\n } else if (isset($_REQUEST['save_account'])) { // User saves his account changes\n global $new_username, $new_email;\n global $new_password, $new_password_confirm;\n $new_username = $_REQUEST['new_username'];\n $new_email = $_REQUEST['new_email'];\n $new_password = $_REQUEST['new_password'];\n $new_password_confirm = $_REQUEST['new_password_confirm'];\n $success = $my_anrecurring->EditUser($new_username, $new_email, $new_password, $new_password_confirm);\n }\n }", "title": "" }, { "docid": "fdc8b4c24841009c04d6baf59df37629", "score": "0.5105918", "text": "public abstract function processRefund();", "title": "" }, { "docid": "b0516ce1c7b689cc0d38051cb2259092", "score": "0.50986946", "text": "public function handle_ipn_response(){\n\t\t\t$order_id = isset( $_POST['x_invoice_num'] ) ? $_POST['x_invoice_num'] : false;\n\t\t\t$response = isset( $_POST['x_response_code'] ) ? $_POST['x_response_code'] : false;\n\t\t\t$trans_id = isset( $_POST['x_trans_id'] ) ? $_POST['x_trans_id'] : false;\n\t\t\t$amount = isset( $_POST['x_amount'] ) ? $_POST['x_amount'] : false;\n\t\t\t$email = isset( $_POST['x_email'] ) ? $_POST['x_email'] : false;\n\t\t\t$trans_message = ! empty( $_POST['x_response_reason_text'] ) ? $_POST['x_response_reason_text'] : __( 'N/D', 'yith-woocommerce-authorizenet-payment-gateway' );\n\t\t\t$trans_account_number = ! empty( $_POST['x_account_number'] ) ? $_POST['x_account_number'] : '';\n\n\t\t\tif( isset( $order_id ) ){\n\t\t\t\t$order = wc_get_order( $order_id );\n\t\t\t}\n\n\t\t\tif( ! $order_id || ! $response || ! $trans_id || ! $amount || ! $email ){\n\t\t\t\t// Redirect to error page and set order as failed\n\n\t\t\t\tif( ! empty( $order ) ){\n\t\t\t\t\t$order->update_status( 'failed', __( 'Authorize.net API error: unknown error.', 'yith-woocommerce-authorizenet-payment-gateway' ) );\n\t\t\t\t\twc_add_notice( __( 'Unknown error', 'yith-woocommerce-authorizenet-payment-gateway' ), 'error' );\n\t\t\t\t\t$this->redirect_via_html( $order->get_checkout_order_received_url() );\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->redirect_via_html( function_exists( 'wc_get_checkout_url' ) ? wc_get_checkout_url() : WC()->cart->get_checkout_url() );\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $response == 1 ){\n\t\t\t\t$valid_response = true;\n\n\t\t\t\t// Validate amount\n\t\t\t\tif ( $order->get_total() != $amount ) {\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'authorize.net', 'Payment error: Amounts do not match (gross ' . $amount . ')' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Put this order on-hold for manual checking\n\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Validation error: Authorize.net amounts do not match with (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $amount ) );\n\n\t\t\t\t\twc_add_notice( sprintf( __( 'Validation error: Authorize.net amounts do not match with (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $amount ), 'error' );\n\t\t\t\t\t$valid_response = false;\n\t\t\t\t}\n\n\t\t\t\t// Validate Email Address\n\t\t\t\tif ( strcasecmp( trim( $order->billing_email ), trim( $email ) ) != 0 ) {\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'authorize.net', \"Payment error: Authorize.net email ({$email}) does not match our email ({$order->billing_email})\" );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Put this order on-hold for manual checking\n\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Validation error: Authorize.net responses from a different email address than (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $email ) );\n\n\t\t\t\t\twc_add_notice( sprintf( __( 'Validation error: Authorize.net responses from a different email address than (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $email ), 'error' );\n\t\t\t\t\t$valid_response = false;\n\t\t\t\t}\n\n\t\t\t\tif( $valid_response ) {\n\t\t\t\t\t// Mark as complete\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'Authorize.net payment completed (message: %s). Transaction ID: %s', 'yith-woocommerce-authorizenet-payment-gateway' ), $trans_message, $trans_id ) );\n\t\t\t\t\t$order->payment_complete( $trans_id );\n\n\t\t\t\t\tif( ! empty( $trans_account_number ) ){\n\t\t\t\t\t\tyit_save_prop( $order, 'x_card_num', $trans_account_number );\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( 'authorize.net', 'Payment Result: ' . print_r( $_POST, true ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cart\n\t\t\t\t\tWC()->cart->empty_cart();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\twc_add_notice( sprintf( __( 'Payment error: %s', 'yith-woocommerce-authorizenet-payment-gateway' ), $trans_message ), 'error' );\n\t\t\t}\n\n\t\t $this->redirect_via_html( $order->get_checkout_order_received_url() );\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "b06c1c78a5c5a54dd1837f3d8346a58c", "score": "0.50667435", "text": "public function processPayment() {\n\n $method = $this->apiVersion == '1.5' ? '' : '/1/sales';\n return $this->request($method);\n }", "title": "" }, { "docid": "c93b0dcb8ab2801d933ef0f4e2f58534", "score": "0.50616986", "text": "protected function process_request () {\n if (isset ($this->cvn_processor)) {\n // If cvn processor set, we could not register customer details,\n // so use \"traditional\" processing.\n $this->cvn_processor->process_request();\n $response = $this->cvn_processor->return_info['eway_response'];\n }\n else {\n if ($this->ManagedCustomerId)\n $response = $this->soap_call('ProcessPayment', $this->xml_data);\n else\n $response = $this->last_response;\n //$r = explode (',' , $response['txReturnDescription']);\n //$response['txReturnNo'] = $r[0];\n //$response['txReturnDescription'] = isset($r[1]) ? $r[1] : '';\n // Response codes derived here: http://www.eway.com.au/Developer/payment-code/transaction-results-response-codes.aspx\n //$response['txStatus'] = ($r[0] == 0 || $r[0] == 8 || $r[0] == 10 || $r[0] == 11 || $r[0] == 16) ? 'true' : 'false';\n }\n\n $this->return_info = array(\n 'eway_response' => $response,\n );\n }", "title": "" }, { "docid": "06a9de5e3e6a81bb37839176a52334ea", "score": "0.5055982", "text": "public function authorize(Varien_Object $payment, $amount){\r\n if (!$this->validShippingAddress()) {\r\n Mage::helper('collectorbank')->logException(new Exception(\"Shipping and billing addresses don't match\"));\r\n Mage::throwException(Mage::helper('collectorbank')->__('Billing address does not match shipping address'));\r\n\r\n return $this;\r\n }\r\n\r\n $order = $payment->getOrder();\r\n\r\n $originalIncrementId = $order->getOriginalIncrementId();\r\n $newIncrementId = $order->getIncrementId();\r\n if ($order->getQuote()->getData('is_iframe')){\r\n return $this;\r\n }\r\n if ($originalIncrementId != null and $originalIncrementId != $newIncrementId) {\r\n $this->replaceInvoice($payment, $amount);\r\n } \r\n $session = Mage::getSingleton('checkout/session');\r\n $quote = $order->getQuote();\r\n $response = json_decode($quote->getData('collector_response'));\r\n $colpayment_method = \"\";\r\n if (array_key_exists('paymentMethod', $response['purchase'])){\r\n $colpayment_method = $response['purchase']['paymentMethod'];\r\n }\r\n $colpayment_details = json_encode($response['purchase']);\r\n $payment->setCollPaymentMethod($colpayment_method);\r\n $payment->setCollPaymentDetails($colpayment_details );\r\n\r\n\r\n $result['invoice_status'] = $response['status'];\r\n $result['invoice_no'] = $response['purchase']['purchaseIdentifier'];\r\n $result['total_amount'] = $response['order']['totalAmount'];\r\n\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_NO, isset($result['invoice_no']) ? $result['invoice_no'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_PAYMENT_REF, isset($result['payment_reference']) ? $result['payment_reference'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_LOWEST_AMOUNT_TO_PAY, isset($result['lowest_amount_to_pay']) ? $result['lowest_amount_to_pay'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_TOTAL_AMOUNT, isset($result['total_amount']) ? $result['total_amount'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_DUE_DATE, isset($result['due_date']) ? $result['due_date'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_AVAILABLE_RESERVATION_AMOUNT, isset($result['available_reservation_amount']) ? $result['available_reservation_amount'] : '');\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_STATUS, isset($result['invoice_status']) ? $result['invoice_status'] : '');\r\n if ($session->getUseFee() != 5){\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE, $this->getInvoiceFee());\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_TAX, $this->getInvoiceFeeTax($order));\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_TAX_INVOICED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_INVOICED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_REFUNDED, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_INVOICE_NO, 0);\r\n $payment->setAdditionalInformation(self::COLLECTOR_INVOICE_FEE_DESCRIPTION, Mage::helper('collectorbank')->__('Invoice fee'));\r\n }\r\n\r\n\r\n $payment->save();\r\n\r\n $order = $payment->getOrder();\r\n if ($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {\r\n $comment = Mage::helper('collectorbank')->__('Collector authorization successful');\r\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING)\r\n ->addStatusToHistory($this->getConfigData('order_status'), $comment)\r\n ->setIsCustomerNotified(false)\r\n ->save();\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "6a1ac8ae34aba119d5869be9ccc4867e", "score": "0.50557923", "text": "function wpa_pmpro_update_order($order) {\r\n\tif ( ! defined( 'WP_AFFILIATE_PLATFORM_VERSION' ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n global $wpdb;\r\n\twp_affiliate_log_debug(\"PMPRO Integration - handling pmpro_update_order hook\", true);\r\n \r\n\t//we're only concerned when status is switching from review/token/pending to success\r\n\tif($order->status != \"success\"){\r\n\t\twp_affiliate_log_debug(\"PMPRO Integration - the order status is not set to success. So not an update we are concerned with.\", true); \r\n\t\treturn;\r\n\t}\r\n\t\r\n\t//check that the old status was review, token, or pending\r\n\t$old_status_in_review = $wpdb->get_var(\"SELECT status FROM $wpdb->pmpro_membership_orders WHERE id = '\" . esc_sql( $order->id ) . \"' AND status IN('review','token','pending') LIMIT 1\");\r\n\tif(empty($old_status_in_review))\r\n\t{\r\n\t\twp_affiliate_log_debug(\"PMPRO Integration - the old order status is not review, token, or pending. So not an update we are concerned with.\", true); \r\n\t\treturn;\r\n\t}\r\n\t\t\r\n //look for referrer\r\n\t$referrer = $order->affiliate_id;\r\n if(empty($referrer) && !empty($_COOKIE['ap_id '])){//Try to get it from the cookie if possible\r\n $referrer = sanitize_text_field( $_COOKIE['ap_id'] ); \r\n }\r\n\r\n\t//get some info from the order\r\n\t$payment_type = $order->payment_type;\r\n $status = $order->status;\r\n $sale_amt = $order->total;\r\n $email = $order->Email;\r\n $first_name = $order->FirstName;\r\n $last_name = $order->LastName;\r\n $name = $first_name . \" \" . $last_name; \t\r\n $txn_id = $order->code; //This was used to log as txn_id when commission was recorded.\r\n $txn_id = $txn_id . \"_\" . date(\"Y-m-d\"); //Add the subscription charge date to make this unique\r\n\r\n wp_affiliate_log_debug(\"PMPRO Integration - Debug data: \" . $payment_type . \"|\" . $status . \"|\" . $txn_id . \"|\" . $sale_amt . \"|\" . $referrer, true);\r\n\r\n\tif(empty($sale_amt)){ \r\n //must have a positive sale amount\r\n\t\twp_affiliate_log_debug(\"PMPRO Integration - the order amount is 0. No commission will be generated for this transaction.\", true); \r\n } \r\n elseif(!empty($referrer)) {\r\n wp_aff_award_commission_unique($referrer, $sale_amt, $txn_id, '', $email, '', '', $name);\r\n //do_action('wp_affiliate_process_cart_commission', array(\"referrer\" => $referrer, \"sale_amt\" => $sale_amt, \"txn_id\" => $txn_id, \"buyer_email\" => $email));\r\n wp_affiliate_log_debug(\"PMPRO Integration - process commission function executed\", true);\r\n } \r\n\telse {\r\n wp_affiliate_log_debug(\"PMPRO Integration - This transaction has no referrer attached to it. Commission processing is not required.\", true);\r\n }\r\n\t\r\n\t//if order didn't have affiliate ID and we found it in cookie, update the order\r\n\tif(empty($order->affiliate_id) && !empty($referrer)){ \r\n\t wp_affiliate_log_debug(\"PMPRO Integration - updated affiliate_id during pmpro_update_order hook.\", true);\r\n\t $order->affiliate_id = $referrer;\r\n\t $order->saveOrder();\r\n\t}\r\n}", "title": "" }, { "docid": "b191ada897270cadd4b21b5621a165c5", "score": "0.5044937", "text": "public function transaction_callback() {\n\t\t@ob_clean();\n\n\t\t// Check is PayEx Request\n\t\tif ( ! in_array( $_SERVER['REMOTE_ADDR'], self::$_allowed_ips ) ) {\n\t\t\t$this->log( 'TC: Access denied for this request. It\\'s not PayEx Spider.' );\n\t\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '403', 'Access denied. Accept PayEx Transaction Callback only.' ), true, '403' );\n\t\t\theader( sprintf( 'Status: %s %s', '403', 'Access denied. Accept PayEx Transaction Callback only.' ), true, '403' );\n\t\t\texit( 'Error: Access denied. Accept PayEx Transaction Callback only. ' );\n\t\t}\n\n\t\t// Check Post Fields\n\t\t$this->log( 'TC: Requested Params: ' . var_export( $_POST, true ) );\n\t\tif ( count( $_POST ) == 0 || empty( $_POST['transactionNumber'] ) ) {\n\t\t\t$this->log( 'TC: Error: Empty request received.' );\n\t\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '500', 'FAILURE' ), true, '500' );\n\t\t\theader( sprintf( 'Status: %s %s', '500', 'FAILURE' ), true, '500' );\n\t\t\texit( 'FAILURE' );\n\t\t}\n\n\t\t// Check orderID in Store\n\t\t$order_id = wc_clean( $_POST['orderId'] );\n\t\tif ( ! $order = wc_get_order( $order_id ) ) {\n\t\t\t$this->log( 'TC: OrderID ' . $order_id . ' not found on store.' );\n\t\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '500', 'FAILURE' ), true, '500' );\n\t\t\theader( sprintf( 'Status: %s %s', '500', 'FAILURE' ), true, '500' );\n\t\t\texit( 'FAILURE' );\n\t\t}\n\n\t\t// Get Payment Method\n\t\t$payment_method = $order->get_payment_method();\n\t\t$gateways = WC()->payment_gateways()->payment_gateways();\n\n\t\t// Exit if payment method isn't from this plugin,\n\t\t// otherwise the call to getPx on the payment gateway below will trigger a fatal.\n\t\tif ( ! in_array( $payment_method, WC_Payex_Payment::$_methods, true ) ) {\n\t\t\t$this->log( 'TC: Payment method ' . $payment_method . ' not PayEx.' );\n\t\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '500', 'FAILURE' ), true, '500' );\n\t\t\theader( sprintf( 'Status: %s %s', '500', 'FAILURE' ), true, '500' );\n\t\t\texit( 'FAILURE' );\n\t\t}\n\n\t\t/** @var WC_Gateway_Payex_Abstract $gateway */\n\t\t$gateway = $gateways[ $payment_method ];\n\n\t\t// Init PayEx\n\t\t$gateway->getPx()->setEnvironment( $gateway->account_no, $gateway->encrypted_key, $gateway->testmode === 'yes' );\n\n\t\t// Get Transaction Details\n\t\t$transactionId = wc_clean( $_POST['transactionNumber'] );\n\n\t\t// Call PxOrder.GetTransactionDetails2\n\t\t$params = array(\n\t\t\t'accountNumber' => '',\n\t\t\t'transactionNumber' => $transactionId\n\t\t);\n\t\t$details = $gateway->getPx()->GetTransactionDetails2( $params );\n\t\tif ( $details['code'] !== 'OK' || $details['description'] !== 'OK' || $details['errorCode'] !== 'OK' ) {\n\t\t\texit( 'Error:' . $details['errorCode'] . ' (' . $details['description'] . ')' );\n\t\t}\n\n\t\t$transactionStatus = (int) $details['transactionStatus'];\n\n\t\t$this->log( 'TC: Incoming transaction: ' . $transactionId );\n\t\t$this->log( 'TC: Transaction Status: ' . $transactionStatus );\n\t\t$this->log( 'TC: OrderId: ' . $order_id );\n\n\t\t// Get Transaction state at moment\n\t\t$currentTransactionId = get_post_meta( $order->get_id(), '_transaction_id', true );\n\t\t$currentTransactionStatus = get_post_meta( $order->get_id(), '_payex_transaction_status', true );\n\n\t\t// Disable status change hook\n\t\tremove_action( 'woocommerce_order_status_changed', 'WC_Payex_Admin_Actions::order_status_changed', 10 );\n\n\t\t/* 0=Sale, 1=Initialize, 2=Credit, 3=Authorize, 4=Cancel, 5=Failure, 6=Capture */\n\t\tswitch ( $transactionStatus ) {\n\t\t\tcase 0;\n\t\t\tcase 3:\n\t\t\t\t// Complete order\n\t\t\t\t$params = array(\n\t\t\t\t\t'accountNumber' => '',\n\t\t\t\t\t'orderRef' => $_POST['orderRef']\n\t\t\t\t);\n\t\t\t\t$result = $gateway->getPx()->Complete( $params );\n\t\t\t\tif ( $result['errorCodeSimple'] !== 'OK' ) {\n\t\t\t\t\texit( 'Error:' . $details['errorCode'] . ' (' . $details['description'] . ')' );\n\t\t\t\t}\n\n\t\t\t\t// Save Transaction\n\t\t\t\tupdate_post_meta( $order->get_id(), '_transaction_id', $transactionId, $currentTransactionId );\n\t\t\t\tupdate_post_meta( $order->get_id(), '_payex_transaction_status', $transactionStatus, $currentTransactionStatus );\n\n\t\t\t\tswitch ( (int) $result['transactionStatus'] ) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t$order->add_order_note( sprintf( __( 'Transaction captured. Transaction Id: %s', 'woocommerce-gateway-payex-payment' ), $result['transactionNumber'] ) );\n\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$order_stock_reduced = $this->is_wc3() ? $order->get_meta( '_order_stock_reduced', true ) : get_post_meta( $order_id, '_order_stock_reduced', true );\n\t\t\t\t\t\tif ( ! $order_stock_reduced ) {\n\t\t\t\t\t\t\t$this->is_wc3() ? wc_reduce_stock_levels( $order_id ) : $order->reduce_order_stock();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Transaction pending. Transaction Id: %s', 'woocommerce-gateway-payex-payment' ), $result['transactionNumber'] ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t$order_stock_reduced = $this->is_wc3() ? $order->get_meta( '_order_stock_reduced', true ) : get_post_meta( $order_id, '_order_stock_reduced', true );\n\t\t\t\t\t\tif ( ! $order_stock_reduced ) {\n\t\t\t\t\t\t\t$this->is_wc3() ? wc_reduce_stock_levels( $order_id ) : $order->reduce_order_stock();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Transaction authorized. Transaction Id: %s', 'woocommerce-gateway-payex-payment' ), $result['transactionNumber'] ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t// Cancel\n\t\t\t\t\t\t$order->update_status( 'cancelled' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// Cancel when Errors\n\t\t\t\t\t\t$order->update_status( 'failed', __( 'Transaction failed.', 'woocommerce-gateway-payex-payment' ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' Complete with TransactionStatus ' . $result['transactionStatus'], $order_id );\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Refund\n\t\t\t\t// @todo Perform WooCommerce Refund\n\n\t\t\t\t// Save Transaction\n\t\t\t\tupdate_post_meta( $order->get_id(), '_transaction_id', $transactionId, $currentTransactionId );\n\t\t\t\tupdate_post_meta( $order->get_id(), '_payex_transaction_status', $transactionStatus, $currentTransactionStatus );\n\n\t\t\t\t// Set Order Status\n\t\t\t\t$order->update_status( 'refunded', __( 'Order refunded.', 'woocommerce-gateway-payex-payment' ) );\n\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' refunded', $order_id );\n\t\t\t\tbreak;\n\t\t\tcase 4;\n\t\t\t\t// Cancel\n\t\t\t\t// Check current status\n\t\t\t\tif ( in_array( $currentTransactionStatus, ['0', '3', '6']) ) {\n\t\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' won\\'t be cancelled because already paid', $order_id );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Save Transaction\n\t\t\t\tupdate_post_meta( $order->get_id(), '_transaction_id', $transactionId, $currentTransactionId );\n\t\t\t\tupdate_post_meta( $order->get_id(), '_payex_transaction_status', $transactionStatus, $currentTransactionStatus );\n\n\t\t\t\t// Set Order Status\n\t\t\t\t$order->update_status( 'cancelled' );\n\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' canceled', $order_id );\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Cancel when Errors\n\t\t\t\t// Check current status\n\t\t\t\tif ( in_array( $currentTransactionStatus, ['0', '3', '6']) ) {\n\t\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' won\\'t be cancelled because already paid', $order_id );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Save Transaction\n\t\t\t\tupdate_post_meta( $order->get_id(), '_transaction_id', $transactionId, $currentTransactionId );\n\t\t\t\tupdate_post_meta( $order->get_id(), '_payex_transaction_status', $transactionStatus, $currentTransactionStatus );\n\n\t\t\t\t// Set Order Status\n\t\t\t\t$order->update_status( 'failed', __( 'Transaction failed.', 'woocommerce-gateway-payex-payment' ) );\n\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' canceled', $order_id );\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t// Save Transaction\n\t\t\t\tupdate_post_meta( $order->get_id(), '_transaction_id', $transactionId, $currentTransactionId );\n\t\t\t\tupdate_post_meta( $order->get_id(), '_payex_transaction_status', $transactionStatus, $currentTransactionStatus );\n\n\t\t\t\t// Set Order Status to captured\n\t\t\t\t$order->add_order_note( sprintf( __( 'Transaction captured. Transaction Id: %s', 'woocommerce-gateway-payex-payment' ), $transactionId ) );\n\t\t\t\t$order->payment_complete();\n\n\t\t\t\t$this->log( 'TC: OrderId ' . $order_id . ' captured', $order_id );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->log( 'TC: Unknown Transaction Status', $order_id );\n\t\t\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '500', 'FAILURE' ), true, '500' );\n\t\t\t\theader( sprintf( 'Status: %s %s', '500', 'FAILURE' ), true, '500' );\n\t\t\t\texit( 'FAILURE' );\n\t\t}\n\n\t\t// Show \"OK\"\n\t\t$this->log( 'TC: Done.' );\n\t\theader( sprintf( '%s %s %s', 'HTTP/1.1', '200', 'OK' ), true, '200' );\n\t\theader( sprintf( 'Status: %s %s', '200', 'OK' ), true, '200' );\n\t\texit( 'OK' );\n\t}", "title": "" }, { "docid": "25022b2bc226fff43813f45c765f29b6", "score": "0.5027244", "text": "public function processReceiveCallback(){\n $status_code = filter_input(INPUT_GET, \"status\", FILTER_SANITIZE_STRING);\n $transaction_id = filter_input(INPUT_GET, \"transac_id\", FILTER_SANITIZE_STRING);\n $order_reference = filter_input(INPUT_GET, \"cust_ref\", FILTER_SANITIZE_STRING);\n $payment_token = filter_input(INPUT_GET, \"pay_token\", FILTER_SANITIZE_STRING);\n\n \n /*--- Check for payment type ---*/\n $payment_type = \"Not Set\";\n if(Order::where('order_token', $payment_token)->first()){\n\n //order payment\n $payment_type = \"order\";\n\n }elseif(WTUPayment::where('wtu_payment_token', $payment_token)->first()){\n\n //wallet top up payment\n $payment_type = \"wallet_top_up\";\n\n }elseif(VSPayment::where('vs_payment_token', $payment_token)->first()){\n\n //subscription payment\n $payment_type = \"subscription\";\n\n }\n\n\n switch ($payment_type) {\n case 'order':\n /*--- Check for payment status and redirect appropriately ---*/\n if($status_code != 0){\n return redirect()->route(\"show.account.orders\")->with(\"error_message\", \"Order payment unsuccessful.\");\n }\n\n /*--- process order ---*/\n $order = Order::where('order_token', $payment_token)->first();\n\n /*--- Order Items ---*/\n $order->checkout_items = OrderItem::\n where('oi_order_id', $order->id)\n ->get()\n ->toArray();\n\n /*--- Order Total ---*/\n $order_shipping = $order->order_shipping;\n \n //considering icono discount\n if($order->order_scoupon != NULL AND trim($order->order_scoupon) != \"NULL\"){\n $order_subtotal = round(0.99 * $order->order_subtotal, 2);\n }else{\n $order_subtotal = $order->order_subtotal;\n }\n\n $order_total = $order_subtotal + $order_shipping;\n \n\n /*--- check for customer account balance ---*/\n $customer_information_object = Customer::\n where('id', Auth::user()->id)\n ->with('milk', 'chocolate')\n ->first()\n ->toArray();\n \n //calculate account balance\n $customer_information['wallet_balance'] = round(($customer_information_object['milk']['milk_value'] * $customer_information_object['milkshake']) - $customer_information_object['chocolate']['chocolate_value'], 2);\n\n if($customer_information['wallet_balance'] > 0){\n /*--- deduct part of the money from balance ---*/\n /*--- increase account balance ---*/\n $count = Count::first();\n $count->account += round(0.975 * ($order_total - $customer_information['wallet_balance']), 2);\n $count->save();\n \n /*--- Record slydepay charge transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Slydepay Charge, Order ID - \".$order->id;\n $transaction->trans_amount = round(0.025 * ($order_total - $customer_information['wallet_balance']), 2);\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 2;\n $transaction->trans_debit_account = \"EXT\";\n $transaction->trans_description = \"Slydepay Charge of GH¢ \".round(0.025 * ($order_total - $customer_information['wallet_balance']), 2).\" for order payment \".$order->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n \n /*--- Record main transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Part Order Payment (Slydepay), Order ID - \".$order->id;\n $transaction->trans_amount = ($order_total - $customer_information['wallet_balance']);\n $transaction->trans_credit_account_type = 6;\n $transaction->trans_credit_account = Auth::guard()->user()->id;\n $transaction->trans_debit_account_type = 1;\n $transaction->trans_debit_account = \"INT-SC001\";\n $transaction->trans_description = \"Payment of GH¢ \".(($order_total - $customer_information['wallet_balance'])).\" received for order with ID \".$order->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Reduce account balance to 0 and record transaction ---*/\n\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Part Order Payment (S-Wallet), Order ID - \".$order->id;\n $transaction->trans_amount = round($customer_information['wallet_balance'], 2);\n $transaction->trans_credit_account_type = 5;\n $transaction->trans_credit_account = Auth::guard()->user()->id;\n $transaction->trans_debit_account_type = 1;\n $transaction->trans_debit_account = \"INT-SC001\";\n $transaction->trans_description = \"Payment of GH¢ \".round($customer_information['wallet_balance'], 2).\" received for order with ID \".$order->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n $customer = Customer::where('id', Auth::user()->id)->first();\n $newCustomerBalance = 0;\n $newCustomerMilkshake = ($newCustomerBalance + $customer->chocolate->chocolate_value) / $customer->milk->milk_value;\n $customer->milkshake = $newCustomerMilkshake;\n $customer->save();\n\n //update order\n Order::\n where('id', $order->id)\n ->update([\n 'order_state' => 2\n ]);\n\n /*--- Check first time order ---*/\n if ($order->id == Order::orderby('order_date', 'asc')->whereIn('order_state', [2, 3, 4, 5, 6])->where('order_customer_id', Auth::user()->id)->first()->id) {\n //record five cedis bonus\n $count = Count::first();\n $count->account -= 5;\n $count->save();\n\n /*--- Record transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Sign up bonus for Customer\";\n $transaction->trans_amount = 5;\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 6;\n $transaction->trans_debit_account = Auth::user()->id;\n $transaction->trans_description = \"Payout of GH¢ 5 for first time order \".$order->id.\" of customer \".Auth::user()->first_name.\" \".Auth::user()->last_name;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n }\n\n }else{\n /*--- deduct all of the money from balance ---*/\n\n /*--- increase account balance ---*/\n $count = Count::first();\n $count->account += (round(0.975 * $order_total, 2));\n $count->save();\n\n /*--- Record slydepay charge transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Slydepay Charge, Order ID - \".$order->id;\n $transaction->trans_amount = round(0.025 * $order_total, 2);\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 2;\n $transaction->trans_debit_account = \"EXT\";\n $transaction->trans_description = \"Slydepay Charge of GH¢ \".round(0.025 * $order_total, 2).\" for order payment \".$order->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Record main transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Order Payment for Order ID - \".$order->id;\n $transaction->trans_amount = $order_total;\n $transaction->trans_credit_account_type = 6;\n $transaction->trans_credit_account = Auth::guard()->user()->id;\n $transaction->trans_debit_account_type = 1;\n $transaction->trans_debit_account = \"INT-SC001\";\n $transaction->trans_description = \"Payment of GH¢ \".($order_total).\" received for order with ID \".$order->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n \n //update order\n Order::\n where('id', $order->id)\n ->update([\n 'order_state' => 2\n ]);\n\n /*--- Check first time order ---*/\n if ($order->id == Order::orderby('order_date', 'asc')->whereIn('order_state', [2, 3, 4, 5, 6])->where('order_customer_id', Auth::user()->id)->first()->id) {\n //record five cedis bonus\n $count = Count::first();\n $count->account -= 5;\n $count->save();\n\n /*--- Record transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Sign up bonus for Customer\";\n $transaction->trans_amount = 5;\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 6;\n $transaction->trans_debit_account = Auth::user()->id;\n $transaction->trans_description = \"Payout of GH¢ 5 for first time order \".$order->id.\" of customer \".Auth::user()->first_name.\" \".Auth::user()->last_name;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n }\n }\n\n //update order items quantity\n for ($i=0; $i < sizeof($order->checkout_items); $i++) {\n $sku = StockKeepingUnit::\n where('id', $order->checkout_items[$i][\"oi_sku\"])\n ->first();\n\n //reduce quantity\n $sku->sku_stock_left -= $order->checkout_items[$i][\"oi_quantity\"];\n\n /*--- Notify Vendor ---*/\n $vendor = DB::select(\n \"SELECT phone, email, name FROM vendors, products, stock_keeping_units WHERE products.product_vid = vendors.id AND stock_keeping_units.sku_product_id = products.id AND stock_keeping_units.id = '\".$order->checkout_items[$i][\"oi_sku\"].\"'\"\n );\n\n \n $sms = new SMS;\n $sms->sms_message = \"Purchase Alert\\nProduct : \" .$order->checkout_items[$i][\"oi_name\"]. \"\\nQuantity Bought: \" . $order->checkout_items[$i][\"oi_quantity\"] . \"\\nQuantity Remaining : \" .$sku->sku_stock_left;\n $sms->sms_phone = $vendor[0]->phone;\n $sms->sms_state = 1;\n $sms->save();\n\n $data = array(\n 'subject' => 'Purchase Alert - Solushop Ghana',\n 'name' => $vendor[0]->name,\n 'message' => \"You have a new order.<br><br>Product : \" .$order->checkout_items[$i][\"oi_name\"]. \"<br>Quantity Bought: \" . $order->checkout_items[$i][\"oi_quantity\"] . \"<br>Quantity Remaining : \" .$sku->sku_stock_left.\"<br>\"\n );\n\n Mail::to($vendor[0]->email, $vendor[0]->name)\n ->queue(new Alert($data));\n\n //save sku\n $sku->save();\n }\n \n\n //notify customer\n $sms_message = \"Hi \".Auth::user()->first_name.\", your order \".$order->id.\" has been received. We will begin processing soon. Thanks for choosing Solushop!\";\n $sms_phone = Auth::user()->phone;\n\n $sms = new SMS;\n $sms->sms_message = $sms_message;\n $sms->sms_phone = $sms_phone;\n $sms->sms_state = 1;\n $sms->save();\n\n $data = array(\n 'subject' => 'Order Received - Solushop Ghana',\n 'name' => Auth::user()->first_name,\n 'message' => \"Your order $order->id has been received. We will begin processing soon. Thanks for choosing Solushop!\"\n );\n\n Mail::to(Auth::user()->email, Auth::user()->first_name)\n ->queue(new Alert($data));\n\n //notify management\n $managers = Manager::where('sms', 0)->get();\n foreach ($managers as $manager) {\n\n $data = array(\n 'subject' => 'New Order - Solushop Ghana',\n 'name' => $manager->first_name,\n 'message' => \"This email is to inform you that a new order $order->id has been received. If you are not required to take any action during order processing, please treat this email as purely informational.<br><br>Customer: \".Auth::user()->first_name.\" \".Auth::user()->last_name.\"<br>Phone: 0\".substr(Auth::user()->phone, 3)\n );\n\n Mail::to($manager->email, $manager->first_name)\n ->queue(new Alert($data));\n }\n\n /*--- log activity ---*/\n activity()\n ->causedBy(Customer::where('id', Auth::user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Order Received';\n })\n ->log(Auth::user()->email.' placed order. [ '.$order->id.' ]');\n\n /*--- Confirm payment on slydepay ---*/\n $slydepay = new Slydepay(\"[email protected]\", \"1466854163614\");\n $slydepay->confirmTransaction($payment_token, $transaction_id);\n\n /*--- Redirect with success message ---*/\n return redirect()->route(\"show.account.orders\")->with(\"success_message\", \"Order payment successful.\");\n\n break;\n\n case 'wallet_top_up':\n /*--- Check for payment status and redirect appropriately ---*/\n if($status_code != 0){\n return redirect()->route(\"show.account.wallet\")->with(\"error_message\", \"Top-Up payment unsuccessful.\");\n }\n\n /*--- process top up ---*/\n $wtu_payment = WTUPayment::where('wtu_payment_token', $payment_token)->first();\n\n $wtu_package = WTUPackage::where('id', $wtu_payment->wtu_payment_wtup_id)->first();\n\n /*--- increase account balance ---*/\n $count = Count::first();\n $count->account += (round(0.975 * $wtu_package->wtu_package_cost, 2));\n $count->save();\n\n /*--- Record slydepay charge transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Slydepay Charge, WTUPID - \".$wtu_payment->id;\n $transaction->trans_amount = round(0.025 * $wtu_package->wtu_package_cost, 2);\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 2;\n $transaction->trans_debit_account = \"EXT\";\n $transaction->trans_description = \"Slydepay Charge of GH¢ \".round(0.025 * $wtu_package->wtu_package_cost, 2).\" for wallet top up payment \".$wtu_payment->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Record main transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Wallet Top Up Payment WTUPID - \".$wtu_payment->id;\n $transaction->trans_amount = $wtu_package->wtu_package_cost;\n $transaction->trans_credit_account_type = 6;\n $transaction->trans_credit_account = Auth::guard()->user()->id;\n $transaction->trans_debit_account_type = 1;\n $transaction->trans_debit_account = \"INT-SC001\";\n $transaction->trans_description = \"Payment of GH¢ \".($wtu_package->wtu_package_cost).\" received for wallet top up with ID \".$wtu_payment->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Record wallet debit transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Wallet Top Up Payment WTUPID - \".$wtu_payment->id;\n $transaction->trans_amount = round(1.02 * $wtu_package->wtu_package_cost);\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 5;\n $transaction->trans_debit_account = Auth::guard()->user()->id;\n $transaction->trans_description = \"Wallet top up of GH¢ \".round(1.02 * $wtu_package->wtu_package_cost).\" for wallet top up with ID \".$wtu_payment->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Record wallet bonus transaction ---*/\n $count = Count::first();\n $count->account -= (round($wtu_package->wtu_package_bonus, 2));\n $count->save();\n\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Wallet Top Up Bonus Payment WTUPID - \".$wtu_payment->id;\n $transaction->trans_amount = $wtu_package->wtu_package_bonus;\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 6;\n $transaction->trans_debit_account = Auth::guard()->user()->id;\n $transaction->trans_description = \"Wallet top bonus of GH¢ \".($wtu_package->wtu_package_bonus).\" for wallet top up with ID \".$wtu_payment->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n\n /*--- Update customer account balance ---*/\n $customer = Customer::\n where('id', Auth::user()->id)\n ->with('chocolate', 'milk')\n ->first();\n\n $newCustomerBalance = round((($customer->milk->milk_value * $customer->milkshake) - $customer->chocolate->chocolate_value) + $wtu_package->wtu_package_cost, 2);\n $newCustomerMilkshake = ($newCustomerBalance + $customer->chocolate->chocolate_value) / $customer->milk->milk_value;\n $customer->milkshake = $newCustomerMilkshake;\n $customer->save();\n \n /*--- Log activity ---*/\n activity()\n ->causedBy(Customer::where('id', Auth::user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Wallet Top Up';\n })\n ->log(Auth::user()->first_name.\" \".Auth::user()->last_name.\" topped up their S-Wallet with GH¢ \".($wtu_package->wtu_package_cost));\n\n /*--- Confirm payment on slydepay ---*/\n $slydepay = new Slydepay(\"[email protected]\", \"1466854163614\");\n $slydepay->confirmTransaction($payment_token, $transaction_id);\n \n /*--- Redirect with success message ---*/\n return redirect()->route(\"show.account.wallet\")->with('success_message', 'Wallet top up of GH¢ '.($wtu_package->wtu_package_cost).' successful.');\n \n\n break;\n\n case 'subscription':\n /*--- Check for payment status and redirect appropriately ---*/\n if($status_code != 0){\n return redirect()->route(\"vendor.show.subscription\")->with(\"error_message\", \"Subscription payment unsuccessful.\");\n }\n\n /*--- process subscription ---*/\n $vs_payment = VSPayment::where('vs_payment_token', $payment_token)->first();\n\n /*--- increase account balance ---*/\n $count = Count::first();\n $count->account += (round(0.975 * $vs_payment->vs_payment_amount, 2));\n $count->save();\n\n /*--- Record slydepay charge transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Slydepay Charge, VSPID - \".$vs_payment->id;\n $transaction->trans_amount = round(0.025 * $vs_payment->vs_payment_amount, 2);\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 2;\n $transaction->trans_debit_account = \"EXT\";\n $transaction->trans_description = \"Slydepay Charge of GH¢ \".round(0.025 * $vs_payment->vs_payment_amount, 2).\" for subscription payment \".$vs_payment->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n /*--- Record main transaction ---*/\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Vendor Subscription Payment VSPID - \".$vs_payment->id;\n $transaction->trans_amount = $vs_payment->vs_payment_amount;\n $transaction->trans_credit_account_type = 4;\n $transaction->trans_credit_account = Auth::guard('vendor')->user()->id;\n $transaction->trans_debit_account_type = 1;\n $transaction->trans_debit_account = \"INT-SC001\";\n $transaction->trans_description = \"Payment of GH¢ \".($vs_payment->vs_payment_amount).\" for subscription \".$vs_payment->vs_payment_vsp_id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = \"System\";\n $transaction->save();\n\n\n if(is_null(VendorSubscription::where('vs_vendor_id', Auth::guard('vendor')->user()->id)->first())){\n //subscribe\n $vendor_subscription = New VendorSubscription;\n $vendor_subscription->vs_vendor_id = Auth::guard('vendor')->user()->id;\n $vendor_subscription->vs_vsp_id = $vs_payment->vs_payment_vsp_id;\n $vendor_subscription->vs_days_left = $vs_payment->vs_payment_vspq * 30;\n $vendor_subscription->save();\n \n /*--- Log activity ---*/\n activity()\n ->causedBy(Vendor::where('id', Auth::guard('vendor')->user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Subscription Change';\n })\n ->log(Auth::guard('vendor')->user()->name.\" subscribed to package \".$vendor_subscription->vs_vsp_id.\" for \".($vs_payment->vs_payment_vspq * 30).\" days\");\n \n /*--- Confirm payment on slydepay ---*/\n $slydepay = new Slydepay(\"[email protected]\", \"1466854163614\");\n $slydepay->confirmTransaction($payment_token, $transaction_id);\n \n return redirect()->route(\"vendor.show.subscription\")->with('success_message', 'Subscription successful and is valid for '.($vs_payment->vs_payment_vspq * 30).' days');\n \n }else{\n if(VendorSubscription::where('vs_vendor_id', Auth::guard('vendor')->user()->id)->first()->vs_vsp_id == $vs_payment->vs_payment_vsp_id){\n //extend\n $vendor_subscription = VendorSubscription::where('vs_vendor_id', Auth::guard('vendor')->user()->id)->first();\n $vendor_subscription->vs_days_left = $vendor_subscription->vs_days_left + ($vs_payment->vs_payment_vspq * 30);\n \n /*--- Log activity ---*/\n activity()\n ->causedBy(Vendor::where('id', Auth::guard('vendor')->user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Subscription Extension';\n })\n ->log(Auth::guard('vendor')->user()->name.\" extended subscription to \".$vendor_subscription->vs_days_left.\" days\");\n \n $vendor_subscription->save();\n\n /*--- Confirm payment on slydepay ---*/\n // $slydepay = new Slydepay(\"[email protected]\", \"1466854163614\");\n // $slydepay->confirmTransaction($payment_token, $transaction_id);\n\n return redirect()->route(\"vendor.show.subscription\")->with('success_message', 'Subscription extended by '.($vs_payment->vs_payment_vspq * 30).' days');\n }else{\n //update\n $vendor_subscription = VendorSubscription::where('vs_vendor_id', Auth::guard('vendor')->user()->id)->first();\n $vendor_subscription->vs_vsp_id = $vs_payment->vs_payment_vsp_id;\n $vendor_subscription->vs_days_left = $vs_payment->vs_payment_vspq * 30;\n \n /*--- Log activity ---*/\n activity()\n ->causedBy(Vendor::where('id', Auth::guard('vendor')->user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Subscription Change';\n })\n ->log(Auth::guard('vendor')->user()->name.\" changed subscription to package \".$vs_payment->vs_payment_vsp_id.\" for \".($vs_payment->vs_payment_vspq * 30).\" days\");\n \n $vendor_subscription->save();\n\n /*--- Confirm payment on slydepay ---*/\n $slydepay = new Slydepay(\"[email protected]\", \"1466854163614\");\n $slydepay->confirmTransaction($payment_token, $transaction_id);\n\n return redirect()->route(\"vendor.show.subscription\")->with('success_message', 'Subscription successful and is valid for '.($vs_payment->vs_payment_vspq * 30).' days');\n }\n }\n\n\n break;\n \n default:\n //Do absolutely nothing.\n break;\n }\n }", "title": "" }, { "docid": "bdba498938d1f7662c98c98f58dcae74", "score": "0.5017958", "text": "public function getPaymentMethodType();", "title": "" }, { "docid": "ac9a3fdc00fd9d2b50aeda0866df2eff", "score": "0.49786946", "text": "public function proceed()\n\t{\n\t\tob_end_clean();\n\t\tif(strpos(MODULE_PAYMENT_INSTALLED, 'paypal3') === false)\n\t\t{\n\t\t\tob_start();\n\t\t\tparent::proceed();\n\t\t\treturn;\n\t\t}\n\t\t$orders_id = (int)$this->v_data_array['GET']['oID'];\n\t\t$order = new order($orders_id);\n\t\t$this->paypalConfigStorage = MainFactory::create('PayPalConfigurationStorage');\n\t\t$this->paypalText = MainFactory::create('PayPalText');\n\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\t\t\tif(isset($_POST['pp3paylink']))\n\t\t\t{\n\t\t\t\tisset($_SESSION['coo_page_token']) === false || $_SESSION['coo_page_token']->is_valid($_POST['page_token']) or die('invalid page token');\n\n\n\t\t\t\tif(isset($_POST['pp3paylink']['delete']))\n\t\t\t\t{\n\t\t\t\t\t$this->deletePaycode($orders_id);\n\t\t\t\t\t$_SESSION[self::MESSAGES_NS][] = $this->paypalText->get_text('paylink_deleted');\n\t\t\t\t}\n\t\t\t\telseif(isset($_POST['pp3paylink']['amount']))\n\t\t\t\t{\n\t\t\t\t\t$paycode = $this->makePaycode($orders_id, $_POST['pp3paylink']['amount']);\n\t\t\t\t\t$_SESSION[self::MESSAGES_NS][] = $this->paypalText->get_text('paylink_created') . ' ('.$paycode.')';\n\t\t\t\t}\n\n\t\t\t\txtc_redirect(xtc_href_link('orders.php', 'oID='.(int)$_GET['oID']).'&action=edit');\n\t\t\t}\n\t\t\tob_start();\n\t\t\tparent::proceed();\n\t\t\treturn;\n\t\t}\n\n\t\t$t_messages = is_array($_SESSION[self::MESSAGES_NS]) ? $_SESSION[self::MESSAGES_NS] : array();\n\t\t$_SESSION[self::MESSAGES_NS] = array();\n\t\t$pp3paylink_page_token = isset($_SESSION['coo_page_token']) ? $_SESSION['coo_page_token']->generate_token() : '';\n\t\t$pp3_paylink_action = xtc_href_link('orders.php', http_build_query($_GET));\n\t\t$pp3_paylink_amount = $this->getOrderTotal($orders_id);\n\t\t$pp3_paycode = $this->findPaycode($orders_id);\n\t\tif($pp3_paycode !== false)\n\t\t{\n\t\t\t$pp3_paylink_url = xtc_catalog_href_link('shop.php', 'do=PayPal/Paylink&code='.$pp3_paycode->paycode, 'SSL');\n\t\t\t$pp3_paylink_amount = number_format($pp3_paycode->amount, 2, '.', '');\n\t\t}\n\t\tob_start();\n\t\tinclude DIR_FS_ADMIN.'html/content/paypal3/orders_paypal3_paylink.php';\n\t\techo $this->paypalText->replaceLanguagePlaceholders(ob_get_clean());\n\n\t\tob_start();\n\t\t$this->addContent();\n\t\tparent::proceed();\n\t}", "title": "" }, { "docid": "a258a2f64a1751211c7cc3e01ea7e55f", "score": "0.49740252", "text": "function refundpayment($profileid,$paymentprofileid,$shippingprofileid,$amount,$description=NULL,$invoice=\"123456\",$lineitems = array()) {\n\t\t$flag = false;\n\t\t$returnresponse = array();\n\t\t$content =\n\t\t\t\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\" .\n\t\t\t\"<createCustomerProfileTransactionRequest xmlns=\\\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\\\">\" .\n\t\t\t$this->MerchantAuthenticationBlock().\n\t\t\t\"<transaction>\".\n\t\t\t\"<profileTransRefund>\".\n\t\t\t\"<amount>\" . $amount . \"</amount>\". // should include tax, shipping, and everything.\n\t\t\t\"<customerProfileId>\" . $profileid . \"</customerProfileId>\".\n\t\t\t\"<customerPaymentProfileId>\" . $paymentprofileid . \"</customerPaymentProfileId>\".\n\t\t\t\"<customerShippingAddressId>\" . $shippingprofileid . \"</customerShippingAddressId>\".\n\t\t\t\"<order>\".\n\t\t\t\"<invoiceNumber>\".$invoice.\"</invoiceNumber>\".\n\t\t\t\"</order>\".\n\t\t\t\"</profileTransRefund>\".\n\t\t\t\"</transaction>\".\n\t\t\t\"</createCustomerProfileTransactionRequest>\";\n\t\t\t\n\n\t\t//echo \"Raw request: \" . htmlspecialchars($content) . \"<br><br>\";\n\t\t$response = $this->send_xml_request($content);\n\t\t//echo \"Raw response: \" . htmlspecialchars($response) . \"<br><br>\";\n\t\t$parsedresponse = $this->parse_api_response($response);\n\t\tif (\"Ok\" == $parsedresponse->messages->resultCode) {\n\t\t\t$flag = true;\n\t\t}\n\t\tif (isset($parsedresponse->directResponse)) {\n\t\t\t$directResponseFields = explode(\",\", $parsedresponse->directResponse);\n\t\t\t$responseCode = $directResponseFields[0]; // 1 = Approved 2 = Declined 3 = Error\n\t\t\t$responseReasonCode = $directResponseFields[2]; // See http://www.authorize.net/support/AIM_guide.pdf\n\t\t\t$responseReasonText = $directResponseFields[3];\n\t\t\t$approvalCode = $directResponseFields[4]; // Authorization code\n\t\t\t$transId = $directResponseFields[6];\n\t\t\t\n\t\t\tif (\"1\" == $responseCode) $flag = true;\n\t\t\telse if (\"2\" == $responseCode) $flag = false;\n\t\t\telse $flag = false;\n\t\t\tif ($flag) {\n\t\t\t\t$returnresponse[\"responseReasonCode\"] = htmlspecialchars($responseReasonCode);\n\t\t\t\t$returnresponse[\"responseReasonText\"] = htmlspecialchars($responseReasonText);\n\t\t\t\t$returnresponse[\"approvalCode\"]\t\t= htmlspecialchars($approvalCode);\n\t\t\t\t$returnresponse[\"transId\"]\t\t\t= htmlspecialchars($transId);\n\t\t\t}\n\t\t}\n\t\tif ($flag) {\n\t\t\treturn $returnresponse;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "960262b7891cf9bd4194c8ffd8b82372", "score": "0.4973636", "text": "public function execute()\n { //load model\n /* @var $paymentMethod \\Magento\\Authorizenet\\Model\\DirectPost */\n $paymentMethod = $this->_objectManager->create('Sslwireless\\Sslcommerz\\Model\\Sslcommerz');\n \n // $data = $this->getRequest()->getPostValue();\n // $all = $paymentMethod->ipnAction($data);\n\n //get request data\n // $data = $paymentMethod->getCusMail();testfunc\n // $data = $paymentMethod->testfunc();\n // $ipndata['amount'] = \"1164.59\";\n // $ipndata['bank_tran_id'] = \"1909231037421XdqSd3nfgEi9DB\";\n // $ipndata['card_brand'] = \"MOBILEBANKING\";\n // $ipndata['card_issuer'] = \"BKash Mobile Banking\";\n // $ipndata['card_issuer_country'] = \"Bangladesh\";\n // $ipndata['card_issuer_country_code'] = \"BD\";\n // $ipndata['card_no'] = \"\";\n // $ipndata['card_type'] = \"BKASH-BKash\";\n // $ipndata['status'] = \"VALID\";\n // $ipndata['store_amount'] = \"1135.47525\";\n // $ipndata['store_id'] = \"testbox\";\n // $ipndata['tran_date'] = \"2019-09-23 10:37:29\";\n // $ipndata['tran_id'] = \"000000071\";\n // $ipndata['val_id'] = \"190923103743MYZwxa3gtBFIQA5\";\n // $ipndata['verify_sign'] = \"8070c0cefed9e629b01100d8a92afda2\";\n // $ipndata['verify_key'] = \"amount,bank_tran_id,base_fair,card_brand,card_issuer,card_issuer_country,card_issuer_country_code,card_no,card_type,currency,currency_amount,currency_rate,currency_type,risk_level,risk_title,status,store_amount,store_id,tran_date,tran_id,val_id,value_a,value_b,value_c,value_d\";\n // $data = $paymentMethod->ipnAction($ipndata);\n\n // foreach ($data as $item)\n // {\n // echo $item->getId().\"<br>\";\n // echo $item->getProductType().\"<br>\";\n // echo $item->getQtyOrdered().\"<br>\";\n // echo $item->getPrice().\"<br>\";\n // echo $item->getName().\"<br>\";\n // }\n // $test = $paymentMethod->getSslOrederStatus(\"000000071\");\n // echo \"<pre>\";\n // print_r($test);\n \n \n // $mail = $this->_objectManager->create('Sslwireless\\Sslcommerz\\Controller\\Payment\\Sendemail');\n // $mail->SuccessEmail();\n // $mail->FailEmail();\n // $mail->CancelEmail();\n\n }", "title": "" }, { "docid": "82fe63152ef69b92b593db6d5f61d7d7", "score": "0.49664378", "text": "public function execute()\n {\n $om = $this->_objectManager;\n $session = $om->get('Magento\\Checkout\\Model\\Session');\n $quote = $session->getQuote();\n\n\n if(isset($_GET['order_id']) ) {\n $config = $om->get('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n// Mage::log('GET:'.print_r($_GET,true),null,'responseAction.log',true);\n $orderId = $_GET['order_id']; // Generally sent by gateway\n $status = isset($_GET['status_code'])?$_GET['status_code']:0 ;\n $transStatus = isset($_GET['transaction_status'])?$_GET['transaction_status']:\"Unknown\" ;\n\n $writer = new \\Zend\\Log\\Writer\\Stream(BP . '/var/log/responseafterpayment.log');\n $logger = new \\Zend\\Log\\Logger();\n $logger->addWriter($writer);\n $_info = \"status : \".$status.\" , orderid : \".$orderId.\".\";\n $logger->info( $_info );\n\n if( ($status == '200' or $status =='201' ) && !is_null($orderId) && $orderId != '') {\n\t\t\t\treturn $this->resultRedirectFactory->create()->setPath('checkout/onepage/success');\n } \n else if($status == '202' && $transStatus == 'deny' && !is_null($orderId) && $orderId != '') {\n $this->fromOrderId($orderId);\n // Back to merchant - reorder\n }\n else {\n $this->fromOrderId($orderId);\n // Back to merchant - reorder\n }\n } else if ( isset($_GET['id']) ) { // BCA klikpay\n $config = $om->get('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $veritransconf = $om->create('Veritrans_Config');\n $veritransconf::$serverKey = $config->getValue('payment/vtklikbca/server_key_v2', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE) ;\n $data = \\Veritrans_Transaction::status($_GET['id']);\n if ($data->transaction_status == 'settlement' ) {\n return $this->resultRedirectFactory->create()->setPath('checkout/onepage/success');\n }else{\n $orderId = $_GET['order_id'];\n $this->fromOrderId($orderId);\n }\n\n }\n else{\n return $this->resultRedirectFactory->create()->setPath('/');\n }\n\n }", "title": "" }, { "docid": "63f521337beea2185922396b3dcc89eb", "score": "0.49614778", "text": "function processCard($amount=0,$orderId,$ccNumber,$expM,$expY,$ccCode,$description=\"\")\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\t\r\n\t\t// GET METHOD\r\n\t\t$method = $_SETTINGS['ecommerce_cc_processor'];\r\n\t\t\r\n\t\t//\r\n\t\t// AUTHORIZE.net == PROCESSOR ID 1\r\n\t\t//\r\n\t\tif($method == \"1\"){\r\n\t\t\t// IF TESTING / NOT LIVE\r\n\t\t\tif($_SETTINGS['anet_live'] == 0){\t\t\r\n\t\t\t\t// By default, this sample code is designed to post to our test server for\r\n\t\t\t\t// developer accounts: https://test.authorize.net/gateway/transact.dll\r\n\t\t\t\t// for real accounts (even in test mode), please make sure that you are\r\n\t\t\t\t// posting to: https://secure.authorize.net/gateway/transact.dll\t\t\r\n\t\t\t\t$post_url = \"https://test.authorize.net/gateway/transact.dll\";\t\r\n\t\t\t\t$loginid = $_SETTINGS['anet_test_login_id'];\r\n\t\t\t\t$transkey = $_SETTINGS['anet_test_transaction_key'];\t\t\t\t\r\n\t\t\t} elseif($_SETTINGS['anet_live'] == 1){\r\n\t\t\t\t$post_url = \"https://secure.authorize.net/gateway/transact.dll\";\t\r\n\t\t\t\t$loginid = $_SETTINGS['anet_production_login_id'];\r\n\t\t\t\t$transkey = $_SETTINGS['anet_production_transaction_key'];\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t$expY = substr($expY,2);\r\n\t\t\r\n\t\t\t$post_values = array(\t\t\t\r\n\t\t\t\t// the API Login ID and Transaction Key must be replaced with valid values\r\n\t\t\t\t\"x_login\"\t\t\t=> $loginid,\r\n\t\t\t\t\"x_tran_key\"\t\t=> $transkey,\r\n\r\n\t\t\t\t\"x_version\"\t\t\t=> \"3.1\",\r\n\t\t\t\t\"x_delim_data\"\t\t=> \"TRUE\",\r\n\t\t\t\t\"x_delim_char\"\t\t=> \"|\",\r\n\t\t\t\t\"x_relay_response\"\t=> \"FALSE\",\r\n\r\n\t\t\t\t\"x_type\"\t\t\t=> \"AUTH_CAPTURE\",\r\n\t\t\t\t\"x_method\"\t\t\t=> \"CC\",\r\n\t\t\t\t\"x_card_num\"\t\t=> $ccNumber,\r\n\t\t\t\t\"x_exp_date\"\t\t=> $expM.$expY,\r\n\t\t\t\t\"x_card_code\"\t\t=> $ccCode,\r\n\t\t\t\t\r\n\t\t\t\t\"x_amount\"\t\t\t=> $amount,\r\n\t\t\t\t\"x_description\"\t\t=> $description\r\n\r\n\t\t\t\t//\"x_first_name\"\t\t=> \"\".$_POST['firt_name'].\"\",\r\n\t\t\t\t//\"x_last_name\"\t\t=> \"\".$_POST['last_name'].\"\",\r\n\t\t\t\t//\"x_address\"\t\t\t=> \"\".$_POST['address1'].\"\",\r\n\t\t\t\t//\"x_state\"\t\t\t=> \"\".$_POST['state'].\"\",\r\n\t\t\t\t//\"x_zip\"\t\t\t\t=> \"\".$_POST['zip'].\"\"\r\n\t\t\t\t// Additional fields can be added here as outlined in the AIM integration\r\n\t\t\t\t// guide at: http://developer.authorize.net\r\n\t\t\t);\r\n\t\t\r\n\t\t\t// This section takes the input fields and converts them to the proper format\r\n\t\t\t// for an http post. For example: \"x_login=username&x_tran_key=a1B2c3D4\"\r\n\t\t\t$post_string = \"\";\r\n\t\t\tforeach( $post_values as $key => $value )\r\n\t\t\t\t{ $post_string .= \"$key=\" . urlencode( $value ) . \"&\"; }\r\n\t\t\t$post_string = rtrim( $post_string, \"& \" );\r\n\r\n\t\t\t// This sample code uses the CURL library for php to establish a connection,\r\n\t\t\t// submit the post, and record the response.\r\n\t\t\t// If you receive an error, you may want to ensure that you have the curl\r\n\t\t\t// library enabled in your php configuration\r\n\t\t\t$request = curl_init($post_url); // initiate curl object\r\n\t\t\t\tcurl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response\r\n\t\t\t\tcurl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)\r\n\t\t\t\tcurl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data\r\n\t\t\t\tcurl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.\r\n\t\t\t\t$post_response = curl_exec($request); // execute curl post and store results in $post_response\r\n\t\t\t\t// additional options may be required depending upon your server configuration\r\n\t\t\t\t// you can find documentation on curl options at http://www.php.net/curl_setopt\r\n\t\t\tcurl_close ($request); // close curl object\r\n\r\n\t\t\t// This line takes the response and breaks it into an array using the specified delimiting character\r\n\t\t\t$response_array = explode($post_values[\"x_delim_char\"],$post_response);\t\t\r\n\t\t\t$response_string = \"\";\r\n\t\r\n\t\t\t// The results are output to the screen in the form of an html numbered list.\r\n\t\t\t//echo \"<OL>\\n\";\r\n\t\t\t//foreach ($response_array as $value)\r\n\t\t\t//{\r\n\t\t\t\t//echo \"<LI>\" . $value . \"&nbsp;</LI>\\n\";\r\n\t\t\t//\t$i++;\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\t//echo \"</OL>\\n\";\r\n\t\t\t//die();\r\n\t\t\t//exit();\r\n\t\t\t// individual elements of the array could be accessed to read certain response\r\n\t\t\t// fields. For example, response_array[0] would return the Response Code,\r\n\t\t\t// response_array[2] would return the Response Reason Code.\r\n\t\t\t// for a list of response fields, please review the AIM Implementation Guide\r\n\t\r\n\t\t\t$response_string = \"\".date(\"Y-m-d H:i:s\").\"|\".$price.\"|\".$response_array[4].\"\";\r\n\t\t\t$response = $response_array;\r\n\t\t\t//echo \"<br><br>\";\r\n\t\t\t//var_export($post_values);\r\n\t\t\t\r\n\t\t\t//die();\r\n\t\t\t//exit();\r\n\t\t\t\r\n\t\t\t// RETURN TRANSACTION\r\n\t\t\t\r\n\t\t\t$array = array($response_array[0],$response_array[3],$response_array);\r\n\t\t\treturn $array;\r\n\r\n\t\t}\r\n\t\t\r\n\t\t//\r\n\t\t// PAYPAL WEBSITE PAYMENTS PRO\r\n\t\t// TODO...\r\n\t\tif($method==\"2\"){\r\n\t\t\t$array = array(0,\"\",\"\");\r\n\t\t\treturn $array;\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "63d41a02442682604f2da3e52124169c", "score": "0.49504015", "text": "function payment_process($order)\n\t{\n\t\treturn 1; \n\t}", "title": "" }, { "docid": "75c70ab59f79cd9fc60ec6bb37d41467", "score": "0.49476245", "text": "public function payment()\r\n {\r\n $cart = \\Shop\\Models\\Carts::fetch();\r\n // Update product fields stored in cart\r\n foreach ($cart->validateProducts() as $change) {\r\n \\Dsc\\System::addMessage($change);\r\n }\r\n $cart->applyCredit();\r\n \r\n \\Base::instance()->set( 'cart', $cart );\r\n \r\n $identity = $this->getIdentity();\r\n if (empty( $identity->id ))\r\n {\r\n $flash = \\Dsc\\Flash::instance();\r\n \\Base::instance()->set('flash', $flash );\r\n \r\n $this->app->set('meta.title', 'Login or Register | Checkout');\r\n \r\n $view = \\Dsc\\System::instance()->get( 'theme' );\r\n echo $view->render( 'Shop/Site/Views::checkout/identity.php' );\r\n return;\r\n }\r\n $identity->reload();\r\n \r\n $props = array();\r\n if ($identity->guest) {\r\n $props['guest'] = true;\r\n } \r\n \\Shop\\Models\\Activities::track('Reached Payment Step in Checkout', $props);\r\n \r\n $this->app->set('meta.title', 'Payment | Checkout');\r\n \r\n $view = \\Dsc\\System::instance()->get( 'theme' );\r\n echo $view->render( 'Shop/Site/Views::checkout/payment.php' );\r\n }", "title": "" }, { "docid": "4ef6eebaa3316c06c1b415056f6b9df9", "score": "0.49437785", "text": "public function processPaymentReview($order) {\n // load payment\n $payment = $order->getPayment();\n\n // check if token is exist\n if ($mony_id = $payment->getAdditionalInformation(\\Mony\\Mony\\Model\\Config\\Mony::MONY_TRANSACTION_ID)) {\n $response = $this->getPaymentById($mony_id); // set start cron\n\n // check the result of API\n switch ($response['status']) {\n case \\Mony\\Mony\\Model\\Payment::RESPONSE_STATUS_APPROVED:\n // Adding order ID to payment, create invoice and processing the order\n $this->updatePayment($order, $response['id']);\n $this->createInvoiceAndUpdateOrder($order, $response['id']);\n $payment->setIsTransactionApproved(true);\n break;\n case \\Mony\\Mony\\Model\\Payment::RESPONSE_STATUS_DECLINED;\n // cancel the order if found order declined\n $this->cancelOrder($order, __('Payment declined by Mony'));\n break;\n case \\Mony\\Mony\\Model\\Payment::RESPONSE_STATUS_FAILED;\n // cancel the order if found order declined\n $this->cancelOrder($order, __('Payment Failed'));\n break;\n }\n } \n else {\n // cancel order if token is not found\n $this->cancelOrder($order, __('Payment Not Found'));\n }\n }", "title": "" }, { "docid": "f905e53737c47f74c675066102e6c8d1", "score": "0.49378553", "text": "protected function _process_subscr_payment(Rb_EcommerceResponse $response, Array $data)\n\t{\t\n\t\t$func_name = '_process_payment_'.JString::strtolower($data['payment_status']);\n\t\t\n\t\t$this->$func_name($response, $data);\t\t\n\t}", "title": "" }, { "docid": "339cc256526af284eb86500c901e5408", "score": "0.49304053", "text": "public function before_process() \n {\n global $order;\n $result = $this->_paymentInit();\n if (!array_key_exists('error', $result) && array_key_exists('transactionId', $result)) {\n Session::setRpSessionEntry('transactionId', $result['transactionId']);\n Session::setRpSessionEntry('transactionShortId', $result['transactionShortId']);\n $result = $this->_paymentRequest($result['transactionId'], $result['transactionShortId']);\n if (array_key_exists('error', $result) && !array_key_exists('transactionId', $result)) {\n Session::cleanRpSession();\n $error = urlencode(constant(strtoupper($this->code) . '_ERROR'));\n tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $error, 'SSL'));\n } else {\n Session::setRpSessionEntry('customers_country_code', $order->customer['country']['iso_code_2']);\n Session::setRpSessionEntry('descriptor', $result['descriptor']);\n }\n } else {\n $error = urlencode(constant(strtoupper($this->code) . '_ERROR_GATEWAY'));\n tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $error, 'SSL'));\n }\n }", "title": "" }, { "docid": "bbe9bd0a9258970054cb34eb8b2e28e4", "score": "0.49280775", "text": "function back() {\r\n\t\t// we are back from Paypal. We need to do GetExpressCheckoutDetails\r\n\t\t// and DoExpressCheckoutPayment to complete.\r\n\t\t$token = $_GET['token'];\r\n\t\t$payer_id = $_GET['PayerID'];\r\n\t\t// GetExpressCheckoutDetails\r\n\t\t$get_ec_return = $this->paypal_ec->get_ec($token);\r\n\t\tif (isset($get_ec_return['ec_status']) && ($get_ec_return['ec_status'] === true)) {\r\n\t\t\t// at this point, you have all of the data for the transaction.\r\n\t\t\t// you may want to save the data for future action. what's left to\r\n\t\t\t// do is to collect the money -- you do that by call DoExpressCheckoutPayment\r\n\t\t\t// via $this->paypal_ec->do_ec();\r\n\t\t\t//\r\n\t\t\t// I suggest to save all of the details of the transaction. You get all that\r\n\t\t\t// in $get_ec_return array\r\n\t\t\t$ec_details = array(\r\n\t\t\t\t'token' => $token, \r\n\t\t\t\t'payer_id' => $payer_id, \r\n\t\t\t\t'currency' => $this->currency, \r\n\t\t\t\t'amount' => $get_ec_return['PAYMENTREQUEST_0_AMT'], \r\n\t\t\t\t'IPN_URL' => site_url('test/ipn'), \r\n\t\t\t\t// in case you want to log the IPN, and you\r\n\t\t\t\t// may have to in case of Pending transaction\r\n\t\t\t\t'type' => $this->ec_action);\r\n\t\t\t\t\r\n\t\t\t// DoExpressCheckoutPayment\r\n\t\t\t$do_ec_return = $this->paypal_ec->do_ec($ec_details);\r\n\t\t\tif (isset($do_ec_return['ec_status']) && ($do_ec_return['ec_status'] === true)) {\r\n\t\t\t\t// at this point, you have collected payment from your customer\r\n\t\t\t\t// you may want to process the order now.\r\n\t\t\t\techo \"<h1>Thank you. We will process your order now.</h1>\";\r\n\t\t\t\techo \"<pre>\";\r\n\t\t\t\techo \"\\nGetExpressCheckoutDetails Data\\n\" . print_r($get_ec_return, true);\r\n\t\t\t\techo \"\\n\\nDoExpressCheckoutPayment Data\\n\" . print_r($do_ec_return, true);\r\n\t\t\t\techo \"</pre>\";\r\n\t\t\t} else {\r\n\t\t\t\t$this->_error($do_ec_return);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->_error($get_ec_return);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c7a48a3f52c657b8b53cc213a4ab98d7", "score": "0.4925463", "text": "function process_payment($order_id){\n \n $order = wc_get_order($order_id);\n $order_key = Toret_Order_Compatibility::get_order_key( $order ); \n \n return array(\n 'result' => 'success', \n 'redirect' => add_query_arg(\n 'order-pay',\n $order_id, \n add_query_arg(\n 'key', \n $order_key, \n $order->get_checkout_order_received_url() \n )\n ) \n );\n \n \n }", "title": "" }, { "docid": "9c3d6591415a989a70302c70aab4a0ef", "score": "0.4916974", "text": "public function callback()\n {\n if (request()->cancelled && request()->txref) {\n //Handles Request if its cancelled\n //Payment might have been made before cancellation\n //This verifies if it's paid or not\n $data = Rave::verifyTransaction(request()->txref)->paymentCanceled(request()->txref);\n } elseif (request()->txref) {\n // Handle completed payments\n $data = Rave::verifyTransaction(request()->txref);\n } else {\n return redirect()->route('contest-registration')->withFlashDanger('Please pass the txref parameter!');\n }\n\n// dd($data);\n // Get the transaction from your DB using the transaction reference (txref)\n $payment = Payment::where('pageant_id', request()->txref)->latest()->first();\n $payment->callback_dump = print_r($data, true);\n // Check if you have previously given value for the transaction. If you have, redirect to your success page else, continue\n if (is_null($payment->paid_at)) {\n if ($data->data->chargecode == 00 || $data->data->chargecode == 0 && $data->data->currency == $payment->currency && $data->data->amount == $payment->amount) {\n $payment->paid_at = now();\n Contestant::where('pageant_id', $payment->pageant_id)->first()->update([\n 'paid_at' => $payment->paid_at,\n 'amount_paid' => $data->data->amount\n ]);\n $payment->save();\n return redirect()->route('contestant-profile', ['pageant_id' => $payment->pageant_id])->withFlashSuccess('Registration and payment was successful!');\n } else {\n return redirect()->route('contest-registration')->withFlashDanger('Payment was not completed');\n }\n } else {\n return redirect()->route('contestant-profile', ['pageant_id' => $payment->pageant_id])->withFlashSuccess('Registration and payment was successful!');\n }\n // Comfirm that the transaction is successful\n // Confirm that the chargecode is 00 or 0\n // Confirm that the currency on your db transaction is equal to the returned currency\n // Confirm that the db transaction amount is equal to the returned amount\n // Update the db transaction record (including parameters that didn't exist before the transaction is completed. for audit purpose)\n // Give value for the transaction\n // Update the transaction to note that you have given value for the transaction\n // You can also redirect to your success page from here\n\n }", "title": "" }, { "docid": "3e67c5be6e21f1443c849d65c3930392", "score": "0.49158415", "text": "public function returnAction() \r\n\t\t{\r\n\t\t\t$oIdealcheckoutcartebleueModel = Mage::getSingleton('idealcheckoutcartebleue/idealcheckoutcartebleue');\r\n\r\n\t\t\t$sOrderId = $this->getRequest()->get('order_id');\r\n\t\t\t$sOrderCode = $this->getRequest()->get('order_code');\r\n\r\n\r\n\t\t\tif($oIdealcheckoutcartebleueModel->validatePayment($sOrderId, $sOrderCode))\r\n\t\t\t{ \r\n\t\t\t\t$this->_redirect('checkout/onepage/success', array('_secure' => true));\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t$this->_redirect('checkout/cart');\r\n\t\t\t} \r\n\t\t}", "title": "" }, { "docid": "3646662f055ebe1d0b94cbc37776cab1", "score": "0.49128208", "text": "public function authorizePayment($data) {\n\t\t$data['transaction_type'] = 'AUTH_ONLY';\n\t\tif ($result = $this->save($data)) {\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4b0f8fb454dd92fbea22a1e7491db613", "score": "0.49089316", "text": "function handlePayment() {\n\t\tif (!$this->validateAddress('delivery')) return $this->getDeliveryAddress();\n\t\tif (!$this->validateAddress('billing')) return $this->getBillingAddress();\n\t\t\n\t\t\n\t\t$sysConfig = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['SYSPRODUCTS']['PAYMENT'];\n\t\t\n\t\t// currently set the payment type to fixed value for DEVELOPEMENT\n\t\t$paymentType = $this->getPaymentType();\n\t\t\n\t\t$template = $this->cObj->getSubpart($this->templateCode, '###PAYMENT###');\n\t\t\n\t\t// fill some standard markers\n\t\t$markerArray['###PAYMENT_TITLE###'] = $this->pi_getLL('payment_title');\n\t\t$markerArray['###PAYMENT_DESCRIPTION###'] = $this->pi_getLL('payment_description');\n\t\t$markerArray['###PAYMENT_DISCLAIMER###'] = $this->pi_getLL('general_disclaimer') .'<br />' .$this->pi_getLL('payment_disclaimer');;\n\t\t\n\t\t\n\t\t$config = $sysConfig['types'][strtolower((string)$paymentType)];\n\t\t\t\t\n\t\tif (!isset($config['class']) || !file_exists($config['path'])) die ('No payment possible because I don\\'t know how to handle it!');\n\t\t\n\t\trequire_once($config['path']);\n\t\t$paymentObj = t3lib_div::makeInstance($config['class']);\n\t\t\n\t\t\n\t\t\n\t\tif (\n\t\t\t$paymentObj->needAdditionalData() && (\n\t\t\t\t(isset($this->MYSESSION['payment']) && !$paymentObj->proofData($this->MYSESSION['payment'])) ||\n\t\t\t\t(!isset($this->MYSESSION['payment']))\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// merge local lang array\n\t\t\t\tif (is_array($this->LOCAL_LANG) && isset($paymentObj->LOCAL_LANG)) {\n\t\t\t\t\tforeach ($this->LOCAL_LANG as $llKey => $llData) {\n\t\t\t\t\t\t$newLLData = array_merge($llData, $paymentObj->LOCAL_LANG[$llKey]);\n\t\t\t\t\t\t$this->LOCAL_LANG[$llKey] = $newLLData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// show the payment form if it's needed\n\t\t\t\t$paymentForm = '<form name=\"paymentForm\" action=\"\" method=\"post\">';\n\t\t\t\t$paymentForm .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[step]\" value=\"listing\" />';\n\t\t\t\t\t\n\t\t\t\t$paymentConfig = $this->conf['payment.'];\n\t\t\t\t$paymentConfig['sourceFields.'] = $paymentObj->getAdditonalFieldsConfig();\n\t\t\t\t$paymentForm .= $this->getInputForm($paymentConfig, 'payment', false);\n\t\t\t\t\n\t\t\t\t$markerArray['###PAYMENT_FORM_FIELDS###'] = $paymentForm;\n\t\t\t\t$markerArray['###PAYMENT_FORM_SUBMIT###'] = '<input type=\"submit\" value=\"' .$this->pi_getLL('payment_submit') .'\" /></form>';\n\t\t} else {\n\t\t\t// redirect to the next page because no additonal payment information are needed or if anything is correct\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t * Hook for processing Marker Array\n\t\t * Inspired by tt_news\n\t\t * @since 21.01.2006\n\t\t * \n\t\t */\n\t\t$hookObjectsArr = array();\n\t\tif (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['handlePayment'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['handlePayment'] as $classRef) {\n\t\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t}\n\t\t}\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'ProcessMarker')) {\n\t\t\t\t$markerArray=$hookObj->ProcessMarker($markerArray,$this);\n\t\t\t}\n\t\t}\n\t\treturn $this->cObj->substituteMarkerArray($template, $markerArray);\n\t\t\n\t}", "title": "" }, { "docid": "c7b4e58a10fe47c4161723e197fd6ada", "score": "0.49034864", "text": "public function updateOrder() {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n return true;\n }\n \n //Put Order Post Data in the database\n $this -> order -> crud -> setPaymentFirstName($this -> postVar(\"first_name\"));\n $this -> order -> crud -> setPaymentLastName($this -> postVar(\"last_name\"));\n $this -> order -> crud -> setPaymentEmail($this -> postVar(\"email\"));\n $this -> order -> crud -> setPaymentBAddr1($this -> postVar(\"b_address1\"));\n $this -> order -> crud -> setPaymentBAddr2($this -> postVar(\"b_address2\"));\n $this -> order -> crud -> setPaymentBCity($this -> postVar(\"b_city\"));\n $this -> order -> crud -> setPaymentBState($this -> postVar(\"b_state\"));\n $this -> order -> crud -> setPaymentBZipcode($this -> postVar(\"b_zipcode\"));\n $this -> order -> crud -> setPaymentBCountry('US');\n if ( $this -> postVar(\"host_invite_count\") ) {\n $this -> order -> crud -> setPaymentInvites( $this -> postVar(\"host_invite_count\") );\n }\n if ( $this -> postVar(\"invite_count\") ) {\n $this -> order -> crud -> setPaymentInvites( $this -> postVar(\"invite_count\") );\n }\n if ($this -> postVar(\"setup_price\")) {\n $this -> order -> crud -> setPaymentAmount($this -> postVar(\"setup_price\"));\n }\n\t\t//Add some special items\n $this -> order -> crud -> setPaymentLastFourCcDigits( right($this -> postVar(\"credit_card_number\"),4) );\n $this -> order -> crud -> setPaymentCcExp( sprintf(\"%02d\",$this -> postVar(\"expiration_date_month\")).$this -> postVar(\"expiration_date_year\") );\n \n //We are not saving CVV2 for the upcoming transaction, and are required to delete later by PCI DSS\n //$this -> crud -> setPaymentCvv2( $this -> postVar(\"card_verification_number\") );\n \n $this -> order -> crud -> save();\n \n if ($this -> order -> orderuser -> getUserEmail() == \"\") {\n $this -> order -> orderuser -> setUserEmail($this -> postVar(\"email\"));\n $this -> order -> orderuser -> save();\n $solr = new SolrManager_PageWidget(null, null, $this -> context);\n $solr -> execute(\"add\",\"user\",$this -> order -> orderuser -> getUserId());\n }\n \n }", "title": "" }, { "docid": "2629872c1fcf60d1b97c1ff2782f4944", "score": "0.48995763", "text": "function process_payment($order_id){\n if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) ) {\n $order = &new WC_Order($order_id);\n } else {\n $order = &new woocommerce_order($order_id);\n }\n return array('result' => 'success', 'redirect' => add_query_arg('order',\n $order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))))\n );\n }", "title": "" }, { "docid": "603aac06768ab12681a37639e0613f23", "score": "0.48987928", "text": "function custom_pmpro_order_create_hack($user_id_x){\n\t/*$user_id_x = '9';*/\n\tglobal $post, $gateway, $wpdb, $besecure, $discount_code, $discount_code_id, $pmpro_level, $pmpro_levels, $pmpro_msg, $pmpro_msgt, $pmpro_review, $skip_account_fields, $pmpro_paypal_token, $pmpro_show_discount_code, $pmpro_error_fields, $pmpro_required_billing_fields, $pmpro_required_user_fields, $wp_version, $current_user, $pmpro_requirebilling, $tospage, $username, $password, $password2, $bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail, $bconfirmemail, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear, $pmpro_states, $recaptcha, $recaptcha_privatekey, $CVV;\n\n\t$level_id_x = '';\n\tif(empty($user_id_x)) return array('status'=>'fail','code'=>404);\n\t$mem_level = pmpro_getMembershipLevelForUser( $user_id_x, true ); \n\t// print_r($mem_level);\n\tif($mem_level){\n\t\t$level_id_x = $mem_level->id;\n\t}\n\tif(empty($level_id_x)){\n\t\t$level_id_x = get_last_level_id($user_id_x);\n\t\tif(empty($level_id_x)){\n\t\t\t$result = array('status'=>'fail','code'=>403);\n\t\t\treturn $result;\n\t\t}\n\t}\n\t// return $mem_level;\n\t$pmpro_level_x = new PMPro_Membership_Level( $level_id_x );\n\t$bemail = get_user_meta( $user_id_x, 'pmpro_bemail', true );\n\t$doit = new PMProGateway_stripe();\n\t$user_data = get_user_by( 'ID', $user_id_x );\n\t$stripe_cid = '';\n\t$payment_method_id_x = '';\n\tif(get_user_meta( $user_id_x, 'pmpro_stripe_customerid', true )){\n\t\t$stripe_cid = get_user_meta( $user_id_x, 'pmpro_stripe_customerid', true );\n\n\t\t$payment_method_id_x = $doit->get_payment_method_id_by_custom_id( $stripe_cid );\n\t\t$payment_method_id_x = 'pm_card_chargeDeclinedExpiredCard';\n\t}\n\t// // return;\n\t$morder = new MemberOrder();\n\t$morder->membership_id = $pmpro_level_x->id;\n\t$morder->membership_level = $pmpro_level_x->id;\n\t$morder->membership_name = $pmpro_level_x->name;\n\t$morder->discount_code = $discount_code;\n\t$morder->InitialPayment = pmpro_round_price( $pmpro_level_x->initial_payment );\n\t$morder->PaymentAmount = pmpro_round_price( $pmpro_level_x->billing_amount );\n\t$morder->ProfileStartDate = date_i18n( \"Y-m-d\", current_time( \"timestamp\" ) ) . \"T0:0:0\";\n\t$morder->BillingPeriod = $pmpro_level_x->cycle_period;\n\t$morder->BillingFrequency = $pmpro_level_x->cycle_number;\n\t$morder->code = $morder->getRandomCode();\n\tif ( $pmpro_level_x->billing_limit ) {\n\t\t$morder->TotalBillingCycles = $pmpro_level_x->billing_limit;\n\t}\n\tif ( pmpro_isLevelTrial( $pmpro_level_x ) ) {\n\t\t$morder->TrialBillingPeriod = $pmpro_level_x->cycle_period;\n\t\t$morder->TrialBillingFrequency = $pmpro_level_x->cycle_number;\n\t\t$morder->TrialBillingCycles = $pmpro_level_x->trial_limit;\n\t\t$morder->TrialAmount = pmpro_round_price( $pmpro_level_x->trial_amount );\n\t}\n\n\t// Not saving email in order table, but the sites need it.\n\t$morder->Email = $user_data->user_email;\n\t\n\t// Save the user ID if logged in.\n\tif ( $current_user->ID ) {\n\t\t$morder->user_id = $user_id_x;\n\t}\n\t\n\t// Sometimes we need these split up.\n\t$morder->FirstName = $user_data->first_name;\n\t$morder->LastName = $user_data->last_name;\n\t\n\t// Set other values.\n\t$morder->billing = new stdClass();\n\t$morder->billing->name = $user_data->first_name . \" \" . $user_data->last_name;\n\t$morder->setGateway();\n\t\n\t// // Set up level var.\n\t// $morder->getMembershipLevelAtCheckout();\n\t\n\t// Set tax.\n\t$initial_tax = $morder->getTaxForPrice( $morder->InitialPayment );\n\t\n\t// Set amounts.\n\t$morder->initial_amount = pmpro_round_price((float)$morder->InitialPayment + (float)$initial_tax);\n\t\n\t// Filter for order, since v1.8\n\t// $morder = apply_filters( 'pmpro_checkout_order', $morder );\n\n\t$morder->payment_method_id = $payment_method_id_x;\n\n\t$morder->done_by = 'admin';\n\t\n\t// get_payment_method_id_by_custom_id();\n\t$paydoit = $doit->process_charges($morder);\n\tif($morder->error_type){\n\t\tif( $morder->error_type == 'Your card has expired.' ){\n\t\t\tsend_card_update_mail($user_data, $level_id_x);\n\t\t\tupdate_user_meta( $user_id_x, 'membership_card_state', 'expired' );\n\t\t}else{\n\t\t\tsend_card_update_mail($user_data, $level_id_x);\n\t\t\tupdate_user_meta( $user_id_x, 'membership_card_state', 'expired' );\t\t\t\n\t\t}\n\t\t$result = array('status'=>'fail','code'=>302);\n\t\treturn $result;\n\t}else{\n\t\tupdate_user_meta( $user_id_x, 'membership_card_state', '' );\n\t\tdelete_user_meta( $user_id_x, 'membership_card_state' );\n\t}\n\n\t$startdate = current_time( \"mysql\" );\n\t$startdate = apply_filters( \"pmpro_checkout_start_date\", $startdate, $user_id_x, $pmpro_level_x );\n\n\tif ( ! empty( $pmpro_level_x->expiration_number ) ) {\n\t\t$enddate = date( \"Y-m-d H:i:s\", strtotime( \"+ \" . $pmpro_level_x->expiration_number . \" \" . $pmpro_level_x->expiration_period, current_time( \"timestamp\" ) ) );\n\t} else {\n\t\t$enddate = \"NULL\";\n\t}\n\n\t$enddate = apply_filters( \"pmpro_checkout_end_date\", $enddate, $user_id_x, $pmpro_level_x, $startdate );\n\n\t$custom_level = array(\n\t\t\t'user_id' => $user_id_x,\n\t\t\t'membership_id' => $pmpro_level_x->id,\n\t\t\t'code_id' => '',\n\t\t\t'initial_payment' => pmpro_round_price( $pmpro_level_x->initial_payment ),\n\t\t\t'billing_amount' => pmpro_round_price( $pmpro_level_x->billing_amount ),\n\t\t\t'cycle_number' => $pmpro_level_x->cycle_number,\n\t\t\t'cycle_period' => $pmpro_level_x->cycle_period,\n\t\t\t'billing_limit' => $pmpro_level_x->billing_limit,\n\t\t\t'trial_amount' => pmpro_round_price( $pmpro_level_x->trial_amount ),\n\t\t\t'trial_limit' => $pmpro_level_x->trial_limit,\n\t\t\t'startdate' => $startdate,\n\t\t\t'enddate' => $enddate\n\t\t);\n\n\tif ( pmpro_changeMembershipLevel( $custom_level, $user_id_x, 'changed' ) ) {\n\t\t//we're good\n\t\t//blank order for free levels\n\t\tif ( empty( $morder ) ) {\n\t\t\t$morder = new MemberOrder();\n\t\t\t$morder->InitialPayment = 0;\n\t\t\t$morder->Email = $bemail;\n\t\t\t$morder->gateway = 'free';\n\t\t\t$morder->status\t\t\t= 'success';\n\t\t\t$morder = apply_filters( \"pmpro_checkout_order_free\", $morder );\n\t\t}\n\n\t\t//add an item to the history table, cancel old subscriptions\n\t\tif ( ! empty( $morder ) ) {\n\t\t\t$morder->user_id = $user_id_x;\n\t\t\t$morder->membership_id = $pmpro_level_x->id;\n\t\t\t$morder->saveOrder();\n\t\t}\n\n\t\t//show the confirmation\n\t\t$ordersaved = true;\n\n\t\tdo_action( \"pmpro_after_checkout\", $user_id_x, $morder );\n\t\t$sendemails = apply_filters( \"pmpro_send_checkout_emails\", true);\n\n\t\tif($sendemails) { // Send the emails only if the flag is set to true\n\n\t\t\t//setup some values for the emails\n\t\t\tif ( ! empty( $morder ) ) {\n\t\t\t\t$invoice = new MemberOrder( $morder->id );\n\t\t\t} else {\n\t\t\t\t$invoice = null;\n\t\t\t}\n\t\t\t$user_data->membership_level = $pmpro_level_x; //make sure they have the right level info\n\n\t\t\t//send email to member\n\t\t\t$pmproemail = new PMProEmail();\n\t\t\t$pmproemail->sendCheckoutEmail( $user_data, $invoice );\n\n\t\t\t//send email to admin\n\t\t\t$pmproemail = new PMProEmail();\n\t\t\t$pmproemail->sendCheckoutAdminEmail( $user_data, $invoice );\n\t\t}\n\n\t}\n\n\t$result = array('status'=>'success','code'=>201);\n\treturn $result;\n}", "title": "" }, { "docid": "0868ce1085c6bf424988d6203ebaece9", "score": "0.48940194", "text": "public function rechargeAction()\n {\n $order = null;\n\n try {\n\n $helper = Mage::helper('xpaymentsconnector');\n\n $order = $this->getOrder();\n\n $cardData = Mage::getModel('xpaymentsconnector/usercards')->load(\n $this->getRequest()->getParam('card_id')\n )->getData();\n\n $helper->saveMaskedCardToOrder($order, $cardData);\n $order->setData('xpc_txnid', $cardData['txnId'])->save();\n \n $paymentMethod = $order->getPayment()->getMethodInstance();\n\n $quote = Mage::getModel('xpaymentsconnector/quote')->load($order->getQuoteId())\n ->setXpcSlot($paymentMethod->getXpcSlot());\n\n // For some reason quote is empty here. But we actually need only its ID.\n // All the necessary data is taken from the quote XPC data\n $quote->setEntityId($order->getQuoteId());\n\n $quote->getXpcData()->setData('backend_orderid', $order->getIncrementId())->save();\n\n $response = $paymentMethod->processPayment($quote);\n\n $this->processResponseAndRedirect(\n $response,\n 'Order was paid',\n 'Order was not paid'\n );\n\n } catch (Exception $exception) {\n\n $this->processExceptionAndRedirect($exception, $order);\n }\n }", "title": "" }, { "docid": "87fce287085f47c37b0862bf776b05a9", "score": "0.4883526", "text": "public function acceptReturnAction() {\n\t\t// IF $this->memberID has permission to accept return for order item\n\t\t\t// IF process OrderItemProcess::acceptReturn($orderItemID) successful\n\t\t\t\t// pass success to view\n\t\t\t// ELSS (process failure)\n\t\t\t\t// process failure\n\t\t// ELSE (no permission)\n\t\t\t// process failure\n\t}", "title": "" }, { "docid": "105193be86d524022a778d4478e7d7fc", "score": "0.48796567", "text": "function cp_payments_handle_membership_activated( $order ) {\n\n\t// include all the functions needed for this action\n\trequire_once( get_template_directory() . '/includes/forms/step-functions.php' );\n\n\tforeach ( $order->get_items( CP_ITEM_MEMBERSHIP ) as $item ) {\n\t\t$user = get_user_by( 'id', $order->get_author() );\n\t\t$membership_orders = get_user_orders( $user->ID, false );\n\t\tif ( empty( $membership_orders ) )\n\t\t\tcontinue;\n\n\t\t$order_id = get_order_id( $membership_orders[0] );\n\t\t$stored_order = get_option( $membership_orders[0] );\n\t\t$order_processed = appthemes_process_membership_order( $user, $stored_order );\n\t\tif ( $order_processed )\n\t\t\tcp_owner_activated_membership_email( $user, $order_processed );\n\t}\n\n}", "title": "" }, { "docid": "a953b93e436ed6049366c9f262360c7c", "score": "0.48757565", "text": "function custom_pmpro_order_create_hack_by_check($user_id_x){\n\tglobal $post, $gateway, $wpdb, $besecure, $discount_code, $discount_code_id, $pmpro_level, $pmpro_levels, $pmpro_msg, $pmpro_msgt, $pmpro_review, $skip_account_fields, $pmpro_paypal_token, $pmpro_show_discount_code, $pmpro_error_fields, $pmpro_required_billing_fields, $pmpro_required_user_fields, $wp_version, $current_user, $pmpro_requirebilling, $tospage, $username, $password, $password2, $bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail, $bconfirmemail, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear, $pmpro_states, $recaptcha, $recaptcha_privatekey, $CVV;\n\n\t$level_id_x = '';\n\t// $user_id_x = '2';\n\tif(empty($user_id_x)) return array('status'=>'fail','code'=>404);\n\t$mem_level = pmpro_getMembershipLevelForUser( $user_id_x, true ); \n\t// print_r($mem_level);\n\tif($mem_level){\n\t\t$level_id_x = $mem_level->id;\n\t}\n\tif(empty($level_id_x)){\n\t\t$level_id_x = get_last_level_id($user_id_x);\n\t\tif(empty($level_id_x)){\n\t\t\t$result = array('status'=>'fail','code'=>403);\n\t\t\treturn $result;\n\t\t}\n\t}\n\t// return $mem_level;\n\t$pmpro_level_x = new PMPro_Membership_Level( $level_id_x );\n\t$bemail = get_user_meta( $user_id_x, 'pmpro_bemail', true );\n\t$doit = new PMProGateway('check');\n\t$user_data = get_user_by( 'ID', $user_id_x );\n\t\n\t// // return;\n\t$morder = new MemberOrder();\n\t$morder->membership_id = $pmpro_level_x->id;\n\t$morder->membership_level = $pmpro_level_x->id;\n\t$morder->membership_name = $pmpro_level_x->name;\n\t$morder->discount_code = $discount_code;\n\t$morder->InitialPayment = pmpro_round_price( $pmpro_level_x->initial_payment );\n\t$morder->PaymentAmount = pmpro_round_price( $pmpro_level_x->billing_amount );\n\t$morder->ProfileStartDate = date_i18n( \"Y-m-d\", current_time( \"timestamp\" ) ) . \"T0:0:0\";\n\t$morder->BillingPeriod = $pmpro_level_x->cycle_period;\n\t$morder->BillingFrequency = $pmpro_level_x->cycle_number;\n\t$morder->payment_type = 'Check';\n\tif ( $pmpro_level_x->billing_limit ) {\n\t\t$morder->TotalBillingCycles = $pmpro_level_x->billing_limit;\n\t}\n\tif ( pmpro_isLevelTrial( $pmpro_level_x ) ) {\n\t\t$morder->TrialBillingPeriod = $pmpro_level_x->cycle_period;\n\t\t$morder->TrialBillingFrequency = $pmpro_level_x->cycle_number;\n\t\t$morder->TrialBillingCycles = $pmpro_level_x->trial_limit;\n\t\t$morder->TrialAmount = pmpro_round_price( $pmpro_level_x->trial_amount );\n\t}\n\n\t// Not saving email in order table, but the sites need it.\n\t$morder->Email = $user_data->user_email;\n\t\n\t// Save the user ID if logged in.\n\tif ( $current_user->ID ) {\n\t\t$morder->user_id = $user_id_x;\n\t}\n\t\n\t// Sometimes we need these split up.\n\t$morder->FirstName = $user_data->first_name;\n\t$morder->LastName = $user_data->last_name;\n\t\n\t// Set other values.\n\t$morder->billing = new stdClass();\n\t$morder->billing->name = $user_data->first_name . \" \" . $user_data->last_name;\n\t$morder->setGateway('check');\n\t\n\t// // Set up level var.\n\t// $morder->getMembershipLevelAtCheckout();\n\t\n\t// Set tax.\n\t$initial_tax = $morder->getTaxForPrice( $morder->InitialPayment );\n\t\n\t// Set amounts.\n\t$morder->initial_amount = pmpro_round_price((float)$morder->InitialPayment + (float)$initial_tax);\n\t\n\t// Filter for order, since v1.8\n\t// $morder = apply_filters( 'pmpro_checkout_order', $morder );\n\n\t// $morder->payment_method_id = $payment_method_id_x;\n\n\t$morder->done_by = 'admin';\n\t\n\t\n\t// get_payment_method_id_by_custom_id();\n\t$paydoit = $doit->process($morder);\n\t\n\t$startdate = current_time( \"mysql\" );\n\t$startdate = apply_filters( \"pmpro_checkout_start_date\", $startdate, $user_id_x, $pmpro_level_x );\n// print_r($pmpro_level_x);\n\tif ( ! empty( $pmpro_level_x->expiration_number ) ) {\n\t\t$enddate = date( \"Y-m-d H:i:s\", strtotime( \"+ \" . $pmpro_level_x->expiration_number . \" \" . $pmpro_level_x->expiration_period, current_time( \"timestamp\" ) ) );\n\t} else {\n\t\t$enddate = \"NULL\";\n\t}\n\n\t$enddate = apply_filters( \"pmpro_checkout_end_date\", $enddate, $user_id_x, $pmpro_level_x, $startdate );\n\n\t$custom_level = array(\n\t\t\t'user_id' => $user_id_x,\n\t\t\t'membership_id' => $pmpro_level_x->id,\n\t\t\t'code_id' => '',\n\t\t\t'initial_payment' => pmpro_round_price( $pmpro_level_x->initial_payment ),\n\t\t\t'billing_amount' => pmpro_round_price( $pmpro_level_x->billing_amount ),\n\t\t\t'cycle_number' => $pmpro_level_x->cycle_number,\n\t\t\t'cycle_period' => $pmpro_level_x->cycle_period,\n\t\t\t'billing_limit' => $pmpro_level_x->billing_limit,\n\t\t\t'trial_amount' => pmpro_round_price( $pmpro_level_x->trial_amount ),\n\t\t\t'trial_limit' => $pmpro_level_x->trial_limit,\n\t\t\t'startdate' => $startdate,\n\t\t\t'enddate' => $enddate\n\t\t);\n// print_r($custom_level);\n// die;\n\tif ( pmpro_changeMembershipLevel( $custom_level, $user_id_x, 'changed' ) ) {\n\t\t//we're good\n\t\t//blank order for free levels\n\t\tif ( empty( $morder ) ) {\n\t\t\t$morder = new MemberOrder();\n\t\t\t$morder->InitialPayment = 0;\n\t\t\t$morder->Email = $bemail;\n\t\t\t$morder->gateway = 'free';\n\t\t\t$morder->status\t\t\t= 'success';\n\t\t\t$morder = apply_filters( \"pmpro_checkout_order_free\", $morder );\n\t\t}\n\n\t\t//add an item to the history table, cancel old subscriptions\n\t\tif ( ! empty( $morder ) ) {\n\t\t\t$morder->user_id = $user_id_x;\n\t\t\t$morder->membership_id = $pmpro_level_x->id;\n\t\t\t$morder->saveOrder();\n\t\t}\n\n\t\t//show the confirmation\n\t\t$ordersaved = true;\n\n\t\tdo_action( \"pmpro_after_checkout\", $user_id_x, $morder );\n\t\t$sendemails = apply_filters( \"pmpro_send_checkout_emails\", true);\n\n\t\tif($sendemails) { // Send the emails only if the flag is set to true\n\n\t\t\t//setup some values for the emails\n\t\t\tif ( ! empty( $morder ) ) {\n\t\t\t\t$invoice = new MemberOrder( $morder->id );\n\t\t\t} else {\n\t\t\t\t$invoice = null;\n\t\t\t}\n\t\t\t$user_data->membership_level = $pmpro_level_x; //make sure they have the right level info\n\n\t\t\t//send email to member\n\t\t\t$pmproemail = new PMProEmail();\n\t\t\t$pmproemail->sendCheckoutEmail( $user_data, $invoice );\n\n\t\t\t//send email to admin\n\t\t\t$pmproemail = new PMProEmail();\n\t\t\t$pmproemail->sendCheckoutAdminEmail( $user_data, $invoice );\n\t\t}\n\n\t}\n\n\t$result = array('status'=>'success','code'=>201);\n\treturn $result;\n}", "title": "" }, { "docid": "9ebb6e2956c71858fee2da327cde00ae", "score": "0.4874708", "text": "public function revoke_referral_on_refund_and_cancel() {\n\n\t\tif( ! isset( $_REQUEST['save'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! isset( $_REQUEST['order'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! isset( $_REQUEST['status'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! isset( $_REQUEST['membership_id'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( 'refunded' != $_REQUEST['status'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! affiliate_wp()->settings->get( 'revoke_on_refund' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->reject_referral( absint( $_REQUEST['order'] ) );\n\n\t}", "title": "" }, { "docid": "e347ef07b50223fb7238fd564e258f6a", "score": "0.48722953", "text": "public function restored(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "2efd6a5f98075134eefbd3c6b2538fe8", "score": "0.48718068", "text": "abstract public function getPayment();", "title": "" }, { "docid": "a20cf80947777127797f5a0915652828", "score": "0.48692685", "text": "function adext_payment_completed_notify_user( WP_Post $payment ) {\r\n \r\n}", "title": "" }, { "docid": "f8a173814873e7f7106b8c66877c747a", "score": "0.4862346", "text": "public function beanstream_authorize_payment($params)\n\t{\n\t\t$this->_api_method = array('trnType' => 'PA');\n\t\t$this->_build_request($params);\t\t\n\t\treturn $this->_handle_query();\t\n\t}", "title": "" }, { "docid": "1046a295e46d02e3ae214c90303ac64f", "score": "0.4857272", "text": "public function payment_method() {\n\t\t$this->loadModel('PaymentMethod');\n\t\t$userId = $this->Auth->user('id');\n\t\t$paymentDetails = $this->PaymentMethod->findAllByUserId($userId);\n\t\t$options = array('conditions' => array('User.' . $this->User->primaryKey => $userId));\n\t\t$userDetails = $this->User->find('first', $options);\n\t\t$errors = array();\n\n\t\t// Encrypt some data.\n\t\t$encrypted = $this->Paypal->encrypt($this->Auth->user('id'));\n\n\t\tif ($this->request->is(array('post', 'put')))\n\t\t{\n\t\t\t$this->request->data['User']['id'] = $userId;\n\t\t\tif(($this->request->data['User']['paypal_id'] != $userDetails['User']['paypal_id']) || $userDetails['User']['is_paypal_verified']==0)\n\t\t\t{\n\t\t\t\t$detailsAre['emailAddress'] = $this->request->data['User']['paypal_id'];\n\t\t\t\t$detailsAre['firstName'] = $this->request->data['User']['paypal_name'];\n\t\t\t\t$detailsAre['lastName'] = $this->request->data['User']['paypal_lname'];\n\t\t\t\t$detailsAre['matchCriteria'] = \"NAME\";\n\t\t\t\t$detailsAre['requestEnvelope.errorLanguage'] = \"en_US\";\n\t\t\t\t$detailsAre['requestEnvelope.detailLevel'] = \"ReturnAll\";\n\n\t\t\t\t$url = 'https://svcs.paypal.com/AdaptiveAccounts/GetVerifiedStatus';\n\t\t\t\t$getExpData = $this->Paypal->pay_me($detailsAre,$url);\n\t\t\t\t//pr($getExpData); exit;\n\t\t\t\tif(isset($getExpData->responseEnvelope->ack) && $getExpData->responseEnvelope->ack=='Success')\n\t\t\t\t{\n\t\t\t\t\t$this->request->data['User']['is_paypal_verified'] = 1;\n\t\t\t\t\t$this->Session->setFlash(__('Your paypal account is successfully verified.'),'success');\n\t\t\t\t}\n\t\t\t\telse if(isset($getExpData->responseEnvelope->ack) && $getExpData->responseEnvelope->ack=='Failure')\n\t\t\t\t{\n\t\t\t\t\t$errors[] = array(0=>$getExpData->error[0]->message);\n\t\t\t\t\t$paypalConfirmation['User']['id'] = $userId;\n\t\t\t\t\t$paypalConfirmation['User']['is_paypal_verified'] = 0;\n\t\t\t\t\t$this->request->data['User']['is_paypal_verified'] = 0;\n\t\t\t\t\t$paypalConfirmation['User']['paypal_id'] = $this->request->data['User']['paypal_id'];\n\t\t\t\t\t$paypalConfirmation['User']['paypal_name'] = $this->request->data['User']['paypal_name'];\n\t\t\t\t\t$paypalConfirmation['User']['paypal_lname'] = $this->request->data['User']['paypal_lname'];\n\t\t\t\t\t$this->User->save($paypalConfirmation);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->User->set($this->request->data);\n\t\t\t$AccountStatus = 0;\n\t\t\t$recieveAccountInfo = 0;\n\t\t\tif ($this->User->validates())\n\t\t\t{\n\t\t\t\tif(empty($errors)){\n\t\t\t\t\tif ($this->User->save()) {\n\t\t\t\t\t\t$this->Session->setFlash(__('The payment method has been saved.'),'success');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Session->setFlash(__('The payment method could not be saved. Please, try again.'),'error');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->set('errors',$errors);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$errors = $this->User->validationErrors;\n\t\t\t\t$this->set('errors',$errors);\n\t\t\t\t// handle errors\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$checkSession = $this->Session->read('stripeArray');\n\t\t\tif(isset($checkSession['status']))\n\t\t\t{\n\t\t\t\tif($checkSession['status']==1)\n\t\t\t\t\t$this->Session->setFlash($checkSession['message'],'success');\n\t\t\t\telse\n\t\t\t\t\t$this->Session->setFlash($checkSession['message'],'error');\n\t\t\t}\n\n\t\t\t$options = array('conditions' => array('User.' . $this->User->primaryKey => $userId));\n\t\t\t$this->request->data = $userDetails;\n\t\t}\n\t\t$this->set(compact(array('paymentDetails','encrypted')));\n\t}", "title": "" }, { "docid": "ba10f33ebbcbf100c39b70869b033751", "score": "0.48504", "text": "public function ccavenuPayment()\n {\n try\n {\n $workingKey='A087123D0EA8318575EA3EDDDF177F7E'; //Working Key should be provided here.\n $encResponse=$_POST[\"encResp\"]; //This is the response sent by the CCAvenue Server\n $rcvdString=$this->decrypt($encResponse,$workingKey); //Crypto Decryption used as per the specified working key.\n $order_status=\"\";\n $decryptValues=explode('&', $rcvdString);\n $dataSize=sizeof($decryptValues);\n //echo \"<center>\";\n $data=array();\n \n for($i = 0; $i < $dataSize; $i++) \n {\n $information=explode('=',$decryptValues[$i]);\n $data[$information[0]]=$information[1];\n if($i==3) $order_status=$information[1];\n }\n\n if($order_status===\"Success\")\n {\n //echo \"<br>Thank you for shopping with us. Your credit card has been charged and your transaction is successful. We will be shipping your order to you soon.\";\n $paid_amount=$data['amount'];\n $order_id=$data['order_id'];\n $tracking_id=$data['tracking_id'];\n $rideid=$data['merchant_param1'];\n $offerType=\"create\";\n $userid=$data['merchant_param3'];\n\n //change status of ride from 1 to 0..\n $updateStatus=DB::table('rides')->where('id',$rideid)->where('userId',$userid)->update(['status'=>0,'order_id'=>$order_id,'tracking_id'=>$tracking_id,'paid_amount'=>$paid_amount]);\n \n //add amount 27.5 in admin wallet...\n DB::table('admin_wallet')->insert(['rideId'=>$rideid,\"userId\"=>$userid,\"amount\"=>$paid_amount,\"bookType\"=>$offerType,\"isDaily\"=>1]);\n //flash message set\n $message=\"Your transaction has been successfully completed.Your ride offered successfully.\";\n session()->flash('offersuccess',$message);\n //return redirect('/');\n\n }\n else if($order_status===\"Aborted\")\n {\n //echo \"<br>Thank you for shopping with us.We will keep you posted regarding the status of your order through e-mail\";\n $message=\"Your transaction has been Aborted.Please Try again to offer daily ride.\";\n session()->flash('offerfailure',$message);\n }\n else if($order_status===\"Failure\")\n {\n $message=\"Your transaction has been declined.Please Try again to offer daily ride.\";\n session()->flash('offerfailure',$message);\n //echo \"<br>Thank you for shopping with us.However,the transaction has been declined.\";\n }\n else\n {\n //echo \"<br>Security Error. Illegal access detected\";\n $message=\"Your transaction has been declined.Please Try again to offer daily ride.\";\n session()->flash('offerfailure',$message);\n }\n return redirect('/rideStatus');\n /*echo \"<br><br>\";\n\n echo \"<table cellspacing=4 cellpadding=4>\";\n for($i = 0; $i < $dataSize; $i++) \n {\n $information=explode('=',$decryptValues[$i]);\n echo '<tr><td>'.$information[0].'</td><td>'.$information[1].'</td></tr>';\n }\n\n echo \"</table><br>\";\n echo \"</center>\";*/\n }\n catch(\\Exception $e)\n {\n \\Log::error('createRide function error: ' . $e->getMessage());\n return view('errors.404');\n }\n }", "title": "" }, { "docid": "bed3ff2a902a316ae07efd05ee836e94", "score": "0.4849109", "text": "public function initiateRecurrentPayment() {\n\n $body = [\n \"tx_ref\" => $this->transaction_reference,\n \"amount\" => $this->amount,\n \"currency\" => $this->currency,\n \"redirect_url\" => $this->redirect_url,\n \"payment_options\" => $this->payment_options,\n \"meta\" => $this->meta,\n \"customer\" => $this->customer,\n \"customizations\" => $this->customizations,\n \"payment_plan\" => $this->payment_plan\n ];\n\n $response = $this->flutterwave->request->request(\"post\", \"payments\", $this->flutterwave->token, $body);\n\n return $response->responseBody;\n }", "title": "" }, { "docid": "6c4dd3c063c7f48a66b61ddcc56dbaa5", "score": "0.48405594", "text": "public function refund(Yourdelivery_Model_Order $order) {\n\n if ($order->isRefunded()) {\n return true;\n }\n\n $table = new Yourdelivery_Model_DbTable_Adyen_Transactions();\n $transactions = $table->getByOrder($order->getId());\n foreach ($transactions as $transaction) {\n\n //create soap request and refund all transaction associated with this order\n ini_set(\"soap.wsdl_cache_enabled\", \"0\"); // disabling WSDL cache \n\n $rr = new ModificationRequest();\n $rr->merchantAccount = $this->getConfig()->adyen->merchant;\n $rr->originalReference = $transaction->reference;\n\n $ro = new ModificationResult();\n\n $classmap = array(\n 'cancelOrRefund' => 'cancelOrRefund',\n 'ModificationRequest' => 'ModificationRequest',\n 'ModificationResult' => 'ModificationResult'\n );\n\n $soapClient = new SoapClient(APPLICATION_PATH . '/templates/adyen/Payment.wsdl', array(\n 'login' => \"[email protected]\",\n 'password' => \"W}#qp5*+bH47ETU}#Vh]D>?AU\",\n 'soap_version' => SOAP_1_1,\n 'style' => SOAP_DOCUMENT,\n 'encoding' => SOAP_LITERAL,\n 'location' => IS_PRODUCTION ? \"https://pal-live.adyen.com/pal/servlet/soap/Payment\" : \"https://pal-test.adyen.com/pal/servlet/soap/Payment\",\n 'trace' => false,\n 'classmap' => $classmap));\n\n try {\n $response = $soapClient->cancelOrRefund(array('modificationRequest' => $rr, 'captureResponse' => $ro));\n if ($response->cancelOrRefundResult->response == '[cancelOrRefund-received]') {\n $transaction->refunded = true;\n $transaction->refundedOn = date(DATETIME_DB);\n } \n $transaction->refundResponse = $response->cancelOrRefundResult->response;\n $transaction->save();\n return $response->cancelOrRefundResult->response;\n } catch (SoapFault $e) {\n $this->getLogger()->info(sprintf('ADYEN: Soaperror: %s for order(#%s)', $e->getMessage(), $order->getId()));\n return $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "6d636028582db6700186203cc9d7878f", "score": "0.483533", "text": "public function canReviewPayment()\n {\n }", "title": "" }, { "docid": "0b8e277a48ea6d9293c3861a50744b7b", "score": "0.48339275", "text": "public function callback() {\n $this->load->language('payment/etranzact');\n\n $error = '';\n\n if( isset($this->request->post['SUCCESS'])) {\n if( $this->request->post['SUCCESS'] == 0 ) {\n if( $this->request->get['oid'] && isset($this->request->get['conf'])) {\n $this->load->model('checkout/order');\n $this->load->library('encryption');\n\t\t\t\t\t\n\t\t $encryption = new Encryption($this->config->get('config_encryption'));\n\n\t\t $order_id = $encryption->decrypt(base64_decode($this->request->get['oid']));\n\n\t\t $this->load->model('checkout/order');\n\t\t\t\t\t\n $order_info = $this->model_checkout_order->getOrder($order_id);\n\n if((isset($order_info['payment_firstname']) && isset($order_info['payment_lastname'])) && strcmp($encryption->decrypt(base64_decode($this->request->get['conf'])),$order_info['payment_firstname'] . $order_info['payment_lastname']) == 0) {\n\t\t $this->model_checkout_order->confirm($order_id, $this->config->get('etranzact_order_status_id'));\n\t\t } else {\n\t\t $error = $this->language->get('text_unable');\n\t\t }\n\n\n }else {\n $error = $this->language->get('text_unable');\n }\n } else {\n $error = $this->language->get('text_declined');\n }\n } else{\n $error = $this->language->get('text_unable');\n }\n\n if( $error != '' ) {\n $this->data['heading_title'] = $this->language->get('text_failed');\n $this->data['text_message'] = sprintf($this->language->get('text_failed_message'), $error, HTTP_SERVER . 'index.php?route=information/contact');\n $this->data['button_continue'] = $this->language->get('button_continue');\n $this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';\n $this->template = $this->config->get('config_template'). '/template/common/success.tpl';\n $this->response->setOutput($this->render(TRUE),$this->config->get('config_compression'));\n\n } else {\n $this->redirect(HTTP_SERVER . 'index.php?route=checkout/success');\n }\n\n }", "title": "" }, { "docid": "3b1d60b9827a911a7ba0c48c91ef7048", "score": "0.48333168", "text": "function process_return() {\r\n\t\tif(!isset($this->response)) $this->response = array();\r\n\t\t\r\n\t\tif(isset($_GET['token']) && !empty($_GET['token'])) {\r\n\t\t\t$this->response = array();\r\n\t\t\t$end_point = $this->_get_endpoint();\r\n\t\t\t$secure =array(\r\n\t\t\t\t'USER' => $this->setting['username'],\t\r\n\t\t\t\t'PWD' => $this->setting['password'],\t\t\r\n\t\t\t\t'SIGNATURE' => $this->setting['signature'],\r\n\t\t\t\t'VERSION' => '65.1',\r\n\t\t\t\t);\r\n\t\t\t//REQUEST AND SHOW PAYMENT DETAILS:\r\n\t\t\tif(!isset($_POST['confirm_payment'])) { \t\r\n\t\t\t\t// security\t\r\n\t\t\t\t$post_data = array_merge($secure, array('TOKEN' => strip_tags($_GET['token']),'METHOD' => 'GetExpressCheckoutDetails'));\r\n\t\t\t\t\r\n\t\t\t\t//issue #1508\r\n\t\t\t\t$url_parsed = parse_url($end_point); \t\t\t\r\n\t\t\t\t// domain/host\r\n\t\t\t\t$domain = $url_parsed['host'];\r\n\t\t\t\t// headers\r\n\t\t\t\t$http_headers = array ('POST /cgi-bin/webscr HTTP/1.1\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Content-Type: application/x-www-form-urlencoded\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Host: '.$domain.'\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Connection: close\\r\\n\\r\\n');\t\t\t\r\n\t\t\t\t// post\t\t\t\t\r\n\t\t\t\t$http_response = mgm_remote_post($end_point, $post_data, array('headers'=>$http_headers,'timeout'=>30,'sslverify'=>false));\r\n\t\t\t\t// log\r\n\t\t\t\t// mgm_log($http_response, __FUNCTION__);\t\r\n\t\t\t\t// reset\r\n\t\t\t\t$this->response = array();\r\n\t\t\t\t// parse to array\r\n\t\t\t\tparse_str($http_response, $this->response);\r\n\t\t\t\t// log\r\n\t\t\t\t// mgm_log($this->response, __FUNCTION__);\r\n\t\t\t\t// $fields = mgm_http_build_query($data);\t\t\r\n\t\t\t\t// post\t\t\t\t\t\r\n\t\t\t\t// $this->_curl_post($end_point, $fields);\r\n\t\t\t\t//remove:\t\t\t\t\t\t\t\t\r\n\t\t\t\tif(isset($this->response['ACK']) && strtoupper($this->response['ACK']) == 'SUCCESS') {\r\n\t\t\t\t\tif($this->response['TOKEN'] == $_GET['token']) { //verified:\r\n\t\t\t\t\t\t//$this->response['INVNUM']: mgm transaction id;\t\t\t\t\t\t\r\n\t\t\t\t\t\t//SHOW PAYMENT DETAILS:\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html ='<form action=\"\" method=\"post\" class=\"mgm_form\" name=\"' . $this->code . '_payment_return_form\" id=\"' . $this->code . '_payment_return_form\">\r\n\t\t\t\t\t\t \t\t<input type=\"hidden\" name=\"custom\" value=\"'.$this->response['INVNUM'].'\">\r\n\t\t\t\t\t\t \t\t<input type=\"hidden\" name=\"payer_id\" value=\"'.$this->response['PAYERID'].'\">\r\n\t\t\t\t\t\t \t\t<input type=\"hidden\" name=\"token\" value=\"'.$this->response['TOKEN'].'\">\r\n\t\t\t\t\t\t \t\t<input type=\"hidden\" name=\"confirm_payment\" value=\"1\">';\r\n\t\t\t\t\t\t//show response fields:\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$html .= $this->_get_payment_fields($this->response);\t\t\t\t\t\r\n\t\t\t\t\t \t$html .= '</form>';\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t\t// return\t \r\n\t\t\t\t\t\techo $html;\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t//treat as error:\r\n\t\t\t\t\t\t$errors = __('Invalid Token', 'mgm');\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//treat as error:\r\n\t\t\t\t\t$errors = __('Unable to find transaction details', 'mgm');\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}elseif(!empty($_POST['confirm_payment']) && is_numeric($_POST['custom'])) {\r\n\t\t\t\t//PROCESS PAYMENT:\r\n\t\t\t\t\r\n\t\t\t\t//$_POST['custom']: mgm transaction id\r\n\t\t\t\t$transdata = $this->_get_transaction_passthrough($_POST['custom']);\t\t\t\t\r\n\t\t\t\t$pack = mgm_get_class('subscription_packs')->get_pack($transdata['pack_id']);\r\n\t\t\t\t$bp_types = array('d'=>'Day', 'w'=>'Week', 'm'=>'Month', 'y'=>'Year');\r\n\t\t\t\t$system_obj = mgm_get_class('system');\t\r\n\t\t\t\t$is_onetime = true;\r\n\r\n\t\t\t\t// user\r\n\t\t\t\tif( isset($transdata['user_id']) && (int)$transdata['user_id']>0){\r\n\t\t\t\t\t$user = get_userdata($transdata['user_id']);\r\n\t\t\t\t}\t\t\t\t\r\n\r\n\t\t\t\t$data = array();\r\n\t\t\t\t$data['TOKEN'] \t= urlencode($_POST['token']);\t\t\t\t\t\r\n\t\t\t\t$data['IPADDRESS'] = mgm_get_client_ip_address();\r\n\t\t\t\t$data['PAYMENTREQUEST_0_INVNUM'] = $_POST['custom'];//transaction ref id\t\r\n\r\n\t\t\t\t//issue #974\r\n\t\t\t\tif(is_numeric($this->setting['max_failed_payments'])){\r\n\t\t\t\t\t$max_failed_payments = round($this->setting['max_failed_payments']);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t$max_failed_payments = 3;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//mgm_log('max_failed_payments '.$max_failed_payments);\r\n\t\t\t\t\r\n\t\t\t\t//pack currency over rides genral setting currency - issue #1602\r\n\t\t\t\tif(!isset($pack['currency']) || empty($pack['currency'])){\r\n\t\t\t\t\t$pack['currency']=$this->setting['currency'];\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t//recurring:\r\n\t\t\t\tif($transdata['payment_type'] == 'subscription_purchase' && isset($transdata['num_cycles']) && $transdata['num_cycles'] != 1) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$data['METHOD'] \t\t\t= 'CreateRecurringPaymentsProfile';\r\n\t\t\t\t\t$data['PAYMENTACTION'] \t\t= 'Sale';\t\t\t\t\t\r\n\t\t\t\t\t$data['PROFILEREFERENCE'] \t= $_POST['custom'];\r\n\t\t\t\t\t$data['MAXFAILEDPAYMENTS'] \t= 1;\r\n\t\t\t\t\t$data['PROFILESTARTDATE'] \t= date(DATE_ATOM);// Mon, 15 Aug 2005 15:12:46 UTC\r\n\t\t\t\t\t$data['DESC'] \t\t\t\t= (isset($transdata['item_name']) ? $transdata['item_name'] : $system_obj->get_subscription_name($transdata));\t\t\r\n\t\t\t\t\t$data['CURRENCYCODE'] \t\t= $pack['currency'];\r\n\t\t\t\t\t$data['AMT'] \t\t \t\t= $transdata['cost'];\t\t\t\t\t\r\n\t\t\t\t\t$data['BILLINGPERIOD'] \t\t= $bp_types[ $transdata['duration_type'] ];\r\n\t\t\t\t\t$data['BILLINGFREQUENCY'] \t= $transdata['duration'];\r\n\t\t\t\t\t$data['TOTALBILLINGCYCLES'] = $transdata['num_cycles'];\r\n\t\t\t\t\tif($transdata['trial_on']) {\r\n\t\t\t\t\t\t$data['TRIALBILLINGPERIOD'] \t= $bp_types[ $transdata['trial_duration_type'] ];\r\n\t\t\t\t\t\t$data['TRIALBILLINGFREQUENCY'] \t= $transdata['trial_duration'];\r\n\t\t\t\t\t\t$data['TRIALAMT'] \t\t\t\t= $transdata['trial_cost'];\r\n\t\t\t\t\t\t$data['TRIALTOTALBILLINGCYCLES']= $transdata['trial_num_cycles'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$data['NOTIFYURL'] = $this->setting['notify_url'];\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_NOTIFYURL'] = $this->setting['notify_url'];\r\n\t\t\t\t\t//issue #974\r\n\t\t\t\t\t$data['MAXFAILEDPAYMENTS'] = $max_failed_payments;\r\n\r\n\t\t\t\t\t$data['INVNUM'] = $_POST['custom'];\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//address fields:\t\r\n\t\t\t\t\tif( isset($user) ){\r\n\t\t\t\t\t\t$data['SUBSCRIBERNAME'] = $user->display_name;\r\n\t\t\t\t\t\t$data['EMAIL'] = $user->email;\r\n\t\t\t\t\t\t$this->_set_address_fields($user, $data);\r\n\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t// set\r\n\t\t\t\t\t$is_onetime = false;\r\n\t\t\t\t//one-time payment/post purchase\t\t\t\t\t\t\r\n\t\t\t\t}else {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$data['METHOD'] = 'DoExpressCheckoutPayment';\r\n\t\t\t\t\t$data['PAYERID'] = $_POST['payer_id'];\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_CURRENCYCODE'] \t= $pack['currency'];\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_AMT'] \t\t \t= $transdata['cost'];\t\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_DESC'] \t\t \t= (isset($transdata['item_name']) ? $transdata['item_name'] : $system_obj->get_subscription_name($transdata));\t\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_NOTIFYURL'] \t= $this->setting['notify_url'];\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_INVNUM'] \t\t= $_POST['custom'];//transaction ref id\t\r\n\t\t\t\t\t$data['PAYMENTREQUEST_0_CUSTOM'] \t\t= $_POST['custom'];//transaction ref id\t\r\n\t\t\t\t\t$data['PAYMENTRREQUEST_0_PAYMENTACTION']= 'Sale';//transaction ref id\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//attach api credentials\r\n\t\t\t\t$post_data = array_merge($secure, $data);\r\n\t\t\t\t\r\n\t\t\t\t//issue #1508\r\n\t\t\t\t$url_parsed = parse_url($end_point); \t\t\t\r\n\t\t\t\t// domain/host\r\n\t\t\t\t$domain = $url_parsed['host'];\r\n\t\t\t\t// headers\r\n\t\t\t\t$http_headers = array ('POST /cgi-bin/webscr HTTP/1.1\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Content-Type: application/x-www-form-urlencoded\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Host: '.$domain.'\\r\\n',\r\n\t\t\t\t\t\t\t\t\t'Connection: close\\r\\n\\r\\n');\t\t\t\r\n\t\t\t\t// post\t\t\t\t\r\n\t\t\t\t$http_response = mgm_remote_post($end_point, $post_data, array('headers'=>$http_headers,'timeout'=>30,'sslverify'=>false));\r\n\t\t\t\t// log\r\n\t\t\t\t// mgm_log($http_response, __FUNCTION__);\t\r\n\t\t\t\t// reset\r\n\t\t\t\t$this->response = array();\t\r\n\t\t\t\t// parse to array\r\n\t\t\t\tparse_str($http_response, $this->response);\r\n\t\t\t\t// log\r\n\t\t\t\t// mgm_log($this->response, __FUNCTION__);\r\n\t\t\t\t// $fields = mgm_http_build_query($data);\r\n\t\t\t\t// reset response\r\n\t\t\t\t// $this->response = array();\r\n\t\t\t\t// make request:\r\n\t\t\t\t// $this->_curl_post($end_point, $fields);\r\n\t\t\t\t// check\r\n\t\t\t\tif(isset($this->response['ACK']) && strtoupper($this->response['ACK']) == 'SUCCESS') {\t\t\t\t\t\r\n\t\t\t\t\t// process \r\n\t\t\t\t\t$this->process_notify(true);\r\n\t\t\t\t\t// query arg\r\n\t\t\t\t\t$query_arg = array('status'=>'success', 'trans_ref' => mgm_encode_id($_POST['custom']));\r\n\t\t\t\t\t// is a post redirect?\r\n\t\t\t\t\t$post_redirect = $this->_get_post_redirect($_POST['custom']);\r\n\t\t\t\t\t// set post redirect\r\n\t\t\t\t\tif($post_redirect !==false){\r\n\t\t\t\t\t\t$query_arg['post_redirect'] = $post_redirect;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t// is a register redirect?\r\n\t\t\t\t\t$register_redirect = $this->_auto_login($_POST['custom']);\r\n\t\t\t\t\t// set register redirect\r\n\t\t\t\t\tif($register_redirect !== false){\r\n\t\t\t\t\t\t$query_arg['register_redirect'] = $register_redirect;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// redirect\r\n\t\t\t\t\tmgm_redirect(add_query_arg($query_arg, $this->_get_thankyou_url()));\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// teat as error\t\t\t\r\n\t\t\t\t\t$errors = urlencode($this->response['L_ERRORCODE0'] . ': ' . $this->response['L_SHORTMESSAGE0'] . ' - ' . $this->response['L_LONGMESSAGE0']); \t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$errors = __('Invalid Token', 'mgm');\r\n\t\t}\r\n\t\t\r\n\t\t// redirect\tif error occured:\r\n\t\tif(isset($errors))\t\t\r\n\t\t\tmgm_redirect(add_query_arg(array('status'=>'error','errors'=>$errors), $this->_get_thankyou_url()));\r\n\t}", "title": "" }, { "docid": "9a7a3ebca4cb30334a679f755356a427", "score": "0.48325416", "text": "public function payment_hardling() {\n\t \t$vnp_TmnCode = $this->vnp_TmnCode;\n\t \t$vnp_HashSecret = $this->vnp_HashSecret;\n\t \t$inputData = array();\n\t \t$returnData = array();\n\t \t$data = $_REQUEST;\n\t \tforeach ($data as $key => $value) {\n\t \t\tif (substr($key, 0, 4) == \"vnp_\") {\n\t \t\t\t$inputData[$key] = $value;\n\t \t\t}\n\t \t}\n\t \t$vnp_SecureHash = $inputData['vnp_SecureHash'];\n\t \tunset($inputData['vnp_SecureHashType']);\n\t \tunset($inputData['vnp_SecureHash']);\n\t \tksort($inputData);\n\t \t$i = 0;\n\t \t$hashData = \"\";\n\t \tforeach ($inputData as $key => $value) {\n\t \t\tif ($i == 1) {\n\t \t\t\t$hashData = $hashData . '&' . $key . \"=\" . $value;\n\t \t\t} else {\n\t \t\t\t$hashData = $hashData . $key . \"=\" . $value;\n\t \t\t\t$i = 1;\n\t \t\t}\n\t \t}\n\t\t\t$vnpTranId = $inputData['vnp_TransactionNo']; //Mã giao dịch tại VNPAY\n\t\t\t$vnp_BankCode = $inputData['vnp_BankCode']; //Ngân hàng thanh toán\n\t\t\t$secureHash = hash('sha256',$vnp_HashSecret . $hashData);\n\t\t\t$Status = 0;\n\t\t\t$orderId = $inputData['vnp_TxnRef'];\n\n\t\t\ttry {\n\t\t\t //Check Orderid \n\t\t\t //Kiểm tra checksum của dữ liệu\n\t\t\t\tif ($secureHash == $vnp_SecureHash) {\n\t\t\t //Lấy thông tin đơn hàng lưu trong Database và kiểm tra trạng thái của đơn hàng, mã đơn hàng là: $orderId \n\t\t\t //Việc kiểm tra trạng thái của đơn hàng giúp hệ thống không xử lý trùng lặp, xử lý nhiều lần một giao dịch\n\t\t\t //Giả sử: $order = mysqli_fetch_assoc($result); \n\t\t\t\t\t$order = Booking::wherebooking_code($orderId)->value('payment');\n\t\t\t\t\tif ($order != NULL) {\n\t\t\t\t\t\tif ($order != NULL && $order == 0) {\n\t\t\t\t\t\t\tif ($inputData['vnp_ResponseCode'] == '00') {\n\t\t\t\t\t\t\t\t$Status = 1;\n\t\t\t\t\t\t\t\t$booking_id = Booking::wherebooking_code($orderId)->value('id');\n\t\t\t\t\t\t\t\t$booking = Booking::findOrfail($booking_id);\n\t\t\t\t\t\t\t\t$booking->status = 1;\n\t\t\t\t\t\t\t\t$booking->payment = 1;\n\t\t\t\t\t\t\t\t$booking->update();\n\t\t\t\t // Gui mail\n\t\t\t\t\t\t\t\t$qr = QrCode::format('png')->size(200)->generate($booking->booking_code);\n\t\t\t\t\t\t\t\tMail::send('email.payment',[\n\t\t\t\t\t\t\t\t\t'booking_code' => $booking->booking_code,\n\t\t\t\t\t\t\t\t\t'transaction_date' => $booking->transaction_date,\n\t\t\t\t\t\t\t\t\t'checkin' => $booking->check_in_date,\n\t\t\t\t\t\t\t\t\t'checkout' => $booking->check_out_date,\n\t\t\t\t\t\t\t\t\t'adult' => $booking->adult,\n\t\t\t\t\t\t\t\t\t'kid' => $booking->kid,\n\t\t\t\t\t\t\t\t\t'total_amount' => $booking->total_amount,\n\t\t\t\t\t\t\t\t\t'message' => $booking->message,\n\t\t\t\t\t\t\t\t\t'png' => $qr,\n\t\t\t\t\t\t\t\t\t'name' => Auth::user()->username\n\n\t\t\t\t\t\t\t\t], function($message) {\n\t\t\t\t\t\t\t\t\t$message->to(Auth::user()->email);\n\t\t\t\t\t\t\t\t\t$message->subject('Thanh toán thành công!');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$Status = 2;\n\t\t\t\t\t\t\t}\n\t\t\t //Cài đặt Code cập nhật kết quả thanh toán, tình trạng đơn hàng vào DB\n\t\t\t //\n\t\t\t //\n\t\t\t //Trả kết quả về cho VNPAY: Website TMĐT ghi nhận yêu cầu thành công \n\t\t\t\t\t\t\t$returnData['RspCode'] = '00';\n\t\t\t\t\t\t\t$returnData['Message'] = 'Confirm Success';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$returnData['RspCode'] = '02';\n\t\t\t\t\t\t\t$returnData['Message'] = 'Order already confirmed';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$returnData['RspCode'] = '01';\n\t\t\t\t\t\t$returnData['Message'] = 'Order not found';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$returnData['RspCode'] = '97';\n\t\t\t\t\t$returnData['Message'] = 'Chu ky khong hop le';\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$returnData['RspCode'] = '99';\n\t\t\t\t$returnData['Message'] = 'Unknow error';\n\t\t\t}\n\t\t//Trả lại VNPAY theo định dạng JSON\n\t\t// echo json_encode($returnData);\n\t\t}", "title": "" }, { "docid": "2ee3a99e00029bf9c4c7337b462a53da", "score": "0.48270044", "text": "public function validateResponse()\n {\n $nnPaymentData = $this->sessionStorage->getPlugin()->getValue('nnPaymentData');\n if($nnPaymentData['payment_type'] == 'CASHPAYMENT' && !empty($nnPaymentData['cp_checkout_token']))\n {\n $this->sessionStorage->getPlugin()->setValue('cashtoken', $nnPaymentData['cp_checkout_token']);\n $this->sessionStorage->getPlugin()->setValue('checkouturl', $this->getBarzhalenTestMode($nnPaymentData['test_mode']));\n }\n\n $this->sessionStorage->getPlugin()->setValue('nnPaymentData', null);\n $nnPaymentData['order_no'] = $this->sessionStorage->getPlugin()->getValue('nnOrderNo');\n $nnPaymentData['mop'] = $this->sessionStorage->getPlugin()->getValue('mop');\n $this->executePayment($nnPaymentData);\n $isPrepayment = (bool)($nnPaymentData['payment_id'] == '27' && $nnPaymentData['invoice_type'] == 'PREPAYMENT');\n\n $transactionData = [\n 'amount' => $nnPaymentData['amount'] * 100,\n 'callback_amount' => $nnPaymentData['amount'] * 100,\n 'tid' => $nnPaymentData['tid'],\n 'ref_tid' => $nnPaymentData['tid'],\n 'payment_name' => $this->paymentHelper->getPaymentNameByResponse($nnPaymentData['payment_id'], $isPrepayment),\n 'payment_type' => $nnPaymentData['payment_type'],\n 'order_no' => $nnPaymentData['order_no'],\n ];\n\n if(in_array($nnPaymentData['payment_id'], ['27', '59']) || (in_array($nnPaymentData['tid_status'], ['85','86','90'])))\n $transactionData['callback_amount'] = 0;\n\t\t\n $this->transactionLogData->saveTransaction($transactionData);\n \n if(in_array($nnPaymentData['payment_type'],['INVOICE_START','DIRECT_DEBIT_SEPA','CASHPAYMENT', 'GUARANTEED_INVOICE', 'GUARANTEED_DIRECT_DEBIT_SEPA']) || ($nnPaymentData['payment_type'] == 'CREDITCARD' && $this->paymentHelper->getNovalnetConfig('novalnet_cc_3d') != 'true' && $this->paymentHelper->getNovalnetConfig('novalnet_cc_3d_fraudcheck') != 'true'))\n {\n $this->sendPostbackCall($nnPaymentData);\n }\n }", "title": "" }, { "docid": "386f9c14dae7de718ba3e7f48bdca38b", "score": "0.4826437", "text": "public function processPayment(Yourdelivery_Model_Order_Abstract $order, Zend_Controller_Request_Abstract $request) {\n\n $authResult = urldecode($request->getParam('authResult'));\n $pspReference = urldecode($request->getParam('pspReference'));\n $merchantReference = urldecode($request->getParam('merchantReference'));\n $skinCode = urldecode($request->getParam('skinCode'));\n $returnData = urldecode($request->getParam('merchantReturnData'));\n\n $table = new Yourdelivery_Model_DbTable_Adyen_Transactions();\n $transaction = $table->getByTransactionId($merchantReference);\n if (!$transaction) {\n $this->getLogger()->warn(sprintf('ADYEN: could not find any transaction by given merchantReference %s', $merchantReference));\n return false;\n }\n\n //set returning time\n $transaction->return = date(DATETIME_DB);\n $transaction->responseCode = $authResult;\n\n $signatureGivenFromAdyen = $request->getParam('merchantSig');\n $hmacData = $authResult .\n $pspReference .\n $merchantReference .\n $skinCode .\n $returnData;\n $calculatedSignature = base64_encode(hash_hmac('sha1', $hmacData, $this->getSharedSecret(), true));\n if ($calculatedSignature != $signatureGivenFromAdyen) {\n $this->getLogger()->warn(sprintf('ADYEN: signature %s did not match expteced signature %s on response for order %s', $signatureGivenFromAdyen, $calculatedSignature, $order->getId()));\n $transaction->valid = false;\n $transaction->save();\n return false;\n }\n\n //save reference number\n $transaction->reference = $pspReference;\n $transaction->save();\n return true;\n }", "title": "" }, { "docid": "99c61d9c2b55fe612abe71532ab5272e", "score": "0.48260185", "text": "private function handleReversedTransaction($request)\n {\n $userId = $this->RexShop->userIdFromCustom($request);\n if (!isset($userId) || $userId < 1) {\n return $this->rexshopOnFailure();\n }\n\n $this->RexShop->rexshopStartConversation(\\XF::phrase('rexshop_purchase_reversed_title'), \\XF::phrase('rexshop_purchase_reversed_body'), $userId);\n\n return $this->rexshopOnSuccess();\n }", "title": "" }, { "docid": "1d0f539c410d759ee4073f4382ea7e45", "score": "0.48260182", "text": "public function generate_razorpay_form($order_id){\n \n global $woocommerce;\n \n $order = new WC_Order($order_id);\n \n $redirect_url = get_site_url() . '/?wc-api' .\"=\". get_class($this) ;\n \n $productinfo = \"Order $order_id\";\n\n $razorpay_args = array(\n 'key' => $this->key_id,\n 'name' => get_bloginfo('name'),\n 'amount' => $order->order_total*100,\n 'currency' => get_woocommerce_currency(),\n 'description' => $productinfo,\n 'prefill' => array(\n 'name' => $order->billing_first_name.\" \".$order->billing_last_name,\n 'email' => $order->billing_email,\n 'contact' => $order->billing_phone\n ),\n 'notes' => array(\n 'woocommerce_order_id' => $order_id\n )\n );\n\n $json = json_encode($razorpay_args);\n\n $html = <<<EOT\n<script src=\"{$this->liveurl}\"></script>\n<script>\n var data = $json;\n</script>\n<form name='razorpayform' action=\"$redirect_url\" method=\"POST\">\n <input type=\"hidden\" name=\"merchant_order_id\" value=\"$order_id\">\n <input type=\"hidden\" name=\"razorpay_payment_id\" id=\"razorpay_payment_id\">\n</form>\n<script>\n data.backdropClose = false;\n data.handler = function(payment){\n document.getElementById('razorpay_payment_id').value = \n payment.razorpay_payment_id;\n document.razorpayform.submit();\n };\n var razorpayCheckout = new Razorpay(data);\n razorpayCheckout.open();\n</script>\n<p>\n<button id=\"btn-razorpay\" onclick=\"razorpayCheckout.open();\">Pay Now</button>\n<button onclick=\"document.razorpayform.submit()\">Cancel</button>\n</p>\n\nEOT;\n return $html;\n }", "title": "" }, { "docid": "8399487b94c0052002107af421b44fa6", "score": "0.48251864", "text": "function getPaymentMethod()\n {\n return [2=>trans('user.CREDIT_CARD'),\n 1=>trans('user.TRANSFER')];\n }", "title": "" }, { "docid": "dd08b185712eb787b12c94a59df09bd4", "score": "0.48236123", "text": "public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n $user_id = Auth::user()->id;\n $user_role = Auth::user()->role;\n $random_number = intval(rand(0,9).rand(0,9).rand(0,9).rand(0,9));\n\n $user = DB::table('users')->where('id' , $user_id)->update(['school_fees_payment' => 'PAID']);\n\n $invoice = new Invoice;\n\n $invoice->status = $paymentDetails['data']['status'];\n $invoice->fullname = $paymentDetails['data']['metadata']['fullname'];\n $invoice->email = $paymentDetails['data']['metadata']['email'];\n $invoice->dob = $paymentDetails['data']['metadata']['dob'];\n $invoice->class = $paymentDetails['data']['metadata']['class'];\n $invoice->term = $paymentDetails['data']['metadata']['term'];\n $invoice->gender = $paymentDetails['data']['metadata']['gender'];\n $invoice->student_id = $paymentDetails['data']['metadata']['student_id'];\n $invoice->guardian_name = $paymentDetails['data']['metadata']['guardian_name'];\n $invoice->guardian_email = $paymentDetails['data']['metadata']['guardian_email'];\n $invoice->guardian_phoneNumber = $paymentDetails['data']['metadata']['guardian_phoneNumber'];\n $invoice->school_fees_price = $paymentDetails['data']['amount'];\n $invoice->section = $paymentDetails['data']['metadata']['section'];\n $invoice->order_number = $random_number;\n $invoice->order_date = $paymentDetails['data']['paid_at'];\n $invoice->fee_type = 'SCHOOLFEES';\n\n $invoice->save();\n \n return view('user.paymentsuccess');\n\n // return redirect('/student');\n\n // dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "title": "" }, { "docid": "8868b9d45770da5cc2ba04a4ec4d4847", "score": "0.4817705", "text": "function Normalise($strPaymentRecord)\n \t{\n \t\tif (!trim($strPaymentRecord))\n \t\t{\n \t\t\treturn PAYMENT_CANT_NORMALISE_FOOTER;\n \t\t}\n \t\t\n \t\tif (is_int(stripos($strPaymentRecord, 'Amount,Client')))\n \t\t{\n \t\t\treturn PAYMENT_CANT_NORMALISE_HEADER;\n \t\t}\n \t\t\n \t\t//Debug($strRawRecord);\n \t\t\n \t\t// Split the parsed record\n \t\t$this->_SplitRaw($strPaymentRecord);\n\t\t\n \t\t// PaymentType\n \t\t$this->_Append('PaymentType', PAYMENT_TYPE_BPAY);\n \t\t\n \t\t// Amount\n \t\t$mixValue\t= (float)$this->_FetchRaw('Amount');\n \t\t$this->_Append('Amount', $mixValue);\n \t\t\n \t\t// Transaction Reference Number\n \t\t$mixValue\t= $this->_FetchRaw('ReceiptNumber');\n \t\t$this->_Append('TXNReference', $mixValue);\n \t\t\n \t\t// PaidOn\n \t\t$mixValue\t= $this->_ConvertDate($this->_FetchRaw('Date'));\n \t\t$this->_Append('PaidOn', $mixValue);\n \t\t\n \t\t// Call the base module's Normalise() to do general tasks\n \t\tparent::Normalise($strPaymentRecord);\n \t\t\n \t\t// Apply AccountGroup Ownership\n \t\t$strAccount\t\t\t= trim($this->_FetchRaw('CustomerReference'));\n \t\t// Remove Check digit\n \t\t$intAccount\t\t\t= (int)substr($strAccount, 0, -1);\n \t\t// FIXME: Try to account for bad reference numbers. Is this right?\n \t\tif ($intAccount < 1000000000)\n \t\t{\n \t\t\t$intAccount = (int)\"1\".str_pad($intAccount, 9, \"0\", STR_PAD_LEFT);\n \t\t}\n \t\t$this->_Append('Account', $intAccount);\n \t\tif (($intAccountGroup = $this->_FindAccountGroup($intAccount)) === FALSE)\n \t\t{\n\t\t\t$this->_Append('Status', PAYMENT_BAD_OWNER);\n \t\t\treturn $this->_Output();\n \t\t}\n \t\t$this->_Append('AccountGroup', $intAccountGroup);\n \t\t\n \t\t// Validate Check Digit\n \t\tif (MakeLuhn($intAccount) != (int)substr($strAccount, -1, 1))\n \t\t{\n\t\t\t$this->_Append('Status', PAYMENT_INVALID_CHECK_DIGIT);\n \t\t\treturn $this->_Output();\n \t\t}\n \t\t\n \t\t//----------------------------------------------------------------------\n \t\t\n \t\t// Validate Normalised Data\n \t\tif (!$this->Validate())\n \t\t{\n\t\t\t$this->_Append('Status', PAYMENT_CANT_NORMALISE_INVALID);\n \t\t}\n \t\t\n \t\treturn $this->_Output();\n \t}", "title": "" }, { "docid": "46423a0d8c3143929871f31ec055dcbf", "score": "0.4817682", "text": "function process(){\n\t\tFvnImporter::model('orders');\n\t\t$order = new FvnModelOrders();\n\t\t$order->load($this->input->getInt('order_id'));\n// \t\tFvnHelper::check_nonce();\t\t\t\t\n\t\tif($order->pay_status=='SUCCESS'){\n\t\t\twp_redirect(FvnHelper::get_order_link($order));exit;\n\t\t}\n\t\t$payment_plugin = $this->input->getString('pay_method','');\n\t\tif(substr($payment_plugin,0,10)=='hbpayment_'){\n\t\t\t$payment_plugin = substr($payment_plugin,10);\n\t\t\t// echo $payment_plugin;die;\n\t\t}\n\t\t$order->pay_method=$payment_plugin;\n\t\t$order->store();\t\n\t\t\n// \t\tdebug($order);die;\t\t\n\t\tdo_action('fvn_order_process_checkout',$order);\t\t\n\t\t$order_id = $order->id;\n\t\t//Trigger _preparePayment of payment gateway to generate checkout page\n\t\t//import core plugin\n\t\t\n\t\t$payment_plugin = 'hbpayment_'.$payment_plugin;\n\t\tFvnImporter::corePaymentPlugin();\n\t\t$order_id = $order->id;\n\t\t$payment = new $payment_plugin();\n\t\t$payment->config = HBFactory::getConfig();\n\t\t$payment->return_url = site_url(\"index.php?hbaction=payment&task=confirm&method={$payment_plugin}&paction=display_message&order_id=$order_id\");\n\t\t$payment->cancel_url = site_url(\"index.php?hbaction=payment&task=confirm&method={$payment_plugin}&paction=cancel&order_id=$order_id\");\n\t\t$payment->notify_url = site_url(\"index.php?hbaction=payment&task=confirm&method={$payment_plugin}&paction=process&order_id=$order_id\");\n\t\t$payment->order = $order;\n\t\t$result = $payment->_prePayment();\t\n\t\t\n\t\tif($result['status']){\t\t\t\n\t\t\thb_enqueue_message($result['msg']);\n\t\t}else{\n\t\t\thb_enqueue_message($result['msg'],'error');\n\t\t}\n\t\t\n\t\twp_redirect($result['url']);\n\t\texit;\n\t\treturn;\t\t\t\n\t}", "title": "" }, { "docid": "53151406f658fd65a346e0fa778b9692", "score": "0.4816808", "text": "public function postProcess()\n {\n /*\n * If the module is not active anymore, no need to process anything.\n */\n if ($this->module->active == false) {\n die;\n }\n\n $cart_id = (int) $_POST['oid'];\n $customer_id = $this->context->customer->id;\n $amount = number_format(str_replace(array(',', ' '), array('.', ''), $_POST['chargetotal']), 2, '.', '');\n\n Db::getInstance()->update(\n 'first_data_ipg',\n array(\n 'response' => pSQL(var_export($_POST, true)),\n 'updated' => date('Y-m-d H:i:s'),\n ),\n \"id_cart = $cart_id\"\n );\n\n /*\n * Restore the context from the $cart_id & the $customer_id to process the validation properly.\n */\n Context::getContext()->cart = new Cart((int) $cart_id);\n Context::getContext()->customer = new Customer((int) $customer_id);\n Context::getContext()->currency = new Currency((int) Context::getContext()->cart->id_currency);\n Context::getContext()->language = new Language((int) Context::getContext()->customer->id_lang);\n\n $secure_key = Context::getContext()->customer->secure_key;\n\n if ($this->isValidOrder() === true) {\n $payment_status = Configuration::get('PS_OS_PAYMENT');\n $message = null;\n } else {\n $payment_status = Configuration::get('PS_OS_ERROR');\n\n $message = $this->module->l('An error occurred while processing payment');\n }\n\n $module_name = $this->module->displayName;\n $currency_id = (int) Context::getContext()->currency->id;\n\n $this->module->validateOrder($cart_id, $payment_status, $amount, $module_name, $message, array(), $currency_id, false, $secure_key);\n\n $order_id = Order::getOrderByCartId((int)$cart_id);\n\n if ($order_id && ($secure_key == $this->context->customer->secure_key)) {\n $module_id = $this->module->id;\n Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart_id.'&id_module='.$module_id.'&id_order='.$order_id.'&key='.$secure_key);\n } else {\n $this->errors[] = $this->module->l('An error occured. Please contact the merchant to have more informations');\n return $this->setTemplate('error.tpl');\n }\n }", "title": "" } ]
54653ae0dbc7086f6ce21aa6d1d72479
expects DOMElement or DOMDocument (see DOMDocument::load and DOMDocument::loadHTML)
[ { "docid": "5c19aac21cdf5558360aa3daa824ad3a", "score": "0.5647773", "text": "public function __construct(DOMNode $el)\n {\n if ($el instanceof DOMDocument) {\n $el = $el->documentElement;\n }\n\n if (!$el instanceof DOMElement) {\n throw new InvalidArgumentException('Invalid arguments, expected DOMElement or DOMDocument');\n }\n\n $this->start = $el;\n }", "title": "" } ]
[ { "docid": "29be320c6c370289a9190d47fed2cfff", "score": "0.6810955", "text": "abstract protected function consumeDom();", "title": "" }, { "docid": "72a80c4d2c28ec48c64d2a80c1984be6", "score": "0.6710006", "text": "public function executeDomOperation(\\DOMDocument $dom_document): \\DOMDocument;", "title": "" }, { "docid": "fcda342e7fad1c57fcc5839de2d1051f", "score": "0.6581195", "text": "abstract public function getDomObject();", "title": "" }, { "docid": "7f95e76e9aec837adc746fdde3e5286d", "score": "0.65214336", "text": "protected function loadDom(\\DOMElement $dom, array $options = [])\n {\n }", "title": "" }, { "docid": "8ffee708d90c9ffe980a973a40cb0cb3", "score": "0.64423084", "text": "function file_get_dom() {\n $dom = new simple_html_dom;\n $args = func_get_args();\n $dom->load(call_user_func_array('file_get_contents', $args), true);\n return $dom;\n}", "title": "" }, { "docid": "a70c55ce10fff90dafc73854e16b90f1", "score": "0.63628685", "text": "function file_get_dom() {\n\t $dom = new simple_html_dom;\n\t $args = func_get_args();\n\t $dom->load(call_user_func_array('file_get_contents', $args), true);\n\t return $dom;\n\t}", "title": "" }, { "docid": "210953795a5f3d73a9d00036164fad2b", "score": "0.6234447", "text": "public function setDomDocument(DOMDocument $dom, DOMElement $base);", "title": "" }, { "docid": "0561bae7d1c27cfd7a1f676f4184a855", "score": "0.6059305", "text": "function str_get_dom($str, $lowercase=true) {\n $dom = new simple_html_dom;\n $dom->load($str, $lowercase);\n return $dom;\n}", "title": "" }, { "docid": "bc9a24a53105636bb2b762d54a2d306a", "score": "0.5983155", "text": "function td_get_page($link){\n\n $dom = new DOMDocument();\n $check = @$dom->loadHTMLFile($link);\n\n if ($check === true) {\n return $dom;\n }\n\n return false;\n}", "title": "" }, { "docid": "c506c00bdfa1204684d848b057e87dd8", "score": "0.59722763", "text": "abstract public function ParseAndSaveElement(DOMElement $domElement);", "title": "" }, { "docid": "41b99c06538f1a8ee09ad185ecc7b113", "score": "0.5948675", "text": "protected function _loadDomNode(DOMNode $data)\n {\n $elem = simplexml_import_dom($data);\n $this->_loadSimpleXmlElement($elem);\n }", "title": "" }, { "docid": "84acc5959fefdb413a4e610ba13e104c", "score": "0.5889526", "text": "public static function getDom($html = '') {\n $p = self::getInstance();\n $dom = new \\DOMDocument('1.0', 'UTF-8');\n $dom->validateOnParse = true;\n $dom->resolveExternals = true;\n $dom->preserveWhiteSpace = false;\n // Turn off XML errors.. if only it was that easy right?\n $dom->strictErrorChecking = FALSE;\n $xml_error_setting = libxml_use_internal_errors(true);\n\n // Because PJax isn't a full document, it kinda breaks DOMDocument\n // Which expects a full document! (You know with a DOCTYPE, <HTML> <BODY> etc.. )\n if (self::isPjax() &&\n (strpos($html, '<!DOCTYPE') !== 0 || strpos($html, '<html') !== 0)) {\n // Prefix the non-doctyped html snippet with an xml prefix\n // This tricks DOMDocument into loading the HTML snippet\n $xml_prefix = '<?xml encoding=\"UTF-8\" />';\n $html = $xml_prefix . $html;\n }\n\n // Convert the HTML into a DOMDocument, however, don't imply it's HTML, and don't insert a default Document Type Template\n // Note, we can't use the Options parameter until PHP 5.4 http://php.net/manual/en/domdocument.loadhtml.php\n if (! ($loaded = $dom->loadHTML($html))) {\n $p->debug_log(\"There was a problem loading the DOM.\");\n }\n else {\n $p->debug_log(\"%d chars of HTML was inserted into a DOM\", strlen($html));\n }\n libxml_use_internal_errors($xml_error_setting); // restore xml parser error handlers\n $p->debug_log('DOM Loaded.');\n return $dom;\n }", "title": "" }, { "docid": "31d52b54ffe79bf4248c06e24f7310d3", "score": "0.5842871", "text": "public function __construct(){\n\t\tif(!self::$DOMDocument instanceof DOMDocument){\n\t\t\tself::$DOMDocument = new DOMDocument('1.0', 'UTF-8');\n\t\t}\n\t}", "title": "" }, { "docid": "548e7231093d02455018b2a37ce994c8", "score": "0.5822351", "text": "function str_get_dom($str, $lowercase=true) {\n\t $dom = new simple_html_dom;\n\t $dom->load($str, $lowercase);\n\t return $dom;\n\t}", "title": "" }, { "docid": "e3193c33e3615334c6bd4a779f175546", "score": "0.5813715", "text": "public function parse(string $html): ?\\DOMNode;", "title": "" }, { "docid": "9db57820bbea055e6be62bf234ef128c", "score": "0.58091897", "text": "public function testGetDomNode1(): void\n {\n $result = $this->parser->getDomNode();\n $this->assertInstanceOf(\\DOMNode::class, $result);\n }", "title": "" }, { "docid": "7dfb302fd944c490ec1d216a5ffa8f5e", "score": "0.5748938", "text": "function file_get_html() {\n\t $dom = new simple_html_dom;\n\t $args = func_get_args();\n\t $dom->load(call_user_func_array('file_get_contents', $args), true);\n\t return $dom;\n\t}", "title": "" }, { "docid": "909752033a13e38a3b375a9ed6d54ebf", "score": "0.5736204", "text": "public function testHtmlWithEntities()\n {\n $html = '<p>&lt;p&gt;</p>';\n $document = Parser::load($html);\n\n static::assertEquals(1, $document->childNodes->length);\n\n $pNode = $document->childNodes->item(0);\n\n static::assertInstanceOf('DOMElement', $pNode);\n static::assertEquals('p', $pNode->nodeName);\n static::assertEquals('&lt;p&gt;', $pNode->textContent);\n static::assertEquals(1, $pNode->childNodes->length);\n static::assertEquals(0, $pNode->attributes->length);\n\n $textNode = $pNode->childNodes->item(0);\n\n static::assertInstanceOf('DOMText', $textNode);\n static::assertEquals('&lt;p&gt;', $textNode->nodeValue);\n }", "title": "" }, { "docid": "1f467a79483986ddc9585dd612c00290", "score": "0.5687091", "text": "public function load($html)\n {\n $dom = self::newSimpleDom();\n $dom->load($html);\n $this->loadObject($dom->root);\n }", "title": "" }, { "docid": "66a3d0d1b73e1f0372998a540d9691ad", "score": "0.56814075", "text": "public static function load($actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false): DOMDocument\n {\n if ($actual instanceof DOMDocument) {\n return $actual;\n }\n\n if (!is_string($actual)) {\n throw new Exception('Could not load XML from ' . gettype($actual));\n }\n\n if ($actual === '') {\n throw new Exception('Could not load XML from empty string');\n }\n\n // Required for XInclude on Windows.\n if ($xinclude) {\n $cwd = getcwd();\n @chdir(dirname($filename));\n }\n\n $document = new DOMDocument;\n $document->preserveWhiteSpace = false;\n\n $internal = libxml_use_internal_errors(true);\n $message = '';\n $reporting = error_reporting(0);\n\n if ($filename !== '') {\n // Required for XInclude\n $document->documentURI = $filename;\n }\n\n if ($isHtml) {\n $loaded = $document->loadHTML($actual);\n } else {\n $loaded = $document->loadXML($actual);\n }\n\n if (!$isHtml && $xinclude) {\n $document->xinclude();\n }\n\n foreach (libxml_get_errors() as $error) {\n $message .= \"\\n\" . $error->message;\n }\n\n libxml_use_internal_errors($internal);\n error_reporting($reporting);\n\n if (isset($cwd)) {\n @chdir($cwd);\n }\n\n if ($loaded === false || ($strict && $message !== '')) {\n if ($filename !== '') {\n throw new Exception(\n sprintf(\n 'Could not load \"%s\".%s',\n $filename,\n $message !== '' ? \"\\n\" . $message : ''\n )\n );\n }\n\n if ($message === '') {\n $message = 'Could not load XML for unknown reason';\n }\n\n throw new Exception($message);\n }\n\n return $document;\n }", "title": "" }, { "docid": "4cb72139e645516eb8ffc34a5d4d194e", "score": "0.5677757", "text": "public function parse(string $html) : DOMDocument\n {\n $dom = new DOMDocument;\n\n @$dom->loadHTML($html);\n\n return $dom;\n }", "title": "" }, { "docid": "d5218cd41393cef639b279b06293a2e5", "score": "0.5661662", "text": "private function loadEtdDom() {\n $dom = new DOMDocument();\n $dom->loadXML(file_get_contents('../fixtures/etd2.xml'));\n return $dom;\n }", "title": "" }, { "docid": "e08679c8180c35758a046b97b3df3809", "score": "0.56608504", "text": "public function retrieveDocument(): DOMDocument\n {\n return clone $this->dom();\n }", "title": "" }, { "docid": "a89440beab1e2db3ca88fdac5692d003", "score": "0.56171685", "text": "public function loadDocument() {\n $document = new \\DOMDocument();\n libxml_use_internal_errors(TRUE);\n $document->loadHTMLFile(drupal_get_path('module', 'graphql') . '/tests/files/xml/test.xml');\n return $document->documentElement;\n }", "title": "" }, { "docid": "5441fcf30914473f290342ebb6cfa9b3", "score": "0.55983067", "text": "function getDom($path) {\n //echo $path;\n sleep(1);\n $tidy = tidy_parse_file($path, array(\"numeric-entities\" => true, \"output-xhtml\" => true), 'utf8');\n $tidy->cleanRepair();\n $xhtml = (string) $tidy;\n $dom = simplexml_load_string($xhtml);\n $dom->registerXPathNamespace(\"xhtml\", \"http://www.w3.org/1999/xhtml\");\n return $dom;\n}", "title": "" }, { "docid": "ba88b46c738b954c178d7fe4389a64eb", "score": "0.558497", "text": "private function xmlDocumentElement(DOMDocument $document): DOMElement\n {\n $documentElement = $document->documentElement;\n if (null === $documentElement) {\n throw new DocumentWithoutRootElement();\n }\n return $documentElement;\n }", "title": "" }, { "docid": "6f92741de46a0df20417e664f6f56ee8", "score": "0.55833626", "text": "private function getDOM($reset = false) {\n\t\tif(!$this->dom || $reset) {\n\t\t\t$this->dom = new \\DOMDocument('1.0', 'UTF-8');\n\t\t}\n\t\t\n\t\treturn $this->dom;\n\t}", "title": "" }, { "docid": "efe29de34616564c9dc37c3a88c7d335", "score": "0.5539357", "text": "private function load_markup($html)\n {\n $document = new \\DOMDocument();\n @$document->loadHTML($html);\n\n return $document;\n }", "title": "" }, { "docid": "7280bae76f4defb471cd8d8f8f482e82", "score": "0.55323654", "text": "static function isolateNode($node){\n\t\t$dom = new DOMDocument;\n\t\tif(get_class($node) == 'DOMDocument'){//DOMDocument is not a node, so get primary element in document\n\t\t\t$node = $node->documentElement;\n\t\t}\n\t\t$dom->appendChild($dom->importNode($node,true));\n\t\treturn $dom;\n\t}", "title": "" }, { "docid": "1f29a77867e99ce41801823f31c7d600", "score": "0.55246544", "text": "function loadXML($src) \n {\n $this->doc->loadXML($src);\n }", "title": "" }, { "docid": "c6cac0743c19ed5f703579dcf6d4f473", "score": "0.55086726", "text": "public function __construct(\\DOMDocument $document) {\n $this->_document = $document;\n }", "title": "" }, { "docid": "599aa4bb05d4c199732abdb09fd65340", "score": "0.55001974", "text": "public function __construct(DOMDocument $dom, array $data = null){\n\t\t$this->dom = $dom;\n\n\t\t$this->render($data);\n\t}", "title": "" }, { "docid": "4b6c8bd8b28fe1782dcf3f626080cbeb", "score": "0.5485729", "text": "public function __construct(DOMDocument $builder, $element) {\n parent::__construct($element);\n\n $this->_builder = $builder;\n }", "title": "" }, { "docid": "44fc9f615af95c8caa2a93b8e1e99e25", "score": "0.5474072", "text": "public function getDomNode();", "title": "" }, { "docid": "aef99e699fad20a7b794a176066cf0b4", "score": "0.5465735", "text": "public function getDOMDocument()\r\n\t{\r\n\t\treturn $this->domDocument;\r\n\t}", "title": "" }, { "docid": "042ab0ddea693324b1edc3e802f6bc9a", "score": "0.5451357", "text": "private function loadHTML($html)\n {\n $dom = new DOMDocument('1.0', 'utf-8');\n\n if (!$this->getConfig()->getOption('substituteEntities')) {\n // Keep the original HTML entities\n $dom->substituteEntities = false;\n }\n\n if ($this->getConfig()->getOption('normalizeEntities')) {\n // Replace UTF-8 characters with the HTML Entity equivalent. Useful to fix html with mixed content\n $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');\n }\n\n // Prepend the XML tag to avoid having issues with special characters. Should be harmless.\n $dom->loadHTML('<?xml encoding=\"UTF-8\">' . $html);\n $dom->encoding = 'UTF-8';\n\n $this->removeScripts($dom);\n\n $this->prepDocument($dom);\n\n return $dom;\n }", "title": "" }, { "docid": "1519143b4d1f70ff3ae91a00a27b9aa1", "score": "0.5428038", "text": "public function setContentDOM($arr) {\n\t\t$this->_arrContentDOM = $arr;\n\t}", "title": "" }, { "docid": "b60d093af3f2ad262eddfd8ba5ada818", "score": "0.54210895", "text": "function setXMLfromDOM(&$xdom) {\n\t\t$this->xdom = $xdom;\n\t\t$this->xstr = $this->xdom->saveXML();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "18c7a7160ee2be191f2f218f56966b0b", "score": "0.5414524", "text": "function dom_compatibility( $contents ) {\r\n\r\n\t\tif ( ! class_exists( 'DOMDocument' ) ) {\r\n\t\t\treturn $contents;\r\n\t\t}\r\n\r\n\t\t$dom = new DOMDocument();\r\n\r\n\t\tlibxml_use_internal_errors( true );\r\n\t\t@$dom->loadHTML( $contents );\r\n\t\tlibxml_clear_errors();\r\n\r\n\t\t$imgs = $dom->getElementsByTagName( 'img' );\r\n\t\t$ps = $dom->getElementsByTagName( 'p' );\r\n\t\tforeach ( $ps as $p ) {\r\n\t\t\t$p_style = $p->getAttribute( 'style' );\r\n\t\t\tif ( ! empty( $p_style ) ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ( $imgs as $img ) {\r\n\t\t\t$classes_to_aligns = array( 'left', 'right' );\r\n\t\t\tforeach ( $classes_to_aligns as $class_to_align ) {\r\n\t\t\t\tif ( $img->hasAttribute( 'class' ) && strstr( $img->getAttribute( 'class' ), 'align' . $class_to_align ) ) {\r\n\t\t\t\t\t$img->setAttribute( 'align', $class_to_align );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( $img->hasAttribute( 'class' ) && strstr( $img->getAttribute( 'class' ), 'aligncenter' ) ) {\r\n\t\t\t\t$img_style = $img->getAttribute( 'style' );\r\n\t\t\t\t$img_style = preg_replace( '#display:(.*?);#', '', $img_style );\r\n\t\t\t\t$img->setAttribute( 'style', $img_style );\r\n\r\n\t\t\t\t$parent = $img->parentNode;\r\n\t\t\t\tif ( $parent->nodeName == 'a' ) {\r\n\t\t\t\t\t$parent = $parent->parentNode;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( $parent->nodeName != 'div' ) {\r\n\t\t\t\t\t$parent->setAttribute( 'style', 'text-align:center;' . $parent->getAttribute( 'style' ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$element = $dom->createElement( 'p' );\r\n\t\t\t\t\t$element->setAttribute( 'style', 'text-align:center;' . $p_style );\r\n\r\n\t\t\t\t\t$img->parentNode->replaceChild( $element, $img );\r\n\t\t\t\t\t$element->appendChild( $img );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$style = $img->getAttribute( 'style' );\r\n\t\t\tpreg_match( '#margin:(.*?);#', $style, $matches );\r\n\t\t\tif ( $matches ) {\r\n\t\t\t\t$space_px = explode( 'px', $matches[1] );\r\n\t\t\t\t$space_procent = explode( '%', $matches[1] );\r\n\t\t\t\t$space = ( $space_procent > $space_px ) ? $space_procent : $space_px;\r\n\t\t\t\t$space_unit = ( $space_procent > $space_px ) ? '%' : '';\r\n\t\t\t\tif ( $space ) {\r\n\t\t\t\t\t$hspace = trim( $space[0] );\r\n\t\t\t\t\t$vspace = ( isset( $space[1] ) ) ? $hspace : trim( $space[0] );\r\n\r\n\t\t\t\t\t$img->setAttribute( 'hspace', $hspace . $space_unit );\r\n\t\t\t\t\t$img->setAttribute( 'vspace', $vspace . $space_unit );\r\n\t\t\t\t}\r\n\t\t\t\t$style = preg_replace( '#margin:(.*?);#', '', $style );\r\n\t\t\t\tif ( $style ) {\r\n\t\t\t\t\t$img->setAttribute( 'style', $style );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$img->removeAttribute( 'style' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$contents = $dom->saveHTML();\r\n\r\n\t\treturn $contents;\r\n\t}", "title": "" }, { "docid": "9c9677221ab6499f2e9d778b7c6c5806", "score": "0.53934926", "text": "function str_get_html($str, $lowercase=true) {\n $dom = new simplehtmldom;\n $dom->load($str, $lowercase);\n return $dom;\n}", "title": "" }, { "docid": "805ac4195e6084d4e655e6f88300d278", "score": "0.53698516", "text": "public function getDOM() {\n $document = new DOMDocument();\n $document->loadXML($this->loadSubtitleContent());\n return $document;\n }", "title": "" }, { "docid": "a3fa9174f8bfe0fd07184cbbc262b926", "score": "0.5368006", "text": "public static function Load ($data) {\n\t\t\n\t\t\t$retr=new \\DOMDocument();\n\t\t\n\t\t\t$restore=libxml_use_internal_errors(true);\n\t\t\t\n\t\t\ttry {\n\t\t\t\n\t\t\t\tif (!$retr->loadXML(\n\t\t\t\t\t$data,\n\t\t\t\t\t//\tSee: https://bugs.php.net/bug.php?id=54138\n\t\t\t\t\tpow(2,22)\n\t\t\t\t)) self::raise();\n\t\t\t\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\n\t\t\t\tlibxml_use_internal_errors($restore);\n\t\t\t\t\n\t\t\t\tthrow $e;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlibxml_use_internal_errors($restore);\n\t\t\t\n\t\t\treturn $retr;\n\t\t\n\t\t}", "title": "" }, { "docid": "c6fabdc565449629505897a3b519660f", "score": "0.53627825", "text": "function loadHTML($url=\"\",$fname=\"\",$savefile=false) {\n\tglobal $debug;\n\techo $url,\"\\r\\n\\r\\n\";\n\tif ($url != '') {\n\t\t/*\n\t\t *\tOct 2018. Equibase rejects script requests, so we simulate a browser using getUrlContent\n\t\t *\t$context = stream_context_create(array('http' => array('header'=>'Connection: close')));\n \t *\t$html = file_get_contents($url);\n\t\t */\n\t\t$html = getUrlContent($url);\n\t} else {\n\t $html = file_get_contents($fname);\n\t}\n\t//echo $html; die;\n\t$dom = new DomDocument();\n\tif ($dom->loadHTML($html)){\n if (true || $debug) echo \"\\nLoadHTML: Success\";\n\t\tif ($savefile) $dom->saveHTMLFile(\"EQtempNEW.html\");\n\t\treturn $dom;\n\t} else {\n if ($debug) echo \"\\nLoadHTML: FAILED\";\n return false;\n\t}\n}", "title": "" }, { "docid": "cade2ab6487e41c0e740224e645aac94", "score": "0.5341744", "text": "public function toDom(): DOMDocument\n {\n return $this->document;\n }", "title": "" }, { "docid": "e9b7a844c52137c1a1d9e9509d086056", "score": "0.53372693", "text": "public function testDodo() {\n\t\t/* Instantiate the nodes */\n\t\t$doc = new Document();\n\t\t// @phan-suppress-next-line PhanAccessMethodInternal\n\t\t$doc->_setContentType( 'text/html', true );\n\n\t\t$all_elements = $doc->getElementsByTagName( '*' );\n\t\t$this->assertSame( 0, $all_elements->length );\n\n\t\t$html = $doc->createElement( 'html' );\n\t\t$body = $doc->createElement( 'body' );\n\t\t$comment = $doc->createComment( 'Hello, world!' );\n\t\t$p = $doc->createElement( \"p\" );\n\t\t$img = new HTMLImageElement( $doc, \"img\" ); /* using createElement soon */\n\t\t$img->setAttribute( 'id', \"foo2\" );\n\n\t\t/* Construct the tree */\n\t\t$p->appendChild( $doc->createTextNode( 'Lorem ipsum' ) );\n\t\t$body->appendChild( $comment );\n\t\t$body->appendChild( $img );\n\t\t$body->appendChild( $p );\n\t\t$html->appendChild( $body );\n\t\t$doc->appendChild( $html );\n\t\t$img->setAttribute( 'id', \"foo\" );\n\n\t\t$this->assertEquals( $body, $doc->getBody() );\n\n\t\t/* Print the tree */\n\t\t$this->assertEquals(\n\t\t\t'<body><!--Hello, world!--><img id=\"foo\"><p>Lorem ipsum</p></body>',\n\t\t\t$doc->body->outerHTML\n\t\t);\n\n\t\t/* Update the attributes on the <img> node */\n\t\t$img->alt = \"Incredible Vision\";\n\t\t// $img->width = \"1337px\"; // NOTE: width stored as a string\n\t\t$img->setAttribute( 'width', '1337px' );\n\t\t$img->classList->add( 'foo' );\n\t\t$img->setAttribute( 'class', 'abc foo def' );\n\t\t$img->setWidth( 100 );\n\t\t$img->setHeight( 200 );\n\t\t$img->classList->add( 'bar' );\n\t\t$img->classList->add( 'bat' );\n\t\t$img->classList->replace( 'bat', 'foo' );\n\n\t\t$this->assertEquals( 100, $img->getWidth() );\n\t\t$this->assertEquals( 200, $img->getHeight() );\n\n\t\t/* Print the tree again (<img> should have attributes now) */\n\t\t$result = [];\n\t\t$doc->_htmlSerialize( $result, [] );\n\t\t$this->assertEquals(\n\t\t\t'<html><body><!--Hello, world!--><img id=\"foo\" alt=\"Incredible Vision\" width=\"100\" class=\"abc foo def bar\" height=\"200\"><p>Lorem ipsum</p></body></html>',\n\t\t\timplode( '', $result )\n\t\t);\n\n\t\t$img3 = $doc->getElementById( 'foo' );\n\t\t$this->assertEquals( $img, $img3 );\n\n\t\t$img2 = $html->querySelector( \"#foo\" );\n\t\t$this->assertEquals( $img, $img2 );\n\n\t\t$this->assertTrue( true ); // success is not throwing an exception!\n\n\t\t/* Test getElementsByTagName */\n\t\t$p_tags = $doc->getElementsByTagName( 'p' );\n\t\t$this->assertNotNull( $p_tags );\n\t\t$this->assertInstanceOf( HTMLCollection::class, $p_tags );\n\t\t$this->assertSame( 1, $p_tags->length );\n\n\t\t$first_p_tag = $p_tags->item( 0 );\n\t\t$this->assertNotNull( $first_p_tag );\n\t\t$this->assertInstanceOf( Element::class, $first_p_tag );\n\t\t$this->assertEqualsIgnoringCase( 'P', $first_p_tag->tagName );\n\n\t\t$second_p_tag = $p_tags->item( 1 );\n\t\t$this->assertNull( $second_p_tag );\n\n\t\t/* Test getElementsByTagNameNS */\n\t\t$p_tags_ns = $doc->getElementsByTagNameNS( '*', 'p' );\n\t\t$this->assertNotNull( $p_tags_ns );\n\t\t$this->assertInstanceOf( HTMLCollection::class, $p_tags_ns );\n\t\t$this->assertSame( 1, $p_tags_ns->length );\n\n\t\t$first_p_tag = $p_tags_ns->item( 0 );\n\t\t$this->assertNotNull( $first_p_tag );\n\t\t$this->assertInstanceOf( Element::class, $first_p_tag );\n\t\t$this->assertEqualsIgnoringCase( 'P', $first_p_tag->tagName );\n\n\t\t$second_p_tag = $p_tags_ns->item( 1 );\n\t\t$this->assertNull( $second_p_tag );\n\n\t\t// Test liveness!\n\t\t$body->appendChild( $doc->createElement( \"p\" ) );\n\t\t$this->assertSame( 5, $all_elements->length );\n\n\t\t$this->assertSame( 2, $p_tags->length );\n\t\t$second_p_tag = $p_tags->item( 1 );\n\t\t$this->assertNotNull( $second_p_tag );\n\t\t$this->assertInstanceOf( Element::class, $second_p_tag );\n\t\t$this->assertEqualsIgnoringCase( 'P', $second_p_tag->tagName );\n\n\t\t$this->assertSame( 2, $p_tags_ns->length );\n\t\t$second_p_tag = $p_tags_ns->item( 1 );\n\t\t$this->assertNotNull( $second_p_tag );\n\t\t$this->assertInstanceOf( Element::class, $second_p_tag );\n\t\t$this->assertEqualsIgnoringCase( 'P', $second_p_tag->tagName );\n\n\t\t// Test getElementsByClass name\n\t\t$els_by_class = $doc->getElementsByClassName( 'abc foo def' );\n\t\t$this->assertNotNull( $els_by_class );\n\t\t$this->assertInstanceOf( HTMLCollection::class, $els_by_class );\n\t\t$this->assertSame( 1, $els_by_class->length );\n\n\t\t$first_el = $els_by_class->item( 0 );\n\t\t$this->assertInstanceOf( HTMLImageElement::class, $first_el );\n\t\t$this->assertEqualsIgnoringCase( 'IMG', $first_el->tagName );\n\n\t\t// documentElement should match too\n\t\t$doc->documentElement->setAttribute( 'class', \"test1\\ttest2\\t\" );\n\t\t$els_by_class = $doc->getElementsByClassName( 'test2' );\n\t\t$this->assertNotNull( $els_by_class );\n\t\t$this->assertInstanceOf( HTMLCollection::class, $els_by_class );\n\t\t$this->assertSame( 1, $els_by_class->length );\n\t\t$this->assertSame( $doc->documentElement, $els_by_class[0] );\n\t}", "title": "" }, { "docid": "c0db2dfed1064a78b7ecf0d05ee491ef", "score": "0.53233564", "text": "public function getDOMDocument()\n {\n $node = $this->getNode(0);\n $r = null;\n if ($node instanceof \\DOMElement\n && $node->ownerDocument instanceof \\DOMDocument\n ) {\n $r = $node->ownerDocument;\n }\n return $r;\n }", "title": "" }, { "docid": "08699a9f6da6a5188708c077a1e2a562", "score": "0.53026974", "text": "public static function _parseHtml( Document $doc, string $string, array $options ) {\n\t\t$domBuilder = new class( $doc, $options ) extends DOMBuilder {\n\t\t\t\t/** @var Document */\n\t\t\t\tpublic $doc;\n\t\t\t\t/** @var array */\n\t\t\t\tprivate $options;\n\t\t\t\t/** @var bool */\n\t\t\t\tpublic $sawRealHead = false;\n\t\t\t\t/** @var bool */\n\t\t\t\tpublic $sawRealBody = false;\n\n\t\t\t\t/**\n\t\t\t\t * Create a new DOMBuilder and store the document and\n\t\t\t\t * options array.\n\t\t\t\t * @param Document $doc\n\t\t\t\t * @param array $options\n\t\t\t\t */\n\t\t\t\tpublic function __construct( Document $doc, array $options ) {\n\t\t\t\t\tparent::__construct( [\n\t\t\t\t\t\t'suppressHtmlNamespace' => false,\n\t\t\t\t\t\t'suppressIdAttribute' => true,\n\t\t\t\t\t\t'domExceptionClass' => DOMException::class,\n\t\t\t\t\t] );\n\t\t\t\t\t$this->doc = $doc;\n\t\t\t\t\t$this->options = $options;\n\t\t\t\t}\n\n\t\t\t\t/** @inheritDoc */\n\t\t\t\tprotected function createDocument(\n\t\t\t\t\tstring $doctypeName = null,\n\t\t\t\t\tstring $public = null,\n\t\t\t\t\tstring $system = null\n\t\t\t\t) {\n\t\t\t\t\t// Force this to be an HTML document (not an XML document)\n\t\t\t\t\t$this->doc->_setContentType( 'text/html', true );\n\t\t\t\t\t$this->maybeRemoveDoctype();\n\t\t\t\t\tif ( $this->options['phpCompat'] ?? false ) {\n\t\t\t\t\t\t$this->setDoctype(\n\t\t\t\t\t\t\t'html',\n\t\t\t\t\t\t\t'-//W3C//DTD HTML 4.0 Transitional//EN',\n\t\t\t\t\t\t\t'http://www.w3.org/TR/REC-html40/loose.dtd'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn $this->doc;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Remove a DocumentType from the given document if one\n\t\t\t\t * is present.\n\t\t\t\t */\n\t\t\t\tprivate function maybeRemoveDoctype() {\n\t\t\t\t\t$doctype = $this->doc->getDoctype();\n\t\t\t\t\tif ( $doctype !== null ) {\n\t\t\t\t\t\t$doctype->remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Replace any existing doctype for this document with\n\t\t\t\t * new one.\n\t\t\t\t * @param ?string $name\n\t\t\t\t * @param ?string $public\n\t\t\t\t * @param ?string $system\n\t\t\t\t */\n\t\t\t\tprivate function setDoctype( $name, $public, $system ): void {\n\t\t\t\t\t$this->maybeRemoveDoctype();\n\t\t\t\t\tif ( $name !== '' && $name !== null ) {\n\t\t\t\t\t\t$doctype = new DocumentType(\n\t\t\t\t\t\t\t$this->doc, $name, $public ?? '', $system ?? ''\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->doc->appendChild( $doctype );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/** @inheritDoc */\n\t\t\t\tpublic function doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength ) {\n\t\t\t\t\t$this->setDoctype( $name, $public, $system );\n\t\t\t\t\t// Set quirks mode on our document.\n\t\t\t\t\tswitch ( $quirks ) {\n\t\t\t\t\tcase TreeBuilder::NO_QUIRKS:\n\t\t\t\t\t\t$this->doc->_setQuirksMode( 'no-quirks' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TreeBuilder::LIMITED_QUIRKS:\n\t\t\t\t\t\t$this->doc->_setQuirksMode( 'limited-quirks' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TreeBuilder::QUIRKS:\n\t\t\t\t\t\t$this->doc->_setQuirksMode( 'quirks' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/** @inheritDoc */\n\t\t\t\tpublic function insertElement(\n\t\t\t\t\t$preposition, $refElement,\n\t\t\t\t\tTreeElement $element,\n\t\t\t\t\t$void, $sourceStart, $sourceLength\n\t\t\t\t) {\n\t\t\t\t\tif ( $element->name === 'head' && $sourceLength > 0 ) {\n\t\t\t\t\t\t$this->sawRealHead = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $element->name === 'body' && $sourceLength > 0 ) {\n\t\t\t\t\t\t$this->sawRealBody = true;\n\t\t\t\t\t}\n\t\t\t\t\tparent::insertElement(\n\t\t\t\t\t\t$preposition, $refElement, $element, $void,\n\t\t\t\t\t\t$sourceStart, $sourceLength\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t/** @inheritDoc */\n\t\t\t\tprotected function createNode( TreeElement $element ) {\n\t\t\t\t\t// Simplified version of this method which eliminates\n\t\t\t\t\t// the various workarounds necessary when using the\n\t\t\t\t\t// PHP dom extension\n\n\t\t\t\t\t// It also deliberately bypasses some character validity\n\t\t\t\t\t// checking done in Document::createElementNS(), which\n\t\t\t\t\t// is per-spec. (We need to prevent createElementNS from\n\t\t\t\t\t// trying to parse `name` as a `qname`.)\n\t\t\t\t\t$node = $this->doc->_createElementNS(\n\t\t\t\t\t\t\t$element->name,\n\t\t\t\t\t\t\t$element->namespace,\n\t\t\t\t\t\t\tnull /* prefix */\n\t\t\t\t\t);\n\t\t\t\t\tforeach ( $element->attrs->getObjects() as $attr ) {\n\t\t\t\t\t\t// This also bypasses checks & prefix parsing\n\t\t\t\t\t\tif ( $attr->namespaceURI === null ) {\n\t\t\t\t\t\t\t$node->_setAttribute(\n\t\t\t\t\t\t\t\t$attr->qualifiedName, $attr->value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$node->_setAttributeNS(\n\t\t\t\t\t\t\t\t$attr->namespaceURI, $attr->prefix,\n\t\t\t\t\t\t\t\t$attr->localName, $attr->value\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$element->userData = $node;\n\t\t\t\t\treturn $node;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * This is a reimplementation for efficiency only; the\n\t\t\t\t * code should be identical to (and kept in sync with)\n\t\t\t\t * Remex. We just use method access instead of getters,\n\t\t\t\t * since this is a hot path through the HTML parser.\n\t\t\t\t * @inheritDoc\n\t\t\t\t */\n\t\t\t\tpublic function characters(\n\t\t\t\t\t$preposition, $refElement, $text, $start, $length,\n\t\t\t\t\t$sourceStart, $sourceLength\n\t\t\t\t) {\n\t\t\t\t\t// Parse $preposition and $refElement as in self::insertNode()\n\t\t\t\t\tif ( $preposition === TreeBuilder::ROOT ) {\n\t\t\t\t\t\t$parent = $this->doc;\n\t\t\t\t\t\t$refNode = null;\n\t\t\t\t\t} elseif ( $preposition === TreeBuilder::BEFORE ) {\n\t\t\t\t\t\t$parent = $refElement->userData->parentNode;\n\t\t\t\t\t\t$refNode = $refElement->userData;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$parent = $refElement->userData;\n\t\t\t\t\t\t$refNode = null;\n\t\t\t\t\t}\n\t\t\t\t\t// https://html.spec.whatwg.org/#insert-a-character\n\t\t\t\t\t// If the adjusted insertion location is in a Document node, then\n\t\t\t\t\t// return.\n\t\t\t\t\tif ( $parent === $this->doc ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$data = substr( $text, $start, $length );\n\t\t\t\t\t// If there is a Text node immediately before the adjusted insertion\n\t\t\t\t\t// location, then append data to that Text node's data.\n\t\t\t\t\tif ( $refNode === null ) {\n\t\t\t\t\t\t$prev = $parent->getLastChild();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/** @var Node $refNode */\n\t\t\t\t\t\t$prev = $refNode->getPreviousSibling();\n\t\t\t\t\t}\n\t\t\t\t\tif ( $prev !== null && $prev->getNodeType() === XML_TEXT_NODE ) {\n\t\t\t\t\t\t'@phan-var CharacterData $prev'; /** @var CharacterData $prev */\n\t\t\t\t\t\t$prev->appendData( $data );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$node = $this->doc->createTextNode( $data );\n\t\t\t\t\t\t$parent->insertBefore( $node, $refNode );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t};\n\t\t$treeBuilder = new TreeBuilder( $domBuilder, [\n\t\t\t'ignoreErrors' => true\n\t\t] );\n\t\t$dispatcher = new Dispatcher( $treeBuilder );\n\t\t$tokenizer = new Tokenizer( $dispatcher, $string, [\n\t\t\t'ignoreErrors' => true ]\n\t\t);\n\t\t$tokenizer->execute( [] );\n\n\t\t// For compatibility with PHP's DOMDocument::loadHTML() -- if we didn't\n\t\t// see an actual <head> element during the parse, remove the head;\n\t\t// and if we didn't see an actual <body> during the parse, remove it.\n\t\tif ( $options['phpCompat'] ?? false ) {\n\t\t\t$head = $doc->getHead();\n\t\t\tif (\n\t\t\t\t( !$domBuilder->sawRealHead ) && $head && $head->_empty()\n\t\t\t) {\n\t\t\t\t$head->remove();\n\t\t\t}\n\t\t\t$body = $doc->getBody();\n\t\t\tif (\n\t\t\t\t( !$domBuilder->sawRealBody ) && $body && $body->_empty()\n\t\t\t) {\n\t\t\t\t$body->remove();\n\t\t\t}\n\t\t}\n\n\t\t$result = $domBuilder->getFragment();\n\t\t// @phan-suppress-next-line PhanTypeMismatchReturnSuperType\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5f7830f67af18674a79e02fc52aa85b8", "score": "0.5297922", "text": "function htmlToDoc($html)\n{\n\t$doc = new DOMDocument();\n\t// gag error reporting for all the nonsense that bad html pages generate during parsing\n\t$orig = error_reporting(0);\n\t$doc->loadHTML($html);\n\terror_reporting($orig);\n\treturn $doc;\n}", "title": "" }, { "docid": "cdbb04543f95487113a114f2df31abab", "score": "0.5276934", "text": "protected static function convertToDomDocument($html): DOMDocument\n {\n return tap(new DOMDocument, function (DOMDocument $dom) use ($html) {\n $dom->loadHTML(preg_replace('/>\\s+</', '><', $html));\n $dom->preserveWhiteSpace = false;\n });\n }", "title": "" }, { "docid": "5709b8ca755a63390d24534935ff8037", "score": "0.52566814", "text": "public static function isHtmlDocumentNode(DOMNode|null $node): bool\n {\n return ($node && $node->nodeType == XML_HTML_DOCUMENT_NODE);\n }", "title": "" }, { "docid": "77c15b3b856b4b8972c8198cf14089bf", "score": "0.5244706", "text": "public function test_ToDocument ()\n {\n $doc = new ClinicalDocument();\n $dom = $doc->toDOMDocument();\n $this->assertInstanceOf(\\DOMDocument::class, $dom);\n }", "title": "" }, { "docid": "f72bbef302b0cdc0bea9bba3331c3bba", "score": "0.52415603", "text": "public function loadHtml()\n\t {\n\t\t$http = new HTTPclient($this->link, [], $this->headers);\n\t\tif ($this->proxy === true)\n\t\t {\n\t\t\t$this->html = $http->getWithProxy();\n\t\t }\n\t\telse\n\t\t {\n\t\t\t$this->html = $http->get();\n\t\t } //end if\n\n\t\tif ($this->gzdecode === true)\n\t\t {\n\t\t\t$this->html = gzdecode($this->html);\n\t\t } //end if\n\n\t\t$this->_xml->newElement(\"html\", base64_encode($this->html));\n\t\t$this->doc = $this->_xml->getDoc();\n\t }", "title": "" }, { "docid": "c00ea1096f503353517ea4b2af45e089", "score": "0.5217241", "text": "public function asDom()\n {\n return $this->doc;\n }", "title": "" }, { "docid": "f1cc0f4db8f3939ae550bf099c55702c", "score": "0.5208125", "text": "function CDOC_COMMON_updateHTMLObject($HTMLDOM, $HTMLFile, $ObjID, $HTMLString)\r\n{\r\n\tif(!isset($HTMLDOM))\r\n\t\treturn false;\r\n\tif(!isset($HTMLFile))\r\n\t\treturn false;\r\n\tlibxml_use_internal_errors(true);\r\n\t//libxml_clear_errors();\r\n\t$retval = $HTMLDOM->loadHTMLFile($HTMLFile);\r\n\tlibxml_clear_errors();\r\n\tif($retval != true)\r\n\t{\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t//get the parent of the Object to be updated \r\n\t$currObj = $HTMLDOM->getElementById($ObjID);\r\n\tif(!$currObj)\r\n\t{\r\n\t\treturn false;\r\n\t} \r\n\t\t\r\n\t//get the style attribute now \r\n\t//$stylevalue = $currObj->getAttribute('style'); \r\n\t\r\n\t$divID = \"DIV_\".$ObjID; \r\n\t$parentObj = $currObj->parentNode; \r\n\tif(!$parentObj)\r\n\t{\t\t\r\n\t\treturn false;\r\n\t} \r\n\t//create a temporary DOM and load HTML string onto it \r\n\t$tempdoc = new DOMDocument();\r\n\tlibxml_use_internal_errors(true);\r\n\t//libxml_clear_errors();\r\n\t$retval = $tempdoc->loadHTML($HTMLString);\r\n\tlibxml_clear_errors();\r\n\tif($retval != true)\r\n { \t \r\n\t\treturn false;\t\r\n }\r\n \r\n\t//get the node to be imported from temp DOM \r\n\t$importNode = $tempdoc->getElementById($ObjID); \r\n\tif(!$importNode)\r\n\t{\t\t\r\n\t\treturn false;\r\n\t} \r\n\t\r\n\t//now import the node into HTMLDOM \r\n\t$importNode = $HTMLDOM->importNode($importNode, true); \r\n\tif(!$importNode)\r\n\t{\t\t\r\n\t\treturn false;\r\n\t} \r\n\t\r\n\t//remove the already existing Object from the main DOM \r\n\t$retval = $parentObj->replaceChild($importNode, $currObj);\r\n\tif(!$retval)\r\n\t{\r\n\t\t\r\n\t\treturn false;\r\n\t} \r\n\t\r\n\t// now append the child to the parent \r\n\t$htmldata = $HTMLDOM->saveHTML($importNode);\r\n\t\r\n\t//$htmldata = $HTMLDOM->saveHTML(); \r\n\t\r\n\t$retval = $HTMLDOM->saveHTMLFile($HTMLFile);\r\n\tif($retval == FALSE)\r\n\t{\r\n\t\t\r\n\t\treturn false;\r\n\t} \r\n\t\r\n\treturn true; \r\n\r\n}", "title": "" }, { "docid": "734a3a42b6ae6640b92f8a4736d1f6d6", "score": "0.52039254", "text": "public static function dom($html)\n {\n $html = preg_replace('!(xmlns+:[a-z]+=\\\".*?\\\")!', '', $html);\n\n $dom = new Dom();\n $dom->loadStr($html, [\n 'whitespaceTextNode' => true,\n 'preserveLineBreaks' => true\n ]);\n\n return $dom;\n }", "title": "" }, { "docid": "229363e1023af9cd9c774e48a384742f", "score": "0.51963425", "text": "function nodeHtml(\\DOMNode|\\DOMNodeList $nodeOrNodeList, $descent = true): string\n {\n $html = '';\n if (!$descent) {\n $children = $nodeOrNodeList->childNodes;\n foreach ($children as $child) {\n $tmp_doc = new \\DOMDocument();\n $tmp_doc->appendChild($tmp_doc->importNode($child, true));\n $html .= $tmp_doc->saveHTML();\n }\n return $html;\n }\n if ($nodeOrNodeList instanceof \\DOMText) {\n Logger::debug(\"nodeHtml is DOMText\");\n $html .= $nodeOrNodeList->textContent;\n }\n if ($nodeOrNodeList instanceof \\DOMNodeList) {\n Logger::debug(\"nodeHtml is DOMNodeList\");\n foreach ($nodeOrNodeList as $node) {\n // $html .= utf8_decode($this->xpath->document->saveHTML($node));\n $tmp_doc = new \\DOMDocument();\n $tmp_doc->appendChild($tmp_doc->importNode($node, true));\n $html .= $tmp_doc->saveHTML();\n }\n } else if ($nodeOrNodeList instanceof \\DOMAttr) {\n Logger::debug(\"nodeHtml is DOMAttr\");\n $html .= $nodeOrNodeList->textContent;\n } else if (@$nodeOrNodeList->childNodes) {\n Logger::debug(\"nodeHtml hasChildNodes\");\n $children = $nodeOrNodeList->childNodes;\n foreach ($children as $child) {\n $html .= $this->nodeHtml($child);\n }\n } else {\n $tmp_doc = new \\DOMDocument();\n $tmp_doc->appendChild($tmp_doc->importNode($nodeOrNodeList, true));\n $html .= $tmp_doc->saveHTML();\n }\n return $html;\n }", "title": "" }, { "docid": "5499b5335cd4382117142c85ee56397c", "score": "0.51811624", "text": "protected function _setUpDom($url) {\n\t\t$this->_dom = new DOMDocument('1.0');\n\t\t@$this->_dom->loadHTMLFile($url); \n\t\t$this->_xpath = new DOMXPath($this->_dom);\n\t}", "title": "" }, { "docid": "0a6856fe5df36233e7882bb0edd52694", "score": "0.51674116", "text": "private function book2DOMNode($dom) {\n $bookNode = $dom->createElement('book');\n\n // bookId\n $item = $dom->createElement('id');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->bookId);\n $item->appendChild($data);\n\n // schoolCode\n $item = $dom->createElement('schoolCode');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->schoolCode);\n $item->appendChild($data);\n\n // bookTitle\n $item = $dom->createElement('bookTitle');\n $bookNode->appendChild($item);\n\n $data = $dom->createCDATASection($this->bookTitle);\n $item->appendChild($data);\n\n // overview\n $item = $dom->createElement('overview');\n $bookNode->appendChild($item);\n\n $data = $dom->createCDATASection($this->overview);\n $item->appendChild($data);\n\n // image\n $item = $dom->createElement('image');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->image);\n $item->appendChild($data);\n\n // about\n $item = $dom->createElement('about');\n $bookNode->appendChild($item);\n\n $data = $dom->createCDATASection(($this->about));\n $item->appendChild($data);\n\n // adminEmail\n $item = $dom->createElement('adminEmail');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->adminEmail);\n $item->appendChild($data);\n\n // showSearch\n $item = $dom->createElement('showSearch');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->showSearch);\n $item->appendChild($data);\n\n // lang\n $item = $dom->createElement('lang');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->lang);\n $item->appendChild($data);\n\n // theme\n $item = $dom->createElement('theme');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->theme);\n $item->appendChild($data);\n\n // htmlEditor\n $item = $dom->createElement('htmlEditor');\n $bookNode->appendChild($item);\n\n $data = $dom->createTextNode($this->htmlEditor);\n $item->appendChild($data);\n\n // descriptors\n $item = $dom->createElement('descriptors');\n $bookNode->appendChild($item);\n\n $data = $dom->createCDATASection($this->descriptors);\n $item->appendChild($data);\n\n // chapters\n $chapters = $dom->createElement('chapters');\n $bookNode->appendChild($chapters);\n\n foreach ($this->getChapters() as $chapter) {\n $chapters->appendChild($chapter->chapter2DOMNode($dom));\n }\n\n return $bookNode;\n }", "title": "" }, { "docid": "f1811f28da513b70a9e1d0fd3e2e8022", "score": "0.51667684", "text": "protected function parser(&$dom)\r\n\t{\r\n\t\t// Dom Parsing\r\n\t\t$this->_htm_buffer = \"\";\r\n\t\t$this->processSet($dom);\r\n\t\t\r\n\t\t$this->parseLoop($dom);\r\n\t\t//$dom = $this->parseRegexVars($dom);\r\n\t\t$this->parseIf($dom);\r\n\t\t//$dom = $this->parseHtmlTag($dom);\r\n\t\t$this->_html_buffer = $dom;\r\n\t}", "title": "" }, { "docid": "9030aaebfc8399d69ee10e0a2ed47054", "score": "0.5166", "text": "public function render(DOMElement &$element, $data = []);", "title": "" }, { "docid": "033318eafd8d7dcb4775b3a8163b8a95", "score": "0.5152266", "text": "function get_inner_html( $node ) { \n $innerHTML= ''; \n $children = $node->childNodes; \n foreach ($children as $child) { \n $innerHTML .= $child->ownerDocument->saveXML( $child ); \n } \n \n return $innerHTML; \n}", "title": "" }, { "docid": "d96e83b1fdf1592ec2f8f770a061c717", "score": "0.51507443", "text": "private function extractHtmlFromData(){\n\n $data = $this->data;\n\n $dom = new DOMDocument(\"1.0\", \"utf-8\");\n// @$dom->loadHTML($data);\n\n libxml_use_internal_errors(true);\n if(!$dom->loadHTML($data)){\n foreach (libxml_get_errors() as $error) {\n var_dump($error);\n }\n libxml_clear_errors();\n }\n\n\n // Input can be an HTML or an RDF containing a tag with the HTML.\n // We look for said tag, if it's there then we use it, otherwise we take the whole input\n $FPhtmlNodeList = $dom->getElementsByTagNameNS($this->Fp3Ns, $this->RDFHtmlTag);\n\n if ($FPhtmlNodeList->length != 0){\n // this is a well-formed RDF with a RDF:HTML literal node containing the HTML, we take it\n $FPHtmlNode = $FPhtmlNodeList->item(0);\n $htmlNodeList = $FPHtmlNode->getElementsByTagName('html');\n $htmlNode = $htmlNodeList->item(0);\n return $dom->saveHTML($htmlNode);\n } else {\n // this is not a well-formed RDF documents, let's see if it's an HTML one\n return $dom->saveHTML();\n }\n\n }", "title": "" }, { "docid": "06392caf34ae3b66453414fa365db59c", "score": "0.51484823", "text": "function ombumedia_dom_load_html($snippet) {\n $document = <<<EOD\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head>\n<body>!snippet</body>\n</html>\nEOD;\n // PHP's \\DOMDocument serialization adds straw whitespace in case the markup\n // of the wrapping document contains newlines, so ensure to remove all\n // newlines before injecting the actual HTML body to process.\n $document = strtr($document, array(\"\\n\" => '', '!snippet' => $snippet));\n\n $dom = new \\DOMDocument();\n // Ignore warnings during HTML soup loading.\n @$dom->loadHTML($document);\n\n return $dom;\n}", "title": "" }, { "docid": "6688cd655205c49beb48e27fb3dcd30d", "score": "0.5146683", "text": "public function document(): DOMDocument\n {\n $document = new DOMDocument();\n $document->loadXML($this->source());\n return $document;\n }", "title": "" }, { "docid": "fcfc4a34adedf9d5eb023da6587f3d94", "score": "0.5141447", "text": "protected function build()\n {\n return new \\DOMDocument();\n }", "title": "" }, { "docid": "dc8a70e2f857dbefe019b2d1a4e2b308", "score": "0.51413035", "text": "public function getDomDocument()\n {\n if($this->guzzleResponse === null){\n return null;\n }\n if ($this->domConverter === null) {\n throw new \\RuntimeException(\"No DomConverter provided in the request\");\n }\n if ($this->domDocCache === null) {\n $this->domDocCache = $this->domConverter->convert($this->getBody());\n }\n /** @var \\DOMDocument $d */\n $d = $this->domDocCache->cloneNode(true);\n return $d;\n }", "title": "" }, { "docid": "0725e7aa06834741fab2dcfed421b294", "score": "0.506964", "text": "public static function from_dom(DOMElement $dom) {\n\t\t$type = new self();\n\n\t\tif ($dom->getAttribute('required') == 'true') {\n\t\t\t$type->required = true;\n\t\t} else {\n\t\t\t$type->required = false;\n\t\t}\n\n\t\t$type->uri = $dom->nodeValue;\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "82abfb9902443a77da290bb58794dd7f", "score": "0.505978", "text": "public function importDocument(DOMDocument $importedDocument) {\n\t\tif (!($importedDocument->documentElement && ($documentElement = $this->importNode($importedDocument->documentElement, true))))\n\t\t\treturn false;\n\t\t\t\n\t\treturn $documentElement;\n\t}", "title": "" }, { "docid": "5acd4c7f737ee60eabf57b8fc4a384c9", "score": "0.50590897", "text": "public function getDom()\n {\n return $this->dom;\n }", "title": "" }, { "docid": "0bb44f54aa7a5c0f877aa45bc3eac373", "score": "0.50569844", "text": "public function toDOMElement(DOMDocument $dom): DOMElement\n {\n $node = $dom->createElementNS(self::NODE_NS_URI, self::NODE_NS_NAME);\n\n foreach ($this->getAttributes() as $attr => $value) {\n $node->setAttribute($attr, $value);\n }\n\n // Related Document Node\n foreach ($this->documents as $document) {\n $documentNode = $document->toDOMElement($dom);\n $node->appendChild($documentNode);\n }\n\n // Taxes Node\n foreach ($this->taxes as $taxes) {\n $taxesNode = $taxes->toDOMElement($dom);\n $node->appendChild($taxesNode);\n }\n\n return $node;\n }", "title": "" }, { "docid": "64fbd2349590cc66e4bec83fda26ce8b", "score": "0.50532925", "text": "static public function importNode ( \\DOMDocument $doc, \\DOMNode $node )\n {\n // If there is no owner, or it has a different owner, import it\n if ( is_null($node->ownerDocument) || !$node->ownerDocument->isSameNode( $doc ) )\n $node = $doc->importNode( $node, TRUE );\n\n return $node;\n }", "title": "" }, { "docid": "727ccee0ce2d2bb71723b1e5d5968805", "score": "0.5049611", "text": "public function getInvalidXmlDocument()\n {\n return $this->dom;\n }", "title": "" }, { "docid": "796294a8f453853403dd541f9a1e38d2", "score": "0.5044068", "text": "public static function printDom(DOMDocument $dom) {\n $p = self::getInstance();\n $p->debug_log(\"Converting the DOM back to HTML\");\n // Check for failure to generate HTML\n // DOMDocument::saveHTML() returns null on error\n $new_html = $dom->saveHTML();\n\n // Remove the DOMDocument make-happy encoding prefix:\n if (self::isPjax()) {\n $remove_prefix_pattern = '@<\\?xml encoding=\"UTF-8\" />@';\n $new_html = preg_replace($remove_prefix_pattern, '', $new_html);\n }\n return $new_html;\n }", "title": "" }, { "docid": "52c8e67c2f99623c777cb4affd68947d", "score": "0.5037588", "text": "public function parseHtmlTag($dom )\r\n\t{\r\n\t\t// Code to Parse HtmlTag\r\n\t\t$buffer = null;\r\n\t\t$child = null;\r\n\t\t$htmtags = $dom->find(\"ipml:htmltag\");\r\n\t\t\r\n\t\tforeach( $htmtags as $htmtag )\r\n\t\t{\r\n\t\t\t$child = $htmtag->find(\"ipml:htmltag\");\r\n\t\t\t\r\n\t\t\tif( count($child) > 0 ) {\r\n\t\t\t\t$this->parseHtmlTag( $htmtag );\r\n\t\t\t}\r\n\r\n\t\t\t$stratr = null;\r\n\t\t\t$attrs = $htmtag->getAllAttributes();\r\n\r\n\t\t\tforeach($attrs as $attrname=>$attrval)\r\n\t\t\t{\r\n\t\t\t\tif( \"type\" == strtolower($attrname) ) continue;\r\n\t\t\t\t\t$stratr.=$attrname.\"=\\\"\".$attrval.\"\\\" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$val = $htmtag->innertext;\r\n\t\t\t$tag = \"<\".$htmtag->type.\" \".$stratr.\">\".$val.\"</\".$htmtag->type.\">\";\r\n\t\t\t$htmtag->outertext = $tag;\r\n\t\t\t\r\n\r\n\t\t\t//$child = $htmtag->find(\"ipml:htmltag\");\r\n\t\t}\r\n\t\treturn $dom;\r\n\t}", "title": "" }, { "docid": "25bb9530c2798a09b04b0d059b8514df", "score": "0.503689", "text": "public function setDomDocument(DOMDocument $doc)\n {\n $this->_domDoc = $doc;\n }", "title": "" }, { "docid": "6adbe3ad2f2e1a086c4b8166128f0a44", "score": "0.5031", "text": "public function toArray(DOMDocument $domDocument, DOMElement $node) : array;", "title": "" }, { "docid": "1642d8d479e862a741448786a93fbb8b", "score": "0.502374", "text": "abstract protected function getElementTag (): string;", "title": "" }, { "docid": "b36bfc2bcc496b0db0f9399d1d81e088", "score": "0.5022657", "text": "public function __construct(\\DOMElement $element) {\r\n parent::__construct($element);\r\n $this->element = $element;\r\n }", "title": "" }, { "docid": "7399ad23e24c6100cee51eeed23701e2", "score": "0.5019444", "text": "public function loadXML($node = null)\r\n\t{\r\n\t\t$objNode = null;\r\n\t\t\r\n\t\tif ( is_string($node) )\r\n\t\t{\r\n\t\t\t$objNode = new DOMDocument();\r\n\t\t\t$objNode->loadXML($node);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$objNode = $node;\r\n\t\t}\r\n\t\t\r\n\t\tif ( $objNode != null )\r\n\t\t{\r\n\t\t\t$objLeader = $objNode->getElementsByTagName(\"leader\");\r\n\t\t\t$objControlFields = $objNode->getElementsByTagName(\"controlfield\");\r\n\t\t\t$objDataFields = $objNode->getElementsByTagName(\"datafield\");\r\n\t\t\t\r\n\t\t\t$this->leader = new Xerxes_Marc_Leader($objLeader->item(0));\r\n\t\t\t\r\n\t\t\tforeach ( $objControlFields as $objControlField )\r\n\t\t\t{\r\n\t\t\t\t$controlfield = new Xerxes_Marc_ControlField($objControlField);\r\n\t\t\t\tarray_push($this->_controlfields, $controlfield);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ( $objDataFields as $objDataField )\r\n\t\t\t{\r\n\t\t\t\t$datafield = new Xerxes_Marc_DataField($objDataField);\r\n\t\t\t\tarray_push($this->_datafields, $datafield);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if this was actually a DOMDocument in itself\r\n\t\t\t\r\n\t\t\tif ( $objNode instanceof DOMDocument )\r\n\t\t\t{\r\n\t\t\t\t$this->document = $objNode;\r\n\t\t\t\t$this->node = $objNode;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// we'll convert this node to a DOMDocument\r\n\t\t\t\t\r\n\t\t\t\t// first import it into an intermediate doc, \r\n\t\t\t\t// so we can also import namespace definitions as well as nodes\r\n\t\t\t\t\r\n\t\t\t\t$intermediate = new DOMDocument();\r\n\t\t\t\t$intermediate ->loadXML(\"<wrapper />\");\r\n\t\t\t\t\r\n\t\t\t\t$import = $intermediate->importNode($objNode, true);\r\n\t\t\t\t$our_node = $intermediate->documentElement->appendChild($import);\r\n\t\t\t\t\r\n\t\t\t\t// now get just our xml, minus the wrapper\r\n\t\t\t\t\r\n\t\t\t\t$this->document = new DOMDocument();\r\n\t\t\t\t$this->document->loadXML($intermediate->saveXML($our_node));\r\n\t\t\t\t$this->node = $this->document->documentElement;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// now create an xpath object and the current node as properties\r\n\t\t\t// so we can query based on this node, not the wrapper parent\r\n\t\t\t// see the xpath() function below\r\n\t\t\t\r\n\t\t\t$this->xpath = new DOMXPath($this->document);\r\n\t\t\t$this->xpath->registerNamespace(\"marc\", $this->namespace);\r\n\t\t\t\r\n\t\t\t// sub-class implements this\r\n\t\t\t\r\n\t\t\t$this->map();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f280cef149e3a2fa6b6e73a205c3921c", "score": "0.50107956", "text": "public function loadNode($rep) {\r\n\t\treturn $this->getElement($rep);\r\n\t}", "title": "" }, { "docid": "f8f94fa2e4ec8cee5ac1b20007def867", "score": "0.5006714", "text": "private function loadAuthorInfoDom() {\n $dom = new DOMDocument();\n $dom->loadXML(file_get_contents('../fixtures/authorInfo.xml'));\n return $dom;\n }", "title": "" }, { "docid": "9c07c096fa7c52ec81225cd64bcaaef5", "score": "0.499569", "text": "function file_to_doc($filename)\n{\n\t$html = file_get_contents($filename);\n\t$doc = new DOMDocument();\n\t$doc->loadHTML($html);\n\t//echo $doc->saveHTML();\n\treturn $doc;\n}", "title": "" }, { "docid": "e82de79ad7be23c744e06a99bce0b3de", "score": "0.49940294", "text": "function testArray2DomWithFragmentNodes() {\n $array = array(\n 'alive' => true,\n 'html' => '<strong>I feel good.</strong>',\n );\n \n $dom = new DOMDocument();\n $dom->loadXML(\"<doc/>\");\n api_helpers_xml::array2dom($array, $dom, $dom->documentElement,\n null, array('html'));\n \n $this->assertText($dom, '/doc/alive', 'true');\n $this->assertText($dom, '/doc/html/strong', 'I feel good.');\n }", "title": "" }, { "docid": "90ede9c695664116b3684bc3bb8e2528", "score": "0.49881372", "text": "public function updateDOMObjectWithPOST($ambiguousDomObject)\n\t{\n\t\t//This accept a lot of different object but outputs a DOM\n\t\t//used in the updating via a POST\n\t\tif ('DOMNodeList' == get_class($ambiguousDomObject))\n\t\t{\n\t\t\t$domList = $ambiguousDomObject;\n\t\t\t$dom = new DOMDocument();\n\t\t\tfor ($i = 0; $i < $domList->length; $i++)\n\t\t\t{\n\t\t\t$domnode = $dom->importNode($domList->item($i), true);\n\t\t\t$dom->appendChild($domnode);\n\t\t\t$dom = $this->updateDOMObjectWithPOST_internal($dom);\n\t\t\t}\n\t\t}\n\t\telseif ('SimpleXMLElement' == get_class($ambiguousDomObject))\n\t\t{\n\t\t\t$dom = dom_import_simplexml($ambiguousDomObject);\n\t\t\t$dom = $this->updateDOMObjectWithPOST_internal($dom);\n\t\t}\n\t\telseif ('DOMNode' == get_class($ambiguousDomObject))\n\t\t{\n\t\t\tprint \"DOMNode traverseDOM to be done but we want to see if its used\"; die;\n\t\t}\n\t\telseif ('DOMDocument' == get_class($ambiguousDomObject))\n\t\t{\n\t\t\t$dom = $ambiguousDomObject;\n\t\t\t$dom = $this->updateDOMObjectWithPOST_internal($dom);\n\t\t}\n\t\telseif ('DOMElement' == get_class($ambiguousDomObject))\n\t\t{\n\t\t\t$dom = new DOMDocument();\n\t\t\t$domnode = $dom->importNode($ambiguousDomObject, true);\n\t\t\t$dom->appendChild($domnode);\n\t\t\t$dom = $this->updateDOMObjectWithPOST_internal($dom);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint \"UNKNOWN DATA TYPE in updateDOMObjectWithPOST\"; die;\n\t\t}\n\t\treturn $dom;\n\t}", "title": "" }, { "docid": "85b68960cadbf4041c66efd73d8076d4", "score": "0.49846566", "text": "public static function str_get_dom($str, $lowercase = true)\n {\n $dom = new SimpleHTMLDom;\n $dom->load($str, $lowercase);\n return $dom;\n }", "title": "" }, { "docid": "5cf126d982ab34c9221f3e32c5aae83a", "score": "0.49694133", "text": "public function testCanGetDom()\n {\n $xml = '<?xml version=\"1.0\" standalone=\"yes\"?><metadata created=\"2013-02-28T08:08:03.926Z\" xmlns=\"http://musicbrainz.org/ns/mmd-2.0#\" xmlns:ext=\"http://musicbrainz.org/ns/ext#-2.0\"><artist-list count=\"153\" offset=\"0\"><artist id=\"ffafec4f-69d8-46c1-a09b-c3b8b25482ee\" type=\"Group\" ext:score=\"100\"><name>Metal Skool</name><sort-name>Metal Skool</sort-name><life-span><ended>false</ended></life-span><alias-list><alias>Danger Kitty</alias><alias>Metal Sludge All-Stars</alias><alias>National Lampoon\\'s Metal Skool</alias><alias>Metal Shop</alias></alias-list></artist><artist id=\"db97aca2-0102-48ba-949c-f96d0d69562c\" type=\"Person\" ext:score=\"94\"><name>Jeff Metal</name><sort-name>Metal, Jeff</sort-name><life-span><ended>false</ended></life-span><alias-list><alias>J Metal</alias></alias-list><tag-list><tag count=\"1\"><name>uk</name></tag><tag count=\"1\"><name>photographer</name></tag><tag count=\"1\"><name>designer</name></tag></tag-list></artist></artist-list></metadata>';\n \n $abstractResultSetAdapter = $this->getMockForAbstractClass('MphpMusicBrainz\\Adapter\\Xml\\ResultSet\\AbstractResultSetAdapter', array($xml), 'AbstractResultSetAdapter', true);\n $this->assertInstanceOf('MphpMusicBrainz\\Adapter\\Xml\\ResultSet\\AbstractResultSetAdapter', $abstractResultSetAdapter);\n \n $reflectionObject = new \\ReflectionObject($abstractResultSetAdapter);\n \n $reflectionGetMethod = $reflectionObject->getMethod('getDom');\n $reflectionGetMethod->setAccessible(true);\n \n $dom = $reflectionGetMethod->invoke($abstractResultSetAdapter);\n \n $this->assertInstanceOf('DOMDocument', $dom);\n }", "title": "" }, { "docid": "bd3546db8091df32dffd66a354557da6", "score": "0.4937993", "text": "public function isHtmlDocument()\n {\n $node = $this->getNode(0);\n if ($node instanceof \\DOMElement\n && $node->ownerDocument instanceof \\DOMDocument\n && $node->ownerDocument->documentElement === $node\n && $node->nodeName == 'html'\n ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0c5e29ea9c922bfd7be6a00c45c7a47e", "score": "0.49347064", "text": "public function getTree(): ElementTree;", "title": "" }, { "docid": "62f77af8fbd207b0b6f13bede24d1016", "score": "0.49343666", "text": "function setDomFromXML($refresh=false) {\n\t\tif ($refresh || $this->xdom===NULL) {\n\t\t\t$this->xdom = new DOMDocument('1.0', 'UTF-8');\n\t\t\tif ($this->xstr) $this->xdom->loadXML( $this->xstr );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a162542dc36252ef12a5c1dd0347ec37", "score": "0.49326771", "text": "private function doDomFind($dom)\n {\n $config = $this->getConfig();\n return $dom->find($config->getXpath());\n }", "title": "" }, { "docid": "de6f31611d3db44028ac350420173fa7", "score": "0.49167868", "text": "public function linkNode(\\DOMNode $node, \\DOMDocument $dom, array $attributes);", "title": "" }, { "docid": "d71733e524a6a092aa7a365dede35bfc", "score": "0.49022332", "text": "function xpath_new_context($dom_document)\n{\n}", "title": "" }, { "docid": "0ea20e17241e78b0ce7a3fee3802d139", "score": "0.49001285", "text": "public function loadString( $string )\n {\n // Use internal error handling to handle XML errors manually.\n $oldXmlErrorHandling = libxml_use_internal_errors( true );\n libxml_clear_errors();\n\n // Load XML document\n $this->document = new DOMDocument();\n $this->document->registerNodeClass( 'DOMElement', 'ezcDocumentPropertyContainerDomElement' );\n\n // Use the loadHtml method here, as it for example convers tag names\n // and attribute names to lower case, and handles some more errors\n // common in HTML documents.\n $this->document->loadHtml( $string );\n\n $errors = ( $this->options->failOnError ?\n libxml_get_errors() :\n null );\n\n libxml_clear_errors();\n libxml_use_internal_errors( $oldXmlErrorHandling );\n\n // If there are errors and the error handling is activated throw an\n // exception with the occured errors.\n if ( $errors )\n {\n throw new ezcDocumentErroneousXmlException( $errors );\n }\n }", "title": "" }, { "docid": "c5ebf6ec12fb22a7e5210e5af38536c0", "score": "0.48975512", "text": "public function setDocumentDom(DOMDocument $document)\n {\n $this->_document = $document;\n $this->_docType = self::DOC_DOM;\n if (null !== $document->encoding) {\n $this->setEncoding($document->encoding);\n }\n return $this;\n }", "title": "" }, { "docid": "ebfee3300e60d1e73d3ee293afe42937", "score": "0.48958787", "text": "private static function getDOM($html)\n {\n libxml_use_internal_errors(true);\n $doc = new DOMDocument('1.0', 'UTF-8');\n $success = $doc->loadHTML('<div id=\"_mathb_code\">' .\n $html .\n '</div>');\n return $doc->getElementById(\"_mathb_code\");\n }", "title": "" }, { "docid": "85d111ed5e394d5781fb6d5e70bda4c6", "score": "0.48912993", "text": "public function loadString( $string )\n {\n $this->document = new DOMDocument();\n $this->document->loadXml( $string );\n }", "title": "" }, { "docid": "1ba520f3b9a2cf29e1b42a87835dbdd9", "score": "0.48842922", "text": "function get_dom_for_url($url){\n $dom = new DomDocument(\"1.0\");\n // cache key - chop off \"http://www.thingiverse.com\" and sluggify\n $t_key = \"thingiverse-stream-\" . sanitize_title(substr($url,27));\n $dom_str = get_transient($t_key);\n if(false === $dom_str){\n @$dom->load($url); // use @ to suppress parser warnings\n $xml_data = $dom->saveXML();\n set_transient($t_key, $xml_data, 3600);\n } else {\n @$dom->loadXML($dom_str); // use @ to suppress parser warnings\n }\n return $dom;\n }", "title": "" }, { "docid": "2bd8171687861ecae65b16e8bb3a9a94", "score": "0.48800248", "text": "public function load($data) {\n if (is_string($data)) {\n $data = trim($data);\n if (empty($data)) {\n return;\n }\n $dom = new PapayaXmlDocument();\n if (0 === strpos($data, '<')) {\n $dom->loadXml($data);\n } else {\n $dom->load($data);\n }\n if (isset($dom->documentElement)) {\n $this->pages()->load($dom->documentElement);\n }\n } elseif ($data instanceOf PapayaXmlElement) {\n $this->pages()->load($data);\n }\n }", "title": "" }, { "docid": "c50be81a77e444f6e5053bea450b62b6", "score": "0.48739073", "text": "public function __construct(DOMDocument $builder) {\n parent::__construct($builder, 'select');\n }", "title": "" }, { "docid": "7affbd629363f2589897564aaba3f6b9", "score": "0.48730883", "text": "public function assertHtmlDomEquals($expected, $actual, $message = null)\n {\n $expectedDom = new DOMDocument();\n $expectedDom->loadHTML($expected);\n\n $actualDom = new DOMDocument();\n $actualDom->loadHTML($actual);\n\n $this->assertEquals($expectedDom->saveHTML(), $actualDom->saveHTML(), $message);\n }", "title": "" } ]
007e1b0b9e2732d71c05b865145aec8b
/ FUNCTIONS FOR THIS FILE. / Establish a connection with MySQL server and your database.
[ { "docid": "3ef1682b8231e9035ab4ffb1423e11f5", "score": "0.0", "text": "function getDB_and_constants ()\n{\t\n\t/*\n\t** *********************************************\n\t** DEFINE CONSTANTS (FOR THE CALENDAR).\n\t** *********************************************\n\t*/\n\t// Define constants for the calendar's text content.\n\tdefine (\"ORGANIZATION\", \"Guelph Montessori School\");\n\tdefine (\"ADDRESS\", \"151 Waterloo Avenue, Guelph, ON Canada N1H 3H9\");\n\tdefine (\"PHONE\", \"(519) 836-3810\");\n\tdefine (\"EMAIL\", \"[email protected]\");\n\t// The following NOTE value appears just above the calendar output.\n\tdefine (\"NOTE\", \"The following event dates are subject to change. Use this \n\t\t\t\tcalendar frequently to verify dates as the year progresses.\");\n\t\n\t// Define key months to configure the academic/fiscal year.\n\tdefine (\"IS_ONE_YEAR\", FALSE);\n\tdefine (\"YEAR1_START_MONTH\", 7);\t// July to ...\n\tdefine (\"YEAR1_END_MONTH\", 12);\t\t// December.\n\tdefine (\"YEAR2_START_MONTH\", 1);\t// January to ...\n\tdefine (\"YEAR2_END_MONTH\", 6);\t\t// June.\n\t\n\t/*\n\t** *********************************************\n\t** Connect to db and return handle.\n\t** *********************************************\n\t*/\n\t// Edit file config.php as required for your database.\n\tinclude(\"../../config.php\");\n\t\n\t// Define the database handle ($dbh).\n\t$dbh = @mysql_connect ($host, $username, $password) \n\tor die ( 'I cannot connect to the database because: ' . mysql_error() );\n\tmysql_select_db ($database);\n\t\n\treturn ($dbh);\n}", "title": "" } ]
[ { "docid": "059bb36d37947870791e322668841f21", "score": "0.8226221", "text": "function connect() {\n\t// connect to the database.\n\t$mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);\n\tmysql_select_db(DATABASE_NAME);\n}", "title": "" }, { "docid": "ef9e22b3e9a5f51dd20240fc9dd48b29", "score": "0.80602884", "text": "function connectionMySQL() \n\t {\n\t\t // can also set these values in the connectMYSQL() function and using\n\t\t // the selectDB() function.\n\t\t if (!$this->connect(dbHostname, dbUsername, dbPassword, dbName, false)) \n\t\t \t$this->printLastError(false);\t\n\t\n\t\t $this->autoSlashes = true;\n\t }", "title": "" }, { "docid": "8a497fddd54e58643c75fe50a53f728e", "score": "0.8014014", "text": "function connect() {\n\t\t$this->DBLink = @mysql_connect($this->server, $this->dbuser, $this->dbpass);\n\t\n\t\tif (!$this->DBLink) {\n\t\t\t$this->returnError(\"Failed to open DB connection: <strong>\" . $this->server . \"</strong>.\");\n\t\t}\n\t\n\t\tif(!@mysql_select_db($this->dbname)) {\n\t\t\t$this->returnError(\"Failed to select database: <strong>\" . $this->dbname . \"</strong>.\");\n\t\t}\n\t}", "title": "" }, { "docid": "ec1edc4e46548c16c2c8890e6190f473", "score": "0.80010766", "text": "public function connect(){\n\t\t$this->connection = mysql_connect( $this->host, $this->user, $this->password );\n\t\tmysql_select_db( $this->dbName, $this->connection );\n\t}", "title": "" }, { "docid": "0ed4c92ba6894d01a36303b1389b7a48", "score": "0.7983439", "text": "public function connect(){\n\t\t// Create connection\n\t\t$conn = mysql_connect(\"localhost\", \"root\", \"\");\n\t\tmysql_select_db(\"metavera\",$conn);\n\n\t\t// Check connection\n\t\tif (!$conn) {\n\t\t\tdie(\"Connection failed\");\n\t\t}\n\t}", "title": "" }, { "docid": "a58c1bcb788d812c40bf6726203fe9bc", "score": "0.7980435", "text": "function dbconnect()\n\t\t{\n\t\t\tmysql_connect($GLOBALS['DB_Connection'],\n\t\t\t$GLOBALS['DB_User'],\n\t\t\t$GLOBALS['DB_Password']\n\t\t\t) or $this->xmlend (\"can not connect to mysql\");\n\n\t\t\t$db = $GLOBALS['DB_Database'];\n\t\t\tmysql_select_db($db) or $this->xmlend (\"can not connect to database $db\");\n\t\t}", "title": "" }, { "docid": "6d6f8a94c2f62f5cd0af766917b3fd88", "score": "0.7961166", "text": "public function connect()\n\t{\n\t\tif(!$this->conn = mysql_connect(HOSTNAME, USERNAME, PASSWORD))\n\t\t{\n\t\t\tdie(\"MYSQL Error:\".mysql_error());\n\t\t} // END If\n\t\telse\n\t\t{\n\t\t\tmysql_select_db(DBNAME, $this->conn);\n\t\t\tmysql_query(\"SET NAMES 'UTF8'\");\n\t\t} // END Else\n\t}", "title": "" }, { "docid": "b9d0417f66e86aa1dc78be5200846c01", "score": "0.79559726", "text": "function getConnection(){\n\t\t\tmysql_connect(HOST,USERNAME_HOST,PASSWORD_HOST) or die(\"Could not connect: \" . mysql_error());\n\t\t\t//change to your database name\n\t\t\tmysql_select_db(\"jqcalendar\") or die(\"Could not select database: \" . mysql_error());\n\t\t}", "title": "" }, { "docid": "681b143902f9458bdf7387dcfcd9689b", "score": "0.794605", "text": "function connect() {\n\tif($GLOBALS['db']['connected']) {\n\t\tdisconnect();\n\t}\n\t$GLOBALS['db']['conn'] = new mysqli(\n\t\t$GLOBALS['db']['server'],\n\t\t$GLOBALS['db']['user'],\n\t\t$GLOBALS['db']['pass'],\n\t\t$GLOBALS['db']['database']\n\t);\n\tif ($GLOBALS['db']['conn']->connect_error) {\n\t\tdie(\"Connection failed: \" . $GLOBALS['db']['conn']->connect_error);\n\t}\n\t$GLOBALS['db']['connected'] = true;\n}", "title": "" }, { "docid": "f182df17f89a490d2cbb8603d4451178", "score": "0.7909199", "text": "function db_connect() {\n\n\t\t$this->is_mysql = true;\n\n\t\t$this->dbh = mysqli_connect( $this->dbhost, $this->dbuser, $this->dbpassword ); //@ en mysqli function\n\n\t\tif ( !$this->dbh ) {\n\t\t\n\t\t\tdie('Could not connect: ' . mysql_error());\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->ready = true;\n\n\t\t$this->select( $this->dbname, $this->dbh ); \t\n\t}", "title": "" }, { "docid": "6b546eef6b36296f62a5f490b9ebfb8a", "score": "0.7908585", "text": "protected function connectMySQL() {\n $this->debugPrint('Contacting MySQL Server...');\n\n /* Create the connection to the Authentication DB */\n $this->authdb = @new mysqli($this->db_auth_host, $this->db_auth_user, $this->db_auth_pass, $this->db_auth_data);\n if ($this->authdb->connect_errno)\n $this->callError(\"Error: Could not connect to auth database!! MySQL returned: \" . $this->authdb->connect_error);\n\n /* Create the connection to the backend DB */\n $this->backdb = new mysqli($this->db_back_host, $this->db_back_user, $this->db_back_pass, $this->db_back_data);\n if ($this->backdb->connect_errno)\n $this->callError(\"Error: Could not connect to backend database!! MySQL returned: \" . $this->backdb->connect_error);\n }", "title": "" }, { "docid": "032af14f68cbe49080603e1072124a6a", "score": "0.7886784", "text": "function db_connect()\n\t{\n\t\t$this->is_mysql = true;\n\n\t\t$this->dbh = mysqli_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport );\n\t\tif( !$this->dbh )\n\t\t{\n\t\t\tdie(\"db connect error\");\n\t\t}\n\n\t\t$this->set_charset( $this->dbh, $this->charset );\n\t\t$this->ready = true;\n\t}", "title": "" }, { "docid": "e245a7770908f668135e8381751f7428", "score": "0.7883819", "text": "function connect() {\n $connection = mysql_connect($this->settings['dbhost'], $this->settings['dbuser'], $this->settings['dbpass']) or die(mysql_error());\n mysql_select_db($this->settings['dbname'], $connection) or die(mysql_error());\n }", "title": "" }, { "docid": "753d91c7206310ac6e70a7b253616f93", "score": "0.7876488", "text": "function connect()\n{\r\n\t$con = mysql_connect($hostname,$username,$password)\r\n\tor die('Could not connect: ' . mysql_error());\r\n\r\n\t//select the database\r\n\tmysql_select_db($database, $con)\r\n\tor die('Could not select database: ' . mysql_error());\r\n\n}", "title": "" }, { "docid": "4b108aea8c9b3f4b5526150385089cb4", "score": "0.7867055", "text": "function MySQLDB(){\n /* Make connection to database */\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error()); \n }", "title": "" }, { "docid": "edb0b726458c7045856744eabc5c235a", "score": "0.7853456", "text": "private function dbConnect(){\n\t\t$this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n\t\tif($this->db)\n\t\t\tmysql_select_db(self::DB,$this->db);\n\t}", "title": "" }, { "docid": "a78d4cc2fa973c057280f2da8f355b7c", "score": "0.7814734", "text": "function db_connect(){\n\t\tglobal $db_server;\n\t\tglobal $db_user;\n\t\tglobal $db_pass;\n\t\tglobal $db_name;\n\t\t$dbcnx = mysql_connect($db_server, $db_user, $db_pass) or die(\"Error connecting to database: \" . mysql_error());\n\t\t$dbsel = mysql_select_db($db_name, $dbcnx) or die(\"Error reading from database table: \" . mysql_error());\n\t}", "title": "" }, { "docid": "db0e82044f87544c28efc8b19759a9b5", "score": "0.7784081", "text": "function db_connect()\n\t{\n\t\tmysql_connect(DB_HOST, DB_USER, DB_PASS);\t\t\n\t\tmysql_select_db(DB_NAME);\n\t}", "title": "" }, { "docid": "7df0d0260b023f5b11473bf44c706b82", "score": "0.77794933", "text": "function connect(){\n require_once _DIR_ . '/db_config.php';\n\n //Connecting to mysql database\n $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\n\n //Selecting database\n $db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());\n\n //return connection cursor\n return $con;\n }", "title": "" }, { "docid": "ba67443b2d6203e62851a52aee59c134", "score": "0.77742165", "text": "public static function openConnection()\n\t{\n\t\t$host = isset($GLOBALS['DATABASE']['host']) ? $GLOBALS['DATABASE']['host'] : 'localhost';\n\t\t$db = isset($GLOBALS['DATABASE']['db']) ? $GLOBALS['DATABASE']['db'] : null;\n\t\t$user = isset($GLOBALS['DATABASE']['user']) ? $GLOBALS['DATABASE']['user'] : 'root';\n\t\t$pass = isset($GLOBALS['DATABASE']['pass']) ? $GLOBALS['DATABASE']['pass'] : 'root';\n\t\t$charset = isset($GLOBALS['DATABASE']['charset']) ? $GLOBALS['DATABASE']['charset'] : 'utf8';\n\t\t$timezone = isset($GLOBALS['DATABASE']['timezone']) ? $GLOBALS['DATABASE']['timezone'] : substr(strftime('%z', time()),0,3) . ':' . substr(strftime('%z', time()),3);\n\n\t\t// Connect to database\n\t\tif (!self::$connection = mysql_connect($host, $user, $pass)) {\n\t\t\tdie('Could not connect to the database: ' . mysql_error());\n\t\t}\n\n\t\t// Select database\n\t\tif ($db) mysql_select_db($db,self::$connection);\n\n\t\t// Set names (database charset) if charset is defined\n\t\tif ($charset) self::sql(\"SET NAMES '$charset'\");\n\n\t\t// Set timezone\n\t\tself::sql(\"SET time_zone = '$timezone'\");\n\t}", "title": "" }, { "docid": "df21028b20b7020131222bd9151a6489", "score": "0.7769855", "text": "function dbconnect() {\n\tglobal $dbserver, $dbuser, $dbpass, $dbname;\n\tmysql_connect ($dbserver, $dbuser, $dbpass ) \n\t\tor die (\"Impossibile connettersi al server: \".$dbserver); \n\n\tmysql_select_db ($dbname) \n\t\tor die (\"Impossibile selezionare il database: \".$dbname);\n}", "title": "" }, { "docid": "459623300404bab4724828ded877e41e", "score": "0.77623427", "text": "private function Connect() {\n $this->connection = mysql_connect($this->host . ':' . $this->port, $this->user, $this->pass, $this->newLink);\n if ($this->connection === false) {\n trigger_error('MySQL connect failed: ' . $this->GetError());\n } else {\n $this->SelectDb($this->dbName);\n }\n }", "title": "" }, { "docid": "ec9729d9de91494187710a6482e1c1a2", "score": "0.77349836", "text": "public function open_connection() {\n $this->connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD);\n if(!$this->connection) {\n die('MySQL connection failed: ' . mysql_error());\n } else {\n $db_select = mysql_select_db(DB_NAME, $this->connection);\n if(!$db_select) {\n die('Database connection failed: ' . mysql_error());\n }\n }\n }", "title": "" }, { "docid": "abbf86aa7b04be37a2ab60dab1d5f965", "score": "0.76923895", "text": "function dbConnect()\n\t{\n\t\tglobal $db;\n\t\tglobal $CFG;\n\t\t$db->Connect($CFG['db']['hostname'], $CFG['db']['username'], $CFG['db']['password'], $CFG['db']['name']);\n\t\tif (!$db)\n\t\t\t\ttrigger_error('DB Connection Error', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "f0d8ebd26345401eb3ed4e8a979de073", "score": "0.7680801", "text": "function dbConnect() {\n // Access global variables\n global $dbHost;\n global $dbUser;\n global $dbPass;\n global $dbName;\n \n // Attempt to connect to database server\n $link = @mysql_connect($dbHost, $dbUser, $dbPass);\n\n // If connection failed...\n if (!$link) {\n\n\t\n fail(\"Couldn't connect to database server\");\n }\n\n // Attempt to select our database. If failed...\n if (!@mysql_select_db($dbName)) {\n // Inform Flash of error and quit\n fail(\"Couldn't find database $dbName\");\n }\n\n return $link;\n}", "title": "" }, { "docid": "882dd3a74d9c9b2d7dfa19c953e61c32", "score": "0.7673233", "text": "public function connection_open()\n\t{\n\t\t$this->connection = mysql_connect(MYSQL_SERVER, MYSQL_USER, MYSQL_PASS);\n\t\t\n\t\tif(!$this->connection)\n\t\t\tdie(\"MySQL connection error - \" . mysql_error()); // die if there is a failure to connect\n\t\t\t\n\t\t$select = mysql_select_db(MYSQL_NAME_OF_DB, $this->connection);\n\t\tif(!$select)\n\t\t\tdie(\"MySQL selection error - \" . mysql_error()); // die if there is a database selection probelm\n\t}", "title": "" }, { "docid": "f5c930558668c845a3582531760d94e6", "score": "0.7661364", "text": "private function DBconnect() {\r\n // Make connection to MySQL server\r\n \ttry\r\n \t{\r\n \t\t$this->con = mysqli_connect($this->host,\r\n $this->user, $this->pass, $this->name);\r\n \t}\r\n \tcatch (Error $e)\r\n \t{\r\n \t\ttrigger_error ('Could not connect to server: '.$e->getMessage());\r\n \t\t$this->connectError=true;\r\n \t}\r\n \r\n }", "title": "" }, { "docid": "4e427647aa4465f96a7bf944cea3e0d2", "score": "0.7655321", "text": "public function open_connection(){ \n\t\t\t$this->connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS);\n\t\t \tif(!$this->connection){\n\t\t \t\tdie(\"Database connection failed:\". mysql_error());\n\t\t \t}\n\t\t \telse{\n\t\t \t\t$db_select = mysql_select_db(DB_NAME, $this->connection);\n\t\t \t\tif(!$db_select){\n\t\t \t\t\tdie(\"Database selection failed;\" . mysql_error());\n\t\t \t\t}\n\t\t \t\t\n\t\t \t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3e24dc5f7f4b6c2524c4ed85a0b6f424", "score": "0.76339495", "text": "function connect() {\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); \n mysql_select_db(DB_NAME, $link);\n}", "title": "" }, { "docid": "fdea18c80d377950cbbed924e7ff9610", "score": "0.7629352", "text": "private function connect()\n\t\t{\n\t\t\t$function = ($this->_persistant ? 'mysql_pconnect' : 'mysql_connect');\n\t\t\t$this->_conn = $function($this->_hostname.($this->_port === false ? '' : ':'.$this->_port), $this->_username, $this->_password);\n\t\t\tif (false === $this->_conn) {\n\t\t\t\t$this->_lasterror = mysql_error();\n\t\t\t\tself::throwException(__METHOD__, $this->_lasterror);\n\t\t\t} else {\n\t\t\t\tif (!mysql_select_db($this->_database, $this->_conn)) {\n\t\t\t\t\t$this->_lasterror = mysql_error();\n\t\t\t\t\tself::throwException(__METHOD__, $this->_lasterror);\n\t\t\t\t} else {\n\t\t\t\t\tif (!empty($this->_encoding)) {\n\t\t\t\t\t\t// Set the communication encoding\n\t\t\t\t\t\t$this->query('SET NAMES '.$this->_encoding);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5bc6d75e7311a9df4b0a34150d9720eb", "score": "0.7625235", "text": "Function OpenConnectionAndDatabase($servername, $username, $password , $useDB){\n\n\n// Create connection and check\n$conn = mysql_connect($servername, $username, $password);\n\t\tif (!$conn) {\n\t\t\t\tdie('Could not connect: ' . mysql_error());\n\t\t}\n\t\techo 'Connected successfully to <br>';\n\n\t\tmysql_select_db($useDB);\n \n return $conn;\n \n }", "title": "" }, { "docid": "6f463a3d0d104e858b10b782704fc5c4", "score": "0.7619131", "text": "public function connectdb() {\n\t\t$this->_connection = new mysqli($this->_host, $this->_username,\n\t\t\t$this->_password, $this->_database);\n\t\t\t//echo \"connected...\";\n\n\t\t// Error handling\n\t\tif(mysqli_connect_error()) {\n\t\t\ttrigger_error(\"Failed to conenct to MySQL: \" . mysqli_connect_error(),\n\t\t\t\t E_USER_ERROR);\n\t\t\t\t //echo \"noy connected...\";\n\t\t}\n\t}", "title": "" }, { "docid": "9f243747969cd1856b677b4dafc97e03", "score": "0.76174164", "text": "function setupDatabase() {\n $this->db = MySqlDatabase::getInstance();\n try {\n $conn = $this->db->connect($this->db_host, $this->db_user, $this->db_pw, $this->db_databaseName);\n } catch (Exception $e) {\n die(__FUNCTION__.'::'.$e->getMessage());\n }\n }", "title": "" }, { "docid": "22d1500c7c5890a533fed096a39bc59b", "score": "0.76124877", "text": "function connect() \n {\n $this->_link = mysqli_connect( $this->_dbUrl, $this->_dbUsername, $this->_dbPassword);\n \n if ($this->_link)\n {\n if (!mysqli_select_db ( $this->_link, $this->_dbName))\n {\n \t return die('<p>Could not select the database because: <b>' . mysqli_error($this->_link) . '</b></p>');\n }\n else\n {\n \t return;\n }\n }\n else\n {\n return die('<p>Could not connect to the MYSQL because: <b>' . mysqli_error($this->_link) . '</b></p>');\n }\n }", "title": "" }, { "docid": "f1727a19a5fd9f63bb5bb0b7e12015f6", "score": "0.76121545", "text": "private function db_connection() {\n global $conn;\n $conn = new mysqli($servername, $username, $password, $dbname);\n if ($conn->connect_error)\n die(\"Connection failed: \" . $conn->connect_error);\n }", "title": "" }, { "docid": "c51656acae93d39b41d59b49d1564731", "score": "0.7586749", "text": "function database() {\n\t\tglobal $glob;\n\t\t$host = $glob['dbhost'];\n\t\t$user = $glob['dbusername'];\n\t\t$pass = $glob['dbpassword'];\n\t\t$db = $glob['dbdatabase'];\n\t\tif ($this->_resource = @mysql_connect( $host, $user, $pass )) {\n\t\t\tmysql_select_db($db) or die('Cant select database'.mysql_error());\n\t\t\t//echo \"in\";\n\t\t}\n\t\telse{\n\t\t\techo \"Could not connect to the database!\";\n\t\t\texit;\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "70aa9fdf8acb219dd25c36e9cb963e9d", "score": "0.75742996", "text": "function db_connect($dbHost,$dbUser,$dbPassword,$dbDatabase) {\n \n // do we need to check the params to see if they exist? not really..\n //echo \"<br>connecting to server<br>\";\n $db = mysql_connect ($dbHost,$dbUser,$dbPassword);\n \n if ($db == NULL) {\n\t// failed connect to server/database\n\tdb_error(mysql_error());\n\treturn;\n }\n \t\n //echo \"selecting database<br>\";\t\n $result = mysql_select_db($dbDatabase,$db);\n \n if (!$result) {\n\t// failed select db\n\tdb_error(mysql_error());\n\treturn;\n }\n \n //echo \"connection to database successful<br>\";\n // end of function\t\n}", "title": "" }, { "docid": "b32df191d197c096c57b50db621fdb60", "score": "0.7565145", "text": "public function openConnection ()\n {\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n if (! $this->connection) {\n die(\"DATABASE CONNECTION FAILED: \" . mysql_error());\n } else {\n $this->_setCharacterEncoding();\n $db_select = mysql_select_db(DB_NAME, $this->connection);\n mysql_query(\"set names utf8\");\n if (! $db_select) {\n die(\"DATABASE SELECTION FAILED: \" . mysql_error());\n }\n }\n }", "title": "" }, { "docid": "664287a17d3b2dd3320cb8987f1339f5", "score": "0.7561892", "text": "function makeConnectionToDb(){\r\n\r\n /*\r\n\t\t$host = \"messena.cc.gatech.edu:19220\";\r\n\t\t$user = \"root\";\r\n\t\t$database = \"pofak\";\r\n */\r\n\t\tGlobal $connection;\r\n /*\r\n\t\t$connection = mysql_connect($host, $user);\r\n\t\tmysql_select_db(\"pofak\", $connection);\r\n */\r\n \r\n $connection = mysql_connect(\"kidswithfoodallergies.org:3306\", \"kidswitror_rcp\", \"allergenfree\");\r\n mysql_select_db(\"kidswitror_eve\",$connection);\r\n\r\n\t}", "title": "" }, { "docid": "e499cd3108567166c33074f68f6b05ce", "score": "0.7541772", "text": "function dbConnect($server, $user, $pass, $dbName)\n{\n\n mysql_connect($server, $user, $pass) or die('could not connect to mysql');;\n\n mysql_query('create database IF NOT EXISTS ' . $dbName);\n\n mysql_select_db($dbName) or die('could not select database');\n}", "title": "" }, { "docid": "4790c2acaad42408bfc0972142936bf7", "score": "0.7540589", "text": "function connect()\n {\n global $conn;\n $servername = \"localhost\";\n $username = \"wearteam\";\n $password = \"w3@r@b!e5\";\n $dbname = \"wearables\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n\n // Check connection\n if ($conn->connect_error)\n die(\"Connection failed: \" . $conn->connect_error);\n\n }", "title": "" }, { "docid": "8f324dcec8612b2bf42cc12635ce4f67", "score": "0.7540343", "text": "function connect()\n\t\t{\n\t\t\tif(is_null($this->dbConnection)){\n\t\t\t\trequire_once(CONST_BASEDIR.'/config.php')\t;\t\t\t\t\n\t\t\t\t$this->dbUser\t\t=\t$config[\"databaseUser\"];\n\t\t\t\t$this->dbPass\t\t=\t$config[\"databasePass\"];\n\t\t\t\t$this->dbName\t\t=\t$config[\"databaseName\"];\n\t\t\t\t$this->dbHost\t\t=\t$config[\"databaseHost\"];\n\t\t\t\ttry{\n\t\t\t\t\tif($this->newCon==true){\n\t\t\t\t\t\t$this->dbConnection\t=\tmysql_connect($this->dbHost,$this->dbUser,$this->dbPass,true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t $this->dbConnection\t=\tmysql_connect($this->dbHost,$this->dbUser,$this->dbPass);\n\t\t\t\t\t}\n\t\t\t\t\tif($this->dbConnection){\n\t\t\t\t\t\tif(mysql_select_db($this->dbName,$this->dbConnection)){\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->setError(mysql_error());\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->setError(mysql_error());\n\t\t\t\t\t}\n\t\t\t\t}catch(Exception $c){\n\t\t\t\t\t$this->setError($c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8fff19af766261a12795c852bcb8c135", "score": "0.7537903", "text": "function getConnection() {\n\t$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(\"Connecting to MySQL failed\");\n\treturn $conn;\n}", "title": "" }, { "docid": "0f17e6d71563052e3e08f8bb5125695a", "score": "0.753659", "text": "function my_conect(){\n\t\t\t$my_connection = mysql_connect(SERVER_MYSQL,USER_MYSQL,PASS_MYSQL);\t\t\t\n\t\t\t$my_SelectedDB = mysql_select_db(DB_MYSQL);\n\t\t\treturn $my_connection;\n\t\t}", "title": "" }, { "docid": "9bbc142f6d413db8b4afb7a290a42c09", "score": "0.7536564", "text": "function connect() { // Open a connection to our database(s)\n\tif( $this->database_link ) { \n\t\treturn 1; \n\t}\n\t$this->database_link = @mysql_connect(DATABASE_SERVER, DATABASE_USER, DATABASE_PASSWORD);\n\tif ( $this->database_link ) {\n\t\tif( !mysql_select_db(DATABASE_NAME) ) { // connect to the specific database\n\t\t\t$this->no_database(); \n\t\t}\n\t\treturn 1;\n\t} else {\n\t\t$this->no_database(); \n\t} // end check if database_link is active\n}", "title": "" }, { "docid": "f807dbe8fadbd241ebfb908a0e2c3d24", "score": "0.75361586", "text": "function db_connect() // Create a fucntion to connect to MySQL database\n\t{\n\t\t$link = mysql_connect($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD); // Connect to MySQL server, using details defined\n\t\tif(!$link)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$db = mysql_select_db($MYSQL_DATABASE); // Select MySQL database, using details defined\n\t\tif(!$db)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "7b72bda4f859adccc9dacef0357bd1eb", "score": "0.7532772", "text": "public function connect()\n\t{\n\t\t$this->openConnection();\n\t\t\n\t\t//Select the database\n\t\t$this->selectDatabase();\n\t\t\n\t}", "title": "" }, { "docid": "ff2235bdd8daa261247eeb68ff81eb91", "score": "0.7512859", "text": "function initDB()\n{\n\n /** Represents the connection to a MySQL Server. */\n global $connection;\n $connection = mysqli_connect(\n DB_HOST,\n DB_USER,\n DB_PASS,\n \"\", //TODO change temp value\n DB_PORT\n );\n // TODO change DB_USER,DB_HOST,DB_PASS,DB_PORT to assoc-arr\n if ($connection == false) {\n dieSafely(\"Connection failed to Mysql Server \" . mysqli_connect_error());\n } else {\n log4(\"Connection established to Mysql Server - \" . mysqli_get_host_info($connection));\n }\n}", "title": "" }, { "docid": "38edab6f137447fd93a7f9f320a96f68", "score": "0.7506366", "text": "public function connect()\n\t{\n\t\t$this->con = mysql_connect(self::HOST, self::USER, self::PASS);\n\t\tif(!$this->con) { die(\"SQL Error: \" . mysql_error()); }\n\t\tmysql_select_db(self::DB, $this->con);\n\t\tmysql_set_charset(\"utf8mb4\");\n\t}", "title": "" }, { "docid": "d6c1bd05eb377a2b55a5e555870e1a3f", "score": "0.7504977", "text": "private function fdbconnect() {\n\t\t## -- make mysql connection\n\t\t$this->dbconn = new mysqli($this->dbhost, $this->dbuser, $this->dbpass, $this->dbname);\n\n\t\t## -- Error handling\n\t\tif(mysqli_connect_errno()) {\n\t\t\ttrigger_error(\"Error connection to database failed\", E_USER_ERROR);\n\t\t\texit();\n\t\t}\n\n\t}", "title": "" }, { "docid": "7016683642d95bf70344f3731dbdd740", "score": "0.7501152", "text": "function openDB()\r\n {\r\n\t $host=\"localhost:/var/lib/mysql/mysql.sock\"; // localhost doesn't work\r\n\t $user=\"c2cuser\";\r\n\t $password=\"pocketbagel\";\r\n\t mysql_connect($host,$user,$password);\r\n\t mysql_select_db(\"classroomToCareerPathways\");\r\n }", "title": "" }, { "docid": "b180db6eba2423b3e098448e914af531", "score": "0.74902254", "text": "function connectDB() {\n\t$db = array(\n\t\t# Edit database connection information only\n\t\t'host' \t\t=>\t'example.com.mysql', \t// MySQL host\n\t\t'name' \t\t=> \t'example_com', \t\t// Database name\n\t\t'username' \t=> \t'username', \t\t// Database Username\n\t\t'password' \t=> \t'password', \t\t// Database password\n\t);\n\tmysql_connect(\n\t\t$db[\"host\"], \n\t\t$db[\"username\"], \n\t\t$db[\"password\"]);\n\t$selected_db = mysql_select_db($db[\"name\"]); \n\tif ($selected_db == false) { \n\t\tdie ('Error: ' . mysql_error()); \n\t} \n}", "title": "" }, { "docid": "1db8d1a2e060b15a24caf4139e6a1a29", "score": "0.7487111", "text": "private function connect()\n\t {\n\t $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->database_name);\n\t if ($this->db->connect_error) {\n\t die(\"Connect failed: \". $this->db->connect_error);\n\t exit();\n\t }\n\t }", "title": "" }, { "docid": "0b688433534e2cce8ac4bf621de3e915", "score": "0.74833536", "text": "function db_connect(){\n\tglobal $database_link;\n\t$database_link = @mysql_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD) or\n\t die(\"No connection to the Database could be created.<p>The following error was reported:<br><b>\".mysql_error().\"</b>\");\n\tmysql_select_db(DATABASE, $database_link) or mysql_die(\"\");\n}", "title": "" }, { "docid": "0dbb8416d2349b732889b91393282e82", "score": "0.74778485", "text": "function db_connect(){\n // this \"DB_SERVER, DB_USER, DB_PASS, DB_NAME\" is defined in the 'db_credentials.php' file and is loaded here. \n $connection = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n confirm_db_connection(); // this throws an error if no connection made and handles it\n return $connection; \n }", "title": "" }, { "docid": "df51ae7cbd5b0a1e5f6ba868646bc647", "score": "0.74703777", "text": "function connect_db() {\n\t$server = '127.0.0.1'; // e.g 'localhost' or '192.168.1.100'\n\t$user = 'joshua';\n\t$pass = 'joshua01';\n\t$database = 'joshua';\n\t$connection = new mysqli($server, $user, $pass, $database);\n\tif ($connection->connect_errno) {\n \t\techo \"Failed to connect to MySQL: (\" . $connection->connect_errno . \") \" . $connection->connect_error;\n\t\treturn false; \n\t}\n\treturn $connection;\n}", "title": "" }, { "docid": "f9eefc65d27c6a9fa45c4882009345ba", "score": "0.74678695", "text": "function db_connect() {\n global $db_host, $db_user, $db_pass, $db_name;\n\t$result = mysql_connect($db_host, $db_user, $db_pass) or die(\"Could not connect to database!\");\n\tif (!$result) {\n\t\treturn false;\n\t} else {\n\t\tmysql_select_db($db_name);\n\t\treturn true;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "4394969bd4538aa93bcf7b4365c66d47", "score": "0.7460275", "text": "function connect_to_db() \n{\n $ini_array = get_ini_array();\n // Connecting, selecting database\n $link = mysql_connect($ini_array['db_server'], $ini_array['db_user'], $ini_array['db_password'])\n or die('Could not connect: ' . mysql_error());\n mysql_select_db($ini_array['db_name']) or die('Could not select database');\n \n}", "title": "" }, { "docid": "bbbc04be987af1f173f0bc24c01cece9", "score": "0.74551576", "text": "private function connect() {\n\t\t$this->connection = new mysqli(self::$db_hst, self::$db_usrnm, self::$db_pswd, self::$db_dbnm);\n\t}", "title": "" }, { "docid": "2da34d51c650d35d60cfbffd7a8c1c77", "score": "0.7451425", "text": "function connect() {\n\t$db_connection = mysql_connect(\"localhost\", \"cs143\", \"\");\n\tmysql_select_db(\"CS143\", $db_connection);\n\treturn $db_connection;\n}", "title": "" }, { "docid": "0370eb391ea3ec9422d632b7e5b06489", "score": "0.7450359", "text": "function connect() {\n // import database connection variables\n define('DB_USER', \"u1029802_sensus\"); // db user\n define('DB_PASSWORD', \">P<o,P2.qr\"); // db password (mention your db password here)\n define('DB_DATABASE', \"db1029802_sensus\"); // database name\n define('DB_SERVER', \"mysql2275int.cp.blacknight.com\"); // db server\n // Connecting to mysql database\n $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\n\n // Selecing database\n $db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());\n\n // returing connection cursor\n return $con;\n }", "title": "" }, { "docid": "c31f09d18fd10f9e4075e08ba1b2f0e5", "score": "0.74502254", "text": "private function connect() {\r\n\t\tif(!$this->connection = mysql_connect($this->host,$this->user,$this->passwd)) {\r\n\t\t\tthrow new DBMySqlException(\"Fehler beim verbinden mit dem Datenbankserver # DBMySql.class.php\",110);\r\n\t\t}\r\n\r\n\t\tif(!mysql_select_db($this->database,$this->connection)) {\r\n\t\t\tthrow new DBMySqlException(\"Fehler beim auswaehlen der Datenbank # DBMySql.class.php\",666);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7f12891a04a8c6677781494d657185f4", "score": "0.7440959", "text": "public function connect() {\n require_once 'config.php';\n // connecting to mysql\n $con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n // selecting database\n mysql_select_db(DB_DATABASE);\n \n // return database handler\n return $con;\n }", "title": "" }, { "docid": "73d6073e10e8ab449204e924547bebe9", "score": "0.7432741", "text": "function DatabaseConnect()\n{\n // set the connection information\n // willy is the server name on the penguin network\n // set the UserName and Password to your credentials\n // set the Database to your database (you mysql UserName)\n $Server = \"penguin\";\n $UserName = \"COMP305Library\";\n $Password = \"Temp!Library\";\n $Database = \"COMP305Library\";\n\n // connect to the database\n // create a new instance of a mysqli object. this\n // object contains the connection to the mysql server\n $Connection = new mysqli( $Server, $UserName, $Password, $Database );\n\n // check for a successful connection\n // connect_error will evaluate to true if there is an error\n if ( $Connection->connect_error )\n {\n // stop the script and echo an error message\n echo \"<h2>Database Error</h2>\\n\";\n die( \"<p>MySQLi Connection Error: \".$Connection->connect_error.\"</p>\\n\" );\n }\n\n // return the connection\n return $Connection;\n \n}", "title": "" }, { "docid": "558179a0f49a7a196f761c201550d9ff", "score": "0.74242425", "text": "public static function connect() {\n\t\t//Check connection\n\t\tif (empty(self::$connected) || self::$connected === false) {\n\t\t\t//If it is not exist connect\n\t\t\tself::$dbConfig = ConfigurationService::Database();\n\t\t\tself::$db = new mysqli(self::$dbConfig->Data->hostname, self::$dbConfig->Data->username, \n\t\t\t\tself::$dbConfig->Data->password, self::$dbConfig->Data->database);\n\n\t\t\tif (self::$db->connect_errno > 0) {\n\t die ('Unable to connect to database[' . self::$db->connect_error . ']');\n\t }\n\t\t}\n\t}", "title": "" }, { "docid": "0f0e627a7c0a2e6095334685f74e7c38", "score": "0.7419224", "text": "function dbConnect(){\n \t\t// initialize parameters\n \t\t\n \t\t\n \t\t// connect to database\n \t\t$db_connection = mysql_connect($this->host,$this->user,$this->password) or die(\"Connection failed\");\n \t\tmysql_select_db($this->db,$db_connection);\n \t\treturn $db_connection;\n \t}", "title": "" }, { "docid": "15e895577dd8a8930530185c5abdcadf", "score": "0.7414583", "text": "private function connect() {\n\t\tif (!$this->connection) {\n\t\t\t$this->connection = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, STUDENT_DB_NAME) ;\n\t\t\tif (mysqli_connect_errno()) {\n\t\t\t\techo \"Connect failed: \" . mysqli_connect_error();\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c3ee6d001df0f10cb0df41d02a5ffc6b", "score": "0.74083394", "text": "function connect() {\n\t\t\n\t\t$this->mysqli = new mysqli($this->url, $this->user, $this->password, $this->db);\n\n\t\t/* check connection */\n\t\tif (mysqli_connect_errno()) {\n\t\t printf(\"Connect failed: %s\\n\", mysqli_connect_error());\n\t\t exit();\n\t\t}\n\t}", "title": "" }, { "docid": "a389617d1f35944fde46b443eef00d16", "score": "0.7407606", "text": "public function connect()\n {\n $host = ConfigLoader::get('HOST_NAME'); \n $db_name = ConfigLoader::get('DB_NAME'); \n $user = ConfigLoader::get('DB_USER'); \n $pass = ConfigLoader::get('DB_PASSWORD'); \n\n $this->dbh = new \\PDO(\"mysql:host={$host};dbname={$db_name}\", $user, $pass);\n }", "title": "" }, { "docid": "7ae741236d7270f90f761103abd79d6e", "score": "0.7395723", "text": "function db_connect()\r\n\t{\r\n\t\tif (!$this->connection = mysql_connect($this->host,$this->user,$this->pwd))\r\n\t\t{\r\n\t\t\t$this->sqlErrNo=mysql_errno();\r\n\t\t\t$this->sqlError=mysql_error();\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}//end if\r\n\t}", "title": "" }, { "docid": "f3fd26edd7597fafcdb21f28e7f30e3a", "score": "0.7381313", "text": "function connect_to_database()\r\n{\r\n\t// Set the database server name\r\n\t$hostname = \"localhost\";\r\n\t// Server username\r\n\t$dbuser = \"root\";\r\n\t// Server password\r\n\t$dbpass = \"\";\r\n\t\r\n\t// Database name\r\n\t$database = \"RMO_database\";\r\n\t// Initialize the SQL connection instance \r\n\t$mysql_connection = mysqli_connect($hostname,$dbuser,$dbpass,$database);\r\n\t\r\n\t// Returns the SQL connection instance\r\n\treturn $mysql_connection;\r\n\t\r\n}", "title": "" }, { "docid": "e8ff8d4049f8cbd5ec02c214bdd6c917", "score": "0.73799443", "text": "function connect()\n {\n\t\t\t\n\t\t\t\n\t\t\t\n if( 0 == $this->Link_ID )\n $this->Link_ID=mysql_connect( $this->Host, $this->User, $this->Password );\n if( !$this->Link_ID )\n $this->halt( \"Link-ID == false, connect failed\" );\n if( !mysql_query( sprintf( \"use %s\", $this->Database ), $this->Link_ID ) )\n $this->halt( \"cannot use database \".$this->Database );\n }", "title": "" }, { "docid": "0a4b14b54fa278cc020c0df394e5382b", "score": "0.7377215", "text": "function db_connect() { // {{{\n\t$db_con = mysqli_connect(\"127.0.0.1\", \"root\", \"\", \"NetworkDB\");\n\tif (mysqli_connect_errno($db_con)) {\n\t\techo \"Error: failed to connect to MySQL database: \" . mysqli_connect_error();\n\t\tdie();\n\t}\n\n\treturn $db_con;\n}", "title": "" }, { "docid": "3221ebd4390dd100f65d9c0b989d2bdd", "score": "0.737617", "text": "function connect()\n\t{\n\t\t$db=mysql_connect($this->server,$this->username,$this->passs) or die (\"Error /...Couldn't Connect\");\n\t\tmysql_select_db($this->db_name) or die(\"Error /.....couldn't find the database\");\n\t\t\n\t\t\n\t\t//$this->db=new MySQLi($this->server,$this->username,$this->passs,$this->db_name)or die(\"could not connect\");\n\t\t\n\t\t\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "5e6a39c655ee468c4051bb62eec4517f", "score": "0.73726934", "text": "function mysqlConnect(){\r\n\t//connects to the local MySQL favoritething database\r\n\t$con = mysql_connect('mysql.favoritething.me','username','pass');\r\n\tmysql_select_db('db_name',$con);\r\n}", "title": "" }, { "docid": "ac0656d4af35565e662f6a838f198c55", "score": "0.7369395", "text": "function connect( )\n\t{\n\t\t$num_args = func_num_args( );\n\t\t$args = func_get_args( );\n\n\t\t// get the arguments, if any\n\t\tif (0 != $num_args)\n\t\t{\n\t\t\t$this->load_arguments($args);\n\t\t}\n\n\t\t$this->linkid = @mysql_connect($this->host, $this->user, $this->pswd);\n\n\t\tif ( ! $this->linkid)\n\t\t{\n\t\t\t$this->error = mysql_errno( ).': '.mysql_error( );\n\t\t\t$this->error_report( );\n\n\t\t\tif ($this->debug)\n\t\t\t{\n\t\t\t\techo \"There was an error connecting to the server in {$this->file_name} on line {$this->line}:<br />ERROR - {$this->error}\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie('There was a database error. An email has been sent to the system administrator.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "57a6f305221cf3ba43cc2331644b7f98", "score": "0.73681307", "text": "function db_connect() {\n $connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n confirm_connect($connection);\n return $connection;\n }", "title": "" }, { "docid": "3d52d62504384f43b87b04dba4613f45", "score": "0.73625153", "text": "function DB_Connect($host, $port, $user, $pass, $dbname) {\n\t//$conn_string = \"host=\" . $host . \" port=\" . $port . \" dbname=\" . $dbname . \" user=\" . $user . \" password=\" . $pass;\n\t//$dbconn = mysqli_connect($conn_string) or print(\"Connection establishment failed: \" . error_get_last());\n\n\t$dbconn = mysqli_connect($host, $user, $pass, $dbname, $port);\n\t// Check connection\n\tif (mysqli_connect_errno()) {\n\t echo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t exit();\n\t}\n\n\treturn $dbconn;\n}", "title": "" }, { "docid": "d22cc32c4de62c2f9f91f9e43501eb9f", "score": "0.7355658", "text": "function dbConnect() {\n\n // @NOTE comment me out when creds are set\n die(\"STOP me here! Make sure the correct Db is connected!!\");\n\n try {\n $host = '[]';\n $dbname = '[]';\n $user = '[]';\n $pass = '[]';\n return new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n }", "title": "" }, { "docid": "1c8d53f41976a60517d2a5d64376b197", "score": "0.7352255", "text": "function connect_and_select_db($server, $username, $pwd, $dbname) {\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \";\n \texit;\n\t}\n\n\t// Select the database\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \";\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "72f80e54652d5a0b1665e3eb16b89a25", "score": "0.73430526", "text": "public function connect()\n{\n\tif (!isset ($this->link))\n\t{\n\t\ttry \n\t\t{\n\t\t\tif (!$this->link=mysql_connect($this->host,$this->user,$this->pass))\n\t\t\t\tthrow new Exception (\"Cannot Connect to \" . $this->host);\n\t\t} \n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t\texit;\n\t\t}\n\t}\n\t\n\telse\n\t{\n\t\t$this->disconnect();\n\t\t$this->connect();\n\t}\n}", "title": "" }, { "docid": "87f053f9f996b380769681f58585c048", "score": "0.73402166", "text": "public static function connect() {\n\n\t\tself::initialize();\n\n\t\ttry {\n\t\t\tself::$link = new PDO('mysql:host='.self::$database['host'].';dbname='.self::$database['name'], self::$database['user'], self::$database['password']);\n\t\t\tself::$link -> exec(\"set names utf8\");\n\t\t\tself::$link -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch(PDOException $e) {\n\t\t\techo \"Connection to database failed: \" . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "62067463bc53a6ceb103531ca721f855", "score": "0.7340183", "text": "function connectToMySQL(){\n $con = mysql_connect('104.155.100.124', 'root', '2IMV20');\n if (!$con){\n die('Could not connect: ' . mysql_error($con));\n }\n\n mysql_select_db('newschema');\n return $con;\n}", "title": "" }, { "docid": "38f88d66ab8606b09907041f2d223a40", "score": "0.73366594", "text": "public function connect() {\n\t\t$this -> conn = @new mysqli($this -> options['host'], $this -> options['username'], $this -> options['password'], $this -> options['database']);\n\n\t\tif($this -> conn -> connect_error) {\n\t\t\tthrow new MysqlException(\"Couldn't connect to mysql server <i>{$this -> options['host']}</i> or database <i>{$this -> options['database']}</i> doesn't exist!\", ERROR);\n\t\t} else {\n\t\t\t$this -> connected = TRUE;\n\t\t}\n\n\t\t$this -> conn -> set_charset('utf8');\n\t}", "title": "" }, { "docid": "3e6c85b82bffa6636ebc5315451c626d", "score": "0.7332666", "text": "function connect_It($db_server, $database_name, $database_password, $database_user)\n\t{\n\t\t//print\"$database_name...<br>\";\n\t\t//creating connection to database\n\t\t//print\"$db_server, $database_name, $database_password, $database_user\";\n\t\t$this -> conn = mysql_connect(\"$db_server\", \"$database_user\", \"$database_password\")\tor die(\"Could not connect : \" . mysql_error());\n\t\t\n\t\t//selecting a database if error in selecting the die code gets executes\n\t\t$db_selected = mysql_select_db(\"$database_name\", $this -> conn)\n\t\tor die(\"Could not select database <b> $database_name</b>\");\n\n\t //returning resource id to calling function\n\treturn ($this -> conn);\n\t}", "title": "" }, { "docid": "093af99b68c84302525ca72d916ebdfa", "score": "0.7331019", "text": "function mysqlConnect($host, $user, $password, $database) {\r\n\t$mysql = mysql_connect($host, $user, $password);\r\n\tif (!$mysql) die(mysql_error());\r\n\tmysql_select_db($database, $mysql);\r\n}", "title": "" }, { "docid": "b22d535046e1a0300c3aafbd8dc0ec39", "score": "0.73282874", "text": "function connect() {\n // import database connection variables\n\n\n // Connecting to mysql database on localsetup\n // $con = mysqli_connect(\"localhost\",\"homestead\",\"secret\",\"ece_pharmacy_tree\");\n\n // Connecting to mysql database on production\n $con = mysqli_connect(\"localhost\",\"root\",\"admin\",\"ece_pharmacy_tree\");\n \n //Check connection\n if (mysqli_connect_errno()) {\n echo json_encode(array(\"mysql_connection_error\" => \"Failed to connect to MySQL: \" . mysqli_connect_error() ));\n }\n\n // $con = mysql_connect(\"localhost\", \"homestead\", \"secret\") or die(mysql_error());\n\n // Selecing database\n // $db = mysql_select_db(\"ece_pharmacy_tree\") or die(mysql_error()) or die(mysql_error());\n\n // returing connection cursor\n return $con;\n }", "title": "" }, { "docid": "21117c00fc1921f23d73bfffe89aa7df", "score": "0.73282146", "text": "public function connect(){\n\n if(!empty($this->config[\"db_host\"]) && !empty($this->config[\"db_user\"]) && !empty($this->config[\"db_pass\"]) && !empty($this->config[\"db_name\"]) && !empty($this->config[\"db_port\"])){\n $this->connection = mysqli_connect($this->config[\"db_host\"],\n $this->config[\"db_user\"],\n $this->config[\"db_pass\"],\n $this->config[\"db_name\"],\n $this->config[\"db_port\"]);\n if(!$this->connection){\n echo(\"Could not connect to database: \". mysqli_connect_error() . \"\\n\");\n }\n else{\n echo(\"Connected to database! \\n\");\n }\n }\n else{\n echo \"Could not find necessary config variables. Use the query method directly if using an API endpoint. \\n\";\n }\n }", "title": "" }, { "docid": "2a212c8c69e572d617d3e9271aee41b9", "score": "0.7325114", "text": "function opendb() {\r\n\t\tglobal $host_con;\r\n\t\tglobal $username_con;\r\n\t\tglobal $pass_con;\r\n\t\tglobal $db_con;\r\n\t\t$conn=mysql_connect($host_con,$username_con,$pass_con) or die (mysql_error());\r\n\t\tmysql_select_db($db_con);\r\n\t\treturn $conn;\r\n\t}", "title": "" }, { "docid": "70132949d6763ea3f98d664d11994987", "score": "0.73226744", "text": "function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "f5bd3872ea7d2011a80fcc9115c3d28b", "score": "0.73216116", "text": "function dbconnect() {\n\t$server = 'localhost';\n\t$user = 'root';\n\t$password = 'H9nbK9210';\n\t$db = 'giftlane';\n\t\n \t$link = mysql_connect($server,$user,$password) or die('Could not connect to server.' );\n \tmysql_select_db($db, $link) or die('Could not select database.');\n}", "title": "" }, { "docid": "f5b0373f13f1eb4c4e1fbb8bdf11eec6", "score": "0.7319585", "text": "function db_connect()\r\n{\r\n @$db_link = mysql_connect(DBHOST, DBUSER, DBPASS);\r\n if ($db_link) @mysql_select_db(DBNAME);\r\n if (mysql_error())\r\n {\r\n if (SHOW_MYSQL_ERRORS) echo \"MySQL error: \". mysql_error(). \" MySQL error no: \".mysql_errno();\r\n exit;\r\n }\r\n return $db_link;\r\n}", "title": "" }, { "docid": "dd4b6688da720144f8b4df02598addc6", "score": "0.7316928", "text": "function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\t\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "dd4b6688da720144f8b4df02598addc6", "score": "0.7316928", "text": "function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\t\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "b75f3ad8279425ffdf41ae95576abc5b", "score": "0.7307508", "text": "public static function connect()\n\t{\n\t\tself::$con=mysql_connect(self::$host,self::$uname,self::$pwd);\n\t\tmysql_select_db('edufocus',self::$con);\n\t\treturn self::$con;\n\t}", "title": "" }, { "docid": "b75f3ad8279425ffdf41ae95576abc5b", "score": "0.7307508", "text": "public static function connect()\n\t{\n\t\tself::$con=mysql_connect(self::$host,self::$uname,self::$pwd);\n\t\tmysql_select_db('edufocus',self::$con);\n\t\treturn self::$con;\n\t}", "title": "" }, { "docid": "0379ac2281347b4a3cee8fd365a097d6", "score": "0.7306191", "text": "function intMoodleConnDatabase() {\n\t\t$GLOBALS['conn'] = mysqli_connect('localhost', 'root', 'root', 'moodle27', '8889');\n\t\tif (mysqli_connect_errno()) {\n\t\t\t$GLOBALS['conn'] = null;\n\t\t} \n\t}", "title": "" }, { "docid": "56da8f055a947f6df2f5ed772509ec28", "score": "0.7305353", "text": "function connect(){\n global $taws_server_config; \n \n if( $taws_server_config[ \"sql_program\" ] == 'mysql' ){ \n $this->dbconn = new mysqli( $taws_server_config[ 'mysql_server' ], \n $taws_server_config[ 'mysql_db_user' ], \n $taws_server_config[ 'mysql_db_pass' ], \n $taws_server_config[ 'mysql_db_name' ],\n $taws_server_config[ 'mysql_db_port' ]); \n //$this->dbconn->options( MYSQLI_OPT_LOCAL_INFILE, true );\n \n }else if( $taws_server_config[ \"sql_program\" ] == 'postgresql' ){ \n $this->dbconn = pg_connect( \"host={$taws_server_config[ 'postgresql_server' ]} \n user={$taws_server_config[ 'postgresql_db_user' ]} \n password={$taws_server_config[ 'postgresql_db_pass' ]}\n dbname={$taws_server_config[ 'postgresql_db_name' ]} \n port={$taws_server_config[ 'postgresql_db_port' ]}\" ); \n }else if( $taws_server_config[ \"sql_program\" ] == 'sqlite' ){ \n $this->dbconn = new SQLite3( $taws_server_config[ 'sqlite_db_path' ], SQLITE3_OPEN_READONLY ); \n }else{ \n // Not supported\n } \n \n // return true if successfull\n if( $this->dbconn ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "eb816f54213a44406409d7101dbbde83", "score": "0.73036754", "text": "function dbconnect()\n{\n global $config;\n\tif (!($link = mysql_connect(DB_HOST, DB_USER, DB_PASS)))\n\t{\n print \"<h3>could not connect to database</h3>\\n\";\n\t\texit;\n\t}\n\tmysql_select_db(DB_NAME);\n return $link;\n}", "title": "" }, { "docid": "3f3f81a3aa1bf621c93b3e33bd29d2c2", "score": "0.730237", "text": "function db_server_connect(){\n\n\t\t\t$connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n\n\t\t\tif(!$connect){ die(\"COULDN'T CONNECT TO DB\"); } \n\n\t\t\telse{ return $connect; }\n\t\t}", "title": "" }, { "docid": "800dc658e192275656ba3c3ec2ac5f2e", "score": "0.7300621", "text": "function connectDB() {\n\n global $connection;\n\n $connection = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD);\n\n if (mysqli_connect_errno()) {\n\n dbLog(DB_LOG_ERROR, \"Failed to connect to MySQL: \" . mysqli_connect_error());\n return FALSE;\n\n }\n\n dbLog(DB_LOG_INFO, \"Connected to server\");\n\n if (mysqli_select_db($connection, DB_DATABASE)) {\n\n dbLog(DB_LOG_INFO, \"Connected to \" . DB_DATABASE . \" database\");\n return TRUE;\n\n } else {\n\n dbLog(DB_LOG_ERROR, \"Failed to connect to \" . DB_DATABASE . \" database\");\n return FALSE;\n\n }\n}", "title": "" } ]
9d9ef0c934ff57fa6e8c1c2754c44127
Check if 'sha_file' has a value
[ { "docid": "b24019d65631bc75b489e4f4f32c2472", "score": "0.807374", "text": "public function hasShaFile()\n {\n return $this->sha_file !== null;\n }", "title": "" } ]
[ { "docid": "e2848c42259850ac94d3a70ede56f579", "score": "0.6512267", "text": "function isFile( $file_md5 ) {\n\t$link = InfoNucleo::getConexionDB( 'ucomparte' );\n\n $md5 = $link->escapeSimple( $file_md5 );\n\n $sql = \"\nselect count( distinct( ARC_ID ) ) as number\nfrom ARCHIVOS\nwhere ARC_MD5 = '$md5' \n\";\n $res = $link->query( $sql );\n if( DB::isError( $res ) ) {\n\t\t$servicio = $_SESSION['servicio'] ? $_SESSION['servicio'] : ' ';\n LOGGER::sql_error( $servicio, $sql );\n\t\texit( 'Error en la base de datos' );\n\t}\n\n $row = $res->fetchRow( DB_FETCHMODE_ASSOC );\n\n return $row[ 'number' ] > 0;\n}", "title": "" }, { "docid": "bcd71a6414a1a83b27417181d1a126da", "score": "0.64326286", "text": "function checkHash($path, $fileName) {\r\n\t\t\t\tif(file_exists($path.$fileName)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}", "title": "" }, { "docid": "719643ead51ded6709251703991023fa", "score": "0.6266666", "text": "public function hasFile(){\n return $this->_has(15);\n }", "title": "" }, { "docid": "f7427934a547fa5ab553a38abac88c30", "score": "0.5955666", "text": "public function checkFile();", "title": "" }, { "docid": "139bf32575ee348f6081c58ae5e5a99f", "score": "0.5954268", "text": "function val_file($value){\n if(isset($_FILES[$value])){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b06015bd82071b12be63c771081bbee8", "score": "0.5943552", "text": "public function checkExistingFile($uri) {\n if ($fid = db_query(\"SELECT fid from {file_managed} WHERE uri = :uri\", array(\":uri\" => $uri))->fetchField()) {\n return $fid;\n }\n return FALSE;\n }", "title": "" }, { "docid": "1e62dca61ad7b6d41bd1d3e14c0eea04", "score": "0.5932315", "text": "function checkFileField($node, $name, $value) {\n $id = $node->get($name)->get(0)->get('target_id');\n $uri = \\Drupal\\file\\Entity\\File::load((int)$id)->getFileUri();\n if ($uri != $value) {\n $this->errors[] = 'For ' . $node->id() . ', field ' . $name . ' is not ' . $value;\n return;\n }\n else {\n $this->output[] = 'For ' . $node->id() . ', field ' . $name . ' is ' . $value;\n }\n }", "title": "" }, { "docid": "da491bc755a6f21d2c8160e2da3102ef", "score": "0.59235823", "text": "function _checkFile(){\n if($this->uploadedFile && $this->uploadedFile['error'] == UPLOAD_ERR_OK ) return true;\n else return false;\n }", "title": "" }, { "docid": "38b92b37cedf85e3660e999650833643", "score": "0.59173745", "text": "function checkExists($file) {\n $message = \"\";\n if (file_exists($file)) {\n return 0;\n } else {\n return 1;\n }\n }", "title": "" }, { "docid": "e9ccbe18e35ef4a6ddfbfa34e54e5590", "score": "0.591626", "text": "function existsInTree($sha, $file) {\n try {\n $tree = $this->getTreeFromSha($sha);\n } catch (\\InvalidArgumentException $e) {\n return false;\n }\n\n return (isset($tree[$file]));\n }", "title": "" }, { "docid": "36b03730b34ff459ef25e6149532c9ef", "score": "0.59104204", "text": "public function hasFileToGenerate(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "c50e7365dbf1cb7853e09fbf9a09e9ed", "score": "0.59090257", "text": "function fileExists($publicKey, $fileIdentifier);", "title": "" }, { "docid": "e5eb803841314cb7fe4698d2c45bd2ab", "score": "0.5905074", "text": "function _file_exists( $user_id, $product_id ) {\n if ( file_exists( $this->key_file_folder(). $this->get_key_file( $user_id, $product_id ) . '.p12' ) ) {\n \t return true;\n \t } else if ( file_exists( $this->plugin_dir . 'gcal/key/'. $this->get_key_file( $user_id, $product_id ) . '.p12' ) ) {\n \t return true;\n \t } else {\n \t return false;\n \t }\n \t}", "title": "" }, { "docid": "5403d6d5068787ebce5a3e3849653bfc", "score": "0.5898188", "text": "public function fileExists() {\n\t\t$fileStorageBucket = $this->getFileStorageBucket();\n\t\treturn $fileStorageBucket->fileExists($this->getFileFullName());\n\t}", "title": "" }, { "docid": "b54345a742cba072564819605a745729", "score": "0.587814", "text": "public function hasFilePath(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cdc3b9a8d3ee0309e8975d54347bf921", "score": "0.5811832", "text": "public function file_exists() {\n return $this->retrieve_file() ? true : false;\n }", "title": "" }, { "docid": "d614ac10fb9be40475538ef59d78fe79", "score": "0.57941884", "text": "public function is_valid()\n {\n try {\n $sha_sign = $this->extract_sha_sign();\n } catch(\\InvalidArgumentException $e) {\n return false;\n }\n\n return Utils::hash_equals($sha_sign, $this->compose_sha_sign());\n }", "title": "" }, { "docid": "035c2862956f1bb2d406a10052b64fbe", "score": "0.5786225", "text": "public function fileExists($file)\n {\n return $this->checkStatement('-e \"'.$file.'\"');\n }", "title": "" }, { "docid": "556200c9f8042fe949ea13342ad2e4e5", "score": "0.5781963", "text": "private function checkFilePresent(File $file) {\t\n\t\tif (is_file ( $file->toString () ) && file_exists ( $file->toString () ) && is_readable ( $file->toString () )) {\n\t\t\t$this->result = true;\n return true;\n\t\t}\n return false;\n\t}", "title": "" }, { "docid": "75ea792a9859a211146a5712985caa83", "score": "0.57560194", "text": "public function check_file(){\n\t\tif( empty( $this->download_hook['file']) || !file_exists( $this->download_hook['file_path'] ) ) {\n\t\t\t$this->download_hook['download'] = FALSE;\n\t\t\t$this->download_hook['message'] = \"Invalid File or File Path.\";\n\t\t\treturn false;\n\t\t}\n else{\n $this->download_hook['download'] = TRUE;\n }\n }", "title": "" }, { "docid": "d93a848d9016890e70fbd8b49f0184b4", "score": "0.57463384", "text": "private static function checkFile() {\n clearstatcache();\n return filesize('server_out.txt') > 0;\n }", "title": "" }, { "docid": "90611c61741238e4a6622178499abc0c", "score": "0.5734052", "text": "public function exists(string $file): string;", "title": "" }, { "docid": "751a257daa2e0a9e00eca001e3f6f37e", "score": "0.57222176", "text": "public function checkFileForNoImageReturnsTrue() {\n\t\t$this->assertTrue(\n\t\t\t$this->fixture->checkFile(array('value' => array('name')))\n\t\t);\n\t}", "title": "" }, { "docid": "6cb585192954cbdcfd1b67efc68ee4e5", "score": "0.5721922", "text": "public function fileExists($key)\n {\n if (isset($this->files[$key])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f792ec9c24f95c806b9686b465fadbf0", "score": "0.57135", "text": "public function hasFile()\n {\n return $this->whereNotNull('file')->where('file', '!=', '');\n }", "title": "" }, { "docid": "438b07b12213d6d423d458ea95632177", "score": "0.57038766", "text": "public function hasFile()\n\t{\n\t\treturn !is_null($this->filename);\n\t}", "title": "" }, { "docid": "3eede661777b76b6f11ca663c1ec5ca0", "score": "0.5702421", "text": "function managed_file_exists($uri) {\n $fid = db_select('file_managed', 'f')\n ->fields('f', array('fid'))\n ->condition('uri', $uri)\n ->execute()\n ->fetchField();\n\n if ($fid) {\n // File already imported, load file\n return file_load($fid);\n }\n return FALSE;\n}", "title": "" }, { "docid": "ed87b4ab951d80f3fd7a890051eeb39c", "score": "0.56824803", "text": "public function fileExists() {\r\n\t\t$error = $_FILES[$this->name]['error'];\r\n\t\treturn (($error !== UPLOAD_ERR_PARTIAL) && ($error !== UPLOAD_ERR_NO_FILE));\r\n\t}", "title": "" }, { "docid": "277835a2dae6c3135d1a89086cfcc802", "score": "0.5668487", "text": "function is_file_duplicate($tmpfile) {\n\tif(DUPLICATE_FILE_CHECK) {\n\t\tlist($uploads_dir,$thumbs_dir) = setup_dir();\n\t\t$checksum = md5(file_get_contents($tmpfile));\n\t\tif(file_exists(UPLOAD_DIR . '/hash/' . $checksum)) {\n\t\t\t$file = file_get_contents(UPLOAD_DIR . '/hash/' .$checksum);\n\t\t\tlist($uploadpath, $thumbpath, $name) = explode(',', $file);\n\t\t\treturn array('upload'=>$uploadpath, 'thumb' => $thumbpath=='false'?false:$thumbpath, 'name'=>$name);\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "23f6e2ba11510e4c64bfa69cf1cc00a1", "score": "0.5665113", "text": "function doesFileContainHash($file, $inHash) {\n\t$fileHandle = fopen($file, \"r\") or die(\"Unable to open file (hash search): $file!\");\n\t$md = fread($fileHandle,filesize($file));\n\tfclose($fileHandle);\n\n\t$permaInfo = array(); //create return object\n\n\n\t$fileHash = checkPermalinkExists($md);\n\tif (preg_match(\"/^$inHash$/i\", $fileHash)) {\n\t\t$permaInfo[] = $fileHash;\n\t}\n\treturn $permaInfo;\n}", "title": "" }, { "docid": "4e190997dd1e03de216697a56334429e", "score": "0.566002", "text": "private function isFile($key)\n {\n if ($this->redis->type($key) == 'string') {\n $info = Str::unserialize($this->redis->get($key));\n if (is_array($info) && isset($info['keystonefile'])) {\n return $info;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8027f39be5dfe391cf0ad56cde76612d", "score": "0.565455", "text": "static public function has($key,$file=null){\n if( self::get($key,$file) === null ){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "8f2518a26bf00cdeebf981f597837775", "score": "0.56455237", "text": "function file_exists( $file ) {\n \t\t$file = mosFS::getNativePath( $file, false );\n\t\treturn file_exists( $file );\n\t}", "title": "" }, { "docid": "5f6db6fdff78fb9060e7e732b9a7350a", "score": "0.5641863", "text": "public function payloadFromFile($file)\n {\n if (file_exists($file)) {\n $this->payloadFilename = $file;\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "efe2704b803a1da57913506610dfe5e8", "score": "0.56309855", "text": "public function fileExists()\n {\n\t\treturn file_exists($this->name);\n\t}", "title": "" }, { "docid": "3005041be22687e72bcfb55a8ceed4f0", "score": "0.5608085", "text": "function isFileExists($key=null) {\n\t\t$filename = $this->getParamSet()->getParam($key);\n\t\tif ( file_exists($filename) && is_readable($filename) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "be7c7aca9f182c30ffb8c7d59821d36f", "score": "0.5593303", "text": "public function exists(File $file);", "title": "" }, { "docid": "915c955f127a01bbc1c08b1dbfdf7b06", "score": "0.55875283", "text": "public function exists() {\n //echo '<pre>', $this->path . $this->file, '</pre>';\n return file_exists($this->path . $this->file);\n }", "title": "" }, { "docid": "748b114a53b8698892705222aec6a84f", "score": "0.55522597", "text": "public function exists( string $file ): bool;", "title": "" }, { "docid": "2f6a6f632ab48cc52a3f7f0e95b6c73a", "score": "0.5543215", "text": "private function getContentDuplicateId($hash)\n {\n $file = $this->getDoctrine()\n ->getRepository('CoralFileBundle:File')\n ->findOneByHash($hash);\n\n return ($file && $file instanceof File) ? $file : false;\n }", "title": "" }, { "docid": "7b06c40e404a2bcbcd9b5d9584ed8279", "score": "0.5533662", "text": "protected function fileExists($file) {\r\n return is_file( $file['path'] );\r\n }", "title": "" }, { "docid": "1c16391462823c73e688806aeb8e8010", "score": "0.55115056", "text": "private function fileExists($param)\n {\n }", "title": "" }, { "docid": "5f5aab86a724f6af9e229e8a18f268fb", "score": "0.55104446", "text": "public function passes($attribute, $value)\n {\n $content = File::get($value->getRealPath());\n return ! empty(json_decode($content, true));\n }", "title": "" }, { "docid": "c8d79a31cc19881f1eb981ff1fa393aa", "score": "0.55084", "text": "private function isSafeFile($shac) {\n\t\tif (is_array($shac)) {\n\t\t\t$result = $this->engine->api->call('is_safe_file', array(), array('multipleSHAC' => json_encode($shac)));\n\t\t\tif (isset($result['isSafe'])) {\n\t\t\t\treturn $result['isSafe'];\n\t\t\t}\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$result = $this->engine->api->call('is_safe_file', array(), array('shac' => strtoupper($shac)));\n\t\tif(isset($result['isSafe']) && $result['isSafe'] == 1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b53516e8fee7232d180429bc91b9764a", "score": "0.5501469", "text": "public function check_hash()\n {\n $hash = $_GET['Sign'];\n\n $params = array(\n 'Id' => $_GET['Id'],\n 'CCode' => $_GET['CCode'],\n 'Amount' => $_GET['Amount'],\n 'ACode' => $_GET['ACode'],\n 'Order' => $_GET['Order'],\n 'Fild1' => rawurlencode($_GET['Fild1']),\n 'Fild2' => rawurlencode($_GET['Fild2']),\n 'Fild3' => rawurlencode($_GET['Fild3'])\n );\n\n $string = '';\n foreach ($params as $key => $val) {\n $string .= $key . '=' . $val . '&';\n }\n // Remove Last \"&\"\n $string = substr($string, 0, -1);\n\n $verify = hash_hmac('SHA256', $string, $this->settings['signature']);\n\n if ($verify === $hash)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "5a61037fa953422a517f0c4d7f814094", "score": "0.5490756", "text": "protected function isValidFile()\n {\n return file_exists($this::CONFIG_DIR . $this->fileName())\n && is_readable($this::CONFIG_DIR . $this->fileName());\n }", "title": "" }, { "docid": "e40b09ac4a9b7c509568a97b2455a267", "score": "0.54867864", "text": "public function exists($file);", "title": "" }, { "docid": "00df969410f928706d98b8528ebdb970", "score": "0.5485045", "text": "public function fileExists() {\n\t\treturn file_exists($this->directory.'/'.$this->fileName);\n\t}", "title": "" }, { "docid": "9e7598804b81f86755890eb45f5e241e", "score": "0.5482696", "text": "public function check_size($file){\n $ret = false;\n if (!$this -> _file_init($file)) return true;\n if ($this -> _init_header()){\n $buf = fread($this -> fd, 24);\n $tmp = unpack('H32id/Vlen/H8unused', $buf);\n if ($tmp['id'] == '3626b2758e66cf11a6d900aa0062ce6c'){\n $stat = fstat($this -> fd);\n $ret = ($stat['size'] == ($this -> head['len'] + $tmp['len']));\n }\n }\n $this -> _file_deinit();\n return $ret;\n }", "title": "" }, { "docid": "662669e8c6ee88c23ddcad719cff30f6", "score": "0.54768425", "text": "public function file_exist($file = null) {\n return file_exists($file);\n }", "title": "" }, { "docid": "8bb1ed18ef69b6106848d13b41b9e3f8", "score": "0.54638845", "text": "public function checkFiles(){\n // Check integrity of files:\n $files = array();\n foreach($this->checksums as $file => $digest){\n if(!file_exists($path = $this->updateDir.DIRECTORY_SEPARATOR.FileUtil::rpath($file))){\n $files[$file] = self::FILE_MISSING;\n }else if(md5_file($path) != $digest){\n $files[$file] = self::FILE_CORRUPT;\n }else{\n $files[$file] = self::FILE_PRESENT;\n }\n }\n return $files;\n }", "title": "" }, { "docid": "0dde3dd134f9ac82d54251900ec946f1", "score": "0.5457498", "text": "public function hasFile(string $key)\n {\n return $this->files()->has($key);\n }", "title": "" }, { "docid": "e73e3fe46e6d68887d435ddaa3fc9f59", "score": "0.5436087", "text": "public function exist () {\n\t\treturn file_exists ($this->file);\n\t}", "title": "" }, { "docid": "68671d74a91f5a82140893bdb82da07e", "score": "0.542972", "text": "public static function has_file( $key ) \n\t{\n\t\treturn static::$_instance->has_file( $key );\n\t}", "title": "" }, { "docid": "a6f979aec6d98b462812f18d2e5a12be", "score": "0.5422975", "text": "public function check_size($file){\n return true;\n }", "title": "" }, { "docid": "9be4992217102f0ced2e11a85b18debb", "score": "0.54205096", "text": "public function exists(string $filename): bool;", "title": "" }, { "docid": "24c47f55b86fd0707e65ed1f471e437e", "score": "0.54070413", "text": "function check_verify_bundle()\n{\n $success=true;\n $repo=$_GET['p'];\n $what=$_FILES['bundle_file']['tmp_name'];\n $out1 = array();\n if( $success ) $success = $success && check_new_head_in_bundle( $what, $out1 );\n if( $success ) $success = $success && save_bundle();\n html_spacer();\n if( $success ){\n html_title(\"REGISTERED\");\n }\n else{\n html_title(\"!!! ERROR !!!\");\n }\n html_spacer();\n echo \"<table>\\n\";\n foreach( $out1 as $out ){\n echo \"<tr><td>\".$out.\"</td></tr>\\n\";\n }\n echo \"</table>\\n\";\n return $status;\n}", "title": "" }, { "docid": "153317c6696de6901b7d7a8cb18ce4c2", "score": "0.54069734", "text": "function okayFile($f) {\n\tif(file_exists($f)){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "617f23bea398b32d02d36e1ac7ee5574", "score": "0.5406687", "text": "public static function check_file()\r\n\t{\r\n\r\n\t\t$db = new database();\r\n\t\t$file = $_POST['file'];\r\n\t\tif (file_exists(\"./public/userdata/cover_pics/$file\")) {\r\n\t\t\techo \"cover\";\r\n\t\t} elseif (file_exists(\"./public/userdata/data_pics/$file\")) {\r\n\t\t\techo \"data\";\r\n\r\n\t\t} elseif (file_exists(\"./public/userdata/profile_pics/$file\")) {\r\n\t\t\techo \"profile\";\r\n\t\t} else {\r\n\t\t //If Image is broken\r\n\t\t\techo \"noImage\";\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "f0632619ce283d15c17e54e0de3afcfa", "score": "0.54063886", "text": "public function genCheckSum($file_path)\n {\n\tif(!file_exists($file_path))\n\t {\n\t return 0;\n\t }\n\t \n\tif(filesize($file_path) == 0)\n\t {\n\t return 0;\n\t }\n\t \n\t$blob = base64_encode(fread(fopen($file_path),filesize($file_path)));\n\t\n\treturn md5($blob);\n }", "title": "" }, { "docid": "f31d1a0dc6ea2c84412b40163c7a55da", "score": "0.54063106", "text": "public function getFileHash(): string;", "title": "" }, { "docid": "dc8a4f9cfb705d4da66b320d6ea95c63", "score": "0.5405664", "text": "public function isOkFileNeeded();", "title": "" }, { "docid": "06df8313daed806459bd0d8eff35921e", "score": "0.54005045", "text": "public function checkIfCredentialFileExists(){\n if (file_exists($this->credentialsPath) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5ea997826c3845fb05973297d2945100", "score": "0.5397921", "text": "public function isValidFileInstance($value)\n {\n return $value instanceof File && $value->isValid();\n }", "title": "" }, { "docid": "3fb43e39b12b568dec6505e8a6e6e63e", "score": "0.53869617", "text": "public function fileExists()\n\t{\n\t\treturn FileFunctions::instance()->fileExists($this->data['tmp_name']);\n\t}", "title": "" }, { "docid": "7067c08f6b2bfa1ea1a6495e164a2493", "score": "0.53795916", "text": "public function isValidFile(string $file): bool;", "title": "" }, { "docid": "1592096d88709d968a269845c9411dfa", "score": "0.5376967", "text": "public function isFile() {\n return $this->file_id !== 0;\n }", "title": "" }, { "docid": "b928445160849276747f9a983519f502", "score": "0.53763735", "text": "function checkFileExists($target_file)\n {\n if (file_exists($target_file)) {\n echo \"Sorry, file already exists.\";\n return false;\n }\n else\n return true;\n }", "title": "" }, { "docid": "ac0e0e1aa67f8ff40ec3b7377c5c38f0", "score": "0.53753847", "text": "function fz_is_hash_valid($form_hash) {\r\n\t$ret = false;\r\n\t$saved_hash = fz_retrieve_hash();\r\n\tif ($form_hash === $saved_hash) {\r\n\t\t$ret = true;\r\n\t}\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "b7ea5a2df4e1369855f86587c01369d6", "score": "0.53713673", "text": "function restore_check_moodle_file ($file) {\n\n $status = true;\n\n //Check if it exists\n if ($status = is_file($file)) {\n //Open it and read the first 200 bytes (chars)\n $handle = fopen ($file, \"r\");\n $first_chars = fread($handle,200);\n $status = fclose ($handle);\n //Chek if it has the requires strings\n if ($status) {\n $status = strpos($first_chars,\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n if ($status !== false) {\n $status = strpos($first_chars,\"<MOODLE_BACKUP>\");\n }\n }\n }\n\n return $status;\n }", "title": "" }, { "docid": "d5557293b36ce97ee1c1255c8f9d9da7", "score": "0.53664315", "text": "public function hasFile(string $name): bool;", "title": "" }, { "docid": "0d587cc02c7bec693f62df8d6d1a5644", "score": "0.53629917", "text": "public function exists() {\n\t\treturn (file_exists($this->file));\n\t}", "title": "" }, { "docid": "7f994927198c9808b6ab326ba0c68029", "score": "0.5360727", "text": "public function exists() {\r\n\t\treturn (isset($_FILES[$this->name]));\r\n\t}", "title": "" }, { "docid": "d4dd9c6cebb42b24fc65f31767eb4fc8", "score": "0.535646", "text": "function sha256_file($filename, $raw_output){}", "title": "" }, { "docid": "805980e19284e429a43bfcadfa64fc6c", "score": "0.53548133", "text": "public function passes($attribute, $value)\n {\n if (!file_exists($value)) {\n // エラー\n return false;\n }\n\n if (!is_file($value)) {\n // エラー\n return false;\n }\n\n // 正常\n return true;\n }", "title": "" }, { "docid": "dbbd2cc43583af4614d8723f92c2f3fa", "score": "0.53524804", "text": "private function checkFileSize() {\n\t\t\treturn ($this->_file_['size'] <= $this->file_max_size);\n\t\t}", "title": "" }, { "docid": "da4546358c95b8544f1dd1e3dd4e9542", "score": "0.53512937", "text": "static function protectFileExists($filename)\n {\n return file_exists(FileReader::protectChangeIntoAndSplit($filename, false));\n }", "title": "" }, { "docid": "19c35658ddb4ab2a253d054adbe2ba6f", "score": "0.5348526", "text": "function okayFile($f) {\n\n\t$fileContents = \"\";\n $fileContents = slurpfile($f);\n\n\tif($fileContents === FALSE) // If fileContents is null then file is not valid, return false.\n\t{\n\t\treturn false;\n\t}\n\telse // Else return true.\n\t{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "6835d9c4a965b2f41b6ec307399c2fa3", "score": "0.53478664", "text": "function sha1_file($filename, $raw_output){}", "title": "" }, { "docid": "bbcc57c7131d71d66eb2305801e20d42", "score": "0.53449446", "text": "public function passes($attribute, $value)\n {\n // 排他処理用の物理ファイルが存在しないこと\n return !file_exists(storage_path('framework/' . $this->lock_file_name));\n }", "title": "" }, { "docid": "48a6fe83c0a5ee1c615ec5155a709ce2", "score": "0.53433716", "text": "function checkFileIsExist($filename)\n{\n\treturn file_exists($filename) ? true : false;\n}", "title": "" }, { "docid": "38358e4961fa6718997bdc8f3205c9ec", "score": "0.5330715", "text": "public static function valid($file)\r\n {\r\n return (isset($file['error']) && isset($file['name']) && isset($file['type']) && isset($file['tmp_name']) && isset($file['size']));\r\n }", "title": "" }, { "docid": "d806dad3c56271dbe4645aeab441564d", "score": "0.53246194", "text": "public function verify_path() {\n if (self::$inputConfig['required'] && !self::$inputValue) {\n \\defender::stop();\n \\defender::setInputError(self::$inputName);\n }\n if (file_exists(self::$inputConfig['path'].self::$inputValue) && is_file(self::$inputConfig['path'].self::$inputValue)) {\n return self::$inputValue;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "1c202b80a8348baa6ccc57ada7c9553b", "score": "0.5322634", "text": "private function fileElementExists($path){\n\t\treturn Storage::disk($this->DISK_DRIVER)->exists($path);\n\t}", "title": "" }, { "docid": "a0e65350439e9eefcbe285ef47d6541e", "score": "0.5322402", "text": "public function hasFileId()\n {\n return $this->FileId !== null;\n }", "title": "" }, { "docid": "f2ba4458c5376edf89205bd808f5747b", "score": "0.5317009", "text": "public function has($key)\n {\n $filename = $this->getKeyCode($key);\n return $this->fileExists($filename);\n }", "title": "" }, { "docid": "59f9fa27ecbaddaa6b321a341dd16c0d", "score": "0.531571", "text": "private function checksumCheck( $file, &$checksum ) {\r\n\t\t$checksum = md5_file( $file );\r\n\t\tif ( isset( $this->oldChecksum[ $checksum ] ) && $this->oldChecksum[ $checksum ] == $file ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "8a7e9c287dce03e6cdf80858362eacad", "score": "0.53138334", "text": "public function exists($filename);", "title": "" }, { "docid": "88914881b6bbde1943e3828f7a192b11", "score": "0.5298778", "text": "public function isExists($filename);", "title": "" }, { "docid": "69e72b29e97bcd5f364ae323af669516", "score": "0.529688", "text": "public function exists()\n\t{\n\t\treturn file_exists($this->file);\n\t}", "title": "" }, { "docid": "69e72b29e97bcd5f364ae323af669516", "score": "0.529688", "text": "public function exists()\n\t{\n\t\treturn file_exists($this->file);\n\t}", "title": "" }, { "docid": "590db3a645bb2ca0054b181f8082fe6e", "score": "0.5295301", "text": "public function exists()\n {\n return file_exists($this->fileName);\n }", "title": "" }, { "docid": "0eb9603f979403c42d6b19112fe6b237", "score": "0.52916044", "text": "function is_binary_file($file)\n {\n if (file_exists($file)) {\n if (!is_file($file)) {\n return 0;\n }\n\n $fh = fopen($file, \"r\");\n $blk = fread($fh, 512);\n fclose($fh);\n clearstatcache();\n\n return (\n 0 or substr_count($blk, \"^ -~\", \"^\\r\\n\") / 512 > 0.3\n or substr_count($blk, \"\\x00\") > 0\n );\n }\n return 0;\n }", "title": "" }, { "docid": "a0c48bcee52621bb2351714e5b146940", "score": "0.52888536", "text": "public function passes($attribute, $value)\n {\n return Storage::exists($value);\n }", "title": "" }, { "docid": "b4bd739907b3d762f5d9617d14e11317", "score": "0.5287842", "text": "protected function hasEntry(string $filename): bool {\n return $this->createProcess('-tf', $this->filename, $filename)\n ->start()\n ->end()\n ->isSuccessful();\n }", "title": "" }, { "docid": "5e2f08d5cdd1032ccbf7554abfe62e45", "score": "0.52780163", "text": "public function onHashFile(string $filename, ?string &$out_hash): bool\n {\n $out_hash = hash_file(E\\Attachment::FILEHASH_ALGO, $filename);\n return Event::stop;\n }", "title": "" }, { "docid": "382f0ea95978c3228d41f19350596ef0", "score": "0.52758294", "text": "public function hasSourceHash()\n {\n return isset($this->sourceHash);\n }", "title": "" }, { "docid": "bccd0fba315213a61124341549fd435a", "score": "0.5274679", "text": "public function hasRawFileSize()\n {\n return $this->raw_file_size !== null;\n }", "title": "" }, { "docid": "4c870fe6630c0065b71205380b260cc6", "score": "0.52745", "text": "public function fileExists() {\n if (!isset($this->filename) || is_null($this->filename) || $this->filename == \"\") {\n return false;\n }\n\n return file_exists($this->filename);\n }", "title": "" }, { "docid": "287f569b5532956e250640136916bb6b", "score": "0.5274493", "text": "private function exists(string $file): bool\n {\n $res = @fopen($file, \"r\");\n \n if ($res !== false) {\n fclose($res);\n return true;\n }\n\n return false;\n }", "title": "" } ]
f9fd2a5f0f795b66ef950fb2611005b8
Set as true to make the request 404. Used stop the display of empty sitemaps or invalid requests.
[ { "docid": "8844bdda6e83a8ba93deec0035c1d243", "score": "0.0", "text": "public function set_bad_sitemap($is_bad)\n {\n }", "title": "" } ]
[ { "docid": "3190aa182654860a9c7297678cebc6b2", "score": "0.7636017", "text": "public function for_404()\n {\n }", "title": "" }, { "docid": "3190aa182654860a9c7297678cebc6b2", "score": "0.7635759", "text": "public function for_404()\n {\n }", "title": "" }, { "docid": "88e0059acad00a35768375c47ddb9268", "score": "0.76215637", "text": "public function is_404()\n {\n }", "title": "" }, { "docid": "88e0059acad00a35768375c47ddb9268", "score": "0.7620316", "text": "public function is_404()\n {\n }", "title": "" }, { "docid": "63aa71cd3fa278b48013c8a3ad4f591d", "score": "0.74846506", "text": "public function is_404() {}", "title": "" }, { "docid": "a22ae619cd9e5840714a782ab9a5b67b", "score": "0.74071115", "text": "protected function set_404()\n {\n }", "title": "" }, { "docid": "261bf24bd1d4310b2189e1fc37e99c09", "score": "0.7375851", "text": "protected function is_feed_404()\n {\n }", "title": "" }, { "docid": "b6be8a65834ada3002926a8b0174ba86", "score": "0.73093635", "text": "abstract protected function give_404();", "title": "" }, { "docid": "e2e41d6a4bdff323c58782e6280a577f", "score": "0.7214876", "text": "public function check_404() {\r\n \tif ($this->is_404) {\r\n \t\treturn true;\r\n \t}\r\n \telse {\r\n \t\treturn false;\r\n \t}\r\n }", "title": "" }, { "docid": "50f0323c6315b4b571feefaf8371a4e9", "score": "0.7184739", "text": "public function set_404()\n {\n }", "title": "" }, { "docid": "80d1312c4f0883f7da28498cd401a9bf", "score": "0.7141196", "text": "public function set_404() {}", "title": "" }, { "docid": "c419ed7c157ab4bf373b18ef8d011edd", "score": "0.70596945", "text": "public function throw_404()\n {\n $site_404 = ee()->config->item('site_404');\n $strict_urls = ee()->config->item('strict_urls');\n $segment_1 = ee()->uri->segment(1);\n\n if ($site_404 && $strict_urls == 'y' && $segment_1 != '404' && !ee()->publisher_lib->is_default_mode)\n {\n ee()->functions->redirect(ee()->functions->create_url(ee()->functions->extract_path(\"=404\")));\n }\n }", "title": "" }, { "docid": "68ea917e2cb51d3c9a996f06e7880a99", "score": "0.7022883", "text": "private function breadcrumbs_404_setting()\n {\n }", "title": "" }, { "docid": "8ec12f848c389c78e67854bca0d4b0a9", "score": "0.70218617", "text": "protected function send404()\n {\n $this->page->setStatus('404', 'Not found');\n\n $this->page->setTemplate('generic/notfound');\n $this->page->layout_template = 'external.phtml';\n return;\n }", "title": "" }, { "docid": "d9c12843dc38e5c84309b2703e8b6e9f", "score": "0.6968809", "text": "function error404() {\n \n }", "title": "" }, { "docid": "daec5cc1e807499913daffb890727b0d", "score": "0.6942149", "text": "public function _404()\n\t{\n\t\t\t\n\t}", "title": "" }, { "docid": "c948bc93dd5efa9777ce4c6e797c8c04", "score": "0.6939395", "text": "public function handle_404() {}", "title": "" }, { "docid": "30837f4956131da87663823743a6973f", "score": "0.692663", "text": "public function hello404Action(Request $request)\n {\n return false;\n }", "title": "" }, { "docid": "5529c4f9b8e27c9216a963ae51008e34", "score": "0.6895728", "text": "public static function send_404() {\n global $wp_query;\n $wp_query->set_404();\n status_header(404);\n require( get_404_template() );\n exit();\n }", "title": "" }, { "docid": "611a0d2cad8252b16e445a184b21b0ce", "score": "0.6865619", "text": "public function error_404() {\n\t\t$this->http_error(404);\n\t}", "title": "" }, { "docid": "01ff11dd1c7653442995c576a1127481", "score": "0.68590665", "text": "public static function set_404() {\n\n\t\tglobal $wp_query;\n\n\t\tstatus_header( 404 );\n\n\t\tif ( function_exists( 'nocache_headers' ) ) {\n\t\t\tnocache_headers();\n\t\t}\n\n\t\t$wp_query->set_404();\n\t\t$page_404 = get_404_template();\n\n\t\tif ( 1 < strlen( $page_404 ) ) {\n\n\t\t\tinclude( $page_404 );\n\n\t\t} else {\n\n\t\t\tinclude( get_query_template( 'index' ) );\n\n\t\t}\n\n\t\tdie();\n\n\t}", "title": "" }, { "docid": "365cf76442a1804ab05369b52395f31a", "score": "0.6838816", "text": "public function isNotFound(): bool\n {\n return $this->getStatusCode() === 404;\n }", "title": "" }, { "docid": "a37065703c9950f8a97891543351d112", "score": "0.6838553", "text": "public function handle_404()\n {\n }", "title": "" }, { "docid": "f1fa2ac4d22942849b1887fb86a03ec7", "score": "0.6833272", "text": "protected function notFound()\n {\n $this->response->status->set(404);\n }", "title": "" }, { "docid": "80388e5f2bc12f511d956a6a930b110d", "score": "0.6827172", "text": "public function notFound()\n {\n abort(404);\n }", "title": "" }, { "docid": "c5b2f67b486248ba17ef450cc5d2951a", "score": "0.6789708", "text": "protected function show404() \n\t\t{\n\n\t\t\t//@TODO Real implementation...\n\t\t\tHttp::sendStatus(404);\n\t\t\t\n\t\t\tif (class_exists(\"\\\\Application\\\\Controllers\\\\ErrorController\")) {\n\n\t\t\t\t$controller = new \\Application\\Controllers\\ErrorController($this->request, false);\n\t\t\t\t$controller->show(404);\n\n\t\t\t} else {\n\n\t\t\t\techo (\"404 Page not found\");\n\n\t\t\t}\n\n\t\t\tdie;\n\n\t\t}", "title": "" }, { "docid": "a7ee7f05c393b2315438a51a60f55672", "score": "0.67760074", "text": "public function isNotFound()\n {\n return 404 === $this->statusCode;\n }", "title": "" }, { "docid": "6cd5c95f6121125fd3c1f1bc2d6f4eed", "score": "0.6759481", "text": "public function action_404()\n\t{\n\t\t$this->template->title = '404 Not Found';\n\t\t$this->template->content = View::forge('error/404');\n\t\t$this->response->status = 404;\n\t}", "title": "" }, { "docid": "64d551abdd08dc9fe9734f27ba92a4f2", "score": "0.6756206", "text": "public function notFoundAction()\n {\n // Send 404 HTTP Error\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\n \n // View\n $this->getView()->assign(array(\n 'error' => $this->getError()\n ));\n }", "title": "" }, { "docid": "a65dacc62326aeae554d67a961399c93", "score": "0.6745001", "text": "protected function defaultNotFound()\n {\n if($this->request()->isXhr()){\n $this->contentType(\\Raptor\\Raptor::JSON);\n $response=new \\Raptor\\Util\\ItemList();\n $response->set('cod',5);\n $response->set('msg',\"<h2>404 Page Not Found</h2>\".'<h4>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href=\"' . $this->request->getRootUri() . '/\">Visit the Home Page</a></h4>');\n echo $response->toJson();\n return;\n }\n echo static::generateTemplateMarkup('404 Page Not Found', '<p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href=\"' . $this->request->getRootUri() . '/\">Visit the Home Page</a>');\n }", "title": "" }, { "docid": "f8ce42cb60dc08a7c437ee9c1fe0612c", "score": "0.67268836", "text": "public function isNotFound()\r\n {\r\n return $this->statusCode() == 404;\r\n }", "title": "" }, { "docid": "dec0c9c8bee398d77c0c8d9d08ddd0dc", "score": "0.67265403", "text": "public function isNotFound()\n\t{\n\t\treturn (404 === $this->statusCode);\n\t}", "title": "" }, { "docid": "c528bbb8a5f7055bb8f2d1c599d10dd0", "score": "0.67224216", "text": "function notFound() {\n header('HTTP/1.0 404 Not Found');\n }", "title": "" }, { "docid": "c25092621459ad6be76e53f07cdd5dc5", "score": "0.6715906", "text": "public function error404()\n\t{\n\t\t//envoie une entête 404 (pour notifier les clients que ça a foiré)\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tView::show(\"errors/404.php\", \"Website | 404\");\n\t}", "title": "" }, { "docid": "bc21f70c82f00aff4ed5347d39339437", "score": "0.67092294", "text": "public function not_found_response() {\n $this->my_response = array(\n \"status\" => false,\n \"message\" => \"Url Not Found\",\n );\n $this->send_response(404);\n }", "title": "" }, { "docid": "d173cb170e930d5c6d828583b0976f18", "score": "0.6690534", "text": "public function show_404()\n\t{\n\t\techo view('common/errors/error_404');\n\t\texit();\n\t}", "title": "" }, { "docid": "8cdeebdc3e7749810c8dde796e65a6c7", "score": "0.6673051", "text": "public function action_404()\n\t{\n\t\treturn \\Response::forge($this->_theme->build('error',\n\t\t\t\t\tarray(\n\t\t\t\t\t'error' => __('Page not found. You can use the search if you were looking for something!')\n\t\t\t\t)));\n\t}", "title": "" }, { "docid": "bed2e179b59932dd6164fbfe787a4e03", "score": "0.6651705", "text": "public static function set404() {\n// set 404 module name and action name\t\n $_GET['m'] = 'mod_error';\n $_GET['a'] = 'page_404';\n// set 404 status code\n header(\"HTTP/1.0 404 Not Found\");\n// build application\n APP::buildeApplication();\n//$url = URI::getURL(\"mod_error\",\"page_404\");\n//UTIL::redirect($url);\t\t\t\n }", "title": "" }, { "docid": "5710c7417eb2063889e306bd9f9a5961", "score": "0.6650699", "text": "function maybe_redirect_404() {}", "title": "" }, { "docid": "e71d44e21467a9c35bc0d4b865341289", "score": "0.6640927", "text": "public static function e404():void \r\n {\r\n if (HttpResponse::IsAjax()){\r\n HttpResponse::SetJsonHeaders(404);\r\n echo json_encode(array(\r\n 'status' => false, // success or not?\r\n 'message' => \"404 Not Found\"\r\n ));\r\n } else {\r\n HttpResponse::SetHTMLHeaders(404);\r\n include_once(self::$_e404);\r\n }\r\n }", "title": "" }, { "docid": "dd50856f205ac88c609b01b005a6b4f8", "score": "0.6632434", "text": "public function load404()\n {\n header(self::HEADER_404);\n Controller::call(CORE_CONFIG['controller_404']);\n exit;\n }", "title": "" }, { "docid": "6a2b5bf08c13666f68a0caee551c8794", "score": "0.66295516", "text": "public function return404()\n {\n echo View::render('404', []);\n }", "title": "" }, { "docid": "4d584636db52affa9960fc1b4d99196d", "score": "0.662257", "text": "public function no_items()\n {\n echo \"No 404 entries\";\n }", "title": "" }, { "docid": "7390d54a84cc75649eba90965e18a9ac", "score": "0.6615264", "text": "function show404Page() {\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\n\t\t$this->render($this->getTpl('404', '/download'));\n\t}", "title": "" }, { "docid": "b9bbacfa66da0466318c281f468db1ce", "score": "0.66126573", "text": "public function notFound() {\n\t\t\t$this->redirect('error/404');\n\t\t}", "title": "" }, { "docid": "838f7c5e4bef7e7693a4200d30ecac55", "score": "0.6608269", "text": "function not_found() {\n\t\tlog_app('Status','404: Not Found');\n\t\theader('Content-Type: text/plain');\n\t\tstatus_header('404');\n\t\texit;\n\t}", "title": "" }, { "docid": "617c7988351dbc9a261017c252d99076", "score": "0.6590312", "text": "public function display404Page()\n {\n require VIEWS_DIR . DS . '404' . '.' . config('application.views_file_extension');\n header(\"HTTP/1.0 404 Not Found\");\n exit();\n }", "title": "" }, { "docid": "1ae9d02d3cb445490b0dd258fa9cab4e", "score": "0.6587227", "text": "public function notFoundAction()\n {\n $this->tag->appendTitle('404');\n $this->response->setHeader(404, 'Not Found');\n }", "title": "" }, { "docid": "dd34bd69c890d175d5b4a122326ca88b", "score": "0.6572113", "text": "public function http404Action()\n {\n }", "title": "" }, { "docid": "0aa3f60d81c28d3e8c7a1747e68fdfd1", "score": "0.65635353", "text": "public function beforeNotFound()\n {\n $language = $this->registry->language;\n $redirect= sprintf('/%s/404', $language);\n\n $this->response->redirect($redirect);\n $this->response->send();\n\n return false;\n }", "title": "" }, { "docid": "9d3c9fcfc91f90ec83754183bfe5d43a", "score": "0.6545467", "text": "public static function give_404()\r\r\n\t{\r\r\n\t\t@ob_clean();\r\r\n\t\tob_start();\r\r\n\t\t\r\r\n\t\theader('HTTP/1.0 404 Not Found');\r\r\n\t\theader('Status: 404 Not Found'); \r\r\n\t\t \r\r\n\t\treadfile(CPF_ROOT_DIR . '404.html');\r\r\n\r\r\n\t\tob_end_flush();\r\r\n\t\texit();\t\t\t\r\r\n\t}", "title": "" }, { "docid": "ed897e49a09988e02f939893cfabb5d4", "score": "0.65441644", "text": "public function isNotFound()\n {\n return in_array($this->response->getStatusCode(), $this->response->getNotFoundCodes());\n }", "title": "" }, { "docid": "b5f435c0ff47cc1905902cadcd1e8c95", "score": "0.6542176", "text": "private function serve404Response()\n {\n if (! $this->filesystem->exists($this->path) || $this->filesystem->isDirectory($this->path)) {\n Headers::set('HTTP/1.0 404 Not Found');\n die('Resource not found');\n }\n }", "title": "" }, { "docid": "84052ce91dc4419a89ab3d8989c2453b", "score": "0.653947", "text": "protected function notFound() {\n\t\theader('HTTP/1.0 404 Not Found');\n\t\tdie('Page introuvable');\n\t}", "title": "" }, { "docid": "b1804fa9d3f8920d5231dab50eea610c", "score": "0.6531512", "text": "public function action_404()\n\t{\n\t\t$this->template->title = 'Oh dear, oh dear, oh dear';\n $this->template->content = Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "fca7a7171e4173c7c50f85fd2fbe51f6", "score": "0.65281403", "text": "function return404() {\n\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\"); // Return a 404\n\t\theader(\"Content-Type: text/plain\");\n\t\tprint(\"404 Not Found\\n\");\n\t\texit();\n\t}", "title": "" }, { "docid": "2ca6ca5e3f1dd61f9e48a3c0d89023a1", "score": "0.652371", "text": "public function set404()\n\t{\n\t\tif (version_compare(APP_VER, '3', '<'))\n\t\t{\n\t\t\treturn $this->legacy404();\n\t\t}\n\n ee()->load->library('template', NULL, 'TMPL');\n\n ee()->TMPL->show_404();\n\n return $this;\n\t}", "title": "" }, { "docid": "a2320609e2b003bdea8b9e5597c0c5d1", "score": "0.6520242", "text": "function pageNotFound() {\n $this->global['pageTitle'] = 'tiqs : 404 - Page Not Found';\n\n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "title": "" }, { "docid": "17b88a741fe270a680a8e48cdfda46bf", "score": "0.65196395", "text": "public function send404($result = '') { $this->send(404, $result); }", "title": "" }, { "docid": "1733777411bcc1cd7600227f5fe701ce", "score": "0.6508246", "text": "public function show404()\n {\n //set response status code to 404\n $this->response = $this->response->withStatus('404');\n $target = $this->request->getRequestTarget();\n $content = '<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n <html><head>\n <title>404 Not Found</title>\n </head><body>\n <h1>Not Found</h1>\n <p>The requested URL '.$target.' was not found on this server.</p>\n <hr>\n </body></html>';\n \n $this->response->write($content);\n return $this->response;\n }", "title": "" }, { "docid": "46cf9c3a7fdeb0cb728e3f37f250284d", "score": "0.64849085", "text": "abstract public function set404($message = 'Not Found');", "title": "" }, { "docid": "b4b0aadd43332dac524a358c944e1d43", "score": "0.64823055", "text": "public function page404() \n {\n header(\"HTTP/1.0 404 Not Found\");\n $this->render('main/page404');\n }", "title": "" }, { "docid": "6a4d0a1b23a03000a48c313945c8247c", "score": "0.647168", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "39992737089987b1d1d9a0c9545021b5", "score": "0.64578855", "text": "public function show404()\n\t{\n\t\tif($this->CI->input->get('is_acp'))\n\t\t{\n\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t}\n\n\t\t$this->setTitle(lang(\"404_title\", \"error\"));\n\n\t\t$message = $this->loadPage(\"error.tpl\", array('module' => 'errors', 'is404' => true));\n\t\t$output = $this->box(lang(\"404\", \"error\"), $message);\n\n\t\t$this->view($output);\n\t}", "title": "" }, { "docid": "153490e4197b79d2fba7ea818d778bf6", "score": "0.64565015", "text": "function render_404() {\n\t\theader('HTTP/1.0 404 Not Found');\n\t\t// if there is a 404 page set, use it\n\t\tif(file_exists('../public/404.html')) echo file_get_contents('../public/404.html');\n\t\t// otherwise, use this text as a default\n\t\telse echo '<h1>404</h1><h2>Page could not be found.</h2><p>Unfortunately, the page you were looking for does not exist here.</p>';\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b277a26f2aa9952eb9f8881f42a7f83d", "score": "0.6451857", "text": "function not_found(){\n http_response_code(404);\n}", "title": "" }, { "docid": "14a6df87b0eb64e7f7bf1418045932fe", "score": "0.64508635", "text": "function actionShow404()\n {\n header($_SERVER[\"SERVER_PROTOCOL\"] . \" 404 Not Found\", true, 404);\n echo \"404 ERROR\";\n exit;\n }", "title": "" }, { "docid": "bbfaeac1d6e455b7f74b495738a1cfd4", "score": "0.6448822", "text": "public function show404Action()\n {\n $this->getMenuItems();\n $this->getMetaItems();\n $this->metaTags['metaRobots'] = 'NOINDEX, NOFOLLOW';\n return $this->render('AppBundle:Exception:show404.html.twig', array(\n// 'sites' => $this->sites,\n// 'categories' => $this->categories,\n 'metaTags' => $this->metaTags,\n ));\n }", "title": "" }, { "docid": "8dbdbb179228d2b734dd1144bd8c2e91", "score": "0.644842", "text": "private function executeError404()\n {\n die('404 Error');\n }", "title": "" }, { "docid": "6ffa87821fff6e4d79b7931cf6fc7859", "score": "0.6428623", "text": "public function redirect404() {\n\t\tthrow new NotFoundException();\n\t}", "title": "" }, { "docid": "c5c0d524c65dc54be848bd7955a93dc4", "score": "0.64283454", "text": "public function handle_404($handled)\n {\n }", "title": "" }, { "docid": "b662c4ac3aabb6c8fe3481898e41d059", "score": "0.6425242", "text": "function null() {\n\t\t$message = 'Request for: ' . Router::url('/' . $this->params['url']['url'], true) . ' from ' . $this->referer();\n\t\tif (preg_match('@.*\\.(?:png|bmp|jpg|jpeg|gif)$@', $this->params['url']['url'])) {\n\t\t\treturn $this->_missingImage($message);\n\t\t}\n\t\tif (Configure::read()) {\n\t\t\t$this->log($message);\n\t\t}\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t$this->autoRender = false;\n\t}", "title": "" }, { "docid": "d1017203155f8363d508101d3d4aff9d", "score": "0.6417231", "text": "public function notFoundAction()\n {\n return $this->respond(Response::STATUS_CODE_404, 'Resource not found');\n }", "title": "" }, { "docid": "4c080a4c986f99ad5e94ef390bf67dcb", "score": "0.641623", "text": "public function redirect404() {\n\t\t$this->beforeFilterLayout();\n\t\tthrow new NotFoundException();\n\t}", "title": "" }, { "docid": "6b19f8327471fe6245859af5b3dc356a", "score": "0.64109266", "text": "public function notfound()\n {\n $this->render('404.php');\n }", "title": "" }, { "docid": "8a587a8ce21bb93c4ee913d5d5aa30be", "score": "0.64087623", "text": "public function notFound()\n {\n header($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\");\n\n }", "title": "" }, { "docid": "547123a83f2d17ea9510bbf0d5c2afa5", "score": "0.64070296", "text": "public static function is404()\n {\n // Zfext_Controller_Router_Typo3::route() unsets the path when it finds it\n // so we can assume that zfext wasn't invoked at all and the request is 404\n if (isset($_GET['tx_zfext']['path']) && self::$instance->extConf['init']['postVarSet_failureMode'] != 'ignore') {\n $path = explode('/', $_GET['tx_zfext']['path']);\n self::$instance->decodeSpURL_throw404('Segment \"'.array_shift($path). '\" was not a keyword for a postVarSet as expected!');\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "619798ed27e5b43150e88325092ea265", "score": "0.638109", "text": "public function notFound(){\n // Renders 404 error page\n $this->renderLayout('default', 'error/error', [\n 'title' => 'Page Not Found',\n 'code' => 404,\n 'message' => Babel::get('errors.not_found')\n ]);\n }", "title": "" }, { "docid": "5f1e7cb6481810b9765fda29f30ae069", "score": "0.63751096", "text": "public function customize_preview_override_404_status() {}", "title": "" }, { "docid": "db949f94813581f2dfc6a6ab7735724b", "score": "0.6369234", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "ca18e58902d5267ce7b9206b7d865162", "score": "0.6366929", "text": "public function customize_preview_override_404_status()\n {\n }", "title": "" }, { "docid": "eab270a072cf513900f77179dbab64c2", "score": "0.6362866", "text": "public function action_404() {\n return Response::forge(Presenter::forge('welcome/404'), 404);\n }", "title": "" }, { "docid": "774f31111313cfe8b356faa6951a7f01", "score": "0.6348813", "text": "public function returnNotFound()\n {\n $similarRoute = $this->globalVars->getItem('similarRoute');\n\n $sugMethod = $similarRoute->getRequestMethod();\n $sugUrl = $similarRoute->getUrl();\n\n $response = new Response('Invalid request');\n $response\n ->setStatusCode(404)\n ->setResponse([\n 'errors' => [\n ['id' => 'invalid_request', 'desc' => 'method or url of request are invalid']\n ],\n 'messages' => [\n ['id' => 'similar_request', 'desc' => 'url: ' . $sugUrl . ' method: '. $sugMethod]\n ]\n ])\n ->sendResponse();\n\n }", "title": "" }, { "docid": "c1bde5dd3fad08586ad99ab4c6738b2d", "score": "0.63179326", "text": "static function code404() {\n echo '<h2>404: No route found</h2>';\n }", "title": "" }, { "docid": "39fddc30cdc6451f917b9857253300e9", "score": "0.63039935", "text": "public function redirect404()\n\t{\n\t\tif(VAR_ENABLE_REDIRECT_404 == \"1\")\n\t\t\theader(\"location:\".WEBSITE_404);\t\n\t}", "title": "" }, { "docid": "207906aec0b5d8743fdcb5909dfb4ac6", "score": "0.6300388", "text": "function pageNotFound()\n\n {\n\n $this->global['pageTitle'] = '404 - Page Not Found';\n\n \n\n $this->loadViews(\"404\", $this->global, NULL, NULL);\n\n }", "title": "" }, { "docid": "ff7619a8de6e216c580a8bdc22eebc41", "score": "0.6286719", "text": "function abort_404()\n{\n echo \"404\";\n}", "title": "" }, { "docid": "afd2d201fc2a744dfcf36bef628834ff", "score": "0.6279254", "text": "private static function handleNoMatch() {\n $response = new Response();\n // If $full_routing is true then all routes go through the router so respond 404\n if (self::$full_routing) $response->sendJSONwithStatus(['error' => \"Route not found\"], 404);\n else return false;\n }", "title": "" }, { "docid": "a54d9b672c3b10bf29f5fb0b5f99cfa2", "score": "0.627451", "text": "function show_valet_404()\n{\n http_response_code(404);\n require __DIR__.'/cli/templates/404.html';\n exit;\n}", "title": "" }, { "docid": "3ebc7cab78b4ddda82740e82c2b3fd19", "score": "0.62554604", "text": "private function checkIfNot404()\r\n {\r\n $notFound = $this->crawler->filter('span.error_type')->extract(array('_text'));\r\n\r\n if ( ! empty($notFound) && head($notFound) == 'Page Not Found')\r\n {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "af10bc15fc0985534fb7f11f25617d75", "score": "0.624791", "text": "public function on404(GetResponseForExceptionEvent $event) {\n $this->makeSubrequest($event, Url::fromRoute('system.404')->toString(), Response::HTTP_NOT_FOUND);\n }", "title": "" }, { "docid": "721799af27e75f7180f13368c08e5da0", "score": "0.6244847", "text": "private function ErrorPage404()\n {\n echo \"404\";\n $host = 'http://'.$_SERVER['HTTP_HOST'].'/';\n header('HTTP/1.1 404 Not Found');\n \t header(\"Status: 404 Not Found\");\n \t header('Location:'.$host.'404');\n exit;\n }", "title": "" }, { "docid": "3bb735eb229f6aded95152092dc1fba9", "score": "0.6244331", "text": "public function notFound()\n {\n $args = func_get_args();\n return $this->response($this->getData($args), Responses::HTTP_NOT_FOUND);\n }", "title": "" }, { "docid": "da9af16304e48b83b43540a13bdceeb2", "score": "0.6239189", "text": "public function status_code_should_be_404()\r\n {\r\n $this->get('/anyUrlString')->seeStatusCode(404);\r\n $this->get('/holidays/us')->seeStatusCode(404);\r\n $this\r\n ->get('/anyUrlString')\r\n ->seeJson( [\r\n 'status'=> 404,\r\n 'message'=>'NOT FOUND',\r\n 'error' => ['message' =>'Sorry, the page you are looking for could not be found.']\r\n ] );\r\n }", "title": "" }, { "docid": "9f83c56b35bb57bc3506063c70322f77", "score": "0.62381643", "text": "public function respondNotFound()\n { \n return $this\n ->setStatusCode(CustomResponse::HTTP_NOT_FOUND)\n ->respondWithError('404 not found');\n }", "title": "" }, { "docid": "84051d506d96ca1baed144324d70de4b", "score": "0.62366587", "text": "function fake_404() {\n header('HTTP/1.1 404 Not Found');\n exit();\n}", "title": "" }, { "docid": "676e33e635ee27f5613a729dd322fb6e", "score": "0.6218941", "text": "public function ooops()\r\n\t{\r\n\t\t$this->template->view('utilities/404.php');\r\n\t}", "title": "" }, { "docid": "d8170ca997dbdff8bc5b3a87a7f61217", "score": "0.6218089", "text": "private function pageNotFound() {\n header('HTTP/1.0 404 Not Found');\n echo \"<h1>404 Not Found</h1>\";\n echo \"The page that you have requested could not be found.\";\n exit();\n }", "title": "" }, { "docid": "c6203b0b15033aaeec1546128ada2726", "score": "0.620913", "text": "protected function aNotFoundResponse()\n {\n return $this->aResponse(404);\n\n }", "title": "" }, { "docid": "98c99aaae338a4b4e449a31997a0484b", "score": "0.6182472", "text": "public function notFound(){\n $this->show('notFound');\n }", "title": "" }, { "docid": "bfe4321774a0099f6e1d093656d25381", "score": "0.61779606", "text": "public function beforeNotFoundAction()\r\n {\r\n throw new \\Exception('Page introuvable', self::CODE_ERREUR_NON_TROUVE);\r\n\r\n return false;\r\n }", "title": "" } ]
d5046283081967c8fb551b8a7e4e7c23
Store a newly created TransportationStates in storage.
[ { "docid": "2b24a9f22e7122a6adc0a9543cdbf69a", "score": "0.7227088", "text": "public function store(CreateTransportationStatesRequest $request)\n {\n $input = $request->all();\n\n $transportationStates = $this->transportationStatesRepository->create($input);\n\n Flash::success('Transportation States saved successfully.');\n\n return redirect(route('admin.transportationStates.index'));\n }", "title": "" } ]
[ { "docid": "b21f5ee6b619afda97ea7cbc7c0dd39a", "score": "0.6146195", "text": "public function store(TransportationRequest $request)\r\n {\r\n $transportation = new Transportation($request->only('title'));\r\n $transportation->school_id = session('current_school');\r\n $transportation->save();\r\n foreach ($request['location'] as $location) {\r\n $trans_location = new TransportationLocation();\r\n $trans_location->transportation_id = $transportation->id;\r\n $trans_location->name = $location;\r\n $trans_location->lat = '';\r\n $trans_location->lang = '';\r\n $trans_location->save();\r\n }\r\n return redirect('/transportation');\r\n }", "title": "" }, { "docid": "027cc56c9abf3ae31f3af6cbe4836829", "score": "0.5612497", "text": "public function create()\n {\n return view('admin.transportation_states.create');\n }", "title": "" }, { "docid": "144cc15c4db5bdc057e0562e857aac60", "score": "0.5560198", "text": "public function store()\n {\n // store the object itself\n parent::store();\n \n // delete the related CkptEstabelecimento objects\n $criteria = new TCriteria;\n $criteria->add(new TFilter('ckpt_lansec_id', '=', $this->id));\n $repository = new TRepository('CkptEstabelecimento');\n $repository->delete($criteria);\n // store the related CkptEstabelecimento objects\n if ($this->ckpt_estabelecimentos)\n {\n foreach ($this->ckpt_estabelecimentos as $ckpt_estabelecimento)\n {\n unset($ckpt_estabelecimento->id);\n $ckpt_estabelecimento->ckpt_lansec_id = $this->id;\n $ckpt_estabelecimento->store();\n }\n }\n }", "title": "" }, { "docid": "dbc2b98a3d8f2d0c2f310d97bc4cac12", "score": "0.55303395", "text": "public function saveState($state_name) {\n\t\tfile_put_contents('states/'.$state_name.'.ser', serialize($this));\n\t}", "title": "" }, { "docid": "0a7709b5ccc471abdb8b2f7b34c1d516", "score": "0.5491452", "text": "public function saveState($state_name) {\n file_put_contents('states/' . $state_name . '.ser', serialize($this));\n }", "title": "" }, { "docid": "88168b02ced4b10dff9ccac2f2b4b190", "score": "0.54914016", "text": "public function store(StatesTextRequest $request)\n {\n // Validates the form data according to SensorsRequest rules\n $validatedData = $request->validated();\n\n StateText::create($validatedData);\n\n return redirect('/dashboard/equipments/states')->with('success', 'O state foi adicionado com sucesso!');\n }", "title": "" }, { "docid": "d2b3aac01c9b5579203ddea35c4cf9e1", "score": "0.5439951", "text": "private function setupStateStorage(): void\n {\n if (! $this->getSessionStorage() instanceof StoreInterface) {\n $this->setSessionStorage(new CookieStore($this, $this->getSessionStorageId()));\n }\n\n if (! $this->getTransientStorage() instanceof StoreInterface) {\n $this->setTransientStorage(new CookieStore($this, $this->getTransientStorageId()));\n }\n }", "title": "" }, { "docid": "ad8b0f6cf6d9427bf5cfb43b32adf5a9", "score": "0.5415213", "text": "public function store(CreateTransportActiveRequest $request)\n {\n $atransport = new TransportActive;\n $atransport->fill(\n $request->only('customer_id','transport_id','state_id')\n );\n $atransport->save();\n\n session()->flash('message', 'Транспорт добавлен');\n\n return redirect()->route('atransports_path');\n }", "title": "" }, { "docid": "42b910e6355f8ba495d61a7a3c32f71c", "score": "0.5408201", "text": "public function store(StateStoreRequest $request)\n {\n State::create($request->validated());\n $notification = array('message'=>'State Created Successfully', 'alert-type' => 'success');\n return redirect()->route('states.index')->with($notification);\n }", "title": "" }, { "docid": "bd306cc5f437dcb0a0b48f49669c9969", "score": "0.5330093", "text": "public function save($state);", "title": "" }, { "docid": "32e2f7183d2222b6d1bf23f3c40d4176", "score": "0.5316499", "text": "public function store(CreateTransTreatmentRequest $request)\n\t{\n\t\t$r = $request->all();\n\t\t$t = new TransTreatment;\n\t\t$t->fill($r);\n\t\t$t->date = Carbon::now();\n\t\t$t->save();\t\t\n\n\t\treturn redirect()->route('transtreatment.index');\n\t}", "title": "" }, { "docid": "e24fde6ac84e05c88f7476d96305b331", "score": "0.528134", "text": "public function persist()\n {\n $this->logger->info('Persisting state to Keen IO', ['projectID' => $this->secrets->get(self::PROJECT_ID_SECRET_NAME)]);\n $this->keenio->addEvent(self::EVENT_NAME, $this->state);\n }", "title": "" }, { "docid": "325eda78ef2eab636de69c3fec435985", "score": "0.5274949", "text": "public function store(StoreTeamTemplate $request)\n {\n // Persist\n $template = TeamTemplate::create([\n 'name' => $request->name,\n 'display_name' => $request->display_name,\n ]);\n\n\n //TODO:: trash remake it lesson time\n TeamTemplateLessonTime::create([\n 'template_id' => $template->id,\n 'position' => 1,\n 'start_time' => $request->startTime_1,\n 'end_time' => $request->endTime_1,\n ]);\n if($request->startTime_2 && $request->startTime_2)\n TeamTemplateLessonTime::create([\n 'template_id' => $template->id,\n 'position' => 2,\n 'start_time' => $request->startTime_2,\n 'end_time' => $request->endTime_2,\n ]);\n if($request->startTime_3 && $request->startTime_3)\n TeamTemplateLessonTime::create([\n 'template_id' => $template->id,\n 'position' => 3,\n 'start_time' => $request->startTime_3,\n 'end_time' => $request->endTime_3,\n ]);\n if($request->startTime_4 && $request->startTime_4)\n TeamTemplateLessonTime::create([\n 'template_id' => $template->id,\n 'position' => 4,\n 'start_time' => $request->startTime_4,\n 'end_time' => $request->endTime_4,\n ]);\n\n // Show flash msg\n Session::flash('success', 'Team template was successfully created.');\n\n // Return to manage\n return redirect(url('/team/template/'.$template->name.'/edit'));\n }", "title": "" }, { "docid": "54590b463b53a6fdd9bf2f9385369460", "score": "0.5273372", "text": "public function run()\n {\n $states = ([\n [\n 'state' => 'MG - Minais Gerais',\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 State::insert($states);\n }", "title": "" }, { "docid": "ed48bf1c70b805c2befe235e334fa368", "score": "0.52663666", "text": "public function store()\n {\n $data =$this->validate(request(),[\n 'state_name'=>'required',\n 'country_id'=>'required',\n 'city_id'=>'required',\n ],[],[\n 'state_name'=>'state Name',\n 'country_id'=>'country Name',\n 'city_id'=>'city Name',\n ]);\n State::create($data);\n session()->flash('success','State Added');\n return redirect(aurl('states'));\n\n }", "title": "" }, { "docid": "c4f26480a348a41610697f0bc4cc622d", "score": "0.5234608", "text": "public function seedStatesTable()\n {\n if (Schema::hasTable('states')) {\n DB::insert($this->formatQuery('states'));\n }\n }", "title": "" }, { "docid": "953bba681a699ee42333b4e4dd80aaff", "score": "0.5232545", "text": "protected function SaveStorages() {\n if (isset($this->permanentStorage)) {\n try {\n ZPush::GetDeviceManager()->GetStateManager()->SetBackendStorage($this->permanentStorage, StateManager::BACKENDSTORAGE_PERMANENT);\n }\n catch (StateNotYetAvailableException $snyae) { }\n catch(StateNotFoundException $snfe) { }\n }\n if (isset($this->stateStorage)) {\n try {\n ZPush::GetDeviceManager()->GetStateManager()->SetBackendStorage($this->stateStorage, StateManager::BACKENDSTORAGE_STATE);\n }\n catch (StateNotYetAvailableException $snyae) { }\n catch(StateNotFoundException $snfe) { }\n }\n }", "title": "" }, { "docid": "3cf9f0a17bd366ab56acf5340a138d62", "score": "0.52022916", "text": "public function store(Request $request)\n {\n if (empty($request['city'])) {\n // $temperature = Temperature::create([]);\n\n $chosenCity = ChosenCity::create([\n 'user_id' => Auth::user()->id,\n 'index' => $request['current_item']['id'],\n 'name' => $request['current_item']['name'],\n 'alpha2Code' => $request['current_item']['alpha2Code'],\n 'capital' => $request['current_item']['capital'],\n 'timezone' => $request['current_item']['timezone']\n ]);\n\n $chosenCity->save();\n\n // $chosenCity->temperature()->attach($temperature->id);\n } else {\n $temperature = Temperature::create([\n 'min_temp' => $request['city']['min_temp'],\n 'max_temp' => $request['city']['max_temp'],\n 'avg_temp' => $request['city']['avg_temp'],\n 'last_temp' => $request['city']['last_temp'],\n ]);\n\n // $chosenCity = DB::table('chosen_cities')->where('index', $request['city']['id'])->where('user_id', Auth::id())->get();\n\n $temp_city = ChosenCity::where('index', $request['city']['id'])->where('user_id', Auth::id())->get();\n\n if(isset($temp_city[0])) {\n $city = ChosenCity::find($temp_city[0]->id);\n $city->temperature()->attach($temperature->id);\n }\n }\n }", "title": "" }, { "docid": "6dc8c4437ede931a1e10d715beb63c9b", "score": "0.5187147", "text": "public function store(Request $request) {\n\t\t\n\t\t//pr($request->all());die;\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255|unique:state',\n 'status' => 'required',\n ]);\n if ($validator->fails()) {\n return redirect('/admin/State/create')\n ->withInput()\n ->withErrors($validator);\n }\n $state = new State;\n $state->name = $request->name;\n\t\t$state->country_id = $request->country;\n $state->status = $request->status;\n $state->save();\n\n $msg = 'State has been added successfully.';\n $log = ActivityLog::createlog(Auth::Id(), \"State\", $msg, Auth::Id());\n Session::flash('success_msg', $msg);\n return redirect('/admin/state');\n }", "title": "" }, { "docid": "911dd1333d17a3fab506802517857365", "score": "0.5185957", "text": "protected function store()\n\t{\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <root>\n </root>\n ';\n\t\t// rebuild the keys table\n $this->reindex();\n // --------------------\n if (file_exists($this->_origin)) \n {\n $tasks = new SimpleXMLElement($xml);\n \n foreach($this->_data as $key => $record)\n {\n $task = $tasks->addChild('entry');\n $task_ = (array)$record;\n \n $task_keys = array_keys($task_);\n foreach($task_keys as $task_key)\n {\n $task->addChild((string)$task_key, (string)$task_[$task_key]);\n }\n }\n $tasks->asXML($this->_origin);\n }\n // --------------------\n }", "title": "" }, { "docid": "49b21da2180abe2bbf07039a6e196741", "score": "0.51604074", "text": "public function store()\n {\n $timesheet = new Timesheet;\n\n $this->fromRest($timesheet);\n $this->authorize('store', $timesheet);\n\n if ($timesheet->save()) {\n $timesheet->loadRelationships();\n $year = $timesheet->on_duty->year;\n if ($year == current_year()) {\n $personId = $timesheet->person_id;\n // Only unconfirm a timesheet if it's the current year.\n $event = PersonEvent::firstOrNewForPersonYear($personId, $year);\n if ($event->timesheet_confirmed) {\n $event->timesheet_confirmed = false;\n $event->timesheet_confirmed_at = null;\n $event->saveWithoutValidation();\n $timesheet->log(TimesheetLog::UNCONFIRMED, 'new entry created');\n }\n }\n return $this->success($timesheet);\n }\n\n return $this->restError($timesheet);\n }", "title": "" }, { "docid": "c20c9831ef32db88df3fc7657c02fd57", "score": "0.5157135", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'country' => ['required', 'integer'],\n 'name' => ['required', 'string', 'max:60'],\n ]);\n\n $state = State::create($request->all());\n \n return response()->json(['data' => $state, 'status' => 200]);\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.5138922", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.5138922", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.5138922", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "9533d849ca296b089c957cad57fea9c3", "score": "0.51220953", "text": "public function saveState()\n {\n $this->sessionState->setByKey(\n self::ACTIVE_COUNTRY_KEY,\n $this->activeCountry\n );\n }", "title": "" }, { "docid": "0007e9df44e67314e704520264011cff", "score": "0.51163536", "text": "protected function store($county_entity)\n {\n if ($county_entity->stored()) {\n $model = CountyModel::find($county_entity->id);\n } else {\n $model = new CountyModel();\n }\n $model->fill(\n [\n 'city_id' => $county_entity->city_id,\n 'name' => $county_entity->name,\n 'lng' => $county_entity->lng,\n 'lat' => $county_entity->lat,\n ]\n );\n $model->save();\n $county_entity->setIdentity($model->id);\n }", "title": "" }, { "docid": "50826d203291a2138c03eb57167dda5e", "score": "0.51157326", "text": "public function store() {\n\t\t//\n\t}", "title": "" }, { "docid": "acd5e6ea26c7de22e0b0f2979fc933c9", "score": "0.5101751", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'triggerType' => 'required|integer',\n 'conditionName' => 'required|string',\n 'respownCount' => 'required|integer',\n 'timeToActivate' => 'required|numeric',\n 'timePeriod' => 'required|numeric',\n\n ]);\n $requestData = $request->all();\n unset($requestData['settings']);\n \n $eventLocation = EventLocation::create($requestData);\n\n\n if (isset($request->settings)) {\n\n foreach ($request->settings as $setting) {\n\n $settingObject = new EventLocationSetting($setting);\n $eventLocation->settings()->save($settingObject);\n }\n\n }\n\n return redirect('event-locations')->with('flash_message', 'EventLocation added!');\n }", "title": "" }, { "docid": "7dbf94bcfee68ba85b303476656216c5", "score": "0.5101333", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|min:3|max:255',\n 'abbreviation' => \"required|min:2|max:2\",\n 'country_id' => \"required|exists:countries,id\",\n ]);\n\n $country = Country::find($request->country_id);\n $state = new State();\n $state->name = $request->name;\n $state->abbreviation = $request->abbreviation;\n $state->country()->associate($country);\n $state->save();\n return redirect('states');\n }", "title": "" }, { "docid": "44bbe3fec7e881a7612e4ec418a72d55", "score": "0.5089131", "text": "public function storeState(MyConfigRequest $request)\n {\n State::create($request->all());\n Session::flash('success_message','State has been inserted!');\n return redirect('config');\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.50815094", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "792bbcf08112cafc6836f6971f3e1f82", "score": "0.0", "text": "public function index()\n { $posts = Auth::user()->posts;\n return view('user.posts.index', compact('posts'));\n }", "title": "" } ]
[ { "docid": "401f14dad055920ac5aa27d774922113", "score": "0.7704874", "text": "public function index() {\n $resource_info = $this->Resources->find('all');\n\n $this->set('resource_info', $this->paginate($resource_info));\n }", "title": "" }, { "docid": "aaad0bca56bcca6a005037e0278b1ae4", "score": "0.75253195", "text": "public function index() {\n\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\n\t}", "title": "" }, { "docid": "5d3b04082e8a634586a1ed8f8cdb546c", "score": "0.74725807", "text": "public function listAction()\n {\n $this->render('listPage');\n }", "title": "" }, { "docid": "6d93e4dca95df8ed0c7b3b8b2657ffd6", "score": "0.7455782", "text": "public function listAction()\n {\n $this->_initAction();\n $this->renderLayout();\n }", "title": "" }, { "docid": "5683700221387a4648da639ad72101ea", "score": "0.7411398", "text": "public function listAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Get record list\n $uid = Pi::user()->getId();\n $records = Pi::api('record', 'forms')->getRecordList($uid);\n\n // Set template\n $this->view()->setTemplate('archive-list');\n $this->view()->assign('config', $config);\n $this->view()->assign('records', $records);\n }", "title": "" }, { "docid": "1600316acdacf01cc93550ae2e9a85af", "score": "0.7193138", "text": "public function indexAction()\n {\n $objects = $this->getRepository()->findAll();\n\n return $this->render($this->getResource()->getTemplate('index'), array(\n 'objects' => $objects,\n 'resource' => $this->getResource()\n ));\n }", "title": "" }, { "docid": "883e2a9c193b1ec54d21d41093f06c70", "score": "0.7133651", "text": "public function listAction() {\n\t\t\n\t\t$this->init();\n\n\t\tif(!$this->id) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\t\t$fileFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory');\n\n\t\t$file = $fileFactory->retrieveFileOrFolderObject($this->id);\n\t\t\n\t\tif ($file instanceof \\TYPO3\\CMS\\Core\\Resource\\Folder) {\n\t\t\t$this->redirect('listFolder');\n\t\t}\n\n\t\tif (!($file instanceof \\TYPO3\\CMS\\Core\\Resource\\File)) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\n\t\t$processedFiles = $this->getProcessedFilesForFile($file);\n \n\t\t$this->view->assign('file', $file);\n\t\t$this->view->assign('processedFiles', $processedFiles);\n\t}", "title": "" }, { "docid": "735397dbae5dd6de4a32f9ab46c8479f", "score": "0.7097046", "text": "public function index()\n\t{\n\t\t$resources = $this->resourcesRepository->paginate(100);\n\n\t\treturn view('resources.index')\n\t\t\t->with('resources', $resources);\n\t}", "title": "" }, { "docid": "fec316528723462375530f41e571b4fe", "score": "0.704424", "text": "public function listing()\n\t{\n\t\tglobal $admin, $user; // Superglobales\n\n\t\tif($admin)\n\t\t{\n\t\t\t$pageTwig = 'users/listing.html.twig'; // Chemin de la View\n\t\t\t$template = $this->twig->load($pageTwig); // chargement de la View\n\n\t\t\t$result = $this->model->getAllUsers(); // Retourne la liste de tous les utilisateurs\n\n\t\t\techo $template->render([\"url\" => $_SERVER['REQUEST_URI'], \"result\" => $result, \"admin\" => $admin, \"user\" => $user]); // Affiche la view et passe les données en paramêtres\n\t\t}\n\t}", "title": "" }, { "docid": "027627f1e20a0806fbdf50a2ba14c78c", "score": "0.70438755", "text": "public function show()\n {\n $params = $this->getProjectFilters('listing', 'show');\n $query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();\n\n $paginator = $this->paginator\n ->setUrl('listing', 'show', array('project_id' => $params['project']['id']))\n ->setMax(30)\n ->setOrder(TaskModel::TABLE.'.id')\n ->setDirection('DESC')\n ->setQuery($query)\n ->calculate();\n\n $this->response->html($this->helper->layout->app('listing/show', $params + array(\n 'paginator' => $paginator,\n 'categories_list' => $this->category->getList($params['project']['id'], false),\n 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),\n 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),\n )));\n }", "title": "" }, { "docid": "d293f3fdec60349ef0877e91df4a099b", "score": "0.70241606", "text": "public function index()\n {\n $resources = Resources::orderBy('id', 'desc')->get();\n return view('Backend/Resources/viewResource', compact('resources'));\n }", "title": "" }, { "docid": "dab649efb652b22919255920aff18021", "score": "0.69978404", "text": "public function index()\n\t{\n\t\t$data['listing'] = Listing::paginate(15);\n\n\t\treturn view('admin.listing', $data);\n\t}", "title": "" }, { "docid": "fb266928c00d205f35924b707dcdadf4", "score": "0.6995689", "text": "public function listAction() {\n // Check if the item exists\n $id = $this->getParam('id');\n $item = get_record_by_id('Item', $id);\n if (!$item) {\n throw new Omeka_Controller_Exception_404;\n }\n // Respond with JSON\n try {\n $jsonData = IiifItems_Util_Annotation::buildList($item);\n $this->__respondWithJson($jsonData);\n } catch (Exception $e) {\n $this->__respondWithJson(array(\n 'message' => $e->getMessage()\n ), 500);\n }\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "f20bd0e93af1502c691a240521847e9d", "score": "0.6946605", "text": "public function index() {\n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources'));\n }", "title": "" }, { "docid": "6803a23af3bc653e90735ffd2b2ed35f", "score": "0.6941913", "text": "public function index()\n {\n\n $resource = (new AclResource())->AclResource;\n\n return view('Admin.acl.resource.index')->withResource($resource);\n }", "title": "" }, { "docid": "924e51ba82c2eab34f48f3bbfecb5197", "score": "0.692225", "text": "public function index()\n {\n return view('resources.index', [\n 'resources' => Resource::orderBy('id', 'DESC')->get()\n ]);\n }", "title": "" }, { "docid": "f7e7cbb28c97549abd73fed7818403a4", "score": "0.6920865", "text": "public function list()\n {\n return $this->Get('list');\n }", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "f0fa2690ffaab13556ebf9f8ee023468", "score": "0.6886966", "text": "public function listing()\n {\n // solo permite mostrar listado de TODOS los productos al administrador\n // si no es admin, redireccion a la lista de productos disponibles\n if (!$this->isAdmin())\n $this->redirect(\"product\", \"available\");\n\n $products = \\models\\Product::findBy(null);\n\n // se le pasa el listado a la vista y se renderiza\n $this->view->assign(\"list\", $products);\n $this->view->render(\"product_list\");\n }", "title": "" }, { "docid": "1cacb33ba12b36b95c20025febdd4b33", "score": "0.68812966", "text": "public function index()\n {\n // atau saat membuka page lain pada pagination\n $this->list();\n }", "title": "" }, { "docid": "3a0850cc56c832a1affe3d6906e36183", "score": "0.68409985", "text": "public function listAction()\n {\n return $this->render('MesdHelpWikiBundle:Default:list.html.twig', array());\n }", "title": "" }, { "docid": "7de268658a226bfb1078da5310cd732b", "score": "0.6829061", "text": "public function index()\n {\n $showData = Input::has('showData') ? (bool) Input::get('showData') : false;\n\n if ($showData === true) {\n $this->setTransformerFilters();\n }\n\n $limit = Input::has('limit') ? Input::get('limit') : 10000;\n\n\n // handle search\n if (Input::has('q')) {\n\n $resources = $this->service->search(\n Input::get('q'),\n $limit,\n $showData\n );\n\n return $this->respondWithCollection($resources,\n $showData === true ? $this->transformer : new ListTransformer());\n } else {\n return $this->respondWithCollection($this->service->showList($limit, $showData),\n $showData === true ? $this->transformer : new ListTransformer());\n }\n }", "title": "" }, { "docid": "d46bb32faa9e8a7d477db9cdd1aa50f0", "score": "0.6800859", "text": "public function index()\n {\n // Add a record\n// $obj = Resource::create([\n// 'seq'=>1.0,\n// 'name'=>'My image',\n// 'description'=>'My special image',\n// 'type'=>'IMAGE',\n// 'url'=>'',\n// 'status'=>'ACTIVE',\n// 'image'=>'chalky.jpg',\n// 'thumb'=>'chalky.jpg',\n// 'created_at'=>'2015-10-20 21:30:13',\n// 'updated_at'=>'2015-10-20 21:30:13'\n// ]);\n// $obj->save();\n\n $resources = Resource::all();\n\n // This would return json, as if for a basic API\n// return $resources;\n\n // Here we rely on a template to format the data\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "db4daec9f8d8cd89f2cb81ded0d0e9ea", "score": "0.68007904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->memberRepository->all();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "a8dcf059f191629c6258ae65433dac79", "score": "0.68005747", "text": "public function index()\n {\n //Grab all listings - with a descending sort by create timestamp.\n $listings = Listing::orderBy('created_at', 'desc')->get();\n\n //Return view with listings data.\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "01e703b1d51958083a171c504a5fbe86", "score": "0.67932504", "text": "public function list()\n {\n // ...\n }", "title": "" }, { "docid": "8f780116288779687a52681d9b84a0ef", "score": "0.6789059", "text": "public function listAction()\n {\n $all = $this->users->findAll();\n $table = $this->createTable($all);\n\n $this->theme->setTitle(\"Användare\");\n $this->views->add('users/index', ['content' => $table, 'title' => \"Användare\"], 'main-wide');\n }", "title": "" }, { "docid": "fd7b1f8fd083bf003bd937783f973341", "score": "0.6786347", "text": "public function index() {\n\t\t/// Displaying all items from the database\n\t\t$list = Item::findAll();\n\t\t$list[\"title\"] = \"All items\";\n\t\t$this->render(\"index\", $list);\n\t}", "title": "" }, { "docid": "2581dc8a87e69733d9a5051a2ba197df", "score": "0.6784052", "text": "public function view_list();", "title": "" }, { "docid": "74f1d55e2353d3983fa09829081123b9", "score": "0.67709553", "text": "public function index()\n {\n // Get articles\n $articles = Article::latest()->paginate(5);\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "a127bb62f2b51cad9508439ded53e39b", "score": "0.67696005", "text": "public function index()\n {\n $tests = Test::all();\n return TestForListResource::collection($tests);\n }", "title": "" }, { "docid": "1e182d51ef856ffdebfbd850cf50bee9", "score": "0.67537886", "text": "public function index()\n {\n $result = Information::where('active', true)->orderby('id', 'DESC')->paginate(20);\n return InformationResource::collection($result);\n }", "title": "" }, { "docid": "3dac8ae8178b5ab6ec8f744af3d4b5bb", "score": "0.67486656", "text": "public function index()\n {\n $inventories = Inventory::orderBy('created_at', 'desc')->paginate($this->inventoriesInPage);\n return $this->renderOutputAdmin(\"inventories.list\", [\n \"inventories\" => $inventories\n ]);\n }", "title": "" }, { "docid": "0753ada8c8a122f6b6886e1cc84a5965", "score": "0.67384964", "text": "public function index()\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['collections'] = $this->resource->getRowsData();\n $this->data['attributes'] = $this->resource->getAttributes();\n\n return view('vellum::catalog', $this->data);\n }", "title": "" }, { "docid": "92224d4b1facc85c25b765eda1c899d2", "score": "0.6737816", "text": "public function actionIndex()\n {\n $searchModel = new ResourcesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "66c285f8944542cf7713edaba3a0ad2c", "score": "0.6725589", "text": "public function index()\n {\n $this->data['url_data'] = site_url($this->class_path_name.'/list_data');\n $this->data['add_url'] = site_url($this->class_path_name.'/add');\n $this->data['record_perpage'] = SHOW_RECORDS_DEFAULT;\n }", "title": "" }, { "docid": "80d12db260f6dfe4b5aceed4625f5855", "score": "0.6721976", "text": "public function listAction()\n {\n $this->_datatable();\n return $this->render('BackendBundle:Foodies:list.html.twig');\n }", "title": "" }, { "docid": "b26e0dccffef1f4b909a7cc8c4dffc74", "score": "0.67117697", "text": "public function listAction()\n\t{\n\t\tif ($this->_getParam('json')) {\n\t\t\t$this->listJsonAction();\n\t\t} else {\n\t\t\t$project = $this->projectService->getProject((int) $this->_getParam('projectid'));\n\t\t\t$this->view->features = $this->featureService->getProjectFeatures($project);\n\t\t\t$this->view->project = $project;\n\t\t\tif ($this->_getParam('_ajax')) {\n\t\t\t\t$this->renderRawView('feature/list.php');\n\t\t\t} else {\n\t\t\t\t$this->renderView('feature/list.php');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b9ec8f3eb9fe45d7e52c09e49cd1f9d", "score": "0.67012614", "text": "public function index()\n {\n $offers = Offer::paginate(10);\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "190c6247941c857dd2767bd08ced001b", "score": "0.66836476", "text": "public function index()\n {\n $device_logs = DeviceLog::filter()->paginate();\n // $this->authorize('index', 'App\\DeviceLog'); // TODO: Policy\n\n return Resource::collection($device_logs);\n }", "title": "" }, { "docid": "9956226ca0d6a5a308e812db7aa3c8dd", "score": "0.6680364", "text": "public function index()\n {\n return view('listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "b4b19a0a264ba05f056ca1d352c15ab3", "score": "0.6679044", "text": "public function listAction() {\n\t\t$tags = $this->getTags();\n\t\t$this->view->assign('tags', $tags);\n\t}", "title": "" }, { "docid": "5d423b3e213eb36859bc854e0ea0821c", "score": "0.66765565", "text": "public function index()\n\t{\n\t\t$this->get();\n\t}", "title": "" }, { "docid": "962ec92f5da4e239f0963901dd679303", "score": "0.667593", "text": "public function list()\n {\n $this->checkLoginStatus('list');\n return new HtmlResponse();\n }", "title": "" }, { "docid": "f11e7dc71257fc35d626a4cc0df754c5", "score": "0.6671179", "text": "public function index()\n {\n $books = Book::paginate(10);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "67da517f1e843dce244d42bf3c00c83c", "score": "0.66616595", "text": "public function index()\n {\n $resources = Resource::getResourcesByUserServiceProvider();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "d1469f07edbbe4ff69af75d8f005780f", "score": "0.6661017", "text": "public function index()\n {\n $listings = Listing::get();\n return view('pages.backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4972cd57158bca324de2cdc88e1141c7", "score": "0.6659724", "text": "public function index()\n {\n $specifier = Specifier::paginate();\n return SpecifierResource::collection($specifier);\n }", "title": "" }, { "docid": "cbfc53f61a9472895d3345b43532b0f6", "score": "0.6659596", "text": "public function actionList()\n {\n $searchModel = new IgualasSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Se buscan también los servicios\n $serviciosModel = new \\app\\models\\ServiciosSearch(['activo'=>true]);\n $serviciosProvider = $serviciosModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'serviciosProvider' => $serviciosProvider,\n ]);\n }", "title": "" }, { "docid": "ec7aa7b9d406ecdd3cbfb90dfff07cc9", "score": "0.66576624", "text": "public function index()\n {\n // Getting all the articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(6);\n\n // Return article collection as a resource\n return aResource::collection($articles);\n }", "title": "" }, { "docid": "348728c06ffc3f7f47ab7a2486701300", "score": "0.66531324", "text": "public function list()\n {\n return view('items.list');\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "3340a40aeb9ca6134a87997b56d911be", "score": "0.6645119", "text": "public function indexAction()\n {\n $item = new Item;\n $items = $item->getAll();\n View::renderTemplate('Home/index.html', ['items_list' => $items]);\n }", "title": "" }, { "docid": "e7a070ae572c193acb7a79ecc2d34f28", "score": "0.66418844", "text": "public function index()\n {\n // Get activities\n $activities = Activity::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of activities as a resource\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "ae0412e2b98e2acf1da43d334bdc55fa", "score": "0.6638416", "text": "public function index()\n\t{\n\t\t$datas = $this->model->where('cat_status', 'open')->orderBy('sort_order')->paginate(15);\n\t\treturn View::make($this->resourceView.'.index')->with(compact('datas'));\n\t}", "title": "" }, { "docid": "81e310e3464b83f2e25e4bb5406f1a35", "score": "0.663706", "text": "public function index()\n {\n $products = Product::latest()->paginate(10);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.66361564", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "5b0d18ee7af036a0126d30b01aac4670", "score": "0.6635448", "text": "public function index( )\n\t{\t\n\t\tif(!\\Sentry::getUser()->hasAccess('manage_listings')){\n\t\t\treturn redirect()->action('AdminController@properties');\n\t\t}\n\n\t\t$listings= $this->listing->get();\n\t\t$website = $this->website->get();\n\t\treturn view('admin.listings', array('listings'=>$listings, 'websites'=>$website));\n\n\t}", "title": "" }, { "docid": "2e96526efb31162a0f4ca3bb61f781c5", "score": "0.66319674", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[0]['count'], $this->_pagination);\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "9fe55a7f3832e2905b2600e03b1356d2", "score": "0.6627155", "text": "public function index()\n\t{\n\t\tif (Input::get('list'))\t\treturn Response::json($this->model->getList(), 200);\n\t\telse \t\t\t\t\t\treturn Response::json($this->model->fetch(Input::all()), 200);\n\t}", "title": "" }, { "docid": "5438ea6951e01b2b0c5f44bd2895ba5d", "score": "0.6627067", "text": "public function index()\n {\n $listing = Listing::paginate(15);\n\n return view('listing.index', compact('listing'));\n }", "title": "" }, { "docid": "28c7c5fe8eff5e4f7e67018271a3970f", "score": "0.6621494", "text": "public function index()\n {\n //\n $resources = \\App\\Resource::all();\n return $resources;\n }", "title": "" }, { "docid": "7049b0be3d5ee96fe0213da94a5eabdc", "score": "0.66211265", "text": "public function list(): Response\n {\n $repository = $this->getDoctrine()->getRepository(ShowList::class);\n return $this->render('concert/concert.html.twig', [\n 'name' => \"list\",\n 'concerts' => $repository->findAll()\n ]\n );\n }", "title": "" }, { "docid": "de6e1eefbb1c8632afb33575e2d66697", "score": "0.66209346", "text": "public function index()\n {\n return BookListResource::collection(Book::all());\n // // return $author->books;\n }", "title": "" }, { "docid": "fb7ed7947ab536b91c04edc0db5a20e5", "score": "0.6608123", "text": "public function listAction()\n {\n $title = $this->t->_('List ') . $this->t->_($this->model_name);\n $this->tag->setTitle($title);\n $this->view->title = $title;\n\n $model = $this->getModel();\n\n if (is_null($model)) {\n $this->response->redirect('/admin/dashboard');\n }\n\n $query_urls = $this->request->getQuery();\n unset($query_urls['_url']);\n unset($query_urls['submit']);\n unset($query_urls['page']);\n\n // search\n $search_opt = $this->getFieldsSearch($query_urls, $model->list_view['fields']);\n $conditions = $search_opt['conditions'];\n $parameters = $search_opt['parameters'];\n // sort\n\n $list_data = $model::find(array(\n $conditions,\n 'bind' => $parameters\n ));\n\n // pagination\n $currentPage = $this->request->getQuery('page');\n $paginator_limit = 20; // @TODO\n $paginator = new PaginatorModel(array(\n \"data\" => $list_data,\n \"limit\" => $paginator_limit,\n \"page\" => $currentPage > 0 ? $currentPage : 1\n ));\n // get page\n $page = $paginator->getPaginate();\n\n $this->view->page = $page;\n $this->view->data = $page->items;\n $this->view->list_view = $model->list_view;\n $this->view->search = $query_urls;\n\n $controller = strtolower($this->controller_name);\n $action = strtolower($this->action_name);\n\n $this->view->controller = $controller;\n $this->view->action = $action;\n $this->view->action_detail = $this->action_detail;\n $this->view->action_edit = $this->action_edit;\n $this->view->action_delete = $this->action_delete;\n $this->view->menu = $model->menu;\n\n $query_urls = empty($query_urls) ? array('nosearch' => 1) : $query_urls;\n $this->view->current_url = $this->url->get(\"/admin/$controller/$action\", $query_urls);\n\n $exists = $this->view->exists($controller . '/' . $action);\n if (!$exists) {\n $this->view->pick('view_default/list');\n }\n }", "title": "" }, { "docid": "4075f3e85858e8eac990a25721c76630", "score": "0.66057074", "text": "public function index()\n {\n return $this->sendResponse( [\n \"items\"=> BookResource::collection(Book::all()->toArray())\n ],\n \"Books Retrieved successfully!\"\n );\n\n }", "title": "" }, { "docid": "f148c3920960427ce58f996986160dfa", "score": "0.6605562", "text": "public function index()\n { \n $articles = Article::latest()->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "5bd87f0ad66d0212e0bec36ece123e1e", "score": "0.6600455", "text": "public function index()\n {\n $user = Student::latest()->get();\n return $this->showAll(StudentResource::collection($user));\n }", "title": "" }, { "docid": "4815297dfe29adcb934ed5d6b8357ceb", "score": "0.65940166", "text": "public function index()\n\t{\n\t\t// // Check for list permission\n\t\t// if (! $this->model->mayList())\n\t\t// {\n\t\t// \treturn $this->user();\n\t\t// }\n\n\t\treturn $this->display();\n\t}", "title": "" }, { "docid": "a84c8d0a92b2e2efb69455a9790926e0", "score": "0.65936685", "text": "public function index()\n {\n return AulaResource::collection(Aula::paginate());\n }", "title": "" }, { "docid": "8395c06faebc6da915e86b24ff1c40b8", "score": "0.6591476", "text": "public function index()\n {\n //Get all articles, paginate function could be improved\n // $articles = Article::paginate(15);\n\n $articles = Article::get();\n //Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "6847e76913911cac71a85fa2835bf369", "score": "0.6583209", "text": "public function listAction()\n {\n $this->View()->assign($this->getAvailableStatuses());\n }", "title": "" }, { "docid": "244698ad57c10b2cf9bea875ed11f4e2", "score": "0.6582496", "text": "public function index()\n {\n return view('listing.index')->with([\n 'listings' => app('listings')->take(7),\n 'tags' => Tag::all(),\n ]);\n }", "title": "" }, { "docid": "965ff224495731f89e5a39ec8d28c56c", "score": "0.6580476", "text": "public function indexAction()\n\t{\n\t\t$paginator = $this->_getPaginator();\n\t\t$this->_configurePagination($paginator);\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\n\t\t$this->view->assign('records',$records);\n\n\t\t$this->configureView();\n\n\t\t$this->view->render('index.phtml');\n\t}", "title": "" }, { "docid": "5ae3dc8a0646433f9c872265b7fae9bb", "score": "0.6579524", "text": "public function index()\n {\n save_resource_url();\n $items = Document::with('documentable')->get();\n\n return $this->view('resources.documents.index')->with('items', $items);\n }", "title": "" }, { "docid": "f7f0617a1c3535ff5bd60dabc6ef0b2a", "score": "0.65772367", "text": "public function index()\n {\n $resources=Resource::orderBy('created_at','desc')->get();\n return view('admin.index',compact('resources'));\n }", "title": "" }, { "docid": "93c8e2fb25d358967a7239099ffa01be", "score": "0.6576169", "text": "public function actionList()\n {\n $model = new ImageList();\n\n $path = $model->getDataRequest('path');\n $imageList = $model->loadImage($path);\n\n return $this->render('list',compact('model','imageList','path'));\n }", "title": "" }, { "docid": "caa63ad0b7f03a52984cdbcc404b742e", "score": "0.6566202", "text": "public function listingAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d085389ae4d1b9ed456fd3f7f897fb44", "score": "0.65618056", "text": "public function index()\n {\n return ProjectListResource::collection(Project::paginate());\n }", "title": "" }, { "docid": "fb5cc939df880d31486688650542e9ef", "score": "0.6560243", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = EmisiCo2Tahunan::query();\n\n $query->when(request()->filled('tahun'), function ($query) {\n return $query->where('tahun', 'ILIKE', \"%\" . request()->query('tahun') . \"%\");\n });\n\n if(request()->has('provinsi')){\n $query->when(request()->filled('provinsi'), function ($query) {\n return $query->whereHas('Provinsi',function($q){\n return $q->where('nama_provinsi', 'ILIKE', \"%\" . request()->query('provinsi') . \"%\");\n });\n });\n }\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "d9aec54688559be15dcc145297ec98e9", "score": "0.6559387", "text": "public function index()\n {\n return view('backend.item.list_item');\n }", "title": "" }, { "docid": "e9a03ea28e2df914c978aa5c0d3a5637", "score": "0.6554056", "text": "public function index()\n {\n $options = $this->getQueryHelperOptions();\n $items = $this->repo->allPaged($options);\n\n if ( ! $items)\n {\n return $this->respondNotFound('Unable to fetch the selected resources');\n }\n\n $response = [\n 'data' => [],\n 'meta' => [\n 'pagination' => []\n ]\n ];\n\n $resource = new Fractal\\Resource\\Collection($items->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($items));\n\n $response['data'] = $this->fractal->createData($resource)->toArray()['data'];\n\n $paginator = new Fractal\\Pagination\\IlluminatePaginatorAdapter($items);\n\n $response['meta']['pagination'] = [\n 'total' => $paginator->getTotal(),\n 'count' => $paginator->count(),\n 'per_page' => $paginator->getPerPage(),\n 'current_page' => $paginator->getCurrentPage(),\n 'total_pages' => $paginator->getLastPage()\n ];\n\n return $response;\n }", "title": "" }, { "docid": "64c23385ebf3abebc1a7abc1fe27b69a", "score": "0.65517366", "text": "public function index()\n {\n return EntryResource::collection(Auth::user()->entries);\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "91ef4976872522e55ce7d21232db8ce3", "score": "0.6541719", "text": "public function getlist()\n {\n \t$specieses = Species::all();\n\n \treturn view( 'species.index-species' )->withSpecieses($specieses);\n }", "title": "" }, { "docid": "13e213cc4f2553888dd031c39274477f", "score": "0.65387595", "text": "public function index()\n {\n $objects = Thing::availableForCatalog()->paginate(40)->toJson();\n\n return view('web.pages.objects.index', compact('objects'));\n }", "title": "" }, { "docid": "7e319cde9d05f34fd876660ef419e5c1", "score": "0.6535465", "text": "public function index()\n {\n return CursoResource::collection(Curso::paginate());\n }", "title": "" }, { "docid": "80349a31fc145e69c11f76d6fe21f244", "score": "0.6525081", "text": "public function listAction($page)\n {\n $list = ApiDataSource::getList(!empty($page) ? $page : 1);\n\n if (!empty($list)) {\n try {\n echo TemplateEngine::get()->render(\n 'index.html.twig',\n array(\n \"shipList\" => !empty($list['results']) ? $list['results'] : null,\n \"currentPage\" => $page,\n \"totalPages\" => !empty($list['results']) && !empty($list['count']) ? ceil($list['count'] / Config::get()->getSection('api')['perPage']) : 0\n )\n );\n } catch (\\Exception $e) {\n Logger::get()->error($e->getMessage());\n header('HTTP/1.0 500 Internal server error');\n }\n } else {\n header('HTTP/1.0 404 Not Found');\n }\n }", "title": "" }, { "docid": "8db12a9417955f7cafd859a2f084db66", "score": "0.6524149", "text": "public function index()\n {\n $articles=$this->articleRepository->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "b02a86792172e9aa0d15ce71523bf18a", "score": "0.6522924", "text": "public function listAction()\n {\n $postManager = new PostManager();\n $posts = $postManager->getAllPosts();\n $this->render('Post/list.html.twig', ['posts' => $posts]);\n }", "title": "" }, { "docid": "3facf87d49c58736d719a1d9ceb098c4", "score": "0.6515679", "text": "public function index()\n {\n $halls = Hall::all();\n return HallResource::collection($halls);\n }", "title": "" }, { "docid": "5e65da9a34ee6f80605137959439b41c", "score": "0.6511205", "text": "public function index()\n {\n //\n return EmployeeResource::collection(Employee::latest()->paginate(5));\n }", "title": "" }, { "docid": "3f890ba095bdb75af4cc34f24821df21", "score": "0.651028", "text": "public function index()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resourceFields = json_encode(Otter::getAvailableFields($this->resource));\n\n return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));\n }", "title": "" }, { "docid": "1fa5cdf3237bc23c42125528d9db4212", "score": "0.650871", "text": "public function listAction()\n {\n $this->view->assign('posts', $this->findPosts());\n }", "title": "" }, { "docid": "c7253bf5ee3c82a3ec81a23e84bfc054", "score": "0.6507231", "text": "public function index()\n {\n return Response::custom('list', $this->service->all(), \\Illuminate\\Http\\Response::HTTP_OK);\n }", "title": "" }, { "docid": "16cbe42e288d6db09ecb33ee711d2c85", "score": "0.650502", "text": "public function index()\n {\n $items = Item::all();\n\n return response([\n 'items' => ItemResource::collection($items),\n 'message' => 'Retrieved successfully'\n ], 200);\n }", "title": "" }, { "docid": "9b9cf4a5c0a3cf48f806a2c95874afa6", "score": "0.6503013", "text": "public function index()\n {\n //\n if (\\Gate::allows('canView')) {\n $category = Category::latest()->paginate(10);\n return CategoryResource::collection($category);\n } else {\n return ['result' => 'error', 'message' => 'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4b682e76649352c45a12edca169568ff", "score": "0.65024114", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_Book_type->get_all();\n\t\t$this->template->set('title', 'Book Type List');\n\t\t$this->template->load('template', 'contents', 'book_type/book_type_list', $data);\n\t}", "title": "" }, { "docid": "12f45a4dbd72d90586e475e387aa5ee9", "score": "0.6500511", "text": "public function list()\n {\n // récupération de tous les users grâce à la méthode statique \"findAll()\"\n $users = User::findAll();\n\n // génération d'un token aléatoire\n // pour protéger la route\n $token = $this->generateCsrfToken();\n\n // définition du tableau de données $viewVars à passer à ma vue\n $viewVars = [\n 'users' => $users,\n 'token' => $token,\n ];\n\n // j'appelle ma méthode show qui va afficher le bon template\n // à qui je passe mon tableau de données viewVars\n $this->show('user/list', $viewVars);\n }", "title": "" } ]
246a84219e2db79a3895c5cc6063de1a
Busqueda de productos para el AR
[ { "docid": "f59863a66b061e7dfbac426c6154c7ca", "score": "0.0", "text": "public function filtrar($ccliente, $tipoProducto, $busqueda, int $limit, int $offset = 1)\n\t{\n\t\t$this->db->select(\"\n\t\t\tMPRODUCTOCLIENTE.CPRODUCTOFS,\n\t\t\tMPRODUCTOCLIENTE.CPRODUCTOCLIENTE,\n\t\t\tMPRODUCTOCLIENTE.DPRODUCTOCLIENTE,\n\t\t\tMPRODUCTOCLIENTE.DNOMBREPRODUCTO,\n\t\t\tMMARCAXCLIENTE.DMARCA,\n\t\t\tMFABRICANTEXCLIENTE.DFABRICANTE,\n\t\t\tTTABLA.DREGISTRO,\n\t\t\tMFABRICANTEXCLIENTE2.CFABRICANTE AS CFABRICANTE2,\n\t\t\tMFABRICANTEXCLIENTE2.DFABRICANTE AS DFABRICANTE2,\n\t\t\tTTABLA2.CTIPO AS CTIPO2,\n\t\t\tTTABLA2.DREGISTRO AS DREGISTRO2,\n\t\t\tMCATEGORIACLIENTE.DCATEGORIACLIENTE,\n\t\t\tMPRODUCTOCLIENTE.DREGISTROSANITARIO,\n\t\t\tDATEFORMAT(MPRODUCTOCLIENTE.FINICIOREGSANITARIO, 'DD/MM/YYYY') as FINICIOREGSANITARIO,\n\t\t\tDATEFORMAT(MPRODUCTOCLIENTE.FFINREGSANITARIO, 'DD/MM/YYYY') as FFINREGSANITARIO\n\t\t\");\n\t\t$this->_filtro($ccliente, $tipoProducto, $busqueda);\n\t\tif ($limit > 0) {\n\t\t\t$this->db->limitAnyWhere($limit, $offset);\n\t\t}\n\t\t$this->db->order_by('MPRODUCTOCLIENTE.TCREACION', 'DESC');\n\t\t$query = $this->db->get();\n\t\tif (!$query) {\n\t\t\treturn [];\n\t\t}\n\t\treturn ($query->num_rows() > 0) ? $query->result() : [];\n\t}", "title": "" } ]
[ { "docid": "3151ed8db4a3ece9b74d88d606d34e5e", "score": "0.67779094", "text": "public function searchProduct(Request $request){\n\n //dd($request->input('query'));\n $product = Product::\n where('descripcion' , 'like', $request->input('query') . '%')\n ->select(['id', \\DB::raw('SUBSTRING(descripcion, 1, 80) descripcion'), \\DB::raw('precio_venta precio'), 'stock'])->take(20)->get();\n\n return response()->json([\n 'data' => $product\n ]);\n }", "title": "" }, { "docid": "40431c3e87b88203815a1f79be890c73", "score": "0.6675823", "text": "public function buscarGeneral($search = null) {\r\n\r\n if (! is_null($search)) {\r\n\r\n $busqueda = \"%\".$search.\"%\";\r\n\r\n $mascotas = Producto::orWhere('rubro', 'like', $busqueda)\r\n ->orWhere('SubRubro1', 'like', $busqueda)\r\n ->orWhere('SubRubro2', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $marcas = Producto::Where('marca', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $nombre = Producto::Where('nombre', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $tags = Producto::select('tb_tag_producto.tag')\r\n ->join('tb_tag_producto', 'tb_productos.codeProdSys', '=', 'tb_tag_producto.codeProdSys')\r\n ->where('tb_productos.nombre', 'like', $busqueda)\r\n ->where('tb_productos.fk_idSatate', '=', 1)\r\n ->groupBy('tb_productos.Agrupacion')\r\n ->distinct()\r\n ->get();\r\n\r\n\r\n $mascotas = $this->getAgrupation($mascotas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $marcas = $this->getAgrupation($marcas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $nombre = $this->getAgrupation($nombre);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n //$tags = $this->getAgrupation($tags);// OBTEBNER LISTADO DE TAGS DE UN PRODUCTO //\r\n\r\n $array_tags = [];\r\n\r\n if (count($tags) > 0) {\r\n foreach ($tags as $tag) {\r\n $array_tags[] = $tag->tag;\r\n }\r\n }\r\n\r\n\r\n $response = [\r\n 'msj' => 'Productos',\r\n 'mascotas' => $mascotas,\r\n 'marcas' => $marcas,\r\n 'nombre' => $nombre,\r\n 'tags' => $array_tags,\r\n ];\r\n\r\n\r\n return response()->json($response, 200);\r\n\r\n } else {\r\n\r\n $mascotas = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $marcas = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $nombre = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $tags = Producto::select(DB::raw('tb_productos.*'))\r\n ->join('tb_tag_producto', 'tb_productos.codeProdSys', '=', 'tb_tag_producto.codeProdSys')\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n\r\n $mascotas = $this->getAgrupation($mascotas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $marcas = $this->getAgrupation($marcas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $nombre = $this->getAgrupation($nombre);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $tags = $this->getAgrupation($tags);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n\r\n\r\n $response = [\r\n 'msj' => 'Lista de producto',\r\n 'mascotas' => $mascotas,\r\n 'marcas' => $marcas,\r\n 'nombre' => $nombre,\r\n 'tags' => $tags,\r\n ];\r\n\r\n return response()->json($response, 404);\r\n }\r\n }", "title": "" }, { "docid": "7ed12e4ea205e55dee33284c2fc04eee", "score": "0.66246367", "text": "public function searchProduct(Request $request){\n\n $searchKey = $request->term;\n $products = farmproduct::where('productName','LIKE','%'.$searchKey.'%')->get();\n $result='';\n \n if(count($products)==0){\n $result[] = 'No matches found.';\n }else{\n foreach($products as $product){\n $result[] = $product->productName;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "0e8eb4bd239a85cd516c024a5e46ecff", "score": "0.6452743", "text": "public function buscarProductoCategoria(Request $request){\n\n $buscar = $request->buscar;\n $criterio = $request->criterio;\n $categoriaid = $request->categoriaid;\n\n if($buscar==''){\n $productos = Producto::join('categorias', 'productos.categoriaid','=', 'categorias.categoriaid')\n ->select('productos.productoid','productos.categoriaid','productos.producto_barra','productos.producto_nombre','categorias.categoria_nombre','productos.producto_pcompra','productos.producto_pventa','productos.producto_existencia','productos.producto_imagen','productos.producto_estado')\n ->where('productos.categoriaid', '=', $categoriaid)\n ->orderBy('productos.productoid','desc')->paginate(10);\n }\n else{\n\n $searchValues = preg_split('/\\s+/', $buscar, -1, PREG_SPLIT_NO_EMPTY);\n\n $productos = Producto::join('categorias', 'productos.categoriaid','=','categorias.categoriaid')\n ->select('productos.productoid','productos.categoriaid','productos.producto_barra','productos.producto_nombre','categorias.categoria_nombre','productos.producto_pcompra','productos.producto_pventa','productos.producto_existencia','productos.producto_imagen','productos.producto_estado')\n ->where('productos.categoriaid', '=', $categoriaid)\n ->where(function ($q) use ($searchValues, $criterio) {\n foreach ($searchValues as $value) {\n $q->where('productos.'.$criterio, 'like', \"%{$value}%\");\n }\n })\n //->where('productos.'.$criterio, 'like', '%'.$buscar.'%')\n ->orderBy('productos.productoid','desc')\n ->paginate(10);\n }\n\n return [\n 'pagination' => [\n 'total' => $productos -> total(),\n 'current_page' => $productos -> currentPage(),\n 'per_page' => $productos -> perPage(),\n 'last_page' => $productos -> lastPage(),\n 'from' => $productos -> firstItem(),\n 'to' => $productos -> lastItem(),\n ],\n 'productos' => $productos\n ];\n \n }", "title": "" }, { "docid": "da815d085b1ccd5f2712b4497be19427", "score": "0.64304996", "text": "function consultarProducto (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM producto');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "0a080d93b4de20ce5b735ec54aee3219", "score": "0.64065534", "text": "public function listarProductos()\n {\n $crudProducto = new crudProducto(); //metodo para hacer la peticion de modelo producto\n return $crudProducto->listarProductos(); //retornar los valores del metodo listar productos\n }", "title": "" }, { "docid": "f30e5a4beb6f6726234477b503f4e311", "score": "0.6365987", "text": "public function busqueda()\n {\n // $consulta=$this->dbAdapter->query(\"select id , folio FROM usuarios where nombre = '\" . $dataUser['nombre'].\"' and correo = '\".$dataUser['correo']. \"'\" ,Adapter::QUERY_MODE_EXECUTE);\n $query = \"SELECT\n id,\n tagGrupal \n FROM\n simulacrogrupo\n \n \";\n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n return $res;\n }", "title": "" }, { "docid": "0cb26d0567636baab2ad7a667a3666de", "score": "0.6326404", "text": "public function Ordenarresultados(Collection $productos,$palabras)\n {\n // if ( preg_match(\"~\\bblocks\\b~\",$word) )\n // dd(\"matched\");\n // else\n // dd(\"no match\");\n $matchResul=[];\n foreach ($productos as $key => $p) {\n $match=0;\n $name=str_replace(['/','-',' '],'-',utf8_decode($p->name));\n $description_short=str_replace(['/','-',' '],'-',utf8_decode($p->description_short));\n $product=strtolower($this->LimpiarAcentos($name));\n $modelo=strtolower($this->LimpiarAcentos($description_short));\n foreach ($palabras as $palabra) {\n $palabra=strtolower($this->LimpiarAcentos($palabra));\n if ( preg_match(\"~\\b\".$palabra.\"\\b~\",$product) )\n {\n $match++;\n }\n if(strpos($product, $palabra)===0)\n {\n $match++;\n }\n if ( preg_match(\"~\\b\".$palabra.\"\\b~\",$modelo) )\n {\n $match+=200;\n }\n }\n $matchResul[]=$match;\n }\n //dd($productos[0]);\n arsort($matchResul);\n $keyOrder = array_keys($matchResul);\n $sorted=$productos->sortBy(function($model,$key) use ($keyOrder){\n return array_search($key, $keyOrder);\n\n });\n\n //dd($sorted);\n return $sorted;\n }", "title": "" }, { "docid": "d2fe35aff8b25b87680a6d4c5f3d3b2c", "score": "0.6315513", "text": "public function ctlBuscaProductos(){\n\n\t\t$respuesta = Datos::mdlProductos(\"productos\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"codProducto\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "title": "" }, { "docid": "bfaca785bc480145ddbaca6f80ad8dca", "score": "0.62982196", "text": "public function product_by_search() {\n\n $CI = & get_instance();\n\n $this->auth->check_admin_auth();\n\n $CI->load->library('lproduct');\n\n $product_id = $this->input->post('product_id');\n\n\n\n $content = $CI->lproduct->product_search_list($product_id);\n\n $this->template->full_admin_html_view($content);\n\n }", "title": "" }, { "docid": "403d4bff283a8c53f77383c6d1e468cd", "score": "0.62894356", "text": "public function Buscar(Request $request)\n {\n $start = microtime(true);\n //$oracion=strtolower($request->search);\n $palabras=preg_split('/\\s+/', strtolower($this->LimpiarAcentos($request->search)), -1, PREG_SPLIT_NO_EMPTY);\n $productos=DB::table('ps_product_lang');\n //dd($palabras);\n foreach ($palabras as $key => $palabra) {\n $productos->where(function($query) use($palabra){\n $query->orWhere('name','LIKE','%'.$palabra.'%')->orWhere('description_short','LIKE','%'.$palabra.'%');\n $acentos=$this->PosiblesAcentos($palabra);\n foreach ($acentos as $ac) {\n $query->orWhere('name','LIKE','%'.$ac.'%')->orWhere('description_short','LIKE','%'.$ac.'%');\n }\n });\n }\n //dd($productos->paginate(9));\n $productos=$this->Ordenarresultados($productos->get(),$palabras);\n \n //Get current page form url e.g. &page=2, at default 1\n $currentPage=Input::get('page',1);\n\n //Define how many items to show in each page\n $perPage = 5;\n\n //Slice the collection according to per page\n $currentPageResults = $productos->slice(($currentPage-1)*$perPage,$perPage)->all();\n\n //Create the paginator and pass it to the view\n $paginatedResults= new LengthAwarePaginator($currentPageResults, count($productos),$perPage,$currentPage,['path'=>$request->url(),'query'=>$request->query()]);\n //dd($paginatedResults);\n\n return view('Tienda.tienda',['productos'=>$paginatedResults]);\n }", "title": "" }, { "docid": "54801b57a7f9ae6c2f26475f406ee788", "score": "0.6250933", "text": "public function searchItemById(){\n\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ProductoDAO -> searchItemById());\n $res = $this -> Conexion -> extraer();\n $this -> idProducto = $res[0];\n $this -> nombre = $res[1];\n $this -> foto = $res[2];\n $this -> descripcion = $res[3];\n $this -> precio = $res[4];\n $this -> Conexion -> cerrar();\n }", "title": "" }, { "docid": "950430245e692d34aea7feed9b4b824c", "score": "0.6223459", "text": "public function buscarProducto($producto)\n {\n $result = $this->_productoRepo->buscarxnombre($producto);\n return $result;\n\n }", "title": "" }, { "docid": "41431fe95aad251ab1029b395dc22b59", "score": "0.6204822", "text": "function getSearchTerms(ProductInterface $product);", "title": "" }, { "docid": "934162d642d9fa54c4f42f12580f1584", "score": "0.62046826", "text": "public function select($producto);", "title": "" }, { "docid": "63773facd9dea2abc1c0948959c69c1c", "score": "0.62010485", "text": "public function listar_productos()\n {\n\n return $this->db->get('productos')->result();\n }", "title": "" }, { "docid": "598f4b454970c6323dd2ec5def467d00", "score": "0.61845785", "text": "public function show(Request $request)\n {\n $ordenadores = array(\"p.id\",\"p.nombre\",\"c.nombre\",\"p.stock_minimo\",\"p.stock_maximo\");\n\n $columna = $request['order'][0][\"column\"];\n \n $criterio = $request['search']['value'];\n\n $productos = DB::table('producto as p')\n ->join('categoria as c','p.categoria_id','c.id') \n ->select('p.id','p.nombre','c.nombre as categoria','p.stock_minimo','p.stock_maximo') \n ->where($ordenadores[$columna], 'LIKE', '%' . $criterio . '%')\n ->orderBy($ordenadores[$columna], $request['order'][0][\"dir\"])\n ->skip($request['start'])\n ->take($request['length'])\n ->get();\n \n $count = DB::table('producto as p') \n ->join('categoria as c','p.categoria_id','c.id') \n ->where($ordenadores[$columna], 'LIKE', '%' . $criterio . '%')\n ->count();\n \n $data = array(\n 'draw' => $request->draw,\n 'recordsTotal' => $count,\n 'recordsFiltered' => $count,\n 'data' => $productos,\n );\n\n return response()->json($data, 200);\n }", "title": "" }, { "docid": "921c0b91eb63c7a2c1d7fe0765731d24", "score": "0.6174319", "text": "public function searchapi()\n {\n // dd($_GET);\n $name = $_GET['name']; //si no quiere buscar en name poner false en el query\n $nomenclature = $_GET['nomenclature']; //si no quiere buscar en nomenclature poner false en el query\n $planta = $_GET['planta']; //si no quiere buscar en planta poner false en el query, SINO planta=1\n $esqueje = $_GET['esqueje'];\n $semillas = $_GET['semillas'];\n $producto = $_GET['producto'];\n $servicio = $_GET['servicio'];\n\n $resultados = Article::where(function ($query) {\n $query->where('name', 'like', '%' . $_GET['name'] . '%')\n ->orWhere('nomenclature', 'like', '%' . $_GET['nomenclature'] . '%');\n })\n ->where(function ($query) {\n $query->where('category_id', '=', $_GET['planta'])\n ->orWhere('category_id', '=', $_GET['esqueje'])\n ->orWhere('category_id', '=', $_GET['semillas'])\n ->orWhere('category_id', '=', $_GET['producto'])\n ->orWhere('category_id', '=', $_GET['servicio']);\n })\n\n ->orderBy('name', 'ASC')\n ->get();\n // ->paginate(6);\n // $resultados->withPath(\"resultados?search=$param\");\n\n return $resultados;\n }", "title": "" }, { "docid": "c4522e6fa87efdd6337b21b44d26162d", "score": "0.61497974", "text": "function buscador($productesBuscar){\n $conn=connexioBD();\n $productes=\"\";\n $sql=\"SELECT * FROM productes WHERE nom LIKE '%$productesBuscar%'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($producte=$resultado->fetch_assoc()){\n $idProducte=$producte[\"id\"];\n $imatges=mostrarImatgesPublica($idProducte);\n $productes.=\"ID: \".$producte[\"id\"].\" Nom \".$producte[\"nom\"].\" Descripcio \".$producte[\"descripcio\"].\" Preu \".$producte[\"preu\"].\"<br>\".$imatges.\"<br><br>\"; \n }\n }\n return $productes;\n $resultado->free();\n $conn->close();\n}", "title": "" }, { "docid": "28b083ff463d28a6a47ac2e23ab8a594", "score": "0.61364746", "text": "public function getProductsBySearch()\n {\n $collection = new AjaxModel();\n $productList = $collection->getProducts($_POST['name']);\n foreach ($productList as $item) {\n //colon delimiter for each cell, bar delimiter for each row\n echo $item[0].\":\".$item[1].\":\".$item[2].\":\".$item[3].\":\".$item[4].\"|\";\n }\n }", "title": "" }, { "docid": "b0323dbbb40cd0e6759d8e19acfcb054", "score": "0.61326003", "text": "public function search()\n\t{\n\t\tif(isset($_GET['term']))\n\t\t{\n\t\t\t$result = $this->Busca_Model->pesquisar($_GET['term']);\n\t\t\tif(count($result) > 0) {\n\t\t\tforeach ($result as $pr)$arr_result[] = $pr->nome;\n\t\t\t\techo json_encode($arr_result);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "17ba2c08a6b5d8e247cbca1e18c7a204", "score": "0.61306065", "text": "public function searchProduct(Request $request){\n\n $search = $request->search;\n\n if($search==null){\n // If the search field is empty, take all products\n $products = DB::table('products')->paginate(6);\n } else {\n $products = DB::table('products')->where('name', 'LIKE', \"%\".$search.\"%\")->paginate(6);\n }\n\n return view('allproducts', ['products' => $products]);\n }", "title": "" }, { "docid": "5a1288399cddb0fa9634cedc855e98e5", "score": "0.6125882", "text": "public function search(Request $r){\n\n $keyword = $r->keyword;\n\n $products = Product::where('name', 'LIKE', '%' . $keyword . '%')->limit(24)->get();\n\n\n $seo_data = array(\n 'title' => $keyword, \n 'tag' => \"search,\".$keyword, \n 'description' => \"shop page\", \n );\n\n \n\n return view('public.product.search',compact('products','seo_data'));\n}", "title": "" }, { "docid": "a9ab3833945983138c7633d697428268", "score": "0.6123306", "text": "public function listar_productos_carrito() {\n \n try {\n $sql = \"\n select \n p.descripcion,\n i.cantidad,\n i.precio_venta,\n e.importe_total,\n p.id_producto\n from \n al_producto p inner join al_inventario i\n on\n p.id_producto = i.id_producto inner join pedido e\n on\n i.id_pedido = e.id_pedido \n where\n e.id_cliente = '$_SESSION[cliente_id]' and e.estado is null; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "title": "" }, { "docid": "a13b8a9172417123470856a700e6b096", "score": "0.6116756", "text": "function buscar_producto($parametro)\n {\n $consulta_productos=producto::\n join('categoria','producto.id_categoria','=','categoria.id')\n ->join('unidad','producto.id_unidad','=','unidad.id')\n\n ->where(function ($query) use ($parametro){\n $query->where('producto.pro_nombre','like','%'.$parametro.'%')\n ->orWhere('producto.pro_codigo','like','%'.$parametro.'%')\n ->orWhere('categoria.cat_descripcion','like','%'.$parametro.'%');\n })\n\n ->paginate(5);\n\n return view('paginas.tablas.tabla_productos')->with('consulta_productos',$consulta_productos);\n }", "title": "" }, { "docid": "44fc624cee1ccb8127599a9de51b68ca", "score": "0.610749", "text": "public function actionSearch()\n {\n $route = 'merchant.searchProduct';\n $request = new searchProductRequest();\n $request->setCustomerId($this->customer_id);\n $request->setAuthToken($this->auth_token);\n //$request->setKeyword('方便面');\n $request->setWholesalerId(3);\n $request->setPageSize(10);\n $request->setCategoryId(377);\n $request->setCategoryLevel(3);\n// $request->setBrand('百威;王老吉;');\n $result = Proxy::sendRequest($route, $request);\n $header = $result->getHeader();\n try{\n $body = searchProductResponse::parseFromString($result->getPackageBody());\n }catch (\\Exception $e){\n $body = null;\n }\n return $this->render('index',[\n 'request' => $request->toArray(),\n 'route' => $route,\n 'header' => $header,\n 'body' => $body\n ]);\n }", "title": "" }, { "docid": "2f1a52db56e301f7ab81d63e7f71e437", "score": "0.60943156", "text": "function searchProduct($type,$input)\n {\n $products;\n switch($type)\n {\n case 0:\n $products=Product::search($input);\n break;\n case 1:\n $products=Product::searchByName($input);\n break;\n case 2:\n $products=Product::searchByGroup($input);\n break;\n case 3:\n $products=Product::searchBySupplier($input);\n break;\n case 4:\n $products=Product::searchByTag($input);\n break;\n case 5: $products=Product::searchByDescription($input);\n break;\n default:\n break;\n }\n if(!empty($products))\n {\n return $products;\n }else {\n return false;\n }\n }", "title": "" }, { "docid": "40f72a18438559e32f03674f9d79128f", "score": "0.60904294", "text": "public function action_search() {\n\t\t$productIds = explode('/', $this->request->param('id'));\n\t\t\n\t\t$products = ORM::factory('product')->where('product_id', 'in', $productIds)->find_all();\n\t\t\n\t\t$view = View::factory('product/search');\n\t\t$view->set('products', $products);\n\t\t$this->template->set('content', $view);\n\t}", "title": "" }, { "docid": "ad25e9b2026d0ad06639aac44443379f", "score": "0.60883117", "text": "public function readProductos(){\n $sql='SELECT idProducto, foto, nombre, precio, cantidad, nombreProveedor, producto.estado from producto, proveedor where proveedor.idProveedor=producto.idProveedor and producto.estadoEliminacion= 1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.60856426", "text": "public function getProduct();", "title": "" }, { "docid": "51ea2325e5a72962d2289ba5c1ceb52b", "score": "0.60717475", "text": "public function getProductoRe(){\n\t\t$sql = \"SELECT id_producto, nombre, cantidad, precio_total, presentacion, proveedor, marca, tipo_producto FROM productos INNER JOIN presentaciones USING(id_presentacion) INNER JOIN proveedores USING(id_proveedor) INNER JOIN marca USING(id_marca) INNER JOIN tipo_producto USING(id_tipo_producto) ORDER BY id_producto\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "7b23e6167f11b72287e35fb413fd6283", "score": "0.60675997", "text": "public function listProductos(Request $request){\n return ProductoModel::listProductos();\n\n }", "title": "" }, { "docid": "5c01ed3b0e3cf0c2f1622f30f30fa6d9", "score": "0.60625774", "text": "public function searchProduct(){\n if($this->checkKeyWord() === false && $this->searchOrNoSearch == 0) return array();\n $this->check_branch();\n $andWhere = '';\n if($this->active == 0) $andWhere .= ' AND usp_active = 0';\n else $andWhere .= ' AND usp_active = 1';\n if($this->checkKeyWord() && $this->searchOrNoSearch == 0){\n if($this->class_import_export->detect_barcode($this->keyword)){\n if($this->class_import_export->detect_me_barcode($this->keyword)) $andWhere .= \" AND usp_me_barcode LIKE '%\".$this->keyword.\"%'\";\n else $andWhere .= \" AND usp_barcode LIKE '%\".$this->keyword.\"%'\";\n }else{\n $andWhere .= \" AND usp_pro_name LIKE '%\".$this->keyword.\"%'\";\n }\n }\n $sql_search = \"SELECT * FROM \".USER_PRODUCTS.\"\n WHERE usp_branch_id = \" . $this->branch_id . \"\n AND usp_use_child_id = \".$this->use_id.\"\n AND usp_use_parent_id = \" . $this->admim_id .$andWhere;\n $db_query = new db_query($sql_search);\n return $db_query->resultArray();\n }", "title": "" }, { "docid": "2a1adc838b78a308f25ea5a5ce82a2ff", "score": "0.60563916", "text": "public function searchProductosCategoria($value){\n $sql='SELECT nomCategoria, idProducto, producto.foto, nombre, producto.descripcion,precio FROM producto INNER JOIN categoria USING (idCategoria) WHERE idCategoria = ? AND producto.estado=1 AND producto.estadoEliminacion=1 and producto.nombre LIKE ?';\n $params=array($this->categoria,\"%$value%\");\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "c7291b2b77efe9d28d47de3a483ed922", "score": "0.6052446", "text": "function listar($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND r.id='.$objeto['id']:'';\n\t// Filtra por los insumos preparados\n\t\t$condicion.=(!empty($objeto['insumos_preparados']))?' AND ids_insumos_preparados!=\\'\\'':'';\n\t// Filtra por tipo\n\t\t$condicion.=(!empty($objeto['tipo'])) ? ' AND p.tipo_producto = '.$objeto['tipo'] : '';\n\t// Filtros\n\t\t$condicion.=(!empty($objeto['filtro']) && $objeto['filtro'] == 'insumos_preparados_formula') ? ' AND (p.tipo_producto = 8 OR p.tipo_producto = 9) ' : '';\n\n\n\t// Ordena la consulta si existe\n\t\t$condicion.=(!empty($objeto['orden']))?' ORDER BY '.$objeto['orden']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, p.factor as multiplo,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto,\n\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos,\n\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo, p.minimos\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\tON\n\t\t\t\t\t\tr.id = p.id\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\tWHERE\n\t\t\t\t\tp.status = 1 AND (p.tipo_producto = 8 OR p.tipo_producto = 9)\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "title": "" }, { "docid": "a8c3b4c341905979d7f0f648e940cf90", "score": "0.60508823", "text": "public function Search($objeto);", "title": "" }, { "docid": "df863581651eb7175c376a4fdb910718", "score": "0.60471505", "text": "public function search(Request $request){\n\n $this->validate($request, [\n 'query' =>'required|min:3',\n ]);\n\n\n \n \n $query = $request->input('query');\n\n $products = Product::where('pro_name','like',\"%$query%\")->get();\n\n return view('shop.index')->with('products',$products);\n }", "title": "" }, { "docid": "0e0843e6335e952d178a475bdf5e4516", "score": "0.6038945", "text": "public function index(Request $request) {\n $keywords = '';\n $description = 'Поиск товаров по артикулу или названию';\n $title = 'Поиск товаров по артикулу или названию';\n\n $canonical = $this->canonical;\n\n $search_str = '';\n $items = false;\n\n if ($request->input('search')) {\n $items = DB::table('product')->get();\n $search_str = mb_strtolower((string)$request->input('search'));\n $id = [];\n\n foreach ($items as $value) {\n $name = mb_strtolower((string)$value->name);\n $article = mb_strtolower((string)$value->article);\n\n if (strpos($name, $search_str) !== false || strpos($article, $search_str) !== false) {\n array_push($id, $value->product_id);\n }\n }\n $items = DB::table('product')->select('product.*', 'category.name_2st as category', 'category.slug as category_slug')\n ->leftJoin('category', 'product.category_id', '=', 'category.category_id')\n ->whereIn('product.product_id', $id)->get();\n\n $items = $items->map(function ($item) {\n $item->image_path = collect(explode(';', $item->image_path))->map(function ($item) {\n return collect([\n 'name' => substr($item, 0, strripos($item, '.')),\n 'extension' => substr($item, strripos($item, '.') + 1, strlen($item)),\n ]);\n });\n return $item;\n });\n\n /*$items = DB::table('product')->leftJoin('categories', 'items.subcategory_id', '=', 'categories.id')\n ->select('items.*', 'categories.plug as subcategory_plug')->whereIn('items.id', $id)->paginate();*/\n }\n\n return view('search', compact('keywords', 'description', 'title', 'canonical', 'search_str', 'items'));\n }", "title": "" }, { "docid": "41c46b964abcf4d12a0baae70482f39f", "score": "0.6038583", "text": "public function searchableAs()\n {\n return 'product';\n }", "title": "" }, { "docid": "defb8a04512e8863e339a694da5c2b53", "score": "0.60354024", "text": "private function buscar_proveedor()\n {\n $this->template = FALSE;\n \n $json = array();\n foreach($this->proveedor->search($_REQUEST['buscar_proveedor']) as $pro)\n {\n $json[] = array('value' => $pro->nombre, 'data' => $pro->codproveedor);\n }\n \n header('Content-Type: application/json');\n echo json_encode( array('query' => $_REQUEST['buscar_proveedor'], 'suggestions' => $json) );\n }", "title": "" }, { "docid": "d2d2151616c6134b0d5392a2dc2c701d", "score": "0.6021725", "text": "public function filtrarProductos(Request $request){\n $datos = $request[\"datos_filtro\"];\n return ProductoModel::filtrarProductos($datos);\n\n }", "title": "" }, { "docid": "923a9a72f946bb8cb07cd9886e2bad65", "score": "0.6015447", "text": "public static function getProductos() {\r\n\r\n $consulta = \"SELECT * FROM productos\";\r\n\r\n $conexion = ConexionDB::conectar(\"tienda\");\r\n\r\n try {\r\n $stmt = $conexion->prepare($consulta);\r\n $stmt->execute();\r\n $resultado = $stmt->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, \"Carrodelacompra\\Producto\");\r\n } catch (PDOException $e){\r\n\t\t echo $e->getMessage();\r\n } \r\n \r\n ConexionDB::desconectar();\r\n return $resultado;\r\n \r\n\r\n }", "title": "" }, { "docid": "9111b8a1da4b2a4c83b867352599914f", "score": "0.6003879", "text": "function buscadorProducteCategoria($productesBuscar, $categoria){\n $conn=connexioBD();\n $productes=\"\";\n $sql=\"SELECT * FROM ((productes INNER JOIN categoria_producte ON categoria_producte.producte_id=productes.id) INNER JOIN categories ON categories.idCategoria=categoria_producte.categoria_id) WHERE productes.nom LIKE '%$productesBuscar%' AND categories.nomCategoria='$categoria'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($producte=$resultado->fetch_assoc()){\n $idProducte=$producte[\"id\"];\n $imatges=mostrarImatgesPublica($idProducte);\n $productes.=\"ID: \".$producte[\"id\"].\" Nom: \".$producte[\"nom\"].\" Descripcio: \".$producte[\"descripcio\"].\" Preu: \".$producte[\"preu\"].\"<br>\".$imatges.\"<br><br>\"; \n }\n }\n return $productes;\n $resultado->free();\n $conn->close();\n\n}", "title": "" }, { "docid": "2d63fca74a873abefca8682fe27c1f98", "score": "0.6000987", "text": "public function buscarProducto(Request $request){\n \n if($request->isMethod('post')){ \n $reglaDatos = array( \n 'servicioid' => 'required', \n 'nombre' => 'required', \n ); \n \n $mensajeDatos = array( \n 'servicioid.required' => 'El id del servicio es requerido',\n 'nombre.required' => 'El nombre es requerido'\n );\n $validarDatos = Validator::make($request->all(), $reglaDatos, $mensajeDatos );\n if($validarDatos->fails())\n {\n return [\n 'success' => 0, \n 'message' => $validarDatos->errors()->all()\n ];\n } \n\n if(Servicios::where('id', $request->servicioid)->first()){\n\n $a = $request->nombre;\n\n $productos = DB::table('servicios AS s') \n ->join('servicios_tipo AS st', 'st.servicios_1_id', '=', 's.id')\n ->join('producto AS p', 'p.servicios_tipo_id', '=', 'st.id')\n ->select('p.id', 'p.nombre', 'p.imagen', 'p.activo', 'p.precio', 'p.disponibilidad', 'p.utiliza_imagen')\n ->where('s.id', $request->servicioid)\n ->where('p.disponibilidad', 1) // producto disponible\n ->where('p.activo', 1) // producto activo\n ->where('st.activo', 1) // categoria activa\n ->where('p.es_promocion', 0) // ningun producto marcado como promocion\n //->where('p.nombre', 'like', '%' . $request->nombre . '%')\n ->where(function ($query) use ($a) {\n $query->where('p.nombre', 'like', '%' . $a . '%')\n ->orWhere('p.descripcion', 'like', '%' . $a . '%');\n })\n ->get();\n \n return ['success' => 1, 'productos' => $productos];\n }else{\n return ['success' => 2];\n }\n }\n }", "title": "" }, { "docid": "c3d98028d97229e1f7ac80da1a67c515", "score": "0.5997409", "text": "public function searchResult()\n {\n $name=Input::get('name', '');\n $searchbykeyword=Product::SearchByKeyWord($name)->get();\n /* var_dump($searchbykeyword);*/\n return view('products.search', compact('searchbykeyword'));\n }", "title": "" }, { "docid": "d6b216cb3304a078c6649ac26060078a", "score": "0.59937733", "text": "public function ctlBuscaProductosNombre(){\n\n\t\t$respuesta = Datos::mdlProductosTodos(\"productos\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo \"<option>\".$item[\"codProducto\"].\"</option>\";\n\t\t}\n\t}", "title": "" }, { "docid": "4e7003f050616fe36647ab93fd05af8c", "score": "0.5985151", "text": "public function listar(){\n\t\t$sql = \"SELECT * FROM producto\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "fadcd7d5e4367686fb1ef91949fc7999", "score": "0.5981883", "text": "public function buscarProductoCarrito(){\n $carrito = $_SESSION['carrito'];\n\n $resList = array();\n\n foreach($carrito as $item){\n if($item[0] == $this -> producto){\n $resList[0] = $item[0];\n $resList[1] = $item[1];\n }\n }\n\n return $resList;\n }", "title": "" }, { "docid": "ca6e357272beb02a1bf4775ec490621c", "score": "0.59734094", "text": "public function buscar(){\n\t\tif($_POST && !empty($_POST['pesquisa'])){\n\t\t\t$this->load->model('item');\n\t\t\t$dados = $this->prepara_dados($_POST['pesquisa']);\n\t\t\t$resultado = $this->db;\n\t\t\tforeach($dados as $d){\n\t\t\t\tif($d!=$dados[0]) $resultado->or_where('keywords LIKE','%'.$d.'%');\n\t\t\t\telse $resultado->where('keywords LIKE','%'.$d.'%');\n\t\t\t}\n\t\t\tif(isset($_POST['setor'])) $setor = $_POST['setor']; \n\t\t\tif(isset($setor)){\n\t\t\t\t$resultado->where('acervo_categoria_id',$this->setor($setor));\n\t\t\t\t$data['setor'] = $setor;\n\t\t\t}\n\t\t\t$data['pesquisa'] = $_POST['pesquisa'];\n\t\t\t$data['num_rows'] = $this->item->get(clone $resultado)->num_rows;\n\t\t\t$data['rows'] = $this->item->get($resultado)->result();\n\t\t\t$data['row_link'] = 'pagina/visualizar/';\n\t\t\t$data['page'] = \"pages/internal/pesquisa\";\n\t\t\t$this->load->view('template',$data);\n\t\t}\n\t\telse header(\"Location: home\");\n\t}", "title": "" }, { "docid": "9bd9f819ff545a42f2c9c8f5b7b6801f", "score": "0.59692186", "text": "public function cari(Request $request)\n {\n // dd($request);\n // Get the search value from the request\n $search = $request->search_text;\n\n // Search in the title and body columns from the posts table\n $results = Product::where('product_name', 'LIKE', \"%\".$search.\"%\")->orWhere('product_short_desc', 'LIKE', \"%\".$search.\"%\")->orWhere('product_long_desc', 'LIKE', \"%\".$search.\"%\")->orWhere('product_category', 'LIKE', \"%\".$search.\"%\")->get();\n // dd($results); \n return view('user.cari',compact(\"results\", \"search\"));\n }", "title": "" }, { "docid": "f1a4ccbde363871d8050314655410f10", "score": "0.59669596", "text": "public function index()\n {\n return Producto::all();\n \n }", "title": "" }, { "docid": "c01ed25828d6ba8297419f88df5bcb4f", "score": "0.59640616", "text": "public function search(Request $request)\n {\n $search = $request->search;\n $published_product = DB::table('product')\n ->orwhere('manufacturer_id','like','%'.$search.'%')\n ->orwhere('product_description','like','%'.$search.'%')\n ->orwhere('product_price','like','%'.$search.'%')\n ->orderBy('product_id', 'desc')->get();\n $published_product_all = DB::table('product')\n ->orwhere('product_model','like','%'.$search.'%')\n ->orwhere('product_description','like','%'.$search.'%')\n ->orwhere('product_price','like','%'.$search.'%')\n ->orderBy('product_id', 'desc')->get();\n $home = view('front_End.pages.home')->with('published_product',$published_product)->with('published_product_all', $published_product_all);\n return view('front_End/master')->with('main_content', $home);\n \n }", "title": "" }, { "docid": "be0fd927bf235d530f051a556c10f633", "score": "0.59573543", "text": "public function listas(Request $request)\n {\n $categorias = Categoria::orderBy('id', 'DESC')->get();\n $familias = Familia::orderBy('id', 'DESC')->get();\n $subfamilias = Subfamilia::orderBy('id', 'DESC')->get();\n $tiposcte = Tipoct::orderBy('id', 'ASC')->get();\n $dolarsist = Moneda::where('id', '=', '2')->first();\n $eurosist = Moneda::where('id', '=', '3')->first();\n $dolarsist = $dolarsist->valor;\n $eurosist = $eurosist->valor;\n\n\n if($request->get('familias')){\n \n $products = Producto::where('familia_id', '=', $request->get('familias'))->paginate(50);\n $searchMessage = '';\n \n } else {\n\n // Get Stock Order\n if($request->get('order')){\n $order = $request->get('order');\n } else {\n $order = 'ASC';\n }\n\n $searchMessage = '';\n $products = Producto::orderBy('id', 'ASC')->paginate(50);\n } \n return view('vadmin.productos.listas')\n ->with('products', $products)\n ->with('categorias', $categorias)\n ->with('familias', $familias)\n ->with('subfamilias', $subfamilias)\n ->with('tiposcte', $tiposcte)\n ->with('eurosist', $eurosist)\n ->with('dolarsist', $dolarsist)\n ->with('searchMessage', $searchMessage);\n\n }", "title": "" }, { "docid": "4ea37219557a922ed8db7e1720a7edd5", "score": "0.59524024", "text": "public function index($search=null)\n {\n $products = Product::all();\n\n }", "title": "" }, { "docid": "536d8885d43b894d83015adec653b381", "score": "0.59478843", "text": "public function getProductos() {\r\n $pdo = Database::connect();\r\n $sql = \"select * from producto\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $producto = new Producto($res['codigo'], $res['descripcion'], $res['cantidad'], $res['precio']);\r\n array_push($listado, $producto);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }", "title": "" }, { "docid": "43af6bda61880fe85cbfafa5d57c26ec", "score": "0.59392893", "text": "public function ProductSearch() {\n\t\t\n\t\t$search_data \t\t=\tjson_decode($this->request->getContent(),true);\n\t\t$search_term\t\t=\t$search_data['search_term'];\n\t\t$seller_id\t\t\t=\t$search_data['seller_id'];\n\t\t\n\t\t$querydata \t\t= \t$this->_objectManager->create('Webkul\\Marketplace\\Model\\Product')\n\t\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t\t->addFieldToFilter(\n\t\t\t\t\t\t\t\t\t'seller_id',\n\t\t\t\t\t\t\t\t\t['eq' => $seller_id]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t->addFieldToFilter(\n\t\t\t\t\t\t\t\t\t'status',\n\t\t\t\t\t\t\t\t\t['eq' =>1]\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\t->addFieldToSelect('mageproduct_id')\n\t\t\t\t\t\t\t\t->setOrder('mageproduct_id');\n\t\t\t//return \t$querydata->getData();\t\t\t\t\n\t\t\t$collection = $this->_productCollectionFactory->create()->addAttributeToSelect(\n '*'\n );\n\t\t$collection->addAttributeToFilter('entity_id', array('in' => $querydata->getData()));\n\t\t$collection->addAttributeToFilter('name', array('like' => '%'.$search_term.'%'));\n\t\t\t\n\t\treturn $collection->getData();\n\t\t\t\n }", "title": "" }, { "docid": "fb4ea3b0d081bc4a1fd4bef02fda93e9", "score": "0.5939246", "text": "public function product_by_search()\n\t{\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->library('lproduct');\n\t\t$product_id = $this->input->post('product_id');\t\t\n $content = $CI->lproduct->product_search_list($product_id);\n $sub_menu = array(\n\t\t\t\tarray('label'=> 'Manage Product', 'url' => 'Cproduct', 'class' =>'active'),\n\t\t\t\tarray('label'=> 'Add Product', 'url' => 'Cproduct/manage_product')\n\t\t\t);\n\t\t$this->template->full_admin_html_view($content,$sub_menu);\n\t}", "title": "" }, { "docid": "7abe428542b17d5973f4e2d4793563a5", "score": "0.5939068", "text": "public function buscarProducto(){\n // Crear un objeto de la clase modelo\n try {\n $modelo = new ProductoModel();\n $buscar = $modelo->findAll();\n // Organizar los datos en un arreglo asociativo \n \n $productos =array(\"productos\" =>$buscar);\n return view('listaProductos',$productos);\n\n }catch (\\Exception $error) {\n $mensaje = $error->getMessage();\n return redirect()->to(site_url('/Producto'))->with('mensaje',$mensaje);\n }\n }", "title": "" }, { "docid": "b280290ab54bbad2792e715cd688271a", "score": "0.5930824", "text": "public function index(Request $request)\n {\n\n //select * from producto inne join users on ...... (ORM, Laravel...ELOQUENT)\n //$productos = Producto::with(['user:id,email,name'])->paginate(10);\n\n //select * from producto where nombre like '%par%' or ......\n $productos = Producto::with(['user:id,email,name'])\n ->whereCodigo($request->txtBuscar)\n ->orWhere('nombre', 'like', \"%{$request->txtBuscar}%\")->get();\n// ->paginate(9);\n\n// return \\response()->json($productos, 200);\n return $productos;\n }", "title": "" }, { "docid": "a79649c8a8cd2b02e11f32f31daba356", "score": "0.59244764", "text": "public function search_product(){\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->model('Orders');\n\t\t$product_name = $this->input->post('product_name');\n\t\t$category_id = $this->input->post('category_id');\n\t\t$product_search = $this->Orders->product_search($product_name,$category_id);\n if ($product_search) {\n foreach ($product_search as $product) {\n echo \"<div class=\\\"col-xs-6 col-sm-4 col-md-2 col-p-3\\\">\";\n echo \"<div class=\\\"panel panel-bd product-panel select_product\\\">\";\n echo \"<div class=\\\"panel-body\\\">\";\n echo \"<img src=\\\"$product->image_thumb\\\" class=\\\"img-responsive\\\" alt=\\\"\\\">\";\n echo \"<input type=\\\"hidden\\\" name=\\\"select_product_id\\\" class=\\\"select_product_id\\\" value='\".$product->product_id.\"'>\";\n echo \"</div>\";\n echo \"<div class=\\\"panel-footer\\\">$product->product_model - $product->product_name</div>\";\n echo \"</div>\";\n echo \"</div>\";\n \t}\n }else{\n \techo \"420\";\n }\n\t}", "title": "" }, { "docid": "227aeb6d7cdc7d8217edb90eaf730a91", "score": "0.5924367", "text": "public function actionSearch()\n {\n //el asunto esta en que no hay datos confiables en la base. Hay que tocar el modelo de registro para que guarde un par de cosas mas.\n $tarifa= new TarifasModelo();\n\n $agenciaModel= new AgenciaModelo();\n $result = $agenciaModel->GetInfoAgencia(null,null,null,null,null,null,null,null);\n //for ($i = 0; $i < $length; $i++)\n //{\n \t\n //}\n $i=-1;\n foreach ($result as $value)\n {\n $i++;\n \tif($value[\"DireccionCoordenada\"] !=null){ // asi no vamos a buscar las tarifas de remiserias que no se van a mostrar\n //array_push($value,$tarifa->GetInfoTarifas(null,null,$value[\"AgenciaID\"],null,null,null,null)) ;\n $result[$i]['Tarifa'] = $tarifa->GetInfoTarifas(null,null,$value[\"AgenciaID\"],null,null,null,null)[0]; //casos en los que tienen mas de una tarifa, nose por que\n }\n }\n \n $this->setHeader(200);\n Yii::$app->response->format = Response::FORMAT_JSON;\n return Json::encode($result);\n \n }", "title": "" }, { "docid": "b814c9328dfbb885a424f56f5c900faa", "score": "0.5917193", "text": "function consultar_productos($marca=\"\"){\n\t\t//Primero conectarse a la bd\n\t\t$conexion_bd = conectar_bd();\n\n\t\t$resultado = \"<table><thead><tr><th>ID</th><th></th><th>Nombre de Marca</th><th></th><th>Acciones</th></tr></thead>\";\n\n\t\t/*$consulta = 'SELECT pr.descripcion as pr_descripcion, m.nombre as m_nombre, pr.cantidad as pr_cantidad, pr.precio as pr_precio, tp.nombre as tp_nombre, e.nombre as e_nombre FROM producto as pr, productotiene as pt, marca as m, tipoproducto as tp, estatus as e WHERE pr.id_producto = pt.id_producto AND m.id_marca = pt.id_marca AND tp.id_tipo = pt.id_tipo AND e.id_estatus = pt.id_estatus'; */\n\n\t\t$consulta = 'SELECT m.nombre as m_nombre, m.id as m_id FROM marca as m ';\n\t\t\n\t\t//Ahora con el buscador necesitamos un validador de que es lo que quiere buscar\n\t\tif ($marca != \"\") {\n\t\t\t$consulta .= \" WHERE m_id=\".$marca;\n\t\t}\n\n\n\t\t$resultados = $conexion_bd->query($consulta); \n\t\twhile ($row = mysqli_fetch_array($resultados, MYSQLI_BOTH)) {\n\t\t\t//$resultado .= $row[0]; //Se puede usar el índice de la consulta\n\t\t\t$resultado .= \"<tr>\";\n\t\t $resultado .= \"<td>\".$row['m_id'].\"</td>\";\n\t\t $resultado .= \"<td></td>\";\n\t\t $resultado .= \"<td>\".$row['m_nombre'].\"</td>\";\n\t\t $resultado .= \"<td></td>\";\n\t\t $resultado .= \"<td>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\"><i class=\\\"material-icons\\\">add_box</i></a>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\"><i class=\\\"material-icons\\\">edit</i></a>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\" href=\\\"registrarIngresoProductos.php\\\"><i class=\\\"material-icons\\\">receipt</i></a>\";\n\t\t $resultado .= '<a href=\"controlador_eliminar_producto.php?id='.$row['m_id'].'\"';\n\t\t $resultado .= borrarBoton();\n\t\t $resultado .= '</a>' ;\n\n\t\t /* $resultado .= '<a href=\"controlador_eliminar_producto.php?id='.$row['p_id'].' class=\"waves-effect waves-light btn-small red lighten-2\"><i class=\"material-icons\">delete</i></a>';*/\n\n\t\t $resultado .= \"</td>\" ;\n\t\t $resultado .= \"</tr>\" ;\n\t\t}\n\t\tmysqli_free_result($resultados); //Liberar la memoria\n\n\t\t// desconectarse al termino de la consulta\n\t\tdesconectar_bd($conexion_bd);\n\n\t\t$resultado .= \"</tbody></table>\";\n\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "34ee0bcd1abdcef4d58937d7328730eb", "score": "0.5898297", "text": "public static function renderProductos()\n {\n //Se verifica si hay una opcion de busqueda\n if(isset($_POST[\"formulario\"]))\n {\n //se verifica que el formulario no este vacio\n if(!empty($_POST))\n {\n //Se verifica si ha ingresado un parametro de busqueda\n if($_POST[\"busqueda\"] != \"\")\n {\n //se declaran las variables del formulario\n $busqueda = trim($_POST[\"buscar\"]);\n $orden = $_POST[\"orden\"];\n\n //Se crea un switch para el orden en el que se mostrara\n switch ($orden)\n {\n //Aqui se buscara en orden predeterminado\n case 0:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Seleccionar(\"productos\", \"producto\", array($busqueda), 1, 1);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui se buscara en orden de lo mas economico\n case 1:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Buscar(\"productos\", \"producto\", array($busqueda), 1, 1, 1);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui se buscara en orden de lo mas costoso\n case 2:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Buscar(\"productos\", \"producto\", array($busqueda), 1, 1, 0);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n \n default:\n # code...\n break;\n }\n } \n\n //Aqui solo se ordenara cuando no hayan aprametros de busqueda\n else\n {\n $busqueda = null;\n $orden = $_POST[\"orden\"];\n\n switch ($orden) \n {\n //Aqui es el orden predeterminado\n case 0:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Seleccionar(\"productos\", null, null, null, null);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui es orden de lo mas economico\n case 1:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Buscar(\"productos\", null, null, null, null, 1);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui es orden de lo mas costoso\n case 2:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Buscar(\"productos\", null, null, null, null, 0);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n \n default:\n # code...\n break;\n }\n } \n }\n }\n\n else\n {\n //variable con los datos de todos los productos\n $datos_productos = Sentencias::Seleccionar(\"productos\", null, null, null, null);\n\n //se verifica que existan productos\n if($datos_productos != null)\n {\n //Se renderizan todos los registros de la tabla productos\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n \n }\n }\n }", "title": "" }, { "docid": "a29b9f296c658db7eb079f2c6f4cafc8", "score": "0.58966696", "text": "public function readProductosMarca()\n {\n $sql = 'SELECT nombre, id_producto, imagen_producto, producto, descripcion, precio\n FROM producto INNER JOIN marca USING(id_marca)\n WHERE id_marca = ? \n ORDER BY producto';\n $params = array($this->nombre);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "26bbe3a0002b2c8738db8840991df982", "score": "0.58953655", "text": "public function getProductsBySearch ($search) {\n \n $words = explode(' ', $search);\n $regex = implode('|', $words);\n \n $errorCode = 0;\n\t\t$errorMessage = \"\";\n \n if (!empty($search)) {\n \n try {\n\n $query = \"SELECT ea_product.id, upc, brand, product_name, \n product_description, avg_price, ea_category.name\n FROM ea_product, ea_category\n WHERE ea_product.category_id = ea_category.id\n AND ( product_name REGEXP '{$regex}'\n OR brand REGEXP '{$regex}'\n OR upc REGEXP '{$regex}'\n OR ea_category.name REGEXP '{$regex}' )\n ORDER BY avg_price\";\n //print(\"$query\");\n foreach($this->dbo->query($query) as $row) {\n $id = stripslashes($row[0]);\n $upc = strval(stripslashes($row[1]));\n $brand = $this->convertFancyQuotes(stripslashes($row[2]));\n $product_name = $this->convertFancyQuotes(stripslashes($row[3]));\n $product_description = $this->convertFancyQuotes(stripslashes($row[4]));\n $avg_price = stripslashes($row[5]);\n $category_name = $this->convertFancyQuotes(stripslashes($row[6]));\n\n $product[\"id\"] = $id;\n $product[\"upc\"] = $upc;\n $product[\"brand\"] = $brand;\n $product[\"product_name\"] = $product_name;\n $product[\"product_description\"] = $product_description;\n $product[\"avg_price\"] = $avg_price;\n $product[\"category_name\"] = $category_name;\n\n $product[\"image_path\"] = $this->getImagePath($upc);\n\n $products[] = $product;\n }\n\n } catch (PDOException $e) {\n $this->errorCode = 1;\n $errorCode = -1;\n $errorMessage = \"PDOException for getProductsBySearch.\";\n }\t\n \n } else {\n $errorCode = 1;\n\t\t\t$errorMessage = \"No Search value provided.\";\n }\n \n\t\t$error[\"id\"] = $errorCode;\n\t\t$error[\"message\"] = $errorMessage;\n\t\t\n\t\t$data[\"error\"] = $error;\n\t\t\n\t\t$data[\"search\"] = $search;\n $data[\"query\"] = $query;\n \n $data[\"products\"] = $products;\n\n $data = json_encode($data);\n \n\t\treturn $data;\n \n }", "title": "" }, { "docid": "0e4bc0134d2bb5ed9aaf5af04944ef86", "score": "0.5893697", "text": "public function search($title=null)\n {\n\n // $products = QueryBuilder::for(Product::class)->allowedFilters(['title'])->get();\n\n $products = Product::where([\"title\"=>$title])->orWhere([\"description\"=>$title])->orWhere([\"type\"=>$title])->get();\n return view('show_products',['products'=>$products]);\n }", "title": "" }, { "docid": "d80e633085e5480a85e819f32a3cfb30", "score": "0.5891922", "text": "public function index(Request $request)\n {\n $searchParams= $request->all();\n //kiểm tra biết limit\n $limmit=Arr::get($searchParams,'limit',static::ITEM_PER_PAGE);\n //kiểm tra keyword search\n $keyword=Arr::get($searchParams,'keyword','');\n //gọi query product\n $query=Product::query();\n\n\n\n if (!empty($keyword)) {\n $query->where('name_product', 'LIKE', '%' . $keyword . '%');\n }\n $products=$query->paginate($limmit);\n return view('web.products',compact('products'));\n }", "title": "" }, { "docid": "19c02dac704d305fd030f06294f4e0bf", "score": "0.588976", "text": "function mostrar_busqueda() {\n $atablas=array(\n 'venta_pago'=>'Venta Pago',\n 'cv_divisa'=>'C/V Divisa',\n 'reserva_pago'=>'Reserva Pago',\n 'comision'=>'Comision',\n 'venta'=>'Venta',\n 'con_traspaso'=>'Traspaso',\n 'con_compra'=>'Compra',\n 'reserva_anulacion'=>'Reserva Anulacion',\n 'venta_retencion'=>'Venta Retencion',\n 'extra_pago'=>'Pago Extra',\n 'venta_cambio_lote'=>'Venta Cambio Lote',\n 'venta_devolucion'=>'Venta Devolucion',\n 'reserva_devolucion'=>'Reserva Devolucion',\n 'pago_vendedores'=>'Pago Vendedores'\n\n );\n \n for ($i = 0; $i < $this->numero; $i++) {\n \n $objeto = $this->coneccion->get_objeto();\n $operaciones=array();\n if($objeto->cmp_tabla!='' ||$objeto->tco_descripcion=='Ajustes' ){\n $operaciones[]=\"MODIFICAR\";\n }\n if($objeto->cmp_tabla!='' ){\n $operaciones[]=\"ELIMINAR\";\n }\n echo '<tr>';\n echo \"<td>\";\n echo $objeto->cmp_id ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->tco_descripcion ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_usu_cre ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_nro;\n echo \"</td>\";\n echo \"<td>\";\n $str_tabla=$atablas[$objeto->cmp_tabla]?$atablas[$objeto->cmp_tabla]:$objeto->cmp_tabla;\n echo $str_tabla;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_tabla_id;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_nro_documento;\n echo \"</td>\";\n echo \"<td>\";\n echo FUNCIONES::get_fecha_latina($objeto->cmp_fecha);\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->ges_descripcion;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->pdo_descripcion;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->mon_titulo;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_referido;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_glosa;\n echo \"</td>\";\n echo \"<td>\";\n echo $this->get_opciones($objeto->cmp_id,\"\",$operaciones);\n echo \"</td>\";\n echo \"</tr>\";\n\n $this->coneccion->siguiente();\n }\n }", "title": "" }, { "docid": "ba39ae485ca2a0e168c62fdba1e2ec23", "score": "0.58779836", "text": "public function buscar_x_producto_orden($tipo_orden, $tipo_guia, $cod_orden, $cod_prod) {\n $compania = $this->somevar['compania'];\n $where = array(\n \"c.COMPP_Codigo\" => $compania, \"c.CPC_FlagEstado\" => \"1\",\n \"o.OCOMP_Codigo\" => $cod_orden, \"PROD_Codigo\" => $cod_prod,\n \"o.OCOMC_TipoOperacion\" => $tipo_orden, \"CPC_TipoOperacion\" => $tipo_guia\n );\n\n $this->db->from('cji_comprobante c');\n $this->db->join('cji_comprobantedetalle cd', 'cd.CPP_Codigo = c.CPP_Codigo');\n $this->db->join('cji_ordencompra o', 'c.OCOMP_Codigo = o.OCOMP_Codigo');\n $query = $this->db->order_by('CPC_Numero', 'desc')->where($where)->get();\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "603d7d5b8735abc7f5e387055e263e4d", "score": "0.5874528", "text": "public function getProductos(){\n\t\t$this->db->select(\"p.*, m.nombre as marca, c.nombre as categoria,s.id_stock as id_stock, s.stock_minimo as stock_minimo, s.stock_actual as stock_actual ,pre.valor as valor,pre.codigo as codigo, pr.nombre as presentacion, pre.precio_compra as compra,pre.precio_venta as venta\");\n\t\t$this->db->from(\"productos p\");\n\t\t$this->db->join(\"marcas m\", \"p.id_marca = m.id_marca\");\n\t\t$this->db->join(\"categoria c\", \"p.id_categoria = c.id_categoria\");\n\t\t$this->db->join(\"stock s\", \"p.id_stock = s.id_stock\");\n\t\t$this->db->join(\"presentaciones_producto pre\", \"p.id_producto = pre.id_producto\");\n\t\t$this->db->join(\"presentacion pr\", \"pr.id_presentacion = pre.id_presentacion\");\n\t\t$this->db->where(\"p.estado\",1);\n\t\t$this->db->where(\"pre.equivalencia\",1);\n\t\t$this->db->order_by(\"categoria\");\n\t\t$resultados = $this->db->get();\n\t\treturn $resultados->result();\n\t}", "title": "" }, { "docid": "99e6f127c6256a22eaa84a5d4a50f35c", "score": "0.58683085", "text": "function GetProducts(){\n $query = $this->db->prepare(\"SELECT `p`.`id` as `id_producto`, `p`.`nombre` as `nombre_producto`, `p`.`descripcion` as `desc_producto`, `p`.`precio` as `precio`, `p`.`stock` as `stock`, `c`.`nombre` as `nombre_categoria` FROM producto p INNER JOIN categoria c ON `p`.`id_categoria`=`c`.`id`\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "064a89bde33b30debc8be1e3df7fc088", "score": "0.5863606", "text": "public function search(SearchRequest $request)\n {\n $input = $request->input();\n $data['exactmatch'] = true;\n $search = '%'.$input['phrase'].'%';\n $data['phrase'] = $input['phrase'];\n $data['products'] = Product::where('p_id', 'LIKE', $search)->orwhere('p_name', 'LIKE', $search)->get()->toArray();\n\n if (empty($data['products'])){\n $data['products'] = $this->subSearch($search);\n $data['exactmatch'] = false;\n }\n\n\n return view('products.search', $data);\n\n }", "title": "" }, { "docid": "dcf78561f5af2cdfa98c5113d6a57a28", "score": "0.58595425", "text": "function ordenarProductos(){\n $productos = $this->model->orden();\n $this->view->productos = $productos;\n $this->view->render('ayuda/index');\n }", "title": "" }, { "docid": "730283c074711d284ee0f1a25b16da06", "score": "0.585869", "text": "public function getProducto(Request $request){\n \n $id_producto = $request['id_producto'];\n return ProductoModel::obtenerProducto($id_producto);\n }", "title": "" }, { "docid": "fb1705a4b232e424fca90a7eb0e503a3", "score": "0.5856797", "text": "public function search() {\n\n if ($this->request->is('post')) {\n\n // Lay du lieu tu form\n\n $listCat = $_REQUEST['listCat'];\n\n $this->Session->write('catId', $listCat);\n\n\n\n // Get keyword\n\n $keyword = $_REQUEST['keyword'];\n\n $this->Session->write('keyword', $keyword);\n\n } else {\n\n $listCat = $this->Session->read('catId');\n\n $keyword = $this->Session->read('keyword');\n\n }\n\n\n\n // setup condition to search\n\n $condition = array();\n\n if (!empty($keyword)) {\n\n $condition[] = array(\n\n 'Product.name LIKE' => '%' . $keyword . '%'\n\n );\n\n }\n\n\n\n if ($listCat > 0) {\n\n $condition[] = array(\n\n 'Product.cat_id' => $listCat\n\n );\n\n }\n\n\n\n // Lưu đường dẫn để quay lại nếu update, edit, dellete\n\n $urlTmp = DOMAINAD . $this->request->url;\n\n $this->Session->write('pageproduct', $urlTmp);\n\n\n\n // Sau khi lay het dieu kien sap xep vao 1 array\n\n $conditions = array();\n\n foreach ($condition as $values) {\n\n foreach ($values as $key => $cond) {\n\n $conditions[$key] = $cond;\n\n }\n\n }\n\n\n\n // Tang so thu tu * limit (example : 10)\n\n $urlTmp = DOMAINAD . $this->request->url;\n\n $urlTmp = explode(\":\", $urlTmp);\n\n if (isset($urlTmp[2])) {\n\n $startPage = ($urlTmp[2] - 1) * 10 + 1;\n\n } else {\n\n $startPage = 1;\n\n }\n\n $this->set('startPage', $startPage);\n\n\n\n // Simple to call data\n\n $this->paginate = array(\n\n 'conditions' => $condition,\n\n 'order' => 'Product.id DESC',\n\n 'limit' => '10'\n\n );\n\n $product = $this->paginate('Product');\n\n $this->set('product', $product);\n\n\n\n // Load model\n\n $this->loadModel(\"Catproduct\");\n\n $list_cat = $this->Catproduct->generateTreeList(null, null, null, '-- ');\n\n $this->set(compact('list_cat'));\n\n }", "title": "" }, { "docid": "3205931343a4ea609f85ee393d4547f2", "score": "0.5850026", "text": "public function index(Request $request)\n {\n return SearchProductCollection::collection( Product::where('name', 'LIKE','%'.$request->s.'%')->select('id', 'name')->get());\n }", "title": "" }, { "docid": "e0dc5b531791f0d1db1295cf1a257d5b", "score": "0.58426785", "text": "public function ListarProductos()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "title": "" }, { "docid": "383572f388f16b870b56f8cd6e525aff", "score": "0.5840387", "text": "public function search()\n {\n return response()->json(\n [\n 'product_all' => $this->product->all(),\n 'products' => $this->product->search(),\n 'brands' => $this->brands->all(),\n 'categories' => $this->categories->all()\n ]\n );\n }", "title": "" }, { "docid": "0f77583935e51bddc3c7cbb368a9f19c", "score": "0.58389", "text": "public function getMatchingProduct($request);", "title": "" }, { "docid": "5bb6f3ce2d302d8e20b678944cd53d69", "score": "0.5832364", "text": "public function search(Request $request)\n {\n\n $name = trim($request->name);\n $type = trim($request->type);\n $published = trim($request->published);\n $products_builder = Product::where('is_deleted', false)\n ->where(function ($query) use ($name) {\n if ($name != null) {\n $query->where('name', 'like', '%' . $name . '%');\n }\n })->where(function ($query) use ($type) {\n if ($type != null) {\n $query->where('type', 'like', '%' . $type . '%');\n }\n })->where(function ($query) use ($published) {\n if ($published != null) {\n $query->where('published', $published);\n }\n });\n if ($request->per_page == \"all\") {\n $products = $products_builder->get();\n } else {\n $products = $products_builder->paginate(env('PAGE_COUNT'));\n }\n return (new ProductCollection($products))->additional([\n 'errors' => null,\n ])->response()->setStatusCode(200);\n }", "title": "" }, { "docid": "c7d4e40b543d0c56258f1bc443697fde", "score": "0.5831622", "text": "public function index(Request $request)\n {\n // $product = Product::whereHas('pilihCategory', function($query) use ($request) {\n\n // $query->where('category', $request->search)->orWhere('harga', 'LIKE', '%'.$request->search.'%');\n // });\n\n $product = Product::query();\n\n if ($request->filled('category')) \n {\n $product = $product->where('category', $request->category);\n }\n\n if ($request->filled('jenis')) \n {\n $product = $product->where('jenis', $request->jenis);\n }\n \n if ($request->filled('search')) \n {\n $product = $product->where('product', 'LIKE', '%'.$request->search.'%');\n }\n\n $product = $product->orderBy('created_at', 'DESC')->paginate(3);\n\n $jenis = Jenis::all();\n $category = Category::all();\n $size = Productsize::all();\n $warna = Productwarna::all();\n return view('backend.product.index', compact('product', 'jenis', 'category', 'size', 'warna'));\n }", "title": "" }, { "docid": "9f7f337b4bf88f352fd566149c7c3cc3", "score": "0.58302516", "text": "public function obtenerTodos()\n\t{\n\t\ttry\n\t\t{\n $this->conectar();\n \n\t\t\t$lista = array(); /*Se declara una variable de tipo arreglo que almacenará los registros obtenidos de la BD*/\n\n\t\t\t$sentenciaSQL = $this->conexion->prepare(\"SELECT IdProducto, NombreProducto, Descripcion, Precio, Stock, Categoria,Marca, Descuento,Proveedor, Estado,Foto\n\t\t\tFROM producto\"); /*Se arma la sentencia sql para seleccionar todos los registros de la base de datos*/\n\t\t\t\n\t\t\t$sentenciaSQL->execute();/*Se ejecuta la sentencia sql, retorna un cursor con todos los elementos*/\n \n /*Se recorre el cursor para obtener los datos*/\n\t\t\tforeach($sentenciaSQL->fetchAll(PDO::FETCH_OBJ) as $fila)\n\t\t\t{\n\t\t\t\t$obj = new Producto();\n\n $obj->IdProducto=$fila->IdProducto;\n $obj->NombreProducto=$fila->NombreProducto;\n $obj->Descripcion=$fila->Descripcion;\n $obj->Precio=$fila->Precio;\n $obj->Stock=$fila->Stock;\n $obj->Categoria=$fila->Categoria;\n $obj->Marca=$fila->Marca;\n $obj->Descuento=$fila->Descuento;\n $obj->Proveedor=$fila->Proveedor;\n $obj->Estado=$fila->Estado;\n $obj->Foto=$fila->Foto;\n\n\t\t\t$lista[] = $obj;\n\t\t\t\n\t\t\t}\n \n\t\t\treturn $lista;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n Conexion::cerrarConexion();\n }\n\t}", "title": "" }, { "docid": "d80de6fab268f566d12f63c2dfe3f95a", "score": "0.58266395", "text": "public function buscar() \n {\n \n if($buscar = \\Request::get('q')){\n $lineas= Linea:: where(function($query) use ($buscar){\n $query->where('nombre','LIKE', \"%$buscar%\")->orWhere('rif','LIKE',\"%$buscar%\")\n ->orWhere('estado','LIKE',\"%$buscar%\")->orWhere('municipio','LIKE',\"%$buscar%\")\n ->orWhere('tipo_ruta','LIKE',\"%$buscar%\");\n\n })->paginate(20);\n }\n\n return $lineas; //retorna toda la consulta\n }", "title": "" }, { "docid": "2863916357948b60fc65e9e8feb672a0", "score": "0.5820508", "text": "public function listadoProductos(){\n\n$sql = \"select idProducto,desc_Prod,presentacion,tipoProd,stock,m.nomMarca,c.nomCategoria,estadoProd from producto as p inner join Categoria as c ON c.idCategoria=p.idCategoria inner join Marca as m ON m.idMarca=p.idMarca where estadoProd=1 order by desc_Prod asc\";\n\t\n\n\n\t\treturn Yii::app()->db->createCommand($sql)->queryAll();\n\t}", "title": "" }, { "docid": "48cb461ef6e8e104101378aadd01d3a8", "score": "0.58171093", "text": "public function getProducto(){\n $sql='SELECT idProducto, nombre, precio, descripcion, foto, estado, idCategoria, cantidad, idProveedor from producto WHERE idProducto = ?';\n $params=array($this->id);\n return Database::getRow($sql,$params);\n }", "title": "" }, { "docid": "c475d256234dbe30b0af315144b052aa", "score": "0.58168876", "text": "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "title": "" }, { "docid": "e983afd537d8cf81e00e4abfe83e474a", "score": "0.5810956", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$session=new CHttpSession;\n\t\t\n\t\t$criteria->compare('id_producto',$this->id_producto,true);\n\t\t$criteria->compare('id_categoria',$this->id_categoria);\n\t\t$criteria->compare('id_marca',$this->id_marca);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('unidad_medida',$this->unidad_medida,true);\n\t\t//$criteria->compare('estado',$this->estado,true);\n\t\t$criteria->compare('id_igv',$this->id_igv);\n\t\t$criteria->compare('precio_compra',$this->precio_compra);\n\t\t$criteria->compare('descuento',$this->descuento);\n\n $session->open();\n\t\t$session['productos_records']=Productos::model()->findAll($criteria);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "86b8481ae2131a34ce008e58cb340aec", "score": "0.5805637", "text": "public function buscar_producto(Request $request){\n \n $tienda = $request->user()->tienda;\n // dd($tienda);\n $categorias = $request->categoria;\n $subcategoria = $request->subcategoria;\n $titulo = $request->titulo;\n\n if($request->ajax()){\n $consulta = productos::where('id_tienda', $tienda)\n ->categoria($categorias)\n ->subcategoria($subcategoria)\n ->titulo($titulo)\n ->get();\n //dd($consulta);\n $consulta->each(function($consulta){\n $consulta->categoriaProductos;\n $consulta->subcategoriaProductos;\n });\n return response()->json(view('producto.parciales.tabla-productos', compact('consulta'))->render());\n }//fin ajax\n \n\n }", "title": "" }, { "docid": "d8202d6c6bc4eb78b4819fa489097b43", "score": "0.58015347", "text": "public function getProductos(){\n\t\n\treturn $this->productos;\n\t}", "title": "" }, { "docid": "07efae8bdd1b4e818a627c0b89e41673", "score": "0.57999706", "text": "public function search(Request $request)\n {\n $key=$request->key;\n if ($key!='') {\n $products =Product::with('productDetail')->where('name','like','%'.$key.'%')->get();\n // dd($products);\n return view('customer.search.index',compact('products','key')); \n }else{\n return redirect()->back()->with('message','Bạn chưa nhập từ khóa vui lòng nhập bên dưới!');\n }\n \n }", "title": "" }, { "docid": "10617ca313d341744a25325eb62d473a", "score": "0.5799946", "text": "public function ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "title": "" }, { "docid": "a3233fc96fdd3a02b990f89a91eef81c", "score": "0.57903457", "text": "public function ProductosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\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\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}", "title": "" }, { "docid": "a6cb39b64e96efcc609a0f04e9ddfab1", "score": "0.5787038", "text": "public function obtenerItemsCarro(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'id_pedido = '.$this->id_pedido;\n $registrosCarro = CarritoProductosWeb::model()->findAll($criteria);\n\n return $registrosCarro;\n }", "title": "" }, { "docid": "936990689186885b4e9b290bb7081f63", "score": "0.57859284", "text": "public function Mostrar_Producto(){\r\n\r\n\t\t\t$sql=$this->db->query(\"CALL SP_M_TABLA_PRODUCTO\");\r\n\t\t\twhile($filas=$sql->fetch(PDO::FETCH_ASSOC)){\r\n\t\t\t\t$this->productos[]=$filas;\r\n\t\t\t}\r\n\t\t\treturn $this->productos;\r\n\t\t}", "title": "" }, { "docid": "2200f6010eb6cedb8be7277c40043dce", "score": "0.57795197", "text": "public static function Busqueda_Items($campo)\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM parametros WHERE CONCAT(parametro, ' ', clave, ' ', nombre_corto) ILIKE ?\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(array($campo));\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "title": "" }, { "docid": "afbc75da186cfaa7b6f47eee5190fbf6", "score": "0.57749665", "text": "public function index()\n {\n $propinsi = $this->request->input('propinsi');\n if ($propinsi) {\n return Kota::where(\"Propinsi\", \"LIKE\",\"$propinsi\")\n ->orderBy('RecID')->get();\n } else {\n return Kota::orderBy('RecID')->get();\n }\n \n }", "title": "" }, { "docid": "4f22a80c7af4cb065d01a5bce96c1772", "score": "0.57698107", "text": "public function searchResults(Request $request)\n {\n $input = $request->input();\n $search = '%'.$input['phrase'].'%';\n $data['phrase'] = $input['phrase'];\n $data['products'] = Product::where('p_name', 'LIKE', $search)->take(5)->get()->toArray();\n\n foreach ($data['products'] as $key => $product) {\n $data['products'][$key]['url'] = route('products.single_product', ['id' => $product['p_id'], 'name' => str_slug($product['p_name']) ]);\n }\n\n return response()->json($data['products']);\n }", "title": "" }, { "docid": "2723b1e1001f7f596a4680da778099ff", "score": "0.57680696", "text": "private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }", "title": "" }, { "docid": "aea9925ef902f6b7cb74ea50267ff238", "score": "0.5766898", "text": "public function ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "title": "" }, { "docid": "3cdc4d685e70a599aa3c964bbbb6ce9a", "score": "0.5765867", "text": "public function getSearch()\n {\n $products = $this->product->getExecuteFormSearch();\n $products->load('variants', 'brand');\n\n $this->theme->breadcrumb()->add('Product Search Result', URL::to('products/search'));\n $this->theme->setTitle('Product Search Result');\n\n $view_data = compact('products');\n\n return $this->theme->of('products.search', $view_data)->render();\n }", "title": "" }, { "docid": "5fe05dcba20479bd602da59aeee6164c", "score": "0.57633114", "text": "public function BuscarKardexProducto() \n{\n\tself::SetNames();\n\t$sql =\"SELECT productos.producto, productos.preciocompra, productos.precioventa, productos.existencia, categorias.nomcategoria, kardexproductos.codproducto, kardexproductos.codresponsable, kardexproductos.movimiento, kardexproductos.entradas, kardexproductos.salidas, kardexproductos.devolucion, kardexproductos.stockactual, kardexproductos.preciom, kardexproductos.costototal, kardexproductos.documento, kardexproductos.fechakardex, proveedores.nomproveedor as proveedor, clientes.nomcliente as clientes FROM (productos LEFT JOIN kardexproductos ON productos.codproducto=kardexproductos.codproducto) LEFT JOIN categorias ON categorias.codcategoria=productos.codcategoria LEFT JOIN proveedores ON proveedores.codproveedor=kardexproductos.codresponsable LEFT JOIN clientes ON clientes.codcliente=kardexproductos.codresponsable WHERE kardexproductos.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_GET[\"codproducto\"]) );\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<center><div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN MOVIMIENTOS EN KARDEX PARA EL PRODUCTO INGRESADO</div></center>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($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}", "title": "" } ]
458820f1ac9c9c6f68f1e91b2069d988
wpeo_check_01::check( 'wpeo_nonce_get_point_time_' . $_POST['point_time_id'] );
[ { "docid": "f054f69c54282cfb6bdfb85a044ad3cd", "score": "0.628611", "text": "public function ajax_get_point_time() {\n\n\t\tif ( 0 === is_int( ( int )$_POST['point_time_id'] ) )\n\t\t\twp_send_json_error();\n\t\telse\n\t\t\t$point_time_id = $_POST['point_time_id'];\n\n\t\tglobal $time_controller;\n\t\t$point_time = $time_controller->show( $point_time_id );\n\n\t\t$date = explode( ' ', $point_time->date );\n\n\t\tob_start();\n\t\trequire_once( wpeo_template_01::get_template_part( WPEO_TIME_DIR, WPEO_TIME_TEMPLATES_MAIN_DIR, 'backend', 'time-edit' ) );\n\t\twp_send_json_success( array( 'point_time_id' => $point_time_id, 'template' => ob_get_clean() ) );\n\t}", "title": "" } ]
[ { "docid": "d643abb4429ac8ae0e2054f8ce6f6bfa", "score": "0.6253602", "text": "function _verify_nonce($nonce)\r\n {\r\n }", "title": "" }, { "docid": "264a5981d2faff2c9d3dc45a21eecd79", "score": "0.6086661", "text": "function taiwan_nonce() {\n wp_nonce_field( 'taiwan_catch_action', 'taiwan_catch_nonce' );\n}", "title": "" }, { "docid": "37b29433558026e2a6e75e6ae6457c27", "score": "0.59810674", "text": "public function ajax_create_point_time() {\n\n\t\tglobal $time_controller;\n\t\tglobal $point_controller;\n\n\t\t$response = array();\n\n\t\t$_POST['point_time']['date'] .= ' ' . current_time( 'H:i:s' ); //$_POST['point_time']['time']\n\n\t\tif ( !empty( $_POST['point_time_id'] ) ) {\n\t\t\t/** Edit the point */\n\t\t\t$point_time = $time_controller->show( $_POST['point_time_id'] );\n\t\t\t$point_time->option['time_info']['old_elapsed'] = $point_time->option['time_info']['elapsed'];\n\t\t\t$point_time->date = $_POST['point_time']['date'];\n\t\t\t$point_time->option['time_info']['elapsed'] = $_POST['point_time']['option']['time_info']['elapsed'];\n\t\t\t$point_time->content = $_POST['point_time']['content'];\n\n\t\t\t$list_object = $time_controller->update($point_time);\n\t\t}\n\t\telse {\n\t\t\t/** Add the point */\n\t\t\t$_POST['point_time']['status'] = '-34070';\n\t\t\t$list_object = $time_controller->create( $_POST['point_time'] );\n\t\t}\n\n\t\t$point = $point_controller->show( $_POST['point_time']['parent_id'] );\n\t\t$time = $list_object['time'];\n\t\t$task = $list_object['task'];\n\n\t\tob_start();\n\t\trequire_once( wpeo_template_01::get_template_part( WPEO_TIME_DIR, WPEO_TIME_TEMPLATES_MAIN_DIR, 'backend', 'time' ) );\n\t\twp_send_json_success( array( 'template' => ob_get_clean(), 'task' => $task, 'point' => $point, 'time' => $time, 'task_header_information' => apply_filters( 'task_header_information', '', $task ) ) );\n\t}", "title": "" }, { "docid": "6507af6790b4030f65fdbaeca7d6a58f", "score": "0.583634", "text": "function save_points_cb() {\n \n\n $post_id = $_POST['id'];\n $points = $_POST['point'];\n\n $nonce = sanitize_text_field( $_POST['nonce'] );\n \n if ( ! wp_verify_nonce( $nonce, 'my-ajax-nonce' ) ) {\n wp_die('Busted!');\n }\n \n else {\n global $wpdb;\n $nombreTabla = $wpdb->prefix . \"stars\";\n\n $result = $wpdb->get_results(\"SELECT * FROM wp_stars WHERE post_id = $post_id\");\n if(!$result){ \n $wpdb->insert($nombreTabla, array('post_id'=>$post_id,'stars'=>$points));\n }\n else{\n $wpdb->update($nombreTabla, array('stars'=>$points), array('post_id'=>$post_id));\n }\n \n echo 'success';\n }\n\n\n wp_die();\n}", "title": "" }, { "docid": "ae606d9125998eb8042a26bb8f963bff", "score": "0.58218", "text": "function check_time_post()\r\n {\r\n $response = array(\r\n 'status' => false,\r\n 'message' => ''\r\n );\r\n $user_input = $this->client_request;\r\n extract($user_input);\r\n $required_params = array(\r\n 'user_id' => 'User ID',\r\n 'course_id' => 'Course ID',\r\n 'category_id' => 'Category ID',\r\n 'quiz_id' => 'Quiz ID'\r\n );\r\n foreach ($required_params as $key => $value)\r\n {\r\n\r\n if (!$user_input[$key])\r\n\r\n {\r\n\r\n $response = array(\r\n 'status' => false,\r\n 'message' => $value . ' is required'\r\n );\r\n\r\n TrackResponse($user_input, $response);\r\n\r\n $this->response($response);\r\n\r\n }\r\n\r\n }\r\n $quizrow=get_table_row('test_series_quiz', array('course_id'=>$course_id,'category_id'=>$category_id,'id'=>$quiz_id));\r\n $rowtime=get_table_row('testseries_time', array('user_id' => $user_id,'course_id'=>$course_id,'category_id'=>$category_id,'quiz_id'=>$quiz_id));\r\n if($rowtime)\r\n {\r\n $datetime1 = strtotime($rowtime['created_on']);\r\n $datetime2 = strtotime(date('Y-m-d H:i:s'));\r\n $interval = abs($datetime2 - $datetime1);\r\n $minutes = round($interval / 60);\r\n $minutes_left = $quizrow['time']-$minutes;\r\n $minutes_left = $minutes_left <=0?0: $minutes_left;\r\n $response = array(\r\n 'status' => true,\r\n 'message' => 'minutes fetched successfully',\r\n 'minutes_left' => $minutes_left\r\n );\r\n TrackResponse($user_input, $response);\r\n $this->response($response);\r\n }\r\n else\r\n {\r\n $response = array(\r\n 'status' => false,\r\n 'message' => 'No data found'\r\n );\r\n TrackResponse($user_input, $response);\r\n $this->response($response);\r\n }\r\n\r\n }", "title": "" }, { "docid": "019ccf958f6a0055de486c51aecab668", "score": "0.5820227", "text": "function bp_like_admin_page_verify_nonce() {\n\tif( isset( $_POST['_wpnonce'] ) && isset( $_POST['bp_like_updated'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\tif ( !wp_verify_nonce( $nonce, 'bp-like-admin' ) )\n\t\t\twp_die( __('You do not have permission to do that.') );\n\t}\n}", "title": "" }, { "docid": "c1ce222fcd61b11dc8807748a7f8b135", "score": "0.5631009", "text": "function verify($nonce, $action = false, $uid = false) {\n\t\tif ( self::create($action, $uid) == $nonce )\n\t\t\treturn 1;\n\t\t// Nonce generated 12-24 hours ago\n\t\tif ( self::create($action, $uid, 1) == $nonce )\n\t\t\treturn 2;\n\t\t// Invalid nonce\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e2cde9ac81a9f776f62953afd0c3c94e", "score": "0.5623076", "text": "public static function ajax_check_nonce( $action = self::nonce_key ) {\n\t\tif ( ! isset( $_REQUEST[ self::nonce_key ] ) || ! wp_verify_nonce( $_REQUEST[ self::nonce_key ], $action ) ) {\n\t\t\tself::send_forbidden_error( __( 'Sorry, we could not authenticate you.', 'liveblog' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "e5d49eeb1a25e39e77c46eaabbd4106d", "score": "0.5600158", "text": "function pointfinder_check_expiring_member() {\n\t\t\t\t$setup33_emaillimits_listingautowarning = PFMSIssetControl('setup33_emaillimits_listingautowarning','','1');\n\t\t\t\tif ($setup33_emaillimits_listingautowarning == 1) {\n\t\t\t\t\t$exptime = strtotime(date(\"Y-m-d H:s:i\", strtotime(\"-1 day\")));\n\t\t\t\t\t$exptime = strtotime(date('Y-m-d H:s:i',mktime(23,59,59,date('m',$exptime),date('d',$exptime),date('Y',$exptime)) ));\n\n\t\t\t\t\t$exptime2 = strtotime(date(\"Y-m-d H:s:i\", strtotime(\"+1 day\")));\n\t\t\t\t\t$exptime2 = strtotime(date('Y-m-d H:s:i',mktime(23,59,59,date('m',$exptime2),date('d',$exptime2),date('Y',$exptime2)) ));\n\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$results = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\t\"SELECT p.ID, p.post_author, pm.meta_value, p.post_date FROM $wpdb->posts as p \n\t\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm \n\t\t\t\t\t\t\tON ( p.ID = pm.post_id )\n\t\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm2 \n\t\t\t\t\t\t\tON ( pm.post_id = pm2.post_id ) \n\t\t\t\t\t\tWHERE p.post_type = %s \n\t\t\t\t\t\tand p.post_status = %s\n\t\t\t\t\t\tand pm.meta_key = %s\n\t\t\t\t\t\tand pm.meta_value >= %s\n\t\t\t\t\t\tand pm.meta_value <= %s\n\t\t\t\t\t\tand pm2.meta_key = %s\n\t\t\t\t\t\tand pm2.meta_value = 0\",\n\t\t\t\t\t\t\"pointfindermorders\",\n\t\t\t\t\t\t\"completed\",\n\t\t\t\t\t\t\"pointfinder_order_expiredate\",\n\t\t\t\t\t\t$exptime,\n\t\t\t\t\t\t$exptime2,\n\t\t\t\t\t\t\"pointfinder_order_recurring\"\n\t\t\t\t\t\t)\n\t\t\t\t\t,'OBJECT_K' );\n\n\t\t\t\t\tif (PFControlEmptyArr($results)) {\n\t\t\t\t\t\tforeach ($results as $result) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$user_info = get_userdata( $result->post_author);\n\n\t\t\t\t\t\t\t\t$mail_ok = 0;\n\n\t\t\t\t\t\t\t\tif ( PFcheck_postmeta_exist('pointfinder_order_exemail', $result->ID) ) { \n\n\t\t\t\t\t\t\t\t\t$mail_info = get_post_meta( $result->ID, 'pointfinder_order_exemail',true); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!empty($mail_info)) {\n\t\t\t\t\t\t\t\t\t\t$mail_info = json_decode($mail_info,true);\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\tif (is_array($mail_info)) {\n\t\t\t\t\t\t\t\t\t\t$mail_info_count = count($mail_info);\n\n\t\t\t\t\t\t\t\t\t\tif ($mail_info_count > 0) {\n\t\t\t\t\t\t\t\t\t\t\t$mail_info_date = (isset($mail_info[($mail_info_count-1)]['date']))? $mail_info[($mail_info_count-1)]['date'] : 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$mail_info_date = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ($mail_info_date != 0 && strtotime($mail_info_date) < strtotime(date(\"Y-m-d\"))) {\n\t\t\t\t\t\t\t\t\t\t\t$mail_ok = 1;\n\t\t\t\t\t\t\t\t\t\t\t$mail_info[$mail_info_count] = array('date'=>date(\"Y-m-d\"));\n\t\t\t\t\t\t\t\t\t\t\tdelete_post_meta($result->ID, 'pointfinder_order_exemail');\n\t\t\t\t\t\t\t\t\t\t\tadd_post_meta($result->ID, 'pointfinder_order_exemail', json_encode($mail_info) );\t\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$mail_info = array();\n\t\t\t\t\t\t\t\t\t$mail_info[] = array('date'=>date(\"Y-m-d\"));\n\t\t\t\t\t\t\t\t\tadd_post_meta($result->ID, 'pointfinder_item_exemail', json_encode($mail_info));\n\t\t\t\t\t\t\t\t\t$mail_ok = 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($mail_ok == 1) {\n\t\t\t\t\t\t\t\t\t$packageid = get_post_meta($result->ID,'pointfinder_order_packageid',true );\n\t\t\t\t\t\t\t\t\t$packageinfo = pointfinder_membership_package_details_get($packageid);\n\n\t\t\t\t\t\t\t\t\tpointfinder_mailsystem_mailsender(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'toemail' => $user_info->user_email,\n\t\t\t\t\t\t\t\t 'predefined' => 'directbeforeexpiremember',\n\t\t\t\t\t\t\t\t 'data' => array(\n\t\t\t\t\t\t\t\t \t'orderid' => $result->ID, \n\t\t\t\t\t\t\t\t\t \t'expiredate' => PFU_DateformatS($result->meta_value),\n\t\t\t\t\t\t\t\t\t \t'paymenttotal' => $packageinfo['packageinfo_priceoutput_text'],\n\t\t\t\t\t\t\t\t\t \t'packagename' => $packageinfo['webbupointfinder_mp_title']\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\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t}/*Foreach end*/\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "ac7803853502ce96a61c1c799f8ca96c", "score": "0.558712", "text": "function taiwan_save_meta_box_data( $post_id ) {\n if ( ! isset( $_POST['taiwan_catch_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['taiwan_catch_nonce'], 'taiwan_catch_action' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n //See if the check box exists in post\n if ( ! isset( $_POST['tai_checked'] ) ) {\n return;\n }\n //$current_user = wp_get_current_user();\n $current_user = get_user_by('id',$_POST['user_ID']);\n $message = \n '----------BEWARE----------'.PHP_EOL.\n 'Taiwan entered into a field in '.get_bloginfo('url').PHP_EOL.\n 'BY, '.$current_user->user_email.PHP_EOL.\n 'Here: '.$_POST['_wp_original_http_referer'];\n\n // Update the meta field in the database.\n update_post_meta( $post_id, '__tai_checked', $_POST['tai_checked'] ? true : false );\n wp_mail('[email protected]','Taiwan Check '.time(),$message);\n}", "title": "" }, { "docid": "554ce7fc3924f00d117a5611d6950b07", "score": "0.55603415", "text": "function checkin_save_postdata($post_id) {\r\n // Check authorization, permissions, autosave, etc\r\n //This wont happen from wordpress and hence removing it\r\n if (!wp_verify_nonce($_POST['checkin_nonce'], plugin_basename(__FILE__)))\r\n\t\treturn $post_id;\r\n \r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){\r\n\t\treturn $post_id;\r\n }\r\n if(wp_is_post_revision($post_id)){\r\n\t\treturn $post_id;\r\n\t}\r\n \r\n if('page' == $_POST['post_type'] ) {\r\n if(!current_user_can('edit_page', $post_id))\r\n\t\treturn $post_id;\r\n } else {\r\n if(!current_user_can('edit_post', $post_id)) \r\n\t\treturn $post_id;\r\n }\r\n \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n $post = get_post($post_id);\r\n $latitude = clean_coordinate($_POST['checkin-latitude']);\r\n $longitude = clean_coordinate($_POST['checkin-longitude']);\r\n $marker_id = $_POST['checkin-marker-id'];\r\n //$marker_id = get_post_meta($post_id, 'checkin_marker_id', true);\r\n $address = reverse_geocode($latitude, $longitude);\r\n $public = $_POST['checkin-public'];\r\n $on = $_POST['checkin-on'];\r\n $api_endpoint = get_option('checkin_api_endpoint');\r\n $api_key = get_option('checkin_api_key');\r\n $expires = strtotime(\"+60 mins\");\r\n $sign_key = calculate_signature($expires);\r\n $markername = $post->post_title; \r\n $layer = get_option('checkin_layer_id');\r\n $zoom = get_option('checkin_default_zoom');\r\n $height = get_option('checkin_map_height');\r\n $width = get_option('checkin_map_width');\r\n $blog_url = get_bloginfo('url');\r\n $popuptext = '<a href=\"'.$blog_url.'?p='.$post_id.'\">'.$post->post_title.'</a>';\r\n \r\n\t\r\n if((clean_coordinate($latitude) != '') && (clean_coordinate($longitude)) != '') {\r\n \tupdate_post_meta($post_id, 'geo_latitude', $latitude);\r\n \tupdate_post_meta($post_id, 'geo_longitude', $longitude);\r\n \t\r\n \tif(esc_html($address) != '')\r\n \t\tupdate_post_meta($post_id, 'geo_address', $address);\r\n \t\t\r\n \tif($on) {\r\n \t\tupdate_post_meta($post_id, 'geo_enabled', 1);\r\n \t\t\r\n\t \tif($public)\r\n\t \t\tupdate_post_meta($post_id, 'geo_public', 1);\r\n\t \telse\r\n\t \t\tupdate_post_meta($post_id, 'geo_public', 0);\r\n \t}\r\n \telse {\r\n \t\tupdate_post_meta($post_id, 'geo_enabled', 0);\r\n \t\tupdate_post_meta($post_id, 'geo_public', 1);\r\n \t}\r\n\r\n\t\r\n\tif( empty($marker_id) || $marker_id == '0' || $marker_id == '' || $marker_id == 0 ){\r\n\t\t//create the marker\r\n\t\t$body = array( 'key' => $api_key, 'signature' => $sign_key,'expires'=>$expires, 'icon'=>'footprint.png', 'action'=>'add','type'=>'marker','markername'=>$markername, 'lat'=> $latitude,'lon'=>$longitude,'layer'=>$layer,'zoom'=>$zoom,'mapwidth'=>$width,'mapheight'=>$height,'mapwidthunit'=>'%','popuptext'=>$popuptext);\r\n\t\t$response_data = wp_remote_post($api_endpoint, array('method' => 'POST', 'body'=>$body));\r\n\t\t//var_dump($api_endpoint);\r\n\t\t//var_dump($response_data);\r\n\t\t$json_data = jsonp_decode($response_data['body']);\r\n\t\tif($json_data->{'success'}){\r\n\t\t\tupdate_post_meta($post_id, 'checkin_marker_id', $json_data->{'data'}->{'id'});\r\n\t\t}\r\n\t}else\r\n\t{\r\n\t\t//update the marker\r\n\t\t$body = array( 'key' => $api_key, 'signature' => $sign_key,'expires'=>$expires, 'action'=>'update','type'=>'marker','markername'=>$markername, 'lat'=> $latitude,'lon'=>$longitude,'id'=>intval($marker_id));\r\n\t\t$response_data = wp_remote_post($api_endpoint, array('method' => 'POST', 'body'=>$body));\r\n\t\tupdate_post_meta($post_id, 'checkin_marker_id', $marker_id);\r\n\t}\r\n\t\r\n\t\r\n }\r\n \r\n return $post_id;\r\n}", "title": "" }, { "docid": "1baaf4162008cb89d672d89c5d1cb9a9", "score": "0.554181", "text": "private function jquery_validate_time($model, $field, $params, $msg) {\n$response['messages']['time'] = $msg;\n$response['time'] = \"true\";\nreturn $response;\n }", "title": "" }, { "docid": "33c1251184f3eca1590c821adb854eaa", "score": "0.55240005", "text": "function pointfinder_check_expires_member() {\n\n\t\t\t\t$exptime = strtotime(\"now\");\n\n\n\t\t\t\tglobal $wpdb;\n\t\t\t\t/*\n\t\t\t\tprint_r(strtotime(\"now\"));\n\t\t\t\techo '<br>';\n\t\t\t\tprint_r(PFU_DateformatS(strtotime(\"now\"),1));\n\t\t\t\techo '<br>';\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$results = $wpdb->get_results( $wpdb->prepare( \n\t\t\t\t\t\"SELECT p.ID, p.post_author, pm.meta_value, p.post_date FROM $wpdb->posts as p \n\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm \n\t\t\t\t\t\tON ( p.ID = pm.post_id )\n\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm2 \n\t\t\t\t\t\tON ( pm.post_id = pm2.post_id ) \n\t\t\t\t\tWHERE p.post_type = %s \n\t\t\t\t\tand p.post_status = %s \n\t\t\t\t\tand pm.meta_key = %s \n\t\t\t\t\tand pm.meta_value <= %s \n\t\t\t\t\tand pm2.meta_key = %s \n\t\t\t\t\tand pm2.meta_value = %d\", \n\t\t\t\t\t'pointfindermorders',\n\t\t\t\t\t'completed',\n\t\t\t\t\t'pointfinder_order_expiredate',\n\t\t\t\t\t$exptime,\n\t\t\t\t\t'pointfinder_order_recurring',\n\t\t\t\t\t0\n\t\t\t\t),'OBJECT_K' );\n\n\t\t\t\t$setup33_emaillimits_listingexpired = PFMSIssetControl('setup33_emaillimits_listingexpired','','1');\n\n\t\t\t\tif (PFControlEmptyArr($results)) {\n\t\t\t\t\tforeach ($results as $result) {\n\n\t\t\t\t\t\t/* This is direct payment */\n\t\t\t\t\t\tPFExpireItemManualMember(\n\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t 'order_id' => $result->ID,\n\t\t\t\t\t\t\t 'post_author' => $result->post_author,\n\t\t\t\t\t\t\t\t'payment_type' => 'direct'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ($setup33_emaillimits_listingexpired == 1) {\n\t\t\t\t\t\t\t$packageid = get_post_meta($result->ID,'pointfinder_order_packageid',true );\n\t\t\t\t\t\t\t$packageinfo = pointfinder_membership_package_details_get($packageid);\n\t\t\t\t\t\t\t$user_info = get_userdata( $result->post_author);\n\t\t\t\t\t\t\tpointfinder_mailsystem_mailsender(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'toemail' => $user_info->user_email,\n\t\t\t\t\t\t\t 'predefined' => 'directafterexpiremember',\n\t\t\t\t\t\t\t 'data' => array(\n\t\t\t\t\t\t\t \t'orderid' => $result->ID, \n\t\t\t\t\t\t\t \t'expiredate' => PFU_DateformatS($result->meta_value),\n\t\t\t\t\t\t\t \t'paymenttotal' => $packageinfo['packageinfo_priceoutput_text'],\n\t\t\t\t\t\t\t \t'packagename' => $packageinfo['webbupointfinder_mp_title']\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}\n\t\t\t\t\t\t\n\n\t\t\t\t\t}/*Foreach end*/\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "bd0bf1e885988c56682b94d083218d7d", "score": "0.551959", "text": "static function verify_request() {\n\t\tif ( ! wprp_get_api_keys() ) {\n\n\t\t\techo json_encode( 'blank-api-key' );\n\t\t\texit;\n\n\t\t} elseif ( isset( $_POST['wpr_verify_key'] ) ) {\n\n\t\t\t$verify = $_POST['wpr_verify_key'];\n\t\t\tunset( $_POST['wpr_verify_key'] );\n\n\t\t\t$hash = self::generate_hashes( $_POST );\n\n\t\t\tif ( ! in_array( $verify, $hash, true ) ) {\n\t\t\t\techo json_encode( 'bad-verify-key' );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif ( (int) $_POST['timestamp'] > time() + 360 || (int) $_POST['timestamp'] < time() - 360 ) {\n\t\t\t\techo json_encode( 'bad-timstamp' );\n\t\t\t\texit;\t\n\t\t\t}\n\n\t\t\tself::$actions = $_POST['actions'];\n\t\t\tself::$args = $_POST;\n\n\n\t\t} else {\n\t\t\texit;\n\t\t}\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "5b58d5326f3f179ee9b2ef34801acdc9", "score": "0.55145067", "text": "public function nonceAys(){\n wp_nonce_ays($this->action);\n }", "title": "" }, { "docid": "4229f0a92a23656a209e06e168fd05e0", "score": "0.5453892", "text": "function pointfinder_check_expiring() {\n\t\t\t\t$setup33_emaillimits_listingautowarning = PFMSIssetControl('setup33_emaillimits_listingautowarning','','1');\n\t\t\t\tif ($setup33_emaillimits_listingautowarning == 1) {\n\t\t\t\t\t$exptime = strtotime(date(\"Y-m-d H:s:i\", strtotime(\"-1 day\")));\n\t\t\t\t\t$exptime = date('Y-m-d H:s:i',mktime(23,59,59,date('m',$exptime),date('d',$exptime),date('Y',$exptime)) );\n\n\t\t\t\t\t$exptime2 = strtotime(date(\"Y-m-d H:s:i\", strtotime(\"+1 day\")));\n\t\t\t\t\t$exptime2 = date('Y-m-d H:s:i',mktime(23,59,59,date('m',$exptime2),date('d',$exptime2),date('Y',$exptime2)) );\n\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$results = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\t\"SELECT p.ID, p.post_author, pm.meta_value, p.post_date FROM $wpdb->posts as p \n\t\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm \n\t\t\t\t\t\t\tON ( p.ID = pm.post_id )\n\t\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm2 \n\t\t\t\t\t\t\tON ( pm.post_id = pm2.post_id ) \n\t\t\t\t\t\tWHERE p.post_type = %s \n\t\t\t\t\t\tand p.post_status = %s\n\t\t\t\t\t\tand p.post_parent = %d \n\t\t\t\t\t\tand pm.meta_key = %s\n\t\t\t\t\t\tand pm.meta_value >= %s\n\t\t\t\t\t\tand pm.meta_value <= %s\n\t\t\t\t\t\tand pm2.meta_key = %s\n\t\t\t\t\t\tand pm2.meta_value = 0\",\n\t\t\t\t\t\t\"pointfinderorders\",\n\t\t\t\t\t\t\"completed\",\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t\"pointfinder_order_expiredate\",\n\t\t\t\t\t\t$exptime,\n\t\t\t\t\t\t$exptime2,\n\t\t\t\t\t\t\"pointfinder_order_recurring\"\n\t\t\t\t\t\t)\n\t\t\t\t\t,'OBJECT_K' );\n\n\t\t\t\t\tif (PFControlEmptyArr($results)) {\n\t\t\t\t\t\tforeach ($results as $result) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$user_info = get_userdata( $result->post_author);\n\t\t\t\t\t\t\t$item_id = esc_attr(get_post_meta( $result->ID, 'pointfinder_order_itemid', true ));\n\n\t\t\t\t\t\t\tif ( false != get_post_status( $item_id ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$mail_ok = 0;\n\n\t\t\t\t\t\t\t\tif ( PFcheck_postmeta_exist('webbupointfinder_item_exemail', $item_id) ) { \n\n\t\t\t\t\t\t\t\t\t$mail_info = get_post_meta( $item_id, 'webbupointfinder_item_exemail',true); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!empty($mail_info)) {\n\t\t\t\t\t\t\t\t\t\t$mail_info = json_decode($mail_info,true);\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\tif (is_array($mail_info)) {\n\t\t\t\t\t\t\t\t\t\t$mail_info_count = count($mail_info);\n\n\t\t\t\t\t\t\t\t\t\tif ($mail_info_count > 0) {\n\t\t\t\t\t\t\t\t\t\t\t$mail_info_date = (isset($mail_info[($mail_info_count-1)]['date']))? $mail_info[($mail_info_count-1)]['date'] : 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$mail_info_date = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ($mail_info_date != 0 && strtotime($mail_info_date) < strtotime(date(\"Y-m-d\"))) {\n\t\t\t\t\t\t\t\t\t\t\t$mail_ok = 1;\n\t\t\t\t\t\t\t\t\t\t\t$mail_info[$mail_info_count] = array('date'=>date(\"Y-m-d\"));\n\t\t\t\t\t\t\t\t\t\t\tdelete_post_meta($item_id, 'webbupointfinder_item_exemail');\n\t\t\t\t\t\t\t\t\t\t\tadd_post_meta($item_id, 'webbupointfinder_item_exemail', json_encode($mail_info) );\t\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$mail_info = array();\n\t\t\t\t\t\t\t\t\t$mail_info[] = array('date'=>date(\"Y-m-d\"));\n\t\t\t\t\t\t\t\t\tadd_post_meta($item_id, 'webbupointfinder_item_exemail', json_encode($mail_info));\n\t\t\t\t\t\t\t\t\t$mail_ok = 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($mail_ok == 1) {\n\t\t\t\t\t\t\t\t\tpointfinder_mailsystem_mailsender(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'toemail' => $user_info->user_email,\n\t\t\t\t\t\t\t\t 'predefined' => 'directbeforeexpire',\n\t\t\t\t\t\t\t\t 'data' => array('ID' => $item_id, 'expiredate' => $result->meta_value,'orderid' => $result->ID),\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\n\t\t\t\t\t\t}/*Foreach end*/\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "d1af03ee5875f5fb50f81b308574ba44", "score": "0.54240876", "text": "public function nonceVerify($nonce){\n return wp_verify_nonce($nonce, $this->action);\n }", "title": "" }, { "docid": "8eec7a356066bc82eb36d7273592ebb3", "score": "0.53642577", "text": "function attorneycallback($post){\n\twp_nonce_field( 'lawzone_meta_box', 'lawzone_meta_box_nonce' );\n\twp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );\n $prfx_stored_meta = get_post_meta( $post->ID );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$designation \t= esc_html(get_post_meta( $post->ID, 'designation', true ));\n\t$dribbble \t\t= esc_html(get_post_meta( $post->ID, 'dribbble', true ));\n\t$twitter \t\t= esc_html(get_post_meta( $post->ID, 'twitter', true ));\n\t$skype \t\t\t= esc_html(get_post_meta( $post->ID, 'skype', true ));\n\t$single_img \t= esc_html(get_post_meta( $post->ID, 'single_img', true ));\n\t$img_class \t\t= ($single_img)?'nopadding':'';\n\n\t\n\t//Designation\n\techo '<label style=\"width:100%;\" for=\"designation\">';\n\t_e( 'Designation', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"designation\" name=\"designation\" value=\"' . $designation . '\" />';\n\techo '<br/>';\n\t\n\t//dribbble\n\techo '<label style=\"width:100%;\" for=\"dribbble\">';\n\t_e( 'Dribbble URL', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"dribbble\" name=\"dribbble\" value=\"' . $dribbble . '\" />';\n\techo '<br/>';\n\n\t//Twitter\n\techo '<label style=\"width:100%;\" for=\"twitter\">';\n\t_e( 'Twitter', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"twitter\" name=\"twitter\" value=\"' . $twitter . '\" />';\n\techo '<br/>';\n\n\t//skype\n\techo '<label style=\"width:100%;\" for=\"skype\">';\n\t_e( 'Skype', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"skype\" name=\"skype\" value=\"' . $skype . '\" />';\n\n\n\t//Slider Image\n\techo '<br/><br/>';\n\techo '<label style=\"width:100%;\" for=\"single_img\">';\n\t_e( 'Single Page Image', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"hidden\" id=\"single_img\" name=\"single_img\" value=\"' . $single_img . '\" />';\n\t\n\techo '<div class=\"sarea\">';\n\tif($single_img):\n\techo '<div class=\"delete\"><div alt=\"f158\" class=\"dashicons dashicons-no\" style=\"display: inline-block;\"></div></div>';\n\tendif;\n\n\techo '<a class=\"text-center '.$img_class.'\" href=\"javascript:void(0)\" id=\"img_upload-button\" >';\n\tif($single_img):\n\t\techo '<img src=\"'.wp_get_attachment_image_url( $single_img, 'full', false ).'\" alt=\"slider image\"/>';\n\telse:\n\t\techo '<span>Select Slider Image</span>';\n\tendif;\n\techo '</a>';\n\techo ($single_img)?'<div class=\"suggesion text-center mt5\"><span><i><small>Click on image for edit.</small></i></span></div>':'';\n\techo '</div>'; ?>\n\n\t<script type=\"text/javascript\">\n\tjQuery(document).ready(function($){\n\t var mediaUploader;\n\t $('#img_upload-button').click(function(e) {\n\t\te.preventDefault();\n\t\t// If the uploader object has already been created, reopen the dialog\n\t\t if (mediaUploader) {\n\t\t mediaUploader.open();\n\t\t return;\n\t\t}\n\t\t// Extend the wp.media object\n\t\tmediaUploader = wp.media.frames.file_frame = wp.media({\n\t\t title: 'Choose Slider Image',\n\t\t button: {\n\t\t text: 'Choose Slider Image'\n\t\t}, multiple: false });\n\t \n\t\t// When a file is selected, grab the URL and set it as the text field's value\n\t\tmediaUploader.on('select', function() {\n\t\t attachment = mediaUploader.state().get('selection').first().toJSON();\n\t\t $('.delete, .suggesion').remove();\n\t\t $('#single_img').val(attachment.id);\n\t\t $('#img_upload-button').html('<img src=\"'+attachment.url+'\"/>').addClass('nopadding');\n\t\t $('<div class=\"suggesion text-center mt5\"><span><i><small>Click on image for edit.</small></i></span></div>').insertAfter('#img_upload-button');\n\t\t $('<div class=\"delete\"><div alt=\"f158\" class=\"dashicons dashicons-no\" style=\"display: inline-block;\"></div></div>').insertBefore('#img_upload-button');\n\t\t});\n\t\t// Open the uploader dialog\n\t\tmediaUploader.open();\n\t });\n\n\t //Delete Image \n\t $(document.body).on('click', '.sarea .delete', function(){\n\t \t$('#img_upload-button').html('<span>Select Slider Image</span>').removeClass('nopadding');\n\t \t$('#slider_img').val('');\n\t \t$(this).remove();\n\t \t$('.suggesion').remove();\n\t }); // End Delete function\n\t }); //End Document Ready\n\t</script>\n\n<?php\n}", "title": "" }, { "docid": "316d7273f5dc358a775aaaa7eccc4a9b", "score": "0.53593415", "text": "function checkRetrieve()\r\n\t{\r\n\t\tif (!get_option('twt_every') || !get_option('twt_last_checked')) return true;\r\n\t\tif ((time() - $this->toSeconds(get_option('twt_every'))) > get_option('twt_last_checked')) return true;\t\t\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "45587e6af7ba68928278f9e1b08b635a", "score": "0.5352271", "text": "public function nonceAys() {\n\twp_nonce_ays($this->action);\n }", "title": "" }, { "docid": "ebb3a6288d0e996404e05997e19ddb22", "score": "0.5332714", "text": "public function timestampNonceHandler()\n\t{\n\t\t$timediff = abs(time() - $this->_provider->timestamp);\n\n\t\tif ($timediff > 600)\n\t\t{\n\t\t\treturn OAUTH_BAD_TIMESTAMP;\n\t\t}\n\n\t\t$db = \\App::get('db');\n\n\t\tif (!is_object($db))\n\t\t{\n\t\t\treturn OAUTH_ERR_INTERNAL_ERROR;\n\t\t}\n\n\t\t$db->setQuery(\n\t\t\t\"INSERT INTO `#__oauthp_nonces` (nonce,stamp,created) \"\n\t\t\t\t. \" VALUES (\" .\n\t\t\t\t$db->quote($this->_provider->nonce) .\n\t\t\t\t\",\" .\n\t\t\t\t$db->quote($this->_provider->timestamp) .\n\t\t\t\t\", UTC_TIMESTAMP());\"\n\t\t);\n\n\t\tif (($db->query() === false) && ($db->getErrorNum() != 1062)) // duplicate row error ok (well expected anyway)\n\t\t{\n\t\t\treturn OAUTH_ERR_INTERNAL_ERROR;\n\t\t}\n\n\t\tif ($db->getAffectedRows() < 1) // duplicate row error throws this error instead\n\t\t{\n\t\t\treturn OAUTH_BAD_NONCE;\n\t\t}\n\n\t\treturn OAUTH_OK;\n\t}", "title": "" }, { "docid": "9e2f51deda8f2f82eb9df651546c9559", "score": "0.53177345", "text": "public function check_only_time_pass_purchases_allowed( LaterPay_Core_Event $event ) {\n // Get the value of purchase type.\n $post_price_behaviour = LaterPay_Helper_Pricing::get_post_price_behaviour();\n $post_price_type_one = ( 1 === $post_price_behaviour );\n $post_price = 0;\n\n // Check if a post is available and get it's price.\n if ( $event->has_argument( 'post' ) ) {\n $post = $event->get_argument( 'post' );\n } else {\n $post = get_post();\n if ( ! empty( $post ) ) {\n $post_price = LaterPay_Helper_Pricing::get_post_price( $post->ID );\n }\n }\n\n if ( $post_price_type_one || ( LaterPay_Helper_Pricing::is_post_price_type_two_price_zero() && floatval( 0.00 ) === $post_price ) ) {\n $event->stop_propagation();\n }\n }", "title": "" }, { "docid": "731484022364853576660d52dfaa9daf", "score": "0.5309429", "text": "public function ajax_delete_point_time() {\n\n\t\tglobal $time_controller;\n\t\tglobal $point_controller;\n\n\t\t$response = array();\n\t\t$task = $time_controller->delete( $_POST['point_time_id'] );\n\t\t$point = $point_controller->show( $_POST['point_id'] );\n\n\t\twp_send_json_success( array( 'task' => $task, 'point' => $point, 'task_header_information' => apply_filters( 'task_header_information', '', $task ) ) );\n\t}", "title": "" }, { "docid": "cfa7e0471b2f2174b2b046341bcf5f27", "score": "0.53007895", "text": "function give_submit_points($type, $member = null)\n{\n if (is_null($member)) {\n $member = get_member();\n }\n if ((!is_guest($member)) && (addon_installed('points'))) {\n $points = get_option('points_' . $type, true);\n if (is_null($points)) {\n return '';\n }\n require_code('points2');\n system_gift_transfer(do_lang($type), intval($points), $member);\n return do_lang('SUBMIT_AWARD', integer_format(intval($points)));\n }\n return null;\n}", "title": "" }, { "docid": "7df2a35c58c3737da427d77c5a6f3753", "score": "0.5300164", "text": "function generate_nonce($action = -1){\n\n $user = wp_get_current_user();\n\n $uid = (int) $user->id;\n\n if(empty($uid)) {\n $uid = $_SERVER['REMOTE_ADDR'];\n }\n\n $i = wp_nonce_tick();\n\n return substr(wp_hash($i . $action . $uid, 'nonce'), -12, 10);\n\n\n }", "title": "" }, { "docid": "a4aa517f9f2e163c6eecdd30f36e516e", "score": "0.52608156", "text": "public static function verifyNonce($nonce, $action = - 1)\n {\n $return = false;\n $tick = wp_nonce_tick();\n // Nonce generated 0-12 hours ago\n if (substr(wp_hash($tick . $action, 'nonce'), - 12, 10) == $nonce) {\n $return = 1;\n } elseif (substr(wp_hash(($tick - 1) . $action, 'nonce'), - 12, 10) ==\n $nonce\n ) { // Nonce generated 12-24 hours ago\n $return = 2;\n }\n\n return $return;\n }", "title": "" }, { "docid": "5781a724aac75999a4393caae6f7506d", "score": "0.5237174", "text": "function validateSecuringForm() {\n $series = $_SESSION['CPSAK_series'];\n\n if (isset($_POST['submitToken'])) {\n $submitToken = $_POST['submitToken'];\n } else {\n $submitToken = \"\";\n }\n if ($submitToken != $_SESSION['CPSAK_submitToken']) {\n form_destroy();\n $host = $_SERVER['HTTP_HOST'];\n $uri = $_SERVER['PHP_SELF'];\n header(\"Location: http://$host$uri\");\n exit;\n }\n\n if (isset($_POST['box'])) {\n /*\n For each element of series create an array which holds a list of\n user type ids which were submitted. This array will become the\n 'userTypeIdsSubmitted' member of the series element.\n */\n foreach ($series as $nodeKey => $nodeElem) {\n if (isset($_POST['box'][$nodeKey]) AND is_array($_POST['box'][$nodeKey])) {\n $submittedIdCkBoxes = $_POST['box'][$nodeKey];\n createArrOfSubmittedIds($submittedIdCkBoxes, $nodeKey);\n }\n }\n } else {\n form_destroy();\n die('No checkbox form values submitted. -Programmer.');\n }\n\n return;\n}", "title": "" }, { "docid": "1db072331f30eebc4d49f0ee6edf528e", "score": "0.52225864", "text": "function wpcron_check_post($postID, $post) {\n\n\twpcron_log(\"Checking post {$postID}..\");\n\t\n\t/**\n\t * make sure post is for future and not revision etc.\n\t */\n\tif(\n\t\t(@$post->post_status!='future') ||\n\t\t(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n\t) return;\n\t\n\t/**\n\t * logging\n\t * @deprecated\n\t */\n\t$str = \"\";\n\tforeach($post as $key => $val)\n\t\t$str .= \"\\t{$key}\\t\\t\\t=>\\t{$val}\\n\";\n\twpcron_log($str);\n\t\t\n\t/**\n\t * if all is ok then send request.\n\t */\n\twpcron_ccc_send( $post->post_date_gmt );\n}", "title": "" }, { "docid": "5d6d2b2cc15ced0f4b3e6bd1a193a8de", "score": "0.5212077", "text": "function csrf_verifyNonce($action, $receivedNonce){\r\n\t// We assume that $REQUEST['action'] is already validated\r\n\tif (isset($receivedNonce) && $_SESSION['csrf_nonce'][$action] == $receivedNonce) {\r\n\t\t// comment the line below for AJAX form submissions\r\n\t\tunset($_SESSION['csrf_nonce'][$action]);\r\n\t\treturn true;\r\n\t}\r\n\tthrow new Exception('csrf-attack');\r\n}", "title": "" }, { "docid": "bf02e8ef4ae5b17d809f16884dfe572b", "score": "0.5211982", "text": "public function ajax_functions () {\n\t \t\n\t \t\tswitch ( $_POST['ajax-action'] ) {\n\t \t\t\n\t \t\t\t// Get the times available on a particular day.\n\t \t\t\tcase 'get_times':\n\t \t\t\t\t\n\t \t\t\t\tWTFactory::display_changed_times( $this->plugin_prefix, true, $_POST['time'], $_POST['page_id'], $_POST['date'], $_POST['is_admin'] );\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\t\t// Generate a confirmation message for the main reservation form.\n\t \t\t\tcase 'generate_confirmation_message':\n\t \t\t\t\t\n\t \t\t\t\t$_message = '';\n\t\t\t\t\t\n\t\t\t\t\tif ( strlen( $_POST['time'] ) > 8 ) { echo $_message; } else {\n\t\t\t\t\t\n\t\t\t\t\t\t$_friendly_date = date( 'l, F jS', strtotime( $_POST['date'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_friendly_time = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $_POST['time'] ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_time = __( ' at ', 'woothemes' );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_time .= $_POST['time'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} // End IF Statement\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_friendly_number = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $_POST['people'] == 'special' ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_number = WTFactory::get_max_number_of_people() + 1;\n\t\t\t\t\t\t\t$_friendly_number .= '+';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_number = $_POST['people'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t} // End IF Statement\n\t\t\t\t\t\t\n\t\t\t\t\t\t// $_message .= '<span class=\"confirmation_message\">' . $_friendly_date . $_friendly_time . ' for a party of ' . $_friendly_number . '</span>';\n\t \t\t\t\n\t \t\t\t\t\t$_message = '<input type=\"hidden\" name=\"confirmation_message\" class=\"confirmation_message\" value=\"' . sprintf( __( '%s for a party of %s', 'woothemes' ), $_friendly_date . $_friendly_time, $_friendly_number ) . '\" />' . \"\\n\";\n\t \t\t\t\n\t \t\t\t\t\techo $_message;\n\t \t\t\t\n\t\t\t\t\t} // End IF Statement\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\t\t// Generate a confirmation message for the \"Make a reservation\" widget.\n\t \t\t\tcase 'generate_confirmation_message_widget':\n\t \t\t\t\t\n\t \t\t\t\t$_message = '';\n\t\t\t\t\t\n\t\t\t\t\tif ( strlen( $_POST['time'] ) > 8 ) { echo $_message; } else {\n\t\t\t\t\t\n\t\t\t\t\t\t$_days = array(\n\t\t\t\t\t\t\t'sun' => __( 'Sunday','woothemes' ), \n\t\t\t\t\t\t\t'mon' => __( 'Monday', 'woothemes' ), \n\t\t\t\t\t\t\t'tue' => __( 'Tuesday', 'woothemes' ), \n\t\t\t\t\t\t\t'wed' => __( 'Wednesday', 'woothemes' ), \n\t\t\t\t\t\t\t'thu' => __( 'Thursday', 'woothemes' ), \n\t\t\t\t\t\t\t'fri' => __( 'Friday', 'woothemes' ), \n\t\t\t\t\t\t\t'sat' => __( 'Saturday', 'woothemes' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\t// Get the various business hours.\n\t\t\t\t\t\t$business_hours = WTFactory::get_business_hours( $this->plugin_prefix );\n\t\t\t\t\t\n\t\t\t\t\t\t$index = strtolower( date('D', strtotime($_POST['date']) ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// $full_dayname = date('l', strtotime($_POST['date']) );\n\t\t\t\t\t\t$full_dayname = $_days[$index];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Compensate for the colloquial convention of \"thurs\" instead of \"thu\", and \"tues\" instead of \"tue\".\n\t\t\t\t\t\tif ( $index == 'thu' ) { $index = 'thurs'; } // End IF Statement\n\t\t\t\t\t\tif ( $index == 'tue' ) { $index = 'tues'; } // End IF Statement\n\t\t\t\t\t\t\n\t\t\t\t\t\t$times = $business_hours[$index];\n\t\t\t\t\t\n\t\t\t\t\t\tif ( $times['closed'] ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_message = '<span class=\"confirmation_message\">' . sprintf( __( 'We are closed on %ss. To inquire about emergency weekend service, please call (714) 826-1068.', 'woothemes' ), $full_dayname ) . '<input type=\"hidden\" name=\"reservation_time\" class=\"required\" value=\"\" /></span>' . \"\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_date = date( 'l, F jS', strtotime( $_POST['date'] ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_time = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $_POST['time'] ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_friendly_time = ' at ';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_friendly_time .= $_POST['time'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // End IF Statement\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_friendly_number = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $_POST['people'] == 'special' ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_friendly_number = WTFactory::get_max_number_of_people() + 1;\n\t\t\t\t\t\t\t\t$_friendly_number .= '+';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_friendly_number = $_POST['people'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // End IF Statement\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_message .= '<span class=\"confirmation_message\">' . sprintf( __( '%s for a party of %s', 'woothemes' ), $_friendly_date . $_friendly_time, $_friendly_number ) . '</span>';\n\t \t\t\t\n\t \t\t\t\t\t} // End IF Statement\n\t \t\t\t\t\n\t \t\t\t\t\techo $_message;\n\t \t\t\t\n\t\t\t\t\t} // End IF Statement\n\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\n\t \t\t} // End SWITCH Statement\n\t \t\t\n\t \t\texit;\n\t \t\t\n\t \t}", "title": "" }, { "docid": "c615e4dd0bccd38a4bc912a39f809392", "score": "0.5200792", "text": "public function validate_time_acl($time)\n {\n clearos_profile(__METHOD__, __LINE__);\n if ((int)$time < 0)\n return lang('web_proxy_time_definition_invalid');\n }", "title": "" }, { "docid": "41274789dd0c0c930bdfc07d157fa25d", "score": "0.51886153", "text": "function paycheck($tocheck)\n{\n if($tocheck >= time()) return TRUE;\n else return FALSE;\n}", "title": "" }, { "docid": "f90610d558e539952f2dcfda0cc013e5", "score": "0.51615757", "text": "function reffero_meta_callback( $post ) {\n wp_nonce_field( basename( __FILE__ ), 'reffero_nonce' );\n $prfx_stored_meta = get_post_meta( $post->ID );\n ?>\n <p>\n <input type=\"checkbox\" name=\"use-reffero\" id=\"use-reffero\" value=\"1\" <?php if ( isset ( $prfx_stored_meta['use-reffero'] ) && $prfx_stored_meta['use-reffero'][0]) echo \"checked=\\\"checked\\\"\"; ?> />\n <label for=\"use-reffero\" class=\"prfx-row-title\">\n <?php _e( 'Attach a Reffero campaign to this post?', 'reffero-textdomain' )?>\n </label>\n <p class=\"howto\">\n <span class=\"dashicons dashicons-info\"></span>If you attach a Reffero campaign to this post, visitors will have to post to a Social Network before being able to view it.\n </p>\n </p>\n <p>\n <label for=\"page-reffero\" class=\"prfx-row-title\">\n <?php _e( 'Reffero campaign URL:', 'reffero-textdomain' )?>\n </label>\n <input type=\"text\" name=\"page-reffero\" id=\"page-reffero\" value=\"<?php echo $prfx_stored_meta['reffero_campaign'][0] ?>\" />\n <br />\n or\n\n <br />\n <a class=\"button\" href=\"<?php echo REFFERO__NEW_CAMPAIGN_URL ?>\" target=\"wp-preview-1\">Create a new campaign on Reffero</a>\n </p>\n <p>\n <input type=\"checkbox\" name=\"reffero-one-time-only\" id=\"reffero-one-time-only\" value=\"1\" <?php if ( isset ( $prfx_stored_meta['reffero-one-time-only'] ) && $prfx_stored_meta['reffero-one-time-only'][0]) echo \"checked=\\\"checked\\\"\"; ?> />\n <label for=\"reffero-one-time-only\" class=\"prfx-row-title\">\n <?php _e( 'One-time-only access', 'reffero-textdomain' )?>\n </label>\n <p class=\"howto\">\n <span class=\"dashicons dashicons-info\"></span>One-time-only access means that your visitors will only be able to access this post once after they post on a Social Network via Reffero. If they want to access the page again, they would have to post again.\n </p>\n </p>\n<?php\n}", "title": "" }, { "docid": "de691399586323df5a29b7233a1a896f", "score": "0.51517624", "text": "function create_alert_acc(){\n\n// WP NONCE CHECK\ncheck_ajax_referer( 'my-special-string', 'security' );\n//\n\nglobal $wpdb;\nif ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'create_alert_acc' ) {\n\n\n\t$coin = htmlspecialchars($_POST['coin']);\n\t$coin_id = htmlspecialchars($_POST['id']);\n\t$symbol = htmlspecialchars($_POST['symbol']);\n\t$below = str_replace(',', '.', htmlspecialchars($_POST['below']));\n\t$below_currency = htmlspecialchars($_POST['below_currency']);\n\t$above = str_replace(',', '.', htmlspecialchars($_POST['above']));\n\t$above_currency = htmlspecialchars($_POST['above_currency']);\n\t$email = htmlspecialchars($_POST['email']);\n//\t$user_ID = htmlspecialchars($_POST['user_ID']);\n\t$unique_id = htmlspecialchars($_POST['unique_id']);\n\n// $unique_id = $wpdb->get_var( \"SELECT unique_id FROM coinwink_settings WHERE user_ID = '\".$user_ID.\"'\" );\n\n// Save email for later use\n$wpdb->update(\n\t'coinwink_settings', \n\tarray(\n\t\t'email' => $email\n\t),\n\tarray(\n\t\t'unique_id' => $unique_id\n\t)\n);\n\nif($wpdb->insert('coinwink', array(\n\t\t'coin' => $coin,\n\t\t'coin_id' => $coin_id,\n\t\t'symbol' => $symbol,\n\t\t'below' => $below,\n\t\t'below_currency' => $below_currency,\n\t\t'above' => $above,\n\t\t'above_currency' => $above_currency,\n\t\t'email' => $email,\n\t\t'unique_id' => $unique_id ))===FALSE){\n\necho \"Error\";\n\n}\nelse {\n\n$to = $email;\n$subject = 'New alert for '. $coin .' ('. $symbol .')';\nif ($below && !$above) {\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive an email alert when '. $coin .' ('. $symbol .') price will be below: '. $below .' '. $below_currency .'.\n\nYou can manage your alert(-s) at https://coinwink.com\n\nWink,\nCoinwink';\n}\nif ($below && $above)\n{\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive email alerts when '. $coin .' ('. $symbol .') price will be above: '. $above .' '. $above_currency .' and below: '. $below .' '. $below_currency .'.\n\nYou can manage your alert(-s) at https://coinwink.com\n\nWink,\nCoinwink';\n}\nif ($above && !$below)\n{\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive an email alert when '. $coin .' ('. $symbol .') price will be above: '. $above .' '. $above_currency .'.\n\nYou can manage your alert(-s) at https://coinwink.com\n\nWink,\nCoinwink';\n}\n/*\n$headers = 'From: \"Coinwink\" <[email protected]>' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion(); */\n\nwp_mail($to, $subject, $message/*, $headers*/);\n\n}\ndie();\n\n}\n}", "title": "" }, { "docid": "1ed48f707f35634c7ccc032bd66d7993", "score": "0.5145165", "text": "function move_in_form_submission(){\n check_ajax_referer( 'move-n', 'nonce' );\n\n // do some sanitization first\n\n // do some validation on the back end\n\n // add the extra data to the request before sending\n // Submission URL: https://cptest.move-n.com/api/Lead/LeadInfo\n // Sender_ID: 849b2101c11b171ca1cb65b27d1119127ee38f2c\n // Parent_ID: 224\n\n // send request off to the 3rd party service\n $res = wp_remote_post();\n\n // check response\n\n // if response is good return a\n wp_send_json_success();\n\n // if its bad\n wp_send_json_error();\n\n}", "title": "" }, { "docid": "09ad7ac21404385f6a10e8f50e6ca116", "score": "0.51389945", "text": "final protected function handle_update_nonce( $key = 'default', $check_post = true ) {\n\n\t\tstatic $validated = [];\n\n\t\tif ( isset( $validated[ $key ] ) )\n\t\t\treturn $validated[ $key ];\n\n\t\tif ( false === $this->is_transporter_page() && false === \\tsf_extension_manager()->can_do_settings() )\n\t\t\treturn $validated[ $key ] = false;\n\n\t\tif ( $check_post ) {\n\t\t\t/**\n\t\t\t * If this page doesn't parse the site options,\n\t\t\t * there's no need to check them on each request.\n\t\t\t */\n\t\t\tif ( empty( $_POST )\n\t\t\t|| ( ! isset( $_POST[ TSF_EXTENSION_MANAGER_EXTENSION_OPTIONS ][ $this->o_index ] ) )\n\t\t\t|| ( ! is_array( $_POST[ TSF_EXTENSION_MANAGER_EXTENSION_OPTIONS ][ $this->o_index ] ) )\n\t\t\t) {\n\t\t\t\treturn $validated[ $key ] = false;\n\t\t\t}\n\t\t}\n\n\t\t$result = isset( $_POST[ $this->nonce_name ] ) ? \\wp_verify_nonce( \\wp_unslash( $_POST[ $this->nonce_name ] ), $this->nonce_action[ $key ] ) : false;\n\n\t\tif ( false === $result ) {\n\t\t\t//* Nonce failed. Set error notice and reload.\n\t\t\t$this->set_error_notice( [ 1069001 => '' ] );\n\t\t\t\\the_seo_framework()->admin_redirect( $this->transporter_page_slug );\n\t\t\texit;\n\t\t}\n\n\t\treturn $validated[ $key ] = (bool) $result;\n\t}", "title": "" }, { "docid": "de30de535878889c02265c16c7be4be4", "score": "0.51379484", "text": "public function hasNonce($nonce,$timestamp);", "title": "" }, { "docid": "bf2d940305e882fcd13ab7ae29cf9def", "score": "0.51326936", "text": "function tg_requireNoncePOST($form)\n{\n // Did POST come with a nonce?\n if(isset($_POST['nonce']))\n // If so, test it\n tg_requireNonce($form, $_POST['nonce']);\n else\n // Otherwise, fail\n tg_requireNonce($form, \"\");\n}", "title": "" }, { "docid": "84badd0ba1d06f645b2771e31f8b4cab", "score": "0.51255715", "text": "public function verify_nonce($nonce, $action = \"\") {\n\tif($action) {\n\t return wp_verify_nonce($nonce, $action);\n\t}\n\treturn wp_verify_nonce($nonce, $this->action);\n }", "title": "" }, { "docid": "89d24e06951a590023686c0a5639c389", "score": "0.5124529", "text": "function validateMissionAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$task_obj = new Ep_Quote_Task();\n\t\t\t$request = $this->_request->getParams();\n\t\t\t//echo \"<pre>\"; print_r($request); exit;\n\t\t\t$cmid = $request['cmid'];\n\t\t\t\n\t\t \t$update = array();\n\t\t\t$update['cm_status'] = 'validated'; \n\t\t\t$update['validated_by'] = $this->_view->userId; \n\t\t\t$update['progress_percent'] = 100; \n\t\t\t$update['validated_at'] = date('Y-m-d H:i:s'); \n\t\t\t$contract_obj = new Ep_Quote_Quotecontract();\n\t\t\t$res = $contract_obj->updateContractMission($update,$cmid);\n\t\t\t\n\t\t\t//Insert into Logs\n\t\t\t$log_obj=new Ep_Quote_QuotesLog();\t \t\t\t\n\t\t\t\n\t\t\tif($request['type']!='prod')\n\t\t\t{\n\t\t\t\tif((strtotime(date('Y-m-d'))>strtotime($request['to_date'])) && $request['type']!='sales')\n\t\t\t\t{\n\t\t\t\t\t$actionmessage = $log_obj->getActionSentence(19);\n\t\t\t\t\t$no_of_seconds = strtotime(date('Y-m-d H:i:s')) - strtotime($request['to_date']);\n\t\t\t\t\t$days = $no_of_seconds/(3600*24);\n\t\t\t\t\t$log_array['ontime'] = 0;\n\t\t\t\t\tif($days<1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$days = ceil($no_of_seconds/3600);\n\t\t\t\t\t\t$delay = $days.\" hrs\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$delay = ceil($days).\" days\";\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$actionmessage = $log_obj->getActionSentence(18);\n\t\t\t\t\n\t\t\t\tif($request['type']=='seo')\n\t\t\t\t{\n\t\t\t\t\t$log_array['action']='validated_seo';\n\t\t\t\t}\n\t\t\t\telseif($request['type']=='staff')\n\t\t\t\t{\n\t\t\t\t\t$log_array['action']='validated_staff';\n\t\t\t\t}\n\t\t\t\telseif($request['type']=='sales')\n\t\t\t\t{\n\t\t\t\t\t$log_array['action']='validated_sales';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$log_array['action']='validated_tech';\n\t\t\t\t\t$taskDetails = $task_obj->getTasks(array('cmid'=>$request['cmid']));\n\t\t\t\t\tif(count($taskDetails)>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($taskDetails as $techTaskvalue) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($techTaskvalue['m_status']!='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tech_task['validated_by']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t\t$tech_task['m_status']='validated';\n\t\t\t\t\t\t\t\t$tech_task['validated_at']=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t\t$tech_task['updated_at'] = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t$task_obj->updateTask($tech_task,$techTaskvalue['task_id']);\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\telse\n\t\t\t{\n\t\t\t\t$actionmessage = $log_obj->getActionSentence(29);\n\t\t\t\t$log_array['action']='validated_prod';\n\t\t\t}\n\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($this->adminLogin->userId);\n\t\t\t$tech_user=\"<strong>\".$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'].\"</strong>\";\n\t\t\t\n\t\t\t$mission_title = $request['title'];\n\t\t\t$actionmessage=strip_tags($actionmessage);\n\t\t\teval(\"\\$actionmessage= \\\"$actionmessage\\\";\");\n\t\t\n\t\t\t$log_array['user_id']=$this->adminLogin->userId;\n\t\t\t$log_array['contract_id']=$request['contract_id'];\n\t\t\t$log_array['mission_id'] = $request['mission_id'];\n\t\t\t$log_array['quote_id'] = $request['quote_id'];\n\t\t\t$log_array['mission_type'] = $request['type'];\n\t\t\t$log_array['user_type']=$this->adminLogin->type;\n\t\t\t$log_array['action_at']=date(\"Y-m-d H:i:s\");\n\t\t\t$log_array['action_sentence']=utf8_decode($actionmessage);\t\n\t\t\t$log_obj->insertLogs($log_array);\n\t\t\t\n\t\t\t/* Sending Mail */\n\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t$mail_content = $mail_obj->getAutoEmail(161);\n\t\t\t$subject = $mail_content[0]['Object'];\n\t\t\t$orgmessage = $mail_content[0]['Message'];\n\t\t\t$mission_type = $request['type'];\n\t\t\t$users = array();\n\t\t\tif($mission_type==\"seo\" || $mission_type==\"prod\" || $mission_type==\"staff\")\n\t\t\t{\n\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t$qmdetails =$quoteMission_obj->getMissionDetails(array('mission_id'=>$request['mission_id']));\n\t\t\t\tif($qmdetails[0]['product']=='translation')\n\t\t\t\t\t$mission_name = $this->product_array[$qmdetails[0]['product']].\" \".$this->producttype_array[$qmdetails[0]['product_type']].\" \".$this->getCustomName(\"EP_LANGUAGES\",$qmdetails[0]['language_source']).\" au \".$this->getCustomName(\"EP_LANGUAGES\",$qmdetails[0]['language_dest']);\n\t\t\t\telse\n\t\t\t\t\t$mission_name = $this->product_array[$qmdetails[0]['product']].\" \".$this->producttype_array[$qmdetails[0]['product_type']].\" in \".$this->getCustomName(\"EP_LANGUAGES\",$qmdetails[0]['language_source']);\n\t\t\t\t\t\n\t\t\t\tif($mission_type==\"seo\")\n\t\t\t\t{\n\t\t\t\t\t//$users = $contract_obj->getUsers(\"seomanager\");\n\t\t\t\t\t$users = $client_obj->getQuoteUserDetails($this->adminLogin->userId);\n\t\t\t\t\t$mission_link = \"<a href='\".$this->url.\"/followup/seo?submenuId=ML13-SL4&cmid=\".$cmid.\"'>click here</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$users = $contract_obj->getUsers(\"multilingue\");\n\t\t\t\t\t$mission_link = \"<a href='\".$this->url.\"/followup/prod?submenuId=ML13-SL4&cmid=\".$cmid.\"'>click here</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($mission_type==\"tech\")\n\t\t\t{\n\t\t\t\t$tech_obj=new Ep_Quote_TechMissions();\n\t\t\t\t$techdetails = $tech_obj->getTechMissionDetails(array('identifier'=>$request['mission_id']));\n\t\t\t\t$mission_name = $techdetails[0]['title'];\n\t\t\t\t//$users = $contract_obj->getUsers(\"techmanager\");\n\t\t\t\t$users = $client_obj->getQuoteUserDetails($this->adminLogin->userId);\n\t\t\t\t$mission_link = \"<a href='\".$this->url.\"/followup/tech?submenuId=ML13-SL4&cmid=\".$cmid.\"'>click here</a>\";\n\t\t\t}\n\t\t\t$bo_user = $bo_user_details[0]['first_name'].\" \".$bo_user_details[0]['last_name'];\n\t\t\teval(\"\\$subject= \\\"$subject\\\";\");\n\t\t\t\n\t\t\tforeach($users as $user)\n\t\t\t{\n\t\t\t\t$name = $user['first_name'].\" \".$user['last_name'];\n\t\t\t\teval(\"\\$message= \\\"$orgmessage\\\";\");\n\t\t\t\t$mail_obj->sendEMail($this->mail_from,$message,$user['email'],$subject);\n\t\t\t}\n\t\t\t\n\t\t\t// sending mail to Assigned User\n\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($request['assigned_to']);\n\t\t\t$name = $bo_user_details[0]['first_name'].\" \".$bo_user_details[0]['last_name'];\n\t\t\teval(\"\\$message= \\\"$orgmessage\\\";\");\n\t\t\t$mail_obj->sendEMail($this->mail_from,$message,$bo_user_details[0]['email'],$subject);\n\t\t}\n\t}", "title": "" }, { "docid": "50eeb4965521d0410fa1695600456de2", "score": "0.51227593", "text": "function widgetcallback($post){\n\twp_nonce_field( 'lawzone_meta_box', 'lawzone_meta_box_nonce' );\n\twp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );\n $prfx_stored_meta = get_post_meta( $post->ID );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$description \t= get_post_meta( $post->ID, 'description', true );\n\t$before_widget \t= get_post_meta($post->ID, 'before_widget', true);\n\t$after_widget \t= get_post_meta($post->ID, 'after_widget', true);\n\t$before_title \t= get_post_meta($post->ID, 'before_title', true);\n\t$after_title \t= get_post_meta($post->ID, 'after_title', true);\n\n\n\t//Designation\n\techo '<label style=\"width:100%;\" for=\"description\">';\n\t_e( 'Description', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"description\" name=\"description\" value=\"' . $description . '\" />';\n\techo '<br/><br/>';\n\n\n\t//before_widget\n\techo '<label style=\"width:100%;\" for=\"before_widget\">';\n\t_e( 'Before Widget <small><i> (Ex: &lt;section id=\"%1$s\" class=\"widget %2$s\"&gt;)</i></small>', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"before_widget\" name=\"before_widget\" value=\"' . $before_widget . '\" />';\n\techo '<br/><br/>';\n\n\n\t//after_widget\n\techo '<label style=\"width:100%;\" for=\"after_widget\">';\n\t_e( 'After Widget', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"after_widget\" name=\"after_widget\" value=\"' . $after_widget . '\" />';\n\techo '<br/><br/>';\n\n\n\t//before_title\n\techo '<label style=\"width:100%;\" for=\"before_title\">';\n\t_e( 'Before Title', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"before_title\" name=\"before_title\" value=\"' . $before_title . '\" />';\n\techo '<br/><br/>';\n\n\n\t//after_title\n\techo '<label style=\"width:100%;\" for=\"after_title\">';\n\t_e( 'After Title', 'lawzone' );\n\techo '</label> ';\n\techo '<input style=\"width:100%\" type=\"text\" id=\"after_title\" name=\"after_title\" value=\"' . $after_title . '\" />';\n\techo '<br/>';\n \n}", "title": "" }, { "docid": "8e15d10a2d13d83d0308868d80b17b27", "score": "0.51105624", "text": "public function confirm_timesheet( $time_id ) {\n try {\n $this->db->update( 'timesheet', array( 'checked' => 'y' ), 'timeid = ' . $time_id );\n return true;\n }\n catch ( exception $e ) {\n //Do something\n return false;\n }\n }", "title": "" }, { "docid": "be8d96cb903668af06a33ac7b82bbfd9", "score": "0.5097931", "text": "function create_alert(){\n\n// WP NONCE CHECK\ncheck_ajax_referer( 'my-special-string', 'security' );\n//\n\nglobal $wpdb;\nif ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'create_alert' ) {\n\n$error = apply_filters( 'cptch_verify', true );\n\nif ( true === $error ) { \n\n\t$coin = htmlspecialchars($_POST['coin']);\n\t$coin_id = htmlspecialchars($_POST['id']);\n\t$symbol = htmlspecialchars($_POST['symbol']);\n\t$below = str_replace(',', '.', htmlspecialchars($_POST['below']));\n\t$below_currency = htmlspecialchars($_POST['below_currency']);\n\t$above = str_replace(',', '.', htmlspecialchars($_POST['above']));\n\t$above_currency = htmlspecialchars($_POST['above_currency']);\n\t$email = htmlspecialchars($_POST['email']);\n\n// Get alerts count for user without acc\n$alerts_count = $wpdb->get_var( \"SELECT COUNT(*) FROM coinwink WHERE email = '\".$email.\"'\" );\nif ($alerts_count >= 10) {\n\techo(\"Limit error\");\n\texit();\n}\n\n$unique_id = $wpdb->get_var( \"SELECT unique_id FROM coinwink WHERE email = '\".$email.\"'\" );\n\tif (!$unique_id) {\n\t\t$unique_id = $wpdb->get_var( \"SELECT unique_id FROM coinwink_percent WHERE email = '\".$email.\"'\" );\n\t\tif (!$unique_id){\n\t\t\t$unique_id = uniqid();\n\t\t}\n\t} \n\nif($wpdb->insert('coinwink', array(\n\t\t'coin' => $coin,\n\t\t'coin_id' => $coin_id,\n\t\t'symbol' => $symbol,\n\t\t'below' => $below,\n\t\t'below_currency' => $below_currency,\n\t\t'above' => $above,\n\t\t'above_currency' => $above_currency,\n\t\t'email' => $email,\n\t\t'unique_id' => $unique_id ))===FALSE){\n\necho \"Error\";\n\n}\nelse {\n\n$to = $email;\n$subject = 'New alert for '. $coin .' ('. $symbol .')';\nif ($below && !$above) {\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive an email alert when '. $coin .' ('. $symbol .') price will be below: '. $below .' '. $below_currency .'.\n\nYou can manage your alert(-s) with this unique id: '. $unique_id .' at https://coinwink.com\n\nWink,\nCoinwink';\n}\nif ($below && $above)\n{\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive email alerts when '. $coin .' ('. $symbol .') price will be above: '. $above .' '. $above_currency .' and below: '. $below .' '. $below_currency .'.\n\nYou can manage your alert(-s) with this unique id: '. $unique_id .' at https://coinwink.com\n\nWink,\nCoinwink';\n}\nif ($above && !$below)\n{\n$message = ''. $coin .' ('. $symbol .') price alert has been created.\n\nYou will receive an email alert when '. $coin .' ('. $symbol .') price will be above: '. $above .' '. $above_currency .'.\n\nYou can manage your alert(-s) with this unique id: '. $unique_id .' at https://coinwink.com\n\nWink,\nCoinwink';\n}\n/*$headers = 'From: \"Coinwink\" <[email protected]>' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();*/\n\nwp_mail($to, $subject, $message/*, $headers*/);\n\n}\ndie();\n\n}\n\nelse {\n\t\n\techo($error);\n\t}\n}\n}", "title": "" }, { "docid": "bd511cbe708a3b46c1b6da282c09f70d", "score": "0.50861764", "text": "public function create_nonce() {\n\treturn wp_create_nonce($this->action);\n }", "title": "" }, { "docid": "3218ffeb34b979e2bf0f37bc9187d778", "score": "0.5073837", "text": "function tg_checkNonce($form, $nonce)\n{\n $name = 'NONCE_' . $form;\n\n // Were we given a nonce?\n if($nonce != \"\")\n {\n // Lazy-start the session on demand\n if(session_id() == '') session_start();\n\n // Does it check out OK?\n if(isset($_SESSION[$name]) && $_SESSION[$name] == $nonce)\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "5b0f79867e6880535ecca13ea6b044f6", "score": "0.507061", "text": "function phore_validate() {\n\n\n}", "title": "" }, { "docid": "6dadaaeb06914106c5f81aeb538d53d8", "score": "0.50652564", "text": "function verify($llna, $llur, $ipaddress = \"\")\r\n{\r\n\tif($ipaddress == \"\")\r\n\t{\r\n\t\t$ipaddress =getenv(REMOTE_ADDR);\r\n\t\t//echo $ipaddress. \"|\";\r\n\t}\r\n\t$llna = str_replace(\" \",\"+\",$llna);\r\n\t$llur = str_replace(\" \",\"+\",$llur);\r\n\t$cURL = 'http://utyp.net/check.php?llna='.$llna.\"&llid=\".$llur.\"&lip=\".$ipaddress ;\r\n\t//echo $cURL. \"|\";\r\n\t$response=file_get_contents($cURL);\r\n\t//echo $response. \"|\";\r\n\tif($response == \"&found=1 \")\r\n\t{\r\n\t\treturn 1;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif($response == \"&found=2\")\r\n\t\t{\r\n\t\t\twp_die('Your Pictcha Session has Expired, try refreshing your browser.');\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n}", "title": "" }, { "docid": "3a1a361830eda13f35bf33d5680f60d3", "score": "0.50555956", "text": "function tg_requireNonceGET($form)\n{\n // Did GET come with a nonce?\n if(isset($_GET['nonce']))\n // If so, test it\n tg_requireNonce($form, $_GET['nonce']);\n else\n // Otherwise, fail\n tg_requireNonce($form, \"\");\n}", "title": "" }, { "docid": "c8a2f458f6ee432f512f9bd8a175649e", "score": "0.5044915", "text": "function sba_callback() {\n\n //Checks the source of the ajax call.\n check_ajax_referer( 'sba-security-string', 'security');\n\t\n\t$action=$_POST['type'];\n\t$username=wp_get_current_user()->user_login;\n\t$logic=new Logic($username);\n\t$presenter=new Presenter($logic);\n\t$router=new Router($presenter);\n\t$response=$router->do_action($action);\n\techo $response;\n\tdie();\n}", "title": "" }, { "docid": "d72fdc0612c0238967ac183e8951f7f7", "score": "0.5031682", "text": "function humle_save_postdata( $post_id ) {\r\n // verify if this is an auto save routine. \r\n // If it is our form has not been submitted, so we dont want to do anything\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \r\n return;\r\n\r\n // verify this came from the our screen and with proper authorization,\r\n // because save_post can be triggered at other times\r\n if ( !isset( $_POST['dynamicMeta_noncename'] ) )\r\n return;\r\n\r\n if ( !wp_verify_nonce( $_POST['dynamicMeta_noncename'], plugin_basename( __FILE__ ) ) )\r\n return;\r\n\r\n // OK, we're authenticated: we need to find and save the data\r\n\r\n $hops = $_POST['hops'];\r\n\r\n update_post_meta($post_id,'hops',$hops);\r\n}", "title": "" }, { "docid": "0afb5b1dd3819228cb13d1d03375ef05", "score": "0.50273305", "text": "function is_valid_postit($postit)\n{\n if (!$postit) {\n format_error_response('Unknown postit key.', ERROR_404);\n } else if (strtotime($postit['expires_at']) <= strtotime('now')) {\n format_error_response('Postit key has expired.', ERROR_403);\n } else if ($postit['remaining_uses'] == 0 || $postit['remaining_uses'] < -1) {\n format_error_response('Postit key has already been redeemed.', ERROR_403);\n }\n return true;\n}", "title": "" }, { "docid": "89999f41e2384bfb861185da70240753", "score": "0.50090605", "text": "function GetWtiVotedMessage($post_id, $ip = null) {\r\n global $wpdb, $wti_ip_address;\r\n $wti_voted_message = '';\r\n $voting_period = get_option('wti_like_post_voting_period');\r\n \r\n if (null == $ip) {\r\n $ip = $wti_ip_address;\r\n }\r\n \r\n /*$query = $wpdb->prepare(\r\n \"SELECT COUNT(id) AS has_voted FROM {$wpdb->prefix}wti_like_post\r\n WHERE post_id = %d AND ip = %s\",\r\n $post_id, $ip\r\n );*/\r\n \r\n if ($voting_period != 0 && $voting_period != 'once') {\r\n // If there is restriction on revoting with voting period, check with voting time\r\n $last_voted_date = GetWtiLastDate($voting_period);\r\n //$query .= \" AND date_time >= '$last_voted_date'\";\r\n $query = $wpdb->prepare(\r\n \"SELECT COUNT(id) AS has_voted FROM {$wpdb->prefix}wti_like_post\r\n WHERE post_id = %d AND ip = %s AND date_time >= %s\",\r\n $post_id, $ip, $last_voted_date\r\n );\r\n } else {\r\n $query = $wpdb->prepare(\r\n \"SELECT COUNT(id) AS has_voted FROM {$wpdb->prefix}wti_like_post\r\n WHERE post_id = %d AND ip = %s\",\r\n $post_id, $ip\r\n );\r\n }\r\n\r\n $wti_has_voted = $wpdb->get_var($query);\r\n \r\n if ($wti_has_voted > 0) {\r\n $wti_voted_message = get_option('wti_like_post_voted_message');\r\n }\r\n \r\n return $wti_voted_message;\r\n}", "title": "" }, { "docid": "805b164656ffe96dfc291e0af1741730", "score": "0.50084674", "text": "function validateSecuringForm() {\n $series = $_SESSION['SAKAR_series'];\n\n /*\n Handle the situation where we have arrived here as a result of the user\n wandering back to the script after giving up in the middle of running it\n earlier when presented with a form (or running multiple instances).\n */\n if (isset($_POST['submitToken'])) {\n $submitToken = $_POST['submitToken'];\n } else {\n $submitToken = \"\";\n }\n if ($submitToken != $_SESSION['SAKAR_submitToken']) {\n form_destroy();\n $host = $_SERVER['HTTP_HOST'];\n $uri = $_SERVER['PHP_SELF'];\n header(\"Location: http://$host$uri\");\n exit;\n }\n\n if (isset($_POST['box'])) {\n /*\n For each element of series create an array which holds a list of\n user type ids which were submitted. This array will become the\n 'userTypeIdsSubmitted' member of the series element.\n */\n foreach ($series as $nodeKey => $nodeElem) {\n if (isset($_POST['box'][$nodeKey]) AND is_array($_POST['box'][$nodeKey])) {\n $submittedIdCkBoxes = $_POST['box'][$nodeKey];\n createArrOfSubmittedIds($submittedIdCkBoxes, $nodeKey);\n }\n }\n } else {\n form_destroy();\n die('No checkbox form values submitted. -Programmer.');\n }\n\n return;\n}", "title": "" }, { "docid": "da53d02ecad3a34e637de4f4011c1bf8", "score": "0.500568", "text": "public function verify_nonce( $action, $name = '_wpnonce' ) {\n\t\treturn ( false !== wp_verify_nonce( $this->param( $name ), $action ) );\n\t}", "title": "" }, { "docid": "acdc342f5ffbfa858e5383a1e107d4c2", "score": "0.49985233", "text": "function pointfinder_check_expires() {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tDirect payment:\n\n\t\t\t\t\t- Change order status to pending payment. \n\t\t\t\t\t- Change Item status to pending payment.\n\t\t\t\t\t- Send an email to user.\n\t\t\t\t\t- Add a process record for this action.\n\t\t\t\t*/\n\n\t\t\t\t$exptime = date(\"Y-m-d H:s:i\");\n\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$results = $wpdb->get_results( $wpdb->prepare( \n\t\t\t\t\t\"SELECT p.ID, p.post_author, pm.meta_value, p.post_date FROM $wpdb->posts as p \n\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm \n\t\t\t\t\t\tON ( p.ID = pm.post_id )\n\t\t\t\t\tINNER JOIN $wpdb->postmeta as pm2 \n\t\t\t\t\t\tON ( pm.post_id = pm2.post_id ) \n\t\t\t\t\tWHERE p.post_type = %s \n\t\t\t\t\tand p.post_status = %s \n\t\t\t\t\tand p.post_parent = %d \n\t\t\t\t\tand pm.meta_key = %s \n\t\t\t\t\tand pm.meta_value <= %s \n\t\t\t\t\tand pm2.meta_key = %s \n\t\t\t\t\tand pm2.meta_value = %d\", \n\t\t\t\t\t'pointfinderorders',\n\t\t\t\t\t'completed',\n\t\t\t\t\t0,\n\t\t\t\t\t'pointfinder_order_expiredate',\n\t\t\t\t\t$exptime,\n\t\t\t\t\t'pointfinder_order_recurring',\n\t\t\t\t\t0\n\t\t\t\t),'OBJECT_K' );\n\n\t\t\t\t\n\t\t\t\t$setup33_emaillimits_listingexpired = PFMSIssetControl('setup33_emaillimits_listingexpired','','1');\n\n\t\t\t\tif (PFControlEmptyArr($results)) {\n\t\t\t\t\tforeach ($results as $result) {\n\n\t\t\t\t\t\t$item_id = esc_attr(get_post_meta( $result->ID, 'pointfinder_order_itemid', true ));\n\n\t\t\t\t\t\tif ( false != get_post_status( $item_id ) ) {\n\t\t\t\t\t\t\t/* This is direct payment */\n\t\t\t\t\t\t\tPFExpireItemManual(\n\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t 'order_id' => $result->ID,\n\t\t\t\t\t\t\t 'post_id' => $item_id,\n\t\t\t\t\t\t\t 'post_author' => $result->post_author,\n\t\t\t\t\t\t\t\t'payment_type' => 'direct'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ($setup33_emaillimits_listingexpired == 1) {\n\t\t\t\t\t\t\t\t$user_info = get_userdata( $result->post_author);\n\t\t\t\t\t\t\t\tpointfinder_mailsystem_mailsender(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'toemail' => $user_info->user_email,\n\t\t\t\t\t\t\t 'predefined' => 'directafterexpire',\n\t\t\t\t\t\t\t 'data' => array('ID' => $item_id, 'expiredate' => $result->meta_value,'orderid' => $result->ID),\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}\n\n\t\t\t\t\t}/*Foreach end*/\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "a0aa2e48797d13f101b5743e0421b07e", "score": "0.499419", "text": "private function nonce() {\n \n return date('YYYYYYYYYYYYYYYYYYYYYYYYYmdHis');\n return round(microtime(true)*100);\n\n }", "title": "" }, { "docid": "befa176f4724c6da1b8909ebf8d5e35d", "score": "0.4992443", "text": "public function check_param() {\n\t\tif ( isset( $_GET['calypsoify'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( 1 === (int) $_GET['calypsoify'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\tupdate_user_meta( get_current_user_id(), 'calypsoify', 1 );\n\t\t\t} else {\n\t\t\t\tupdate_user_meta( get_current_user_id(), 'calypsoify', 0 );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "76cc32cc44a059a6e087bec5702a84ee", "score": "0.49881735", "text": "function wpt_save_result_set_meta($post_id, $post) {\n\t// verify this came from the our screen and with proper authorization,\n\t// because save_post can be triggered at other times\nif(isset($_POST['eventmeta_noncename'])){\nif( !wp_verify_nonce( $_POST['eventmeta_noncename'], plugin_basename(__FILE__) ) )\n{\nreturn $post->ID;\n}\n}\n// Is the user allowed to edit the post or page?\nif ( !current_user_can( 'edit_post', $post->ID ))\nreturn $post->ID;\n\t// OK, we're authenticated: we need to find and save the data\n\t// We'll put it into an array to make it easier to loop though.\n$events_meta = array();\nif(isset($_POST['reslt_search_name'])){\n$events_meta['reslt_search_name'] = $_POST['reslt_search_name'];\n$events_meta['reslt_agent'] = $_POST['reslt_agent'];\n$events_meta['reslt_offc_loc'] = $_POST['reslt_offc_loc'];\n$events_meta['geo_area'] = $_POST['geo_area'];\n$events_meta['reslt_property_typ'] = $_POST['reslt_property_typ'];\n$events_meta['reslt_property_style'] = $_POST['reslt_property_style'];\n$events_meta['reslt_property_status'] = $_POST['reslt_property_status'];\n$events_meta['reslt_min_price'] = $_POST['reslt_min_price'];\n$events_meta['reslt_max_price'] = $_POST['reslt_max_price'];\n$events_meta['reslt_min_square'] = $_POST['reslt_min_square'];\n$events_meta['reslt_max_square'] = $_POST['reslt_max_square'];\n$events_meta['reslt_beds'] = $_POST['reslt_beds'];\n$events_meta['reslt_baths'] = $_POST['reslt_baths'];\n$events_meta['reslt_waterfront'] = $_POST['reslt_waterfront'];\n$events_meta['reslt_features'] = $_POST['reslt_features'];\n$events_meta['reslt_gallery'] = $_POST['reslt_gallery'];\n$events_meta['reslt_list'] = $_POST['reslt_list'];\n$events_meta['reslt_carousel'] = $_POST['reslt_carousel'];\n$events_meta['reslt_peg_width'] = $_POST['reslt_peg_width'];\n$events_meta['reslt_sidebar_width'] = $_POST['reslt_sidebar_width'];\n$events_meta['reslt_bgcolor'] = $_POST['reslt_bgcolor'];\nif(isset($_POST['reslt_map'])){\n$events_meta['reslt_map'] = $_POST['reslt_map'];\n}else{\n$events_meta['reslt_map'] = '';\t\n}\nif(isset($_POST['reslt_sort_order'])){\n$events_meta['reslt_sort_order'] = $_POST['reslt_sort_order'];\n}else{\n$events_meta['reslt_sort_order'] = '';\t\n}\nif(isset($_POST['reslt_featur_list'])){\n$events_meta['reslt_featur_list'] = $_POST['reslt_featur_list'];\n}else{\n\t$events_meta['reslt_featur_list'] = '';\n}\n}\n// Add values of $events_meta as custom fields\nif(is_array($events_meta))\n{\nforeach($events_meta as $key => $value)\n{// Cycle through the $events_meta array!\n//if( $post->post_type == 'revision' ) return; // Don't store custom data twice\n$value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)\nif(get_post_meta($post->ID, $key, FALSE))\n{ // If the custom field already has a value\nupdate_post_meta($post->ID, $key, $value);\n}\nelse\n{ // If the custom field doesn't have a value\nadd_post_meta($post->ID, $key, $value);\n}\n}\nif(isset($value)) {\nif(!$value)delete_post_meta($post->ID, $key); // Delete if blank\n}\n}\n}", "title": "" }, { "docid": "f6f3a9007ce16aaed716388036d889e1", "score": "0.49857306", "text": "function timecop_return() {}", "title": "" }, { "docid": "1cb3bae74897ea77a58d7d86b55b95dd", "score": "0.49841425", "text": "public function check_post_data()\r\n{\r\n\t$ok = parent::check_post_data();\r\n\t\r\n\tif ($this->specific_data->account_apikey == '')\r\n\t\t{\r\n\t\t$this->app->enqueueMessage(JText::_('COM_PAYAGE_INVALID').' '.JText::_('COM_PAYAGE_MOLLIE_APIKEY'), 'error');\r\n\t\t$ok = false;\r\n\t\t}\r\n\r\n\treturn $ok;\r\n}", "title": "" }, { "docid": "5a13f48ec14cf9e5501eee24d1e0ad11", "score": "0.49817747", "text": "function ct_process_submission() {\n global $ct_pagetime_label, $ct_server_url, $ct_checkjs_label;\n \n $ct_checkjs = null;\n if (isset($_COOKIE[$ct_checkjs_label]) && $_COOKIE[$ct_checkjs_label] == date(\"Y\")) {\n if ($_COOKIE[$ct_checkjs_label] == date(\"Y\")) {\n $ct_checkjs = 1;\n } else {\n $ct_checkjs = 0;\n }\n }\n\n $ct_submit_time = null;\n if (isset($_SESSION[$ct_pagetime_label])) {\n $ct_submit_time = time() - $_SESSION[$ct_pagetime_label];\n }\n \n $sender_email = null;\n if (is_array($_POST)) {\n foreach ($_POST as $k => $v) {\n if ($sender_email === null && isset($v)) {\n if (is_string($v) && preg_match(\"/^\\S+@\\S+\\.\\S+$/\", $v)) {\n $sender_email = $v;\n }\n\n // Looking email address in arrays\n if (is_array($v)) {\n foreach ($v as $v2) {\n if ($sender_email) {\n continue;\n }\n \n if (is_string($v2) && preg_match(\"/^\\S+@\\S+\\.\\S+$/\", $v2)) {\n $sender_email = $v2;\n }\n }\n }\n }\n }\n }\n // Take params from config\n $config_url = 'http://moderate.cleantalk.ru';\n $auth_key = null; // Set Cleantalk auth key\n\n\n // The facility in which to store the query parameters\n $ct_request = new CleantalkRequest();\n\n $ct_request->auth_key = $auth_key;\n $ct_request->sender_email = $sender_email;\n $ct_request->agent = 'php-api';\n $ct_request->sender_ip = CleantalkHelper::ip_get(array('real'), false);\n $ct_request->js_on = $ct_checkjs; # Site visitor has JavaScript\n $ct_request->submit_time = $ct_submit_time; # Seconds from start form filling till the form POST\n\n $ct = new Cleantalk();\n $ct->server_url = $config_url;\n\n // Check\n $ct_result = $ct->isAllowUser($ct_request);\n\n if ($result->errno != 0) {\n error_log($result->errstr);\n return false;\n }\n \n if ($result->allow == 0 && isset($result->comment)) {\n $message = sprintf(\"<br /><br /><br /><center><span>%s</span></center>\", $result->comment);\n echo $message;\n exit;\n }\n \n return null;\n}", "title": "" }, { "docid": "98f4f38df6f8103fee6ace7d9965a02d", "score": "0.49817488", "text": "function ticket_get_timeguard(){\n return set_config('tickettimeguard', 'auth/ticket');\n}", "title": "" }, { "docid": "883a2e49a043a45c6e51b065759194d9", "score": "0.49777004", "text": "function dpe_restricted_days_for_month() {\n\n $year = $_POST['year'];\n $month = $_POST['month'];\n $pack = $_POST['pack_id'];\n\n wp_send_json_success( dpe_get_restrcited_days_for_month( $year, $month, $pack ) );\n}", "title": "" }, { "docid": "b26403c0a7595d5ba65a2530bf044108", "score": "0.49763772", "text": "function wpactionable_check_input() {\r\n if (!(isset($_POST['actionable_post']))) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "13db695afae6e6bda208fcf59b26cf44", "score": "0.49753648", "text": "function check_ip($ip, $cookie, $add_id, $event_time, $event_timeout, $event_type, $word='')\n{\n\tglobal $db;\n\n\t$result = $db->query(\"SELECT event_time\n\t\t\t\t\t\t\tFROM 2linesads_log\n\t\t\t\t\t\t\tWHERE add_id = $add_id\n\t\t\t\t\t\t\tAND cookie = '$cookie'\n\t\t\t\t\t\t\tAND event_type = '$event_type'\n\t\t\t\t\t\t\tAND event_time < ($event_time - $event_timeout)\n\t\t\t\t\t\t\tAND ip = '$ip'\n\t\t\t\t\t\t\t\") or die('err:'.$db -> error);\n if ($result->num_rows > 0) {\n return true; \n } else {\n \n $db->query(\"UPDATE LOW_PRIORITY 2linesads_log\n\t\t\t\t\t SET event_time=NOW(),\n\t\t\t\t\t ip = '$ip'\n\t\t\t\t\t WHERE cookie = '$cookie'\n\t\t\t\t\t AND add_id = '$add_id'\n\t\t\t\t\t AND event_type = '$event_type'\n\t\t\t\t\t \") or die('err:'.$db -> error);\n if ($db->affected_rows <= 0) {\n $db->query(\"INSERT INTO 2linesads_log\n\t\t\t\t\t SET event_time=NOW(),\n\t\t\t\t\t ip = '$ip',\n\t\t\t\t\t cookie = '$cookie',\n\t\t\t\t\t add_id = '$add_id',\n\t\t\t\t\t `word` = '$word',\n\t\t\t\t\t event_type = '$event_type'\") or die('err:'.$db -> error);\n }\n return false; \n \n }\n}", "title": "" }, { "docid": "fde6bdd0f9386dac413d76a5db5d049b", "score": "0.49667847", "text": "abstract public function checkStamp (Stamp $stamp);", "title": "" }, { "docid": "3457ddc24d9b41c9c1a2163392fc8537", "score": "0.4957047", "text": "function validate_date_time_picker_field( $field ) {\n\t\t\n\t\t// 3rd party date time picker\n\t\t// https://github.com/soderlind/acf-field-date-time-picker\n\t\tif( !empty($field['time_format']) ) {\n\t\t\t\n\t\t\t// extract vars\n\t\t\t$time_format = acf_extract_var( $field, 'time_format' );\n\t\t\t$date_format = acf_extract_var( $field, 'date_format' );\n\t\t\t$get_as_timestamp = acf_extract_var( $field, 'get_as_timestamp' );\n\t\t\t\n\t\t\t\n\t\t\t// convert from js to php\n\t\t\t$time_format = acf_convert_time_to_php( $time_format );\n\t\t\t$date_format = acf_convert_date_to_php( $date_format );\n\t\t\t\n\t\t\t\n\t\t\t// append settings\n\t\t\t$field['return_format'] = $date_format . ' ' . $time_format;\n\t\t\t$field['display_format'] = $date_format . ' ' . $time_format;\n\t\t\t\n\t\t\t\n\t\t\t// timestamp\n\t\t\tif( $get_as_timestamp === 'true' ) {\n\t\t\t\t\n\t\t\t\t$field['return_format'] = 'U';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\n\t\t// return\n\t\treturn $field;\n\t\t\n\t}", "title": "" }, { "docid": "199bee248004776b72deb8176428a2a4", "score": "0.4955118", "text": "function nf_form_nonce( $form_id ) {\n\twp_nonce_field( 'nf_form_' . $form_id );\n}", "title": "" }, { "docid": "1c068df891d0689610e9881d51002b73", "score": "0.4949981", "text": "function check_ticket_creation_delay($ticket) {\n if (isset($_SESSION['last_ticket_creation']) and $_SESSION['last_ticket_creation'] > (time() - settings('ticket_creation_delay'))) {\n $ticket->_add_error(\n 'ticket_creation_delay',\n l('errors.you_must_wait_x', Time::difference_in_words($_SESSION['last_ticket_creation'] + settings('ticket_creation_delay')))\n );\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "be88d9de730f83f17d51e34e5bc60667", "score": "0.494566", "text": "public function get_time_type_data()\n {\n $requestData= $_REQUEST;\n $user=$this->settings->gettimetype($requestData,$where=null);\n echo $user;\n }", "title": "" }, { "docid": "36f98cb1378fb92a3c299b85a59d8d2f", "score": "0.4937672", "text": "function checkDateTime($data) \n\t\t\t\t{\n\t\t\t\t\tif (date('Y-m-d H:i:s', strtotime($data)) == $data) {$ss1=\"true\";} else { $ss1=\"false\";}\n\t\t\t\t}", "title": "" }, { "docid": "8f0413b6e42bf6764dcd1f2b4c130fbe", "score": "0.49300513", "text": "function clients_objecturl_validateInput($ctlData,$input_data = null) {\n}", "title": "" }, { "docid": "62d85c5e08dc7dbfc9ee4d303306813e", "score": "0.49297842", "text": "static protected function validateTime($key, $options) {\r\n\t\t$ms = explode(\".\", Helper::CommaToPoint($_POST[$key]));\r\n\r\n\t\t$_POST[$key] = Time::toSeconds($ms[0]);\r\n\r\n\t\tif (isset($ms[1]))\r\n\t\t\t$_POST[$key] += $ms[1]/100;\r\n\r\n\t\tif ($_POST[$key] == 0 && (isset($options['required']) || isset($options['notempty'])))\r\n\t\t\treturn __('You have to enter a time.');\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "8367ba17b226686d648fc8c70cb9a6c7", "score": "0.49235058", "text": "public function the_time_passes_widget( LaterPay_Core_Event $event ) {\n if ( $event->has_argument( 'post' ) ) {\n $post = $event->get_argument( 'post' );\n } else {\n $post = get_post();\n }\n\n $is_homepage = is_front_page() && is_home();\n\n list( $introductory_text, $call_to_action_text, $time_pass_id ) = $event->get_arguments() + array( '', '', null );\n if ( empty( $introductory_text ) ) {\n $introductory_text = '';\n }\n if ( empty( $call_to_action_text ) ) {\n $call_to_action_text = '';\n }\n\n // Get the value of purchase type\n $post_price_behaviour = LaterPay_Helper_Pricing::get_post_price_behaviour();\n\n // If 'Make article free unless price is set on post page' is selected only show time pass or subscription\n // if the individual post price greater than 0.\n if ( 0 === $post_price_behaviour ) {\n $post_price_type = LaterPay_Helper_Pricing::get_post_price_type( $post->ID );\n $is_global_price_type = LaterPay_Helper_Pricing::is_price_type_global( $post_price_type );\n\n if ( empty( $post_price_type ) || $is_global_price_type ) {\n return;\n }\n }\n\n // get time passes list\n $time_passes_with_access = $this->get_time_passes_with_access();\n\n $subscriptions_list = [];\n\n if ( isset( $time_pass_id ) ) {\n $check_time_pass_id = in_array( $time_pass_id, $time_passes_with_access, true );\n if ( $check_time_pass_id ) {\n return;\n }\n $time_passes_list = array( LaterPay_Helper_TimePass::get_time_pass_by_id( $time_pass_id, true ) );\n } else {\n $post_id = ( ( ! $is_homepage ) && ( ! empty( $post ) ) ) ? $post->ID: null;\n // Check if we are on the homepage or on a post / page page.\n $time_passes_list = LaterPay_Helper_TimePass::get_time_passes_list_by_post_id(\n $post_id,\n $time_passes_with_access,\n true\n );\n $subscriptions_list = LaterPay_Helper_Subscription::get_subscriptions_list_by_post_id( $post_id, null, true );\n }\n\n // get subscriptions\n $subscriptions = $event->get_argument( 'subscriptions' );\n\n // check global vouchers.\n $global_has_vouchers = false;\n if ( LaterPay_Helper_Pricing::is_single_purchase_voucher_enabled() ) {\n $lp_global_vouchers = LaterPay_Helper_Voucher::get_all_global_vouchers();\n $global_has_vouchers = ( isset( $lp_global_vouchers[0] ) && empty( $lp_global_vouchers[0] ) ) ? false : true;\n }\n\n\n // don't render the widget, if there are no time passes and no subsriptions\n if ( empty( $time_passes_list ) && empty( $subscriptions ) && false === $global_has_vouchers ) {\n return;\n }\n\n // check, if the time passes / subscriptions to be rendered have vouchers\n $time_pass_has_vouchers = LaterPay_Helper_Voucher::passes_have_vouchers( $time_passes_list );\n $subscription_has_vouchers = LaterPay_Helper_Voucher::subscriptions_have_vouchers( $subscriptions_list );\n\n $has_vouchers = $time_pass_has_vouchers || $subscription_has_vouchers || $global_has_vouchers;\n\n $view_args = array(\n 'passes_list' => $time_passes_list,\n 'subscriptions' => $subscriptions,\n 'has_vouchers' => $has_vouchers,\n 'time_pass_introductory_text' => $introductory_text,\n 'time_pass_call_to_action_text' => $call_to_action_text,\n 'is_overlay_enabled' => LaterPay_Helper_Appearance::get_current_config( 'lp_show_purchase_overlay' ), // This is for adding some margin based on layout.\n );\n\n $this->assign( 'laterpay_widget', $view_args );\n $html = $event->get_result();\n $html .= LaterPay_Helper_View::remove_extra_spaces( $this->get_text_view( 'frontend/partials/widget/time-passes' ) );\n\n // Check if time pass and subscriptions are positioned manually.\n $is_tp_sub_list_position_custom = (bool) get_option( 'laterpay_time_passes_positioned_manually' );\n\n // Check if content is purchasable.\n $is_purchasable = LaterPay_Helper_Pricing::is_purchasable( $post_id );\n\n // Only add identity link for 'Teaser + Purchase Link' layout.\n if ( $is_purchasable && (bool) get_option( 'laterpay_purchase_button_positioned_manually' ) && 0 === absint( LaterPay_Helper_Appearance::get_current_config( 'lp_show_purchase_overlay' ) ) ) {\n $this->assign( 'laterpay', LaterPay_Helper_Post::get_identity_purchase_url( $post->ID ) );\n $html .= LaterPay_Helper_View::remove_extra_spaces( $this->get_text_view( 'frontend/partials/widget/purchase-identity-url' ) );\n }\n\n // If content is purchasable and time pass and subscription position is custom echo the code.\n if ( $is_purchasable && $is_tp_sub_list_position_custom && ! wp_doing_ajax() && 'laterpay_time_passes' === current_action() ) {\n $allowed_tags = wp_kses_allowed_html( 'post' );\n\n $allowed_tags['a'][] = [\n 'data-icon' => true,\n 'data-laterpay' => true,\n 'data-post-id' => true,\n 'data-preview-post-as-visitor' => true,\n 'data-preview-as-visitor' => true\n ];\n\n $allowed_tags['div'][] = [ 'data-pass-id' => true, 'data-sub-id' => true ];\n $allowed_tags['input'] = [\n 'type' => 'text',\n 'name' => 'time_pass_voucher_code',\n 'class' => true,\n 'maxlength' => true\n ];\n\n echo wp_kses( $html, $allowed_tags );\n } else {\n $event->set_result( $html );\n }\n }", "title": "" }, { "docid": "fe5c31bd2a9e6d445669a803e9b05bcf", "score": "0.49130732", "text": "function vacatures_amount_of_hours_callback($post){\n\t$amount_of_hours_value = get_post_meta( $post->ID, 'vacatures_amount_of_hours', true );\n\t/*var_dump($start_date_value);*/\n\tif($amount_of_hours_value == \"\"){ ?>\n\t\t\t<input type=\"text\" id=\"vacatures_amount_of_hours_id\" name=\"vacatures_amount_of_hours\" >\n\t<?php }else{ ?>\n\t\t<input type=\"text\" id=\"vacatures_amount_of_hours_id\" name=\"vacatures_amount_of_hours\" value=\"<?php echo $amount_of_hours_value; ?>\">\n\t<?php } \n}", "title": "" }, { "docid": "3881d943060c337db8b299ab6c7f1e60", "score": "0.49106455", "text": "function ml_touch_time($time, $which, $id_string, $id_array, $echo=true ) {\n\tglobal $wp_locale, $post, $comment;\n\n\t$time_adj = current_time('timestamp');\n\n\t$jj = mysql2date( 'd', $time, false );\n\t$mm = mysql2date( 'm', $time, false );\n\t$aa = mysql2date( 'Y', $time, false );\n\t$hh = mysql2date( 'H', $time, false );\n\t$mn = mysql2date( 'i', $time, false );\n\t$ss = mysql2date( 's', $time, false );\n\n\t$cur_jj = gmdate( 'd', $time_adj );\n\t$cur_mm = gmdate( 'm', $time_adj );\n\t$cur_aa = gmdate( 'Y', $time_adj );\n\t$cur_hh = gmdate( 'H', $time_adj );\n\t$cur_mn = gmdate( 'i', $time_adj );\n\t$cur_ss = gmdate( 's', $time_adj );\n\n\t$month = '<select id=\"<?php echo $id_string; ?>-mm-' . $which . '\" name=\"<?php echo $id_string; ?>-mm-' . $which . \"\\\">\\n\";\n\tfor ( $i = 1; $i < 13; $i = $i +1 ) {\n\t\t$month .= \"\\t\\t\\t\" . '<option value=\"' . zeroise($i, 2) . '\"' . selected($i, $mm, false) .'>' . $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) . \"</option>\\n\";\n\t}\n\t$month .= '</select>';\n\n\t$day = '<input type=\"text\" id=\"<?php echo $id_string; ?>-jj-' . $which . '\" name=\"<?php echo $id_array; ?>[jj-' . $which . ']\" value=\"' . $jj . '\" size=\"2\" maxlength=\"2\" autocomplete=\"off\" />';\n\t$year = '<input type=\"text\" id=\"<?php echo $id_string; ?>-aa-' . $which . '\" name=\"<?php echo $id_array; ?>[aa-' . $which . ']\" value=\"' . $aa . '\" size=\"4\" maxlength=\"4\" autocomplete=\"off\" />';\n\t$hour = '<input type=\"text\" id=\"<?php echo $id_string; ?>-hh-' . $which . '\" name=\"<?php echo $id_array; ?>[hh-' . $which . ']\" value=\"' . $hh . '\" size=\"2\" maxlength=\"2\" autocomplete=\"off\" />';\n\t$minute = '<input type=\"text\" id=\"<?php echo $id_string; ?>-mn-' . $which . '\" name=\"<?php echo $id_array; ?>[mn-' . $which . ']\" value=\"' . $mn . '\" size=\"2\" maxlength=\"2\" autocomplete=\"off\" />';\n\n\t$ret = '<div class=\"timestamp-wrap\">';\n\t$ret .= sprintf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);\n\t$ret .= '</div><input type=\"hidden\" id=\"<?php echo $id_string; ?>-ss-' . $which . '\" name=\"<?php echo $id_array; ?>[ss-' . $which . ']\" value=\"' . $ss . '\" />';\n\n\t$ret .= \"\\n\\n\";\n\tforeach ( array('mm', 'jj', 'aa', 'hh', 'mn', 'ss') as $timeunit ) {\n\t\t$ret .= '<input type=\"hidden\" id=\"<?php echo $id_string; ?>-hidden_' . $timeunit . '-' . $which . '\" name=\"<?php echo $id_string; ?>-hidden_' . $timeunit . '\" value=\"' . $$timeunit . '\" />' . \"\\n\";\n\t\t$cur_timeunit = 'cur_' . $timeunit;\n\t\t$ret .= '<input type=\"hidden\" id=\"<?php echo $id_string; ?>-'. $cur_timeunit . '-' . $which . '\" name=\"<?php echo $id_string; ?>-'. $cur_timeunit . '\" value=\"' . $$cur_timeunit . '\" />' . \"\\n\";\n\t}\n\n\t$ret .= '<p>';\n\t$ret .= '<a href=\"#edit_timestamp-' . $which . '\" class=\"save-timestamp hide-if-no-js button\">' . __('OK') . '</a>';\n\t$ret .= '<a href=\"#edit_timestamp-' . $which . '\" class=\"cancel-timestamp hide-if-no-js\">' . __('Cancel') . '</a>';\n\t$ret .= '</p>';\n\n\tif (!$echo) {\n\t\treturn $ret;\n\t}\n\techo $ret;\n}", "title": "" }, { "docid": "9873ebf9ab0834dfed8f10a97bc96771", "score": "0.4907491", "text": "function check_token() {\n\t$timeKey = ARequest::get('timeKey');\n\t /* token expire 3600s */\n\tif(($timeKey > time()) or (time() > (3600 + $timeKey)) or (substr(md5(SOFT_SEED . $timeKey), 8, 8) != ARequest::get('token'))) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "f71cbb082176110de352cf2506538a66", "score": "0.49025193", "text": "function userCanEnterTime($userid) {\r\n\tglobal $database;\r\n\r\n\t$query = \"SELECT count(*)\"\r\n\t\t\t. \" FROM f9ko_oc_project AS p, f9ko_oc_company AS c, f9ko_oc_project_user AS u, f9ko_oc_user_prefs AS up\"\r\n\t\t\t. \" WHERE p.company_id = c.id\"\r\n\t\t\t. \" AND p.id = u.project_id\"\r\n\t\t\t. \" AND p.published=1\"\r\n\t\t\t. \" AND c.published=1\"\r\n\t\t\t. \" AND u.user_id=up.user_id\"\r\n\t\t\t. \" AND up.is_timesheet_user=1\"\r\n\t\t\t. \" AND u.published=1\"\r\n\t\t\t. \" AND u.user_id=\" . (int)$userid;\r\n\r\n\t$database->setQuery( $query );\r\n\t$total = $database->loadResult();\r\n\tif ($database->getErrorNum()) {\r\n\t\techo $database->stderr();\r\n\t\treturn false;\r\n\t}\t\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "8d53ca4ec61b25a1c0ac8e9fbbcc635d", "score": "0.48917836", "text": "public function collaborative_point(){\n\n \t$date_time = date(\"Y-m-d h:i:sa\");\n \t$dt = new DateTime($date_time);\n\t\t$date_d = $dt->format('d');\n\n \t$user = $this->session->userdata();\n\n \t$this->permission->check_label('collaborative_point')->read()->redirect();\n\n\t\t$data['title'] = display('collaborative_point');\n\t\t#-------------------------------#\n\t\t$this->form_validation->set_rules('employee_id',display('employee_name'),'required|max_length[50]');\n\t\t$this->form_validation->set_rules('reason',display('reason'),'required|max_length[500]');\n\t\t$this->form_validation->set_rules('point',display('point'),'numeric|required|greater_than[0]|less_than[2]');\n\t\t\n\t\t#-------------------------------#\n\t\tif ($this->form_validation->run() === true) {\n\n\t\t\t$this->permission->check_label('collaborative_point')->create()->redirect();\n\n\t\t $point_shared_with = $this->input->post('employee_id',true);\n\t\t $point = $this->input->post('point',true);\n\n\t\t if((int)$point != 1){\n\t\t \n\t\t $this->session->set_flashdata('exception', \"Point value must be 1 !\");\n\n\t\t\t redirect(\"rewardpoint/Rewardpoints/collaborative_point\");\n\t\t }\n\n\t\t\t$postData = [\n\t\t\t\t'point_shared_with' => $this->input->post('employee_id',true),\n\t\t\t\t'reason' \t \t\t=> $this->input->post('reason',true),\n\t\t\t\t'point' \t \t\t=> $this->input->post('point',true),\n\t\t\t];\n\n\t\t\t//Get point settings\n\t\t\t$point_settings = $this->rewardpoints_model->get_last_record();\n\n\t\t\t//collaborative point start date\n\t\t\t$collaborative_start = $point_settings->collaborative_start;\n\t\t\t$dt_collaborative_start = new DateTime($collaborative_start);\n\t $collaborative_start_d = $dt_collaborative_start->format('d');\n\n\t //collaborative point start date\n\t $collaborative_end = $point_settings->collaborative_end;\n\t $dt_collaborative_end = new DateTime($collaborative_end);\n\t $collaborative_end_d = $dt_collaborative_end->format('d');\n\n\t\t\t//Checking collaborative point start and end date\n\t\t\tif((int)$date_d >= (int)$collaborative_start_d && (int)$date_d <= (int)$collaborative_end_d){\n\n\t\t\t\t//Checking if trying to share point with own self\n\t\t\t\tif((int)$point_shared_with == (int)$user['employee_id']){\n\n\t\t\t\t\t$this->session->set_flashdata('exception', \"You can't share point with yourself !\");\n\t\t\t\t}else{\n\n\t\t\t\t\t//Getting Collaborative point for the logged in employee for current month..\n\t\t\t\t\t$collaborative_point_count = $this->rewardpoints_model->collaborative_point_count();\n\n\t\t\t\t\tif((int)$collaborative_point_count >= (int)$point_settings->general_point){\n\n\t\t\t\t\t\t$this->session->set_flashdata('exception', \"You can share maximum \".$point_settings->general_point.\" points for a month !\");\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t//Check employee sharing point more than one with point receiver employee for current month\n\t\t\t\t\t\t$check_emp_collab_point = $this->rewardpoints_model->check_emp_collab_point($point_shared_with);\n\n\t\t\t\t\t\tif((int)$check_emp_collab_point < (int)$point_settings->attendence_point){\n\n\t\t\t\t\t\t\tif ($this->rewardpoints_model->collaborative_point_create($postData)) {\n\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message', display('successfully_saved'));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('exception', display('please_try_again'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t$this->session->set_flashdata('exception', \"You can share only one point with an employee for a month !\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('exception', \"Points can be shared between day \".$collaborative_start_d.\" to day \".$collaborative_end_d.\" of current month !\");\n\t\t\t}\n\n\t\t\tredirect(\"rewardpoint/Rewardpoints/collaborative_point\");\n\n\t\t} else {\n\t\t\t$data['title'] = display('collaborative_point');\n\t\t\t$data['module'] = \"rewardpoint\";\n\t\t\t$data['page'] = \"collaborative_point\";\n\t\t\t$data['employee'] = $this->rewardpoints_model->empdropdown();\n\t\t\tif($user['isAdmin']){\n\t\t\t$data['collaborative_points'] = $this->rewardpoints_model->collaborative_pointsView();\n\t\t\t}else{\n\t\t\t\tif($user['employee_id']){\n\t\t\t\t\t$data['collaborative_points'] = $this->rewardpoints_model->collaborative_pointsView_employee($user['employee_id']);\n\t\t\t\t}\n\t\t\t}\n\t\t\techo Modules::run('template/layout', $data);\n\t\t\t\n\t\t} \n\t}", "title": "" }, { "docid": "cf9d2966225bff44ce9a4c00a0359a88", "score": "0.48912433", "text": "function wpt_events_location() {\n\tglobal $post;\n\t// Nonce field to validate form request came from current site\n\twp_nonce_field( basename( __FILE__ ), 'event_fields' );\n\t// Get the location data if it's already been entered\n\t$fuel_type = get_post_meta( $post->ID, 'fuel_type', true );\n\t$manufacturer = get_post_meta( $post->ID, 'manufacturer', true );\n\t$model = get_post_meta( $post->ID, 'model', true );\n\t$fuel_type = get_post_meta( $post->ID, 'fuel_type', true );\n\t$variant = get_post_meta( $post->ID, 'variant', true );\n\t$stage = get_post_meta( $post->ID, 'stage', true );\n\t$vehicle_registration = get_post_meta( $post->ID, 'vehicle_registration', true );\n\t$transmission = get_post_meta( $post->ID, 'transmission', true );\n\t$mileage = get_post_meta( $post->ID, 'mileage', true );\n\t$tool_used = get_post_meta( $post->ID, 'tool_used', true );\n\t$vehicle_age = get_post_meta( $post->ID, 'vehicle_age', true );\n\t$free_options = get_post_meta( $post->ID, 'free_options', true );\n\t$paid_options = get_post_meta( $post->ID, 'paid_options', true );\n\t$invoice_link = get_post_meta( $post->ID, 'invoice_link', true );\n\t$invoice_price = get_post_meta( $post->ID, 'invoice_price', true );\n\t$dealer_file = get_post_meta( $post->ID, 'dealer_file', true );\n\t$void_reason = get_post_meta( $post->ID, 'void_reason', true );\n\t$comments = get_post_meta( $post->ID, 'comments', true );\n\t// Output the field\n\techo '<h3><b class=\"col-sm-3 control-label\">Vehicle Details</b></h3>';\n\t\n\techo '<p><b class=\"col-sm-3 control-label\">Manufacturer<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"manufacturer\" value=\"' . esc_textarea( $manufacturer ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Model<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"model\" value=\"' . esc_textarea( $model ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Fuel type<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"fuel_type\" value=\"' . esc_textarea( $fuel_type ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Variant<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"variant\" value=\"' . esc_textarea( $variant ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Stage<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"stage\" value=\"' . esc_textarea( $stage ) . '\" class=\"widefat\">';\n\t\n\techo '<h3 class=\"col-sm-9 col-sm-offset-3\">More details</h3>';\n\t\n\techo '<p><b class=\"col-sm-3 control-label\">Vehicle registration<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"vehicle_registration\" value=\"' . esc_textarea( $vehicle_registration ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Transmission<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"transmission\" value=\"' . esc_textarea( $transmission ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Mileage<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"mileage\" value=\"' . esc_textarea( $mileage ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Vehicle age<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"vehicle_age\" value=\"' . esc_textarea( $vehicle_age ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Tool used<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"tool_used\" value=\"' . esc_textarea( $tool_used ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Free options<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"free_options\" value=\"' . esc_textarea( $free_options ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Paid options<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"paid_options\" value=\"' . esc_textarea( $paid_options ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Dealer File<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"dealer_file\" value=\"' . esc_textarea( $dealer_file ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Void Reason<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"void_reason\" value=\"' . esc_textarea( $void_reason ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Invoice Link<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"invoice_link\" value=\"' . esc_textarea( $invoice_link ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Invoice price<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"invoice_price\" value=\"' . esc_textarea( $invoice_price ) . '\" class=\"widefat\">';\n\techo '<p><b class=\"col-sm-3 control-label\">Comments<span class=\"requiredinput\">:*</span></b></p>';\n\techo '<input type=\"text\" name=\"comments\" value=\"' . esc_textarea( $comments ) . '\" class=\"widefat\">';\n}", "title": "" }, { "docid": "c1cbd4972e7f3be763cf0c309ca5a4ef", "score": "0.4889033", "text": "function add_general_nonce()\n{\n $nonce = wp_create_nonce('noncefield');\n echo \"<meta name='csrf-token' content='$nonce'>\";\n}", "title": "" }, { "docid": "6e927ba5bb92d8fab783849572ee9aab", "score": "0.4883065", "text": "public function verifyNonce(string $action = '-1', string $nonce)\n {\n return wp_verify_nonce($nonce, $action);\n }", "title": "" }, { "docid": "d5caa1e21fac4a5192c9ecab10db9844", "score": "0.48822132", "text": "public static function participantSaveEntry()\n {\n global $wpdb;\n $wpdb->suppress_errors = true;\n $wpdb->show_errors = false;\n $altered = false;\n $now = new DateTime(\"now\", new DateTimeZone(get_option('timezone_string')));\n\n $act_id = filter_input(INPUT_POST, 'act-id', FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n $log_date = filter_input(INPUT_POST, 'log-date', FILTER_VALIDATE_REGEXP, [\n 'options' => [\n 'regexp' => \"/[\\d\\\\]{10,12}/\"\n ]\n ]);\n $member_id = filter_input(INPUT_POST, 'member-id', FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n $user_name = sanitize_text_field(filter_input(INPUT_POST, 'user-name', FILTER_DEFAULT, FILTER_NULL_ON_FAILURE));\n $user_email = strtolower(sanitize_email(\n filter_input(INPUT_POST, 'user-email', FILTER_VALIDATE_EMAIL, FILTER_NULL_ON_FAILURE)\n ));\n\n if (! $member_id) {\n print json_encode([\n 'warning' => 'That is an invalid value for your member ID'\n ]);\n wp_die();\n } elseif (! $user_name) {\n print json_encode([\n 'warning' => 'You must put your name on the form'\n ]);\n wp_die();\n } elseif (! $user_email) {\n print json_encode([\n 'warning' => 'You must put your e-mail on the form'\n ]);\n wp_die();\n }\n\n if (isset($log_date)) {\n $now = new DateTime($log_date, new DateTimeZone(get_option('timezone_string')));\n }\n\n if (! is_a($now, 'DateTime')) {\n print json_encode([\n 'error' => 'Were not able to parse the activity date'\n ]);\n wp_die();\n }\n\n $req_login = (boolean) get_option('pt-require-login', 0);\n $query = $wpdb->prepare(\"SELECT c.*\nFROM {$wpdb->prefix}pt_challenges c\nJOIN {$wpdb->prefix}pt_activities ca ON ca.challenge_id = c.id\nWHERE ca.id = %d\", $act_id);\n $chal = $wpdb->get_row($query);\n\n if (!$chal) {\n print json_encode([\n 'error' => 'Unable to find that selected challenge'\n ]);\n wp_die();\n }\n\n $start = new DateTime($chal->start, new DateTimeZone(get_option('timezone_string')));\n $end = new DateTime(\"{$chal->end} 23:59:59\", new DateTimeZone(get_option('timezone_string')));\n\n // Verify the challenge is still running\n if ($now < $start) {\n print json_encode([\n 'error' => \"Challenge hasn't started\"\n ]);\n wp_die();\n } elseif ($now > $end) {\n print json_encode([\n 'error' => \"Challenge is already over\"\n ]);\n wp_die();\n }\n\n $user_id = null;\n\n if ((! is_user_logged_in() || ! PointTracker::isUserInChallenge($chal->id, get_current_user_id())) &&\n $req_login) {\n print json_encode([\n 'error' => 'You must be logged in to access this (access denied)'\n ]);\n wp_die();\n } elseif (is_user_logged_in()) {\n // if the user is logged in, get their info\n $user_id = get_current_user_id();\n } elseif (! $req_login && ! $user_id) {\n // if login is not required and they aren't logged in, check for the presents of an account\n // using their email\n $user_id = email_exists($user_email);\n if (! $user_id) {\n $random_pwd = wp_generate_password();\n $user_id = wp_create_user($user_email, $random_pwd, $user_email);\n }\n }\n\n if (! $user_id) {\n print json_encode([\n 'error' => 'Unable to add you to the challenge'\n ]);\n wp_die();\n }\n\n $query = $wpdb->prepare(\"SELECT *\nFROM {$wpdb->prefix}pt_participants\nWHERE\n user_id = %d AND\n challenge_id = %d\", $user_id, $chal->id);\n $part = $wpdb->get_row($query);\n $res = true;\n\n if (! $part) {\n $res = $wpdb->insert(\"{$wpdb->prefix}pt_participants\", [\n 'challenge_id' => $chal->id,\n 'user_id' => $user_id,\n 'approved' => 1,\n 'date_joined' => $now->format(\"Y-m-d\"),\n 'date_approved' => $now->format(\"Y-m-d\"),\n 'name' => $user_name,\n 'email' => $user_email,\n 'member_id' => $member_id\n ]);\n }\n\n // Make sure a user was added to the challenge\n if ($res === false) {\n print json_encode([\n 'error' => 'Unable to add you to the challenge'\n ]);\n wp_die();\n }\n\n $query = $wpdb->prepare(\"SELECT * FROM {$wpdb->prefix}pt_activities WHERE id = %d\", $act_id);\n $act = $wpdb->get_row($query);\n\n if ($act->type == 'checkbox') {\n $value = implode(',', filter_input(INPUT_POST, 'value', FILTER_DEFAULT, FILTER_FORCE_ARRAY));\n } else {\n $value = sanitize_text_field(filter_input(INPUT_POST, 'value', FILTER_DEFAULT, FILTER_NULL_ON_FAILURE));\n }\n\n $params = [\n 'user_id' => $user_id,\n 'activity_id' => $act_id,\n 'log_date' => $now->format(\"Y-m-d\"),\n 'log_time' => $now->format(\"H:i:s\"),\n 'value' => $value\n ];\n $amt = $act->points;\n\n // validate the activity by type\n switch ($act->type) {\n case 'checkbox':\n if (! strlen($value)) {\n print json_encode([\n 'warning' => 'Must select at least one option'\n ]);\n wp_die();\n }\n break;\n case 'number':\n if (empty($value) || ! is_numeric($value)) {\n print json_encode([\n 'warning' => 'Value must be numeric'\n ]);\n wp_die();\n } elseif ($act->min && $value < $act->min) {\n print json_encode([\n 'warning' => 'Value must be at least ' . $act->min\n ]);\n wp_die();\n } elseif ($act->max && $value > $act->max) {\n print json_encode([\n 'warning' => 'Value must be less than or equal to ' . $act->max\n ]);\n wp_die();\n } elseif ($value <= 0) {\n print json_encode([\n 'warning' => 'Value must be a positive integer'\n ]);\n wp_die();\n }\n $amt = ((int) $value) * ((int) $act->points);\n break;\n case 'radio':\n if (! strlen($value)) {\n print json_encode([\n 'warning' => 'Must select one option'\n ]);\n wp_die();\n }\n break;\n case 'text':\n if (empty($value)) {\n print json_encode([\n 'warning' => 'Cannot save an empty entry'\n ]);\n wp_die();\n } elseif ($act->min && strlen($value) < $act->min) {\n print json_encode([\n 'warning' => 'Text must be at least ' . $act->min . ' characters'\n ]);\n wp_die();\n } elseif ($act->max && strlen($value) > $act->max) {\n print json_encode([\n 'warning' => 'Text must be less than ' . $act->max . ' characters'\n ]);\n wp_die();\n }\n }\n\n // check to see if they have reached the maximum points allowed for that activity during the challenge\n if ($act->chal_max) {\n $wpdb->query($wpdb->prepare(\"SET @challenge_id=%d\", $chal->id));\n $wpdb->query($wpdb->prepare(\"SET @activity_id=%d\", $act->id));\n $query = $wpdb->prepare(\"SELECT COALESCE(SUM(total_points),0)\nFROM {$wpdb->prefix}point_totals\nWHERE user_id = %d\", $user_id);\n $total_points = (int) $wpdb->get_var($query);\n\n // check to see if their current points + current value exceeds the maximum allowed\n if (($total_points + $amt) > $act->chal_max) {\n // check to see if the the maximum is still larger than what they have so we can\n // add the difference from what they just entered\n if ($act->chal_max > $total_points) {\n $params['value'] = $act->chal_max - $total_points;\n $altered = true;\n } else {\n print json_encode([\n 'error' => 'You have reached the maximum points allowed for this activity for the duration \".\n \"of the challenge'\n ]);\n wp_die();\n }\n }\n }\n\n $res = $wpdb->insert(\"{$wpdb->prefix}pt_log\", $params);\n\n print json_encode($res && $altered ? [\n 'warning' => \"You have reached the maximum points allowed for this activity ({$act->chal_max}) \".\n \"so your points were altered\"\n ] : ($res ? [\n 'success' => 'Activity was added'\n ] : [\n 'error' => 'You have already recorded this activity for today'\n ]));\n\n wp_die();\n }", "title": "" }, { "docid": "6df2dc41e6ff98f46a10b6a99f2225fc", "score": "0.48785627", "text": "function wpt_custom_message_validation() { \n if ( empty( $_REQUEST['wpt_custom_message'] ) ) {\n wc_add_notice( __( 'Please enter Short Message', 'wpt_pro' ), 'error' );\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "933c1108931f6a8b46ec623f51e96f88", "score": "0.48758453", "text": "function GTU_L_SLP_SaveLocation( $post_ID, $post, $update ) {\r\n\t// Do something\r\n}", "title": "" }, { "docid": "0724f7bd88065d856c14e609adc09005", "score": "0.48732802", "text": "function storypoints_static_insert(){\n\tglobal $Translation;\n\n\tif($_GET['insert_x']!=''){$_POST=$_GET;}\n\n\t// mm: can member insert record?\n\t$arrPerm=getTablePermissions('storypoints_static');\n\tif(!$arrPerm[1]){\n\t\treturn false;\n\t}\n\n\t$data['story'] = makeSafe($_POST['story']);\n\t\tif($data['story'] == empty_lookup_value){ $data['story'] = ''; }\n\t$data['throughline'] = makeSafe($_POST['throughline']);\n\t\tif($data['throughline'] == empty_lookup_value){ $data['throughline'] = ''; }\n\t$data['throughline_domain'] = makeSafe($_POST['throughline_domain']);\n\t\tif($data['throughline_domain'] == empty_lookup_value){ $data['throughline_domain'] = ''; }\n\t$data['concern'] = makeSafe($_POST['concern']);\n\t\tif($data['concern'] == empty_lookup_value){ $data['concern'] = ''; }\n\t$data['issue'] = makeSafe($_POST['issue']);\n\t\tif($data['issue'] == empty_lookup_value){ $data['issue'] = ''; }\n\t$data['problem'] = makeSafe($_POST['problem']);\n\t\tif($data['problem'] == empty_lookup_value){ $data['problem'] = ''; }\n\t$data['solution'] = makeSafe($_POST['solution']);\n\t\tif($data['solution'] == empty_lookup_value){ $data['solution'] = ''; }\n\t$data['symptom'] = makeSafe($_POST['symptom']);\n\t\tif($data['symptom'] == empty_lookup_value){ $data['symptom'] = ''; }\n\t$data['response'] = makeSafe($_POST['response']);\n\t\tif($data['response'] == empty_lookup_value){ $data['response'] = ''; }\n\t$data['catalyst'] = makeSafe($_POST['catalyst']);\n\t\tif($data['catalyst'] == empty_lookup_value){ $data['catalyst'] = ''; }\n\t$data['inhibitor'] = makeSafe($_POST['inhibitor']);\n\t\tif($data['inhibitor'] == empty_lookup_value){ $data['inhibitor'] = ''; }\n\t$data['benchmark'] = makeSafe($_POST['benchmark']);\n\t\tif($data['benchmark'] == empty_lookup_value){ $data['benchmark'] = ''; }\n\n\t// hook: storypoints_static_before_insert\n\tif(function_exists('storypoints_static_before_insert')){\n\t\t$args=array();\n\t\tif(!storypoints_static_before_insert($data, getMemberInfo(), $args)){ return false; }\n\t}\n\n\t$o=array('silentErrors' => true);\n\tsql('insert into `storypoints_static` set `story`=' . (($data['story'] !== '' && $data['story'] !== NULL) ? \"'{$data['story']}'\" : 'NULL') . ', `throughline`=' . (($data['throughline'] !== '' && $data['throughline'] !== NULL) ? \"'{$data['throughline']}'\" : 'NULL') . ', `throughline_domain`=' . (($data['throughline_domain'] !== '' && $data['throughline_domain'] !== NULL) ? \"'{$data['throughline_domain']}'\" : 'NULL') . ', `concern`=' . (($data['concern'] !== '' && $data['concern'] !== NULL) ? \"'{$data['concern']}'\" : 'NULL') . ', `issue`=' . (($data['issue'] !== '' && $data['issue'] !== NULL) ? \"'{$data['issue']}'\" : 'NULL') . ', `problem`=' . (($data['problem'] !== '' && $data['problem'] !== NULL) ? \"'{$data['problem']}'\" : 'NULL') . ', `solution`=' . (($data['solution'] !== '' && $data['solution'] !== NULL) ? \"'{$data['solution']}'\" : 'NULL') . ', `symptom`=' . (($data['symptom'] !== '' && $data['symptom'] !== NULL) ? \"'{$data['symptom']}'\" : 'NULL') . ', `response`=' . (($data['response'] !== '' && $data['response'] !== NULL) ? \"'{$data['response']}'\" : 'NULL') . ', `catalyst`=' . (($data['catalyst'] !== '' && $data['catalyst'] !== NULL) ? \"'{$data['catalyst']}'\" : 'NULL') . ', `inhibitor`=' . (($data['inhibitor'] !== '' && $data['inhibitor'] !== NULL) ? \"'{$data['inhibitor']}'\" : 'NULL') . ', `benchmark`=' . (($data['benchmark'] !== '' && $data['benchmark'] !== NULL) ? \"'{$data['benchmark']}'\" : 'NULL'), $o);\n\tif($o['error']!=''){\n\t\techo $o['error'];\n\t\techo \"<a href=\\\"storypoints_static_view.php?addNew_x=1\\\">{$Translation['< back']}</a>\";\n\t\texit;\n\t}\n\n\t$recID=db_insert_id(db_link());\n\n\t// hook: storypoints_static_after_insert\n\tif(function_exists('storypoints_static_after_insert')){\n\t\t$res = sql(\"select * from `storypoints_static` where `id`='\" . makeSafe($recID) . \"' limit 1\", $eo);\n\t\tif($row = db_fetch_assoc($res)){\n\t\t\t$data = array_map('makeSafe', $row);\n\t\t}\n\t\t$data['selectedID'] = makeSafe($recID);\n\t\t$args=array();\n\t\tif(!storypoints_static_after_insert($data, getMemberInfo(), $args)){ return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID); }\n\t}\n\n\t// mm: save ownership data\n\tsql(\"insert into membership_userrecords set tableName='storypoints_static', pkValue='$recID', memberID='\".getLoggedMemberID().\"', dateAdded='\".time().\"', dateUpdated='\".time().\"', groupID='\".getLoggedGroupID().\"'\", $eo);\n\n\treturn (get_magic_quotes_gpc() ? stripslashes($recID) : $recID);\n}", "title": "" }, { "docid": "ecbc67f4f50f4530da56553061251b38", "score": "0.48703504", "text": "function check_post() {\r\n\tglobal $template_footer;\r\n\t// TODO Fix\r\n\tif(isset($_POST['users'])) {\r\n\t\tsubmit();\r\n\t} else {\r\n\t\tdisplay_unsubmitted_page_contents();\r\n\t}\r\n}", "title": "" }, { "docid": "a50fe20222b6e14e81debcc9d27c0096", "score": "0.48678777", "text": "function action_callback() {\n // Validate nonce token.\n check_ajax_referer( 'my_action_nonce', 'nonce' );\n\n // Action logic...\n\n die();\n }", "title": "" }, { "docid": "1b68ffd5b6540f29186d6b56d8955b05", "score": "0.48604462", "text": "public function handle_ajax_action() {\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( $_REQUEST['nonce'], self::AJAX_ACTION ) ) {\n\t\t\twp_send_json_success( array(\n\t\t\t\t'message' => esc_html__( 'Request expired, please refresh and try again.', 'it-l10n-ithemes-security-pro' ),\n\t\t\t) );\n\t\t}\n\n\t\trequire_once( ITSEC_Core::get_core_dir() . 'lib/class-itsec-lib-fingerprinting.php' );\n\n\t\tif ( ! ITSEC_Lib_Fingerprinting::applies_to_user() ) {\n\t\t\twp_send_json_error( esc_html__( 'Trusted Devices is not enabled for your account.', 'it-l10n-ithemes-security-pro' ) );\n\t\t}\n\n\t\tif ( ! ITSEC_Lib_Fingerprinting::is_current_fingerprint_safe() ) {\n\t\t\t$current = ITSEC_Lib_Fingerprinting::get_current_fingerprint();\n\n\t\t\tif ( $current && ( $current->is_pending() || $current->is_pending_auto_approval() ) ) {\n\t\t\t\t$this->send_unrecognized_login( $current ); // Todo: Replace with dedicated confirm email.\n\t\t\t}\n\n\t\t\twp_send_json_error( array(\n\t\t\t\t'message' => esc_html__( \"Your current device is unconfirmed, so you do not have permission to approve new devices. Check your email for a link to approve this current device.\", 'it-l10n-ithemes-security-pro' )\n\t\t\t) );\n\t\t}\n\n\t\tif ( ! isset( $_REQUEST['itsec_uuid'], $_REQUEST['itsec_action'] ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'message' => esc_html__( 'Invalid request format.', 'it-l10n-ithemes-security-pro' ),\n\t\t\t) );\n\t\t}\n\n\t\t$fingerprint = ITSEC_Fingerprint::get_by_uuid( $_REQUEST['itsec_uuid'] );\n\n\t\tif ( ! $fingerprint || $fingerprint->get_user()->ID !== get_current_user_id() || ! $fingerprint->can_change_status() ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'message' => esc_html__( 'Invalid Device', 'it-l10n-ithemes-security-pro' ),\n\t\t\t) );\n\t\t}\n\n\t\tswitch ( $_REQUEST['itsec_action'] ) {\n\t\t\tcase 'approve':\n\t\t\t\tif ( ! $fingerprint->approve() ) {\n\t\t\t\t\twp_send_json_error( array( 'message' => esc_html__( 'Failed to approve device. Please refresh and try again, then contact a site administrator.', 'it-l10n-ithemes-security-pro' ) ) );\n\t\t\t\t}\n\n\t\t\t\twp_send_json_success( array(\n\t\t\t\t\t'message' => esc_html__( 'Device approved!', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t) );\n\t\t\tcase 'deny':\n\t\t\t\tif ( ! $fingerprint->deny() ) {\n\t\t\t\t\twp_send_json_error( array( 'message' => esc_html__( 'Failed to block device. Please refresh and try again, then contact a site administrator.', 'it-l10n-ithemes-security-pro' ) ) );\n\t\t\t\t}\n\n\t\t\t\twp_send_json_success( array(\n\t\t\t\t\t'message' => esc_html__( 'Device blocked. For security purposes you must reset your password immediately.', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t\t'url' => $this->get_reset_pass_url( $fingerprint->get_user() ),\n\t\t\t\t) );\n\t\t\tdefault:\n\t\t\t\twp_send_json_error( array(\n\t\t\t\t\t'message' => esc_html__( 'Invalid request format.', 'it-l10n-ithemes-security-pro' )\n\t\t\t\t) );\n\t\t}\n\t}", "title": "" }, { "docid": "a9f16b91142d40b708dc9f82992f0af8", "score": "0.48588604", "text": "public function company_update_form_handler() {\n global $wpdb;\n\n $current_user = wp_get_current_user();\n $userid = $current_user->ID;\n\n if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'company-profile' ) ) {\n wp_send_json_success([\n 'message' => 'Nonce verification failed!'\n ]);\n }\n\n \n // $company_name = $_REQUEST['company_name'];\n // $zip_code = $_REQUEST['zip_code'] ;\n // $contact_person = $_REQUEST['contact_person'];\n // $phone_number = $_REQUEST['phone_number'];\n // $company_address = $_REQUEST['company_address'];\n // $company_address_2 = $_REQUEST['company_address_2'];\n\n $id = isset( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;\n\n $company_name = isset( $_POST['company_name'] ) ? sanitize_text_field( $_POST['company_name'] ) : '';\n $zip_code = isset( $_POST['zip_code'] ) ? sanitize_textarea_field( $_POST['zip_code'] ) : '';\n $contact_person = isset( $_POST['contact_person'] ) ? sanitize_text_field( $_POST['contact_person'] ) : '';\n $phone_number = isset( $_POST['phone_number'] ) ? sanitize_text_field( $_POST['phone_number'] ) : '';\n $company_address = isset( $_POST['company_address'] ) ? sanitize_textarea_field( $_POST['company_address'] ) : '';\n $company_address_2 = isset( $_POST['company_address_2'] ) ? sanitize_text_field( $_POST['company_address_2'] ) : '';\n $cvr_number = isset( $_REQUEST['cvr_number'] ) ? $_REQUEST['cvr_number'] : '';\n $bookingkeepere_email = isset( $_REQUEST['bookingkeepere_email'] ) ? $_REQUEST['bookingkeepere_email'] : '';\n $profile_pic = isset( $_POST['ss_image_id'] ) ? sanitize_text_field( $_POST['ss_image_id'] ) : '';\n\n\n\n $updated = $wpdb->update(\"{$wpdb->prefix}company_info\", array(\n 'company_id' \t => $id ,\n 'company_name' \t => $company_name,\n 'zip_code' \t => $zip_code,\n 'contact_person'\t => $contact_person,\n 'phone_number' \t => $phone_number,\n 'company_address' \t => $company_address,\n 'company_address_2' => $company_address_2,\n 'cvr_number' => $cvr_number,\n 'bookingkeepere_email' => $bookingkeepere_email,\n\n ), array( 'company_id' => $id ));\n\n if(!empty($profile_pic)){\n update_user_meta( $userid, 'ss_pro_pic', $profile_pic );\n }\n\n if ( false === $updated ) {\n wp_send_json_error([\n 'message' => 'Data has not updated'\n ]);\n } else {\n wp_send_json_success([\n 'message' => 'Profile Update has been successfully!'\n ]);\n } \n \n }", "title": "" }, { "docid": "617d572ddc0d0a66b6926cf483255b3c", "score": "0.48560205", "text": "public function validate_field_timestamp ( $v ) {\n\t\t$defaults = array( 'date' => '', 'hour' => '', 'minute' => '' );\n\t\t$v = wp_parse_args( $v, $defaults );\n\n\t\tforeach ( $v as $i => $j ) {\n\t\t\tif ( ! in_array( $i, array_keys( $defaults ) ) ) {\n\t\t\t\tunset( $v[$i] );\n\t\t\t}\n\t\t}\n\n\t\t$date = $v['date'];\n\n\t\t$hour = $v['hour'];\n\t\t$minute = $v['minute'];\n\t\t// $second = $output[$option_array['id']]['second'];\n\t\t$second = '00';\n\n\t\t$day = substr( $date, 3, 2 );\n\t\t$month = substr( $date, 0, 2 );\n\t\t$year = substr( $date, 6, 4 );\n\n\t\t$timestamp = mktime( $hour, $minute, $second, $month, $day, $year );\n\n\t\treturn esc_attr( $timestamp );\n\t}", "title": "" }, { "docid": "cc7faaf9a860e0ceb634b320e0564854", "score": "0.48495755", "text": "function ot_ctas_save_postdata( $post_id ) {\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n\n if ( !wp_verify_nonce( $_POST['ot_ctas_noncename'], plugin_basename(__FILE__) ) )\n return $post_id;\n // verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) \n return $post_id;\n\n\n // Check permissions\n if ( 'cta' == $_POST['post_type'] ) \n {\n if ( !current_user_can( 'edit_page', $post_id ) )\n return $post_id;\n }\n else\n {\n if ( !current_user_can( 'edit_post', $post_id ) )\n return $post_id;\n }\n\n // OK, we're authenticated: we need to find and save the data\n\n\t$ot_cta = $_POST['ot_cta'];\n\t$track = $_POST['pageview'];\n\n // update the data\n\tupdate_post_meta($post_id, 'ot_cta', $ot_cta);\n\tupdate_post_meta($post_id, 'pageview', $track);\n}", "title": "" }, { "docid": "5fd2cd2d3521d09126390b5c12c271dc", "score": "0.48493335", "text": "function tg_printFormNonce($form)\n{\n echo tg_getFormNonce($form);\n}", "title": "" }, { "docid": "c183ccd09862fa3e13d156816c62cdb4", "score": "0.48486072", "text": "abstract function check_data($formdata);", "title": "" }, { "docid": "8bf737aac09f14ceb1a1f40c62bd519b", "score": "0.4848467", "text": "function form_cart_validation() {\n global $post;\n extract($_REQUEST);\n $id = $post->ID;\n if (empty($_REQUEST['bathroom']) && get_post_meta($product_id, '_select_bathroom_filter', true) == 1) {\n wc_add_notice(__('Please enter no of bathroom &hellip;', 'woocommerce'), 'error');\n return false;\n }\n if (empty($_REQUEST['bedroom']) && get_post_meta($product_id, '_select_bedroom_filter', true) == 1) {\n wc_add_notice(__('Please enter no of bedroom &hellip;', 'woocommerce'), 'error');\n return false;\n }\n if ($_REQUEST['recommended_hour'] > $_REQUEST['service_hour']) {\n // wc_add_notice( __( 'Please select greater than or equal to recommended hours &hellip;', 'woocommerce' ), 'error' );\n // return false;\n }\n $start_time = date(\"H:i:s\", strtotime($time));\n $t = EXPLODE(\".\", $recommended_hour);\n $h = $t[0];\n IF (ISSET($t[1])) {\n $m = $t[1];\n } ELSE {\n $m = \"00\";\n }\n if ($m != '00')\n $mm = ($h * 60) + 30;\n else\n $mm = ($h * 60);\n $end_time = trim(date('H:i:s', strtotime('+' . $mm . ' minutes', strtotime($start_time))));\n //wc_add_notice(__($time.\"==>\".$start_time.\"==>\".$h.\"=>\".$m.'='.$mm.'Appointment must start after 7:00 AM and end before 11:00 PM==>'.$end_time, 'woocommerce'), 'error');\n if ($end_time > \"23:00:00\" || $end_time < \"07:00:00\") {\n wc_add_notice(__('Appointment must start after 7:00 AM and end before 11:00 PM', 'Avada'), 'error');\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "d6e9b71064d7b39204738855b3a62231", "score": "0.48466608", "text": "public function checkDataSubmission() {\n\t\t$this->publishAccessTokenToCookie();\n\t}", "title": "" }, { "docid": "08927623b7e254a08538722398f4a5b4", "score": "0.48378763", "text": "private function ajax_authenticate( $args = array() ) {\n\t\t// Read arguments\n\t\t$type_of_death = wpcf_getarr( $args, 'type_of_death', 'die', array( 'die', 'return' ) );\n\t\t$nonce_name = wpcf_getarr( $args, 'nonce' );\n\t\t$nonce_parameter = wpcf_getarr( $args, 'nonce_parameter', 'wpnonce' );\n\t\t$capability_needed = wpcf_getarr( $args, 'capability_needed', 'manage_options' );\n\t\t$parameter_source_name = wpcf_getarr( $args, 'parameter_source', 'post', array( 'get', 'post' ) );\n\t\t$parameter_source = ( $parameter_source_name == 'get' ) ? $_GET : $_POST;\n\n\t\t$is_error = false;\n\t\t$error_message = null;\n\t\t$error_type = null;\n\n\t\t// Check permissions\n\t\tif ( ! current_user_can( $capability_needed ) ) {\n\t\t\t$error_message = __( 'You do not have permissions for that.', 'wpv-views' );\n\t\t\t$error_type = 'capability';\n\t\t\t$is_error = true;\n\t\t}\n\n\t\t// Check nonce\n\t\tif ( !$is_error && !wp_verify_nonce( wpcf_getarr( $parameter_source, $nonce_parameter, '' ), $nonce_name ) ) {\n\t\t\t$error_message = __( 'Your security credentials have expired. Please reload the page to get new ones.', 'wpv-views' );\n\t\t\t$error_type = 'nonce';\n\t\t\t$is_error = true;\n\t\t}\n\n\t\tif( $is_error ) {\n\t\t\t$error_description = array( 'type' => $error_type, 'message' => $error_message );\n\t\t\tswitch( $type_of_death ) {\n\n\t\t\t\tcase 'die':\n\t\t\t\t\twp_send_json_error( $error_description );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'return':\n\t\t\t\tdefault:\n\t\t\t\t\treturn $error_description;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "287d9be15615a66ddf444c934ea760b6", "score": "0.48317397", "text": "function dh_wsp_gwp_monthly_form_submit(&$form, &$form_state) {\n #error_log('form state:' . print_r($form_state,1));\n //dpm($form_state,'form_state');\n $dh_timeseries = dh_wsp_gwp_monthly_form_save($form, $form_state);\n $parms = drupal_get_query_parameters();\n $wellid = $dh_timeseries->featureid;\n // can't do this automatically with arg() because when submitting with ajax it breaks the URL args\n $args = arg();\n //$args = array('ows-wwpr-well-monthly', $wellid);\n $finaldest = FALSE;\n if (isset($parms['finaldest'])) {\n $finaldest = $parms['finaldest'];\n }\n // get GWP adminreg id to insure we have the right program\n // gwp admincode = vdeq_gwp \n $authid = dh_adminreg_get_adminreg_entity('vdeq_gwp');\n $gwpid = array_shift($authid);\n $facilityid = dh_getMpFacilityHydroId($wellid);\n if ($form_state['values']['permit_id'] == NULL) {\n $permit_id = dh_adminreg_get_admin_location($facilityid, FALSE, FALSE, $gwpid);\n } else {\n // we were called with the a permit id \n $permit_id = $form_state['values']['permit_id'];\n //dpm($permit_id,\"passed in permitid\");\n }\n //dpm($info,'receipt info');\n //dpm($receipt,'created receipt');\n // ****************\n // Now handle the specific save type requested.\n // handle save_and_next if requested\n // if add, we route to set properties, then to monthly data entry\n // if edit we just honor the destination that already is set\n if ($form_state['triggering_element']['#id'] == 'edit-save-and-next') {\n $next_feature = dh_monthly_get_next_mp($wellid, 'active', 'well');\n $args[0] = 'ows-wwpr-well-monthly'; # defaults to this page\n if ($next_feature) {\n // we have what we need so lets go to the next one\n $args[1] = $next_feature->hydroid;\n $url = implode('/', $args);\n }\n } else {\n if ($form_state['triggering_element']['#id'] == 'edit-save-and-submit') {\n // regular save here, and if we have a finaldest param we use it as our destination\n // the default should be the save page\n if ($finaldest) {\n $url = $finaldest;\n unset($parms);\n } else {\n $url = implode('/', array('ows-wwpr-permit-info', $permit_id));\n if (!$permit_id) {\n // not a permit, try a vwuds registration, else bail.\n $url = implode('/', array('ows-vwuds-facility-info', $facilityid));\n }\n $fac = entity_load_single('dh_feature', $facilityid);\n drupal_set_message(\"Withdrawal Report for $fac->name.\");\n }\n //dpm($permit_id, \"permit_id for well $wellid fac $facilityid\");\n // now set a vadeq_report_wd on the permit-info\n // due date = \n $year = date('Y', $dh_timeseries->tstime);\n $year = ($dh_timeseries->quarter == 4) ? $year + 1 : $year;\n $mo = ($dh_timeseries->quarter == 4) ? 1 : $dh_timeseries->quarter * 3 + 1;\n $day = 10;\n $info = array(\n 'varkey' => 'vadeq_report_wd',\n 'tsendtime' => dh_handletimestamp(date('Y-m-d')),\n 'tstime' => dh_handletimestamp(\"$year-$mo-$day\"),\n 'featureid' => $permit_id,\n 'tsvalue' => 0,\n 'entity_type' => 'dh_adminreg_feature',\n 'tscode' => 'submitted',\n );\n // we should only save this if it does *not* exist, otherwise, the initial receipt will be overwritten\n // but since the requirements ask for this audit trail every time we save, se la vie\n\n $receipt = dh_get_timeseries($info , 'tstime_singular', TRUE);\n $receipt = array_shift($receipt);\n if (!is_object($receipt)) {\n dsm(\"Adding receipt record.\");\n $receipt = dh_update_timeseries($info, 'tsendtime_singular');\n } else {\n //dsm(\"Receipt record already exists.\");\n }\n } else {\n // regular save here and we should reload this same form page\n $args[0] = 'ows-wwpr-well-monthly'; # defaults to this page\n $url = implode('/', $args);\n drupal_set_message(\"Updating Withdrawal Form Calculations.\");\n /*\n if ($finaldest) {\n $url = $finaldest;\n unset($parms);\n } else {\n $url = implode('/', array('ows-wwpr-well-info', $wellid));\n }\n */\n }\n }\n drupal_goto($url, array('query' => $parms));\n}", "title": "" }, { "docid": "23ea6b1f690c992b264fc410c342409c", "score": "0.48296264", "text": "function heart_beat_post(){\n\t $owner_id = $this->User_model->checkAdminToken($this->admin_token);\t \n\t if($owner_id <= 0){\n\t\t//$this->response(array('code'=>0,'error' => \"Invalid Token\"), 404);\n $response_arr = array('code'=>0,'error' => \"Invalid Token\"); \n $this->response($response_arr, 404);\n\t }\n //-----------------------------------//\t \n\t\t$sess_id = $this->post('sess_id');\n\t\t$is_active = $this->post('status');\n\t\t$endtime = $this->post('end_time');\t\t\n\t\t$this->User_model->checksession($sess_id,$is_active,$endtime);\n\t\t$this->response(array('code'=>1), 200); \n\t}", "title": "" }, { "docid": "713b87ca073df47de74cb60b66d5a0d7", "score": "0.48254776", "text": "protected function doCheck() {\r\n\t\t\r\n\t\t$value = $this->settings['minTime.']['value'];\r\n\t\t$unit = $this->settings['minTime.']['unit'];\r\n\t\t$minTime = F3_MailformPlusPlus_StaticFuncs::convertToSeconds($value, $unit);\r\n\t\t\r\n\t\t\r\n\t\t$value = $this->settings['maxTime.']['value'];\r\n\t\t$unit = $this->settings['maxTime.']['unit'];\r\n\t\t$maxTime = F3_MailformPlusPlus_StaticFuncs::convertToSeconds($value, $unit);\r\n\t\t$spam = FALSE;\r\n\t\tif (\t!isset($this->gp['formtime']) || \r\n\t\t\t\t!is_numeric($this->gp['formtime'])) {\r\n\t\t\t\t\t\r\n\t\t\t$spam = TRUE;\r\n\t\t} elseif($minTime && time() - intval($this->gp['formtime']) < $minTime) {\r\n\t\t\t$spam = TRUE;\r\n\t\t} elseif($maxTime && time() - intval($this->gp['formtime']) > $maxTime) {\r\n\t\t\t$spam = TRUE;\r\n\t\t}\r\n\t\treturn $spam;\r\n\t}", "title": "" } ]
28f42d26383d43dda4671a5abab8ed4f
Binds the controller the route uses to be a method
[ { "docid": "a0f1f703357663628924123325138ad5", "score": "0.0", "text": "public function mapsToMethod(string $controllerClassName, string $controllerMethodName): static\n {\n $this->action = new RouteAction($controllerClassName, $controllerMethodName);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "cba70032d76a6c20c209cc5e3f56da0c", "score": "0.65138793", "text": "public function route()\n {\n\n $request = $this->pimple['request'];\n $route = $this->router->route($request->getPathInfo());\n $controllerAndAction = $route['callback'];\n $controllerName = $controllerAndAction[0];\n $actionName = $controllerAndAction[1];\n $controller = new $controllerName($actionName, $this->pimple);\n $controller->beforeAction();\n $parameters = $route['vars'];\n if (is_array($parameters) == true) {\n call_user_func_array(array($controller, $actionName), $parameters);\n } else {\n $controller->$actionName();\n }\n $controller->afterAction();\n\n }", "title": "" }, { "docid": "edf103dded82f18e748e61d01f954c95", "score": "0.646701", "text": "private function routeController() {\n // figure out which controller to run\n foreach ($_GET as $key => $value) {\n $this->params = explode(\"/\",$key);\n break;\n }\n\n // save the params before being shifted\n $this->calls = $this->params;\n $this->controller = array_shift($this->params);\n $this->function = array_shift($this->params);\n $this->param = array_shift($this->params);\n }", "title": "" }, { "docid": "9ef9e430041a164380ce8cbd788351bc", "score": "0.6315195", "text": "public static function controller(){\n\n $arguments = func_get_args();\n $path = $arguments[0];\n $controller = end($arguments);\n\n $class = new \\ReflectionClass($controller);\n $controllerMethods = $class->getMethods(\\ReflectionMethod::IS_PUBLIC);\n\n $uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n foreach ($controllerMethods as $method) {\n if(substr($method->name, 0, 2) != '__'){\n $methodName = $method->name;\n $callable = $arguments;\n\n $pos = strcspn($methodName, $uppercase);\n $httpMethod = substr($methodName, 0, $pos);\n $ctrlMethod = lcfirst(strpbrk($methodName, $uppercase));\n\n if($ctrlMethod == 'index'){\n $pathMethod = $path;\n }else if($httpMethod == 'get'){\n $pathMethod = \"$path/$ctrlMethod(/:params+)\";\n }else{\n $pathMethod = \"$path/$ctrlMethod\";\n }\n\n //put edited pattern to the top stack\n array_shift($callable);\n array_unshift($callable, $pathMethod);\n\n //put edited controller to the bottom stack\n array_pop($callable);\n array_push($callable, \"$controller:$methodName\");\n\n call_user_func_array(array(self::$slim, $httpMethod), $callable);\n }\n }\n }", "title": "" }, { "docid": "0a8a99f94548125e855b89260f9c76a7", "score": "0.6204458", "text": "protected function route() {\n // Get URL and request method.\n $this->request_method = strtolower($_SERVER['REQUEST_METHOD']);\n $this->path_info = (strpos($_SERVER['REQUEST_URI'], '?') > 0) ? strstr($_SERVER['REQUEST_URI'], '?', true) : $_SERVER['REQUEST_URI'];\n\n //Break URL into segments\n if ($this->path_info === 'Index.php') {\n $this->path_info = '/';\n }\n $this->path_info = explode('/', $this->path_info);\n array_shift($this->path_info);\n\n //Workaround for subdir - please refer to doc\n if (defined('SUBDIR') && SUBDIR == $this->path_info[0]) {\n array_splice($this->path_info, 0, 1);\n }\n\n //Set corrosponding controller\n if (isset($this->path_info[0]) && !empty($this->path_info[0])) {\n $controller = $collection->getController(ucfirst($this->path_info[0]));\n } else {\n $controller = $collection->getNamespace().'\\Main';\n }\n\n //Dispach the method according to URL\n if (class_exists($controller)) {\n $controller = new $controller();\n $function = $this->getMethod($controller);\n $this->dispatch($controller, $function);\n } else {\n $controller = $collection->getNamespace().'\\Main';\n array_unshift($this->path_info, '');\n $function = $this->getMethod($controller);\n $this->dispatch($controller, $function);\n }\n }", "title": "" }, { "docid": "e18b36f0d506ed34ff8d9f2199f92426", "score": "0.6043219", "text": "public function routeRequest()\r\n {\r\n return new CDController($this->request);\r\n }", "title": "" }, { "docid": "caad4a3a66464fe03fef84c87aa9aaf2", "score": "0.60332626", "text": "public function getController(Request $request): callable;", "title": "" }, { "docid": "297f82cc6e0a12cbaa6a9f46e734ee9d", "score": "0.6015069", "text": "public function route() {\n \ttry {\n\t\t\t// Check if class exist\n\t\t\t// If not try to load file with controller name from controllers folder \n\t\t\tif (!class_exists($this->getController()))\n\t\t\t{\n\t\t\t\t$path = ROOT_DIR . \"controllers/\" . $this->getController() . \".php\";\n\t\t\t\t\n\t\t\t\tif (file_exists($path)) {\n\t\t\t\t\trequire_once($path);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Controller file not found');\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// Check if class exist and can be instantiated\n\t if (class_exists($this->getController())) {\n\t $rc = new ReflectionClass($this->getController());\n\t \n\t\t\t\t// Check if class implements IController interface\n\t if ($rc->ImplementsInterface('IController')) {\n\t\t\t\t\n\t\t\t\t\t// Check if class has action specified method \n\t\t\t\t\t// Invoke method\n\t if ($rc->hasMethod($this->getAction())) {\n\t $controller = $rc->newInstance();\n\t $method = $rc->getMethod($this->getAction());\n\t $method->invoke($controller);\n\t } else {\n\t throw new Exception(\"Action not found\");\n\t }\n\t } else {\n\t \tthrow new Exception('Controller does not implements IController'); \n\t }\n\t } else {\n\t \tthrow new Exception('Controller not found'); \n\t }\n \t} catch (Exception $e) {\n \t\t//Display an error message\n\t\t\tflash_error('Page not found');\n\t\t\tredirect();\n \t}\n }", "title": "" }, { "docid": "6de8a12721be31a52ae8266672e8b019", "score": "0.59947306", "text": "function route($controller, $action)\n{\n\tswitch($controller)\n\t{\n\t\tcase 'main':\n\t\t\t$controller = new App\\Controllers\\MainController();\n\t\t\tbreak;\n\t\tcase 'blocks':\n\t\t\t$controller = new App\\Controllers\\BlocksController();\n\t\t\tbreak;\n\t\tcase 'followers':\n\t\t\t$controller = new App\\Controllers\\FollowersController();\n\t\t\tbreak;\n\t\tcase 'friends':\n\t\t\t$controller = new App\\Controllers\\Friends();\n\t\t\tbreak;\n\t}\n\t$controller->{$action}();\n}", "title": "" }, { "docid": "9c60fbff64810741d378ec324a56be82", "score": "0.58045894", "text": "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.57824874", "text": "public function getController();", "title": "" }, { "docid": "ee7d0e0d54cf50b33eb81e36875ed2da", "score": "0.57749504", "text": "protected function registerUserController()\n {\n $this->app->bind('GrahamCampbell\\Credentials\\Controllers\\UserController', function ($app) {\n $credentials = $app['credentials'];\n\n return new Controllers\\UserController($credentials);\n });\n }", "title": "" }, { "docid": "53332fdc8fca23ea41915f9df633ca0f", "score": "0.57491934", "text": "protected function registerAccountController()\n {\n $this->app->bind('GrahamCampbell\\Credentials\\Controllers\\AccountController', function ($app) {\n $credentials = $app['credentials'];\n\n return new Controllers\\AccountController($credentials);\n });\n }", "title": "" }, { "docid": "0ef8c63695de49f4bea330e811f68175", "score": "0.5707791", "text": "public function FrontControllerRoute() {\n // Take current url and divide it in controller, method and parameters\n $this->request = new CRequest($this->config['url_type']);\n $this->request->Init($this->config['base_url']);\n $controller = $this->request->controller;\n $method = $this->request->method;\n $arguments = $this->request->arguments;\n\n\n// Is the controller enabled in config.php?\n $controllerExists = isset($this->config['controllers'][$controller]);\n $controllerEnabled = false;\n $className = false;\n $classExists = false;\n\n if($controllerExists) {\n $controllerEnabled = ($this->config['controllers'][$controller]['enabled'] == true);\n $className = $this->config['controllers'][$controller]['class'];\n $classExists = class_exists($className);\n }\n \n // Check if controller has a callable method in the controller class, if then call it\n //Här används Reflection för att anropa rätt metod i klassen.\n if($controllerExists && $controllerEnabled && $classExists) {\n $rc = new ReflectionClass($className);\n if($rc->implementsInterface('IController')) {\n if($rc->hasMethod($method)) {\n $controllerObj = $rc->newInstance();\n $methodObj = $rc->getMethod($method);\n $methodObj->invokeArgs($controllerObj, $arguments);\n } else {\n die(\"404. \" . get_class() . ' error: Controller does not contain method.');\n }\n } else {\n die('404. ' . get_class() . ' error: Controller does not implement interface IController.');\n }\n }\n else {\n die('404. Page is not found.');\n }\n }", "title": "" }, { "docid": "42b0ea9f6e63f01775c527f7eae010db", "score": "0.5705589", "text": "protected function registerRegistrationController()\n {\n $this->app->bind('GrahamCampbell\\Credentials\\Controllers\\RegistrationController', function ($app) {\n $credentials = $app['credentials'];\n\n return new Controllers\\RegistrationController($credentials);\n });\n }", "title": "" }, { "docid": "476f98dee9b2e518f7fa7e0a0a8697a7", "score": "0.5703631", "text": "public function callController()\r\n\t{\r\n\t\tlist($page, $controller, $path) = $this->_traverseRoute();\r\n\r\n\r\n\t\tif (!empty($path)) {\r\n\t\t\t$namespace = 'Application\\Controllers\\\\'.join('\\\\', array_map('ucwords', $path));\r\n\t\t\t$root_dir = $this->dir.'/Application/Controllers/'.join('/',array_map('ucwords', $path));\r\n\t\t} else {\r\n\t\t\t$namespace = 'Application\\Controllers';\r\n\t\t\t$root_dir = $this->dir.'/Application/Controllers';\r\n\t\t}\r\n\r\n\t\t// special case where controller needs to be landing\r\n\t\tif ($controller == \"\" && $page == '') {\r\n\t\t\t$controller = $this->Bootstrap->default_controller;\r\n\t\t\t$page = $this->Bootstrap->root;\r\n\t\t}\r\n\r\n\t\t// if controller case sensitivity is set to true, then the literal url\r\n\t\t// signifies the case of the controller, otherwise it follows proper case\r\n\t\t// \\Application\\Controllers\\ControllerName\r\n\t\tif (!CONTROLLER_CASE_SENSITIVE) {\r\n\t\t\t$page = ucwords($page);\r\n\t\t\t$controller = ucwords($controller);\r\n\t\t}\r\n\r\n\t\t$controllers = array();\r\n\t\tif ($page != $this->Bootstrap->root) {\r\n\t\t\tif ($controller == '') {\r\n\t\t\t\t$controller = $this->Bootstrap->default_controller;\r\n\t\t\t}\r\n\r\n\t\t\tif (!CONTROLLER_CASE_SENSITIVE) {\r\n\t\t\t\t$controller = ucwords($controller);\r\n\t\t\t}\r\n\r\n\t\t\t$controllers[0] = array(\r\n\t\t\t\t'page' => $page,\r\n\t\t\t\t'controller' => $controller,\r\n\t\t\t\t'php_file' => $root_dir.'/'.$controller.'.php',\r\n\t\t\t\t'class' => $namespace.'\\\\'.$controller,\r\n\t\t\t\t'_page' => false,\r\n\t\t\t);\r\n\t\t\t$controllers[1] = array(\r\n\t\t\t\t'page' => $this->Bootstrap->root,\r\n\t\t\t\t'controller' => $page,\r\n\t\t\t\t'php_file' => $root_dir.'/'.$page.'.php',\r\n\t\t\t\t'class' => $namespace.'\\\\'.$page,\r\n\t\t\t\t'_page' => true,\r\n\t\t\t);\r\n\t\t\t$controllers[2] = array(\r\n\t\t\t\t'page' => $this->Bootstrap->root,\r\n\t\t\t\t'controller' => $controller,\r\n\t\t\t\t'php_file' => $root_dir.'/'.$controller.'/'.$page.'.php',\r\n\t\t\t\t'class' => $namespace.'\\\\'.$controller.'\\\\'.$page,\r\n\t\t\t\t'_page' => false,\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$controllers[0] = array(\r\n\t\t\t\t'page' => $page,\r\n\t\t\t\t'controller' => $controller,\r\n\t\t\t\t'php_file' => $root_dir.'/'.$controller.'.php',\r\n\t\t\t\t'class' => $namespace.'\\\\'.$controller,\r\n\t\t\t\t'_page' => false,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\r\n\t\tfor ($i = 0; $i < count($controllers); $i++) {\r\n\t\t\t$php_file = $controllers[$i]['php_file'];\r\n\t\t\t$class = $controllers[$i]['class'];\r\n\t\t\t$page = $controllers[$i]['page'];\r\n\t\t\tif (is_readable($php_file)) {\r\n\t\t\t\t// redirect with query\r\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\r\n\t\t\t\tlist ($uri, $qst) = explode(\"?\", $uri);\r\n\t\t\t\tif (!preg_match(\"@/$@\", $uri) && $controllers[$i]['_page'] === true && REDIRECT_SLASH) {\r\n\t\t\t\t\t// strip the index\r\n\t\t\t\t\t$tmp = explode(\"&\", $qst);\r\n\t\t\t\t\tif (preg_match(\"@__library_router_route@\", $tmp[0])) {\r\n\t\t\t\t\t\tarray_shift($tmp); // strip the library off the query string and implode the rest\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$qst = implode('&', $tmp);\r\n\t\t\t\t\t$q = $uri.'/';\r\n\t\t\t\t\tif ($qst != '') {\r\n\t\t\t\t\t\t$q .= '?'.$qst;\r\n\t\t\t\t\t}\r\n\t\t\t\t\theader(':', true, 303);\r\n\t\t\t\t\theader('Location: '.$q);\r\n\t\t\t\t}\r\n\t\t\t\t$cr = new $class;\r\n\t\t\t\tif (method_exists($cr, $page)) {\r\n\t\t\t\t\tcall_user_func(array($cr, $page));\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} elseif (!method_exists($cr, $page) && method_exists($cr, '__call')) {\r\n\t\t\t\t\t$arguments = array();\r\n\t\t\t\t\t$cr->_call($page, $arguments);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow new \\EasyMVC\\Routers\\RouterException('Document not found');\r\n\r\n\t}", "title": "" }, { "docid": "e9d31bf2cf934f73d7974b451e44851a", "score": "0.56798846", "text": "protected function registerResetController()\n {\n $this->app->bind('GrahamCampbell\\Credentials\\Controllers\\ResetController', function ($app) {\n $credentials = $app['credentials'];\n\n return new Controllers\\ResetController($credentials);\n });\n }", "title": "" }, { "docid": "0161918a33991664565f2a91c5514b7e", "score": "0.56759727", "text": "function restController($method)\n {\n $req = $_REQUEST;\n switch ($method)\n {\n case \"get-ad\":\n $this->getAd($req['format']);\n break;\n case \"increment-choice\":\n $this->incrementChoice($req['adID']);\n break;\n case \"increment-vulnerable\":\n $this->incrementVul($req['adID']);\n break;\n }\n }", "title": "" }, { "docid": "dfb95952dd98483980cbec375af61150", "score": "0.5582635", "text": "public function fromControllerMethod(string $controllerClass, string $method, array $args = []) {\n $annotationReader = new AnnotationReader();\n $reflectionMethod = new \\ReflectionMethod($controllerClass, $method);\n $routeAnnotation = $annotationReader->getMethodAnnotation($reflectionMethod, Route::class);\n return $this->fromPath($routeAnnotation->path, $args);\n }", "title": "" }, { "docid": "99be221a7ce52519327a5fdb3c0855e2", "score": "0.5566589", "text": "public function getController(Request $request): callable|false;", "title": "" }, { "docid": "b58fa3c5c9cb552374a6691eb79f0f3f", "score": "0.55407137", "text": "private function routeRequest(){\n\n if ($this->controller) {\n $class_name = \"\\\\app\\\\classes\\\\controllers\\\\\".$this->controller; // prvi parametr\n $class_file = \"app/classes/controllers/\".$this->controller.\".php\";\n if (is_readable($class_file)) {\n $handler = new $class_name();\n if (($this->action) && method_exists($handler, $this->action)) { // kdyz existuje metoda action zavola se\n $handler->{$this->action}($this->params);\n return true;\n }\n elseif (!$this->action) { // existujici controller, vychozi metoda index = vychozi stranka kontroleru\n $handler->index();\n return true;\n }\n else { //neexistujici metoda controlleru -> 404\n $handler = new \\app\\classes\\controllers\\ Error();\n }\n }\n else { //neexistujci controler -> 404\n $handler = new \\app\\classes\\controllers\\ Error();\n }\n }\n else { //neexistujci controller -> home page = vychozi cesta\n $handler = new \\app\\classes\\controllers\\ Home();\n }\n\n // finalni zavolani handleru\n $handler->index();\n }", "title": "" }, { "docid": "1831ea1760dd52d8107db08f85c26d69", "score": "0.553773", "text": "public function route(){\n\n switch ($this->request->action) {\n\n case 'startVPN':\n $this->startVPN();\n break;\n case 'stopVPN':\n $this->stopVPN();\n break;\n case 'checkVPNStatus':\n $this->checkVPNStatus();\n break;\n case 'initializeModule':\n $this->initializeModule();\n break;\n case 'handleDependencies':\n $this->handleDependencies(false);\n break;\n case 'handleDependenciesSDCard':\n $this->handleDependenciesSDCard();\n break;\n case 'checkDependencies':\n $this->checkDependencies();\n break;\n case 'uploadFile':\n $this->uploadFile();\n break;\n }\n }", "title": "" }, { "docid": "4bffaca9824ebaec5ca980abf232c38a", "score": "0.5537717", "text": "public function route() {\n\t\t// Get the function mapped to the route.\n\t\t$function = $this->Router->mappedFunction();\n\t\t$this->$function();\n\t}", "title": "" }, { "docid": "eea76ca56cb3c4c8549edf344abd6b46", "score": "0.5533154", "text": "function template_redirect() {\n\t\t$controller = strtolower($this->query->get_controller());\n\t\t$available_controllers = $this->get_controllers();\n\t\t$enabled_controllers = explode(',', get_option('mb_api_controllers', 'core'));\n\t\t$active_controllers = array_intersect($available_controllers, $enabled_controllers);\n\n\t\tif ($controller) {\n\n\t\t\tif (!in_array($controller, $active_controllers)) {\n\t\t\t $this->error(\"Unknown controller '$controller'.\");\n\t\t\t}\n\t\t\t$controller_path = $this->controller_path($controller);\n\t\t\tif (file_exists($controller_path)) {\n\t\t\t require_once $controller_path;\n\t\t\t}\n\t\t\t$controller_class = $this->controller_class($controller);\n\n\t\t\tif (!class_exists($controller_class)) {\n\t\t\t $this->error(\"Unknown controller '$controller_class'.\");\n\t\t\t}\n\n\t\t\t$this->controller = new $controller_class();\n\t\t\t$method = $this->query->get_method($controller);\n\n\t\t\tif (!method_exists($this->controller, $method)) {\n\t\t\t\t$this->error(\"Call to unknown method '$method' in controller '$controller'\");\n\t\t\t}\n\t\t\tif ($method) {\n\n\t\t\t\t$this->response->setup();\n\n\t\t\t\t// Run action hooks for method\n\t\t\t\tdo_action(\"mb_api-{$controller}-$method\");\n\n\t\t\t\t// Error out if nothing is found\n\t\t\t\tif ($method == '404') {\n\t\t\t\t$this->error('Method not found');\n\t\t\t\t}\n\n\t\t\t\t// Run the method\n\t\t\t\t$result = $this->controller->$method();\n\n\t\t\t\t// Handle the result\n\t\t\t\t$this->response->respond($result);\n\n\t\t\t\t// Done!\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d5be5d307a51923bdea619fd153bae8b", "score": "0.5511402", "text": "public function resolve(string $uri, string $request_method)\n {\n $requested_resource = $this->getResourceFromUri($uri);\n if($requested_resource){\n\n $controller = $this->findControllerFromResource($requested_resource);\n\n if($controller){\n $controller_method = $this->getControllerMethod($uri, $requested_resource, $request_method);\n if($controller_method){\n\n $controller = $controller->newInstanceWithoutConstructor();\n $method_exists = method_exists($controller, $controller_method);\n\n if($method_exists){\n $reflectionMethod = new ReflectionMethod($controller, $controller_method);\n $has_parameters = false;\n\n $reflection_method_parameters = $reflectionMethod->getParameters();\n if(!empty($reflection_method_parameters)){\n $has_parameters = true;\n }\n \n // extract parameters\n $method_parameters = $this->getParameters($reflection_method_parameters, $uri, $request_method);\n\n if($has_parameters){\n return $controller->$controller_method($method_parameters);\n }\n return $controller->$controller_method();\n } else {\n return Response::send('Method ' . $controller_method . '() not found in ' . get_class($controller) , 400);\n // return $this->errorHandler->returnMessage('error', 'Method *' . $method . '* not found in ' . get_class($controller));\n }\n }\n\n return Response::send('Method not provided for resource in url: ' . $uri, 404);\n }\n\n return Response::send('Controller for requested resource - ' . $requested_resource . ' - not found.', 404);\n }\n return '/';\n }", "title": "" }, { "docid": "931bedd3bdc31f6108f09bd2e7887cd0", "score": "0.55056846", "text": "protected function _getController() {\n\t\t// Sort routes\n\t\tuasort($this->_routes, function($a, $b) {\n\t\t\treturn strlen($a->getChain()) - strlen($b->getChain());\n\t\t});\n\t\t// Get request object\n\t\t$lumy = Lumy\\Http::getInstance();\n\t\t$request = $lumy['request'];\n\t\t// Get request method\n\t\t$method = $request->getMethod();\n\t\t// Search\n\t\t$arguments = false;\n\t\tforeach($this->_routes as $route) {\n\t\t\t// Just match the request chain when its method is valid\n\t\t\tif(strpos($route->getChain(), $method) !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Get the HTTP request chain\n\t\t\telse{\n\t\t\t\t$route_chain = substr($route->getChain(), strpos($route->getChain(), '#') + 1);\n\t\t\t\t// By Scheme/Host/RequestURI\n\t\t\t\tif(strpos($route_chain,'http:') === 0 || strpos($route_chain,'https:') === 0) {\n\t\t\t\t\t$chain = $request->getChain();\n\t\t\t\t}\n\t\t\t\t// By Host/RequestURI\n\t\t\t\telseif(strpos($route_chain,'//') === 0) {\n\t\t\t\t\t$chain = '//'.$request->getHost().$request->getRequestUri();\n\t\t\t\t}\n\t\t\t\t// By RequestURI\n\t\t\t\t// The first condition is here to decrease RequestURI priority against ResourceUri\n\t\t\t\telseif(strpos($request->getResourceUri(),$route_chain) === false && $request->getRootUri() && strpos($route_chain, $request->getRootUri()) === 0) {\n\t\t\t\t\t$chain = $request->getRequestUri();\n\t\t\t\t}\n\t\t\t\t// By ResourceURI\n\t\t\t\telse{\n\t\t\t\t\t$chain = $request->getResourceUri();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Is this the good route?\n\t\t\tif(($arguments = $route->match($method.'#'.$chain)) !== false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// No controller found\n\t\tif($arguments === false) {\n\t\t\treturn false;\n\t\t}\n\t\t// Controller found\n\t\treturn function() use($route,$arguments) {\n\t\t\treturn call_user_func_array($route->getController(), $arguments);\n\t\t};\n\t}", "title": "" }, { "docid": "8e8a9fa561bec2ba80b4e567aa1d41ab", "score": "0.54841024", "text": "function _remap($method) {\n\t\t $this->index();\n\t\t}", "title": "" }, { "docid": "0e6f98d7d97cdc51ff32384188f01e02", "score": "0.5478236", "text": "public function executeRoute(){\n\t\t$instance = $this->isAdmin? Loader::getAdminController($this->controllerClass) : Loader::getFrontController($this->controllerClass);\n\t\tcall_user_func_array(array($instance, $this->function), $this->parameters);\n\t}", "title": "" }, { "docid": "71327f71f6d9c8fd27b95529aa06e520", "score": "0.5472899", "text": "public function handleKernelControllerEvent(ControllerEvent $event): void\n {\n if (!$this->isMainRequest($event)) {\n return;\n }\n\n $route = $event->getRequest()->attributes->get('_route');\n\n if (!\\is_string($route)) {\n return;\n }\n\n $this->hub->configureScope(static function (Scope $scope) use ($route): void {\n $scope->setTag('route', $route);\n });\n }", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.54669493", "text": "public function route();", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.54669493", "text": "public function route();", "title": "" }, { "docid": "c17c064bebc17c1a27fb117a0618a340", "score": "0.546475", "text": "public function getController() { return $this->__call(__FUNCTION__, array()); }", "title": "" }, { "docid": "61d89499c461c7de0e3e63570238f11a", "score": "0.54607356", "text": "public function resolve()\n {\n $methodDictionary = $this->{strtolower($this->request->requestMethod)};\n $formatedRoute = $this->formatRoute($this->request->requestUri);\n @$method = $methodDictionary[$formatedRoute];\n\n if (is_null($method)) {\n return $this->defaultRequestHandler();\n exit;\n }\n if (is_string($method)) {\n return $this->renderView($method);\n }\n\n return call_user_func_array($method, array($this->request));\n }", "title": "" }, { "docid": "0b8f3b4e49683443ba7d7902b6053c42", "score": "0.54486656", "text": "protected function registerLoginController()\n {\n $this->app->bind('GrahamCampbell\\Credentials\\Controllers\\LoginController', function ($app) {\n $credentials = $app['credentials'];\n\n return new Controllers\\LoginController($credentials);\n });\n }", "title": "" }, { "docid": "ea3bfacbae189a0ea155fbe9dd79fd80", "score": "0.5446522", "text": "public function route()\n {\n self::$kernel->route();\n self::$kernel->response();\n }", "title": "" }, { "docid": "d3e93db3bbd6c8f9be834dbb5849d075", "score": "0.5437211", "text": "private function callControllerMethod()\n {\n $length = count($this->url);\n // Make sure the method we are calling exists\n if ($length > 1)\n {\n if (!method_exists($this->controller, $this->url[1]))\n {\n $this->error();\n }\n else\n {\n //call the methode of the controller\n $this->controller->{$this->url[1]}();\n $this->controller->calledMethode = $this->url[1];\n //render the template\n echo $this->controller->display();\n }\n }\n else\n {\n //default\n echo $this->controller->display();\n }\n }", "title": "" }, { "docid": "114fc6fac066b6955e6c99b860759f25", "score": "0.5434091", "text": "function controller()\n {\n if (services()->has('controller')) {\n $args = func_get_args();\n\n if (count($args)) {\n $controller = services()->get('controller');\n\n return call_user_func_array([&$controller, '__call'], $args);\n }\n\n return services('controller');\n }\n\n return false;\n }", "title": "" }, { "docid": "84b936dd0ea4c12160921ab6d7a9a8f0", "score": "0.5432522", "text": "private function matchRoute ()\n {\n $match = $this->router->match();\n\n $this->request->setRoute($match);\n\n // Identify controller, otherwise use ErrorController\n if ($match && $match['target']) {\n $controllerName = $match['target'][0];\n $actionName = $match['target'][1];\n } else {\n // @TODO\n $controllerName = 'ErrorController';\n $actionName = 'notFoundError';\n }\n\n // Create controller and call its action method\n $controller = $this->getController($controllerName);\n\n call_user_func_array(array($controller, $actionName), [\n $this->service,\n $this->request,\n $this->response,\n ]);\n }", "title": "" }, { "docid": "3903b17f5cf9fb27674bf88c4d142dba", "score": "0.539954", "text": "public function routeTo()\n {\n $router = new DooUriRouter;\n $router->app = $this;\n $router->conf = $this->conf;\n $routeRs = $router->execute($this->route, $this->conf->SUBFOLDER);\n\n if (isset($routeRs['redirect']) === true) {\n list($redirUrl, $redirCode) = $routeRs['redirect'];\n// DooUriRouter::redirect($redirUrl, true, $redirCode);\n $this->statusCode = $redirCode;\n $this->setHeader('Location', $redirUrl);\n return;\n }\n\n if ($routeRs[0] !== null && $routeRs[1] !== null) {\n //dispatch, call Controller class\n\n if ($routeRs[0][0] !== '[') {\n if (strpos($routeRs[0], '\\\\') !== false) {\n $nsClassFile = str_replace('\\\\', '/', $routeRs[0]);\n $nsClassFile = explode($this->conf->APP_NAMESPACE_ID . '/', $nsClassFile, 2);\n $nsClassFile = $nsClassFile[1];\n require_once $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER . $nsClassFile . '.php';\n } else {\n require_once $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER . \"controller/{$routeRs[0]}.php\";\n }\n } else {\n $moduleParts = explode(']', $routeRs[0]);\n $moduleName = substr($moduleParts[0], 1);\n\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n require_once $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER_ORI . 'module/' . $moduleName . '/controller/' . $moduleParts[1] . '.php';\n } else {\n require_once $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER . 'module/' . $moduleName . '/controller/' . $moduleParts[1] . '.php';\n $this->conf->PROTECTED_FOLDER_ORI = $this->conf->PROTECTED_FOLDER;\n }\n\n //set class name\n $routeRs[0] = $moduleParts[1];\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI . 'module/' . $moduleName . '/';\n }\n\n if (strpos($routeRs[0], '/') !== false) {\n $clsname = explode('/', $routeRs[0]);\n $routeRs[0] = $clsname[sizeof($clsname) - 1];\n }\n\n //if defined class name, use the class name to create the Controller object\n $clsnameDefined = (sizeof($routeRs) === 4);\n if ($clsnameDefined) {\n $controller = $this->resolveConstructor($routeRs[3]);\n } else {\n $controller = $this->resolveConstructor($routeRs[0]);\n }\n\n $controller->app = &$this;\n $controller->container = &$this->container;\n $controller->_GET = &$this->_GET;\n $controller->_POST = &$this->_POST;\n $controller->params = $routeRs[2];\n\n if ($this->conf->SESSION_ENABLE == true) {\n $controller->session = &$this->session;\n }\n\n if (isset($controller->params['__extension']) === true) {\n $controller->extension = $controller->params['__extension'];\n unset($controller->params['__extension']);\n }\n if (isset($controller->params['__routematch']) === true) {\n $controller->routematch = $controller->params['__routematch'];\n unset($controller->params['__routematch']);\n }\n\n if ($this->_SERVER['REQUEST_METHOD'] === 'PUT') {\n $controller->init_put_vars();\n }\n\n if ($controller->async == false) {\n// Vertx::logger()->info('Blocking mode start');\n $this->async = false;\n ob_start();\n } else {\n $this->async = true;\n }\n\n //before run, normally used for ACL auth\n if (!$controller->asyncBeforeRun) {\n if ($clsnameDefined) {\n if ($rs = $controller->beforeRun($routeRs[3], $routeRs[1])) {\n return $rs;\n }\n } else {\n if ($rs = $controller->beforeRun($routeRs[0], $routeRs[1])) {\n return $rs;\n }\n }\n\n $routeRs = $controller->$routeRs[1]();\n $controller->afterRun($routeRs);\n return $routeRs;\n } else {\n $func = function ($rs = null) use ($controller, $routeRs) {\n if (!empty($rs)) {\n $this->throwHeader($rs);\n } else {\n $routeRs = $controller->$routeRs[1]();\n $controller->afterRun($routeRs);\n $this->throwHeader($routeRs);\n }\n };\n if ($clsnameDefined) {\n $controller->beforeRun($routeRs[3], $routeRs[1], $func);\n } else {\n $controller->beforeRun($routeRs[0], $routeRs[1], $func);\n }\n }\n } //if auto route is on, then auto search Controller->method if route not defined by user\n else {\n if ($this->conf->AUTOROUTE) {\n\n list($controllerName, $methodName, $methodNameOri, $params, $moduleName) = $router->autoConnect($this->conf->SUBFOLDER,\n (isset($this->route['autoroute_alias']) === true) ? $this->route['autoroute_alias'] : null);\n\n if (empty($this->route['autoroute_force_dash']) === false) {\n if ($methodName !== 'index' && $methodName === $methodNameOri && $methodNameOri[0] !== '_' && ctype_lower($methodNameOri) === false) {\n $this->throwHeader(404);\n return;\n }\n }\n\n if (in_array($methodName, [\n 'destroyCurrentSession',\n 'startNewSession',\n 'setCookie',\n 'getCookie',\n 'endReq',\n 'replyReq',\n 'getInput',\n 'setHeader',\n 'setRawHeader',\n 'initPutVars',\n 'load',\n 'db',\n 'acl',\n 'beforeRun',\n 'cache',\n 'saveRendered',\n 'saveRenderedC',\n 'view',\n 'render',\n 'renderc',\n 'language',\n 'acceptType',\n 'setContentType',\n 'clientIP',\n 'afterRun',\n 'getKeyParam',\n 'getKeyParams',\n 'viewRenderAutomation',\n 'isAjax',\n 'isSSL',\n 'toXML',\n 'toJSON',\n ])) {\n $this->throwHeader(404);\n return;\n }\n\n if (empty($this->route['autoroute_force_dash']) === false && strpos($moduleName, '-') !== false) {\n $moduleName = str_replace('-', '_', $moduleName);\n }\n\n if (isset($moduleName) === true) {\n $this->conf->PROTECTED_FOLDER_ORI = $this->conf->PROTECTED_FOLDER;\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI . 'module/' . $moduleName . '/';\n }\n\n $controller_file = $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER . \"controller/{$controllerName}.php\";\n\n if (file_exists($controller_file)) {\n require_once $controller_file;\n\n $methodsArray = get_class_methods($controllerName);\n\n //if controller name matches 2 classes with the same name, namespace and W/O namespace\n if ($methodsArray !== null) {\n $unfoundInMethods = (in_array($methodName, $methodsArray) === false &&\n in_array($methodName . '_' . strtolower($this->_SERVER['REQUEST_METHOD']),\n $methodsArray) === false);\n if ($unfoundInMethods) {\n $methodsArray = null;\n }\n }\n\n //if the method not in controller class, check for a namespaced class with the same file name.\n if ($methodsArray === null && isset($this->conf->APP_NAMESPACE_ID) === true) {\n if (isset($moduleName) === true) {\n $controllerName = $this->conf->APP_NAMESPACE_ID . '\\\\module\\\\' . $moduleName . '\\\\controller\\\\' . $controllerName;\n } else {\n $controllerName = $this->conf->APP_NAMESPACE_ID . '\\\\controller\\\\' . $controllerName;\n }\n $methodsArray = get_class_methods($controllerName);\n }\n\n //if method not found in both both controller and namespaced controller, 404 error\n if ($methodsArray === null) {\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI;\n }\n $this->throwHeader(404);\n return;\n }\n } else {\n if (isset($moduleName) === true && isset($this->conf->APP_NAMESPACE_ID) === true) {\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI;\n }\n\n $controller_file = $this->conf->SITE_PATH . $this->conf->PROTECTED_FOLDER . '/controller/' . $moduleName . '/' . $controllerName . '.php';\n\n if (file_exists($controller_file) === false) {\n $this->throwHeader(404);\n return;\n }\n $controllerName = $this->conf->APP_NAMESPACE_ID . '\\\\controller\\\\' . $moduleName . '\\\\' . $controllerName;\n #echo 'module = '.$moduleName.'<br>';\n #echo $controller_file.'<br>';\n #echo $controllerName.'<br>';\n $methodsArray = get_class_methods($controllerName);\n } else {\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI;\n }\n $this->throwHeader(404);\n return;\n }\n }\n\n //check for REST request as well, utilized method_GET(), method_PUT(), method_POST, method_DELETE()\n $restMethod = $methodName . '_' . strtolower($this->_SERVER['REQUEST_METHOD']);\n $inRestMethod = in_array($restMethod, $methodsArray);\n\n //check if method() and method_GET() etc. doesn't exist in the controller, 404 error\n if (in_array($methodName, $methodsArray) === false && $inRestMethod === false) {\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI;\n }\n $this->throwHeader(404);\n return;\n }\n\n //use method_GET() etc. if available\n if ($inRestMethod === true) {\n $methodName = $restMethod;\n }\n\n $controller = $this->resolveConstructor($controllerName);\n $controller->app = &$this;\n $controller->container = &$this->container;\n $controller->_GET = &$this->_GET;\n $controller->_POST = &$this->_POST;\n\n if ($this->conf->SESSION_ENABLE == true) {\n $controller->session = &$this->session;\n }\n\n //if autoroute in this controller is disabled, 404 error\n if ($controller->autoroute === false) {\n if (isset($this->conf->PROTECTED_FOLDER_ORI) === true) {\n $this->conf->PROTECTED_FOLDER = $this->conf->PROTECTED_FOLDER_ORI;\n }\n $this->throwHeader(404);\n return;\n }\n\n if ($params != null) {\n $controller->params = $params;\n }\n\n if ($this->_SERVER['REQUEST_METHOD'] === 'PUT') {\n $controller->initPutVars();\n }\n\n if ($controller->async == false) {\n// Vertx::logger()->info('Blocking mode start');\n $this->async = false;\n ob_start();\n } else {\n $this->async = true;\n }\n\n //before run, normally used for ACL auth\n if (!$controller->asyncBeforeRun) {\n if ($rs = $controller->beforeRun($controllerName, $methodName)) {\n return $rs;\n }\n $routeRs = $controller->$methodName();\n $controller->afterRun($routeRs);\n\n return $routeRs;\n } else {\n $func = function ($rs = null) use ($controller, $routeRs, $methodName) {\n if (!empty($rs)) {\n $this->throwHeader($rs);\n } else {\n $routeRs = $controller->$methodName();\n $controller->afterRun($routeRs);\n $this->throwHeader($routeRs);\n }\n };\n $controller->beforeRun($controllerName, $methodName, $func);\n }\n } else {\n $this->throwHeader(404);\n return;\n }\n }\n }", "title": "" }, { "docid": "5d7405c9e319b520eecdce70c3591a4e", "score": "0.5387161", "text": "private function _callControllerMethod()\r\n\t{\r\n\t\tif(count($this->_url) > 1)\r\n\t\t{\r\n\t\t\tif(!method_exists($this->_controller, $this->_url[1]))\r\n\t\t\t{\r\n\t\t\t\t$this->_error();\r\n\t\t\t}\r\n\t\t\t$params = $this->_url;\r\n\t\t\tunset($params[0]); // removing controller\r\n\t\t\tunset($params[1]); // removing method\r\n\r\n\t\t\tcall_user_func_array(array($this->_controller, $this->_url[1]), $params);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_controller->index();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2f1ad91ac64461ae7ded7188c9251477", "score": "0.53765804", "text": "public function dispatch()\n {\n if( $this->isController( $this->_command->getController() ) )\n {\n require_once APP.\"/\".$this->_scriptLocation.$this->_command->getController().\".php\";\n $sControllerName = $this->_command->getController();\n if(class_exists($sControllerName))\n {\n $oController = new $sControllerName();\n\n $aParameter = $this->_command->getParameters();\n\n if( empty( $aParameter ) )\n call_user_func(array($oController,'index'));\n else\n {\n $sFunctionName = $aParameter[0];\n unset($aParameter[0]);\n $aParameter = array_values($aParameter);\n if( method_exists($oController,$sFunctionName) )\n {\n call_user_func_array(array($oController,$sFunctionName),$aParameter);\n }\n else\n {\n $this->notFound();\n }\n }\n }\n else\n {\n $this->notFound();\n }\n }\n else\n {\n $this->notFound();\n }\n }", "title": "" }, { "docid": "0ea2bd8e1659fbab086795fce1a78c8a", "score": "0.5353624", "text": "protected function registerController()\n {\n $this->app->singleton(\n 'generate.controller',\n function ($app) {\n $generator = $this->app->make('\\Lum\\Generator\\DefaultGenerator');\n\n return new ControllerGeneratorCommand($generator);\n }\n );\n $this->commands('generate.controller');\n }", "title": "" }, { "docid": "83a3c28f0d967f31a809f6b754425b3c", "score": "0.53536105", "text": "protected function controller($method, $uri, $destination)\n\t{\n\t\t// If the request is to the root of the application, an ad-hoc route\n\t\t// will be generated to the home controller's \"index\" method, making\n\t\t// it the default controller method.\n\t\tif ($uri === '/') return new Route($method.' /', 'home@index');\n\n\t\t$segments = explode('/', trim($uri, '/'));\n\n\t\tif ( ! is_null($key = $this->controller_key($segments)))\n\t\t{\n\t\t\t// Extract the various parts of the controller call from the URI.\n\t\t\t// First, we'll extract the controller name, then, since we need\n\t\t\t// to extract the method and parameters, we will remove the name\n\t\t\t// of the controller from the URI. Then we can shift the method\n\t\t\t// off of the array of segments. Any remaining segments are the\n\t\t\t// parameters that should be passed to the controller method.\n\t\t\t$controller = implode('.', array_slice($segments, 0, $key));\n\n\t\t\t$segments = array_slice($segments, $key);\n\n\t\t\t$method = (count($segments) > 0) ? array_shift($segments) : 'index';\n\n\t\t\treturn new Route($destination, $controller.'@'.$method, $segments);\n\t\t}\n\t}", "title": "" }, { "docid": "f6ef047c5e68ef98f3e6e6d8081c96ed", "score": "0.53387123", "text": "public function __construct(){\n $url = $this->getUrl();\n\n // Looks in controllers for first controller\n if(file_exists('../app/controllers/' . ucwords($url[0]) .'.php')){\n // If exists, set as controller\n $this->currentController = ucwords($url[0]);\n // Unset 0 Index\n unset($url[0]);\n }\n\n //Require the controller\n require_once '../app/controllers/'.$this->currentController.'.php';\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n\n // Check for the second part of url \n if(isset($url[1])){\n // Check to see if method exists in controller\n if(method_exists($this->currentController,$url[1])){\n $this->currentMethod = $url[1];\n //unset index 1\n unset($url[1]);\n }\n }\n\n // Get url rest params\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with array or params\n call_user_func_array([$this->currentController,$this->currentMethod],$this->params);\n}", "title": "" }, { "docid": "65b0cc9d51359d9ef8064e5155658ec0", "score": "0.5333813", "text": "function C($name, $method){\n\t$controller = $name.'Controller';\n\trequire_once 'libs/Controller/' . $controller . '.class.php';\n\t$controller = $name.'Controller';\n\t$ob = new $controller;\n\t$ob->$method();\n}", "title": "" }, { "docid": "08ea29382be176a0293ddaf253778825", "score": "0.5316657", "text": "public function dispatch() {\n $this->request = new Request();\n Router::parse($this->request->url, $this->request);\n\n $controller = $this->loadController();\n\n if (strpos($this->request->action, \"?p=\") !== false || $this->request->action == '') {\n $this->request->action = 'index';\n }\n\n call_user_func_array([$controller, $this->request->action], $this->request->params);\n }", "title": "" }, { "docid": "12a13ca0b4677d0bc0eb3284c64254b1", "score": "0.5311318", "text": "public function UserInteractionHandle($method,$data){\r\n if(is_callable(array('Controller', $method))){\r\n $this->$method($data);\r\n }\r\n else{\r\n gotoView(\"/Error\");\r\n }\r\n $this->saveState(); \r\n }", "title": "" }, { "docid": "08e7cf48c427e6a0d085f778ae62b1fc", "score": "0.53090936", "text": "public function resolve()\n {\n $path = $this->request->getPath();\n $method = $this->request->method();\n $callback = $this->routes[$method][$path] ?? false;\n // If no route has been set return 404\n if($callback === false) {\n $this->response->setStatusCode(404);\n return $this->renderView(\"_404page\");\n } \n // If route is a string, render the associated view\n if(is_string($callback)) {\n return $this->renderView($callback);\n } \n // If array [controller::class, 'method'], create controller instance\n if(is_array(($callback))) {\n Application::$app->setController(new $callback[0]());\n $callback[0] = Application::$app->controller;\n }\n\n return call_user_func($callback, $this->request);\n }", "title": "" }, { "docid": "dc51a35abe3a031d0d4f66810f8ab9b6", "score": "0.5287418", "text": "public function _remap($method)\n\t{\n\t\t$this->index($method);\t\n\t}", "title": "" }, { "docid": "5ac552589b007e3284c07c4239ae6c7a", "score": "0.5280552", "text": "protected function RedirectToControllerMethod($controller=null, $method=null, $arguments=null) {\n $this->ly->RedirectToControllerMethod($controller, $method, $arguments);\n }", "title": "" }, { "docid": "f41c8c16ab9b7d2156edce35cb51381a", "score": "0.52775663", "text": "private function setController(){\n\n\t\ttry {\n\t\t\t$this->controller = ModelControllerFactory::create(\n\t\t\t\t\t\t\t\t\t$this->controllerName,\n\t\t\t\t\t\t\t\t\tnew View(),\n\t\t\t\t\t\t\t\t\tModelFactory::create($this->modelName)\n\t\t\t\t\t\t\t\t);\n\n\t\t} catch (Exception $e) {\n\t\t\t// required controller class does not exist (NOTE: php 5.3.0+ only)\n\t\t\t$this->setRoutePageNotFound();\n\t\t}\n\n\t\tif (!method_exists($this->controller, $this->action)) {\n\t\t\t// required action method does not exist within controller class\n\t\t\t$this->setRoutePageNotFound();\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "813978d5a8e873baafbfdd7a930e81e6", "score": "0.52772474", "text": "public abstract function initializeController();", "title": "" }, { "docid": "87d9e8896abf5e9950198fa22bd7af5f", "score": "0.5275655", "text": "public static function callback(string $method) : string\n {\n return get_called_class() . \":\" . $method . static::SUFFIX_CONTROLLER;\n }", "title": "" }, { "docid": "7468c6f33d82a685cdee4a1273fc3647", "score": "0.52688915", "text": "private static function controller($path)\n {\n if(!$path){\n $path = '/';\n }\n $Router = Route::load();\n $Router += [\n '/doc' => [\n 'method' => \"POST\",\n 'module' => gen::class,\n 'function' => 'tpl'\n ],\n '/doc/rest' => [\n 'method' => \"POST\",\n 'module' => gen::class,\n 'function' => 'doc'\n ],\n ];\n $controller = $Router[$path];\n if (!$controller) {\n throw new NotFoundException();\n }\n $class = $controller['module'];\n $actvite = $controller['function'];\n RequestContext::setActvite($actvite);\n\n $ref = new \\ReflectionClass($class);\n if ($ref->getParentClass()->name !== 'AtSoft\\SingPHP\\Controller\\Controller') {\n throw new NotFoundException();\n } else {\n $object = DI::make($class);\n if (!$ref->hasMethod($actvite)) {\n throw new NotFoundException();\n } else {\n $result = call_user_func([$object, $actvite]);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "a1d01cbe117fe2492c895a78f0a94471", "score": "0.5265215", "text": "public function getController($applicationVariables);", "title": "" }, { "docid": "7d9add0c10f4e4d5543cc97096cc7449", "score": "0.5263045", "text": "protected function dispatch($controller, $method) {\n if (method_exists($controller, $method)) {\n //Set Arguments from URL\n $i = count($this->path_info);\n $arguments = [];\n for ($j = 2; $j < $i; $j++) {\n array_push($arguments, $this->path_info[$j]);\n }\n\n //Check weather arguments are passed else throw a 404 error\n $classMethod = new \\ReflectionMethod($controller, $method);\n $argumentCount = count($classMethod->getParameters());\n if (count($arguments) < $argumentCount) {\n $this->error();\n } else {\n //Finally call the function\n $result = call_user_func_array([$controller, $method], $arguments);\n }\n }\n }", "title": "" }, { "docid": "5b3dbfa8dea19c14de6969a3f22fb44b", "score": "0.52296746", "text": "public function route(Request $httpRequest);", "title": "" }, { "docid": "5b3dbfa8dea19c14de6969a3f22fb44b", "score": "0.52296746", "text": "public function route(Request $httpRequest);", "title": "" }, { "docid": "76008003bf7f05dfa9c8bd1b6c043294", "score": "0.52261", "text": "public function run(): void\n {\n $this->tryAssignController();\n if (!$this->isControllerAssigned()) {\n throw new Exception(\"It's unable to assign controller to this route path.\");\n }\n (new CtrlWrapper($this->createCtrl()))\n ->{$this->actionName}($this->actionArgs);\n }", "title": "" }, { "docid": "4b5948f437eb0340ea4574c72254c5da", "score": "0.52242386", "text": "protected function RedirectToControllerMethod($controller=null, $method=null, $arguments=null) {\n $this->de->RedirectToControllerMethod($controller, $method, $arguments);\n }", "title": "" }, { "docid": "9a04ef669b3678716d9f6b37e50833db", "score": "0.52174646", "text": "public function registerRoute(){\n }", "title": "" }, { "docid": "66d6fa76dbef5b9ab4865f632f74be9f", "score": "0.521652", "text": "function __construct(){\n //the name of the method as the second index, any additional indexes would be parametter\n //OR it would be empty\n $url = $this->getUrl();\n\n //if the url variable is not empy change the defults\n if(!empty($url)){\n //look in controllers for first value as disctated by FORMAT\n if(file_exists('../app/controllers/' . ucwords($url[0]) . '.php')){\n //if exists, set as current controller\n $this->currentController = ucwords($url[0]);\n unset($url[0]);\n }\n }\n\n //since the file for this controller exist, require that file\n require_once '../app/controllers/' . $this->currentController . '.php';\n //instanciate the controller class\n $this->currentController = new $this->currentController;\n\n //check that the second part of the url\n if (isset(($url[1]))) {\n //check if method exist in the controller\n if(method_exists($this->currentController, $url[1] )){\n $this->currentMethod = $url[1] ;\n unset($url[1]);\n }\n }\n\n //get params\n $this->params = $url ? array_values($url) : [];\n\n //call a callback with array of params\n call_user_func_array([$this->currentController,$this->currentMethod] ,$this->params );\n\n\n }", "title": "" }, { "docid": "e2883b066d625472d47ba416f446d096", "score": "0.5215981", "text": "public function getController() {\n $list_module = $this->registry->modules;\n $route = (empty($_GET['rt'])) ? '' : $_GET['rt'];\n $this->args = explode('/', $route);\n if ($this->args != null && count($this->args) != 0) {\n $leng = count($this->args);\n for ($i = 0; $i < $leng; $i++) {\n $this->args[$i] = mysql_real_escape_string($this->args[$i]);\n }\n }\n\n\n if (in_array($this->args[0], $this->registry->listlang)) {\n define('__REQUEST_LANG', strtolower($this->args[0]));\n array_shift($this->args);\n } else {\n define('__REQUEST_LANG', $this->registry->default_language);\n }\n\n if (empty($this->args)) {\n $route = 'index';\n $this->setAllConstant($this->registry->default_module);\n } else {\n /* * * get the parts of the route ** */\n if (in_array($this->args[0], $list_module)) {\n $this->setAllConstant($this->args[0]);\n array_shift($this->args);\n } else {\n $this->setAllConstant($this->registry->default_module);\n }\n\n if (isset($this->args[0])) {\n $this->controller = $this->args[0];\n array_shift($this->args);\n }\n\n\n if (isset($this->args[0])) {\n $this->action = $this->args[0] . 'Action';\n }\n }\n\n if (empty($this->controller)) {\n $this->controller = 'index';\n }\n\n /* * * Get action ** */\n if (empty($this->action)) {\n $this->action = 'indexAction';\n }\n\n\n /* * * set the file path ** */\n $this->file = __CONTROLLER_PATH . '/' . $this->controller . 'Controller.php';\n if (is_readable($this->file) == false) {\n $this->file = __CONTROLLER_PATH . '/error404Controller.php';\n $this->controller = 'error404';\n }\n\n /* * * include the controller ** */\n include_once $this->file;\n\n /* * * a new controller class instance ** */\n $class = $this->controller . 'Controller';\n $controller = new $class($this->registry);\n\n /* * * check if the action is callable ** */\n if (is_callable(array($controller, $this->action)) == false)\n $this->action = 'indexAction';\n\n\n /* * * run the action ** */\n }", "title": "" }, { "docid": "7f61ee8115658e0ddc8ea9fdc7b8d2fb", "score": "0.52133864", "text": "public function dispatch()\n {\n try {\n $routes = $this->getDI()->get('routes');\n $route = $routes->find($this->getModuleName(), $this->getControllerName(), $this->getActionName());\n if (!$route) {\n // @todo : forward 404\n return $this->forward404();\n }\n $this->setDefaultNamespace($route['namespace']);\n $this->setControllerName($route['handler']);\n $this->setActionName($route['action']);\n } catch (\\Exception $e) {\n $this->_handleException($e);\n if (APPLICATION_STAGE == APPLICATION_STAGE_DEVELOPMENT) {\n throw $e;\n } else {\n $id = Exception::logError(\n 'Exception',\n $e->getMessage(),\n $e->getFile(),\n $e->getLine(),\n $e->getTraceAsString()\n );\n $this->getDI()->setShared(\n 'currentErrorCode',\n function () use ($id) {\n \n return $id;\n }\n );\n }\n }\n\n return parent::dispatch();\n }", "title": "" }, { "docid": "759959a55af71e91c4ef667dfe107363", "score": "0.5210827", "text": "protected function RedirectToControllerMethod($controller=null, $method=null, $arguments=null) {\r\n $this->crz->RedirectToControllerMethod($controller, $method, $arguments);\r\n }", "title": "" }, { "docid": "783e43b11e177aa64f8f8c3adbefe3c2", "score": "0.5194226", "text": "public function _remap($method)\r\n {\r\n if (method_exists($this, $method))\r\n {\r\n call_user_func_array(array($this, $method), array_slice($this->uri->rsegments, 2));\r\n }\r\n else\r\n {\r\n if (method_exists($this, '_404'))\r\n {\r\n call_user_func_array(array($this, '_404'), array($method));\r\n }\r\n else\r\n {\r\n show_404(strtolower(get_class($this)).'/'.$method);\r\n }\r\n }\r\n \r\n $this->_load_view();\r\n }", "title": "" }, { "docid": "acc3b5ea67633f202b62442e700bdfcb", "score": "0.5184127", "text": "public function addRoute(Rework_Controller $controller)\n {\n $reflector = new Rework_Reflection;\n $controllerData = $reflector->reflect($controller);\n\n $baseName = strtolower(preg_replace('/Controller$/', '',\n get_class($controller)));\n\n $requestMethods = Rework_Request::getRequestMethods();\n foreach ($controllerData as $action => $settings) {\n $routedAction = '';\n foreach ($requestMethods as $requestMethod) {\n if (preg_match(\"/^{$requestMethod}([A-Z][a-z]+)+$/\", $action)) {\n $routedAction = preg_replace(\"/^$requestMethod/\", '', $action);\n break;\n }\n }\n \n if (empty($routedAction)) {\n // Non-routable method\n continue;\n }\n \n $routedAction = strtolower($routedAction);\n \n // Let's hope PHP uses the same object for all actions\n $settings['controller'] = $controller;\n $settings['action'] = $action;\n $settings['requestMethod'] = $requestMethod;\n\n $parameterSuffix = '';\n if (count($settings['_parameters'])) {\n foreach ($settings['_parameters'] as $parameter) {\n $parameterSuffix .= '/:' . $parameter->name;\n }\n }\n \n $route = '/' . $baseName . '/' . $routedAction . $parameterSuffix;\n if (!empty($settings[Rework_Reflection::ANNOTATION_ROUTE])) {\n $settings['_originalRoute'] = $route;\n $route = $settings[Rework_Reflection::ANNOTATION_ROUTE]\n . $parameterSuffix;\n $this->_routeAliases[$route] = $settings;\n } else {\n $this->_routeOriginals[$route] = $settings;\n }\n }\n\n // Make sure the route order is correct\n $this->aggregateRoutes();\n \n return $this;\n }", "title": "" }, { "docid": "ccb07a0018ce5fcb6c1373ee5cd43d4c", "score": "0.5183177", "text": "public static function resource(){\n $arguments = func_get_args();\n $path = $arguments[0];\n $controller = end($arguments);\n $handler = self::$NAMESPACE.$controller;\n\n $resourceRoutes = array(\n 'get' => array(\n 'pattern' => \"$path\",\n 'method' => 'get',\n 'handler' => \"$handler:index\"\n ),\n 'create' => array(\n 'pattern' => \"$path/create\",\n 'method' => 'get',\n 'handler' => \"$handler:create\"\n ),\n 'paginate' => array(\n 'pattern' => \"$path/page/:page\",\n 'method' => 'get',\n 'handler' => \"$handler:index\"\n ),\n 'search' => array(\n 'pattern' => \"$path/search\",\n 'method' => 'get',\n 'handler' => \"$handler:search\"\n ),\n 'post' => array(\n 'pattern' => \"$path\",\n 'method' => 'post',\n 'handler' => \"$handler:store\"\n ),\n 'show' => array(\n 'pattern' => \"$path/:id\",\n 'method' => 'get',\n 'handler' => \"$handler:show\"\n ),\n 'edit' => array(\n 'pattern' => \"$path/:id/edit\",\n 'method' => 'get',\n 'handler' => \"$handler:edit\"\n ),\n 'put' => array(\n 'pattern' => \"$path/:id\",\n 'method' => 'put',\n 'handler' => \"$handler:update\"\n ),\n 'delete' => array(\n 'pattern' => \"$path/:id\",\n 'method' => 'delete',\n 'handler' => \"$handler:destroy\"\n )\n );\n\n foreach ($resourceRoutes as $route) {\n $callable = $arguments;\n\n //put edited pattern to the top stack\n array_shift($callable);\n array_unshift($callable, $route['pattern']);\n\n //put edited controller to the bottom stack\n array_pop($callable);\n array_push($callable, $route['handler']);\n\n call_user_func_array(array(self::$slim, $route['method']), $callable);\n }\n }", "title": "" }, { "docid": "3c860b8c89c2cff9096e6a1b1e4a8f4b", "score": "0.51728934", "text": "public function Resolve()\r\n {\r\n $path = $this->request->GetPath();\r\n // call path from function GetPath() class Request\r\n $method = $this->request->Method();\r\n // call method from function Method() class Request\r\n $callback = $this->routes[$method][$path] ?? false;\r\n // check if URI from user match the URI framework\r\n\r\n if ($callback === false) {\r\n $this->response->SetStatusCode(404);\r\n // make statement status code in web 404\r\n return $this->RenderView(\"404\");\r\n // return view 404 to user's\r\n }\r\n // check $callback if it's false \r\n if (is_string($callback)) {\r\n return $this->RenderView($callback);\r\n // return View $callback to user's\r\n }\r\n // check $callback if it's String\r\n if (is_array($callback)) {\r\n Application::$app->controller = new $callback[0]();\r\n // make new instance $callback and send it to Application::$app->controller;\r\n $callback[0] = Application::$app->controller;\r\n // input value Application::$app->controller to $callback[0]\r\n }\r\n // check $callback if it's $callback is array\r\n return call_user_func($callback, $this->request);\r\n }", "title": "" }, { "docid": "3e82ef9cb945f0676121c0b7f2d74c54", "score": "0.51596665", "text": "function bind()\n {\n if (array_include($this->http_method, self::$allowed_methods)){\n \t\t$parameters = array();\n \t\tforeach (array('pattern', 'controller', 'action', 'http_method', 'short_url') as $field) {\n \t\t\tif (isset($this->{$field})) {\n \t\t\t\t$parameters[] = $this->{$field};\n \t\t\t} else {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t$this->bind_id = call_user_func_array(array(Nimble::getInstance(), 'add_url'), $parameters);\n } else {\n throw new NimbleException('Invalid Request');\n }\n }", "title": "" }, { "docid": "e93c28ca08f54cc47ca055eafd189d1e", "score": "0.5154903", "text": "private function _callControllerMethod(){\r\n \r\n $length = count($this->_url);\r\n \r\n if($length > 1) {\r\n if(!method_exists($this->_controller, $this->_url[1])){\r\n $this->_error();\r\n }\r\n }\r\n \r\n switch ($length){\r\n case 6:\r\n //Controller->Method(Param1, Param2, Param3, Param4);\r\n $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5]);\r\n break;\r\n case 5:\r\n //Controller->Method(Param1, Param2, Param3);\r\n $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4]);\r\n break;\r\n case 4:\r\n //Controller->Method(Param1, Param2);\r\n $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3]);\r\n break;\r\n case 3:\r\n //Controller->Method(Param1);\r\n $this->_controller->{$this->_url[1]}($this->_url[2]);\r\n break;\r\n case 2:\r\n //Controller->Method();\r\n $this->_controller->{$this->_url[1]}();\r\n break;\r\n default:\r\n $this->_controller->index();\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "df46ece3f9fe9f18ed72baf7c167423e", "score": "0.515318", "text": "public function onKernelController(FilterControllerEvent $event)\n {\n // Check that a controller is being used (as well as assigning to\n // $controller variable)\n if (!is_array($controller = $event->getController())) {\n return;\n }\n\n $object = new \\ReflectionObject($controller[0]);\n $method = $object->getMethod($controller[1]);\n\n // Make sure that a symfony controller is being used\n if (!($controller[0] instanceof \\Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller)) {\n return;\n }\n\n foreach ($this->reader->getMethodAnnotations($method) as $annotation) {\n if ($annotation instanceof HMAC) {\n\n // If were using hmac and the route is marked\n // as private, lets check to see if the right credentials have\n // been provided\n if ($this->useHmac && !$annotation->isPublic()) {\n $this->_hmacValidation($annotation, $this->request);\n }\n\n }\n }\n }", "title": "" }, { "docid": "6c07640d0806b9c5b8bdf692a20b02b1", "score": "0.51484036", "text": "function dispatch() {\n\t\t\n\t\t// Lets disect our route\n\t\tlist($module, $controllerName, $actionName) = explode(':', $this->_matchedRoute['_controller'], 3);\n\t\t$actionName = $actionName . 'Action';\n\n\t\t// Instantiate our chosen controller\n\t\t$className = \"\\\\{$this->_matchedModule->getModuleName()}\\\\Controller\\\\$controllerName\";\n\t\t$controller = new $className();\n\t\t\n\t\t// Set Dependencies for our controller\n\t\t$controller->setServiceLocator($this->_serviceLocator);\n\t\t\n\t\t// Lets do setter injection on our controller\n\t\t$controller->injectServices();\n\t\t\n\t\t// Prep our module for dispatch\n\t\t$this->_matchedModule\n\t\t\t->setControllerName($controllerName)\n\t\t\t->setActionName($actionName)\n\t\t\t->setController($controller);\n\n\t\t// Dispatch our action, return the content from the action called.\n\t\t$result = $this->_matchedModule->dispatch();\n\n\t\t$serviceLocator = $controller->getServiceLocator();\n\t\t\n\t\t// The controller manipulates the state of the Request and Response so after dispatch has occurred\n\t\t// Then we obtain these back for further uses.\n\t\t$controller = $this->_matchedModule->getController();\n\t\t$this->_request = $serviceLocator->get('request');\n\t\t$this->_response = $serviceLocator->get('response');\n\t\t\n\t\t// Send our content to the browser\n\t\t$this->_response->setContent($result);\n\t\t$this->_response->send();\n\t\t\n\t}", "title": "" }, { "docid": "459e1df27a6f0a7ca7a86076417fb9e6", "score": "0.514581", "text": "public function loadController() {\n $route = $this->route();\n \n foreach ($route as $key => $value) {\n \n $$key = $value;\n }\n \n if(class_exists($controller)) {\n \n $controller = new $controller();\n \n \n } else {\n \n $controller = new \\controllers\\Error();\n $action = \"error_404\";\n $controller->$action();\n }\n \n if(method_exists($controller, $action)){\n \n $params = explode(\"/\", $params);\n $contents = call_user_func_array([$controller, $action], $params);\n \n if (!$contents) {\n \n $controller = new \\controllers\\Error();\n $action = \"error_404\";\n $controller->$action();\n }\n \n } else {\n \n throw new \\Exception(\"Action with name: \" . $action . \" not found\"); \n }\n }", "title": "" }, { "docid": "a88570f1f519f54f2dcfe5a05555c83c", "score": "0.51403105", "text": "function _remap( $method )\n {\n switch( $method )\n {\n case 'index':\n $this->index();\n break;\n\n\n case 'attendancelist':\n $this->attendancelist();\n break;\n\t\t\t\t\n\t\t\tcase 'update':\n $this->update();\n break;\n\t\t\tcase 'intime':\n $this->intime();\n break;\n\t\t\tcase 'updatedata':\n $this->updatedata();\n break;\n default:\n $this->page_not_found();\n break;\n }\n }", "title": "" }, { "docid": "b368c06269cc27e8238c34844251811c", "score": "0.5131029", "text": "protected function setController()\n {\n $this->controller = new $this->className($this->container);\n }", "title": "" }, { "docid": "de206328821e27ce6cec33f1ba3c556d", "score": "0.5128046", "text": "public function Route(){\n $load=Loader::Instance();\n if(cf(\"RUI/MODE\")==Yalamo::Classic){\n $load->Page($this->page);\n $this->cache_object->Output();\n return;\n }\n \n //if not then load the controller file\n $load->Controller($this->controller) ;\n //create an instance of the controller\n $class = $this->controller ;\n $this->controller_instance = new $class();\n if(!is_subclass_of($this->controller_instance,Controller::Baseclass)){\n $this->Collect(Error::YE002);\n return; \n }\n //check if the action is not empty\n if($this->action==Yalamo::Void){\n $this->action = 'Index';\n }\n //check if the action is callable\n if (! is_callable(array($this->controller_instance, $this->action))){\n $load->Page(\"Error404\");\n exit();\n }\n //call the action\n $var_action=$this->action;\n $this->controller_instance->$var_action();\n //check for caching\n $this->cache_object->Output();\n }", "title": "" }, { "docid": "8fb3518ab0c20c4e111bd5f438fe47a4", "score": "0.5117278", "text": "public function _remap($method, $params = array())\n {\n if(parent::_is_permitted(basename(__FILE__)) == TRUE)\n {\n if (method_exists($this, $method)) {\n return call_user_func_array(array($this, $method), $params);\n }\n show_404();\n }\n }", "title": "" }, { "docid": "151c9374e627418672bbf0e1c3c5461b", "score": "0.51163447", "text": "public static function proceed($uri = null){\n if(!$uri)\n $uri = $_GET['uri'];\n $route = self::find($uri);\n if($route){\n list($method, $uri_mask, $controller_action_raw) = $route;\n $controller_action = explode(\".\", $controller_action_raw);\n if(sizeof($controller_action) <= 1)\n throw new exceptions\\InvalidControllerReferenceException(\"Invalid controller reference in routes file \\\"\".$controller_action_raw.\"\\\"\");\n list($controller, $action) = $controller_action;\n\n $controller_file = APP_CONTROLLERS.\"/\".$controller.\".php\";\n if(!file_exists($controller_file))\n throw new exceptions\\InvalidControllerException(\"Invalid controller file \\\"\".$controller_file.\"\\\"\");\n\n require_once $controller_file;\n\n if(!class_exists($controller))\n throw new exceptions\\InvalidControllerException(\"Invalid controller \\\"\".$controller.\"\\\" controller not implemented\");\n\n\t $break = null;\n\t $arguments = array();\n\n\t $precalle = $controller.\"::action\";\n\t if(is_callable($precalle))\n\t\t $break = call_user_func_array($precalle, array(&$action, &$arguments));\n\n $callback = $controller.\"::\".$action;\n\t $controller_action_raw = $controller.\".\".$action;\n\n if(!is_callable($callback))\n throw new exceptions\\InvalidControllerActionException(\"Invalid controller action \\\"\".$controller_action_raw.\"\\\" action not implemented\");\n\n $class_ref = new ReflectionClass($controller);\n $method_ref = $class_ref->getMethod($action);\n if(!$method_ref->isStatic())\n throw new exceptions\\InvalidControllerActionException(\"Invalid action method type \\\"\".$controller_action_raw.\"\\\" must be Static\");\n\n\t if(is_array($arguments) && sizeof($arguments) == 0) {\n\t $arguments_match = array();\n\t preg_match_all('|\\['.$uri_mask.'/\\]|Uis', '[/'.$uri.'/]', $arguments_match);\n\t for($argId = 1; $argId < sizeof($arguments_match); $argId++)\n\t if(isset($arguments_match[$argId][0]))\n\t $arguments[] = $arguments_match[$argId][0];\n\t }\n\n $proceed = true;\n\n if(config::Get(\"config.ini\")->read(\"base\", \"attributes\", 0)){\n if(config::Get(\"config.ini\")->read(\"router\", \"auto\", 0) != 1)\n attribute::parse(APP_CONTROLLERS.\"/\".$controller.\".php\", $controller);\n $attributes = attribute::get($controller, $action);\n if($attributes != null){\n foreach((array)$attributes as $attr => $attr_params){\n $attr_file = APP_ATTRIBUTES.\"/\".$attr.\".php\";\n if(file_exists($attr_file)){\n require_once $attr_file;\n $attr_ref = new ReflectionClass($attr);\n if($attr_ref->isSubclassOf(\"IAttribute\")){\n $ctrl_data = array(\n \"controller\" => $class_ref,\n \"action\" => $method_ref\n );\n $attr_binder = array($attr, \"bind\");\n call_user_func_array($attr_binder, array(\n $ctrl_data,\n $attr_params,\n &$arguments,\n &$proceed\n ));\n }\n }\n }\n }\n }\n\n if($proceed){\n\t\t\t $result = \"\";\n\t if($break !== false)\n $result = call_user_func_array($callback, $arguments);\n if($result instanceof IActionResult)\n $result->render();\n elseif(is_string($result))\n echo $result;\n /*else\n throw new \\exceptions\\InvalidControllerActionException(\"Controller \".$controller_action_raw.\" must return IActionResult\");*/\n }\n if(defined(\"DEBUG\")) $GLOBALS[\"_UNIT\"][\"ENGINE\"][\"BOOT\"] = microtime(1) - $GLOBALS[\"_performance_mts\"];\n return true;\n }\n elseif(is_callable(self::$_notFoundCallback)){\n $result = call_user_func(self::$_notFoundCallback, $uri);\n if($result instanceof IActionResult)\n $result->render();\n return $result;\n }\n else\n throw new exceptions\\RouteNotFoundException(\"Route for url \\\"/\".htmlspecialchars($uri).\"\\\" not found\");\n\n\n }", "title": "" }, { "docid": "9bab2a2a99b5e4c485b60d7b69899c48", "score": "0.5113573", "text": "public function route(Request $request){\n\t\t\t//get the Controller\n\t\t\t $controller = $request->getController();\n\t\t\t//get the method\n\t\t\t$method = $request->getMethod();\n\t\t\t//get the parameters\n\t\t\t$params = $request->getArgs();\n\n\t\t\t$dir = ($request->isDirExists()==true) ? $request->isDirExists().DS : null;\n\t\t\t$file = ROOT.APPS.'controllers'.DS.$dir.$controller.EXT;\n\t\t\tif(file_exists($file)){\n\t\t\trequire_once $file;\n\t\t\t$run = new $controller();\n\t\t\t if(method_exists($run, $method)){\n\t\t\t\t\tif(!empty($params)){\n\t\t\t\t\t\t$run->{$method}($params);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$run->{$method}();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tif($config['custom_error']==true){\n\t\t\t\t\t$errorfile = ROOT.APPS.'controllers'.DS.'error'.EXT;\n\t\t\t\t\t\tif(file_exists($errorfile)){\n\t\t\t\t\t\trequire_once $errorfile;\n\t\t\t\t\t\t $error = new error;\n\t\t\t\t\t\t $error::index();\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t$errorfile = 'Method : '.$dir.$controller.\"::\".$method.\"()\";\n\t\t\t\t\t\t\trequire('error.php');\n\t\t\t\t\t\t }\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$errorfile = 'Method : '.$dir.$controller.\"::\".$method.\"()\";\n\t\t\t\t\t\t\trequire('error.php');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($config['custom_error']==true){\n\t\t\t\t$errorfile = ROOT.APPS.'controllers'.DS.'error'.EXT;\n\t\t\t\tif(file_exists($errorfile)){\n\t\t\t\trequire_once $errorfile;\n\t\t\t\t $error = new error;\n\t\t\t\t $error::index();\n\t\t\t\t }else{\n\t\t\t\t\t$errorfile =($controller =='http:' || $controller=='https') ? 'Base url not set' : 'Custom error is not exists : error'.EXT;\n\t\t\t\t\trequire('error.php');\n\t\t\t\t }\n\t\t\t\t}else{\n\t\t\t\t$errorfile =($controller =='http:' || $controller=='https') ? 'Base url not set' : 'File : '.$dir.$controller.EXT;\n\t\t\t\trequire('error.php');\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "dc31d13bb939185e5caa0715abd915af", "score": "0.5113301", "text": "protected function RedirectToController($method=null, $arguments=null) {\n $this->ly->RedirectToController($method, $arguments);\n }", "title": "" }, { "docid": "46792c0bbfbe1e55ef19d6c10196b114", "score": "0.51124454", "text": "public function dispatch(): void\n {\n\t\t$this->request = new Request();\n\t\t$router = new Router();\n\t\t$router->parseRequest($this->request->getUrl(), $this->request);\n\t\ttry {\n\t\t $controller = $this->loadController();\n\t\t} catch (\\Throwable $t) { \n Router::renderErrorPage();\n }\n\t\t$handler = [$controller, strtolower($this->request->getMethod()).ucfirst($this->request->action)];\n\t\tif (!is_callable($handler)) {\n\t\t\tRouter::renderErrorPage();\n\t\t}\n\t\tcall_user_func_array($handler, [$this->request]);\n }", "title": "" }, { "docid": "f10f93cc35e09d90936e239a2bef22c7", "score": "0.51051307", "text": "private static function _method()\n {\n $length = count(self::$_url);\n\n if ($length > 1) {\n if (!method_exists(self::$_controller, self::$_url[1])) {\n self::_error();\n }\n }\n\n switch ($length) {\n case 5:\n //Controller->Method(Param1, Param2, Param3)\n self::$_controller->{self::$_url[1]}(self::$_url[2], self::$_url[3], self::$_url[4]);\n break;\n\n case 4:\n //Controller->Method(Param1, Param2)\n self::$_controller->{self::$_url[1]}(self::$_url[2], self::$_url[3]);\n break;\n\n case 3:\n //Controller->Method(Param1, Param2)\n self::$_controller->{self::$_url[1]}(self::$_url[2]);\n break;\n\n case 2:\n //Controller->Method(Param1, Param2)\n self::$_controller->{self::$_url[1]}();\n break;\n\n default:\n self::$_controller->index();\n break;\n }\n }", "title": "" }, { "docid": "4d2c9665241ee81b2d980ca8d65dd14b", "score": "0.5099091", "text": "public function direct()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n $uri = $_SERVER['REQUEST_URI'];\n\n if (array_key_exists($uri, $this->routes[$method])) {\n $currentRoute = $this->routes[$method][$uri];\n $controller = new $currentRoute['controller']();\n $controller->{$currentRoute['method']}();\n return;\n }\n\n throw new Exception('Route not defined!');\n }", "title": "" }, { "docid": "9fbcf87ed071cd301cf7e7922f1c5ea5", "score": "0.5097334", "text": "public static function invoke() {\n\t\tself::$request = new Request();\n\t\tnew MenuController();\n\t\tnew ShortcodeController();\n\t\tnew AjaxUserController( self::$request );\n\t}", "title": "" }, { "docid": "36b197b1c675fa040c226b2fbeaf8fd2", "score": "0.5093739", "text": "public function dispatchController(): void {\n\n $action = $this->action . 'Action';\n\n $securityCheck = $this->Controller->preDispatch();\n\n if ($securityCheck === false) {\n $this->Controller = new NotFound();\n $action = 'forbiddenAction';\n }\n\n $this->Controller->$action($this->params);\n $this->setToInclude();\n\n }", "title": "" }, { "docid": "c65ff9a4d67209f03f57d1eb3d2eeae4", "score": "0.5093512", "text": "private function getController() \n\t{\n\t\t$route = ( empty( $_GET['rt'] ) ) ? '' : $_GET['rt'];\n\n\t\tif( empty( $route ) )\n\t\t\t$route = 'index';\n\t\telse\n\t\t{\n\t\t\t$parts = explode( '/', $route );\n\t\t\t$this->controller = $parts[0];\n\t\t\tif( isset( $parts[1] ) )\n\t\t\t\t$this->action = $parts[1];\n\t\t}\n\n\t\tif( empty( $this->controller ) )\n\t\t\t$this->controller = 'index';\n\n\t\tif( empty( $this->action ) )\n\t\t\t$this->action = 'index';\n\n\t\t$this->file = $this->path .'/'. $this->controller . 'Controller.php';\n\t}", "title": "" }, { "docid": "c2cda1b2c460cb2cb222a623008c4b4b", "score": "0.5088816", "text": "public function routeRequest()\n {\n ob_start();//Just a security measure to ensure accidental echos in the controllers don't break the theme output\n if(class_exists('site\\\\controllers\\\\'.$this->controller)){\n $class = new \\ReflectionClass('site\\\\controllers\\\\'.$this->controller);\n if($class->isSubclassOf('nigiri\\Controller')) {\n /** @var Controller $instance */\n $instance = $class->newInstance();\n if ($class->hasMethod($this->action)) {\n return $instance->executeAction($this->action);\n } elseif ($class->hasMethod('action' . ucfirst($this->action))) {\n return $instance->executeAction('action'.ucfirst($this->action));\n }\n }\n }\n ob_end_clean();\n throw new FileNotFound();\n }", "title": "" }, { "docid": "d7edb6e2a6c40cce89743e448286a0da", "score": "0.50868225", "text": "protected function RedirectToControllerMethod($controller=null, $method=null, $arguments=null) {\n $this->je->RedirectToControllerMethod($controller, $method, $arguments);\n }", "title": "" }, { "docid": "2426458da948e142fca0040fd3c98cb0", "score": "0.5080693", "text": "public function loadMethod(){\r\n\r\n // de existir el metodo llevamos a cabo la carga\r\n if(method_exists($this->controller,$this->method)){\r\n\r\n call_user_func_array([$this->controller,$this->method],$this->parameters);\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "bddef4c292feee640b3ba94f11302786", "score": "0.50731325", "text": "public function onKernelController(FilterControllerEvent $event)\n {\n/* $request = $event->getRequest();\n //$controller = $event->getController();\n \n //...\n \n // the controller can be changed to any PHP callable\n $event->setController($controller); */ \n }", "title": "" }, { "docid": "694ac877d5493b6fd80c0d2b1b6e8796", "score": "0.5067588", "text": "protected function RedirectToController($method=null, $arguments=null) {\r\n $this->crz->RedirectToController($method, $arguments);\r\n }", "title": "" }, { "docid": "f8561f02f3472ddd4d44890e73a52a1d", "score": "0.50667787", "text": "protected function routes()\n {\n //\n }", "title": "" }, { "docid": "2894c83a0f4b609fca9f588e21607514", "score": "0.50659007", "text": "protected function RedirectToController($method=null, $arguments=null) {\n $this->de->RedirectToController($method, $arguments);\n }", "title": "" }, { "docid": "5146ca7523575a5e7bb1e956493df44c", "score": "0.50527537", "text": "protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, '../', $this->get('template'));\n }", "title": "" }, { "docid": "71783aa018031458314e741fa7355adf", "score": "0.5051539", "text": "public function getController()\n {\n return parent::getController();\n }", "title": "" }, { "docid": "20c4508413fb8eb27c6114450c2f9714", "score": "0.5047138", "text": "protected function call() {\n\t\n\t\tlist($controller, $method, $args) = func_get_args();\n\t\n\t\tif(is_object($controller)) {\n\t\t\t\n\t\t\tif(! $controller instanceof Controller) {\n\t\t\t\tthrow new InvalidArgumentException(\"Not a Controller instance\");\n\t\t\t} else {\n\t\t\t\t$obj = $controller;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t# load the controller\n\t\t\t$class = core_load_controller($controller);\n\t\t\t\n\t\t\t# validate controller class\n\t\t\tif(!is_subclass_of($class, 'Controller')) {\n\t\t\t\tthrow new InvalidArgumentException(\"$class must extend Controller\");\n\t\t\t} elseif(!method_exists($class, $method)) {\n\t\t\t\tthrow new InvalidArgumentException(\"$class::$method does not exist\");\n\t\t\t} elseif(!is_callable(array($class, $method))) {\n\t\t\t\tthrow new InvalidArgumentException(\"$class::$method is not callable\");\n\t\t\t} elseif($obj === NULL) {\n\t\t\t\t$obj = new $class;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t# call the controller\n\t\tcall_user_func_array(array($obj, $method), (array) $args);\n\t}", "title": "" }, { "docid": "0d3746093fcc325571c97cb27eac1584", "score": "0.5046754", "text": "public function handleRequest()\n {\n $urlData = $this->getUrlData();\n// diebug($urlData);\n // Set the Controller.\n $this->controller = $urlData['controller'] ? ucfirst($urlData['controller'] . 'Controller') : $this->controller;\n\n // Set the Method.\n $this->method = $urlData['method'] ?: $this->method;\n\n // Set the ID.\n $this->id = $urlData['id'] ?: $this->id;\n\n // Set the Plugin if requested.\n $this->plugin = $urlData['plugin'] ? ucfirst($urlData['plugin']) : null;\n\n // Set paths for plugin if exists.\n if (!empty($this->plugin)) {\n $this->setPluginPaths($this->plugin);\n }\n\n // Initialize Controller.\n $this->controller = $this->controllerPath . $this->controller;\n $this->controller = new $this->controller();\n\n // Set parameters to either the array values or an empty array.\n $this->params = !empty($urlData['params']) ? unserialize($urlData['params']) : $this->params;\n\n // Call the chosen method on the chosen controller, passing\n // in the parameters array (or empty array if above was false).\n call_user_func_array(array($this->controller, $this->method), array($this->id, $this->params));\n }", "title": "" }, { "docid": "27925a6999e85a5c712c77a53b882ba4", "score": "0.50396985", "text": "function index() {\n\n\t\t$method_name = $this->method;\n\n\t\t$method_name = preg_replace('/\\./', '_', $method_name);\n\t\t\n\t\t__call($method_name, $this->params);\n\n\t}", "title": "" }, { "docid": "bad9833cdc0ef44192ce81fd00811322", "score": "0.5039525", "text": "public function execute()\n\t{\n\t\t$class = new \\ReflectionClass('\\Mooo\\Application\\Classes\\Controller\\\\' . $this->controller());\n\t\t$controller = $class->newInstance(Request::$current);\n\t\t\n\t\t// Hooks to run before before() method\n\t\t\\Mooo\\System\\Core\\Hook::call('PRE_CONTROLLER');\n\t\t\n\t\t// Invoke before() method\n\t\t$class->getMethod('before')->invoke($controller);\n\t\t\n\t\t// Invoke normal method, and pass given parameters\n\t\t$class->getMethod('action_'.$this->method())->invoke($controller, $this->parameters());\n\t\t\n\t\t// Invoke after() method\n\t\t$class->getMethod('after')->invoke($controller);\n\t\t\n\t\t// Hooks to run after after() method\n\t\t\\Mooo\\System\\Core\\Hook::call('POST_CONTROLLER');\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e925f668cc094c88fa083ac3345c4c17", "score": "0.50339", "text": "private function getController() {\n\t\n\t\t// determine the route from the URL\n\t\t$route = (empty($_GET[\"route\"])) ? '' : $_GET[\"route\"];\n\t\t$route = urldecode($route);\n\t\t\n\t\t// sanitise route to prevent directory traversal\n\t\t$route = ltrim($route,\"/\");\n\t\t$route = preg_replace(\"[^0-9a-zA-Z_/]\",\"\",$route);\n\t\t\n\t\tif (empty($route)) {\n\t\t\t\n\t\t\t// default to index controller if there is no route \n\t\t\t$route = \"index\";\n\n\t\t} else {\n\t\t\t\n\t\t\t// build controller name\n\t\t\t$parts = explode('/',$route);\n\t\t\t$this->controller = ucfirst($parts[0]).\"Controller\";\n\t\t\t\n\t\t\t// set action\n\t\t\tif (isset($parts[1])) $this->action = $parts[1];\n\t\t\t\n\t\t}\n\t\n\t\t// set default controller and action if they do not exist\n\t\tif (empty($this->controller)) $this->controller = 'IndexController';\n\t\tif (empty($this->action)) $this->action = 'index';\n\n\t\t// set the file path\n\t\t$this->file = $this->path.'/'.$this->controller.'.php';\n\t\t\n\t}", "title": "" }, { "docid": "394342d27623a5c0b203fc3c23addb23", "score": "0.50264984", "text": "private function registerRouteBindings()\n {\n Route::bind('report', function ($value, $route) {\n $date = Carbon::parse($value);\n\n return Report::whereBetween('date', [\n $date->copy()->startOfDay(),\n $date->copy()->endOfDay(),\n ])->firstOrFail();\n });\n\n Route::bind('announcement', function ($value, $route) {\n return Announcement::whereSlug($value)->firstOrFail();\n });\n\n Route::bind('wallet', function ($value, $route) {\n $wallet = Wallet::findByAddress($value);\n\n if ($wallet->is_private) {\n abort(404);\n }\n\n return $wallet;\n });\n\n Route::bind('disbursement', function ($value, $route) {\n return Disbursement::findByTransactionId($value);\n });\n }", "title": "" } ]
dd1af449dca2b72eea89b40c6da39dd5
Retrieve all casinos, optionally with their child relations
[ { "docid": "06077c2fba34b3fc744c02bf556ecdb6", "score": "0.7761703", "text": "public function getAllCasinos($childRelations = false);", "title": "" } ]
[ { "docid": "e4d5df466f9ba1dbd194cf1c7a01219f", "score": "0.65021646", "text": "public function casos()\n\t{\n\t\treturn $this->hasOne('App\\Caso');\n\t}", "title": "" }, { "docid": "a8fc15e1a5b2027a2afbd835e64a105d", "score": "0.63400596", "text": "public function cargos(){\n\n return $this->morphToMany(Cargo::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "title": "" }, { "docid": "2c9ae56c8ffd6ea09cc2a0f7d924cd30", "score": "0.6238826", "text": "public function getCasino($id, $childRelations = false);", "title": "" }, { "docid": "d0158bf676e5f551ce8ae80f1fb5ed18", "score": "0.61632323", "text": "public function getAll()\n\t{\n\t\t$results = $this->defaultGet()->execute()->setRowClass($this->rowClass)->fetchAll();\n\t\tforeach($results as &$row) {\n\t\t\tforeach($this->getAssociations() as $assocId => $assoc) {\n\t\t\t\tif ($assoc instanceof DormOneToMany || $assoc instanceof DormManyToMany) {\n\t\t\t\t\t$row[$assocId] = array($this, 'getAllForeign');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "fc6713c8b8f49c46e62ac443eab09c98", "score": "0.60846853", "text": "public function getAll()\n {\n return Concepto::where('id_obra', $this->context->getId())\n ->orderBy('nivel')\n ->get();\n }", "title": "" }, { "docid": "ae5d994bca48e5b1b327d78346562614", "score": "0.6058558", "text": "public function getAll() {\n $entityManager = $this->getEntityManager();\n // requête DQL : liste des enfants triés par prenom\n $query = $entityManager->createQuery(\n \"SELECT p\n FROM App\\Entity\\Parents p\n ORDER BY p.prenom DESC\"\n );\n return $query->execute();\n }", "title": "" }, { "docid": "e9769404cff5d19139b087e789ee1b23", "score": "0.59833556", "text": "public function findCategoriesMeres()\n {\n return $this\n ->createQueryBuilder('c')\n ->where('c.parent IS NULL');\n }", "title": "" }, { "docid": "990db67c4368efcc00c50a274925b5b7", "score": "0.5945588", "text": "public function getRelations();", "title": "" }, { "docid": "adf3ad8687058b96e09705b1ef6effe3", "score": "0.5896887", "text": "public function getComentarios()\n {\n return $this->hasMany(Comentarios::className(), ['post_id' => 'id'])->inverseOf('post');\n }", "title": "" }, { "docid": "6fb099d787e3f6246c8346017cd0e2d8", "score": "0.58857334", "text": "public function findAllWithExtraProperties()\r\n {\r\n $dql = \"SELECT c1, c2.name AS parentName \" .\r\n \t \"FROM ContigoModelBundle:Customer c1 LEFT JOIN customer c2 ON c1.parent = c2.id ORDER BY c1.name\"; \t\r\n return $this->getEntityManager()\r\n ->createQuery($dql)\r\n ->getResult();\r\n }", "title": "" }, { "docid": "b127af0cecddfba967e746f4bc8797bc", "score": "0.5833819", "text": "public function all()\n {\n return $this->findWithChildren(null);\n }", "title": "" }, { "docid": "27df11f95b2e919e34df1750aeaedcbd", "score": "0.5827174", "text": "public function getAllCasinos()\n {\n $casinos = $this->casinoService->getAllCasinos(true)->keyBy('id');\n $casinos->map(function($casino) {\n $casino->getFormattedCasinoOpeningTimes()->map(function($openingTime) {\n $openingTime->open_time = Carbon::createFromFormat('H:i:s', $openingTime->open_time)->format('H:i a');\n $openingTime->close_time = Carbon::createFromFormat('H:i:s', $openingTime->close_time)->format('H:i a');\n });\n });\n\n return $casinos;\n }", "title": "" }, { "docid": "3a9ae929c7101be29bcb85ee476e0ad2", "score": "0.579293", "text": "public function congelados(): HasMany\n {\n return $this->hasMany(Congelado::class);\n }", "title": "" }, { "docid": "883196ee64f05cdb04d835305bb75947", "score": "0.578555", "text": "public function getContatos()\n {\n return $this->getContatoRepository()->findAll();\n }", "title": "" }, { "docid": "fff2a0aea5ddb72c32d37c19ddf0eac7", "score": "0.57749504", "text": "protected function getCascadingRelations(): array\n {\n return isset($this->cascadeRelations) ? (array)$this->cascadeRelations : [];\n }", "title": "" }, { "docid": "ed875dc76d25ad82f244f598db63f373", "score": "0.57743484", "text": "public function getAll()\n {\n return $this->db->get('Grupo_Cargos')->result();\n }", "title": "" }, { "docid": "f46e12b8b3472a8a1f261e05e69a0feb", "score": "0.57302916", "text": "public function findAllWithRelation();", "title": "" }, { "docid": "7019578891148c5a85bc4ac4c548771b", "score": "0.5714687", "text": "public function all($relation = []);", "title": "" }, { "docid": "7dbe60fb1f93c3a8279bc5cedcd76f70", "score": "0.57140017", "text": "public function fetchAll()\n\t{\n\t\t// chamando método pai\n\t\treturn $this->fetchListAbstrato($this->_arrayMapper, 'Basico_Model_CategoriaAssocEventoAcao');\n\t}", "title": "" }, { "docid": "e0a4922f5f56e6ed1257a5b1523a75a3", "score": "0.56939584", "text": "public function getCriticas()\n {\n return $this->hasMany(Criticas::className(), ['producto_id' => 'id'])->inverseOf('producto');\n }", "title": "" }, { "docid": "95f6adaacc46607f09186ca37e9dc9e6", "score": "0.5671796", "text": "public function includeChildrenOrgs();", "title": "" }, { "docid": "0dd77fd53cef65c1824f327a998bceb7", "score": "0.5656848", "text": "public function getDeleteCascade(): array\n {\n $result = [];\n $fields = array_filter($this->fields, fn($field) => $field->relationship && $field->cascades);\n foreach ($fields as $field) {\n if (method_exists($field, 'getDeleteCascade')) {\n // The field has children that may need cascading\n $result[$field->relationship] = $field->getDeleteCascade();\n } else {\n $result[] = $field->relationship;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "8d4ca7155c2df88d88ecc6995f6c401d", "score": "0.5634222", "text": "public function getAll()\n {\n return $this->authorComics\n ->get();\n }", "title": "" }, { "docid": "89c25587b87b1c4c236cfe95299b83e0", "score": "0.56082606", "text": "public function allCous($coId) {\n $args = array();\n $args['conditions']['Cou.co_id'] = $coId;\n $args['order'] = 'Cou.name ASC';\n $args['fields'] = array('Cou.name', 'Cou.id');\n $args['contain'] = false;\n\n $Cou = ClassRegistry::init('Cou');\n $cous = $Cou->find(\"all\", $args);\n\n return Hash::extract($cous, '{n}.Cou') ?? array();\n }", "title": "" }, { "docid": "d48613342463116d143e85c6b604e51a", "score": "0.56021136", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM zoa_cargo';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "67f0517072d613bb4fb9b069dfc6e498", "score": "0.55956984", "text": "public function getAhorros(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collAhorrosPartial && !$this->isNew();\n if (null === $this->collAhorros || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collAhorros) {\n // return empty collection\n $this->initAhorros();\n } else {\n $collAhorros = ChildAhorroQuery::create(null, $criteria)\n ->filterBySocio($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collAhorrosPartial && count($collAhorros)) {\n $this->initAhorros(false);\n\n foreach ($collAhorros as $obj) {\n if (false == $this->collAhorros->contains($obj)) {\n $this->collAhorros->append($obj);\n }\n }\n\n $this->collAhorrosPartial = true;\n }\n\n return $collAhorros;\n }\n\n if ($partial && $this->collAhorros) {\n foreach ($this->collAhorros as $obj) {\n if ($obj->isNew()) {\n $collAhorros[] = $obj;\n }\n }\n }\n\n $this->collAhorros = $collAhorros;\n $this->collAhorrosPartial = false;\n }\n }\n\n return $this->collAhorros;\n }", "title": "" }, { "docid": "094861da95895f06b2224b3265b96246", "score": "0.5587833", "text": "public static function all(){\n\t\t$salida = [];\n\t\t$query = \"SELECT * FROM \" . static::$tabla;\n\t\t$stmt = DBcnx::getStatement($query);\n\t\tif($stmt->execute()) {\n\t\t\twhile($fila = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$cancha = new Cancha;\n\t\t\t\t$cancha->id_cancha = $fila['ID_CANCHA'];\n\t\t\t\t$cancha->nombre_cancha = $fila['NOMBRE_CANCHA'];\n\t\t\t\t$cancha->foto = $fila['FOTO'];\n\t\t\t\t$cancha->tipo_cancha = $fila['TIPO_CANCHA'];\n\t\t\t\t$cancha->barrio = $fila['BARRIO'];\n\t\t\t\t$cancha->direccion = $fila['DIRECCION'];\n\t\t\t\t$cancha->borrado = $fila['BORRADO'];\n\n\t\t\t\t$cancha->puntaje = $fila['PUNTAJE'];\n\t\t\t\t$cancha->precio = $fila['PRECIO'];\n\t\t\t\t$cancha->cargarDatos($fila);\n\t\t\t\t$salida[] = $cancha;\n\t\t\t}\n\t\t}\n\t\treturn $salida;\n\t}", "title": "" }, { "docid": "e1ff2f8b677785b432c4e956c12de989", "score": "0.5583198", "text": "public function getAll()\n {\n return ConcertResource::collection(Concert::all());\n }", "title": "" }, { "docid": "0cb67c3c02031442e76156b9ed707704", "score": "0.557239", "text": "public function getRelations()\n {\n return [];\n }", "title": "" }, { "docid": "2e0e520ac339747b3e8ae341b84bc811", "score": "0.55709916", "text": "public function contatos() {\n\t\treturn $this->belongsToMany('App\\Contato', 'contato_obra');\n\t}", "title": "" }, { "docid": "76f58e645170c860c6aca1b618fbdfa6", "score": "0.55466855", "text": "function getRelations();", "title": "" }, { "docid": "bcd7ea6c35e495a03ab3462e54235959", "score": "0.55446374", "text": "public function findAllCourses() {\n $this->crsArray = array();\n\n $set = $this->db->query('SELECT * FROM object_data INNER JOIN object_reference USING(obj_id) WHERE type=\"crs\"');\n\n while ($rec = $this->db->fetchAssoc($set)) {\n $this->crsArray[] = array('obj_id' => (int)$rec['obj_id'], 'ref_id' =>(int)$rec['ref_id'], 'type' => $rec['type'], 'title' => $rec['title'],\n 'description' => $rec['description'], 'role_id' => 0);\n }\n }", "title": "" }, { "docid": "cc43e26af24d924f2acc422192921434", "score": "0.55305654", "text": "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = CircuitPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "title": "" }, { "docid": "c789fc17665414b871836f410db716e3", "score": "0.55235887", "text": "public function getCarreras()\n {\n return $this->hasMany(Carreras::className(), ['id_procedencia' => 'id_procedencia']);\n }", "title": "" }, { "docid": "5e071a1931f21e7a0cb2cf57131a2baa", "score": "0.5474136", "text": "public function getAll() {\n try {\n return $this->facturaDao->getAll();\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "8c7987548e1cfca0bc3edbcf31f34491", "score": "0.5466346", "text": "public function findAll()\n\t{\n\t\t$user = Auth::user();\n\t\t$categorys = Categorys::join('web_po_cates_translation', 'web_po_cates_translation.po_cates_id', 'web_po_cates.id')->where('langcode', 'vi')->select('*', 'web_po_cates.id as id')->get();\n\t\t$data = [['id'=>null, 'specifications'=>[], 'name'=>'Parent']];\n\t\tforeach ($categorys as $key => $value) {\n\t\t\t$value->specifications = Options::join('web_options_translation', 'web_options.id', 'web_options_translation.options_id')->join('web_pro_ginfotechs', 'web_pro_ginfotechs.options_indentify', 'web_options.indentify')->where('web_options_translation.langcode', 'vi')->where('web_pro_ginfotechs.po_cates_id', $value->id)->get();\n\t\t\tforeach ($value->specifications as $specValue) {\n\t\t\t\t$specValue->value = OptionsValue::where('options_indentify', $specValue->indentify)->where('options_types_indentify', $specValue->options_types_indentify)->get();\n\t\t\t}\n\t\t\tarray_push($data, $value);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "abddc98fa98545e13f919ccc2222614f", "score": "0.54662246", "text": "public function getAll() {\n return $this->db->select('*')\n ->from($this->table)\n ->join('associations', 'associations.idassociation = ' . $this->table . '.associationId')\n ->get()\n ->result();\n }", "title": "" }, { "docid": "ed0ec2c8c828c4e5e0fad8665f24c954", "score": "0.544917", "text": "public function children() {\n return $this->db->select_sum('child')\n ->from($this->table)\n ->join('associations', 'associations.idassociation = ' . $this->table . '.associationId')\n ->get()\n ->result();\n }", "title": "" }, { "docid": "8ca3407882f8738b38eb1874ca3db27e", "score": "0.54468566", "text": "function obtenerCarreras () {\n $carreras = Carrera::all();\n return $carreras;\n }", "title": "" }, { "docid": "bb35d9be7a4bdfcfa3d7ff1a6435bdc9", "score": "0.5429844", "text": "public function getComentarios()\n {\n return $this->hasMany(Comentarios::className(), ['id_user_com' => 'id']);\n }", "title": "" }, { "docid": "bca56391f3b0a61dbf072ba361fddb2a", "score": "0.5412578", "text": "public function getRelationships();", "title": "" }, { "docid": "0124c5cac0b3351850f6c4e89b631078", "score": "0.5411003", "text": "public function getCompanyAll();", "title": "" }, { "docid": "b526c456f44bab5c904de39fd5cb999b", "score": "0.5402905", "text": "public function getConsolas(){\n $consolas=Consola::all();\n return $consolas;\n }", "title": "" }, { "docid": "9729822d3e44d4edb546fa05899dd505", "score": "0.5398593", "text": "public function findAllCache()\r\n {\r\n \t\r\n \treturn $this->createQuery(\"c\")\r\n \t\t\t\t //->useQueryCache(Apc::getInstance(), sfConfig::get('app_cachelistecategories'))\r\n\t\t\t\t\t //->useResultCache(Apc::getInstance(), sfConfig::get('app_cachelistecategories'))\r\n\t\t\t\t\t ->execute();\r\n }", "title": "" }, { "docid": "1585af3bb2c3b95447b32cb59db60cdb", "score": "0.53984475", "text": "public function buscarPorIdAtracao($atracao) {\n\t\t$this->conectar();\n\t\t$comentarios = array();\n\t\t\n\t\tif (!strcmp(get_class($atracao),\"Evento\")) {\n\t\t\t$id_atracao = \"id_evento\";\n\t\t}\n\t\telse {\n\t\t\t$id_atracao = \"id_estabelecimento\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM Comentarios WHERE \".\n\t\t\t\t $id_atracao . \"=\" . $atracao->getId();\n\t\t$i = 0;\n\t\tforeach($this->conexao->query($query) as $linha) {\n\t\t\t$comentarios[$i] = new Comentario;\n\t\t\t$comentarios[$i]->setId($linha[0]);\n\t\t\t$comentarios[$i]->setCategoria($linha[1]);\n\t\t\t$comentarios[$i]->setDataInclusao($linha[2]);\n\t\t\t$comentarios[$i]->setIdEstabelecimento($linha[3]);\n\t\t\t$comentarios[$i]->setIdEvento($linha[4]);\n\t\t\t$comentarios[$i]->setIdUsuario($linha[5]);\n\t\t\t$comentarios[$i]->setTexto($linha[6]);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $comentarios;\n\t\t\n\t}", "title": "" }, { "docid": "8d67e0331376cded2cd14460bbec5cad", "score": "0.5394854", "text": "public function buildRelations()\n {\n $this->addRelation('CiUsuariosRelatedByIdUserCreated', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdUserModified', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdAsociado', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubs', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptions', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_opcion_turnos',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdTurno', '\\\\CiUsuarios', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, 'CiUsuariossRelatedByIdTurno', false);\n $this->addRelation('HbfComandas', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), 'CASCADE', 'CASCADE', 'HbfComandass', false);\n $this->addRelation('HbfEgresos', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, 'HbfEgresoss', false);\n $this->addRelation('HbfPrepagos', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, 'HbfPrepagoss', false);\n $this->addRelation('HbfSesiones', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, 'HbfSesioness', false);\n $this->addRelation('HbfVentas', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, 'HbfVentass', false);\n }", "title": "" }, { "docid": "cc6060187efcc5ee03b5090a76a9794c", "score": "0.5385124", "text": "public function carreras()\n {\n return $this->belongsToMany('App\\Carrera');\n }", "title": "" }, { "docid": "51c2f1421a842d17cb70ac64c3e8fab2", "score": "0.53849196", "text": "public function cotizaciones()\n {\n return $this->hasMany(Cotizacion::class);\n }", "title": "" }, { "docid": "1b0dce72e38cdc758c717dc35796270d", "score": "0.5377344", "text": "public function clases()\n {\n return $this->hasMany(Clase::class);\n }", "title": "" }, { "docid": "5be3c5dde4622c8691ed6e9a25286480", "score": "0.5376942", "text": "public function getAll()\n {\n $query = $this->newQuery();\n\n return $this->fetchMany($query);\n }", "title": "" }, { "docid": "7fcc2d487d43423288d74ddad929264d", "score": "0.5374222", "text": "public function obtener_parentescos()\n {\n $em = $this->getDoctrine()->getManager();\n $parentescos = $em->getRepository('SICBundle:Persona')->findParentescos();\n return $parentescos;\n }", "title": "" }, { "docid": "59483d04e8e138128761c102c3f03d48", "score": "0.53738445", "text": "public function getDeclaredRelations();", "title": "" }, { "docid": "4d4cbe6d86525aa55008457f69de73e7", "score": "0.53623915", "text": "public function getAll(): Collection;", "title": "" }, { "docid": "4d4cbe6d86525aa55008457f69de73e7", "score": "0.53623915", "text": "public function getAll(): Collection;", "title": "" }, { "docid": "9613a26d4bd8dbeebe7a2269ea495f98", "score": "0.5361164", "text": "public function getChildren()\n\t{\n\t\t$childrenAsso=UserChild::model()->findAllByAttributes(array('user_id'=>$this->id));\n\t\t\n\t\t//Yii::log('the size of the association is =='.sizeof($childrenAsso).' user id='.$id);\n\t\t\n\t\t//$childrenRetArr=array();\n\t\tforeach($childrenAsso as $child)\n\t\t{\n\t\t\tYii::log('------found association==='.$child['child_id'].' user_id=='.$child['user_id'],'info','User.afterFind');\t\n\t\t\t$childrenRetArr=Child::model()->findByAttributes(array(\"id\"=>$child['child_id']));\n\t\t//\tYii::log('--------------trying to find child using id==='.$child['child_id'].' and size==='.sizeof($childrenAsso)\t,'info','User.afterFInd');\n\t//\t\t\n\t\t\t\n\t\t\tif($childrenRetArr['first_name']!='' && $childrenRetArr['last_name']!='' && $childrenRetArr['dob']!='')\n\t\t\t\t$this->children[]=array('child_first_name'=>$childrenRetArr['first_name'],'child_last_name'=>$childrenRetArr['last_name'],\n\t\t\t\t'child_dob'=>Yii::app()->dateFormatter->format(\"dd-MM-yyyy\",$childrenRetArr['dob']));\n\t\t}\n \n\t}", "title": "" }, { "docid": "db500db68ae793c4d40c5c4e7b9cc973", "score": "0.5355273", "text": "public function buildRelations()\n {\n $this->addRelation('CuentaRelatedByPadreId', 'MiConta\\\\CuentaBundle\\\\Model\\\\Cuenta', RelationMap::MANY_TO_ONE, array('padre_id' => 'id', ), null, null);\n $this->addRelation('CuentaRelatedByHijoId', 'MiConta\\\\CuentaBundle\\\\Model\\\\Cuenta', RelationMap::MANY_TO_ONE, array('hijo_id' => 'id', ), null, null);\n }", "title": "" }, { "docid": "9f876e4e6a1f5b9d3c1b9f1ac00ae7f8", "score": "0.5351927", "text": "function getParentAcoObjects($convert = false)\r\n {\r\n $this->beAco();\r\n $this->loadObject();\r\n \r\n return $this->getParentObjects($convert);\r\n }", "title": "" }, { "docid": "1f5462e3ec1355618819d0c7aeefa0bc", "score": "0.5350219", "text": "public function getRelationsForCascadeDelete()\n {\n if (property_exists($this, 'cascade_delete')) {\n return $this->cascade_delete;\n }\n return [];\n }", "title": "" }, { "docid": "8d8c212184e44832607a953172df9bbe", "score": "0.53408146", "text": "public function getChildren() {\n $categories[] = $this->id;\n foreach ($this->categories()->get() as $category) {\n $categories[] = $category->id;\n foreach ($category->categories()->get() as $children) {\n $categories[] = $children->id;\n }\n }\n\n return $categories;\n }", "title": "" }, { "docid": "46e82165792108c4c0612f2c3b94364a", "score": "0.5340021", "text": "function getComentarios() {\n $sentencia = $this->db->prepare('SELECT * FROM comentario');\n $sentencia->execute();\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "aae2b8d1c38093c9ca2961ba3f13c401", "score": "0.5339339", "text": "public function get_all(){\n return $this->Domaine->find('all',array('order'=>array('NOM'=>'asc'),'recursive'=>0));\n }", "title": "" }, { "docid": "88f901475857956ad71985cdd8ffa38d", "score": "0.53379214", "text": "public function get_all_catagory(){\n $return_data =array();\n $data =$this\n ->join('category_description', 'category_description.category_id', '=', 'Category.category_id')\n ->select('category.*', 'category_description.name')\n ->Multiwhere(array('category.level'=>'1','category.status'=>'1','category.top'=>'1','category_description.language_id'=>'1'))->orderBy('category.sort_order', 'ASC')->get();\n foreach($data as $item){\n if($child=$this->get_child_catagory($item->category_id)){\n $item['child'] =$child;\n }\n $return_data[] =$item;\n }\n return $return_data;\n }", "title": "" }, { "docid": "1c000321d73ba834f68ce0f10fce5e6c", "score": "0.5337217", "text": "public function AllChildren() {\n\t\treturn $this->owner->stageChildren(true);\n\t}", "title": "" }, { "docid": "6d076a10bf7bbc489ac4e596ae28606f", "score": "0.53367805", "text": "public function relations();", "title": "" }, { "docid": "8641fc565a5c57b5bd47bda5b3d46c76", "score": "0.5336741", "text": "public function compras(){\n return $this->hasMany(Compra::class);\n }", "title": "" }, { "docid": "32a67cc73cba454d379540b6e6e67dda", "score": "0.53366625", "text": "public function subcategorias()\n {\n return $this->hasMany(Subcategoria::class)->has('empresas'); \n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.53337836", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "88576894c584bb2603518b6406eb6ce9", "score": "0.5331417", "text": "public function getAll()\n {\n return $this->model\n ->with('cars')\n ->get();\n }", "title": "" }, { "docid": "75b7b6bb20ed39a2f68122d862710b20", "score": "0.5331327", "text": "public function getAbonos(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collAbonosPartial && !$this->isNew();\n if (null === $this->collAbonos || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collAbonos) {\n // return empty collection\n $this->initAbonos();\n } else {\n $collAbonos = ChildAbonoQuery::create(null, $criteria)\n ->filterBySocio($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collAbonosPartial && count($collAbonos)) {\n $this->initAbonos(false);\n\n foreach ($collAbonos as $obj) {\n if (false == $this->collAbonos->contains($obj)) {\n $this->collAbonos->append($obj);\n }\n }\n\n $this->collAbonosPartial = true;\n }\n\n return $collAbonos;\n }\n\n if ($partial && $this->collAbonos) {\n foreach ($this->collAbonos as $obj) {\n if ($obj->isNew()) {\n $collAbonos[] = $obj;\n }\n }\n }\n\n $this->collAbonos = $collAbonos;\n $this->collAbonosPartial = false;\n }\n }\n\n return $this->collAbonos;\n }", "title": "" }, { "docid": "32bbc76264de5c0e1c4dc4c5730d70e1", "score": "0.5330172", "text": "static public function getAll()\n\t\t{\n\t\t\t$CI = &get_instance();\n\t\t\t$criticidades = array();\n\t\t\ttry {\n\t\t\t\t// $datos = $CI->CriticidadModelo->getCriticidades();\n\t\t\t\t$datos = $CI->CriticidadModelo->get_all();\n \t\t\tforeach ($datos as $row)\n \t\t\t{\n \t\t\t\t$criticidad = new Criticidad();\n \t\t\t\t$criticidad->inicializar($row);\n \t\t\t\tarray_push($criticidades, $criticidad);\t\t\n \t\t\t}\n\t\t\t}\t\n\t\t\tcatch (MY_BdExcepcion $e) {\n\t\t\t\techo 'Excepcion capturada: ', $e->getMessage(), \"\\n\";\n\t\t\t}\n\t\t\treturn $criticidades;\n\t\t}", "title": "" }, { "docid": "db6f96729ed26a20ee033f233d2a8514", "score": "0.5324578", "text": "public function plaqueados(): HasMany\n {\n return $this->hasMany(Plaqueado::class);\n }", "title": "" }, { "docid": "e84ad7185fcc1dac61d97cd30c7e8c15", "score": "0.5322916", "text": "public function findAllRealtyCompany()\n {\n $queryBuilder = $this->createQueryBuilder('realtyCompany');\n $queryBuilder->orderBy('realtyCompany.id', 'DESC');\n\n return $queryBuilder;\n }", "title": "" }, { "docid": "0d0d68b84838378f881b9eb953f24e83", "score": "0.53208923", "text": "public function find_all(){\r\n $res = parent::find_all();\r\n\r\n if($this->entity_exists()){\r\n $res = $this->entity($res);\r\n }\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "9c31ec6e7bf9b6908f08f994ac124a0b", "score": "0.53208524", "text": "public function getAll(){\r\n $this->retriveData();\r\n return $this->cinemas;\r\n }", "title": "" }, { "docid": "d713463171a5bd222f73e0d49bc2a89c", "score": "0.53198886", "text": "public function GetAll_with_Residents()\r\n {\r\n return $this->createQueryBuilder('r')\r\n ->where('r.id_resident IS NOT NULL')\r\n ->orderBy('r.sector', 'ASC')\r\n ->orderBy('r.residence_code', 'ASC')\r\n ->getQuery()\r\n ->getArrayResult();\r\n }", "title": "" }, { "docid": "5d92d5a8fd142c873d0f463bd69ef633", "score": "0.5315537", "text": "public function getCupones()\n {\n return $this->hasMany(Cupones::className(), ['id_lista' => 'id']);\n }", "title": "" }, { "docid": "45c7add48bb31daaf307b2bbfafc4fce", "score": "0.5305752", "text": "public abstract function getEntidades($parent);", "title": "" }, { "docid": "f0382bf2f900e4e9c597e527b253f494", "score": "0.5296979", "text": "public function getRelatedBundles();", "title": "" }, { "docid": "fa42e66f1ff876ebc8b43594c7775050", "score": "0.529181", "text": "public function buildRelations()\n\t{\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Local', 'Local', RelationMap::MANY_TO_ONE, array('local_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Responsavel', 'Responsavel', RelationMap::MANY_TO_ONE, array('responsavel_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Certificado', 'Certificado', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('Cliente', 'Cliente', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorComissionamento', 'ContadorComissionamento', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorContato', 'ContadorContato', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorDetalhar', 'ContadorDetalhar', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('Prospect', 'Prospect', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "4018a25c4ac60aa39900a800f72925d6", "score": "0.52820575", "text": "public function contenidos()\n {\n return $this->hasMany('App\\Contenido');\n }", "title": "" }, { "docid": "49e06e727a94ba84bed522861b2ee1d3", "score": "0.5273815", "text": "public function loadCompanies(){\n return $this->getRepository()->findBy(array('isDeleted' => 0));\n }", "title": "" }, { "docid": "15859aa38382376877966d41741403ff", "score": "0.52724725", "text": "public function getCouleurs(){\n\t\t$query = \"select * from Couleur\";\n\t\t$tmp = $this->retrieve($query);\n\t\treturn $this->extractArrayQuery($tmp, $this, \"buildCouleurFromRow\");\n\t}", "title": "" }, { "docid": "443c1a9b05f3cca22803e2da487c3594", "score": "0.5269307", "text": "public function buildRelations()\n {\n $this->addRelation('Author', 'User', RelationMap::MANY_TO_ONE, array('author_id' => 'id', ), 'SET NULL', 'CASCADE');\n $this->addRelation('Cursus', 'Cursus', RelationMap::MANY_TO_ONE, array('cursus_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Course', 'Course', RelationMap::MANY_TO_ONE, array('course_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('ContentType', 'ContentType', RelationMap::MANY_TO_ONE, array('content_type_id' => 'id', ), 'SET NULL', 'CASCADE');\n $this->addRelation('ContentsFiles', 'ContentsFiles', RelationMap::ONE_TO_MANY, array('id' => 'content_id', ), 'CASCADE', 'CASCADE', 'ContentsFiless');\n $this->addRelation('Comment', 'Comment', RelationMap::ONE_TO_MANY, array('id' => 'content_id', ), 'CASCADE', 'CASCADE', 'Comments');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'content_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('Report', 'Report', RelationMap::ONE_TO_MANY, array('id' => 'content_id', ), 'CASCADE', 'CASCADE', 'Reports');\n $this->addRelation('File', 'File', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Files');\n $this->addRelation('Tag', 'Tag', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Tags');\n }", "title": "" }, { "docid": "18935d7d157fc3fc4943b7ddd2a4476d", "score": "0.5267855", "text": "public function all()\n {\n return $this->entity->get();\n }", "title": "" }, { "docid": "4a54cdf494709519ac3c8f226f7d3269", "score": "0.5265985", "text": "public function find_all()\n\t{\n\t\t$paths = $this->prepare_relations();\n\t\treturn $this->pixie->orm->result($this->model_name, $this->query->execute(), $paths);\n\t}", "title": "" }, { "docid": "1748eea48c9ca2f5383c598d3d705dcc", "score": "0.52640426", "text": "public function listCouriers($asObject = true)\n {\n if ($this->couriers === null) {\n $this->loadCouriers();\n }\n\n if (!$asObject) {\n return $this->couriers;\n }\n\n /*\n * Enrich the collection with gateway objects\n */\n $collection = [];\n foreach ($this->couriers as $courier) {\n if (!class_exists($courier->class))\n continue;\n\n $courierObj = new $courier->class;\n $courierDetails = $courierObj->courierDetails();\n $collection[$courier->alias] = (object)[\n 'owner' => $courier->owner,\n 'class' => $courier->class,\n 'alias' => $courier->alias,\n 'object' => $courierObj,\n 'name' => array_get($courierDetails, 'name', 'Undefined'),\n 'description' => array_get($courierDetails, 'description', 'Undefined'),\n ];\n }\n\n return new Collection($collection);\n }", "title": "" }, { "docid": "11fa3bfe5d511c7d9a51349eebe10259", "score": "0.5256413", "text": "public function index()\n {\n return addChild::all();\n }", "title": "" }, { "docid": "36621567e02a92cc89e090cfd3812ccc", "score": "0.52490467", "text": "public function find() \n {\n return CC::all();\n }", "title": "" }, { "docid": "f92a370eecf28accfe84df9bf7cd247b", "score": "0.5245536", "text": "function getModuloChildren(){\n //return DB::table ( 'modulo' )->whereNotNull('parent')->orderBy('nombre')->get();\n return DB::table ( 'modulo' )->where('parent','>',0)->orderBy('nombre')->get();\n }", "title": "" }, { "docid": "22e5e931969d6c783a59ce451d50aaa1", "score": "0.5243871", "text": "public function carreras()\n {\n return $this->belongsToMany(\n Carrera::class,\n 'estudiantes_carreras',\n 'estudiante_id',\n 'carrera_id'\n );\n }", "title": "" } ]
0c0502bdc4cf182ccc97c9364a72d210
Store a newly created Principioactivo in storage.
[ { "docid": "ea936b2d54261fbc3af5e1e5d7dce698", "score": "0.751355", "text": "public function store(StorePrincipioactivosRequest $request)\n {\n if (! Gate::allows('principioactivo_create')) {\n return abort(401);\n }\n $principioactivo = Principioactivo::create($request->all());\n\n\n\n return redirect()->route('admin.principioactivos.index');\n }", "title": "" } ]
[ { "docid": "c000d1fdad3c661d3fc8561dfaf0fc30", "score": "0.6145736", "text": "public function store() {\n \n $user = $this->getAuthenticatedUser();\n $userID = $user['id'];\n $accountID = $user['accountID'];\n \n }", "title": "" }, { "docid": "896ac34ed2583f8b6b6ac3a276db68e0", "score": "0.6059512", "text": "public function persist()\n {\n $user->create(\n $this->only(['name', 'email', 'password'])\n );\n auth()->login($user);\n \\Mail::to($user)->send(new WelcomeAgain($user));\n }", "title": "" }, { "docid": "6fbedf1d68f40ea295f4d83384b9600d", "score": "0.6000751", "text": "public function store(CreatePersonalRequest $request)\n {\n //return $request;\n try {\n DB::beginTransaction();\n $input = $request->all();\n\n /** @var Personal $personal */\n $personal = Personal::create($input);\n //Registrar Contrato\n $contrato = ContratoPersonal::create([\n 'personal_id' => $personal->id,\n 'fecha_contrato' => $request->fecha_contrato,\n 'tiempo' => $request->tiempo,\n 'sueldo' => $request->sueldo,\n ]);\n $usuario = Usuarios::create([\n 'email' => $request->email,\n 'contrato_personal_id' => $contrato->id,\n 'password' => '$2y$10$cuf37o9lN0IkRFv73Q7IB.c5bDqCvog845XuTKHxSbMep/D04mknG',\n ]);\n if($request->tipo==\"2\"){\n $user = User::where('id','=',$usuario->id)->first();\n $user->assignRole('Gerente');\n }\n elseif ($request->tipo==\"3\") {\n $user = User::where('id','=',$usuario->id)->first();\n $user->assignRole('Administrador');\n }\n elseif ($request->tipo==\"1\") {\n $user = User::where('id','=',$usuario->id)->first();\n $user->assignRole('Operador');\n }\n DB::commit();\n Flash::success(__('messages.saved', ['model' => __('models/personals.singular')]));\n return redirect(route('personals.index'));\n } catch (\\Throwable $th) {\n Flash::error(__('messages.error'));\n dd($th);\n return redirect(route('personals.index'));\n }\n }", "title": "" }, { "docid": "0666f4625f1532eefc5fb8d66be11076", "score": "0.59720206", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'nome' => 'required|string|max:191',\n 'nomeCurto' => 'required|string|max:191',\n 'nuit' => 'required|integer',\n 'email' => 'required|string|email|max:191|unique:empresas',\n 'telemovel1' => 'required|integer|min:9',\n 'provincia' => 'required',\n 'cidade' => 'required',\n 'endereco' => 'required|string|max:191',\n ]);\n\n $empresa = Empresa::create([\n 'nome' => $request['nome'],\n 'nomeCurto' => $request['nomeCurto'],\n 'nuit' => $request['nuit'],\n 'email' => $request['email'],\n 'telemovel1' => $request['telemovel1'],\n 'telemovel2' => $request['telemovel2'],\n 'provincia' => $request['provincia'],\n 'cidade' => $request['cidade'],\n 'endereco' => $request['endereco']\n ]);\n\n $perfil_root = Perfil::where('nome','admin')->first();\n\n $user = new User();\n $user->name = $empresa->nomeCurto;\n $user->email = $empresa->email;\n $user->type = \"Administrador\";\n $user->photo = \"profile.png\";\n $user->password = bcrypt('demo');\n $user->empresa()->associate($empresa);;\n $user->save();\n $user->perfies()->attach($perfil_root);\n\n return $empresa;\n }", "title": "" }, { "docid": "6003f0b9a8726e2ddfc7c4a686c3cc41", "score": "0.5963053", "text": "public function store(Request $request)\n {\n Principal::create($request->all());\n return redirect()->route('principals.index');\n }", "title": "" }, { "docid": "7ff3113128f6bdeb84ab69b649f8d4d3", "score": "0.59500635", "text": "public function store(PerfilRequest $request)\n {\n //\n $persona = Persona::create($request->all());\n $request['idPersona'] = $persona->idPersona;\n $perfil = Perfil::create($request->all());\n return redirect()->route('devengo.index')->with(['mensaje'=>'Perfil Creado con Exito']);\n }", "title": "" }, { "docid": "4dbabf7f806a657b3e0113775bbccfa3", "score": "0.5949893", "text": "public function store(ProfilRequest $request)\n \n {\n //\n Log::instance()->log(empty(Auth::user()->id) ? null : Auth::user(), 'TAMBAH PROFILE');\n $input = $request->all();\n\n Profil::create($input);\n return redirect('profil');\n\n }", "title": "" }, { "docid": "512f1491238e70133086ee52a8684812", "score": "0.5928258", "text": "public function store(Requests\\CreateActividadRequest $request)\n {\n //\n\n $data = $request->all();\n $actividadSiguiente = $this->request->get('actividad_siguiente');\n $actividad = new Actividad($data);\n if(empty($actividadSiguiente))//validamos si llega el numero de la sigueinte actividad y si no la asignamos\n $actividad->actividad_siguiente = $this->request->get('orden')+1;\n\n $actividad->save();\n\n //agregar entregas que tenga el codigo de procedimiento\n $procedimiento = $actividad->procedimiento()->first();\n $ciclo = Ciclo::where('procedimiento_id','=',$procedimiento->id)->first();\n //dd($ciclo);\n if(!empty($ciclo))\n {\n $entrega = new Entrega();\n $entrega->actividad_id = $actividad->id;\n $entrega->ciclo_id = $ciclo->id;\n $entrega->save();\n }\n\n //return redirect()->route('admin.actividades.index');\n return redirect()->route('admin.procedimientos.show',$actividad->procedimiento_id);\n }", "title": "" }, { "docid": "ab310dd1a0ab54f3f75bca8b3adc2cc6", "score": "0.59281206", "text": "public function store(Request $request)\n {\n $request->user()->authorizeRoles('Administrador');\n $pId =$request->session()->get('puntoAtencionId');\n\n $oficinista = new Oficinista;\n $oficinista->nombre =$request->nombre;\n $oficinista->cedula=$request->cedula;\n $oficinista->email=$request->email;\n $oficinista->cargo=$request->cargo;\n $oficinista->genero=$request->genero;\n $oficinista->password=bcrypt($request->password);\n $oficinista->punto_de_atencion_id=$pId;\n $oficinista->save();\n\n return redirect('/oficinistas');\n\n }", "title": "" }, { "docid": "709f991e5b3a1905f5914e3ee5f3f7bf", "score": "0.5922532", "text": "function Registrar()\n\t{\n\t\t$usuario = UsuarioFacebook::ObtenerUsuarioActivo();\n\t\tif(!$usuario->TienePermiso('CrearTipoActividad'))\n\t\tthrow new Exception('No tiene permiso para crear un nuevo tipo de actividad');\n\t\tif($this->EstaRegistrado)\n\t\tthrow new Exception('El tipo de actividad ya está registrado');\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT TipoActividad (Nombre, Descripcion, ItemPuntos) VALUES (%s, %s, %s)\",\n\t\t$conexionBd->Escapar($this->Nombre),\n\t\t$conexionBd->Escapar($this->Descripcion),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->Puntos)))\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$this->id = $conexionBd->EjecutarEscalar('SELECT LAST_INSERT_ID()');\n\t\t$conexionBd->Desconectar();\n\t}", "title": "" }, { "docid": "8cb8d0a5825f8a547e04ff85e54dfeb1", "score": "0.5900632", "text": "public function store(Request $request)\n {\n $persona = new Persona;\n $persona->ci = $request->ci;\n $persona->nombres = $request->nombres;\n $persona->apellidos = $request->apellidos;\n $persona->direccion = $request->direccion;\n $persona->fec_nac = $request->fec_nac;\n $persona->save();\n $persona = Persona::where('ci',$request->ci)->get()->last();\n $usuario = new User;\n $usuario->persona_id = $persona->id;\n $usuario->name = $request->nombres.'_'.$request->apellidos;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->save();\n return redirect()->route('persona.index')->with('mensaje', 'Se guardo correctamente');\n //return redirect();\n }", "title": "" }, { "docid": "53d93105ca1d85a58bfa60fc579d1828", "score": "0.58983546", "text": "public function store(){\n\t\tProveedor::create(Input::except(['_token']));\n\t\treturn 'Proveedor registrado correctamente.';\n\t}", "title": "" }, { "docid": "b3178c592dda11e4c35a868a7b6fa401", "score": "0.58965707", "text": "public function store()\n {\n $attributes = request()->validate(User::$rulesClient, User::$messages);\n\n $roles = $attributes['roles'];\n unset($attributes['roles']);\n $attributes['password'] = bcrypt($attributes['password']);\n\n $client = $this->createEntry(User::class, $attributes);\n\n $client->roles()->attach($roles);\n\n event(new Registered($client));\n\n return redirect_to_resource();\n }", "title": "" }, { "docid": "4801c433128bc3db40d619e85b456231", "score": "0.58938235", "text": "public function store(Request $request)\n {\n $this->authorize('accout-add');\n $user=$this->user->create([\n 'firstname'=>$request->firstname,\n 'lastname'=>$request->lastname,\n 'email'=>$request->email,\n 'password'=>bcrypt($request->password),\n 'phone'=>$request->phone,\n 'address'=>$request->address,\n\n ]);\n \n $user->roles()->attach($request->role);\n return redirect('/admin/user');\n \n }", "title": "" }, { "docid": "77bafacefaa40f2d4823872db287daff", "score": "0.5875261", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'role'=> 'required',\n 'profilepic'=>'required|mimes:png,jpg,jpeg',\n\n ]);\n $user = new User;\n $user->name = $request->name;\n $user->password = bcrypt($request->password);\n $user->email = $request->email;\n //$user->profilepic => $request->profilepic;\n $user->profilepic = $request->profilepic->store('public/uploads');\n $user->key=str_random(10);\n $user->activation = \"notactivated\";\n $user->save();\n $user->roles()->attach($request->role);\n Event::fire(new NewUser($user));\n Auth::logout();\n return view('activate');\n\n }", "title": "" }, { "docid": "3f80d1d42f254f7b683a47efec1c57db", "score": "0.5874578", "text": "public function store(Request $request)\n {\n $nuevoPaciente = new Paciente();\n $nuevoPaciente->nombre = $request->input('nombre');\n $nuevoPaciente->apellidos = $request->input('apellidos');\n $nuevoPaciente->nacimiento = $request->input('nacimiento');\n if ($nuevoPaciente->save()) {\n $nuevoUsuario = new User ();\n $nuevoUsuario->name = $request->input('nombre');\n $nuevoUsuario->email = $request->input('email');\n $nuevoUsuario->password = bcrypt($request->input('password'));\n $nuevoUsuario->id_tipo_usuario = 2;\n $nuevoUsuario->id_paciente = $nuevoPaciente->id;\n if ($nuevoUsuario->save()) {\n return redirect()-> route('pacientes.index')->with('exito','Paciente Agregado');\n }\n }\n return redirect()->route('pacientes.index')->with('error','No se pudo agregar paciente');\n }", "title": "" }, { "docid": "e801e6da9e171675d3f5fe24ec0b9a01", "score": "0.5873", "text": "public function store(Request $request)\n {\n\n // $pessoa->nome = $request->nome;\n // $pessoa->telefone = $request->telefone;\n // $pessoa->email = $request->email;\n\n // $pessoa->save();\n\n // Pessoa::create($request->all());\n // Pessoa:: create([\n // 'nome' =>$request->nome,\n // 'telefone' => $request->telefone,\n // 'email' => $request->email,\n // 'user_id' => auth()->user()->id,\n\n // ]);\n\n auth()->user()->pessoas()->create($request->all()); \n \n\n return redirect('/pessoas');\n }", "title": "" }, { "docid": "3c0761e1dc4ba81a6e247be0af19b0a4", "score": "0.58609396", "text": "public function store(Request $request)\n {\n\n $this->persona->save($request);\n return $this->Secretaria->save($request); \n \n }", "title": "" }, { "docid": "eabf44b5d542f92b386f029b5b3a7456", "score": "0.5848865", "text": "public function store()\n {\n $this->registrationForm->validate(Input::all());\n\n $user = $this->execute(RegisterUserCommand::class);\n\n Auth::login($user);\n\n Flash::overlay('Glad to have you as a new Opprs member!');\n\n return Redirect::home();\n }", "title": "" }, { "docid": "9c6014e9772dc70b269a1860f4d1dc6f", "score": "0.5832148", "text": "public function store()\n\t{\n\t\tdate_default_timezone_set('America/Caracas');\n\t\t// Creamos un nuevo objeto\n $proveedores = new Proveedor;\n // Obtenemos la data enviada por el usuario\n $data = Input::all();\n \n // Revisamos si la data es válido\n if ($proveedores->isValid($data))\n {\n // Si la data es valida se la asignamos\n $proveedores->fill($data);\n // Guardamos\n $proveedores->save();\n // Y Devolvemos una redirección a la acción show para mostrar la información\n return Redirect::route('proveedores.show', array($proveedores->id))\n ->with('create', 'El proveedor <b>' . $proveedores->nombre . '</b> ha sido agregado correctamente.');\n }\n else\n {\n // En caso de error regresa a la acción create con los datos y los errores encontrados\n\t\t\treturn Redirect::route('proveedores.create')->withInput()->withErrors($proveedores->errors);\n }\n\t}", "title": "" }, { "docid": "612ee234686ece19155d4d4734ba3d7a", "score": "0.58283997", "text": "public function create()\n {\n if (! Gate::allows('principioactivo_create')) {\n return abort(401);\n }\n return view('admin.principioactivos.create');\n }", "title": "" }, { "docid": "1b8f7722f700dc4bd05316e533a1b30a", "score": "0.5821705", "text": "public function store(Request $request)\n {\n /*SE PUEDE MEJORAR USANDO CLASES REQUEST\n $this->validate($request,['nombres'=>'required', 'apellido-paterno'=>'required', 'apellido-materno'=>'required','sexo'=>'required','fecha-nacimiento'=>'required']);\n */\n $periodo_actual = Periodo::where('estado',1)->first();\n Profesor::create([\n 'nom_prof' => request('nombres'),\n 'apePaterno_prof' => request('apellido-paterno'),\n 'apeMaterno_prof' => request('apellido-materno'),\n 'sexo_prof' => request('sexo'),\n 'fechaNac_prof' => request('fecha-nacimiento'),\n 'domicilio' => request('domicilio'),\n 'distritoDom_id' => request('distrito'),\n 'estado_prof' => 1 , //el profesor esta activo \n 'dni' => request('dni'),\n 'correo' => request('correo'),\n 'periodo_id' => $periodo_actual->id\n ]);\n \n User::create(\n [\n 'name'=>request('nombres'),\n 'email'=>request('correo'),\n 'user_type'=>'profesor',\n 'password'=>bcrypt(request('dni'))\n ]\n );\n return view('profesor_index');\n \n }", "title": "" }, { "docid": "82baac395d1b28868bbe98971ad7a36d", "score": "0.5798107", "text": "public function store(Request $request)\n {\n \n $user = \\App\\User::find(Auth::id());\n $user->tipo = 1;\n $user->save();\n\n $profissional = new \\App\\Profissional;\n $profissional->id_user = $request->get('id_user');\n $profissional->numero_conselho = $request->get('numero_conselho');\n $profissional->especializacao = $request->get('especializacao');\n $profissional->instituicao = $request->get('instituicao');\n $profissional->save();\n\n return redirect('profissional')->with('success', 'Profissional Cadastrado');\n }", "title": "" }, { "docid": "67cf787a80ff544b69d46834e068653b", "score": "0.5797865", "text": "public function store()\n {\n $this->role->fill($this->params['role']);\n if ($this->role->save()) {\n return redirect()->back()->with('message', 'role Added!');\n } else {\n dd('error!');\n }\n }", "title": "" }, { "docid": "ba500c5f6276c4a0ea949ce518a7987a", "score": "0.57843757", "text": "public function store(Request $request)\n {\n\n Permiso::create($request->all());\n \n Session::flash('msj-success','permiso Registrado Exitosamente!');\n return redirect('/permisos');\n }", "title": "" }, { "docid": "f62f7cbdae062cfed6776fdfd46b5d73", "score": "0.5769692", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'cpf' => 'unique:profissional',\n 'nome' => 'unique:profissional',\n 'email' => 'unique:users',\n ]);\n\n if ($validator->fails()) {\n return Redirect::route($this->Page->link.'.create')\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $data = $request->all();\n $data['password'] = bcrypt('123');\n\n $Contato = Contato::create($data);\n $User = User::create($data);\n $role = Role::find($data['tipo']);\n $User->attachRole($role);\n $data['idcontato'] = $Contato->idcontato;\n $data['idusers'] = $User->idusers;\n $Profissional = Profissional::create($data);\n\n session()->forget('mensagem');\n session(['mensagem' => utf8_encode($this->Page->Target.' cadastrado com sucesso!')]);\n return Redirect::route($this->Page->link.'.index');\n }\n }", "title": "" }, { "docid": "116ed800801af83bfe669f547977cc58", "score": "0.5768952", "text": "public function store(CrearEditarUsuarioRequest $form)\n {\n $user = (new User)->fill($form->all());\n $user->password = bcrypt($user->password);\n // Asignacion de los cai(s)\n $user->save();\n $user->cais()->attach( $form->cai_id );\n $user->assignRole( \\Spatie\\Permission\\Models\\Role::find( $form->role_id ) );\n\n return redirect()->to('/usuario');\n }", "title": "" }, { "docid": "74a11da925bc350fb76e1e3ec5dfd4e2", "score": "0.57571113", "text": "public function store(PerimeterCreateRequest $request)\n {\n $this->roles->store($request->all());\n return redirect('admin/perimeter')->with('success', trans('back/perimeters.created'));\n }", "title": "" }, { "docid": "1dc22e0a63c4bfbe70fb33dfce31500a", "score": "0.5756022", "text": "public function store(Request $request) {\n $permiso = new Permiso($request->all());\n $result = $permiso->save();\n if ($result) {\n $u = Auth::user();\n $aud = new Auditoriaservicio();\n $aud->usuario = \"ID: \" . $u->identificacion . \", USUARIO: \" . $u->nombres . \" \" . $u->apellidos;\n $aud->operacion = \"PERMISO\";\n $str = \"CREACIÓN DE PERMISO. DATOS: \";\n foreach ($permiso->attributesToArray() as $key => $value) {\n $str = $str . \", \" . $key . \": \" . $value;\n }\n $aud->detalles = $str;\n $aud->save();\n if($permiso->tipo == 'SERVICIO'){\n flash(\"El permiso <strong>\" . $permiso->servicio->cliente->nombre . \"</strong> fue almacenado(a) de forma exitosa!\")->success();\n }else {\n flash(\"El permiso <strong>\" . $permiso->solicitudcambio->servicio->cliente->nombre . \"</strong> fue almacenado(a) de forma exitosa!\")->success();\n }\n\n return redirect()->route('servicio.index');\n } else {\n if($permiso->tipo == 'SERVICIO'){\n flash(\"El permiso <strong>\" . $permiso->servicio->cliente->nombre . \"</strong> no pudo ser almacenado(a) de forma exitosa!\". $result)->error();\n }else {\n flash(\"El permiso <strong>\" . $permiso->solicitudcambio->servicio->cliente->nombre . \"</strong> no pudo ser almacenado(a) de forma exitosa!\". $result)->error();\n }\n return redirect()->route('solicitud.index');\n }\n }", "title": "" }, { "docid": "48cd58807384670c1aa79fcf84b16ac5", "score": "0.5740991", "text": "public function store(Request $request)\n {\n //\n $bitacora=new BitacoraControlador;\n $id_bitacora = $bitacora->generar_bitacora('1000');\n\n $usuario=User::create([\n 'name' => $request['name'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['password']),\n 'codigo_institucion' =>$request['codigo_institucion'],\n ]);\n\n $usuario->personas()->attach(session()->get('id_persona'));\n\n Session::flash('mensaje','Usuario se Registro correctamente!');\n\n session()->forget('codigo_transaccion');\n session()->forget('id_persona');\n session()->forget('nombre_persona');\n session()->forget('fecha_nacimiento');\n\n return redirect()->route('usuario.index');\n }", "title": "" }, { "docid": "5183750ffc1948e95170ee39e7135dc9", "score": "0.57372737", "text": "public function store()\n\t{\n\t\t$data = Input::all();\n\n\t\t$validator = Validator::make($data, Apuesta::$rules);\n\n\t\t$validacionHora = $this->validarHora($data);\n\t\t$validacionRepetido = $this->validarRepetido($data);\n\n\t\tif ($validator->fails() || !$validacionHora || $validacionRepetido)\n\t\t{\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\t$a = Apuesta::create($data);\n\t\t\n\t\t$id_fase = Crypt::encrypt(Partido::find($a->idpartido)->idfase);\n\n\t\treturn Redirect::to(\"apuestas/create/\".$id_fase.\"/\");\n\t}", "title": "" }, { "docid": "3fb84a3fa54a4e016b7cfba89900f5b8", "score": "0.5705302", "text": "public function store(PersonStoreRequest $request)\n {\n DB::beginTransaction();\n try {\n\n $person = new Person();\n $person->first_name = $request['nombres'];\n $person->last_name = $request['apellidos'];\n $person->shipping_email = $request['correo_envio'];\n\n $user = new User();\n $user->email = $request['correo_envio'];\n $user->password = bcrypt($request['password']);\n\n if (Auth::user()->isAdmin()) {\n $registrado = Role::find($request['rol']);\n $person = $registrado->person()->save($person);\n } else {\n $registrado = Role::where('name', 'Checker')->first();\n $person = $registrado->person()->save($person);\n }\n $user = $person->user()->save($user);\n\n DB::commit();\n Session::flash('success', \"Se ha guaradado correctamente.\");\n return redirect()->route('persons');\n } catch (\\Exception $e) {\n $success = false;\n DB::rollback();\n dd(\"Error\", $e->getMessage(), \"Rollback realizado!\");\n }\n }", "title": "" }, { "docid": "cdae852b389627e2ce2f02ce730544f3", "score": "0.5699669", "text": "public function store()\n {\n $this->validate(request(), [\n 'name' => 'required|unique:users',\n 'email' => 'required|email',\n 'password' => 'required',\n 'role' => 'required'\n ]);\n \n $user = User::create(request(['name', 'email', 'password','role']));\n \n auth()->login($user);\n \n return redirect('/users')->with('success', 'Ajout avec succes!');\n }", "title": "" }, { "docid": "65457ac5ea2682dbaf9c6c0af34f8f39", "score": "0.56961805", "text": "public function store(Request $request)\n {\n $request->user()->authorizeRoles(['admin', 'operator']);\n $personaAgregar = new Personas;\n $acudienteAgregar = new Acudientes;\n $request->validate(\n [\n 'cc' => 'required',\n 'nombre' => 'required',\n 'apellido' => 'required',\n 'celular' => 'required',\n 'direccion' => 'required',\n 'barrio' => 'required',\n 'ocupacion' => 'required',\n 'parentesco' => 'required'\n ]\n );\n $personaAgregar->id = $request->cc;\n $personaAgregar->nombre = $request->nombre;\n $personaAgregar->apellido = $request->apellido;\n $personaAgregar->celular = $request->celular;\n $personaAgregar->direccion = $request->direccion;\n $personaAgregar->barrio = $request->barrio;\n $acudienteAgregar->ocupacion = $request->ocupacion;\n $acudienteAgregar->persona_id = $request->cc;\n $acudienteAgregar->parentesco_id = $request->parentesco;\n $personaAgregar->save();\n $acudienteAgregar->save();\n return back()->with('success', '¡Registro exitoso!');\n }", "title": "" }, { "docid": "d045721265a7c19fab419d33851d19f8", "score": "0.56720996", "text": "public function store()\n {\n $this->validate([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'phone' => 'required|string|max:255',\n ]);\n\n $user =User::create([\n 'name' => $this->name,\n 'email' => $this->email,\n 'password' => Hash::make('12345678'),\n ]);\n\n $user->attachRole('student');\n Student::create(\n [\n 'name' => $this->name,\n 'phone' => $this->phone,\n 'user_id'=>$user->id\n ]);\n\n session()->flash('message', 'Student created.');\n\n $this->closeModalPopover();\n $this->resetCreateForm();\n }", "title": "" }, { "docid": "2842a96ccc4ae4871818632b12e17f83", "score": "0.5668614", "text": "public function store(Request $request)\n {\n $userExist = Usuario::where('email',$request->email)->first();\n if($userExist) { \n return redirect('/usuario')->with('message', 'error');\n } else {\n $usuario = new Usuario;\n $usuario->nombre = $request->nombre;\n $usuario->apellido = $request->apellido;\n $usuario->email = $request->email;\n $usuario->dependencia = $request->dependencia;\n $usuario->cargo = $request->cargo; \n $usuario->save();\n\n $lastUser = Usuario::where('email',$request->email)->first();\n $idUser = Usuario::find($lastUser->id);\n $idUser->rols()->attach($request->rol_id);\n\n return redirect('/usuario')->with('message', 'ok');\n } \n }", "title": "" }, { "docid": "f98a86dd321b9ae8c7275965014ebd33", "score": "0.5667127", "text": "public function store(CreateProveedorRequest $request)\n {\n $p = new Proveedor; \n $p->username = $request->input('username'); \n // $p->password = bcrypt('12345');\n $p->password = hash('sha256', '12345');\n $p->nombre_empresa = $request->input('nombre_empresa');\n $p->rubro = $request->input('rubro');\n $p->telefono = $request->input('telefono');\n $p->correo = $request->input('correo');\n $p->activo = 1;\n $p->bloqueo = 0;\n $p->save(); \n return redirect()->route('proveedor.index');\n }", "title": "" }, { "docid": "27bb7e284af080e56d8516bbc9d2ed8e", "score": "0.5666266", "text": "public function store(PerfilCreateRequest $request)\n {\n Perfiles::create($request->all());\n Session::flash('save', 'Se ha creado correctamente');\n return redirect()->route('perfiles.index');\n }", "title": "" }, { "docid": "7516ca8c04a518b8cbf73c12c2e37171", "score": "0.5666188", "text": "public function store(Request $request)\n {\n (array) $valid = $this->validateCreateCustomerServiceExecutive($request);\n // Register a CSE\n (bool) $registered = $this->register($valid);\n // Forget a single key...\n $request->session()->forget('applicant');\n return ($registered == true)\n ? redirect()->route('admin.users.cse.index', app()->getLocale())->with('success', \"A Customer Service Executive Account Created Successfully!!\")\n : back()->with('error', \"An error occurred while creating Account\");\n }", "title": "" }, { "docid": "09985b48e240a1bd89dff47bf15d6604", "score": "0.56611663", "text": "public function store(Request $request)\n {\n \n $persona= new Persona();\n //$persona->folio = 5;\n $persona->nombre = $request->nombre;\n $persona->genero = $request->genero;\n $persona->apellidoP = $request->apellidoP;\n $persona->apellidoM = $request->apellidoM;\n $persona->intereses = $request->intereses;\n $persona->user_id = Auth::id();\n $persona->save();\n\n return redirect()->route('persona.index');\n }", "title": "" }, { "docid": "1bbc83cb2dc883fc91550144bde05e81", "score": "0.56578195", "text": "public function store(Request $request)\n {\n if(Gate::denies('pacientes-create')){\n abort(403,\"Não autorizado!\");\n }\n\n $data = $request->all();\n //$data['doencasCondicoes'] = json_encode($data['doencasCondicoes']);\n\n if($request->file('foto') != null){\n $arquivo = $request->file('foto')->store('pacientes','public');\n $data['foto'] = $arquivo;\n }\n\n $paciente = new Paciente();\n $paciente = Paciente::create($data);\n\n $paciente->users()->attach($data['user_id']);\n $paciente->condicoes_referidas()->attach($data['doencasCondicoes']);\n\n return redirect()->action('PacienteController@index');\n }", "title": "" }, { "docid": "3bd2c63a4b346d69ff556eaf7688e48e", "score": "0.56574285", "text": "public function store(Request $request)\n {\n //Registro de usuario.\n\n $validator = Validator::make($request->all(), [\n 'personalName' => 'required',\n 'personalSurname' => 'required',\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required'\n ])->validate();\n\n $request[\"password\"] = Hash::make($request[\"password\"]);\n\n\n $user = User::create(request([\"name\",\"email\",\"password\"]));\n\n if(!$user){\n return response('Error de creación',500);\n }\n\n $student = new Student([\n 'name'=>$request->input('personalName'),\n 'surname'=>$request->input('personalSurname')\n ]);\n\n $user->person()->save($student);\n\n $user->roles()->attach(Role::where('name', 'estudiante')->first());\n\n $user->person->get();\n $user->roles;\n\n return response([\"user\"=>$user]);\n }", "title": "" }, { "docid": "196da382fea255417ed061ed71ae80ef", "score": "0.5653153", "text": "public function store(PedidosoracionRequest $request) {\n $pedido = new Pedidosoracion();\n $pedido->tipo = $request->tipo;\n $pedido->pedido = $request->pedido;\n $pedido->ciudad_id = $request->ciudad_id;\n if ($request->tipo == \"PRIVADO\") {\n foreach ($pedido->attributesToArray() as $key => $value) {\n $pedido->$key = strtoupper($value);\n }\n $u = Auth::user();\n $p = Persona::where('numero_documento', $u->identificacion)->first();\n if ($p != null) {\n $pn = Personanatural::where('persona_id', $p->id)->first();\n if ($pn !== null) {\n $f = Feligres::where([['personanatural_id', $pn->id], ['estado_actual', 'ACTIVO']])->first();\n if ($f != null) {\n $pedido->feligres_id = $f->id;\n $pedido->correo = $f->personanatural->persona->mail;\n }\n }\n } else {\n flash('No tiene permisos para acceder a esta función.')->warning();\n return redirect()->route('admin.comunicaciones');\n }\n } else {\n $pedido->persona = $request->persona;\n $pedido->correo = $request->correo;\n }\n foreach ($pedido->attributesToArray() as $key => $value) {\n $pedido->$key = strtoupper($value);\n }\n $result = $pedido->save();\n if ($result) {\n $u = Auth::user();\n $aud = new Auditoriacomunicacion();\n $aud->usuario = \"ID: \" . $u->identificacion . \", USUARIO: \" . $u->nombres . \" \" . $u->apellidos;\n $aud->operacion = \"INSERTAR\";\n $str = \"CREACIÓN DE PEDIDO DE ORACIÓN. DATOS: \";\n foreach ($pedido->attributesToArray() as $key => $value) {\n $str = $str . \", \" . $key . \": \" . $value;\n }\n $aud->detalles = $str;\n $aud->save();\n flash(\"El Pedido fue almacenado de forma exitosa!\")->success();\n return redirect()->route('pedidosoracion.index');\n } else {\n flash(\"El Pedido no pudo ser almacenado. Error: \" . $result)->error();\n return redirect()->route('pedidosoracion.index');\n }\n }", "title": "" }, { "docid": "fcbfc6a1636f1735d43e5071b4d9fd83", "score": "0.56347334", "text": "public function store(CreateproyectosRequest $request)\n {\n $input = $request->all();\n\n $proyectos = $this->proyectosRepository->create($input);\n\n Flash::success('El proyecto se ha guardado correctamente.');\n\n return redirect(route('proyectos.index'));\n }", "title": "" }, { "docid": "9e165d51b1b3d10fc4f5ca13f6221dd8", "score": "0.56336904", "text": "public function store()\n {\n User::where('email',\\request('email'))->update(['avatar'=>\\request('file')]);\n\n $img = Image::make(\\request()->file('file'))->insert('public/img/icons/AV.svg')->save(public_path('img/profile_img'.\\request('prenom').'.jpg'));\n $ens=enseignant::create(request()->except(['file']));\n// activity()\n// ->performedOn($ens)\n// ->log('stored');\n return redirect('/Enseignant');\n }", "title": "" }, { "docid": "ba8861ceec66c8d986ca3cb2b5e610cf", "score": "0.5625126", "text": "public function store(Request $request)\n {\n \n $empleado = empleado::create($request->all());\n\n $empleado->permissions()->sync($request->get('permissions'));\n\n return redirect()->route('empleado.edit', $empleado->idEmpleado)\n ->with('info', 'empleado guardado con éxito');\n }", "title": "" }, { "docid": "37a44b32cc7e53a4b6a8916bf49419bc", "score": "0.5622567", "text": "public function store()\n {\n $input = Input::all();\n Input::flash();\n\n $this->usersValidator->validate($input, 'create');\n\n $input['password'] = Hash::make($input['password']);\n\n $input['name'] = e($input['name']);\n\n if (array_key_exists('bio', $input)) {\n $input['bio'] = e($input['bio']);\n }\n $user = $this->repository->create($input);\n\n $user_id = $user->getAuthIdentifier();\n\n Queue::push(function($job) use ($user_id){\n $user = User::find($user_id);\n ProfileImg::setDefaultProfileImages($user);\n\n $job->delete();\n\n });\n\n //ProfileImg::setDefaultProfileImages($user);\n\n //We don't want to see the just created user's following / followers!\n\n //Auth::attempt(array('email' => $input['email'], 'password' => $input['password']), true, true);\n Auth::login($user);\n\n\n Event::fire('user.create', $user);\n\n return $this->responder->createdModelResponse($user);\n }", "title": "" }, { "docid": "6bce3c63ff54f6bfdf49f00d64f96e9f", "score": "0.56155884", "text": "public function store(PiattoFormRequest $request)\n {\n $userId = Auth::id();\n $data = $request->validated();\n\n $nuovoPiatto = Piatto::create([\n \"rist_id\" => $userId,\n \"piatto_nome\" => $data['piatto_nome'],\n \"piatto_img\" => $data['piatto_img']->storePublicly('storage'),\n \"piatto_descrizione\" => $data['piatto_descrizione'],\n \"piatto_prezzo\" => $data['piatto_prezzo'],\n \"piatto_visibile\" => $data['piatto_visibile']\n ]);\n $nuovoPiatto->save();\n\n $tipologia = TipologiaRistorante::firstorNew([\n \"tipologia_id\" => $data['tipologia'],\n \"rist_id\" => $userId,\n ]);\n\n $tipologia->save();\n\n return redirect()->route('piatti.index');\n }", "title": "" }, { "docid": "8b63297f86f59b9075de1af3a7d1c379", "score": "0.56121266", "text": "public function store(Request $request)\n {\n try {\n DB::beginTransaction();\n\n\n $user = User::create([\n 'name' => $request->get('nombre'),\n 'email' => strtolower($request->get('correo')),\n 'password' => Hash::make('123456'),\n ]);\n \n $user->roles()->attach(Role::where('name', 'user')->first());\n $id = $user->id;\n\n\n $empresa = new Empresa();\n $empresa->empr_nombre = $request->get('nombre');\n $empresa->user_id = $id;\n $empresa->empr_ruc = $request->get('ruc');\n $empresa->empr_direccion = $request->get('direccion');\n $empresa->empr_telefono = $request->get('telefono');\n $empresa->empr_celular = $request->get('celular');\n $empresa->empr_correo = strtolower($request->get('correo'));\n \n $empresa->save();\n \n\n \n DB::commit();\n return redirect('admin/empresas')->with('message','La operacion se realizo con Exito')->with('operacion','1');\n \n \n } catch (Exception $e) {\n DB::rollBack(); \n return redirect('admin/empresas')->with('message','Ocurrio un error Inesperado'.$th)->with('operacion','0');\n }\n \n \n }", "title": "" }, { "docid": "45996a5e463c0b7653f073eee3927534", "score": "0.560528", "text": "public function store(Request $request)\n {\n// dd($request);\n\n\n\n $dpersona = datos_persona::create([\n 'nombre'=>$request['nombre'],\n 'apellido'=>$request['apellido'],\n 'ci'=>$request['ci'],\n 'edad'=>$request['edad'],\n 'fechanacimiento'=>$request['fechanacimiento'],\n 'telefono'=>$request['telefono'],\n 'email'=>null,\n 'direccion'=>$request['direccion'],\n 'sexo'=>$request['sexo'],\n 'latitud'=>$request['latitud'],\n 'longitud'=>$request['longitud']\n\n\n ]);\n\n\n dato_nino::create([\n 'id_datos_persona'=>$dpersona->id_datos_persona,\n 'actividad'=>$request['actividad'],\n 'responsable'=>$request['responsable']\n ]);\n\n\n\n\n\n\n Session::flash('message',' Registrado');\n return redirect('/nino');\n }", "title": "" }, { "docid": "283c49a2e4d2a9e653b75714558eaee7", "score": "0.56036407", "text": "public function store(GuardarPersona $request)\n {\n $persona = new Persona();\n $persona->apellido_paterno = $request->input('apellido_paterno');\n $persona->apellido_materno = $request->input('apellido_materno');\n $persona->nombre = $request->input('nombre');\n $persona->email = $request->input('email');\n $persona->celular = $request->input('celular');\n $persona->direccion = $request->input('direccion');\n $persona->save();\n // formas de declarar variables session\n // $request->session()->put('mensaje', 'Registrador correctamente');\n session(['mensaje' => 'Registrado correctamente']);\n return redirect()->route('persona.index');\n }", "title": "" }, { "docid": "2c4fd7a7d290970533eab1d85d840c05", "score": "0.5601437", "text": "public function store(Request $request)\n {\n\n if(Auth::user()->hasRole(['planner','administrator','signup'])){\n $validator = $this->validator($request->all());\n if ($validator->fails()) {\n $this->throwValidationException(\n $request, $validator\n );\n }\n try {\n DB::beginTransaction();\n $persona=new Persona;\n $persona->nombres=strtoupper($request->get('nombres'));\n $persona->apellidos=strtoupper($request->get('apellidos'));\n $persona->direccion=strtoupper($request->get('direccion'));\n $persona->tipo_doc=$request->get('tipo_doc');\n $persona->num_doc=$request->get('num_doc');\n $persona->genero=$request->get('genero');\n $persona->fecha_nac=$request->get('fecha_nac');\n $persona->parroquia_id=$request->get('parroquia_id');\n\n $persona->save();\n\n $alumno=new Alumno;\n \n $representante=Representante::where('persona_id',$request->get('persona_id'))->first();\n\n $alumno->persona()->associate($persona);\n $alumno->representante()->associate($representante);\n\n if ($request->hasFile('foto_ced')) {\n $file = $request->file('foto_ced');\n $name='alumno_ced_'.time().'.'.$file->getClientOriginalExtension();\n $path=public_path().'/dist/img/alumnos/cedula/';//ruta donde se guardara\n $file->move($path,$name);//lo copio a $path con el nombre $name\n $alumno->foto_ced=$name;//ahora se guarda en el atributo foto_ced la imagen\n }\n if ($request->hasFile('foto')) {\n $file = $request->file('foto');\n $name='alumno_perfil_'.time().'.'.$file->getClientOriginalExtension();\n $path=public_path().'/dist/img/alumnos/perfil/';//ruta donde se guardara\n $file->move($path,$name);//lo copio a $path con el nombre $name\n $alumno->foto=$name;//ahora se guarda en el atributo foto_ced la imagen\n }\n\n $alumno->save();\n\n\n DB::commit();\n\n if ($request->ajax()){\n \n return response()->json([\n 'message'=>'Alumno creado correctamente',\n 'alumno_id'=>$alumno->id,\n 'nombre'=>$persona->getNombreAttribute(),\n ]);\n }\n\n } catch (\\Exception $e) {\n \n DB::rollback();\n Session::flash('message_danger', $e->getMessage());\n return redirect()->back('admin.alumnos.index');\n }\n\n Session::flash('message', 'Alumno creado correctamente');\n return redirect()->route('admin.alumnos.index');\n }else return abort(403);\n }", "title": "" }, { "docid": "21781746b501b371b28f5a220b1c8c13", "score": "0.5601394", "text": "public function store(Request $request)\n {\n try {\n\n if (!auth()->user()->can('add-perfis')) {\n abort(403);\n }\n\n $this->role->create($request->all());\n\n flash()->success('Perfil adicionado com sucesso!');\n return redirect()->route('roles.index');\n\n } catch (ValidatorException $e) {\n flash()->error('Ocorreu um erro de validação, verifique se o registro já consta no banco de dados');\n return redirect()->route('roles.index');\n }\n }", "title": "" }, { "docid": "80370be3711373a1fd9a861bf4688938", "score": "0.560046", "text": "public function store(Request $request)\n {\n $persona = new Persona();\n $persona->ci = $request->input('ci');\n $persona->nombre = $request->input('nombre');\n $persona->apellido = $request->input('apellido');\n $persona->sexo = $request->input('sexo');\n $persona->telefono = $request->input('telefono');\n $persona->correo = $request->input('correo');\n $persona->direccion = $request->input('direccion');\n\n $persona->save();\n\n $paciente = new Paciente();\n $paciente->seguro = $request->input('seguro');\n $paciente->observacion = $request->input('observacion');\n $paciente->persona_id = $persona->id;\n\n $paciente->save();\n\n return redirect()->route('paciente.index')->withStatus(__('Paciente creado con éxito.'));\n }", "title": "" }, { "docid": "1dc8a3eaa155f206ac07df5758149aea", "score": "0.5597319", "text": "public function store(UserCreateRequest $request)\n {\n $datos = $request->all();\n $user = new User($request->all());\n $user->tipo = 'estudiante';\n $password = str_replace('-', '', $user->fecha_nacimiento);\n $user->password = bcrypt($password);\n $user->save();\n $estudiante = new Estudiante();\n $estudiante->grupo_id = $datos['grupo_id'];\n $estudiante->acudiente_id = $request->acudiente_id;\n $user->estudiante()->save($estudiante);\n \n return redirect()->route('estudiantes.index');\n }", "title": "" }, { "docid": "5a8fa53fce8538f61439d9a0cdbd5829", "score": "0.5596226", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'principal_name' => 'required',\n ]);\n PslPrincipal::create($request->all());\n return Redirect::route('principals.index')->with('message','You have successfully submitted');\n }", "title": "" }, { "docid": "abe5780ec86630b1714c504860fce0a9", "score": "0.5595681", "text": "public function store(Request $request)\n {\n $usuario = new Proforma($request->all());\n $usuario->password = bcrypt($request->password);\n $usuario->save();\n\n Notify::success(\"$usuario->name cread@ correctamente\", $title = \"Operación exitosa\" , $options = []);\n return redirect()->route('proformas.index');\n }", "title": "" }, { "docid": "6c76fbcd04040d535b6b924e7dab9f19", "score": "0.5594045", "text": "public function store(Request $request)\n {\n try{\n if(Auth::user()){\n \n if($request->tCoordinacion_idCoordinacion ==0){\n return Redirect::back()\n ->withErrors(['error', 'Debe seleccionar una Coordinacion válida'])\n ->withInput();\n }\n $coordinaciones = Coordinacion::all();\n \n $config = DB::table('tconfiguracion')\n ->select('iValor')\n ->where('vConfiguracion','Periodo')\n ->first();\n $presupueto = new Presupuesto;\n\n\n $presupueto->idPresupuesto = $request->idPresupuesto;\n $presupueto->anno = $request->anno;\n $presupueto->tCoordinacion_idCoordinacion = $request->tCoordinacion_idCoordinacion;\n $presupueto->vNombrePresupuesto = $request->vNombrePresupuesto;\n $presupueto->iPresupuestoInicial = 0;\n $presupueto->iPresupuestoModificado = 0;\n\n $presupueto->save();\n\n $anno = DB::table('tconfiguracion')\n ->select('iValor')\n ->where('vConfiguracion','Periodo')\n ->where('tUsuario_idUsuario', Auth::user()->id)\n ->first();\n\n return redirect('/presupuesto');\n }else{\n return view('layouts/master');\n }\n } catch(\\Illuminate\\Database\\QueryException $ex){ \n return view('/presupuesto/nuevoPresupuesto',\n ['coordinaciones' => $coordinaciones,\n 'config' => $config])\n ->withErrors(['Error al insertar, identificador duplicado']);\n\n }\n }", "title": "" }, { "docid": "8ac37179e8391a469e55306e1e3b2eed", "score": "0.559079", "text": "public function store(CreditoFormRequest $request)\n {\n // dd($request->all()); método dd muestra el contenido del array\n $id_persona=Auth::user()->id_persona;\n $credito= new Credito(); \n $credito->fecha_solicitud=$request->input('fecha_solicitud');\n $credito->monto_solicitado=$request->input('monto_solicitado');\n $credito->interes_nominal=$request->input('interes_nominal');\n $credito->plazo_meses=$request->input('plazo_meses');\n $credito->dia_pago=$request->input('dia_pago');\n $credito->id_tipo_moneda=$request->input('id_tipo_moneda');\n $credito->id_tipo_moneda=$request->input('id_tipo_moneda');\n $credito->id_periodo_pago=$request->input('id_periodo_pago');\n $credito->id_tamortizacion=$request->input('id_tamortizacion');\n $credito->id_tcredito=$request->input('id_tcredito');\n $credito->id_destino_credito=$request->input('id_destino_credito');\n $credito->id_persona=$id_persona;\n $credito->save(); //metodo se encarga de ejecutar un insert sobre la tabla \n alert()->success('Exelente','Exelente sus datos se han agregado correctamente')->showConfirmButton();\n $notification= 'Exelente sus datos se han agregado correctamente'; \n return redirect('cliente/credito/')->with(compact('notification'));\n }", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.5590109", "text": "public function persist();", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.5590109", "text": "public function persist();", "title": "" }, { "docid": "19db16dfdbaa6db5d1281219c079362d", "score": "0.55863243", "text": "public function store($proceso_id, RecordatorioprocesoFormRequest $request)\n {\n $d = $request->except('_token');\n $recordatorioproceso = Recordatorioproceso::create($d);\n return redirect()->route('proceso.recordatorio.index', $proceso_id)\n ->with('success',['Recordatorio del proceso almacenado completamente']);\n }", "title": "" }, { "docid": "ac7a5bdd0d8b09ecaabf4648d23f9e5f", "score": "0.55778337", "text": "public function store(CreateUserRequest $request)\n {\n if (($request->rolelegido != 2) && ($request->rolelegido != 3) && ($request->rolelegido != 4)) {\n\n return back()->with('info','Ha ocurrido algún error');\n\n }\n\n if ($request->rolelegido == 2) {\n $user = User::create( $request->all());\n }\n \n\n if($request->rolelegido == 3) {\n if ($request->profesion == \"\") {\n return back()->with('info','Ha ocurrido algún error');\n }\n $user = User::create( $request->all());\n $user->profession_id = $request->localizacion;\n } else if ($request->rolelegido == 4){\n if (($request->localizacion == \"\") || ($request->profesion == \"\")) {\n return back()->with('info','Ha ocurrido algún error');\n }\n $user = User::create( $request->all());\n $user->city_id = $request->localizacion;\n $user->profession_id = $request->profesion;\n }\n\n $user->password = bcrypt($request->password);\n $user->save();\n $user->roles()->attach($request->rolelegido);\n\n return redirect()->route('home');\n }", "title": "" }, { "docid": "05ebd9335eb4d683f014d498a4e31580", "score": "0.55732685", "text": "public function store(CreatePasosIniciativaRequest $request)\n {\n $input = $request->all();\n\n $pasosIniciativa = $this->pasosIniciativaRepository->create($input);\n\n Flash::success('Pasos Iniciativa saved successfully.');\n\n return redirect(route('validation.pasosIniciativas.index'));\n }", "title": "" }, { "docid": "5ebed40ef8012802e1a7f2dc9c8b63bf", "score": "0.55722314", "text": "public static function guardar($info){\n \t$proyecto = new Proyecto($info);\n \t$proyecto->fecha = Carbon::createFromFormat('d/m/Y', $info['fecha']);\n \t$proyecto->save();\n \t$proyecto->usuarios()->attach(Auth::user()->id);\n }", "title": "" }, { "docid": "db916b69f9a05ead9779d7cd5bfa993d", "score": "0.55715865", "text": "public function store()\n {\n Pant::create($request->all());\n }", "title": "" }, { "docid": "6c603ba8237014e7bb9d7ad862d28937", "score": "0.55670285", "text": "public function store()\n\t{\n\t\tif( Authority::can('create', 'User') ){\n\t\t\t$input = Input::all();\n\t\t\t$user = $this->user->store($input);\n\t\t\treturn Redirect::route('admin.users.show', $user->id);//->with('success', 'The new user has been created');\n\t\t}\n\t\tthrow new NotAllowedException();\n\t}", "title": "" }, { "docid": "c469c8ac4ec1c874a636c32e48847012", "score": "0.5563872", "text": "public function store(CreatePuestoTrabajoRequest $request)\n {\n $input = $request->all();\n\n $puestoTrabajo = $this->puestoTrabajoRepository->create($input);\n\n Flash::success('Puesto Trabajo saved successfully.');\n\n return redirect(route('admin.puestoTrabajos.index'));\n }", "title": "" }, { "docid": "86a3aa4537fdb9f5ce80ce9f4963d5e2", "score": "0.55610096", "text": "public function store(CreateTipoServicioRequest $request)\n {\n $input = $request->all();\n\n $obj = new TipoServicio ;\n $obj->nombre = $input['nombre'];\n $obj->save();\n Session::flash('mensaje', 'Tipo de servicio agregado');\n Session::flash('alert-class','alert-success');\n return redirect(route('tipo_servicios'));\n }", "title": "" }, { "docid": "0cd2c4a22d05caccf6a71a1dfa3d4643", "score": "0.5560623", "text": "public function store(PersonRequest $request)\n {\n $request->validate([\n 'email' => 'required|string|email|max:255|unique:users',\n ]);\n\n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => Hash::make($request->password),\n 'rol_id' => $request->rol\n ]);\n\n Person::create([\n 'name' => $request->name_p,\n 'surname' => $request->surname,\n 'phone_number' => $request->phone_number,\n 'code' => md5($request->email),\n 'adress' => $request->adress,\n 'user_id' => $user->id, \n 'gruop_id' => $request->group\n ]);\n\n alert()->success('Registro exitoso','Registrado correctamente');\n return redirect()->to('home');\n }", "title": "" }, { "docid": "b22ce98628d05d349c54eee9014224c7", "score": "0.5559155", "text": "public function store(ProveedorCreateRequest $request)\n {\n \\SICVFG\\Proveedor::create([\n 'nombreProv'=>$request['nombreProv'],\n 'RUC'=> $request['RUC'],\n 'correoProv'=> $request['correoProv'],\n 'direccionProv'=>$request['direccionProv'],\n 'telefonoProv'=> $request['telefonoProv'],\n ]);\n return redirect('/proveedor')->with('mensaje','Proveedor Agregado con Exito');\n }", "title": "" }, { "docid": "c61288c69ac1dd4a4c8477b31e642e84", "score": "0.55576044", "text": "public function store(Createpc_cuentaRequest $request)\n {\n // realiza la validacion de las reglas antes de actualizar\n $this->validate($request, [\n 'codigo' => 'unique:pc_cuenta,codigo,NULL,tipo,tipo,' .$request->tipo\n ]);\n\n $input = $request->all();\n\n $this->pcCuenta = $this->pcCuentaRepository->create($input);\n // guarda un mensaje en el archivo de log\n Log::info('Cuentas, Store, Se almaceno la cuenta: '.$this->pcCuenta->id, [$input]);\n\n Flash::success('Cuenta guardada correctamente.');\n\n return redirect(route('admin.pc.cuentas.show',['id' => $this->pcCuenta->id, 'peticion' => $this->peticion ]) );\n }", "title": "" }, { "docid": "f9f5c9419325224506086a120ae61f62", "score": "0.55433786", "text": "public function store(CreateFormRequest $request)\n {\n $user = Auth::user();\n\n $pais = $request->all();\n\n $created = Pais::on($user->schema)->create($pais);\n\n return response()->json($created);\n }", "title": "" }, { "docid": "443b738dd5157bd4af54ddc4991616e6", "score": "0.5536523", "text": "public function store(Request $request)\n {\n // Copio y pego del register controller\n $user = new User();\n $user->username = $request['username'];\n $user->password = Hash::make($request['password']);\n $user->email = $request['email'];\n $user->descr = $request['descripcion'];\n $user->activo = true;\n \n // Busco la persona que recibi\n $persona = Persona::find($request['persona']);\n $user->persona()->associate($persona);\n\n try {\n $user->save();\n }\n catch (QueryException $e)\n {\n return back()->with('error', 'El usuario ya existe.');\n }\n \n $roles = Role::all();\n \n // Ahora le pongo los que vienen en la solicitud\n foreach($roles as $rol){\n if ($request[$rol->name]){\n $user->roles()->attach($rol); \n }\n // else {\n // $user->roles()->detach($rol);\n // }\n }\n try {\n $user->save();\n }\n catch (QueryException $e)\n {\n return back()->with('error', 'El usuario ya existe.');\n }\n\n return back()->with('mensaje', 'Usuario registrado');\n }", "title": "" }, { "docid": "277da398772aae71f78181562a638315", "score": "0.55345076", "text": "public function store(CreateProyectoRequest $request)\n {\n Proyecto::create($request->all());\n return redirect('proyectos-proyeccion')->with('message','Proyecto creado exitosamente');\n }", "title": "" }, { "docid": "79608de2fa987a564052d7335b3620cb", "score": "0.5531328", "text": "public function store(Request $request )\n {\n if ( Auth::check()){\n $id = Auth::id();\n $pidiaterie = User::find($id);\n $pidiaterie->name = $request->name;\n $pidiaterie->email = $request->email;\n $pidiaterie->raison_sociale = $request->raison_sociale;\n $pidiaterie->tel = $request->tel;\n $pidiaterie->site_web = $request->site_web ;\n $pidiaterie->password = Hash::make($request->password);\n $pidiaterie->save();\n\n }\n return redirect()->route('home');\n \n }", "title": "" }, { "docid": "520de49b96e2e40c631b2cf91b29ad10", "score": "0.5522976", "text": "public function store(Request $request)\n {\n /*Servicio::create([\n 'tipo' => $request['tipo'],\n 'user_id' => Auth::user()->id,\n 'n_contrato' => $request['n_contrato'],\n 'fecha_contrato' => Carbon::parse($request['fecha_contrato'])->format('Y-m-d'),\n 'contratista_id' => $request['contratista_id'],\n 'obs_tipo_seguro' => $request['obs_tipo_seguro'],\n 'fecha_defuncion' => Carbon::parse($request['fecha_defuncion'])->format('Y-m-d'),\n 'dni_difunto' => $request['dni_difunto'],\n 'nombres_difunto' => $request['nombres_difunto'],\n 'apellidos_difunto' => $request['apellidos_difunto'],\n 'lugar_inscripcion_id' => $request['lugar_inscripcion_id'],\n 'total_servicio' => $request['total_servicio'],\n 'cobro_seguro' => $request['cobro_seguro'],\n ]);\n TipoSeguro::create([\n\n ]);*/\n $servicio = new Servicio($request->all());\n $servicio->user_id = Auth::user()->id;\n $servicio->fecha_contrato = Carbon::parse($request['fecha_contrato'])->format('Y-m-d');\n $servicio->fecha_defuncion = Carbon::parse($request['fecha_defuncion'])->format('Y-m-d');\n $servicio->save();\n $servicio->tipo_seguros()->sync($request['tipo_seguros']);\n return redirect()->route('admin.servicios.edit',$servicio->id)->with('info','Servicio creado');\n\n\n }", "title": "" }, { "docid": "e40f38ef540f5e0a7acf517b76356462", "score": "0.5520203", "text": "public function store(Request $request)\n {\n $this->validarProvincia($request);\n\n $input = $request->all();\n\n Provincia::create($input);\n\n Session::flash('flash_message', 'Alta de Provincia exitosa!');\n\n return redirect('/provincias');\n }", "title": "" }, { "docid": "82818653c6fd10e9a7da320c2ba507d9", "score": "0.55161947", "text": "public function store(Request $request)\n {\n $permisos = Permission::create($request->all());\n //$role->permissions()->sync($request->get('permissions'));\n if($permisos){\n Session::flash('message-success', 'Permiso guardado satisfactoriamente.');\n }else{\n Session::flash('message-warnning', 'Hubo un problema al intentar guardar el permiso.');\n }\n return redirect()->route('permisos.index');\n }", "title": "" }, { "docid": "9ee5b9e0d77b3ae20a31caacceac6814", "score": "0.5511915", "text": "protected function storeSave() {\n Request::merge(['password' => Hash::make(Request::input('password'))]);\n\n $entity = parent::storeSave();\n\n $entity->syncRoles(AclHelper::processRole(Request::input('roles', []), $entity));\n $entity->syncPermissions(AclHelper::processPermission(Request::input('permissions', []), $entity));\n\n return $entity;\n }", "title": "" }, { "docid": "86eaae919c915e7b3c2774e568f39fc5", "score": "0.5511022", "text": "public function store(Request $request)\n {\n \n $tarea = new ActividadesRealizadas;\n \n $tarea->observacion = $request->observacion;\n $tarea->usuarioSolicita_id = $request->usuarioSolicita_id;\n $tarea->habilidad_id = $request->habilidad_id;\n $tarea->finalizada = 0;\n $tarea->valoracion = 0;\n $tarea->save();\n }", "title": "" }, { "docid": "c8878de05d9bc59a3255a261f593b60e", "score": "0.55098546", "text": "public function store(CrearPropuestaTesisRequest $request)\n\t{\n\t\t$user = User::find(Auth::user()->Usu_ID);\n\t\tif(is_null($user->formulario->informacion_aspirante->ID_Prop_Tesis)){\n\t\t\t$propuesta_tesis = new PropuestaTesis();\n\t\t\t$propuesta_tesis->save();\n\t\t\t$user->formulario->informacion_aspirante->propuesta_tesis()->associate($propuesta_tesis);\n\t\t\t$user->formulario->informacion_aspirante->save();\n\t\t}\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Titulo = $request->titulo_propuesta;\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Definicion = $request->definicion;\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Marco_Teorico = $request->marco_teorico;\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Metodologia = $request->metodologia;\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Objetivos = $request->objetivos;\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->PTe_Bibliografia = $request->bibliografia;\n\n\t\t$user->formulario->informacion_aspirante->propuesta_tesis->save();\n\t\tif($user->formulario->formularioEstaLLeno() === true){\n\t\t\treturn redirect()->back()->withInput()->with('successMessage', trans('alert.alert_form.completed'));\n\t\t}\n\t\treturn redirect()->back()->withInput()->with('successMessage', trans('alert.alert_form.updated'));\n\t}", "title": "" }, { "docid": "cae8de7df6c88d56bdb7ccee401c56aa", "score": "0.55023813", "text": "public function store(UserRequest $request)\n {\n //Creating the new user\n $newUser = new User();\n $newUser = $newUser->create($request->all());\n $newUser->password = bcrypt($newUser->name . 'litcenter');\n $newUser->save();\n\n //Getting the user role and creating a new register\n $role = new Role();\n $role->user_id = $newUser->id;\n $role->privilege = $request->input('role');\n $role->save(); \n\n //Sending the user to the accounts page\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "f13f2b7c8827a2795ae95b2a13c0e8a7", "score": "0.55023", "text": "public function store($nombre_role, $permiso)\n {\n //Instanciamos la clase el controlador 'Role', para validar si existe el role: \n $role = new RoleController;\n //Validamos si existe el role en la DB: \n $validateRole = $role->show($nombre_role);\n\n //Si existe, extraemos su 'id': \n if($validateRole['Query']){\n\n //Id del role: \n $id_role = $validateRole['role']['id_role'];\n\n try{\n\n //Hacemos la consulta a la DB: \n $queryPermissions = Permisos::where('id_role', $id_role);\n\n //Validamos que no exista un permiso para ese role: \n $validatePermissions = $queryPermissions->first();\n\n //Sino existe, lo registramos: \n if(!$validatePermissions){\n\n //En el caso de que el dato contenga caracteres de tipo mayuscula, los convertimos en minuscula. Asi seguimos una nomenclatura estandar: \n $nombre_permiso = strtolower($permiso);\n\n //Instanciamos la clase 'Permiso', para validar los datos recibidos: \n $permission = new Permiso;\n $validateRoleName = $permission->validatePermissionName(permissionName: $nombre_permiso);\n\n //Si es un tipo de dato permitido, lo ingresamos en el sistema: \n if($validateRoleName){\n\n try{\n \n //Hacemos el registro del nuevo permiso: \n Permisos::create(['id_role' => $id_role, 'nombre_permiso' => $nombre_permiso]);\n //Retornamos la respuesta: \n return ['Register' => true];\n \n }catch(Exception $e){\n //Retornamos el error: \n return ['Register' => false, 'Error' => $e->getMessage()];\n }\n }else{\n //Retornamos el error: \n return ['Register' => false, 'Error' => 'Tipo de dato no permitido.'];\n }\n }else{\n //Retornamos el error: \n return ['Register' => false, 'Error' => 'Ya existe ese permiso en el sistema.'];\n }\n }catch(Exception $e){\n //Retornamos el error: \n return ['Register' => false, 'Error' => $e->getMessage()];\n }\n }else{\n //Retornamos el error: \n return ['Register' => false, 'Error' => 'No existe ese role'];\n }\n }", "title": "" }, { "docid": "3907a663ab1040b5eb12055f0fa168ce", "score": "0.5498053", "text": "public function store(Request $request)\n {\n\n //insert company\n $com = Company::insert([\n 'user_id' => $request->user_id,\n 'name' => $request->name,\n ]);\n\n //ubah compaany_id user\n $maxId = Company::max('id');\n $user = User::find($request->user_id);\n //ganti role user ke comp\n $user->attachRole('company');\n //hapus role lama\n $user->detachRole('user');\n $user->company_id = $maxId;\n $user->save();\n\n return redirect('/company');\n }", "title": "" }, { "docid": "3fffe1069f7266e53d0ae679fac72d9a", "score": "0.54944694", "text": "public function store(Request $request)\n {\n\t\t$email = DB::table(\"professor\")\n\t\t\t->where(\"professor.cpf\", \"=\", $request->cpf)\n\t\t\t->join(\"users\", \"users.id\", \"=\", \"professor.id\")\n\t\t\t->get()[0]->email;\n\t\t\n\t\t$credentials = ['email' => $email, 'password' => $request->senha];\n\n if (Auth::attempt($credentials)) {\n // Authentication passed...\n return redirect('mobile/menuPrincipal');\n }\n\t}", "title": "" }, { "docid": "538410aa52754d7eca6aadb30dadd012", "score": "0.5493171", "text": "public function store(ConsulentiContrattiRequest $request)\n {\n if (!(Auth::User()->consulente->tipo == 'Partner' or Auth::User()->consulente->tipo == 'Admin' or Auth::User()->consulente->capoProgetto->contains($request->contratto_id))) {\n abort(503, 'Unauthorized action.');\n }\n $data = $request->all();\n $ret = ConsulenteContratto::create($data);\n\n return redirect()->action('ContrattoController@edit', $data['contratto_id']);\n }", "title": "" }, { "docid": "4fbb16e45ef88808c1239e6660b1fb31", "score": "0.54928154", "text": "public function store(Request $request)\n {\n $data = request()->validate([\n 'razonSocial'=>'required',\n 'idDocumento'=>'required',\n 'numeroDocumento'=>'required',\n 'direccion'=>'required',\n 'telefono'=>'required',\n 'email'=>'required',\n 'estado'=>'required'\n ]);\n\n $proveedor = new proveedor();\n //para la imagen del formulario $filename\n //para guardar el id del usuario actual como registro $user=auth()->user() y luego colocar $user->id despues de igual\n $proveedor->razonSocial = request('razonSocial');\n $proveedor->idDocumento=request('idDocumento');\n $proveedor->numeroDocumento=request('numeroDocumento');\n $proveedor->direccion=request('direccion');\n $proveedor->telefono=request('telefono');\n $proveedor->email=request('email');\n $proveedor->estado=request('estado');\n\n $proveedor->save();\n\n return redirect('/provider');\n }", "title": "" }, { "docid": "146e82e546c68b52f263d32e0aab624b", "score": "0.5491528", "text": "public function store(Request $request)\n {\n $data = $request->validate([\n 'nombre' =>'required|min:3',\n 'imagen_principal' =>'required|image|max:1000',\n 'direccion' =>'required',\n 'latitud' =>'required',\n 'longitud' =>'required',\n 'telefono' =>'required|numeric',\n 'descripcion' =>'required|min:3',\n 'apertura' =>'required|date_format:H:i',\n 'cierre' =>'required|date_format:H:i|after:apertura',\n 'uuid' =>'required|uuid',\n //'categoria_id' =>'exists:Categorias,id',\n 'categoria_id' => 'required|exists:App\\Models\\Categoria,id'\n ]);\n $ruta_imagen = $request->file('imagen_principal')->store('principales', 'public');\n $img = Image::make(public_path(\"storage/{$ruta_imagen}\"));\n $img->save();\n $establecimiento = new Establecimiento;\n $establecimiento->fill($request->all());\n $establecimiento->user_id=auth()->user()->id;\n $establecimiento->imagen_principal=$ruta_imagen;\n $establecimiento->save();\n //return redirect()->action('EstablecimientoController@index')->with('estado','Tu informacion se almaceno correctamente');\n return back()->with('estado','Tu informacion se almaceno correctamente');\n\n }", "title": "" }, { "docid": "4bcdf0668ac70962d4a606324d00dcbc", "score": "0.54844826", "text": "public function store(Requests\\convocatoriaRequest $request)\n\t{\n\n\t\t$convocatoria = new Convocatoria;\n\t\t$convocatoria->user_id = self::getId();\n\t\t$convocatoria->universidad = self::getUniverisity() ;\n\t\t$convocatoria->ciudad = $request->input('ciudad');\t\n\t\t$convocatoria->titulo = $request->input('titulo');\n\t\t$convocatoria->areas = $request->input('areas');\n\t\t$convocatoria->fecha_inicio = $request->input('fecha_inicio');\n\t\t$convocatoria->fecha_finalizacion = $request->input('fecha_finalizacion');\n\t\t$convocatoria->descripcion = $request->input('descripcion');\n\t\t$convocatoria->enlace = $request->input('enlace');\n\t\t$convocatoria->save();\n\n\t\t//$convocatoria = new Convocatoria;\n\t\t//$convocatoria->create($request->all());\n\n\t\treturn redirect()->route('convocatorias.index');\n\t}", "title": "" }, { "docid": "e512edb82be413c45fc83c1bbb4e1fe3", "score": "0.5479795", "text": "public function store(Request $request)\n {\n\n if(Gate::denies('usuario-create')){\n abort(403,\"Não autorizado!\");\n }\n\n $data = $request->all();\n\n if($request->file('foto') != null){\n $arquivo = $request->file('foto')->store('usuarios','public');\n $data['foto'] = $arquivo;\n }\n\n $validator = \\Validator::make($data, [\n 'email' => 'required'\n ]);\n\n if($validator->fails()){\n return redirect()->back()->withErrors($validator)->withInput();\n }\n\n $data['password'] = Hash::make($data['password']);\n\n $user = new User();\n $user = User::create($data);\n\n $user->papeis()->attach($data['papel_id']);\n\n return redirect()->action('Admin\\UsuarioController@index');\n }", "title": "" }, { "docid": "8d8a58ee133e830661b0bb72c6053505", "score": "0.54766643", "text": "public function store(CreateUserRequest $request)\n { \t\n \t\n \t$propertyKeys= array();\n \t\n \t$propertyKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"property\");\n\t\t\t\n \t/*foreach($request->all() as $key => $val){\n \t\tif(preg_match(\"%^property[0-9]+$%\", $key) && $val !== \"\"){\n \t\t\t//check that a value doesn't repeat\n \t\t\t$repeatedProperty= false;\n \t\t\tforeach($propertyKeys as $propertyKey){\n \t\t\t\tif($val == $propertyKey){\n \t\t\t\t\t$repeatedProperty=true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(!$repeatedProperty)\n \t\t\t\t$propertyKeys[]= $val;\n \t\t}\n \t} */ \t\n \t\n \tif(count(Person::where('ci',$request->get('ci'))->get()) == 0){\n \t\tPerson::create([\n \t\t\t\t'ci' => $request->get('ci'),\n \t\t\t\t'name' => $request->get('name'),\n \t\t\t\t'last_name' => $request->get('last_name'),\n \t\t\t\t'email' => $request->get('email'),\n \t\t\t\t'telephone' => $request->get('telephone'),\n \t\t\t\t'id_country' => $request->get('id_country'),\n \t\t]);\n \t}\n \t \n \t$person= Person::where('ci',$request->get('ci'))->get()->first(); \n \n $user= User::create([\n \t\t'id_person'=> $person->id,\n \t\t'id_role' => $request->get('id_role'),\n \t\t'default_property' => $propertyKeys[0],\n \t\t'auth_key' => 'some key',\n \t\t'username' => $request->get('username'),\n \t\t'password' => $request->get('password'),\n \t\t\n ]);\n \n $user->properties()->attach($propertyKeys);\n \n\t\treturn \\Redirect::route('admin.users.index');\n }", "title": "" }, { "docid": "d8cab91954408804fd89d2cce41b3035", "score": "0.5474229", "text": "public function store(BonosCrearRequest $request)\n {\n $user = Auth::user();\n\n $segmentos = array_reverse($request->envio);\n\n //Guardar datos\n \n $publicidad = new Publicidad();\n\n //Si es pautante guardar el id de usuario\n \n if($user->rol == 'Pautante')\n {\n $date = Carbon::now();\n\n $publicidad->usuario_id = $user->id;\n $publicidad->fecha_desde = date('Y-m-d');\n $publicidad->fecha_hasta = $date->addYear(1);\n\n //Buscar pago para asociar \n\n $condicion = ['usuario_id' => $user->id,'publicidad_tipo' => 1,'payment_status' => 'APPROVED','utilizado' => 0,'status' => 1];\n\n $pago = PagosPublicidad::where($condicion)->firstOrFail();\n\n $publicidad->pago_publicidad_id = $pago->id;\n\n }\n else\n {\n $publicidad->fecha_desde = $request->fecha_desde;\n $publicidad->fecha_hasta = $request->fecha_hasta;\n }\n\n $publicidad->titulo = $request->titulo;\n $publicidad->fecha = Carbon::now();\n $publicidad->img_publicidad = $request->img_publicidad;\n $publicidad->logo = $request->logo;\n $publicidad->local = $request->local;\n $publicidad->tienda = $request->tienda;\n $publicidad->valor = $request->valor;\n $publicidad->link = $request->link;\n $publicidad->categoria = $request->categoria;\n if ($request->enabled == 1 ) {\n $publicidad->enabled = $request->enabled;\n }else{$publicidad->enabled = 0;}\n $publicidad->descripcion = $request->descripcion;\n $publicidad->save();\n\n //Guardar segmentacion\n // foreach ($conjuntos as $conjunto) {\n // $publiconjunto= new PublicidadSegmentos();\n // $publiconjunto->conjunto_id = $conjunto;\n // $publiconjunto->publicidad_id = $publicidad->id;\n // //$response = $publicidad->guardarPublicidadpush($publicidad->id, $publiconjunto->conjunto_id);\n // $publiconjunto->save();\n // }\n\n foreach ($segmentos as $segmento) {\n \n $publiconjunto = new PublicidadSegmentos();\n \n $publiconjunto->publicidad_id = $publicidad->id;\n\n //Separar tipo\n\n $zona = explode('_', $segmento);\n\n $zona_busqueda = Conjunto::where('id',$zona[1])->get();\n\n if(count($zona_busqueda) == 0)\n {\n continue;\n }\n\n //Si es un conjunto\n\n if($zona[0] == 'conjunto')\n {\n $publiconjunto->conjunto_id = $zona_busqueda[0]->id;\n $publiconjunto->localidad = $zona_busqueda[0]->localidad;\n $publiconjunto->ciudad = $zona_busqueda[0]->ciudad;\n $publiconjunto->pais = $zona_busqueda[0]->pais;\n //$response = $publicidad->guardarPublicidadpush($publicidad->id, $publiconjunto->conjunto_id);\n $publiconjunto->save();\n\n }\n\n //Si es una localidad\n\n if($zona[0] == 'local')\n {\n //Buscar que no se halla guardado ningun registro de la publicidad con esta zona\n\n $buscar = PublicidadSegmentos::where(['localidad' => $zona_busqueda[0]->localidad,'publicidad_id' => $publicidad->id])->get();\n\n if(count($buscar) == 0)\n {\n //Guardar busqueda\n $publiconjunto->localidad = $zona_busqueda[0]->localidad;\n $publiconjunto->ciudad = $zona_busqueda[0]->ciudad;\n $publiconjunto->pais = $zona_busqueda[0]->pais;\n //$response = $publicidad->guardarPublicidadpush($publicidad->id, $publiconjunto->conjunto_id);\n $publiconjunto->save();\n\n }\n\n }\n\n //Si es una ciudad\n\n if($zona[0] == 'ciudad')\n {\n //Buscar que no se halla guardado ningun registro de la publicidad con esta zona\n\n $buscar = PublicidadSegmentos::where(['ciudad' => $zona_busqueda[0]->ciudad,'publicidad_id' => $publicidad->id])->get();\n\n if(count($buscar) == 0)\n {\n //Guardar busqueda\n\n $publiconjunto->ciudad = $zona_busqueda[0]->ciudad;\n $publiconjunto->pais = $zona_busqueda[0]->pais;\n //$response = $publicidad->guardarPublicidadpush($publicidad->id, $publiconjunto->conjunto_id);\n $publiconjunto->save();\n\n }\n \n }\n\n //Si es un pais\n\n if($zona[0] == 'pais')\n {\n //Buscar que no se halla guardado ningun registro de la publicidad con esta zona\n\n $buscar = PublicidadSegmentos::where(['pais' => $zona_busqueda[0]->pais,'publicidad_id' => $publicidad->id])->get();\n\n if(count($buscar) == 0)\n {\n //Guardar busqueda\n\n $publiconjunto->pais = $zona_busqueda[0]->pais;\n //$response = $publicidad->guardarPublicidadpush($publicidad->id, $publiconjunto->conjunto_id);\n $publiconjunto->save();\n\n }\n } \n }\n\n //Si es un pautante se deben actualizar el pago consumido\n\n $redirect_to = '/superadmin/publicidad/bonos';\n\n if($user->rol == 'Pautante')\n {\n $redirect_to = '/pautante/publicidad/bonos';\n\n PagosPublicidad::findOrFail($pago->id)->update(['utilizado' => 1]);\n }\n\n Session::flash('message','Bono Creado con Exito');\n return Redirect::to($redirect_to);\n }", "title": "" }, { "docid": "054d0965061951dd15a804d3da2a6288", "score": "0.54710406", "text": "public function store(Request $request)\n {\n $professor = new Professor();\n $professor->FirstName = $request->input('FirstName');\n $professor->MiddleName = $request->input('MiddleName', '');\n $professor->LastName = $request->input('LastName');\n $professor->Phone = $request->input('Phone');\n $professor->Email = $request->input('Email');\n $professor->Birthday = $request->input('Birthday');\n\n\n $user = new User();\n $user->name = $professor->LastName . ', ' . $professor->FirstName . ' ' . $professor->MiddleName;\n $user->email = $professor->Email;\n $user->password = bcrypt($professor->Birthday);\n $user->Access_Level = 'Professor';\n $user->api_token = str_random(60);\n\n $user->save();\n\n $user->professor()->save($professor);\n\n $this->createLog(\n 'Add Professor',\n 'Name: '.$request->input('FirstName').' '.$request->input('MiddleName').' '.$request->input('LastName'). '\\n'.\n 'Birthday: '.$request->input('Birthday'). '\\n'.\n 'Phone: '.$request->input('Phone'). '\\n'.\n 'Email: '.$request->input('PersonalEmail'). '\\n'\n );\n\n $this->createLog(\n 'Add User',\n 'name: ' . $user->name . '\\n' .\n 'email: ' . $user->email . '\\n' .\n 'password: ' . $user->getAuthPassword() . '\\n' .\n 'access level: ' . $user->Access_Level . '\\n' .\n 'api_token: ' . $user->api_token . '\\n' .\n 'Access_Level: ' . 'Student' . '\\n'\n );\n\n return Redirect::back()->withErrors(['Successfully added a new student!!']);\n }", "title": "" }, { "docid": "0036c034049b9f4b4014c04c1dce3ea4", "score": "0.54705167", "text": "public function persist() {\n \n $bucket = ConnManager::getBucketCon(); \n \n //Use an associative array or a standard object to store as JSON\n //Even the $this could be stored directly\n $doc = new stdClass();\n \n $doc->type = self::TYPE;\n $doc->id = $this->id;\n $doc->name = $this->name;\n $doc->address = $this->address;\n \n if (!empty($this->users))\n {\n $doc->users = array();\n }\n \n foreach ($this->users as $u)\n {\n array_push($doc->users, $u->uid);\n \n //Persist also associated users\n $u->persist();\n }\n \n $bucket->upsert(self::TYPE . \"::\" . $this->id, $doc);\n }", "title": "" }, { "docid": "d0192278c47cbf603278625e9ec9819f", "score": "0.546774", "text": "public function store(Request $request){\n// $profile->fname=$request->fname;\n// $profile->lname=$request->lname;\n// $profile->email=$request->email;\n// $profile->mothername=$request->mothername;\n// $profile->fathername=$request->fathername;\n// $profile->p_address=$request->p_address;\n// $profile->address=$request->address;\n// $profile->joindate=$request->joindate;\n// $profile->nid=$request->nid;\n// $profile->mobile=$request->mobile;\n// $user = User::create($profile);\n// $user->assignRole($request->input('roles'));\n//\n// $profile->save();\n//\n// return redirect()->route('create');\n\n }", "title": "" }, { "docid": "f796063b1b0f6c4dd2fa4da328df8c5e", "score": "0.5465802", "text": "public function store(Request $request)\n {\n $professor = new User;\n $professor->matricula = Input::get('matricula');\n $professor->nome = Input::get('nome'); \n $professor->email = Input::get('email');\n $professor->password = md5(Input::get('senha'));\n $professor->tipo_user = \"2\";\n\n\n $professor->save();\n\n return view('professor.criar');\n }", "title": "" }, { "docid": "629123fb266106216631bbbf01592dbb", "score": "0.54644674", "text": "public function store(CreateTipoContratoRequest $request)\n {\n $input = $request->all();\n\n $tipoContrato = $this->tipoContratoRepository->create($input);\n\n \n\n return redirect(route('tipoContratos.index'));\n }", "title": "" }, { "docid": "8b1b340ccbc09f94a7ab15cf55fd25a8", "score": "0.54639095", "text": "public function create_a_actividad_proceso()\n {\n $this->addPermisoGlobal('comun');\n\n $tabla = \"a_actividad_proceso\";\n $nom_tabla = $this->getNomTabla($tabla);\n $a_sql = [];\n $a_sql[] = \"CREATE TABLE IF NOT EXISTS $nom_tabla (\n id_schema integer NOT NULL,\n id_item integer NOT NULL,\n id_tipo_proceso integer NOT NULL,\n id_activ bigint NOT NULL,\n id_fase integer,\n id_tarea integer,\n completado boolean,\n observ text\n ); \";\n\n $a_sql[] = \"ALTER TABLE $nom_tabla ALTER completado SET DEFAULT false;\";\n $a_sql[] = \"ALTER TABLE $nom_tabla OWNER TO $this->user_orbix\";\n\n $this->executeSql($a_sql);\n\n $this->delPermisoGlobal('comun');\n }", "title": "" }, { "docid": "5894a9402ef1ce74683eb2bd7108791e", "score": "0.5460896", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'documento' => 'required|max:255|unique:pacientes,documento',\n 'nombre' => 'required|max:255',\n 'edad' => 'required|integer|min:1',\n 'fecha_nacimiento' => 'required|date',\n 'telefono' => 'required',\n 'direccion' => 'required|max:255',\n 'aseguradora_id' => 'required|exists:aseguradoras,id',\n 'id_contrato' => 'required|exists:contratos,id'\n ]);\n $paciente = Paciente::create($request->all());\n $aseguradora = Aseguradora::find($request->get('aseguradora_id'));\n $aseguradora->pacientes()->save($paciente);\n flash('El paciente ha sido registrado con exito!');\n return Redirect::to('pacientes/create');\n }", "title": "" } ]
fddf4bae7ae411483e2bc6e4debce07d
Transform the resource into an array.
[ { "docid": "bd12e12463873c2f0aab4a293f9386c3", "score": "0.0", "text": "public function toArray($request)\n {\n $reviewee = new ThreadBriefResource($this->whenLoaded('reviewee'));\n return [\n 'type' => 'post_info',\n 'id' => (int) $this->post_id,\n 'attributes' => [\n 'order_by' => (int)$this->order_by,\n 'abstract' => (string)$this->abstract,\n 'warning' => (string)$this->warning,\n 'annotation' => (string)$this->annotation,\n 'previous_id' => (int)$this->previous_chapter_id,\n 'next_id' => (int)$this->next_chapter_id,\n 'reviewee_id' => (int)$this->reviewee_id,\n 'reviewee_type' => (string)$this->reviewee_type,\n 'recommend' => (bool)$this->recommend,\n 'editor_recommend' => (bool)$this->editor_recommend,\n 'rating' => (int)$this->rating,\n 'redirect_count' => (int)$this->redirect_count,\n 'author_attitude' => (int)$this->author_attitude,\n ],\n 'reviewee' => $reviewee,\n ];\n }", "title": "" } ]
[ { "docid": "4e25e3947863b33203911dacd6316143", "score": "0.7715773", "text": "public function asArray() {\n return $this->resource;\n }", "title": "" }, { "docid": "abb04d3f80256573238151dabae942d1", "score": "0.76768947", "text": "public function toArray() {\n $a = array();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "59931585c009e85b0ccd0a70ae01975e", "score": "0.74888384", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "45fe1c0e6a5c43bc5f44575ca798986b", "score": "0.7394696", "text": "public function toArray() {\n $a = array();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "73859107f3d793e942f6d451dfad781f", "score": "0.73854", "text": "public function toArray()\n {\n return $this->resource->toArray();\n }", "title": "" }, { "docid": "d33cbd95f9a8db51c7549e83e71b7a16", "score": "0.7158139", "text": "public function transform($resource)\n {\n return [\n 'id' => (int) $resource['id'],\n 'category_id' => (int) $resource['category_id'],\n 'name' => $resource['name'],\n 'description' => $resource['description'],\n 'price' => (double) $resource['price'],\n 'display_price' => format_currency($resource['price']),\n 'image' => $resource['image'],\n 'status' => (int) $resource['status']\n ];\n }", "title": "" }, { "docid": "1bec63b61e26555d32d80a87ec54c55b", "score": "0.70493937", "text": "public function __toArray()\r\n {\r\n return array(\r\n 'resource' => $this->resource,\r\n 'permissions' => $this->permissions\r\n );\r\n }", "title": "" }, { "docid": "6a49635eadcc89df81bde3cc75fdc035", "score": "0.7023718", "text": "public function toArray() {\n $a = array();\n if( $this->survivorResource ) {\n $a[\"survivorResource\"] = $this->survivorResource->toArray();\n }\n if( $this->duplicateResource ) {\n $a[\"duplicateResource\"] = $this->duplicateResource->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "b08f6dc6e06fa5869b69cc9a569f905b", "score": "0.69862056", "text": "public function toArrayAPI();", "title": "" }, { "docid": "08dac2256517d89f2beb8242a0ddee4c", "score": "0.69516", "text": "public function toArray($request)\n {\n return $this->resource->toArray(); \n }", "title": "" }, { "docid": "b0b3958da4592784a0b7f35f730b2f63", "score": "0.6891905", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n if( $this->attribution ) {\n $a[\"attribution\"] = $this->attribution->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "f7cd1e81b86fc1eb38e46afcb06e4bed", "score": "0.68831193", "text": "abstract public function getAsArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "007009a256b8811ae7e6e77201ba8f06", "score": "0.6826952", "text": "public function transform($resource)\n {\n return [\n\n 'id' => $resource->id,\n 'name' => $resource->name,\n 'description' => $resource->description,\n 'sort' => $resource->sort,\n 'status' => $resource->status,\n 'created_at' => (string)$resource->created_at,\n 'updated_at' => (string)$resource->updated_at,\n 'categories' => $resource->categories,\n\n ];\n }", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.6813926", "text": "public abstract function as_array();", "title": "" }, { "docid": "61591c345fcce0642362aab01322a7cb", "score": "0.6801408", "text": "public function asArray()\n {\n return json_decode($this->asJson(), true);\n }", "title": "" }, { "docid": "7efad91c2502fd48ffca26587565fdd6", "score": "0.6782203", "text": "public function convert(): array;", "title": "" }, { "docid": "ff2dfbd680415cd97f04fffd9a94e02b", "score": "0.6731324", "text": "public function toArray()\n {\n $a = array();\n if ($this->resourcesToDelete) {\n $ab = array();\n foreach ($this->resourcesToDelete as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if ($this->resourcesToCopy) {\n $ab = array();\n foreach ($this->resourcesToCopy as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.67253405", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "769038b2f53ef031f8aa4d5aa32408b1", "score": "0.6706456", "text": "public function toArray(){\n\t\tif ( empty( $this->data ) ) {\n\t\t\t$this->set_data();\n\t\t}\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.66785425", "text": "public function __toArray();", "title": "" }, { "docid": "afeddd7275f3369e2b5a48d1fb3cbf95", "score": "0.6665385", "text": "public function toArray() {\n $a = array();\n if( $this->resourcesToDelete ) {\n $ab = array();\n foreach( $this->resourcesToDelete as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if( $this->resourcesToCopy ) {\n $ab = array();\n foreach( $this->resourcesToCopy as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "edd78c252e6527cebbbc55e6ecdabc41", "score": "0.665781", "text": "abstract protected function _toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "f9e5d006714b5b5344a2299fc4e0eca8", "score": "0.6648404", "text": "final public function toArray()\n {\n }", "title": "" }, { "docid": "af2116a5083e8bf204fa266d50d9886d", "score": "0.6634635", "text": "protected function toArray()\n {\n return (array) json_decode($this->toString(), true);\n }", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" } ]
4b5328e2dbdfa992a9c2c63debf37077
Returns all fields to display to an admin attempting to add a service with the module
[ { "docid": "8077671f2d31aed549ce3d1340ef1cc1", "score": "0.64386284", "text": "public function getAdminAddFields($package, $vars = null)\n {\n Loader::loadHelpers($this, ['Form', 'Html']);\n\n if ($package->meta->type == 'domain') {\n // Set default name servers\n if (!isset($vars->ns1) && isset($package->meta->ns)) {\n $i = 1;\n foreach ($package->meta->ns as $ns) {\n $vars->{'ns' . $i++} = $ns;\n }\n }\n\n // Handle transfer request\n if ((isset($vars->transfer) && $vars->transfer) || isset($vars->auth)) {\n return $this->arrayToModuleFields(Configure::get('Namesilo.transfer_fields'), null, $vars);\n } else {\n // Handle domain registration\n #\n # TODO: Select TLD, then display additional fields\n #\n\n $fields = Configure::get('Namesilo.transfer_fields');\n\n $fields['transfer'] = [\n 'label' => Language::_('Namesilo.domain.DomainAction', true),\n 'type' => 'radio',\n 'value' => '1',\n 'options' => [\n '0' => 'Register',\n '1' => 'Transfer',\n ],\n ];\n\n $fields['auth'] = [\n 'label' => Language::_('Namesilo.transfer.EPPCode', true),\n 'type' => 'text',\n ];\n\n $module_fields = $this->arrayToModuleFields(\n array_merge($fields, Configure::get('Namesilo.nameserver_fields')),\n null,\n $vars\n );\n\n $module_fields->setHtml(\"\n <script type=\\\"text/javascript\\\">\n $(document).ready(function() {\n $('#transfer_id_0').prop('checked', true);\n $('#auth_id').closest('li').hide();\n // Set whether to show or hide the ACL option\n $('#auth').closest('li').hide();\n if ($('input[name=\\\"transfer\\\"]:checked').val() == '1')\n $('#auth_id').closest('li').show();\n\n $('input[name=\\\"transfer\\\"]').change(function() {\n if ($(this).val() == '1'){\n $('#auth_id').closest('li').show();\n $('#ns1_id').closest('li').hide();\n $('#ns2_id').closest('li').hide();\n $('#ns3_id').closest('li').hide();\n $('#ns4_id').closest('li').hide();\n $('#ns5_id').closest('li').hide();\n }else{\n $('#auth_id').closest('li').hide();\n $('#ns1_id').closest('li').show();\n $('#ns2_id').closest('li').show();\n $('#ns3_id').closest('li').show();\n $('#ns4_id').closest('li').show();\n $('#ns5_id').closest('li').show();\n }\n });\n });\n </script>\");\n\n // Build the domain fields\n $fields = $this->buildDomainModuleFields($vars);\n if ($fields) {\n $module_fields = $fields;\n }\n }\n }\n\n return (isset($module_fields) ? $module_fields : new ModuleFields());\n }", "title": "" } ]
[ { "docid": "ce449ef1bf4f532c0fe6c5dc869be6a3", "score": "0.6945626", "text": "public function getAdminAddFields($package, $vars=null) {\r\n //generate admin view to add service\r\n Loader::loadHelpers($this, array(\"Form\", \"Html\"));\r\n\r\n $fields = new ModuleFields();\r\n\r\n //keycdn_name\r\n\r\n //zone\r\n $fields->label(Language::_(\"keycdn.service_field.zone_id\", true), \"keycdn_zone_id\");\r\n\r\n $fields->fieldText(\"keycdn_zone_id\",\r\n $this->Html->ifSet($vars->keycdn_zone_id),\r\n array('id'=>\"keycdn_zone_id\", 'class'=>\"form-control\"));\r\n\r\n //zone name\r\n $keycdn_name = $fields->label(Language::_(\"keycdn.service_field.name\", true), \"keycdn_name\");\r\n $keycdn_name->attach($fields->fieldText(\"keycdn_name\",\r\n $this->Html->ifSet($vars->keycdn_name),\r\n array('id'=>\"keycdn_name\", 'class'=>\"form-control\")));\r\n $fields->setField($keycdn_name);\r\n\r\n //zone url\r\n $keycdn_zone_url = $fields->label(Language::_(\"keycdn.service_field.zone_url\", true), \"keycdn_zone_url\");\r\n $keycdn_zone_url->attach($fields->fieldText(\"keycdn_zone_url\",\r\n $this->Html->ifSet($vars->keycdn_zone_url),\r\n array('id'=>\"keycdn_zone_url\", 'class'=>\"form-control\")));\r\n $fields->setField($keycdn_zone_url);\r\n\r\n //zone orginal url\r\n $keycdn_domain = $fields->label(Language::_(\"keycdn.service_field.domain\", true), \"keycdn_domain\");\r\n $keycdn_domain->attach($fields->fieldText(\"keycdn_domain\",\r\n $this->Html->ifSet($vars->keycdn_domain),\r\n array('id'=>\"keycdn_domain\", 'class'=>\"form-control\")));\r\n $fields->setHtml(\"\r\n <div class=\\\"alert alert-info\\\">\".Language::_(\"keycdn.service_field.orgin_example\",true).\"</div>\r\n \");\r\n $fields->setField($keycdn_domain);\r\n //unset for namesake\r\n unset($keycdn_name);\r\n unset($keycdn_domain);\r\n unset($keycdn_zone_url);\r\n\r\n return $fields;\r\n }", "title": "" }, { "docid": "3107ede0591348546c0a177938bbb388", "score": "0.6797134", "text": "public function getAdminAddFields($package, $vars=null) {\n\t\tLoader::loadHelpers($this, array(\"Html\"));\n\n\t\t// Fetch the module row available for this package\n\t\t$module_row = $this->getModuleRowByServer((isset($package->module_row) ? $package->module_row : 0), (isset($package->module_group) ? $package->module_group : \"\"));\n\n\t\t$fields = new ModuleFields();\n\n\t\t// Create hostname label\n\t\t$host_name = $fields->label(Language::_(\"Dsm.service_field.Dsm_hostname\", true), \"Dsm_hostname\");\n\t\t// Create hostname field and attach to hostname label\n\t\t$host_name->attach($fields->fieldText(\"Dsm_hostname\", $this->Html->ifSet($vars->Dsm_hostname), array('id'=>\"Dsm_hostname\")));\n\t\t// Set the label as a field\n\t\t$fields->setField($host_name);\n\n\t\t// Create virtual server label\n\t\t$vserver_id = $fields->label(Language::_(\"Dsm.service_field.Dsm_vserver_id\", true), \"Dsm_vserver_id\");\n\t\t// Create virtual server field and attach to virtual server label\n\t\t$vserver_id->attach($fields->fieldText(\"Dsm_vserver_id\", $this->Html->ifSet($vars->Dsm_vserver_id), array('id'=>\"Dsm_vserver_id\")));\n\t\t// Add tooltip\n\t\t$tooltip = $fields->tooltip(Language::_(\"Dsm.service_field.tooltip.Dsm_vserver_id\", true));\n\t\t$vserver_id->attach($tooltip);\n\t\t// Set the label as a field\n\t\t$fields->setField($vserver_id);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "39584e7284ad130c960db020a13e664d", "score": "0.6629269", "text": "public function getAdminAddFields($package, $vars=null) {\n\t\t$fields = new ModuleFields();\n\t\t\n\t\tif (!isset($vars->meta))\n\t\t\t$vars->meta = array();\n\t\t\n\t\tif (isset($package->module_row) && $package->module_row > 0) {\n\t\t\t$row = $this->getModuleRow($package->module_row);\n\t\t\t\n\t\t\t// Set the module row, which will allow us to reference it later when getName() is invoked\n\t\t\t$this->setModuleRow($row);\n\t\t\t\n\t\t\t$row_fields = array();\n\t\t\tif ($row->meta) {\n\t\t\t\t$row_fields = $this->formatModuleRowFields($row->meta);\n\t\t\t\t\n\t\t\t\t$field_data = array();\n\t\t\t\t$row_fields = json_decode(str_replace(\"hidden\",\"text\",json_encode($row_fields)),true);\n\t\t\t\t// Reformat package fields into a more usable format\n\t\t\t\tforeach ($row_fields['service_fields'] as $key => $values) {\n\t\t\t\t\tforeach ($values as $i => $value) {\n\t\t\t\t\t\t$field_data[$i][$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->setModuleFields($fields, $field_data, $vars);\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "63f09af4c4db89bf819c7fc9825193c8", "score": "0.6550155", "text": "function getListEntry()\n {\n\n $this->updateStatusState();\n\n /* Assign status flag */\n if(!empty($this->StatusFlag)){\n $flag = $this->StatusFlag;\n $fields['Status'] = $this->$flag;\n }else{\n $fields['Status'] = \"\";\n }\n\n /* Name displayed in service overview */\n $fields['Message'] = _(\"Empty service\");\n\n /* Allow/disallow some functions */\n $sf = !empty($this->StatusFlag);\n $fields['AllowStart'] = $sf && $this->acl_is_writeable(\"start\");\n $fields['AllowStop'] = $sf && $this->acl_is_writeable(\"stop\");\n $fields['AllowRestart'] = $sf && $this->acl_is_writeable(\"restart\");\n $fields['AllowRemove'] = $this->acl_is_removeable();\n $fields['AllowEdit'] = $this->acl_is_readable(\"\");\n return($fields);\n }", "title": "" }, { "docid": "772b0a1e1003fe9f7bef7ef35b829c93", "score": "0.6547165", "text": "public function fields()\n {\n return [\n Select::make(__(\"Order Handler\"), \"resource\")\n ->options(static::salables())\n ->required()\n ->rules(\"required\"),\n\n Text::make(__('Order Name'), 'name')\n ->required()\n ->rules('required'),\n ];\n }", "title": "" }, { "docid": "acde5e541b735924816d47c2789f213a", "score": "0.65316176", "text": "public function generateModuleFields()\n\t\t\t{\n\t\t\t\tglobal $CFG;\n\t\t\t\t//Dynamic on/off module coding..\n\t\t\t\t$inc = 0;\n\t\t\t\tforeach($CFG['site']['modules_arr'] as $value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(chkAllowedModule(array(strtolower($value))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$field_name = 'has'.ucfirst($value).'s';\n\t\t\t\t\t\t\t\t$table_field_name = 'total_'.$value.'s';\n\t\t\t\t\t\t\t\tif(isset($this->LANG['membermanage_search_with_'.$value.'s']))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->module_array[$inc]['field_name'] = $field_name;\n\t\t\t\t\t\t\t\t\t\t$this->module_array[$inc]['table_field_name'] = $table_field_name;\n\t\t\t\t\t\t\t\t\t\t$this->module_array[$inc]['lang_value'] = $this->LANG['membermanage_search_with_'.$value.'s'];\n\t\t\t\t\t\t\t\t\t\t$this->module_array[$inc]['lang_value'] = '';\n\t\t\t\t\t\t\t\t\t\t$this->module_array[$inc]['lang_value'] = $this->LANG['membermanage_search_with_'.$value.'s'];\n\t\t\t\t\t\t\t\t\t\t$this->setFormField($field_name, '');\n\t\t\t\t\t\t\t\t\t\t$inc++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "264a7683b36623b100535b31145ec75f", "score": "0.638277", "text": "public function buildFields()\n {\n $this->addField('title', 'Title', true, 'KunstmaanNodeBundle:Admin:title.html.twig')\n ->addField('created', 'Created At', true)\n ->addField('updated', 'Updated At', true)\n ->addField('online', 'Online', true, 'KunstmaanNodeBundle:Admin:online.html.twig');\n }", "title": "" }, { "docid": "67dd18f6b3fc6c4ba63df059fb393ecb", "score": "0.6345193", "text": "public function listRegisterFields(){\n\t\t$this->registerFieldInt('id_hld_inc_res', 'Id Resp de Inc');\n\t\t$this->registerFieldInt('id_hld_catalog_state', 'Id Estado');\n\t\t$this->registerFieldString('color_state', 'Color');\n\t\t\n\t\t$this->registerFieldString('name_state', 'Estado');\n\t\t$this->registerFieldString('response_inc_res', 'Respuesta');\n\t}", "title": "" }, { "docid": "43134125c9b5eb23ae32c94b06051507", "score": "0.62459373", "text": "private function addFields() {\n $this->add(\n 'checkbox',\n 'is_members_only_event',\n ts('Only allow members to register for this event?')\n );\n\n $this->addEntityRef(\n 'allowed_membership_types',\n ts('Allowed Membership Types'),\n array(\n 'entity' => 'MembershipType',\n 'multiple' => TRUE,\n 'placeholder' => ts('- any -'),\n 'select' => array('minimumInputLength' => 0),\n )\n );\n\n $this->addYesNo(\n 'purchase_membership_button',\n ts('Provide Purchase Membership Button when access denied ?')\n );\n\n $this->add(\n 'wysiwyg',\n 'notice_for_access_denied',\n ts('Notice for access denied')\n );\n\n $this->add(\n 'text',\n 'purchase_membership_button_label',\n ts('Purchase Membership Button Label')\n );\n\n $this->addRadio(\n 'purchase_membership_link_type',\n ts('Purchase Membership Button Link'),\n array(0 => 'Link to a Contribution Page', 1 => 'Other URLs')\n );\n\n $this->addEntityRef(\n 'contribution_page_id',\n ts('Contribution Page'),\n array(\n 'entity' => 'ContributionPage',\n 'multiple' => FALSE,\n 'placeholder' => ts('- Select -'),\n 'select' => array('minimumInputLength' => 0),\n )\n );\n\n $this->add(\n 'text',\n 'purchase_membership_url',\n ts('Purchase Membership URL'),\n array('placeholder' => CRM_Utils_System::baseCMSURL())\n );\n }", "title": "" }, { "docid": "9a52512be2062335047e2a184af02ae2", "score": "0.6192238", "text": "public function settingsFields() {\n// TODO\n }", "title": "" }, { "docid": "6431430f1cb6a99c2b85863bb69e1496", "score": "0.6174622", "text": "public function getAdminEditFields($package, $vars=null) {\n\t\tLoader::loadHelpers($this, array(\"Html\"));\n\n\t\t$fields = new ModuleFields();\n\n\t\t// Create virtual server label\n\t\t$vserver_id = $fields->label(Language::_(\"Dsm.service_field.Dsm_vserver_id\", true), \"Dsm_vserver_id\");\n\t\t// Create virtual server field and attach to virtual server label\n\t\t$vserver_id->attach($fields->fieldText(\"Dsm_vserver_id\", $this->Html->ifSet($vars->Dsm_vserver_id), array('id'=>\"Dsm_vserver_id\")));\n\t\t// Add tooltip\n\t\t$tooltip = $fields->tooltip(Language::_(\"Dsm.service_field.tooltip.Dsm_vserver_id\", true));\n\t\t$vserver_id->attach($tooltip);\n\t\t// Set the label as a field\n\t\t$fields->setField($vserver_id);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "8501d813748400a30f5fbc1c6e11e4ff", "score": "0.61680967", "text": "public function getClientAddFields($package, $vars=null) {\n\t\t$fields = new ModuleFields();\n\t\t\n\t\tif (!isset($vars->meta))\n\t\t\t$vars->meta = array();\n\t\t\n\t\tif (isset($package->module_row) && $package->module_row > 0) {\n\t\t\t$row = $this->getModuleRow($package->module_row);\n\t\t\t\n\t\t\t// Set the module row, which will allow us to reference it later when getName() is invoked\n\t\t\t$this->setModuleRow($row);\n\t\t\t\n\t\t\t$row_fields = array();\n\t\t\tif ($row->meta) {\n\t\t\t\t$row_fields = $this->formatModuleRowFields($row->meta);\n\t\t\t\t\n\t\t\t\t$field_data = array();\n\t\t\t\t// Reformat package fields into a more usable format\n\t\t\t\tforeach ($row_fields['service_fields'] as $key => $values) {\n\t\t\t\t\tforeach ($values as $i => $value) {\n\t\t\t\t\t\t$field_data[$i][$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->setModuleFields($fields, $field_data, $vars);\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\t}", "title": "" }, { "docid": "85e60bb21ab26307eac113742e9f4143", "score": "0.61441875", "text": "public function getDisplayFields()\n\t{\n\t\t$this->errorExtendMethod(__METHOD__);\n\t}", "title": "" }, { "docid": "596275179557ce3633fd6fab799d55c3", "score": "0.61196995", "text": "function getModulesFields() {\r\n $contact = new ModelDef('Contact');\r\n $lead = new ModelDef('Lead');\r\n $prospect = new ModelDef('Prospect');\r\n $account = new ModelDef('Account');\r\n\r\n // add fields here that would not make sense in an email template\r\n $badFields = array(\r\n \t'id_c',\r\n 'account_description',\r\n 'contact_id',\r\n 'lead_id',\r\n 'opportunity_amount',\r\n 'opportunity_id',\r\n 'opportunity_name',\r\n 'opportunity_role_id',\r\n 'opportunity_role_fields',\r\n 'opportunity_role',\r\n 'campaign_id',\r\n );\r\n\r\n $field_defs = array(\r\n 'Contacts' => array($contact->getFieldDefinitions(), 'contact_'),\r\n 'Leads' => array($lead->getFieldDefinitions(), 'contact_'),\r\n 'Prospects' => array($prospect->getFieldDefinitions(), 'contact_'),\r\n 'Accounts' => array($account->getFieldDefinitions(), 'account_')\r\n );\r\n\r\n $field_defs_array = array();\r\n\r\n foreach ($field_defs as $module => $data) {\r\n $fields = array();\r\n foreach($data[0] as $field_def) {\r\n if(\t($field_def['type'] == 'ref' && empty($field_def['custom_type'])) ||\r\n ($field_def['type'] == 'assigned_user' || $field_def['type'] =='link') ||\r\n ($field_def['type'] == 'bool') ||\r\n (in_array($field_def['name'], $badFields)) ) {\r\n\r\n continue;\r\n }\r\n if( $field_def['type'] == 'enum' && ! empty($field_def['multi_select_group']))\r\n \tcontinue; // skip category fields\r\n\r\n $lang_module = $module;\r\n if (isset($field_def['original_module'])) {\r\n $lang_module = $field_def['original_module'];\r\n }\r\n\r\n $field_def['vname'] = preg_replace('/:$/','',translate($field_def['vname'], $lang_module));\r\n $temp_Value = array('name' => $data[1] . $field_def['name'], 'value' => $field_def['vname']);\r\n\r\n\t\t\t\t$field_defs_array[$module][$temp_Value['name']] = $temp_Value;\r\n }\r\n }\r\n\r\n $field_defs_array['Contacts'] += $field_defs_array['Leads'];\r\n $field_defs_array['Contacts'] += $field_defs_array['Prospects'];\r\n unset($field_defs_array['Prospects']);\r\n unset($field_defs_array['Leads']);\r\n\r\n\t\tforeach($field_defs_array as $k => $v)\r\n\t\t\t$field_defs_array[$k] = array_values(array_csort($v, 'value'));\r\n\r\n return $field_defs_array;\r\n\t}", "title": "" }, { "docid": "40956a7e0ef0a48e822585cd02d51d4d", "score": "0.61073625", "text": "function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\t\t//debug fields\n\t\t$fields->removeByName(\"TotalWeight\");\n\t\t$fields->addFieldToTab(\"Root.Debug\", new ReadonlyField(\"TotalWeightShown\", \"total weight used for calculation\", $this->TotalWeight));\n\t\t$fields->removeByName(\"SubTotalAmount\");\n\t\t$fields->addFieldToTab(\"Root.Debug\", new ReadonlyField(\"SubTotalAmountShown\", \"sub-total amount used for calculation\", $this->SubTotalAmount));\n\t\t$fields->removeByName(\"SerializedCalculationObject\");\n\t\t$fields->addFieldToTab(\"Root.Debug\", new ReadonlyField(\"SerializedCalculationObjectShown\", \"debug data\", unserialize($this->SerializedCalculationObject)));\n\t\t$fields->removeByName(\"DebugString\");\n\t\t$fields->addFieldToTab(\"Root.Debug\", new ReadonlyField(\"DebugStringShown\", \"steps taken\", $this->DebugString));\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "6d1d1429155682c889a334b3a1228fe5", "score": "0.610467", "text": "public function fields()\n {\n $currency=MainCurrency::all()->pluck('iso_4217_code','id')->toArray();\n return [\n\n Text::make('Short Name')->withMeta([\n 'placeholder' => 'Short Name',\n ])->rules('required'),\n\n\n Text::make('Long Name')->withMeta([\n 'placeholder' => 'Long Name',\n ])->rules('required'),\n\n Select::make('Currency Id', 'currency_id')->options($currency)->displayUsingLabels()->rules('max:255')\n ];\n\n }", "title": "" }, { "docid": "b8936deabece317ddae0011ecd772a9f", "score": "0.60919684", "text": "public function get_form_fields() {\n\t\treturn apply_filters ( 'wshop_settings_api_form_fields_' . $this->id, $this->form_fields );\n\t}", "title": "" }, { "docid": "3de5b9dce4e359d3b05dccfaff10978b", "score": "0.60804754", "text": "public function addAdminFields()\n {\n foreach ($this->_fieldData as $field_data ) {\n add_settings_field(\n $field_data['id'],\n $field_data['title'],\n $field_data['callback'],\n $field_data['page'],\n $field_data['section'],\n $field_data['args']\n );\n register_setting(\n $field_data['option_group'],\n $field_data['option_name'],\n $field_data['sanitize_callback']\n );\n }\n }", "title": "" }, { "docid": "bd6f984f26c7c37a8f7f10fd5edb3309", "score": "0.6077258", "text": "public function ___getConfigInputfields() {\n\t\t$info = $this->wire('modules')->getModuleInfoVerbose($this->className(), array('noCache' => true));\n\t\t$fieldset = $this->wire('modules')->get('InputfieldFieldset');\n\t\t$fieldset->label = $info['title'];\n\t\t$fieldset->description = $info['summary'];\n\t\treturn $fieldset; \n\t}", "title": "" }, { "docid": "600e25139b7eaf82cdddc8af5fa12ab0", "score": "0.6073879", "text": "function _newcontent_installed_fields() {\n\n $fields = array();\n \n //\n // Paste in the content from the export.\n //\n \n return $fields;\n}", "title": "" }, { "docid": "14c33575effea90799d37de1e49cd0c9", "score": "0.60707283", "text": "function manage_fields() {\n\n\tglobal $mysql, $twig, $lang;\n\t$fields = $mysql->select(\"select * from \" . prefix . \"_guestbook_fields\");\n\t$tVars = array();\n\t$tEntries = array();\n\tforeach ($fields as $fNum => $fRow) {\n\t\t$tEntry = array(\n\t\t\t'id' => $fRow['id'],\n\t\t\t'name' => $fRow['name'],\n\t\t\t'placeholder' => $fRow['placeholder'],\n\t\t\t'default_value' => $fRow['default_value'],\n\t\t\t'required' => intval($fRow['required'])\n\t\t);\n\t\t$tEntries[] = $tEntry;\n\t}\n\t$tVars['entries'] = $tEntries;\n\t$xt = $twig->loadTemplate('plugins/guestbook/tpl/config/manage_fields.tpl');\n\t$xg = $twig->loadTemplate('plugins/guestbook/tpl/config/main.tpl');\n\t$tVars = array(\n\t\t'entries' => $xt->render($tVars),\n\t);\n\tprint $xg->render($tVars);\n}", "title": "" }, { "docid": "420428ba45a12bcd04b1fd42a0aa8b05", "score": "0.6056372", "text": "public function getClientAddFields($package, $vars=null) {\n\t\tLoader::loadHelpers($this, array(\"Html\"));\n\n\t\t// Fetch the module row available for this package\n\t\t$module_row = $this->getModuleRowByServer((isset($package->module_row) ? $package->module_row : 0), (isset($package->module_group) ? $package->module_group : \"\"));\n\n\t\t$fields = new ModuleFields();\n\n\t\t// Create hostname label\n\t\t$host_name = $fields->label(Language::_(\"Dsm.service_field.Dsm_hostname\", true), \"Dsm_hostname\");\n\t\t// Create hostname field and attach to hostname label\n\t\t$host_name->attach($fields->fieldText(\"Dsm_hostname\", $this->Html->ifSet($vars->Dsm_hostname, $this->Html->ifSet($vars->domain)), array('id'=>\"Dsm_hostname\")));\n\t\t// Set the label as a field\n\t\t$fields->setField($host_name);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "841b0374480ba5e848a0cd0e908e0e6c", "score": "0.60490024", "text": "public function getAdminAddFields($package, $vars = null)\n {\n\n return $this->makeAddFields($package, $vars);\n }", "title": "" }, { "docid": "a73c7e4aa155f1b4cdb3c8d1cc5007ab", "score": "0.6044267", "text": "public function fields() {\n // TODO: Implement fields() method.\n }", "title": "" }, { "docid": "04075d2e8ede561c6aca7ce1ce87328d", "score": "0.6043196", "text": "public function fields() {\n return [\n 'name' => 'name',\n ];\n }", "title": "" }, { "docid": "98f54eb824e4eb77d39e097418332589", "score": "0.6034957", "text": "public function getAddExtraFields()\n {\n return $this->getConfig()->getComponentByType(FullGridFieldCheckbox::class)->getAddExtraFields();\n }", "title": "" }, { "docid": "33d611cec9f96fd51a151397d785fa93", "score": "0.601346", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "ed48e36793f52cdc6e1bb62c76515178", "score": "0.599288", "text": "public function getAdminServiceInfo($service, $package) {\n\t\t$row = $this->getModuleRow();\n\t\t\n\t\t// Load the view into this object, so helpers can be automatically added to the view\n\t\t$this->view = new View(\"admin_service_info\", \"default\");\n\t\t$this->view->base_uri = $this->base_uri;\n\t\t$this->view->setDefaultView(\"components\" . DS . \"modules\" . DS . \"universal_server_module\" . DS);\n\t\t\n\t\t// Load the helpers required for this view\n\t\tLoader::loadHelpers($this, array(\"Form\", \"Html\"));\n\t\t\n\t\t$this->view->set(\"module_row\", $row);\n\t\t$this->view->set(\"package\", $package);\n\t\t$this->view->set(\"service\", $service);\n\t\t$this->view->set(\"service_fields\", $this->serviceFieldsToObject($service->fields));\n //$this->view->set(\"licenses\", $this->getLicenseTypes());\n\t\t\n\t\treturn $this->view->fetch();\n\t}", "title": "" }, { "docid": "8bceb978a1392792cd1818f14b2a5987", "score": "0.5988916", "text": "public function getServiceFields($service_id)\n {\n $fields = $this->remote->select()->from('object_customField')->where('objectid', '=', $service_id)->getStatement()->fetchAll();\n\n foreach ($fields as $key => $value) {\n $custom_field = $this->remote->select()->from('customField')->where('id', '=', $value->customfieldid)->getStatement()->fetch();\n $fields[$key]->name = str_replace(' ', '_', strtolower($custom_field->name));\n }\n\n return $fields;\n }", "title": "" }, { "docid": "216fbbd3d955851ae055923a7a385182", "score": "0.5978355", "text": "function churchdb_getAdminForm() {\n global $config;\n\n $form = new CTModuleForm(\"churchdb\");\n\n $form->addField(\"churchdb_maxexporter\", \"\", \"INPUT_REQUIRED\", t('max.allowed.rows.to.export'))\n ->setValue($config[\"churchdb_maxexporter\"]);\n\n $form->addField(\"churchdb_home_lat\", \"\", \"INPUT_REQUIRED\", t('center.coordinates.latitude'))\n ->setValue($config[\"churchdb_home_lat\"]);\n\n $form->addField(\"churchdb_home_lng\", \"\", \"INPUT_REQUIRED\", t('center.coordinates.longitude'))\n ->setValue($config[\"churchdb_home_lng\"]);\n\n $form->addField(\"churchdb_emailseparator\", \"\", \"INPUT_REQUIRED\", t('email.default.separator'))\n ->setValue($config[\"churchdb_emailseparator\"]);\n\n $form->addField(\"churchdb_groupnotchoosable\", \"\", \"INPUT_REQUIRED\", t('days.to.show.terminated.groups'))\n ->setValue($config[\"churchdb_groupnotchoosable\"]);\n\n $form->addField(\"churchdb_birthdaylist_status\", \"\", \"INPUT_REQUIRED\", t('xxx.ids.for.birthdaylist.comma.separated',t('status')))\n ->setValue($config[\"churchdb_birthdaylist_status\"]);\n $form->addField(\"churchdb_birthdaylist_station\", \"\", \"INPUT_REQUIRED\", t('xxx.ids.for.birthdaylist.comma.separated',t('station')))\n ->setValue($config[\"churchdb_birthdaylist_station\"]);\n\n $form->addField(\"churchdb_mailchimp_apikey\", \"\", \"INPUT_OPTIONAL\", t('api.key.mailchimp.if.used') .\n ' <a target=\"_clean\" href=\"/?q=help&doc=MailChimp-Integration\">' . t('more.information') . '</a>')\n ->setValue($config[\"churchdb_mailchimp_apikey\"]);\n $form->addField(\"churchdb_smspromote_apikey\", \"\", \"INPUT_OPTIONAL\", t('api.key.smspromote.if.used') .\n ' <a target=\"_clean\" href=\"/?q=help&doc=smspromote-Integration\">' . t('more.information') . '</a>')\n ->setValue($config[\"churchdb_smspromote_apikey\"]);\n\n $form->addField(\"churchdb_sendgroupmails\", \"\", \"CHECKBOX\", t('send.groupchanges.to.leaders'))\n ->setValue($config[\"churchdb_sendgroupmails\"]);\n\n if (!isset($config[\"churchdb_changeownaddress\"])) $config[\"churchdb_changeownaddress\"] = false;\n $form->addField(\"churchdb_changeownaddress\", \"\", \"CHECKBOX\", t('user.is.allowed.to.change.own.address'))\n ->setValue($config[\"churchdb_changeownaddress\"]);\n\n $form->addField(\"churchdb_archivedeletehistory\", \"\", \"CHECKBOX\", t('delete.history.when.moving.to.archive'))\n ->setValue(getVar(\"churchdb_archivedeletehistory\", false, $config));\n\n return $form;\n}", "title": "" }, { "docid": "b228fa14c3959764facf05705bc41b04", "score": "0.5969958", "text": "function add_field() {\n\n\tglobal $twig;\n\t$xt = $twig->loadTemplate('plugins/guestbook/tpl/config/manage_fields.add.tpl');\n\t$xg = $twig->loadTemplate('plugins/guestbook/tpl/config/main.tpl');\n\t$tVars = array(\n\t\t'entries' => $xt->render($tVars),\n\t);\n\tprint $xg->render($tVars);\n}", "title": "" }, { "docid": "8eef670bd84bdcaf5576a9a55bdfd68b", "score": "0.59501034", "text": "function getCMSFields() {\n\t\t$fields = new FieldList(\n\t\t\tnew LiteralField(\n\t\t\t\t'ReportTitle', \n\t\t\t\t \"<h3>{$this->title()}</h3>\"\n\t\t\t)\n\t\t);\n\t\t\n\t\tif($this->description()) $fields->push(\n\t\t\tnew LiteralField('ReportDescription', \"<p>\" . $this->description() . \"</p>\"));\n\t\t\t\n\t\t// Add search fields is available\n\t\tif($params = $this->parameterFields()) {\n\t\t\t$filters = new FieldGroup('Filters');\n\t\t\tforeach($params as $param) {\n\t\t\t\tif ($param instanceof HiddenField) $fields->push($param);\n\t\t\t\telse $filters->push($param);\n\t\t\t}\n\t\t\t$fields->push($filters);\n\n\t\t\t// Add a search button\n\t\t\t$fields->push(new FormAction('updatereport', 'Filter'));\n\t\t}\n\t\t\n\t\t$fields->push($this->getReportField());\n\t\t\n\t\t$this->extend('updateCMSFields', $fields);\n\t\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "510c860b6518d50be68fbbc033bc5e6f", "score": "0.5943314", "text": "public function getFieldsOptions(){\n return Field::lists('nome','id');\n }", "title": "" }, { "docid": "04cd821deace4ca787d0fec855d18feb", "score": "0.5942612", "text": "public function actionFields()\n {\n return [\n\n Button::make('Decline')\n ->event('App\\Events\\FinReqDecline')\n ->style('primary')\n ->confirm('This will email a declination letter to the requester and mark this request \"declined\", would you like to proceed?')\n ->hideFromIndex()\n ->reload(),\n\n Button::make('In Progess')\n ->event('App\\Events\\FinReqInProgress')\n ->style('primary')\n \n ->hideFromIndex()\n ->reload(),\n\n Button::make('Approve')\n ->event('App\\Events\\FinReqApprove')\n ->style('primary')\n ->confirm('This will email an award letter to the requester and mark this request \"approved\", would you like to proceed?')\n ->hideFromIndex()\n ->reload(),\n\n Button::make('Fund')\n ->event('App\\Events\\FinReqFund')\n ->style('primary')\n ->confirm('This will mark this request \"funded\". This assumes that all funds have been paid, and you have adjusted the \"award amount\" - would you like to proceed?')\n ->hideFromIndex()\n ->reload(),\n ];\n\n }", "title": "" }, { "docid": "0770800c4bd4536f91b99395c90fcb5f", "score": "0.5941705", "text": "public function get_extra_fields()\n {\n // Give user options\n // - where to copy files from [actually this field is in admin_import.php]\n // - theme to save into (advise they should use Theme Wizard to create a theme with similar colour first)\n // - whether to Comcode-convert\n // - whether to fix invalid XHTML\n // - the base URL to use to turn absolute URLs into relative URLs\n\n $fields = new Tempcode();\n\n $themes = new Tempcode();\n require_code('themes2');\n $_themes = find_all_themes();\n require_code('form_templates');\n foreach ($_themes as $theme => $theme_title) {\n $themes->attach(form_input_list_entry($theme, ($theme == $GLOBALS['FORUM_DRIVER']->get_theme()), $theme_title));\n }\n $fields = form_input_list(do_lang_tempcode('THEME'), do_lang_tempcode('THEME_TO_SAVE_INTO'), 'theme', $themes, null, true);\n\n $fields->attach(form_input_tick(do_lang_tempcode('WHETHER_CONVERT_COMCODE'), do_lang_tempcode('DESCRIPTION_WHETHER_CONVERT_COMCODE'), 'convert_to_comcode', false));\n\n $fields->attach(form_input_tick(do_lang_tempcode('FIX_INVALID_HTML'), do_lang_tempcode('DESCRIPTION_FIX_INVALID_HTML'), 'fix_html', true));\n\n $fields->attach(form_input_line(do_lang_tempcode('installer:BASE_URL'), do_lang_tempcode('DESCRIPTION_IMPORT_BASE_URL'), 'base_url', get_base_url(), true));\n\n return $fields;\n }", "title": "" }, { "docid": "ca60a05d77bb672e268c8e5f2922941b", "score": "0.5934775", "text": "public function getFieldsList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "64d665b931537751981d49a337d3a90d", "score": "0.5925705", "text": "public function get_fields(){\n return $this->fields;\n }", "title": "" }, { "docid": "470f37e3a7a34fe86b3e210987df21d6", "score": "0.59213144", "text": "public function displayForm()\n {\n // Init Fields form array\n $fieldsForm[0]['form'] = [\n 'legend' => [\n 'title' => $this->l('Settings of my module'),\n ],\n 'input' => [\n [\n 'type' => 'text',\n 'label' => $this->l('Configuration value'),\n 'name' => 'MYMODULE_NAME',\n 'size' => 20,\n 'required' => true\n ]\n ],\n 'submit' => [\n 'title' => $this->l('Save the changes'),\n 'class' => 'btn btn-default pull-right'\n ]\n ];\n\n $helper = new HelperForm();\n\n // Module, token and currentIndex\n $helper->module = $this;\n $helper->name_controller = $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;\n\n // Load current value\n $helper->fields_value['MYMODULE_NAME'] = Configuration::get('MYMODULE_NAME');\n return $helper->generateForm($fieldsForm);\n }", "title": "" }, { "docid": "786912dc544197d72cc31b7d85a1edee", "score": "0.5917629", "text": "public function getCMSFields()\n {\n $this->beforeUpdateCMSFields(function ($fields) {\n $config = SiteConfig::current_site_config();\n\n $fields->removeByName(\n [\n 'Customisation',\n 'Price',\n 'TaxID'\n ]\n );\n\n $fields->addFieldToTab(\n \"Root.Main\",\n ReadonlyField::create(\"Key\"),\n \"Title\"\n );\n\n $fields->addFieldToTab(\n \"Root.Main\",\n DropdownField::create(\n \"TaxRateID\",\n $this->fieldLabel(\"TaxRate\"),\n $config->TaxRates()->map()\n ),\n \"Quantity\"\n );\n\n // Change unlink button to remove on customisation\n $custom_field = $fields->dataFieldByName(\"Customisations\");\n\n if ($custom_field) {\n $config = $custom_field->getConfig();\n $config\n ->removeComponentsByType(GridFieldDeleteAction::class)\n ->removeComponentsByType(GridFieldDataColumns::class)\n ->removeComponentsByType(GridFieldEditButton::class)\n ->removeComponentsByType(GridFieldAddNewButton::class)\n ->removeComponentsByType(GridFieldAddExistingAutocompleter::class)\n ->addComponents(\n new GridFieldEditableColumns(),\n new GridFieldAddNewInlineButton(),\n new GridFieldEditButton(),\n new GridFieldDeleteAction()\n );\n \n $custom_field->setConfig($config);\n }\n });\n\n return parent::getCMSFields();\n }", "title": "" }, { "docid": "d9a43ac728184bfe14f9f653bb62859d", "score": "0.59171975", "text": "public function getClientAddFields($package, $vars=null) {\r\n //for now we are manually adding this packahe in so will not be requesting any client fields\r\n\r\n Loader::loadHelpers($this, array(\"Form\", \"Html\"));\r\n //We are just going to get domain name we want for CDN service for\r\n $fields = new ModuleFields();\r\n\r\n //domain name\r\n $keycdn_domain = $fields->label(Language::_(\"keycdn.service_field.domain\", true), \"keycdn_domain\");\r\n $keycdn_domain->attach($fields->fieldText(\"keycdn_domain\", $this->Html->ifSet($vars->keycdn_domain), array('id' => \"keycdn_domain\")));\r\n $fields->setHtml(\"\r\n <div class=\\\"alert alert-info\\\">\".Language::_(\"keycdn.service_field.orgin_example\",true).\"</div>\r\n \");\r\n $fields->setField($keycdn_domain);\r\n //unset\r\n unset($keycdn_domain);\r\n\r\n\r\n return $fields;\r\n }", "title": "" }, { "docid": "4899570470c441edbcde93acbb1744e6", "score": "0.5916252", "text": "public function getEditableFields() {\n return $this->getGateway()->getFields();\n }", "title": "" }, { "docid": "299dbf8a2aa401eeb63859d4ca2274d3", "score": "0.5913444", "text": "public function licensing_fields() {\n\n // Only grab the License Key to output on the Form if we haven't just deleted it\n $license_key = '';\n if ( ! isset( $_REQUEST[ \"{$this->rbp_support->get_prefix()}_license_action\" ] ) ||\n strpos( $_REQUEST[ \"{$this->rbp_support->get_prefix()}_license_action\" ], 'delete' ) === false ) {\n $license_key = $this->get_license_key();\n }\n \n $this->rbp_support->load_template( 'licensing-fields.php', array(\n 'plugin_prefix' => $this->rbp_support->get_prefix(),\n 'license_status' => $this->get_license_status(),\n 'license_key' => $license_key,\n 'plugin_name' => $this->rbp_support->get_plugin_data()['Name'],\n 'l10n' => $this->rbp_support->get_l10n()['licensing_fields'],\n ) );\n\n }", "title": "" }, { "docid": "8ca1695b6398c7b7a8191e707b46e968", "score": "0.59119725", "text": "public function fields()\n {\n return $this->getTemplate()->getDataFields();\n }", "title": "" }, { "docid": "d50db37ea86897c04f81af7be4c31b0f", "score": "0.59115213", "text": "protected function getFields(){\n\n $prefix = 'fields['.$this->id.']';\n\n return array(\n\n Field::text(\n $prefix.'[label]',\n 'Label',\n array(\n 'class' => array( 'update', 'update-label', 'label-field' ),\n 'defaultValue' => $this->getProperty( 'label', 'Label' )\n )\n ),\n\n Field::text(\n $prefix.'[placeholder]',\n 'Placeholder',\n array(\n 'class' => array( 'update', 'update-placeholder' ),\n 'defaultValue' => $this->getProperty( 'placeholder' )\n )\n ),\n\n Field::text(\n $prefix.'[defaultValue]',\n __( 'Default value', 'chefforms' ),\n array(\n 'defaultValue' => $this->getProperty( 'defaultValue' )\n )\n ),\n\n\n Field::checkbox(\n $prefix.'[required]',\n __( 'Required', 'chefforms' ),\n array(\n 'class' => array( 'update', 'update-label', 'req-field' ),\n 'defaultValue' => $this->getProperty( 'required' )\n )\n ),\n\n Field::hidden(\n $prefix.'[validation]',\n array(\n 'defaultValue' => $this->validation\n )\n ),\n\n Field::hidden(\n $prefix.'[type]',\n array(\n 'defaultValue' => $this->type\n )\n ),\n\n Field::hidden(\n $prefix.'[deletable]',\n array(\n 'defaultValue' => ( $this->deletable ? 'true' : 'false' )\n )\n ),\n\n Field::hidden(\n $prefix.'[position]',\n array(\n 'class' => array( 'field-input', 'position-input' ),\n 'defaultValue' => $this->position\n )\n ),\n\n Field::hidden(\n $prefix.'[row]',\n array(\n 'class' => array( 'field-input', 'row-input' ),\n 'defaultValue' => $this->row\n )\n )\n\n\n\n );\n }", "title": "" }, { "docid": "413ed4c784ef83e30aa7533be2515b20", "score": "0.58985573", "text": "public function getAddform()\n\t{\n\t\t$this->Checklogin();\n\t\t$data['resultField']=$this->setting_model->getAllfieldQuickadd();\n\t\t$data['resultPredefine']=$this->setting_model->getAllpredefinefield();\n\t\t$data ['include']='head/setting/quick_add';\n\t\t$data ['admin_section']='manage_addform';\n\t\tsetSAActivityLogs('Transaction_activity','SAgetAddform_view');\n\t\t$this->load->view('backend/container_sa',$data);\n\t\n\t}", "title": "" }, { "docid": "ab8aef5513c680b2d9cf73dee3fa6156", "score": "0.58952135", "text": "abstract protected function _getFormFields();", "title": "" }, { "docid": "88b1ee56633d45b2334ce238ac7fc111", "score": "0.58950734", "text": "public function getFields(){\n\t\t\t//return $this->fields;\n\t\t}", "title": "" }, { "docid": "41ebf2d0e86b4ac04e7fa71df95e9b14", "score": "0.58924896", "text": "public function add_fields() { ?>\n <p class=\"form-row form-row-first\">\n <label for=\"username\">\n <?php esc_html_e( 'Username', 'pro' ) ?>\n <span class=\"required\" required=\"required\">*</span>\n </label>\n <input type=\"text\" id=\"username\" name=\"username\" class=\"woocommerce-Input woocommerce-Input--text input-text\" />\n </p>\n <p class=\"form-row form-row-last\">\n <label for=\"company\">\n <?php esc_html_e( 'Company Name', 'pro' ) ?>\n <span class=\"required\" required=\"required\">*</span>\n </label>\n <input type=\"text\" id=\"company\" name=\"company\" class=\"woocommerce-Input woocommerce-Input--text input-text\" />\n </p>\n <p class=\"form-row form-row-wide\">\n <label for=\"website\">\n <?php esc_html_e( 'Website', 'pro' ) ?>\n <span class=\"required\" required=\"required\">*</span>\n </label>\n <input type=\"url\" id=\"website\" name=\"website\" class=\"woocommerce-Input woocommerce-Input--text input-text\" value=\"https://\" />\n </p>\n <div class=\"clear\"></div>\n <?php\n }", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.58910674", "text": "function getFields();", "title": "" }, { "docid": "cb290f5e0fa17b0c739d2eee86ce0ba4", "score": "0.58830047", "text": "public function crud()\n\t{\n\t\t$crud = $this->generate_crud('admin_modules');\n\t\t$crud->columns('id', 'url', 'name', 'class', 'description', 'relation', 'stat_v', 'status');\n\t\t$crud->fields('id', 'url', 'name', 'class', 'description', 'relation', 'stat_v', 'col_order', 'required', 'status');\n\t\t$crud->display_as('stat_v','Visibility');\n\t\t$crud->display_as('relation','Relation ID');\n\t\t$crud->display_as('col_order','Sort Order');\n\t\t$this->mPageTitle = 'Admin Modules';\n\t\t$this->render_crud();\n\t}", "title": "" }, { "docid": "c6ef49716ec2e44b26c999410822c389", "score": "0.58760077", "text": "static function display_panel_fields(){\n register_setting(self::$db_options_name, self::$db_options_name, array(__CLASS__, 'sanitize_settings'));\n\n foreach(self::$items as $section_slug => $values){\n add_settings_section(\n 'settings_section__'.$section_slug,\n $values['section_headline'],\n array(__CLASS__, 'display_setting__headline'),\n self::$db_options_name\n );\n\n foreach($values['fields'] as $field_slug => $options){\n $field_options = array('option_slug' => $field_slug);\n $field_title = (isset($options['title']) && !empty($options['title'])) ? $options['title'] : '';\n $field_types = array('input', 'checkbox', 'radio', 'select', 'dropdown', 'textarea', 'wp_editor');\n $field_type = (isset($options['type']) && in_array($options['type'], $field_types)) ? $options['type'] : 'input';\n\n if(isset($options['options']) && is_array($options['options'])){\n foreach($options['options'] as $key => $value){\n $field_options[$key] = $value;\n }\n }\n\n add_settings_field(\n 'render_setting__'.$field_slug,\n $field_title,\n array(__CLASS__, 'display_setting_field__'.$field_type),\n self::$db_options_name,\n 'settings_section__'.$section_slug,\n $field_options\n );\n }\n }\n }", "title": "" }, { "docid": "2eac0e566165cf49c8ba545634e8e3ca", "score": "0.5875051", "text": "public function fields()\r\n {\r\n return helper\\Config::fields($this->_name);\r\n }", "title": "" }, { "docid": "f23aa28ad143f6507755e2ae7f530d35", "score": "0.5872212", "text": "public function getCMSFields() {\r\n\t\t$fields = parent::getCMSFields();\r\n\t\t$products = DataObject::get( 'Product' )->map( 'ID', 'Name' );\r\n\t\t\r\n\t\t$productsDropDown = new DropDownField( 'ProductID', 'Product', $products );\r\n\t\t$productsDropDown->setEmptyString( 'Select a product' );\r\n\t\t\r\n\t\t$fields->addFieldToTab( 'Root.Content.Main', $productsDropDown, 'Content' );\r\n\t\t$fields->addFieldToTab( 'Root.Content.Main', new TextField( 'OutclickURL', 'Outclick URL'), 'Content' );\r\n\t\t\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "131b9457620ce50dcaee750cbf6996fd", "score": "0.587132", "text": "public function getDealFields()\r\n {\r\n //query\r\n $result = $this->find('all', array('conditions' => array('Custom.module' => 1), 'fields' => array('Custom.id', 'Custom.name', 'Custom.type', 'Custom.module')));\r\n return $result;\r\n }", "title": "" }, { "docid": "4070eceac0feb99604816eed53a63902", "score": "0.58711594", "text": "public function getPackageFields($vars=null) {\r\n Loader::loadHelpers($this, array(\"Form\", \"Html\"));\r\n\r\n $fields = new ModuleFields();\r\n\r\n $row = null;\r\n if (isset($vars->module_group) && $vars->module_group == \"\") {\r\n if (isset($vars->module_row) && $vars->module_row > 0) {\r\n $row = $this->getModuleRow($vars->module_row);\r\n } else {\r\n $rows = $this->getModuleRows();\r\n if (isset($rows[0]))\r\n $row = $rows[0];\r\n unset($rows);\r\n }\r\n } else {\r\n // Fetch the 1st server from the list of servers in the selected group\r\n $rows = $this->getModuleRows($vars->module_group);\r\n\r\n if (isset($rows[0]))\r\n $row = $rows[0];\r\n unset($rows);\r\n }\r\n\r\n\r\n return $fields;\r\n }", "title": "" }, { "docid": "3debe7e66787fed6b4df2e4916ed958b", "score": "0.58686763", "text": "public function fields()\n {\n return [\n Select::make('审核结果', 'submit')->options(\n [\n 1 => '同意',\n -1 => '拒绝',\n ]\n ),\n Select::make('审核意见模板(可选)', 'reason_select')->options(\n self::AUDIT_TEMPLATE\n ),\n Textarea::make('审核意见(可选)', 'reason_text')->withMeta([\n 'extraAttributes' => [\n 'placeholder' => '没有合适的模板试试自定义吧~',\n ],\n ]),\n ];\n }", "title": "" }, { "docid": "921f5b579f2e3c26b83ef54397caeac5", "score": "0.5867152", "text": "public function fields()\n {\n return [\n // 'Url adresa' => Group::fields([\n 'url' => 'name:admin::admin.seoroutes-url|index|disabled|required',\n // 'new_url' => 'name:admin::admin.seoroutes-newurl|index',\n 'group' => 'name:admin::admin.seoroutes-group|index|invisible',\n 'controller' => 'name:Controller|index|invisible',\n // ])->inline(),\n 'Meta tagy' => Group::fields([\n 'title' => 'name:admin::admin.seoroutes-title'.(Admin::isEnabledLocalization() ? '|locale' : ''),\n 'keywords' => 'name:admin::admin.seoroutes-keywords'.(Admin::isEnabledLocalization() ? '|locale' : ''),\n 'description' => 'name:admin::admin.seoroutes-description|type:text|max:400'.(Admin::isEnabledLocalization() ? '|locale' : ''),\n 'canonical_url' => 'name:Kanonická url|url',\n 'image' => 'name:admin::admin.seoroutes-images|image|multiple',\n ]),\n ];\n }", "title": "" }, { "docid": "c26a30db557d35b1dd069e3dbede0789", "score": "0.5865655", "text": "public function fields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f899678ecdbe658484b2dae4bcf43421", "score": "0.5857343", "text": "function theme_ctools_access_admin_add($vars) {\n $rows = array(array(drupal_render_children($vars['form'])));\n $output = '<div class=\"container-inline\">';\n $output .= theme('table', array('rows' => $rows));\n $output .= '</div>';\n return $output;\n}", "title": "" }, { "docid": "cca156a882eb9959e5dc88344f9f3a6b", "score": "0.58565676", "text": "public function setFields()\n {\n $this->crud->addFields([\n [\n 'label' => 'Шаблон страницы',\n 'name' => 'template_id',\n 'type' => 'select',\n 'name' => 'template_id',\n 'entity' => 'pageTemplate',\n 'attribute' => 'name',\n 'model' => PageTemplate::class,\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6 hide',1\n ],\n ],\n [\n 'name' => 'title',\n 'label' => trans('backpack::pagemanager.page_title'),\n 'type' => 'text',\n ],\n [\n 'name' => 'slug',\n 'label' => trans('backpack::pagemanager.page_slug'),\n 'type' => 'text',\n 'hint' => trans('backpack::pagemanager.page_slug_hint'),\n ],\n [\n 'name' => 'description',\n 'label' => 'Мета описание страницы',\n ],\n\n // CONTENT FIELDS\n [\n 'name' => 'content_separator',\n 'type' => 'custom_html',\n 'value' => '<br><h2>'.trans('backpack::pagemanager.content').'</h2><hr>',\n ],\n [\n 'name' => 'content',\n 'label' => trans('backpack::pagemanager.content'),\n 'type' => 'wysiwyg',\n 'placeholder' => trans('backpack::pagemanager.content_placeholder'),\n ],\n\n // SEO FIELDS\n// [\n// 'name' => 'metas_separator',\n// 'type' => 'custom_html',\n// 'value' => '<br><h2>'.trans('backpack::pagemanager.metas').'</h2><hr>',\n// ],\n// [\n// 'name' => 'meta_title',\n// 'label' => trans('backpack::pagemanager.meta_title'),\n// 'fake' => true,\n// 'store_in' => 'extras',\n// ],\n// [\n// 'name' => 'meta_description',\n// 'label' => trans('backpack::pagemanager.meta_description'),\n// 'fake' => true,\n// 'store_in' => 'extras',\n// ],\n// [\n// 'name' => 'meta_keywords',\n// 'type' => 'textarea',\n// 'label' => trans('backpack::pagemanager.meta_keywords'),\n// 'fake' => true,\n// 'store_in' => 'extras',\n// ],\n ]);\n }", "title": "" }, { "docid": "5324c4da7cb084a61b65e314386bbd7e", "score": "0.5852632", "text": "public function getAdminServiceInfo($service, $package) {\n\t\t$row = $this->getModuleRow();\n\n\t\t// Load the view into this object, so helpers can be automatically added to the view\n\t\t$this->view = new View(\"admin_service_info\", \"default\");\n\t\t$this->view->base_uri = $this->base_uri;\n\t\t$this->view->setDefaultView(\"components\" . DS . \"modules\" . DS . \"dsm\" . DS);\n\n\t\t// Load the helpers required for this view\n\t\tLoader::loadHelpers($this, array(\"Form\", \"Html\"));\n\n\t\t$this->view->set(\"module_row\", $row);\n\t\t$this->view->set(\"package\", $package);\n\t\t$this->view->set(\"service\", $service);\n\t\t$this->view->set(\"service_fields\", $this->serviceFieldsToObject($service->fields));\n\n\t\treturn $this->view->fetch();\n\t}", "title": "" }, { "docid": "f6b44bc68a859788825f6ecfe79bc8a6", "score": "0.5847053", "text": "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'name', 'isDefault', 'fields'\n ]\n );\n }", "title": "" }, { "docid": "18f020be195465df5270b8452bca829e", "score": "0.583107", "text": "function getCMSFields(){\r\n\t\t$fields = parent::getCMSFields();\r\n\r\n\t\t$fields->addFieldToTab('Root.Content.Main',new TextField('ItemSingular','Name of single item:'));\r\n\t\t$fields->addFieldToTab('Root.Content.Main',new TextField('ItemPlural','Name of plural items:'));\r\n\r\n\t\t$source = DataObject::get('Member',\"\",\"Surname\");\r\n\r\n\t\tif(ClassInfo::exists('AsmselectField')){\r\n\t\t\t$mods = $this->owner->Moderators();\r\n\t\t\t$msf = new AsmselectField('Moderators','Moderators',$source->map('ID','Name'),$mods->map('ID','ID'));\r\n\r\n\t\t}else{\r\n\t\t\t$msf = new ManyManyComplexTableField(\r\n\t\t\t\t$this,\r\n\t\t\t \"Moderators\",\r\n\t\t\t \"Member\",\r\n\t\t\t array(\r\n\t\t\t \t'FirstName' => 'First Name',\r\n\t\t\t \t'Surname' => 'Surname'\r\n\t\t\t )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t$fields->addFieldToTab('Root.Moderators',$msf);\r\n\r\n\t\t$summaryfields = singleton('ModeratedArticle')->summaryFields();\r\n\r\n\r\n\t\t$filter = \"\\\"ArticleHolderID\\\" = $this->ID\";\r\n\t\t$content = new ComplexTableField($this,'Articles','ModeratedArticle',$summaryfields,'getCMSFieldsForPopup',$filter,'Approved,Title');\r\n\t\t//$content = new TableListField('Articles','ModeratedArticle',null,$filter);\r\n\t\t$fields->addFieldToTab('Root.Content.SubmittedArticles',$content);\r\n\t\t$fields->addFieldToTab('Root.Content.SubmittedArticles',new CheckboxField('AllowExpiry','Include expiry date option'));\r\n\t\t$fields->addFieldToTab('Root.Content.SubmittedArticles',new NumericField('ArticlesPerPage','ArticlesPerPage'));\r\n\r\n\t\t$content->setForm(null);\r\n\t\t$content->setClick_PopupLoad(\"test\");\r\n\t\t//$content->setPermissions(array('edit'));\r\n\t\t//$content->itemClass = 'ModeratedArticleComplexTableField_Item';\r\n\r\n\t\t/*if($content && $name = $this->ItemSingular)\r\n\t\t\t$content->setAddTitle(\"add $name\");*/\r\n\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "c3c8703ed9a248b2378b8a3714e07bfb", "score": "0.5829173", "text": "public function get_fields ()\n {\n do {\n display ( \"Add a field or enter 'n' to continue... ( name:type:mysql type:max length )\\n\" );\n $field = get_input ();\n\n if ($field != 'n') {\n $parts = explode ( \":\", $field );\n\n $this->_fields[] = array ( 'name' => $parts[0],\n 'type' => $parts[1],\n 'mysql_type' => $parts[2],\n 'max_length' => $parts[3] );\n }\n\n } while ( $field != 'n' );\n }", "title": "" }, { "docid": "9e2326325d063f58a825fe1ad958f187", "score": "0.582813", "text": "private function makeAddFields($package, $vars)\n {\n //return \"Sorry this has not been implemented yet. This can be installed via order form will be completed soon.\";\n\n Loader::loadHelpers($this, array(\"Form\", \"Html\"));\n\n // Load the API\n //$row = $this->getModuleRow($package->module_row);\n // $api = $this->api($row);\n\n $fields = new ModuleFields();\n\n\n $fields->setHtml(\"\n\t\t\t<script type=\\\"text/javascript\\\">\n $(document).ready(function() {\n $('#gogetssl_fqdn').change(function() {\n\t\t\t\t\t\tvar form = $(this).closest('form');\n\t\t\t\t\t\t$(form).append('<input type=\\\"hidden\\\" name=\\\"refresh_fields\\\" value=\\\"true\\\">');\n\t\t\t\t\t\t$(form).submit();\n\t\t\t\t\t});\n });\n\t\t\t</script>\n\t\t\");\n\n $gogetssl_fqdn = $fields->label(Language::_(\"GoGetSSLv2.service_field.gogetssl_fqdn\", true), \"gogetssl_fqdn\");\n $gogetssl_fqdn->attach($fields->fieldText(\"gogetssl_fqdn\", $this->Html->ifSet($vars->gogetssl_fqdn), array('id' => \"gogetssl_fqdn\")));\n $fields->setField($gogetssl_fqdn);\n unset($gogetssl_fqdn);\n return $fields;\n\n }", "title": "" }, { "docid": "b2f23130aaa6c713daf8f1e3caffe0a0", "score": "0.58246785", "text": "public function listFields();", "title": "" }, { "docid": "07b97cfc8bf9533f4e7a53f05d94173d", "score": "0.58208114", "text": "public function getModuleFields($module)\n {\n return $this->getDisplayLocationFields('module-' . $module);\n }", "title": "" }, { "docid": "7b2ef3febfb9d252cb577dadccb003d4", "score": "0.5817461", "text": "public function admin_add(){\n $spathSQL= $this->GLOBALS_INI[\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATH_MODEL\"] . \"admin_add.sql\";\n $this->resultat[\"espace_admin_admin_add\"]= $this->oBdd->treatDatas($spathSQL, array(\n \"nom\" => $this->VARS_HTML[\"nom\"], \n \"prenom\" => $this->VARS_HTML[\"prenom\"], \n \"email\" => $this->VARS_HTML[\"email\"],\n \"login_admin\" => $this->VARS_HTML[\"login_admin\"],\n \"mdp\" => $this->VARS_HTML[\"mdp\"]\n ));\n }", "title": "" }, { "docid": "d45bf8cf14e1fd31e1cca857c3adbdfe", "score": "0.58170766", "text": "function get_settings_fields() {\n return adtp_settings_fields();\n }", "title": "" }, { "docid": "564cb4947fcfdd5ee0c91eb45f9f8e06", "score": "0.581701", "text": "function pppt_admin_services_edit() {\r\n\t\t\tinclude('spm_payment_services_edit.php');\r\n\t\t}", "title": "" }, { "docid": "45230a4c08f045f94b0ca25bea4d2875", "score": "0.58157843", "text": "public function getResourceFields() {\n $tplOptions = $this->getTemplateList();\n\n $fields = array(\n 'published' => array('type' => 'boolean'),\n 'template' => array('type' => 'select', 'options' => $tplOptions),\n 'pagetitle' => array('type' => 'text'),\n 'longtitle' => array('type' => 'text'),\n 'description' => array('type' => 'text'),\n 'alias' => array('type' => 'text'),\n 'link_attributes' => array('type' => 'text'),\n 'introtext' => array('type' => 'textarea'),\n 'parent' => array('type' => 'text'),\n 'menutitle' => array('type' => 'text'),\n 'menuindex' => array('type' => 'text'),\n 'hidemenu' => array('type' => 'boolean', 'title' => $this->modx->lexicon('resource_hide_from_menus')),\n );\n\n $list = array();\n foreach ($fields as $name => $details) {\n $details['title'] = (($details['title']) ? $details['title'] : (($this->modx->lexicon->exists($name)) ? $this->modx->lexicon($name) : $this->modx->lexicon('resource_'.$name)));\n $details['name'] = $name;\n $details['value'] = $this->resource->get($name);\n $list[$name] = $this->renderer->render($details['type'],$details);\n }\n $this->setPlaceholder('fields',implode(\"\\n\",$list));\n }", "title": "" }, { "docid": "b27a1caa5705f1c9843e3c9914479e42", "score": "0.58131266", "text": "protected function getConfigFormList()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => (Tools::getIsset('updateaddonpayments_subaccount') && !Tools::getValue('updateaddonpayments_subaccount')) ?\n $this->l('Update a SubAccount') : $this->l('Add a new SubAccounts'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 3,\n 'type' => 'text',\n 'desc' => $this->l('Name for Subaccount (default name Internet)'),\n 'name' => 'ADDONPAYMENTS_SUBACCOUNT_NAME',\n 'label' => $this->l('Subaccount'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('ACTIVE'),\n 'name' => 'dcc_active',\n 'is_bool' => true,\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('SECURE'),\n 'name' => '3d_secured',\n 'is_bool' => true,\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => (Tools::getIsset('updateaddonpayments_subaccount') && !Tools::getValue('updateaddonpayments_subaccount')) ?\n $this->l('Update') : $this->l('Save'),\n ),\n ),\n );\n\n if (Tools::isSubmit('updateaddonpayments_subaccount'))\n {\n $fields_form['form']['input'][] = array('type' => 'hidden', 'name' => 'updateSubaccount');\n $fields_form['form']['input'][] = array('type' => 'hidden', 'name' => 'id_addonpayments_subaccount');\n }\n\n return $fields_form;\n }", "title": "" }, { "docid": "60c2a8c4302412ca9cc9a2d2d2e797d6", "score": "0.58123934", "text": "public function getEditFields(): array\n\t{\n\t\t$fields = [];\n\t\t$widgetsManagementModel = new Settings_WidgetsManagement_Module_Model();\n\t\tif (\\in_array($this->get('linklabel'), $widgetsManagementModel->getWidgetsWithLimit())) {\n\t\t\t$fields['limit'] = ['label' => 'LBL_NUMBER_OF_RECORDS_DISPLAYED', 'purifyType' => \\App\\Purifier::INTEGER];\n\t\t}\n\t\tif (\\in_array($this->get('linklabel'), $widgetsManagementModel->getWidgetsWithDate())) {\n\t\t\t$fields['default_date'] = ['label' => 'LBL_DEFAULT_DATE', 'purifyType' => \\App\\Purifier::STANDARD];\n\t\t}\n\t\tif (\\in_array($this->get('linklabel'), $widgetsManagementModel->getWidgetsWithFilterUsers())) {\n\t\t\t$fields['default_owner'] = ['label' => 'LBL_DEFAULT_FILTER', 'purifyType' => \\App\\Purifier::STANDARD];\n\t\t\t$fields['owners_all'] = ['label' => 'LBL_FILTERS_AVAILABLE', 'purifyType' => \\App\\Purifier::STANDARD];\n\t\t}\n\n\t\treturn $this->editFields + $fields + $this->customFields;\n\t}", "title": "" }, { "docid": "9a9c5346d6acbbf380c311c7f3fe2540", "score": "0.58022726", "text": "public function getEcommerceFieldsForCMS()\n {\n $fields = new CompositeField();\n $memberTitle = new ReadonlyField('MemberTitle', _t('Member.TITLE', 'Name'), '<p>'._t('Member.TITLE', 'Name').': '.$this->owner->getTitle().'</p>');\n $memberTitle->dontEscape = true;\n $fields->push($memberTitle);\n $memberEmail = new ReadonlyField('MemberEmail', _t('Member.EMAIL', 'Email'), '<p>'._t('Member.EMAIL', 'Email').': '.$this->owner->Email.'</p>');\n $memberEmail->dontEscape = true;\n $fields->push($memberEmail);\n $lastLogin = new ReadonlyField('MemberLastLogin', _t('Member.LASTLOGIN', 'Last Login'), '<p>'._t('Member.LASTLOGIN', 'Last Login').': '.$this->owner->dbObject('LastVisited')->Nice().'</p>');\n $lastLogin->dontEscape = true;\n $fields->push($lastLogin);\n $group = self::get_customer_group();\n if (!$group) {\n $group = new Group();\n }\n $linkField = new LiteralField(\n 'MemberLinkField',\n '\n <h3>'._t('Member.EDIT_CUSTOMER', 'Edit Customer').'</h3>\n <ul>\n <li>\n <h3>\n <a href=\"/admin/security/EditForm/field/Members/item/'.$this->owner->ID.'/edit\" data-popup=\"true\" class=\"action ss-ui-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\" role=\"button\" aria-disabled=\"false\">\n <span class=\"ui-button-text\">'._t('Member.EDIT', 'Edit').' <i>'.$this->owner->getTitle().'</i></span>\n </a>\n\n </h3>\n </li>\n <li>\n <h3>\n <a href=\"/admin/security/show/'.$group->ID.'/\" data-popup=\"true\" class=\"action ss-ui-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\" role=\"button\" aria-disabled=\"false\">\n <span class=\"ui-button-text\">'._t('Member.EDIT_ALL_CUSTOMERS', 'Edit All Customers').'</span>\n </a>\n </h3>\n </li>\n </ul>\n '\n );\n\n $fields->push($linkField);\n\n return $fields;\n }", "title": "" }, { "docid": "58e4a94464a7648dc1c1bd9e0724da10", "score": "0.5798058", "text": "public function fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'id' => 'total',\n\t\t\t\t'label' => __( 'Total', 'affiliate-wp' ),\n\t\t\t\t'desc' => __( 'This total will be used to calculate the referral amount. For example, if the referral rate is 10% and the total here is $100, the referral will be created at $10.', 'affiliate-wp' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => true,\n\t\t\t\t'magic' => true,\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "32d961a4ffd3ee7858d35710ccf0679b", "score": "0.57975584", "text": "public function index()\n {\n $this->authorize('additional-fields.index', AdditionalField::class);\n\n return AdditionalFieldResource::collection(AdditionalField::all());\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5787464", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5787464", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5787464", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5787464", "text": "public function getFields();", "title": "" }, { "docid": "c58c06ee0f4b583d7913d38cde6f2646", "score": "0.57777447", "text": "public static function init_fields()\n {\n\n self::$billing_fields = Aplicar_filters('wc_crm_admin_accounts_billing_fields', array(\n 'first_name' => array(\n 'label' => __('Primeiro nome', 'wc_crm'),\n 'show' => false\n ),\n 'last_name' => array(\n 'label' => __('Sobrenome', 'wc_crm'),\n 'show' => false\n ),\n 'company' => array(\n 'label' => __('Empresa', 'wc_crm'),\n 'show' => false\n ),\n 'address_1' => array(\n 'label' => __('Endereço 1', 'wc_crm'),\n 'show' => false\n ),\n 'address_2' => array(\n 'label' => __('Endereço 2', 'wc_crm'),\n 'show' => false\n ),\n 'city' => array(\n 'label' => __('Cidade', 'wc_crm'),\n 'show' => false\n ),\n 'postcode' => array(\n 'label' => __('CEP', 'wc_crm'),\n 'show' => false\n ),\n 'country' => array(\n 'label' => __('País', 'wc_crm'),\n 'show' => false,\n 'class' => 'js_field-country wc-enhanced-select short',\n 'type' => 'select',\n 'options' => array('' => __('Select a country&hellip;', 'woocommerce')) + WC()->countries->get_allowed_countries()\n ),\n 'state' => array(\n 'label' => __('State/County', 'wc_crm'),\n 'class' => 'js_field-state select short',\n 'show' => false\n ),\n 'billing_cpf' => array(\n 'label' => __('CPF', 'wc_crm'),\n 'show' => false\n ),\n 'billing_cnpj' => array(\n 'label' => __('CNPJ', 'wc_crm'),\n 'show' => false\n )));\n\n self::$shipping_fields = Aplicar_filters('wc_crm_admin_accounts_shipping_fields', array(\n 'first_name' => array(\n 'label' => __('Primeiro nome', 'wc_crm'),\n 'show' => false\n ),\n 'last_name' => array(\n 'label' => __('Sobrenome', 'wc_crm'),\n 'show' => false\n ),\n 'company' => array(\n 'label' => __('Empresa', 'wc_crm'),\n 'show' => false\n ),\n 'address_1' => array(\n 'label' => __('Endereço 1', 'wc_crm'),\n 'show' => false\n ),\n 'address_2' => array(\n 'label' => __('Endereço 2', 'wc_crm'),\n 'show' => false\n ),\n 'city' => array(\n 'label' => __('Cidade', 'wc_crm'),\n 'show' => false\n ),\n 'postcode' => array(\n 'label' => __('CEP', 'wc_crm'),\n 'show' => false\n ),\n 'country' => array(\n 'label' => __('País', 'wc_crm'),\n 'show' => false,\n 'type' => 'select',\n 'class' => 'js_field-country wc-enhanced-select short',\n 'options' => array('' => __('Select a country&hellip;', 'woocommerce')) + WC()->countries->get_allowed_countries()\n ),\n 'state' => array(\n 'label' => __('Estado/País', 'wc_crm'),\n 'class' => 'js_field-state select short',\n 'show' => false\n ),\n ));\n\n self::$general_fields = Aplicar_filters('wc_crm_admin_accounts_general_fields', array(\n 'phone' => array(\n 'label' => __('Telefone', 'wc_crm'),\n 'show' => false\n ),\n 'fax' => array(\n 'label' => __('Fax', 'wc_crm'),\n 'show' => false\n ),\n 'website' => array(\n 'label' => __('Website', 'wc_crm'),\n 'show' => false\n ),\n 'ticker_symbol' => array(\n 'label' => __('Símbolo do ticker', 'wc_crm'),\n 'show' => false\n ),\n 'account_type' => array(\n 'label' => __('tipo de conta', 'wc_crm'),\n 'show' => false,\n 'type' => 'select',\n 'class' => 'wc-enhanced-select form-field-wide',\n 'options' => wc_crm_get_account_types()\n ),\n 'ownership' => array(\n 'label' => __('Propriedade', 'wc_crm'),\n 'show' => false,\n 'type' => 'select',\n 'class' => 'wc-enhanced-select',\n 'options' => wc_crm_get_account_ownerships()\n ),\n 'industry' => array(\n 'label' => __('Indústria', 'wc_crm'),\n 'show' => false,\n 'type' => 'select',\n 'class' => 'wc-enhanced-select',\n 'custom_attributes' => array(\n 'data-allow_clear' => true,\n 'data-placeholder' => __('Select an Industry', 'wc_crm'),\n ),\n 'options' => array(\"\" => \"\") + wc_crm_get_industries()\n ),\n 'employees' => array(\n 'label' => __('Funcionários', 'wc_crm'),\n 'show' => false,\n 'type' => 'number',\n 'custom_attributes' => array(\n 'step' => 1,\n 'min' => 0,\n ),\n ),\n 'annual_revenue' => array(\n 'label' => __('Receita anual', 'wc_crm'),\n 'show' => false,\n 'type' => 'number',\n 'custom_attributes' => array(\n 'step' => '0.01',\n 'min' => 0,\n ),\n ),\n 'sic_code' => array(\n 'label' => __('Código SIC', 'wc_crm'),\n 'show' => false,\n 'type' => 'number',\n 'custom_attributes' => array(\n 'step' => '0.01',\n 'min' => 0,\n ),\n ),\n ));\n }", "title": "" }, { "docid": "0c0e3183c00bec9243d3d7578d70dcaf", "score": "0.577164", "text": "public function getAdminServiceInfo($service, $package) {\r\n return \"\";\r\n }", "title": "" }, { "docid": "b0771aa14edec8b27c260892d8b6f792", "score": "0.577062", "text": "public function getAdminEditFields($package, $vars=null) {\r\n return new ModuleFields();\r\n }", "title": "" }, { "docid": "3c5056a6f622bbe7843c7bb7cd11ebc8", "score": "0.57684314", "text": "public function getAdminServiceInfo($service, $package)\n {\n return '';\n }", "title": "" }, { "docid": "2b4772084eb81a1ea01c662483ba83b8", "score": "0.5761853", "text": "public function get_all(){ \n\t\treturn $this->call('GET', '/admin/metafields.json', array()); \n\t}", "title": "" }, { "docid": "471835c88be9fb5023d9a76271f09f55", "score": "0.57614315", "text": "function pdc_include_fields() {\n\t\t\n\t\t// field groups\n\t\tif( !empty($this->temp_groups) ) {\n\t\t\t\n\t\t\t// loop\n\t\t\tforeach( $this->temp_groups as $i => $temp ) {\n\t\t\t\t\n\t\t\t\t// add\n\t\t\t\t$this->add_field_group($temp);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// unset\n\t\t\t\tunset($this->temp_groups[ $i ]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// fields\n\t\tif( !empty($this->temp_fields) ) {\n\t\t\t\n\t\t\t// prepare\n\t\t\t$this->temp_fields = pdc_prepare_fields_for_import( $this->temp_fields );\n\t\t\t\n\t\t\t\n\t\t\t// loop\n\t\t\tforeach( $this->temp_fields as $i => $temp ) {\n\t\t\t\t\n\t\t\t\t// add\n\t\t\t\t$this->add_field($temp);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// unset\n\t\t\t\tunset($this->temp_fields[ $i ]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "daf1740a1065e6c313e9b85ac5ac3bde", "score": "0.57594216", "text": "function content_fields_list() {\n $fields = content_fields();\n $field_types = _content_field_types();\n\n // Sort fields by field name.\n ksort($fields);\n\n $header = array(t('Field name'), t('Field type'), t('Used in'));\n $rows = array();\n foreach ($fields as $field) {\n $row = array();\n $row[] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field['field_name'])) : $field['field_name'];\n $row[] = t($field_types[$field['type']]['label']);\n\n $types = array();\n $result = db_query(\"SELECT nt.name, nt.type FROM {\". content_instance_tablename() .\"} nfi \".\n \"LEFT JOIN {node_type} nt ON nt.type = nfi.type_name \".\n \"WHERE nfi.field_name = '%s' \".\n // Keep disabled modules out of table.\n \"AND nfi.widget_active = 1 \".\n \"ORDER BY nt.name ASC\", $field['field_name']);\n while ($type = db_fetch_array($result)) {\n $content_type = content_types($type['type']);\n $types[] = l($type['name'], 'admin/content/node-type/'. $content_type['url_str'] .'/fields');\n }\n $row[] = implode(', ', $types);\n\n $rows[] = array('data' => $row, 'class' => $field['locked'] ? 'menu-disabled' : '');\n }\n if (empty($rows)) {\n $output = t('No fields have been defined for any content type yet.');\n }\n else {\n $output = theme('table', $header, $rows);\n }\n return $output;\n}", "title": "" }, { "docid": "ef8742be2455aa073d5f7399479e46dc", "score": "0.57583517", "text": "public function addFields()\n {\n // therefore won't work to register multiple sections.\n // add_action( 'admin_init', [$this, 'setupFields'] );\n\n // Let's try with a closure!\n add_action( 'admin_init', function() {\n foreach ($this->fieldArgs as $sectionID => $fieldsArray) {\n\n foreach ($fieldsArray as $key => $field) {\n if (! $this->isFieldTypeValid($field)) {\n return;\n }\n $args = [\n 'option' => $field['option_name'] ?? NULL,\n 'type' => $field['type'] ?? NULL,\n 'name' => $field['name'] ?? NULL,\n 'desc' => $field['desc'] ?? NULL,\n 'placeholder' => $field['placeholder'] ?? NULL,\n 'title' => $field['title'] ?? NULL,\n 'multi_options' => $field['multi_options'] ?? NULL\n ];\n add_settings_field(\n $args['name'],\n $args['title'],\n [ $this, 'fieldCallback' . ucfirst($args['type']) ],\n $this->pageSlug,\n $sectionID,\n $args\n );\n }\n }\n });\n }", "title": "" }, { "docid": "1e6a2c322955dea299af52b43e00991f", "score": "0.5755436", "text": "public function fields()\n {\n $words = [\n 'Flight',\n 'Applicant',\n 'Cancel',\n 'Category',\n 'Create',\n 'Dashboard',\n 'Delete',\n 'Description',\n 'Edit',\n 'Email',\n 'General',\n 'Hired',\n 'Job',\n 'Kanban',\n 'Language',\n 'Location',\n 'Logout',\n 'Name',\n 'Other',\n 'Password',\n 'Permission',\n 'Phone',\n 'Process',\n 'Rejected',\n 'Resource',\n 'Resume',\n 'Role',\n 'Run',\n 'Salary',\n 'Save',\n 'Search',\n 'Setting',\n 'Status',\n 'Title',\n 'Type',\n 'Update',\n 'User',\n ];\n\n $miscellaneous = [\n 'Add Another',\n 'Continue Editing',\n 'Cover Letter',\n 'Delete Confirmation Message',\n 'Delete Resource',\n 'Expire At',\n 'Hiring Process',\n 'List View',\n 'New Applicant',\n 'No Record',\n 'Update Process',\n 'Visit Site',\n ];\n\n return [\n 'Single Words' => [\n 'fields' => collect($words)->map(function($value) {\n return Text::make($value, $this->model->language . '.word.' . Str::slug(strtolower($value), '_'))\n ->value(option($this->model->language . '.word.' . Str::slug(strtolower($value), '_')));\n })\n ],\n\n 'Miscellaneous' => [\n 'fields' => collect($miscellaneous)->map(function($value) {\n return Text::make($value, $this->model->language . '.misc.' . Str::slug(strtolower($value), '_'))\n ->value(option($this->model->language . '.misc.' . Str::slug(strtolower($value), '_')));\n })\n ],\n ];\n }", "title": "" }, { "docid": "a5723310cc122ea2ce96aa29e82a8cfc", "score": "0.57481796", "text": "function display_add() {\n $this->_addform->display();\n }", "title": "" }, { "docid": "849e0b3b3b1fc7bd37515577e6f52e1d", "score": "0.5738486", "text": "public function fields()\n {\n return [\n Select::make('is_published')->options([\n 1 => 'Publié',\n 0 => 'Non publié'\n ])\n ];\n }", "title": "" }, { "docid": "307a51b713a599d88ab34e41adbe10dc", "score": "0.5732067", "text": "public function getFields(){ return $this->all(); }", "title": "" }, { "docid": "da371a3ed1807b73f8786a5f87147eb9", "score": "0.5729167", "text": "static function getLineItemFieldModules() {\n\t\treturn array('Invoice', 'Quotes', 'PurchaseOrder', 'SalesOrder', 'Products', 'Services');\n\t}", "title": "" }, { "docid": "a75cc05613be41bebabb05a5f964e0b5", "score": "0.5728375", "text": "public function getAllField_infoclient() {\n\n\t\t$rs = Capsule::select(\"SELECT * FROM $this->tablename\");\t\t\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "700b3629aeb991864f8cc05aa96869a0", "score": "0.57235885", "text": "public function init_form_fields()\n {\n $log_file = 'yellow-' . sanitize_file_name( wp_hash( 'yellow' ) ) . '-log';\n $logs_href = get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wc-status&tab=logs&log_file=' . $log_file;\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __('Enable/Disable', 'Yellow'),\n 'type' => 'checkbox',\n 'label' => __('Enable Bitcoin Payments via Yellow', 'Yellow'),\n 'default' => 'yes',\n ),\n 'api_key' => array(\n 'type' => 'api_key',\n 'title' => __('API Key', 'Yellow'),\n ),\n 'api_secret' => array(\n 'title' => __('API Secret', 'Yellow'),\n 'type' => 'api_secret',\n 'type' => 'password',\n ),\n 'debug' => array(\n 'title' => __('Debug Log', 'Yellow'),\n 'type' => 'checkbox',\n 'label' => sprintf(__('Enable logging <a href=\"%s\" class=\"button\">View Logs</a>', 'Yellow'), $logs_href),\n 'default' => 'no',\n 'description' => sprintf(__('Log Yellow events, such as IPN requests, inside <code>%s</code>', 'Yellow'), wc_get_log_file_path('Yellow')),\n 'desc_tip' => true,\n ),\n );\n }", "title": "" }, { "docid": "d7243e2be008c2c25a1aa67d8a46501c", "score": "0.5723423", "text": "public function fields()\n {\n return [\n Select::make('Status')\n ->options([\n 'PREPARING' => 'Preparing',\n 'TRANSFERRING' => 'Transferring',\n 'RECEIVED' => 'Received',\n 'CANCELED' => 'Cancel'\n ])\n ];\n }", "title": "" }, { "docid": "4c01bd4ffbe6e5a43f8165f3206749c0", "score": "0.5719024", "text": "public static function fields()\n {\n return [];\n }", "title": "" }, { "docid": "a5a890879079aed8d6580657b4541cfb", "score": "0.57160723", "text": "public function editFields(): array\n {\n return $this->fields();\n }", "title": "" }, { "docid": "902ce71fc6a1fdce478d6cc081984783", "score": "0.57159", "text": "public function getAdminEditFields($package, $vars=null) {\n\t\t// Same as adding\n\t\treturn $this->getAdminAddFields($package, $vars);\n\t}", "title": "" }, { "docid": "142521e658f5ac7bde853fc3c3145eb3", "score": "0.5714136", "text": "function listFields()\n {\n return $this->_impl->listFields();\n }", "title": "" } ]
11838a2184e7a37cefbb4427e33e886d
Generate the test data, which is basically a DB dump with data only, and commit it to SVN repo
[ { "docid": "9868e9e0d7dc1b1f13c8bf03e9744374", "score": "0.84003353", "text": "private function generateTestData()\n {\n $this->sql_engine->generateTestData(CodePax_DbVersioning_Files_Manager::getTestDataFile());\n // commit the new test data\n if (defined('SVN_USER') || VERSIONING === 'SVN') {\n $svn_wrapper = new CodePax_Scm_Svn(SCM_USER, SCM_PASS, REPO_URL, PROJECT_DIR);\n $svn_wrapper->commit(\"Codepax generated test data file\", DB_VERSIONING_DIR);\n } else if (VERSIONING === 'GIT') {\n $git_wrapper = new CodePax_Scm_Git(SCM_USER, SCM_PASS, REPO_URL, PROJECT_DIR);\n $git_wrapper->addAndCommit(\"Codepax generated test data file\", DB_VERSIONING_DIR);\n $git_wrapper->push();\n \n }\n }", "title": "" } ]
[ { "docid": "1b9d16b65ee3fa6cc62cbf4f1e179956", "score": "0.67522347", "text": "public function createTestingDump()\n {\n $sql = SqlBase::create();\n $dbSpec = $sql->getDbSpec();\n $dbUrl = $dbSpec['driver'].'://'.$dbSpec['username'].':'.$dbSpec['password'].'@'.$dbSpec['host'].':'.$dbSpec['port'].'/'.$dbSpec['database'];\n\n $this->process(['php', 'core/scripts/db-tools.php', 'dump-database-d8-mysql', '--database-url', $dbUrl], $this->drupalRootDirectory());\n }", "title": "" }, { "docid": "9a42b58e9bfebe4e4cb4c9000d9293cb", "score": "0.66028786", "text": "public function test_dump_sakila_data()\n {\n /*\n $db_name = 'sakila';\n foreach((array)self::utils()->list_tables($db_name) as $table) {\n $file = __DIR__.'/fixtures/'.$table.'.data.php';\n if (file_exists($file)) {\n continue;\n }\n $data = self::db()->get_all('SELECT * FROM '.$db_name.'.'.$table);\n if (empty($data)) {\n continue;\n }\n echo 'Saved data ('.count((array)$data).'): '.$file. PHP_EOL;\n file_put_contents($file, '<?'.'php'.PHP_EOL.'return '._var_export($data, 1).';');\n }\n */\n }", "title": "" }, { "docid": "dd47ccfa2bce395b70405c81b01d660e", "score": "0.63016164", "text": "private function applyTestData()\n {\n // load and apply the test data\n $test_data_path = CodePax_DbVersioning_Files_Manager::getTestDataFile();\n $this->sql_engine->loadTestData($test_data_path);\n }", "title": "" }, { "docid": "2a3d812f6be39638379c5061117f7003", "score": "0.6270018", "text": "public function testBuildSqlFiles()\n {\n $this->assertFileExists(\"$this->build_path/SQL/structure.sql\");\n $this->assertFileExists(\"$this->build_path/SQL/initial_data.sql\");\n }", "title": "" }, { "docid": "9c127f041d50a3fd453d31cae2e96be2", "score": "0.6238435", "text": "public function actionGenerateFromDb(): int\n {\n $db = Yii::$app->db;\n $dataFolder = Yii::getAlias('@app/tests/fixtures/data');\n $fixtureFolder = Yii::getAlias('@app/tests/fixtures');\n\n foreach ($db->schema->tableNames as $table) {\n $tableClassName = Inflector::camelize($table);\n $quotedTable = '{{%'.str_replace(Yii::$app->db->tablePrefix, '', $table).'}}';\n $rows = VarDumper::export((new Query)->select(['*'])->from($table)->all());\n $output = \"<?php\\n\\nreturn {$rows};\\n\";\n $depends = [];\n\n file_put_contents(\"$dataFolder/$table.php\", $output);\n foreach ($db->getTableSchema($table, true)->foreignKeys as $key => $data) {\n if ($data[0] !== $table) {\n $depends[] = ' '.Inflector::camelize($data[0]).'Fixture::class,';\n }\n }\n\n if (count($depends) > 0) {\n $depends = \"\\n\".implode(\"\\n\", array_unique($depends)).\"\\n \";\n } else {\n $depends = '';\n }\n\n file_put_contents(\"$fixtureFolder/{$tableClassName}Fixture.php\", <<<PHP\n<?php\n\ndeclare(strict_types = 1);\n\nnamespace app\\\\tests\\\\fixtures;\n\n/**\n * @category Project\n * @package {{package}}\n * @author George Cadwallader <[email protected]>\n * @copyright 2020\n */\nclass {$tableClassName}Fixture extends \\\\yii\\\\test\\\\ActiveFixture\n{\n\n /**\n * The table for the fixture\n *\n * @var string\n */\n public \\$tableName = '$quotedTable';\n\n /**\n * The fixtures that this fixture depends on. This must be a list of the\n * dependent fixture class names\n *\n * @var array .\n */\n public \\$depends = [$depends];\n\n}\n\nPHP\n);\n }\n\n return ExitCode::OK;\n }", "title": "" }, { "docid": "4c950e0f914ba064dc73ab3dd2743624", "score": "0.61795187", "text": "protected function setupTestDbData()\n {\n $db = Yii::$app->getDb();\n\n // Structure :\n\n $table = 'BalanceAccount';\n $columns = [\n 'id' => 'pk',\n 'userId' => 'integer',\n 'balance' => 'integer DEFAULT 0',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $table = 'BalanceTransaction';\n $columns = [\n 'id' => 'pk',\n 'date' => 'integer',\n 'accountId' => 'integer',\n 'amount' => 'integer',\n 'data' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n }", "title": "" }, { "docid": "e34f412403db3f75bcf3ab9f91e58afb", "score": "0.6155846", "text": "public function setup()\n {\n copy(dirname(__FILE__).'/../fixtures/project/data/fresh_test_db.sqlite', dirname(__FILE__).'/../fixtures/project/data/test.sqlite');\n }", "title": "" }, { "docid": "7c8ba67dc3d5fd3c758c6a6a71572f7e", "score": "0.614443", "text": "protected function setupTestDbData()\n {\n $db = Yii::$app->getDb();\n\n // Structure :\n\n $table = 'Item';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'number' => 'integer',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $db->createCommand()->batchInsert($table, ['name', 'number'], [\n ['first', 1],\n ['second', 2],\n ['third', 3],\n ])->execute();\n }", "title": "" }, { "docid": "81d26992d405779562c4785ce6dbeb37", "score": "0.5971637", "text": "public function setUp()\n\t{\n// TRUNCATE TABLE `groups`;\n// TRUNCATE TABLE `group_admins`;\n// TRUNCATE TABLE `group_history`;\n// TRUNCATE TABLE `group_messages`;\n// TRUNCATE TABLE `group_messages_data`;\n// TRUNCATE TABLE `group_settings`;\n// TRUNCATE TABLE `private_messages`;\n// TRUNCATE TABLE `private_messages_data`;\n// TRUNCATE TABLE `users`;\n// TRUNCATE TABLE `user_history`;\");\n// \t\tpc($st->execute(), $st);\n\t}", "title": "" }, { "docid": "3f7239a439597b53f9d0548cfd2eaf2f", "score": "0.5961134", "text": "protected function setUp(): void\n {\n Helper::removeDirectory(TESTS_TMP_PATH);\n Helper::createDirectory(TESTS_TMP_PATH);\n Helper::createDirectory(TESTS_REPO_PATH_1);\n\n Helper::initEmptySvnRepository(TESTS_REPO_PATH_1);\n\n for ($i = 0; $i < 5; $i++) {\n $file = sprintf('file_%d.txt', $i);\n $path = TESTS_REPO_PATH_1.'/'.$file;\n file_put_contents($path, sprintf('File %d', $i));\n Helper::executeSvn(TESTS_REPO_PATH_1, sprintf('add %s',\n escapeshellarg($file)\n ));\n }\n Helper::executeSvn(TESTS_REPO_PATH_1, sprintf('commit --message=%s',\n escapeshellarg('Initial commit')\n ));\n\n clearstatcache();\n }", "title": "" }, { "docid": "072ee6c278e1a1013117b9e35118f4ae", "score": "0.59536093", "text": "public function DownloadDBContentTest()\n\t{\n $this->database->DownloadDBTest();\n\t}", "title": "" }, { "docid": "46f911c07475ccf3e58bc61d22e7806b", "score": "0.5937387", "text": "function saveDatabase() {\n $this->checkTestInstance();\n\t// get date in the default format, with spaces replaced\n\t$datetime = str_replace(' ', '_', \n\t date($this->DhairDateTime->getDefaultFormat()));\n\n\t$filename = WWW_ROOT . self::DB_SNAPSHOT_DIR . '/' .\n\t self::SNAPSHOT_PREFIX . \".$datetime.sql\";\n\n exec('mysqldump -u ' . self::DB_USER . \" -p{$this->testPassword} \" .\n TEST_DB_NAME . \" > $filename\");\n $this->redirect($this->referer());\n }", "title": "" }, { "docid": "bbb3e2bed84efebd8c3a50b44bbeb23c", "score": "0.58389413", "text": "private function loadTestData(): void\n {\n $testSources = RandomGeoSource::DEV_SOURCES;\n\n foreach (array_keys($testSources) as $countryName) {\n\n $country = new Country();\n $country->setName($countryName);\n $this->manager->persist($country);\n\n foreach (array_keys($testSources[$countryName]) as $sourceState) {\n\n $state = new State();\n $state->setName($sourceState);\n $state->setCountry($country);\n $this->manager->persist($state);\n\n foreach ($testSources[$countryName][$sourceState] as $sourceCounty => $sourceTaxRate) {\n\n $county = new County();\n $county->setName($sourceCounty);\n $county->setState($state);\n $county->setTaxRate(floatval($sourceTaxRate));\n $this->manager->persist($county);\n\n }\n }\n }\n\n $this->manager->flush();\n\n $counties = $this->countyRepository->findAll();\n\n foreach ($counties as $county) {\n $stepIncome = 100;\n\n for ($count = 0; $count < 3; $count++) {\n\n $income = new Income();\n $income->setCounty($county);\n $stepIncome += $stepIncome;\n $income->setAmount(floatval($stepIncome));\n $this->manager->persist($income);\n\n }\n }\n\n $this->manager->flush();\n }", "title": "" }, { "docid": "1a730179997022bfdbb7e6162d782c4d", "score": "0.5829881", "text": "private function publishTestCases()\n {\n $testsPath = config('app-generator.path.tests', base_path('tests/'));\n $this->fillAndCreateFile('tests.api_test_trait', $testsPath, 'ApiTestTrait.php');\n\n $testAPIsPath = config('app-generator.path.api_tests', base_path('tests/APIs/'));\n if (!file_exists($testAPIsPath)) {\n FileUtil::createDirectoryIfNotExist($testAPIsPath);\n $this->info('APIs Tests directory created');\n }\n\n $testRepositoriesPath = config('app-generator.path.repository_test', base_path('tests/Repositories/'));\n if (!file_exists($testRepositoriesPath)) {\n FileUtil::createDirectoryIfNotExist($testRepositoriesPath);\n $this->info('Repositories Tests directory created');\n }\n }", "title": "" }, { "docid": "35cef1efbce887c636bca056f987dc7d", "score": "0.58208257", "text": "public function run()\n {\n if (config('app.env') === 'production') {\n $this->command->info('------------------------------------------------------------------------!');\n $this->command->info(' ERROR: Cannot create test data in PRODUCTION Environment !');\n $this->command->info('------------------------------------------------------------------------!');\n return;\n }\n\n Memory::dump_usage(true);\n ini_set(\"memory_limit\",\"512M\");\n\n $this->command->info('------------------------------------------------------------------------!');\n $this->command->info(' Start: Seeding CoRA Version 1.1.0 Data !');\n $this->command->info('------------------------------------------------------------------------!');\n\n // Call protected functions in class, that are relevant for this release.\n $this->createTestUsers();\n\n $this->command->info('------------------------------------------------------------------------!');\n $this->command->info(' End: Seeding CoRA Version 1.1.0 Data !');\n $this->command->info('------------------------------------------------------------------------!');\n\n Memory::dump_usage(true);\n }", "title": "" }, { "docid": "409cb82d609c7029a836fb7b5fd6645e", "score": "0.5811754", "text": "private function setupTestConfig() {\n\t\t$replace=array(\n\t\t\t\"'/src/'\"=>\"'/wordpress/'\",\n\t\t\t\"youremptytestdbnamehere\"=>$this->dbName,\n\t\t\t\"yourusernamehere\"=>$this->dbUser,\n\t\t\t\"yourpasswordhere\"=>$this->dbPass,\n\t\t);\n\n\t\t$contents=file_get_contents($this->getTestDir().\"/wp-tests-config-sample.php\");\n\t\tif (!$contents)\n\t\t\tthrow new Exception(\"Unable to load tests config sample\");\n\n\t\tforeach ($replace as $key=>$val)\n\t\t\t$contents=str_replace($key,$val,$contents);\n\n\t\t$res=file_put_contents($this->getTestDir().\"/wp-tests-config.php\",$contents);\n\t\tif (!$contents)\n\t\t\tthrow new Exception(\"Unable to save tests config\");\n\t}", "title": "" }, { "docid": "456d5ba357d4446c193647241888bbdc", "score": "0.5804882", "text": "function writeTestFiles()\n {\n $testCount=0;\n @mkdir($this->dirpath.\"/tests\");\n\n // function related tests\n foreach ($this->functions as $function) {\n $function->writeTest($this);\n }\n\n // class method related tests\n foreach ($this->classes as $class) {\n $class->writeTests($this);\n }\n\n // custom test cases (may overwrite custom function test cases)\n foreach ($this->testcases as $test) {\n $test->writeTest($this);\n }\n\n if (0 == count(glob($this->dirpath.\"/tests/*.phpt\"))) {\n rmdir($this->dirpath.\"/tests\");\n }\n }", "title": "" }, { "docid": "f6ca5f0175d527e014497349fc034499", "score": "0.57867646", "text": "protected function populateSqliteDb()\n {\n\n $sql = explode(';', file_get_contents($this->fixturesDir . '/small-source.sql'));\n\n foreach ($sql as $command) {\n if (trim($command)) {\n $this->sourceConnection->exec($command);\n }\n }\n }", "title": "" }, { "docid": "f4658cbbee44e149b5cf7583c7f85a4c", "score": "0.57507575", "text": "public function setUp() {\r\n // Set up SQLite in memory\r\n ORM::set_db(new PDO('sqlite::memory:'));\r\n\r\n // Create schemas and populate with data\r\n ORM::get_db()->exec(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '..'.DIRECTORY_SEPARATOR.'models.sql'));\r\n\r\n // Enable logging\r\n ORM::configure('logging', true);\r\n }", "title": "" }, { "docid": "60814858e24bc6e41687392dc6f2f0fd", "score": "0.57186794", "text": "public function testExecuteEverything()\n {\n $path = APP;\n $testsPath = ROOT . 'tests' . DS;\n $templatesPath = ROOT . 'templates' . DS;\n\n $this->generatedFiles = [\n $templatesPath . 'Products/add.php',\n $templatesPath . 'Products/edit.php',\n $templatesPath . 'Products/index.php',\n $templatesPath . 'Products/view.php',\n $path . 'Controller/ProductsController.php',\n $path . 'Model/Table/ProductsTable.php',\n $path . 'Model/Entity/Product.php',\n $testsPath . 'Fixture/ProductsFixture.php',\n $testsPath . 'TestCase/Model/Table/ProductsTableTest.php',\n $testsPath . 'TestCase/Controller/ProductsControllerTest.php',\n\n $templatesPath . 'ProductVersions/add.php',\n $templatesPath . 'ProductVersions/edit.php',\n $templatesPath . 'ProductVersions/index.php',\n $templatesPath . 'ProductVersions/view.php',\n $path . 'Controller/ProductVersionsController.php',\n $path . 'Model/Table/ProductVersionsTable.php',\n $path . 'Model/Entity/ProductVersion.php',\n $testsPath . 'Fixture/ProductVersionsFixture.php',\n $testsPath . 'TestCase/Model/Table/ProductVersionsTableTest.php',\n $testsPath . 'TestCase/Controller/ProductVersionsControllerTest.php',\n ];\n $this->exec('bake all --connection test --everything', ['y']);\n\n $this->assertExitCode(CommandInterface::CODE_SUCCESS);\n $this->assertFilesExist($this->generatedFiles);\n $this->assertOutputContains('Bake All complete');\n }", "title": "" }, { "docid": "e2dca943946cb382d914c30155b2e4af", "score": "0.57155496", "text": "public function testCreateuserTableInTestDatabase()\n {\n /** SAMPLE, HOW TO LOAD TESTDATA INTO DATABASE */\n //$this->initDatabase(__DIR__ . '/Fixures', 'fos_user.sql');\n }", "title": "" }, { "docid": "a6fbe0ce3f51210cc6859bc8f9fe0e4d", "score": "0.5711307", "text": "public function setUp() {\n\t\t$this->_db->dropSchema('galleries');\n\t\t$schema = new Schema($this->_schema);\n\t\t$this->_db->createSchema('galleries', $schema);\n\t\tforeach ($this->_mockData as $entry) {\n\t\t\t$sql = \"INSERT INTO galleries (name) VALUES ('\" . $entry[1] . \"')\";\n\t\t\t$this->_db->read($sql, ['return' => 'resource']);\n\t\t}\n\t}", "title": "" }, { "docid": "7bb69c5bdb188bb34d81a42582e82de5", "score": "0.5700514", "text": "protected function setUp() {\n $this -> setDbDump( dirname(__FILE__) . '/_files/setup.sql' );\n parent::setUp ();\n }", "title": "" }, { "docid": "7bb69c5bdb188bb34d81a42582e82de5", "score": "0.5700514", "text": "protected function setUp() {\n $this -> setDbDump( dirname(__FILE__) . '/_files/setup.sql' );\n parent::setUp ();\n }", "title": "" }, { "docid": "38d40a430c8d61d3bc1575b0fdf0052b", "score": "0.5666117", "text": "public function runScripts($_generate_test_data = false)\n {\n $operation_stack = array('drop_recreate_db', 'apply_baseline', 'run_change_scripts',\n 'load_test_data', 'run_data_change_scripts');\n\n // inject the test data saving operation at the beginning of the stack\n if (isset($_generate_test_data) && $_generate_test_data === true) {\n array_unshift($operation_stack, 'save_test_data');\n }\n\n // set some time and memory boundaries so that\n // the script will finish execution\n set_time_limit(0);\n ini_set('memory_limit', '256M');\n\n // execute operations\n foreach ($operation_stack as $operation) {\n try {\n switch ($operation) {\n case 'save_test_data':\n $this->generateTestData();\n break;\n case 'drop_recreate_db':\n $this->dropAndRecreateDb();\n break;\n case 'apply_baseline':\n $this->applyBaseline();\n break;\n case 'run_change_scripts':\n $change_scripts = $this->getChangeScripts();\n $this->runChangeScripts($change_scripts);\n break;\n case 'load_test_data':\n $this->applyTestData();\n break;\n case 'run_data_change_scripts':\n $data_change_scripts = $this->getDataChangeScripts();\n $this->runDataChangeScripts($data_change_scripts);\n break;\n }\n $this->results[$operation] = 'ok';\n } catch (CodePax_DbVersioning_Exception $dbv_e) {\n // when one operation fails, we stop the process\n $this->results[$operation] = $dbv_e->getMessage();\n return $this->results;\n }\n }\n\n return $this->results;\n }", "title": "" }, { "docid": "2837b3e9ff6301fc09473f98af2c234b", "score": "0.5659012", "text": "private function populateTestDB()\n {\n echo \"Begin populating DB with test data\\n\";\n\n $vendorNameLength = 10;\n $vendorsAmount = 10000;\n $schedulesAmount = 7 * $vendorsAmount;\n $specialDaysAmount = 5 * $vendorsAmount;\n\n echo \"Populating vendors\\n\";\n $sql = \"INSERT INTO vendor(name) VALUES\";\n for ($i = 0; $i < $vendorsAmount; $i++) {\n $randomString = substr(str_shuffle(implode('', range('a', 'z'))), 0, $vendorNameLength);\n $sql .= \"('$randomString'),\";\n }\n\n $sql = substr_replace($sql, '', -1);\n DBManager::query($sql);\n\n\n echo \"Populating schedules\\n\";\n $sql = \"INSERT INTO vendor_schedule(vendor_id, weekday, all_day, start_hour, stop_hour) VALUES\";\n for ($i = 1; $i < $schedulesAmount; $i++) {\n $vendorId = mt_rand(1, $vendorsAmount);\n $allDay = mt_rand(0, 1);\n $weekday = mt_rand(1, 7);\n\n if ($allDay) {\n $startHourString = $stopHourString = 'null';\n } else {\n $startHour = mt_rand(0, 19);\n $startHourString = \"'\" . $startHour . \":\" . str_pad(mt_rand(0, 59), 2, '0', STR_PAD_LEFT) . \"'\";\n $stopHourString = \"'\" . ($startHour + 4) . \":\" . str_pad(mt_rand(0, 59), 2, '0', STR_PAD_LEFT) . \"'\";\n }\n\n $sql .= \"($vendorId, $weekday, $allDay, $startHourString, $stopHourString),\";\n }\n $sql = substr_replace($sql, '', -1);\n DBManager::query($sql);\n\n\n echo \"Populating special days\\n\";\n $sql = \"INSERT INTO vendor_special_day(vendor_id, special_date, event_type, all_day, start_hour, stop_hour) VALUES \";\n for ($i = 0; $i < $specialDaysAmount; $i++) {\n $openClosed = [\"'opened'\", \"'closed'\"];\n $vendorId = mt_rand(1, $vendorsAmount);\n $eventType = $openClosed[mt_rand(0, 1)];\n $specialDate = \"'2015-12-\" . mt_rand(21, 27) . \"'\";\n $allDay = mt_rand(0, 1);\n if ($allDay) {\n $startHourString = $stopHourString = 'null';\n } else {\n $startHour = mt_rand(0, 19);\n $startHourString = \"'\" . $startHour . \":\" . str_pad(mt_rand(0, 59), 2, '0', STR_PAD_LEFT) . \"'\";\n $stopHourString = \"'\" . ($startHour + 4) . \":\" . str_pad(mt_rand(0, 59), 2, '0', STR_PAD_LEFT) . \"'\";\n }\n\n $sql .= \"($vendorId, $specialDate, $eventType, $allDay, $startHourString, $stopHourString),\";\n }\n $sql = substr_replace($sql, '', -1);\n DBManager::query($sql);\n\n echo \"DB populated\\n\";\n }", "title": "" }, { "docid": "637748fad3fa0d90ccd7397ac5ae06a2", "score": "0.56552833", "text": "public function testExecute()\n {\n $path = APP;\n $testsPath = ROOT . 'tests' . DS;\n $templatesPath = ROOT . 'templates' . DS;\n\n $this->generatedFiles = [\n $templatesPath . 'Products/add.php',\n $templatesPath . 'Products/edit.php',\n $templatesPath . 'Products/index.php',\n $templatesPath . 'Products/view.php',\n $path . 'Controller/ProductsController.php',\n $path . 'Model/Table/ProductsTable.php',\n $path . 'Model/Entity/Product.php',\n $testsPath . 'Fixture/ProductsFixture.php',\n $testsPath . 'TestCase/Model/Table/ProductsTableTest.php',\n $testsPath . 'TestCase/Controller/ProductsControllerTest.php',\n ];\n $this->exec('bake all --connection test Products', ['y']);\n\n $this->assertExitCode(CommandInterface::CODE_SUCCESS);\n $this->assertFilesExist($this->generatedFiles);\n $this->assertOutputContains('Bake All complete');\n }", "title": "" }, { "docid": "cca3cecb89aa4ab087c00a0bf097bd6c", "score": "0.5647858", "text": "public function setUp(): void\n {\n $this->db_adapter->begin();\n\n $this->db_adapter->execute(\"\n CREATE SCHEMA exodus_tmp;\n \");\n }", "title": "" }, { "docid": "c7cac29a9f308325345d14433c9b4cd3", "score": "0.5637249", "text": "public function run()\n {\n DB::table('books')->delete();\n $count_books = 25;\n $count_users = 20;\n $genre = ['Fantasy', 'Comedy', 'Love'];\n $faker = Faker::create();\n\n //First record for TestCase\n DB::table('books')->insert([\n 'title' => 'The Lord of the Rings',\n 'author' => 'Tolkien',\n 'year' => 1954,\n 'genre' => $genre[0],\n 'user_id' => 0,\n ]);\n\n foreach (range(2,$count_books) as $index) {\n DB::table('books')->insert([\n 'title' => $faker->word,\n 'author' => $faker->name,\n 'year' => $faker->year,\n 'genre' => $genre[random_int(0,2)],\n 'user_id' => random_int(0,$count_users),\n ]);\n }\n }", "title": "" }, { "docid": "230404734243eca9d686f77bb9b25b7f", "score": "0.5628208", "text": "public function runDatabaseMigrations()\n\t{\n\t\t$tmp_sql_dump_file = base_path('tests/tmp/dump.sql');\n\n\t\t$db_user = config('database.connections.mysql.username');\n\t\t$db_pass = config('database.connections.mysql.password');\n\t\t$db_name = config('database.connections.mysql.database');\n\t\t$db_name_test = 'minted_test';\n\n\n\n\t\t// drop all table in minted_test\n\t\tsystem('mysql -u ' . $db_user . ' -p' . $db_pass . ' -e \"drop database '.$db_name_test.'\"');\n\t\tpassthru('mysql -u ' . $db_user . ' -p' . $db_pass . ' -e \"create database '.$db_name_test.'\"');\n\n\t\t// make dump from production db\n\t\texec('mysqldump -u ' . $db_user . ' -p' . $db_pass . ' ' . $db_name . ' > ' . $tmp_sql_dump_file);\n\n\t\t// import dump to test db\n\t\texec('mysql -u ' . $db_user . ' -p' . $db_pass . ' ' . $db_name_test . ' < ' . $tmp_sql_dump_file);\n\n\t\t// remove dump file\n\t\t@unlink($tmp_sql_dump_file);\n\n\n\t\t$this->beforeApplicationDestroyed(function () {\n\n\t\t});\n\t}", "title": "" }, { "docid": "ae4f8f2b6dfb7a5037696b928c6d25aa", "score": "0.56241095", "text": "public function run() {\n // $this->call(UsersTableSeeder::class);\n\n /*\n * Test envdata values\n */\n\n $envData = new EnvData();\n $envData->timestamp = '2010-09-11 23:16:00';\n $envData->coord_x = -8.22875976562;\n $envData->coord_y = 41.2399291992;\n $envData->co = 1.21389;\n $envData->no2 = 1.59365;\n $envData->proc_no2 = 4.605;\n $envData->o3 = 367.23;\n $envData->proc_o3 = 4.605;\n $envData->save();\n\n $envData = new EnvData();\n $envData->timestamp = '2010-09-11 23:18:00';\n $envData->coord_x = -8.22875976562;\n $envData->coord_y = 41.2399291992;\n $envData->co = 1.31389;\n $envData->no2 = 1.49365;\n $envData->proc_no2 = 4.205;\n $envData->o3 = 367.15;\n $envData->proc_o3 = 4.305;\n $envData->save();\n\n }", "title": "" }, { "docid": "150d83e75183bb6c8e5a7114b9ede683", "score": "0.5615281", "text": "public function setUp()\n\t{\n\t\t$this->executeSqlFile(dirname(__FILE__) . '/db_setup.sql');\n\t}", "title": "" }, { "docid": "f192e848daa202c2135d8a5d90817cca", "score": "0.5608417", "text": "public function setUp()\n {\n // Initialize test entries.\n $this->_testentries = array();\n foreach ($this->_testdata as $dn => $attrs) {\n $entry = Horde_Ldap_Entry::createFresh($dn, $attrs);\n $this->assertInstanceOf('Horde_Ldap_Entry', $entry);\n array_push($this->_testentries, $entry);\n }\n\n // Create outfile if not exists and enforce proper access rights.\n if (!file_exists($this->_outfile)) {\n if (!touch($this->_outfile)) {\n $this->markTestSkipped('Unable to create ' . $this->_outfile);\n }\n }\n if (!chmod($this->_outfile, 0644)) {\n $this->markTestSkipped('Unable to chmod(0644) ' . $this->_outfile);\n }\n }", "title": "" }, { "docid": "86980aac83337fd975968d88dcaaa415", "score": "0.56037545", "text": "protected function setUp(): void\n {\n try {\n $this->pdo = new PDO('sqlite:' . __DIR__ . '/../../fixtures/test.sqlite');\n $this->migrate = new Migrate($this->pdo);\n\n // just in case - tear down the database (the scripts must have drop table if exists)\n call_user_func($this->migrate, new ConsoleOutput(), 'reset');\n\n // creates the structure\n call_user_func($this->migrate, new ConsoleOutput());\n } catch (PDOException $exception) {\n die($exception);\n }\n\n parent::setUp();\n }", "title": "" }, { "docid": "2e33d04898de76333d85ee8f7a21cb90", "score": "0.55778354", "text": "private function phpDump($package)\r\n {\r\n global $wpdb;\r\n\r\n $wpdb->query(\"SET session wait_timeout = \".DUPLICATOR_DB_MAX_TIME);\r\n if (($handle = fopen($this->tempDbPath, 'w+')) == false) {\r\n DUP_Log::error('[PHP DUMP] ERROR Can\\'t open sbStorePath \"'.$this->tempDbPath.'\"', Dup_ErrorBehavior::ThrowException);\r\n }\r\n $tables = $wpdb->get_col(\"SHOW FULL TABLES WHERE Table_Type != 'VIEW'\");\r\n\r\n $filterTables = isset($this->FilterTables) ? explode(',', $this->FilterTables) : null;\r\n $tblAllCount = count($tables);\r\n //$tblFilterOn = ($this->FilterOn) ? 'ON' : 'OFF';\r\n $qryLimit = DUP_Settings::Get('package_phpdump_qrylimit');\r\n\r\n if (is_array($filterTables) && $this->FilterOn) {\r\n foreach ($tables as $key => $val) {\r\n if (in_array($tables[$key], $filterTables)) {\r\n unset($tables[$key]);\r\n }\r\n }\r\n }\r\n $tblCreateCount = count($tables);\r\n $tblFilterCount = $tblAllCount - $tblCreateCount;\r\n\r\n DUP_Log::Info(\"TABLES: total:{$tblAllCount} | filtered:{$tblFilterCount} | create:{$tblCreateCount}\");\r\n DUP_Log::Info(\"FILTERED: [{$this->FilterTables}]\");\r\n\r\n //Added 'NO_AUTO_VALUE_ON_ZERO' at plugin version 1.2.12 to fix :\r\n //**ERROR** database error write 'Invalid default value for for older mysql versions\r\n $sql_header = \"/* DUPLICATOR-LITE (PHP BUILD MODE) MYSQL SCRIPT CREATED ON : \".@date(\"Y-m-d H:i:s\").\" */\\n\\n\";\r\n $sql_header .= \"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\\n\\n\";\r\n $sql_header .= \"SET FOREIGN_KEY_CHECKS = 0;\\n\\n\";\r\n fwrite($handle, $sql_header);\r\n\r\n //BUILD CREATES:\r\n //All creates must be created before inserts do to foreign key constraints\r\n foreach ($tables as $table) {\r\n $rewrite_table_as = $this->rewriteTableNameAs($table);\r\n $create = $wpdb->get_row(\"SHOW CREATE TABLE `{$table}`\", ARRAY_N);\r\n $count = 1;\r\n $create_table_query = str_replace($table, $rewrite_table_as, $create[1], $count);\r\n @fwrite($handle, \"{$create_table_query};\\n\\n\");\r\n }\r\n\r\n $procedures = $wpdb->get_col(\"SHOW PROCEDURE STATUS WHERE `Db` = '{$wpdb->dbname}'\", 1);\r\n if (count($procedures)) {\r\n foreach ($procedures as $procedure) {\r\n @fwrite($handle, \"DELIMITER ;;\\n\");\r\n $create = $wpdb->get_row(\"SHOW CREATE PROCEDURE `{$procedure}`\", ARRAY_N);\r\n @fwrite($handle, \"{$create[2]} ;;\\n\");\r\n @fwrite($handle, \"DELIMITER ;\\n\\n\");\r\n }\r\n }\r\n\r\n $views = $wpdb->get_col(\"SHOW FULL TABLES WHERE Table_Type = 'VIEW'\");\r\n if (count($views)) {\r\n foreach ($views as $view) {\r\n $create = $wpdb->get_row(\"SHOW CREATE VIEW `{$view}`\", ARRAY_N);\r\n @fwrite($handle, \"{$create[1]};\\n\\n\");\r\n }\r\n }\r\n\r\n $table_count = count($tables);\r\n $table_number = 0;\r\n\r\n //BUILD INSERTS:\r\n //Create Insert in 100 row increments to better handle memory\r\n foreach ($tables as $table) {\r\n\r\n $table_number++;\r\n if ($table_number % 2 == 0) {\r\n $this->Package->Status = DupLiteSnapLibUtil::getWorkPercent(DUP_PackageStatus::DBSTART, DUP_PackageStatus::DBDONE, $table_count, $table_number);\r\n $this->Package->update();\r\n }\r\n\r\n $row_count = $wpdb->get_var(\"SELECT Count(*) FROM `{$table}`\");\r\n $rewrite_table_as = $this->rewriteTableNameAs($table);\r\n\r\n $this->Package->Database->info->tableWiseRowCounts[$rewrite_table_as] = $row_count;\r\n\r\n if ($row_count > $qryLimit) {\r\n $row_count = ceil($row_count / $qryLimit);\r\n } else if ($row_count > 0) {\r\n $row_count = 1;\r\n }\r\n\r\n if ($row_count >= 1) {\r\n fwrite($handle, \"\\n/* INSERT TABLE DATA: {$table} */\\n\");\r\n }\r\n\r\n for ($i = 0; $i < $row_count; $i++) {\r\n $sql = \"\";\r\n $limit = $i * $qryLimit;\r\n $query = \"SELECT * FROM `{$table}` LIMIT {$limit}, {$qryLimit}\";\r\n $rows = $wpdb->get_results($query, ARRAY_A);\r\n\r\n $select_last_error = $wpdb->last_error;\r\n if ('' !== $select_last_error) {\r\n $fix = esc_html__('Please contact your DataBase administrator to fix the error.', 'duplicator');\r\n $errorMessage = $select_last_error.' '.$fix.'.';\r\n $package->BuildProgress->set_failed($errorMessage);\r\n $package->BuildProgress->failed = true;\r\n $package->failed = true;\r\n $package->Status = DUP_PackageStatus::ERROR;\r\n $package->Update();\r\n DUP_Log::error($select_last_error, $fix, Dup_ErrorBehavior::ThrowException);\r\n return;\r\n }\r\n\r\n if (is_array($rows)) {\r\n foreach ($rows as $row) {\r\n $sql .= \"INSERT INTO `{$rewrite_table_as}` VALUES(\";\r\n $num_values = count($row);\r\n $num_counter = 1;\r\n foreach ($row as $value) {\r\n if (is_null($value) || !isset($value)) {\r\n ($num_values == $num_counter) ? $sql .= 'NULL' : $sql .= 'NULL, ';\r\n } else {\r\n ($num_values == $num_counter) ? $sql .= '\"'.DUP_DB::escSQL($value, true).'\"' : $sql .= '\"'.DUP_DB::escSQL($value, true).'\", ';\r\n }\r\n $num_counter++;\r\n }\r\n $sql .= \");\\n\";\r\n }\r\n fwrite($handle, $sql);\r\n }\r\n }\r\n\r\n //Flush buffer if enabled\r\n if ($this->networkFlush) {\r\n DUP_Util::fcgiFlush();\r\n }\r\n $sql = null;\r\n $rows = null;\r\n }\r\n\r\n $sql_footer = \"\\nSET FOREIGN_KEY_CHECKS = 1; \\n\\n\";\r\n $sql_footer .= \"/* Duplicator WordPress Timestamp: \".date(\"Y-m-d H:i:s\").\"*/\\n\";\r\n $sql_footer .= \"/* \".DUPLICATOR_DB_EOF_MARKER.\" */\\n\";\r\n fwrite($handle, $sql_footer);\r\n $wpdb->flush();\r\n fclose($handle);\r\n }", "title": "" }, { "docid": "c145a69a50c80107f3625d28255f3bec", "score": "0.55681795", "text": "function tearDown() {\n\t\t//$this->database->commit();\n\t\t\n\t\t// Rollback any changes made during testing.\n\t\t$this->database->rollBack();\n\t}", "title": "" }, { "docid": "8927ffdb3648f2a7bb8a282f608cdefd", "score": "0.55228746", "text": "protected function rebuildDatabase() {\r\n $conn = static::$kernel->getContainer()->get('doctrine.dbal.default_connection');\r\n\r\n $dbPath = $conn->getDatabase();\r\n static::$fixturesPath = $dbPath . static::$fixturesSuffix;\r\n\r\n if (! file_exists(static::$fixturesPath)) {\r\n // create fresh database (schema and fixtures)\r\n static::runConsole('doctrine:database:create', array(\r\n '-n' => true\r\n ));\r\n static::runConsole('doctrine:schema:drop', array(\r\n '--force' => true\r\n ));\r\n static::runConsole('doctrine:schema:create', array());\r\n static::runConsole('doctrine:fixtures:load', array(\r\n '-n' => true\r\n ));\r\n\r\n // copy fresh database to be reused in the future\r\n copy($dbPath, static::$fixturesPath);\r\n } else {\r\n // copy fixtures database to doctrine location\r\n copy(static::$fixturesPath, $dbPath);\r\n }\r\n }", "title": "" }, { "docid": "51205cdf08f8e3e56d7eac5820095e5f", "score": "0.55190825", "text": "public function run()\n {\n DB::table('write_tests')->insert([\n 'test_id' => 1,\n 'question' => '2 + 2は何?',\n 'question_number' => 3,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }", "title": "" }, { "docid": "a85711b0bb75c2dd6d1cfc0cefd80385", "score": "0.551883", "text": "function installTestDB() {\n\n\t\t//inspect($testDB->getDBinstaller());\n\t}", "title": "" }, { "docid": "d028bb711da503c3fd6f89164cc9b37a", "score": "0.5500962", "text": "public function testData()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "7561168233d44648eb448344772505ec", "score": "0.54938877", "text": "public function setUp() {\r\n $this->resetInstance();\r\n $this->CI->load->library(\"my_database\");\r\n\r\n $conn = $this->CI->my_database->conn;\r\n $conn->autocommit(FALSE);\r\n $ok = true;\r\n\r\n $conn->query(\"INSERT INTO korisnik(IDKorisnik,KIme,Lozinka)VALUES(999,'KorisnikTest','lozinkaTest');\") ? null : $ok = false;\r\n $conn->query(\"INSERT INTO restoran(IDRestoran,KIme,Lozinka)VALUES(999,'RestoranTest','lozinkaTest');\") ? null : $ok = false;\r\n $conn->query(\"INSERT INTO sto(IDSto,IDRestoranFK,BrojOsoba)VALUES(999,999,2)\") ? null : $ok = false;\r\n $conn->query(\"INSERT INTO rezervacija(IDRezervacija,IDStoFK,IDKorisnikFK,Status) VALUES(999,999,999,'Nadolazeca')\") ? null : $ok = false;\r\n $conn->query(\"INSERT INTO rezervacija(IDRezervacija,IDStoFK,IDKorisnikFK,Status) VALUES(998,999,999,'Nadolazeca')\") ? null : $ok = false;\r\n\r\n if ($ok == false) {\r\n $conn->rollback();\r\n\r\n print('********Pokusajte ponovo,doslo je do konflikta sa test podacima********');\r\n $this->markTestSkipped('Nema da moze bree');\r\n } else {\r\n $conn->commit();\r\n }\r\n\r\n $conn->autocommit(TRUE);\r\n }", "title": "" }, { "docid": "455a07d40d247dc6202cadd77c2c4c98", "score": "0.54849356", "text": "public function prepareDBForFixtures()\n {\n // refresh DB structure\n if (self::$firstCallFlag === true) {\n shell_exec(\"bin/doctrine orm:schema-tool:drop --force; \"\n . \"bin/doctrine orm:schema-tool:update --force;\");\n }\n else {\n $this->query->truncateDatabase();\n }\n\n parent::setUp();\n self::$firstCallFlag = false;\n }", "title": "" }, { "docid": "e032f3d556f59e6816f8049c4ce2d043", "score": "0.5472991", "text": "protected function setUp()\n {\n parent::setUp();\n $myDB = oxDb::getDB();\n $myConfig = $this->getConfig();\n\n $sShopId = $myConfig->getBaseShopId();\n $sVal = '&amp;&test1, 10!P!10__@@test2, 10!P!10__@@test3, 10!P!10__@@';\n\n $sQ = 'insert into oxselectlist (oxid, oxshopid, oxtitle, oxident, oxvaldesc) values (\"oxsellisttest\", \"' . $sShopId . '\", \"oxsellisttest\", \"oxsellisttest\", \"' . $sVal . '\")';\n\n $this->addToDatabase($sQ, 'oxselectlist');\n\n $sQ = 'insert into oxobject2selectlist (OXID,OXOBJECTID,OXSELNID,OXSORT) values (\"oxsellisttest\", \"oxsellisttest\", \"oxsellisttest\", 1) ';\n $myDB->Execute($sQ);\n }", "title": "" }, { "docid": "c124a833342c18362ce05bffe272048d", "score": "0.54612213", "text": "public static function regenerate_test_tables() {\n\n $sql_test_table_students = <<<SQL_TABLE_STUDENTS\n -- phpMyAdmin SQL Dump\n -- version 4.9.7\n -- https://www.phpmyadmin.net/\n --\n -- Host: localhost\n -- Generation Time: Jul 18, 2021 at 01:33 AM\n -- Server version: 10.2.38-MariaDB-log\n -- PHP Version: 7.4.20\n\n SET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\n SET AUTOCOMMIT = 0;\n START TRANSACTION;\n SET time_zone = \"+00:00\";\n\n\n /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n /*!40101 SET NAMES utf8mb4 */;\n\n --\n -- Database: `yupao_COMP3340A5`\n --\n\n -- --------------------------------------------------------\n\n --\n -- Table structure for table `table_students`\n --\n\n CREATE TABLE `table_students` (\n `student_id` int(32) NOT NULL,\n `student_firstname` varchar(21) COLLATE utf8_unicode_ci NOT NULL,\n `student_lastname` varchar(21) COLLATE utf8_unicode_ci NOT NULL,\n `student_email` varchar(55) COLLATE utf8_unicode_ci NOT NULL\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\n --\n -- Dumping data for table `table_students`\n --\n\n INSERT INTO `table_students` (`student_id`, `student_firstname`, `student_lastname`, `student_email`) VALUES\n (142, 'Jeff', 'Bezos', '[email protected]'),\n (147, 'Tim', 'Cook', '[email protected]'),\n (164, 'Satya', 'Nadella', '[email protected]'),\n (165, 'Bill', 'Gates', '[email protected]'),\n (166, 'Jack', 'Ma', '[email protected]'),\n (168, 'Tony', 'Robbins', '[email protected]'),\n (172, 'Elon', 'Musk', '[email protected]'),\n (177, 'Mark', 'Zuckerberg', '[email protected]'),\n (178, 'Warren', 'Buffet', '[email protected]'),\n (179, 'Masayoshi', 'Son', '[email protected]'),\n (180, 'Jack', 'Dorsey', '[email protected]');\n\n --\n -- Indexes for dumped tables\n --\n\n --\n -- Indexes for table `table_students`\n --\n ALTER TABLE `table_students`\n ADD PRIMARY KEY (`student_id`);\n\n --\n -- AUTO_INCREMENT for dumped tables\n --\n\n --\n -- AUTO_INCREMENT for table `table_students`\n --\n ALTER TABLE `table_students`\n MODIFY `student_id` int(32) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=181;\n COMMIT;\n\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n\n SQL_TABLE_STUDENTS;\n\n $sql_test_table_timeslots = <<<SQL_TABLE_TIMESLOTS\n -- phpMyAdmin SQL Dump\n -- version 4.9.7\n -- https://www.phpmyadmin.net/\n --\n -- Host: localhost\n -- Generation Time: Jul 18, 2021 at 01:34 AM\n -- Server version: 10.2.38-MariaDB-log\n -- PHP Version: 7.4.20\n\n SET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\n SET AUTOCOMMIT = 0;\n START TRANSACTION;\n SET time_zone = \"+00:00\";\n\n\n /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n /*!40101 SET NAMES utf8mb4 */;\n\n --\n -- Database: `yupao_COMP3340A5`\n --\n\n -- --------------------------------------------------------\n\n --\n -- Table structure for table `table_timeslots`\n --\n\n CREATE TABLE `table_timeslots` (\n `timeslot_id` varchar(13) COLLATE utf8_unicode_ci NOT NULL,\n `timeslot_day` varchar(13) COLLATE utf8_unicode_ci NOT NULL,\n `timeslot_start` varchar(21) COLLATE utf8_unicode_ci NOT NULL,\n `timeslot_end` varchar(21) COLLATE utf8_unicode_ci NOT NULL,\n `timeslot_reserved_id` int(64) DEFAULT NULL\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\n --\n -- Dumping data for table `table_timeslots`\n --\n\n INSERT INTO `table_timeslots` (`timeslot_id`, `timeslot_day`, `timeslot_start`, `timeslot_end`, `timeslot_reserved_id`) VALUES\n ('FRI1', 'Friday', '08:30 AM', '09:30 AM', 147),\n ('FRI2', 'Friday', '09:30 AM', '10:30 AM', NULL),\n ('FRI3', 'Friday', '10:30 AM', '11:30 AM', NULL),\n ('FRI4', 'Friday', '11:30 AM', '12:30 PM', NULL),\n ('FRI5', 'Friday', '12:30 PM', '01:30 PM', NULL),\n ('FRI6', 'Friday', '01:30 PM', '02:30 PM', NULL),\n ('FRI7', 'Friday', '02:30 PM', '03:30 PM', NULL),\n ('FRI8', 'Friday', '03:30 PM', '04:30 PM', NULL),\n ('FRI9', 'Friday', '04:30 PM', '05:30 PM', 168),\n ('MON1', 'Monday', '08:30 AM', '09:30 AM', NULL),\n ('MON2', 'Monday', '09:30 AM', '10:30 AM', 142),\n ('MON3', 'Monday', '10:30 AM', '11:30 AM', NULL),\n ('MON4', 'Monday', '11:30 AM', '12:30 PM', NULL),\n ('MON5', 'Monday', '12:30 PM', '01:30 PM', NULL),\n ('MON6', 'Monday', '01:30 PM', '02:30 PM', NULL),\n ('MON7', 'Monday', '02:30 PM', '03:30 PM', NULL),\n ('MON8', 'Monday', '03:30 PM', '04:30 PM', NULL),\n ('MON9', 'Monday', '04:30 PM', '05:30 PM', NULL),\n ('THU1', 'Thursday', '08:30 AM', '09:30 AM', NULL),\n ('THU2', 'Thursday', '09:30 AM', '10:30 AM', NULL),\n ('THU3', 'Thursday', '10:30 AM', '11:30 AM', 165),\n ('THU4', 'Thursday', '11:30 AM', '12:30 PM', NULL),\n ('THU5', 'Thursday', '12:30 PM', '01:30 PM', NULL),\n ('THU6', 'Thursday', '01:30 PM', '02:30 PM', NULL),\n ('THU7', 'Thursday', '02:30 PM', '03:30 PM', NULL),\n ('THU8', 'Thursday', '03:30 PM', '04:30 PM', NULL),\n ('THU9', 'Thursday', '04:30 PM', '05:30 PM', NULL),\n ('TUE1', 'Tuesday', '08:30 AM', '09:30 AM', 164),\n ('TUE2', 'Tuesday', '09:30 AM', '10:30 AM', NULL),\n ('TUE3', 'Tuesday', '10:30 AM', '11:30 AM', NULL),\n ('TUE4', 'Tuesday', '11:30 AM', '12:30 PM', NULL),\n ('TUE5', 'Tuesday', '12:30 PM', '01:30 PM', 172),\n ('TUE6', 'Tuesday', '01:30 PM', '02:30 PM', NULL),\n ('TUE7', 'Tuesday', '02:30 PM', '03:30 PM', NULL),\n ('TUE8', 'Tuesday', '03:30 PM', '04:30 PM', NULL),\n ('TUE9', 'Tuesday', '04:30 PM', '05:30 PM', 166),\n ('WED1', 'Wednesday', '08:30 AM', '09:30 AM', NULL),\n ('WED2', 'Wednesday', '09:30 AM', '10:30 AM', NULL),\n ('WED3', 'Wednesday', '10:30 AM', '11:30 AM', NULL),\n ('WED4', 'Wednesday', '11:30 AM', '12:30 PM', NULL),\n ('WED5', 'Wednesday', '12:30 PM', '01:30 PM', NULL),\n ('WED6', 'Wednesday', '01:30 PM', '02:30 PM', NULL),\n ('WED7', 'Wednesday', '02:30 PM', '03:30 PM', NULL),\n ('WED8', 'Wednesday', '03:30 PM', '04:30 PM', NULL),\n ('WED9', 'Wednesday', '04:30 PM', '05:30 PM', NULL);\n\n --\n -- Indexes for dumped tables\n --\n\n --\n -- Indexes for table `table_timeslots`\n --\n ALTER TABLE `table_timeslots`\n ADD PRIMARY KEY (`timeslot_id`);\n COMMIT;\n\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n\n SQL_TABLE_TIMESLOTS;\n\n if (self::table_does_not_exist(\"table_students\")) {\n self::set($sql_test_table_students);\n }\n\n if (self::table_does_not_exist(\"table_timeslots\")) {\n self::set($sql_test_table_timeslots);\n }\n }", "title": "" }, { "docid": "437bcf7b61bf4c03c4c85d0231b03418", "score": "0.54579365", "text": "protected function setUp()\n {\n self::deleteOutputDir();\n mkdir(self::$outputDir);\n }", "title": "" }, { "docid": "7a2d3678c9c6d186040bc8212af3375b", "score": "0.5452363", "text": "public function setUp()\n {\n $c = new ConnectionManager();\n $c->registerInstance();\n\n ConnectionManager::instance()->registerConnection('default', [\n 'driver' => 'pdo_sqlite',\n 'path' => __DIR__.'/../tests.db',\n ]);\n\n // Clear the database and create our test tables:\n $this->conn = ConnectionManager::instance()->connection('default');\n $this->conn->query('DROP TABLE IF EXISTS users');\n $this->conn->query('DROP TABLE IF EXISTS orders');\n\n $this->conn->query('\n CREATE TABLE `users` (\n `id` INTEGER PRIMARY KEY,\n `name` varchar(32) NOT NULL\n );\n ');\n\n $this->conn->query('\n CREATE TABLE `orders` (\n `id` INTEGER PRIMARY KEY,\n `user_id` INTEGER,\n `total` FLOAT\n );\n ');\n }", "title": "" }, { "docid": "4a4d75e90e1a379802d4be6ae1b14e06", "score": "0.5452096", "text": "protected function setUp() {\n\t\tob_start ();\n\t\t$this->object = new sql ( false, \"TESTS sql\" );\n\t}", "title": "" }, { "docid": "b32993ff5a3d6fbb03cef0d76f203458", "score": "0.5445369", "text": "protected function setUp(): void\n {\n $tempDir = tempnam(sys_get_temp_dir(), '');\n if (file_exists($tempDir)) {\n unlink($tempDir);\n }\n mkdir($tempDir);\n chdir($tempDir);\n exec('unzip ' . __DIR__ . '/HgRepo.zip');\n exec('hg update');\n $this->testDir = $tempDir;\n }", "title": "" }, { "docid": "7592ec0642f3d861ece82e51c0d0a587", "score": "0.54087275", "text": "public static function main() {\n require_once \"PHPUnit2/TextUI/TestRunner.php\";\n\n $suite = new PHPUnit2_Framework_TestSuite(\"DBTest\");\n $result = PHPUnit2_TextUI_TestRunner::run($suite);\n }", "title": "" }, { "docid": "c33dbf529384f90d94b6171291e8121d", "score": "0.5406733", "text": "protected function runTestMigrations()\n {\n if ( Schema::hasTable( 'fruits' ) ) {\n return;\n }\n\n Schema::create( 'fruits', function ( Blueprint $table ) {\n $table->increments( 'id' );\n $table->string( 'name' );\n $table->integer( 'price' );\n } );\n }", "title": "" }, { "docid": "25ca7d56e13222e8db59512f587490d0", "score": "0.54004735", "text": "private function prepareForTests()\n {\n Artisan::call('migrate', array('--package' => 'machuga/authority-l4'));\n Artisan::call('migrate', array('--workbench' => 'lukaswhite/laravel-cms'));\n Artisan::call('migrate'); \n Artisan::call('db:seed');\n Mail::pretend(true);\n }", "title": "" }, { "docid": "a9513e1a807243fd41962f7797c485f0", "score": "0.53906053", "text": "public function runBare() {\n if (!$this->connection) {\n // only initialize the schema once per test directory in a run\n if (!self::$allConnections) self::$allConnections = array();\n\n $dir = $this->working_directory();\n if (isset(self::$allConnections[$dir])) {\n $this->connection = self::$allConnections[$dir];\n } else {\n $this->connection = $this->connection();\n $this->init_schema($this->connection);\n self::$allConnections[$dir] = $this->connection;\n }\n }\n \n $this->load_fixtures($this->connection);\n \n parent::runBare();\n }", "title": "" }, { "docid": "af7ec56e22f022dd6cbc54dfa051e77b", "score": "0.5389049", "text": "protected function setUp(): void\n {\n $this->adapter = \\SolubleTestFactories::getDbAdapter();\n $select = new \\Zend\\Db\\Sql\\Select();\n $select->from('product_brand');\n\n $this->source = new SqlSource($this->adapter, $select);\n\n $this->xmlWriter = new SimpleXmlWriter();\n $this->xmlWriter->setStore(new FlexStore($this->source));\n }", "title": "" }, { "docid": "dbb5edf963a0a7de9422349273c76417", "score": "0.53845805", "text": "protected function setUp()\n {\n parent::setUp();\n\n $this->data = require __DIR__ . '/fixtures/data.php';\n }", "title": "" }, { "docid": "b8d649b0f6fd5254fe240bf7a01c9438", "score": "0.5378159", "text": "public function testDataSchemasCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "7c69c91464bf74498e8cd520023ad1a7", "score": "0.5368742", "text": "function testFullInstall()\n\t{\n\n\t\t// Cleanup old install\n\t\t$tables=$GLOBALS['SITE_DB']->query('SHOW TABLES FROM test');\n\t\tforeach ($tables as $table)\n\t\t{\n\t\t\tif (substr($table['Tables_in_test'],0,14)=='ocp_unit_test_')\n\t\t\t{\n\t\t\t\t$GLOBALS['SITE_DB']->query('DROP TABLE test.'.$table['Tables_in_test']);\n\t\t\t}\n\t\t}\n\n\t\tfor ($i=0;$i<2;$i++) // 1st trial is clean DB, 2nd trial is dirty DB\n\t\t{\n\t\t\trename(get_file_base().'/info.php',get_file_base().'/info.php.bak'); // TODO: _config.php in v10\n\n\t\t\t$settings=array(\n\t\t\t 'default_lang'=>'EN',\n\t\t\t 'db_type'=>get_db_type(),\n\t\t\t 'forum_type'=>'ocf',\n\t\t\t 'board_path'=>get_file_base().'/forums',\n\t\t\t 'domain'=>'localhost',\n\t\t\t 'base_url'=>get_base_url(),\n\t\t\t 'table_prefix'=>'ocp_unit_test_',\n\t\t\t 'admin_password'=>'',\n\t\t\t 'admin_password_confirm'=>'',\n\t\t\t 'allow_reports_default'=>'1',\n\t\t\t 'admin_username'=>'admin',\n\t\t\t 'ocf_admin_password'=>'',\n\t\t\t 'ocf_admin_password_confirm'=>'',\n\t\t\t 'clear_existing_forums_on_install'=>'yes',\n\t\t\t 'db_site'=>'test',\n\t\t\t 'db_site_host'=>'127.0.0.1',\n\t\t\t 'db_site_user'=>'root',\n\t\t\t 'db_site_password'=>'',\n\t\t\t 'user_cookie'=>'ocp_member_id',\n\t\t\t 'pass_cookie'=>'ocp_member_hash',\n\t\t\t 'cookie_domain'=>'',\n\t\t\t 'cookie_path'=>'/',\n\t\t\t 'cookie_days'=>'120',\n\t\t\t 'db_forums'=>'test',\n\t\t\t 'db_forums_host'=>'127.0.0.1',\n\t\t\t 'db_forums_user'=>'root',\n\t\t\t 'db_forums_password'=>'',\n\t\t\t 'ocf_table_prefix'=>'ocp_unit_test_',\n\t\t\t 'confirm'=>'1',\n\t\t\t);\n\n\t\t\t$stages=array(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'2',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t 'max'=>'1000',\n\t\t\t\t\t 'default_lang'=>'EN',\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'3',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t 'max'=>'1000',\n\t\t\t\t\t 'default_lang'=>'EN',\n\t\t\t\t\t 'email'=>'E-mail address',\n\t\t\t\t\t 'interest_level'=>'3',\n\t\t\t\t\t 'advertise_on'=>'0',\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'4',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t 'max'=>'1000',\n\t\t\t\t\t 'default_lang'=>'EN',\n\t\t\t\t\t 'email'=>'E-mail address',\n\t\t\t\t\t 'interest_level'=>'3',\n\t\t\t\t\t 'advertise_on'=>'0',\n\t\t\t\t\t 'forum'=>'ocf',\n\t\t\t\t\t 'forum_type'=>'ocf',\n\t\t\t\t\t 'board_path'=>get_file_base().'/forums',\n\t\t\t\t\t 'use_multi_db'=>'0',\n\t\t\t\t\t 'use_msn'=>'0',\n\t\t\t\t\t 'db_type'=>get_db_type(),\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'5',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'6',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'7',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'8',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'9',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'step'=>'10',\n\t\t\t\t\t),\n\t\t\t\t\t$settings,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tforeach ($stages as $stage)\n\t\t\t{\n\t\t\t\tlist($get,$post)=$stage;\n\t\t\t\t$url=get_base_url().'/install.php?';\n\t\t\t\tforeach ($get as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\t$url.='&'.urlencode($key).'='.urlencode($val);\n\t\t\t\t}\n\t\t\t\t/*echo */http_download_file($url,NULL,true,false,'ocPortal',$post);\n\t\t\t\t$this->assertTrue($GLOBALS['HTTP_MESSAGE']=='200');\n\t\t\t\tif ($GLOBALS['HTTP_MESSAGE']!='200') break; // Don't keep installing if there's an error\n\t\t\t}\n\n\t\t\tunlink(get_file_base().'/info.php'); // TODO: _config.php in v10\n\t\t\trename(get_file_base().'/info.php.bak',get_file_base().'/info.php'); // TODO: _config.php in v10\n\n\t\t\tif ($GLOBALS['HTTP_MESSAGE']!='200') break; // Don't do further trials if there's an error\n\t\t}\n\t}", "title": "" }, { "docid": "1383c8d2ab835c2162dfbe92bd6f7407", "score": "0.5360053", "text": "public function phpunit_column_test_add_data(totara_reportbuilder_column_testcase $testcase) {\n global $DB;\n\n if (!PHPUNIT_TEST) {\n throw new coding_exception('phpunit_prepare_test_data() cannot be used outside of unit tests');\n }\n $data = array(\n 'ojt' => array(\n array('id' => 1, 'course' => 1, 'name' => 'test ojt', 'intro' => '', 'timecreated' => 1)\n ),\n 'ojt_topic' => array(\n array('id' => 1, 'ojtid' => 1, 'name' => 'test ojt topic')\n ),\n 'ojt_topic_item' => array(\n array('id' => 1, 'ojtid' => 1, 'topicid' => 1, 'name' => 'test ojt topic item')\n ),\n 'ojt_completion' => array(\n array('id' => 1, 'userid' => 2, 'type' => 0, 'ojtid' => 1, 'topicid' => 0, 'topicitemid' => 0, 'status' => 1, 'modifiedby' => 1),\n array('id' => 2, 'userid' => 2, 'type' => 1, 'ojtid' => 1, 'topicid' => 1, 'topicitemid' => 0, 'status' => 1, 'modifiedby' => 1),\n array('id' => 3, 'userid' => 2, 'type' => 2, 'ojtid' => 1, 'topicid' => 1, 'topicitemid' => 1, 'status' => 1, 'modifiedby' => 1),\n ),\n 'user_enrolments' => array(\n array('id' => 1, 'status' => 0, 'enrolid' => 1, 'userid' => 2)\n ),\n );\n foreach ($data as $table => $data) {\n foreach($data as $datarow) {\n $DB->import_record($table, $datarow);\n }\n $DB->get_manager()->reset_sequence(new xmldb_table($table));\n }\n }", "title": "" }, { "docid": "096408f89370e86f68b99c4fdf25bb0a", "score": "0.5359562", "text": "private function prepareForTests()\n {\n Artisan::call('migrate');\n Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--database' => 'sqlite_testing']);\n }", "title": "" }, { "docid": "32720412cabdc1eb218745a4ff6fdf4e", "score": "0.53591675", "text": "protected function setUp() {\n parent::setUp();\n $this->cleanUpAll();\n\n $this->project = new PersistentProject();\n $this->project->setProjectJnName(\"PPM\");\n $this->project->setSummary(\"Project paticipation Metrics\");\n $this->project->save();\n\n }", "title": "" }, { "docid": "38daf9b18e9f28b4fc0fc4977225121b", "score": "0.53523725", "text": "public function run()\n {\n $data = [];\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 100; $i++) {\n $data[] = [\n 'city' => $faker->randomElement(['Fulda', 'Darmstdat', 'Giessen']),\n 'number' => $faker->numberBetween(36035, 36040),\n 'province' => 'Hessen',\n 'country' => 'Germany',\n 'city_id' => $faker->randomNumber(2),\n ];\n }\n\n $table = $this->table('zips');\n $table->insert($data)->save();\n }", "title": "" }, { "docid": "af6d08873443666bfe8eb2d6ad72b0d1", "score": "0.5348165", "text": "protected function mysqldump(){\n $file = tempnam(sys_get_temp_dir(),\"dump\");\n $tables = ['data_Reference','data_Folder','data_Transaction','join_Folder_Reference'];\n $dump_tables = \"\";\n foreach($tables as $table){\n $dump_tables .= \"{$this->datasource}_{$table} \";\n }\n $params = [\n \"--user=root\",\n \"--password=\" . $this->_getFromEnvironment('DB_ROOT_PASSWORD'),\n \"--host=\" . $this->_getFromEnvironment('DB_HOST'),\n \"--result-file=\" . $file,\n \"tests $dump_tables\"\n ];\n\n $cmd = \"mysqldump \" . implode(\" \", $params) . \" 2>&1\";\n exec($cmd, $output);\n if(count($output)) throw new RuntimeException(implode(\"; \", $output));\n // remove comments\n return preg_replace( \"/^--.*$/m\",\"\",\n preg_replace( \"/'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}'/\", \"*removed*\",\n file_get_contents($file)));\n }", "title": "" }, { "docid": "6bc326f0956339819234d86816a665c5", "score": "0.53402215", "text": "protected function setUp(): void\n {\n $this->fixturesDir = __DIR__ . '/fixtures';\n $sqliteConfig = ['driver' => 'pdo_sqlite', 'directory' => $this->fixturesDir . '/sqlite-dbs'];\n file_put_contents(\n $this->fixturesDir . '/sqlite-credentials.json',\n json_encode($sqliteConfig, JSON_PRETTY_PRINT)\n );\n\n $this->setupDbConnections();\n $this->populateSqliteDb();\n parent::setUp();\n }", "title": "" }, { "docid": "59d5a23f5abc9f0a09876d283364b2de", "score": "0.5338899", "text": "public function tearDown()\n\t{\n\t\t$this->executeSqlFile(dirname(__FILE__) . '/db_teardown.sql');\n\t}", "title": "" }, { "docid": "a80a7cabbcc924c9390d27c6f342c916", "score": "0.53301716", "text": "public function _setupPopulateSeedDatabase() {\n\t\t// prevent nesting (infinite recursion)\n\t\tif (Configure::read('AppFastFixture.populateSeedDatabase')) {\n\t\t\t// skipped, we are already inside populateSeedDatabase\n\t\t\treturn;\n\t\t}\n\n\t\tif (isset($this->import) && (is_string($this->import) || is_array($this->import))) {\n\t\t\t// skipped for imports\n\t\t\treturn;\n\t\t}\n\t\t$source = ConnectionManager::getDataSource($this->sourceConfig);\n\t\tif (empty($source)) {\n\t\t\tdebug('empty source, escape');\n\t\t\t// skipped no test_seed connection found\n\t\t\treturn;\n\t\t}\n\n\t\t// populate the test_seed database from the fixture\n\t\tConfigure::write('AppFastFixture.populateSeedDatabase', true);\n\t\t$this->_populateSeedDatabase();\n\t\tConfigure::write('AppFastFixture.populateSeedDatabase', null);\n\n\t\t// TODO validate that something was inserted\n\n\t\t// set a configuration so we never attempt to seed it again\n\t\t// and instead use it for all create/insert methods\n\t\t$this->setIsSeeded();\n\n\t\t// truncate the records array,\n\t\t// so we start using the test_seed database\n\t\t$this->records = [];\n\t}", "title": "" }, { "docid": "5a3d69deb1cfcdde365a7f3f1d8239dd", "score": "0.53271216", "text": "public function test_basiccrud() {\n $this->resetAfterTest(true);\n\n // Create some outages.\n $outages = [];\n for ($i = 1; $i <= 10; $i++) {\n $outage = $this->createoutage($i);\n $id = outagedb::save($outage);\n $outages[$id] = $outage;\n }\n\n // With all created outages.\n foreach ($outages as $id => $outage) {\n // Get it.\n $inserted = outagedb::get_by_id($id);\n self::assertNotNull($inserted);\n // Check its data.\n foreach (['starttime', 'stoptime', 'warntime', 'title', 'description'] as $field) {\n self::assertSame($outage->$field, $inserted->$field, 'Field '.$field.' does not match.');\n }\n // Check generated data.\n self::assertGreaterThan(0, $inserted->id);\n self::assertGreaterThan(0, $inserted->lastmodified);\n self::assertNotNull($inserted->createdby);\n self::assertNotNull($inserted->modifiedby);\n // Change it.\n $inserted->title = 'Title ID'.$id;\n outagedb::save($inserted);\n // Get it again and check data.\n $updated = outagedb::get_by_id($id);\n self::assertSame('Title ID'.$id, $updated->title);\n self::assertSame($inserted->description, $updated->description);\n // Delete it.\n outagedb::delete($id);\n $deleted = outagedb::get_by_id($id);\n self::assertNull($deleted);\n }\n }", "title": "" }, { "docid": "f4edae240990819e1a10dd0c7e1294f2", "score": "0.5305378", "text": "public function setTestData()\n {\n $this->algortihm->setTestData($this->testData);\n }", "title": "" }, { "docid": "9f388092410d0c8cf316c51b1b53d9e5", "score": "0.529938", "text": "public final function setUp() : void {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t\t$password = \"abc123\";\n\t\t$this->VALID_PROFILE_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_ACTIVATION_TOKEN = bin2hex(random_bytes(16));\n\n\n\t\t// create and insert a Profile to the test rsvp\n\t\t$profileId = generateUuidV4();\n\t\t$this->profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, \"I am Groot\", \"[email protected]\",$this->VALID_PROFILE_HASH ,\"https://media.giphy.com/media/3og0INyCmHlNylks9O/giphy.gif\", \"Dilbert\");\n\t\t$this->profile->insert($this->getPDO());\n\n\t\t// create and insert eventType to test rsvp\n\t\t$eventTypeId = generateUuidV4();\n\t\t$this->eventType = new EventType($eventTypeId, \"blind star watch\");\n\t\t$this->eventType->insert($this->getPdo());\n\n\t\t// create and insert a Event to test rsvp\n\t\t$eventId = generateUuidV4();\n\t\t$this->event = new Event($eventId, $eventTypeId, $profileId, \"blind star watch party\",\"May the braille be with you\",new \\DateTime(), new \\DateTime());\n\t\t$this->event->insert($this->getPdo());\n\n\t}", "title": "" }, { "docid": "bf5e22b7ded5171aa2100574ddb30c18", "score": "0.52937967", "text": "public function run()\n {\n DB::table('tests')->delete();\n DB::table('tests')->insert(\n \t[\n \t\t['id' => 1, 'name' => 'dat', 'email'=>'[email protected]'],\n \t\t['id' => 2, 'name' => 'b', 'email'=>'[email protected]'],\n \t\t['id' => 3, 'name' => 'c', 'email'=>'[email protected]'],\n \t\t['id' => 4, 'name' => 'd', 'email'=>'[email protected]'],\n \t\t['id' => 5, 'name' => 'e', 'email'=>'[email protected]'],\n\t ]\n\t );\n }", "title": "" }, { "docid": "f66453204b169da2fc6a20b89bfa97f6", "score": "0.5291495", "text": "public function run()\n {\n DB::table('tests')->insert([\n 'name' => \"PCR test\" ,\n 'price' => \"30000\",\n 'quantity' => \"10\",\n ]);\n DB::table('tests')->insert([\n 'name' => \"Blood sugar test\" ,\n 'price' => \"20000\",\n 'quantity' => \"20\",\n ]);\n DB::table('tests')->insert([\n 'name' => \"Flu vaccine\" ,\n 'price' => \"20000\",\n 'quantity' => \"20\",\n ]);\n DB::table('tests')->insert([\n 'name' => \"Covid-19 vaccine\" ,\n 'price' => \"200000\",\n 'quantity' => \"20\",\n ]);\n DB::table('tests')->insert([\n 'name' => \"Influenza virus vaccine\" ,\n 'price' => \"100000\",\n 'quantity' => \"20\",\n ]);\n }", "title": "" }, { "docid": "35b9595832402e41e33659dd82208dbe", "score": "0.5291055", "text": "private function setUpDatabase(): void\n {\n include_once __DIR__.'/../resources/database/migrations/create_taggable_table.php.stub';\n (new \\CreateTaggableTable())->up();\n\n include_once __DIR__.'/database/migrations/2013_11_04_163552_create_test_models_table.php';\n (new \\CreateTestModelsTable())->up();\n }", "title": "" }, { "docid": "8a20aec824c8675c8c85c5d0c114efdb", "score": "0.52853405", "text": "public static function setUpBeforeClass() \n\t{\t\n\t\t$current_datatbase = static::main_database();\n\t\t\n\t\t// lets make sure that we have an db configuration for phpunit\n\t\tif ( CCConfig::create( 'database' )->has( $current_datatbase ) )\n\t\t{\t\n\t\t\t// lets try to connect to that database if the conection\n\t\t\t// fails we just return and continue the other tests\n\t\t\ttry { DB::connect( $current_datatbase ); }\n\t\t\tcatch ( \\PDOException $e ) { return; }\n\n\t\t\t// connection succeeded?\n\t\t\tstatic::$dbtests = true;\n\n\t\t\t// overwrite the main db\n\t\t\tCCConfig::create( 'database' )->set( 'main', $current_datatbase );\n\n\t\t\t// kill all connections\n\t\t\tHandler::kill_all_connections();\n\t\t\t\n\t\t\t// check for any sql files that should be executed needed \n\t\t\t// for theses tests. We simply check if a file exists in the\n\t\t\t// CCUnit bundle \"db_<current_database>.sql\"\n\t\t\tif ( file_exists( CCPath::get( 'CCUnit::db_'.$current_datatbase.'.sql' ) ) )\n\t\t\t{\n\t\t\t\t$queries = explode( ';', file_get_contents( CCPath::get( 'CCUnit::db_'.$current_datatbase.'.sql' ) ) );\n\t\t\t\t\n\t\t\t\tforeach( $queries as $query )\n\t\t\t\t{\n\t\t\t\t\t$query = trim( $query );\n\t\t\t\t\n\t\t\t\t\tif ( !empty( $query ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tDB::run( $query, array(), 'phpunit' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7cadc7e098500d6b502b68a8c0f10f82", "score": "0.52836615", "text": "protected function tearDown()\n {\n $sQ = \"delete from oxvendor where oxid like '_test%'\";\n oxDb::getDb()->execute($sQ);\n\n $sQ = \"delete from oxmanufacturers where oxid like '_test%'\";\n oxDb::getDb()->execute($sQ);\n\n $sQ = \"delete from oxseo where oxobjectid='objectid'\";\n oxDb::getDb()->execute($sQ);\n parent::tearDown();\n }", "title": "" }, { "docid": "5248507028236822c639a585f2929180", "score": "0.52804196", "text": "protected function initializePackageData()\r\n {\r\n file_put_contents($this->vendorDir . '/' . SharedPackageDataManager::PACKAGE_DATA_FILENAME, json_encode(array(\r\n 'letudiant/foo-bar/dev-develop' => array(\r\n 'installation-source' => SharedPackageDataManager::PACKAGE_INSTALLATION_SOURCE,\r\n 'project-usage' => array(\r\n 'letudiant/root-package'\r\n )\r\n )\r\n )));\r\n\r\n $this->assertFileExists($this->vendorDir . '/' . SharedPackageDataManager::PACKAGE_DATA_FILENAME);\r\n }", "title": "" }, { "docid": "a3b33073bb9f0449f949e8a3407b00d3", "score": "0.5271125", "text": "public function testBasicSeeder()\n {\n if (!Schema::hasTable('users')) {\n DB::unprepared(file_get_contents('tests/Seeds/data-sql/eloquentFilter_test.sql'));\n }\n\n $seeder = new UserTableSeeder();\n $seeder->run();\n\n $seeder = new PostTableSeeder();\n $seeder->run();\n\n $seeder = new CategoryTableSeeder();\n $seeder->run();\n\n $seeder = new CategoriesPostsTableSeeder();\n $seeder->run();\n\n $this->assertTrue(true);\n // ...\n }", "title": "" }, { "docid": "108c8d8f389ec0a358131f1da78d2675", "score": "0.52706414", "text": "function fixture(){\n $this->clearAll();\n \n // ------------------\n //some finished event\n $seller = $this->createUser('seller');\n $evt = $this->createEvent('Marchas en Quito', $seller->id, 1, '2012-02-15');\n $this->setEventId($evt, 'aaa');\n $this->setPaymentMethod($evt,self::OUR_CREDIT_CARD);\n $cat1 = $this->createCategory('Conaie', $evt->id, 100.00);\n $cat2 = $this->createCategory('Ecuarurani', $evt->id, 25.00);\n \n \n \n $seller = $this->createUser('seller2');\n $evt = $this->createEvent('Bailando 2012', $seller->id, 1, '2012-03-15');\n $this->setEventId($evt, 'bbb');\n $cat1 = $this->createCategory('Piscina', $evt->id, 100.00);\n \n \n $seller = $this->createUser('seller3');\n $evt = $this->createEvent('Occupy Wallstreet', $seller->id, 1, '2012-04-15', '', '2012-04-20');\n $this->setEventId($evt, 'ccc');\n $cat1 = $this->createCategory('Hipsters', $evt->id, 100.00);\n \n $evt = $this->createEvent('Dinner', $seller->id, 1, '2012-04-19', '10:00', '2012-04-20', '13:00');\n $this->setEventId($evt, 'ddd');\n $cat1 = $this->createCategory('Pals', $evt->id, 100.00);\n \n $foo = $this->createUser('foo');\n $this->buyTickets('foo', $cat1->id, 3);\n \n \n //Today fixture - run manually merchant_invoice_cron and mercant_invoice_daily_report_cron to verify emails are sent to your inbox\n $seller = $this->createUser('ronald');\n $evt = $this->createEvent('McDonal Race', $seller->id, 1, date('Y-m-d'), '07:00:00', date('Y-m-d'), '08:00:00');\n $this->setEventId($evt, 'mcrace');\n $cat1 = $this->createCategory('Clowns', $evt->id, 100.00);\n \n \n \n // **********************************************************\n }", "title": "" }, { "docid": "1d574a7658344bd1aefceace6fa7011a", "score": "0.5268176", "text": "public function migrate()\n\t{\n\t\t\\Aimeos\\MW\\Common\\Base::checkClass( '\\\\Aimeos\\\\MShop\\\\Context\\\\Item\\\\Iface', $this->additional );\n\n\t\t$this->msg( 'Adding order test data', 0 );\n\t\t$this->additional->setEditor( 'core:unittest' );\n\n\t\t$localeManager = \\Aimeos\\MShop\\Locale\\Manager\\Factory::createManager( $this->additional, 'Standard' );\n\t\t$orderManager = \\Aimeos\\MShop\\Order\\Manager\\Factory::createManager( $this->additional, 'Standard' );\n\t\t$orderBaseManager = $orderManager->getSubManager( 'base' );\n\n\t\t$search = $orderBaseManager->createSearch();\n\t\t$search->setConditions( $search->compare( '==', 'order.base.sitecode', array( 'unittest', 'unit' ) ) );\n\n\t\tforeach( $orderBaseManager->searchItems( $search ) as $order ) {\n\t\t\t$orderBaseManager->deleteItem( $order->getId() );\n\t\t}\n\n\n\t\t$ds = DIRECTORY_SEPARATOR;\n\t\t$path = __DIR__ . $ds . 'data' . $ds . 'order.php';\n\n\t\tif( ( $testdata = include( $path ) ) == false ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Exception( sprintf( 'No file \"%1$s\" found for order domain', $path ) );\n\t\t}\n\n\t\t$bases = $this->addOrderBaseData( $localeManager, $orderBaseManager, $testdata );\n\t\t$bases['items'] = $this->addOrderBaseProductData( $orderBaseManager, $bases, $testdata );\n\t\t$bases['items'] = $this->addOrderBaseServiceData( $orderBaseManager, $bases, $testdata );\n\n\t\t//update order bases (getPrice)\n\t\tforeach( $bases['items'] as $baseItem ) {\n\t\t\t$orderBaseManager->saveItem( $baseItem, false );\n\t\t}\n\n\t\t$this->addOrderData( $orderManager, $bases['ids'], $testdata );\n\n\t\t$this->status( 'done' );\n\t}", "title": "" }, { "docid": "b154315d2b6b52431129975920c4ccd9", "score": "0.5267688", "text": "public function setUp()\n {\n $this->db->beginTransaction();\n $migration = new Migration($this->db);\n $migration->execute(\n \"CREATE TABLE `cache`\"\n . \" (`id` CHAR PRIMARY KEY NOT NULL,\"\n . \" `value` TEXT NOT NULL,\"\n . \" `expired` INTEGER NOT NULL)\"\n );\n $migration->execute(\n \"CREATE INDEX `cache_expired` ON `cache` (`expired`)\"\n );\n }", "title": "" }, { "docid": "1fd55ff186e23d6ec25cf96dc32409c4", "score": "0.52665395", "text": "public function run()\n {\n $this->seedRoles();\n $this->seedPages();\n $this->seedUserRoles();\n $this->seedParameters();\n $this->seedTestData();\n\n $this->createFolders();\n }", "title": "" }, { "docid": "48aaf6c90f9d22fc3e7681a1d1996004", "score": "0.52630275", "text": "protected function setUp()\n {\n $this->output_folder = __DIR__.'/../../../output/';\n $this->output_file = $this->output_folder.'test_ofac_'.date('Y-m-d').'.json';\n\n // parser\n $this->parser = new Usofac();\n //@Todo use the helper to create the fixtures and use it\n $this->parser->setSourcePath(__DIR__.'/../fixtures/lists/usofac_2016-03-25.xml');\n $this->parser->run();\n\n // export\n $exporter = new Exporter($this->output_folder);\n $exporter->json($this->parser->getEntities(), 'test_ofac');\n }", "title": "" }, { "docid": "a9452ada52c9f1034ce39c58b6cfa01c", "score": "0.52615523", "text": "public function run()\n\t{\n\t\t// Normalize the ignored table names if there is a table prefix set.\n\t\tif (($tablePrefix = craft()->config->get('tablePrefix', ConfigFile::Db)) !== '')\n\t\t{\n\t\t\tforeach ($this->_ignoreDataTables as $key => $tableName)\n\t\t\t{\n\t\t\t\t$this->_ignoreDataTables[$key] = $tablePrefix.'_'.$tableName;\n\t\t\t}\n\t\t}\n\n\t\t$this->_currentVersion = 'v'.craft()->getVersion().'.'.craft()->getBuild();\n\t\t$siteName = IOHelper::cleanFilename(StringHelper::asciiString(craft()->getSiteName()));\n\t\t$fileName = ($siteName ? $siteName.'_' : '').gmdate('ymd_His').'_'.$this->_currentVersion.'.sql';\n\t\t$this->_filePath = craft()->path->getDbBackupPath().StringHelper::toLowerCase($fileName);\n\n\t\t$this->_processHeader();\n\n\t\t$tableNames = craft()->db->getSchema()->getTableNames();\n\n\t\tforeach ($tableNames as $tableName)\n\t\t{\n\t\t\t$this->_processResult($tableName);\n\t\t}\n\n\t\t$this->_processConstraints();\n\t\t$this->_processFooter();\n\n\t\treturn $this->_filePath;\n\t}", "title": "" }, { "docid": "38bd52a405651059044a2d8d8c446a5f", "score": "0.5259152", "text": "public function buildTableData()\n {\n if (!$password = password_hash(\"1111\", PASSWORD_BCRYPT)) {\n throw new BankException(99,\"Failed to hash entered password\");\n }\n if (!$admin = password_hash(\"admin\", PASSWORD_BCRYPT)) {\n throw new BankException(99,\"Failed to hash entered password\");\n }\n\n /** Strings to insert */\n $insertUser = \"INSERT INTO `user` VALUES (NULL, 'admin', 'Administrator', '', '$admin',\n '[email protected]', 'Call KTC instead', '1970-01-01'),\n (NULL, 'CBishop', 'Chris', 'Bishop', '$password',\n '[email protected]', '1111', '1972-03-20'),\n (NULL, 'MLittleLamb', 'Mary','LittleLamb', '$password', \n '[email protected]','2222', '2000-01-01');\";\n\n $insertAccount = \"INSERT INTO `account` VALUES (NULL,'Savings',10000,2,'2019-10-03 10:42:16'),\n (NULL,'CreditCard',20,2,'2019-10-02 10:42:16'),\n (NULL,'Savings',300,3,'2019-10-01 10:42:16'),\n (NULL,'CreditCard',50,3,'2019-10-01 10:42:16');\";\n\n $insertTransaction = \"INSERT INTO `transaction` VALUES (NULL,'Deposit',20,'2019-10-04 10:42:16',1),\n (NULL,'Withdraw',3,'2019-10-04 10:42:16',2),\n (NULL,'Withdraw',40,'2019-10-04 10:42:16',3),\n (NULL,'Deposit',50,'2019-10-04 10:42:16',4);\";\n\n /** Check if already inserted */\n $result = $this->db->query(\"SELECT * FROM `user`;\");\n\n if ($result->num_rows == 0) {\n if (!$this->db->query($insertUser)) {\n throw new BankException(99, \"Failed creating sample user data! \" . mysqli_error($this->db));\n }\n if (!$this->db->query($insertAccount)) {\n throw new BankException(99, \"Failed creating sample account data! \" . mysqli_error($this->db));\n }\n if (!$this->db->query($insertTransaction)) {\n throw new BankException(99, \"Failed creating sample transaction data! \" . mysqli_error($this->db));\n }\n }\n }", "title": "" }, { "docid": "7d04dc642c5d3364fe62168f7c975e3b", "score": "0.5254297", "text": "protected function setUp(): void\n\t{\n\t\tparent::setUp();\n\n\t\t$this->loadDependencies();\n\n\t\tif ($this->refresh === true)\n\t\t{\n\t\t\t// Delete all of the tables to ensure we're at a clean start.\n\t\t\t$tables = $this->db->listTables();\n\n\t\t\tif (is_array($tables))\n\t\t\t{\n\t\t\t\t$forge = Database::forge('tests');\n\n\t\t\t\tforeach ($tables as $table)\n\t\t\t\t{\n\t\t\t\t\tif ($table === $this->db->DBPrefix . 'migrations')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->db->table($table)->truncate();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$forge->dropTable($table, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If no namespace was specified then migrate all\n\t\t\tif (empty($this->namespace))\n\t\t\t{\n\t\t\t\t$this->migrations->setNamespace(null);\n\t\t\t\t$this->migrations->latest('tests');\n\t\t\t}\n\n\t\t\t// Run migrations for each specified namespace\n\t\t\telse\n\t\t\t{\n\t\t\t\t$namespaces = is_array($this->namespace) ? $this->namespace : [$this->namespace];\n\t\t\t\tforeach ($namespaces as $namespace)\n\t\t\t\t{\n\t\t\t\t\t$this->migrations->setNamespace($namespace);\n\t\t\t\t\t$this->migrations->latest('tests');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (! empty($this->seed))\n\t\t{\n\t\t\tif (! empty($this->basePath))\n\t\t\t{\n\t\t\t\t$this->seeder->setPath(rtrim($this->basePath, '/') . '/Seeds');\n\t\t\t}\n\n\t\t\t$seeds = is_array($this->seed) ? $this->seed : [$this->seed];\n\t\t\tforeach ($seeds as $seed)\n\t\t\t{\n\t\t\t\t$this->seed($seed);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "967edd752fb84afa8aea7b2e9140fa5a", "score": "0.5251709", "text": "public function setUp(){\n\t\tparent::setUp();\n\t\t\n\t\tif($this->getName() == \"testLoadDataTable\"){\n\t\t\tDataTableTest::$temp=DataTableTest::$temp.\"\\ntestLoadDataTable_setUp \";\n\t\t}else if($this->getName() == \"testLoadDataTable2\"){\n\t\t\tDataTableTest::$temp=DataTableTest::$temp.\"\\ntestLoadDataTable2_setUp \";\n\t\t}else if($this->getName() == \"testNextExamine\"){\n\t\t\tDataTableTest::$temp=DataTableTest::$temp.\"\\ntestNextExamine_setUp \";\n\t\t}\n\t}", "title": "" }, { "docid": "da7468167ddb00f44584c1f51d0f1043", "score": "0.5239506", "text": "protected function setUp() {\n $_sql = \"INSERT INTO tblfile\n (ID, ParentID, Text, Icon, IsFolder, ContentType, CreationDate, ModDate, Path, TemplateID, temp_template_id, Filename, Extension, IsDynamic, IsSearchable, DocType, temp_doc_type, ClassName, Category, temp_category, Deleted, Published, CreatorID, ModifierID, RestrictOwners, Owners, OwnersReadOnly, documentArray, Language, WebUserID, listview, InGlossar)\n VALUES\n (1, 0, 'example.css', 'css.gif', 0, 'text/css', 1366744449, 1366744455, '/example.css', 0, 0, 'example', '.css', 0, 0, 0, 0, 'we_textDocument', '', NULL, 0, 1366744455, 1, 1, 0, '', '', '', 'de_DE', 0, 0, 0)\";\n $GLOBALS['DB_WE']->query($_sql);\n\n }", "title": "" }, { "docid": "17dee0902768fc56578aa9aa22f218f7", "score": "0.52376544", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $defaultPackageId = '01-001-0000';\n\n for ($i = 0; $i <= 100; $i++):\n\n $packageId = $this->getPackageId($defaultPackageId);\n\n DB::table('packages')\n ->insert([\n 'name' => $faker->name,\n 'package_id' => $packageId,\n 'tracking_number' => rand(),\n 'date_received' => \\Carbon\\Carbon::now(),\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n\n $forCount = rand(1, 3);\n\n for ($j = 0; $j < $forCount; $j++) {\n DB::table('package_detail')\n ->insert([\n 'name' => $faker->name,\n 'package_id' => $packageId,\n 'price' => rand(1, 1000000),\n 'qty' => rand(1, 1000),\n 'weight' => rand(1, 10000),\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n\n $defaultPackageId = $packageId;\n\n endfor;\n }", "title": "" }, { "docid": "c2e748296569335a1bba417f7abd7047", "score": "0.5230834", "text": "protected function setUp()\n {\n if ( file_exists( $this->test_write_filepath ) ) {\n unlink( $this->test_write_filepath );\n }\n\n $fh = fopen( $this->test_write_filepath, 'w' ) or die( \"Can't create file\" );\n }", "title": "" }, { "docid": "a5fca9fd7ba163435e6231c90b519139", "score": "0.5228114", "text": "function fixture(){\n $this->clearAll();\n \n // ------------------\n //some finished event\n $seller = $this->createUser('seller');\n $evt = $this->createEvent('Marchas en Quito', $seller->id, 1, '2012-03-23'/*, date('Y-m-d', strtotime('+1 day'))*/ ); // use future to make it refundable\n $this->setEventId($evt, 'aaa');\n $this->setPaymentMethod($evt,self::OUR_CREDIT_CARD); //Apparently this still has no effect on writing price_ccfee values\n $cat1 = $this->createCategory('Conaie', $evt->id, 100.00);\n $cat2 = $this->createCategory('Ecuarurani', $evt->id, 25.00);\n \n $this->createBanner($evt, 1, 1);\n \n //have some buyers\n $buyer = $this->createUser('foo');\n $txn_id = $this->buyTickets($buyer->id, $cat1->id);\n \n $buyer = $this->createUser('bar');\n $this->buyTickets($buyer->id, $cat1->id, 3);\n \n // ----------------------------------------------------------------------------------------\n $this->createUser('seller2');\n $evt = $this->createEvent('Mercosur', 'seller2', $this->createLocation('Quito')->id, '2012-04-15');\n $this->setEventId($evt, 'bbb');\n $this->setPaymentMethod($evt,self::OUR_CREDIT_CARD); //Apparently this still has no effect on writing price_ccfee values\n $cat1 = $this->createCategory('Argies', $evt->id, 100.00);\n $this->createBanner($evt, 2, 3);\n \n $buyer = $this->createUser('paris');\n $this->buyTickets('paris', $cat1->id);\n \n // ----------------------------------------------------------------------------------------\n $this->createUser('seller3');\n $evt = $this->createEvent('Cumbre de las Américas', 'seller3', $this->createLocation('Cartagena')->id, '2012-04-19');\n $this->setEventId($evt, 'ccc');\n $cat1 = $this->createCategory('Negocios', $evt->id, 55.50);\n $cat2 = $this->createCategory('Gringos', $evt->id, 55.50);\n $this->createBanner($evt, 2, 3);\n $this->createBanner($evt, 3, 2);\n \n $buyer = $this->createUser('quo');\n $this->buyTickets('quo', $cat1->id, 3);\n $buyer = $this->createUser('vadis');\n $this->buyTickets('vadis', $cat2->id, 2);\n \n \n \n \n //for now hardcode cc fees on tickets\n $this->db->update('ticket', array('price_ccfee'=> 0.25), \" 1 \"); // it still doesn't seem to be working with my data :/ - Ivan\n \n \n // **********************************************************\n }", "title": "" }, { "docid": "010bf302202c02df1d015c4a0cba1c1b", "score": "0.5223113", "text": "public function testDataSchemasUpdateFolder()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c8ec6988083f154b22abce61518a9e23", "score": "0.52139777", "text": "public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n\n AuditDataLayer::$dl->executeMulti(file_get_contents(__DIR__.'/config/setup.sql'));\n }", "title": "" }, { "docid": "a0558fbebe57b30bed67ff27207371d8", "score": "0.5209767", "text": "function setUp()\n {\n $this->id = uniqid();\n\n //Create users\n $p1 = new User();\n $p2 = new User();\n $p3 = new User();\n $p4 = new User();\n $p5 = new User();\n\n //Brad -> 1990 -> Christian\n //Brad -> 1991 -> Scarlett\n //Brad -> 1992 -> Liam\n //Brad -> 1993 -> Ellen\n\n //Christian -> 1994 -> Brad\n //Christian -> 1995 -> Scarlett\n //Christian -> 1996 -> Liam\n //Christian -> 1997 -> Ellen\n\n //Scarlett -> 1998 -> Brad\n //Scarlett -> 1999 -> Christian\n //Scarlett -> 2000 -> Liam\n //Scarlett -> 2001 -> Ellen\n\n //Liam -> 2002 -> Brad\n //Liam -> 2003 -> Christian\n //Liam -> 2004 -> Scarlett\n //Liam -> 2005 -> Ellen\n\n //Ellen -> 2006 -> Brad\n //Ellen -> 2007 -> Christian\n //Ellen -> 2008 -> Scarlett\n //Ellen -> 2009 -> Liam\n\n //Write their properties\n $p1->setFirstName(\"Brad\");\n $p1->setLastName(\"Pitt\");\n $p1->setTestId($this->id);\n\n $p2->setFirstName(\"Christian\");\n $p2->setLastName(\"Bale\");\n $p2->setTestId($this->id);\n\n $p3->setFirstName(\"Scarlett\");\n $p3->setLastName(\"Johansson\");\n $p3->setTestId($this->id);\n\n $p4->setFirstName(\"Liam\");\n $p4->setLastName(\"Neeson\");\n $p4->setTestId($this->id);\n\n $p5->setFirstName(\"Ellen\");\n $p5->setLastName(\"Page\");\n $p5->setTestId($this->id);\n\n $nodes = array($p1, $p2, $p3, $p4, $p5);\n\n $year = 1990;\n\n //Create 20 relations\n $test_rels = array();\n for($i = 0; $i < 5; $i++)\n {\n $test_rels[$i] = array();\n\n for($j = 0; $j < 5; $j++)\n {\n if($j != $i)\n {\n $test_rels[$i][$j] = new FriendsWith();\n $test_rels[$i][$j]->setSince($year++);\n $test_rels[$i][$j]->setFrom($nodes[$i]);\n $test_rels[$i][$j]->setTo($nodes[$j]);\n self::$arachnid->persist($test_rels[$i][$j]);\n }\n }\n }\n\n self::$arachnid->flush();\n\n }", "title": "" }, { "docid": "cfe13da9d334efbd6c437f5deee6a2e0", "score": "0.52089804", "text": "public function testDumpFile(){\n $io = new IO($this->logger);\n $path = $this->root.\"TestFileDump\";\n $content = \"TEST\";\n $io->dumpFile($path, $content);\n $this->assertEquals(\\file_get_contents($path), $content);\n \\unlink($path);\n }", "title": "" }, { "docid": "f5e1ead218da79617e703e1e42555a34", "score": "0.52074176", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n // create 100 row of example data\n for ($i=11; $i < 80; $i++) {\n\n DB::table('alat')->insert([\n 'kode' => $i,\n 'nama' => $faker->company,\n 'biaya' => $faker->biasedNumberBetween($min = 120000, $max = 1200000, $function = 'sqrt'),\n 'durasi' => $faker->biasedNumberBetween($min = 30, $max = 120, $function = 'sqrt'),\n 'jumlah_lampiran' => $faker->biasedNumberBetween($min = 1, $max = 5, $function = 'sqrt'),\n 'jenis_alat_id' => $faker->biasedNumberBetween($min = 1, $max = 3, $function = 'sqrt'),\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "dbd3114589ccd9edef30dfc8d4f21165", "score": "0.5204713", "text": "public function test_export_user_data() {\n // Create, via flatfile syncing, the future enrolments entries in the enrol_flatfile table.\n $this->create_future_enrolments();\n\n // Get contexts containing user data.\n $contextlist = provider::get_contexts_for_userid($this->user1->id);\n $this->assertEquals(2, $contextlist->count());\n\n $approvedcontextlist = new approved_contextlist(\n $this->user1,\n 'enrol_flatfile',\n $contextlist->get_contextids()\n );\n\n // Export for the approved contexts.\n provider::export_user_data($approvedcontextlist);\n\n // Verify we see one future course enrolment in course1, and one in course3.\n $subcontext = \\core_enrol\\privacy\\provider::get_subcontext([get_string('pluginname', 'enrol_flatfile')]);\n\n $writer = writer::with_context($this->coursecontext1);\n $this->assertNotEmpty($writer->get_data($subcontext));\n\n $writer = writer::with_context($this->coursecontext3);\n $this->assertNotEmpty($writer->get_data($subcontext));\n\n // Verify we have nothing in course 2 for this user.\n $writer = writer::with_context($this->coursecontext2);\n $this->assertEmpty($writer->get_data($subcontext));\n }", "title": "" }, { "docid": "7a24c714b97b22415dad57a6904ee6b5", "score": "0.5202392", "text": "public function resetTestDatabase()\n {\n /**\n * TODO: delete the executeShellConsoleCommand and use the\n * function executeConsoleCommand after solve the problem\n * that he uses the prod environement.\n */\n $this->executeShellConsoleCommand('doctrine:database:drop --env=test --force');\n $this->executeShellConsoleCommand('doctrine:database:create --env=test');\n $this->executeShellConsoleCommand('doctrine:schema:create --env=test');\n }", "title": "" }, { "docid": "f6c00166a41c14b6d2f39caed65387ca", "score": "0.5202036", "text": "public function setUp()\n {\n\n parent::setUp();\n\n $this->db = get_db();\n $this->_recordsTable = $this->db->getTable('NeatlineDataRecord');\n\n }", "title": "" }, { "docid": "7083e9aa39a33ce2406fc07ff027ddcf", "score": "0.5201991", "text": "protected function setUp()\n {\n parent::setUp();\n $this->loadMigrationsFrom(realpath(__DIR__.'/../database/migrations'));\n $this->insertDummyData();\n }", "title": "" }, { "docid": "e828b548057f7baf585150eab20b274a", "score": "0.5201215", "text": "public final function setUp() {\n// run the default setUp() method first\n\t\tparent::setUp();\n\n// create and insert a Profile to own the test Project\n\t\t$this->profile = new Profile(null, \"Q\", \"12345678901234567890123456789012\", false, 1, null, \"content\", \"[email protected]\", \"1234567890123456789012345678901234567890123456789012345678901234\", \"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678\", \"Abq, NM\", \"Elvis\", \"1234567890123456789012345678901234567890123456789012345678901234\");\n\t\t$this->profile->insert($this->getPDO());\n// calculate the date (just use the time the unit test was setup...)\n\t\t$this->VALID_PROJECTDATE = new \\DateTime();\n\t}", "title": "" }, { "docid": "9b4d2bd93d8cc551ace91eafa3cb7ab0", "score": "0.52005213", "text": "public function setUp()\n {\n $this->fileLocation = tempnam(sys_get_temp_dir(), 'eix-test-');\n // Write something into it.\n file_put_contents($this->fileLocation, 'Eix test. Please delete me.');\n }", "title": "" }, { "docid": "cf9d491cd0a7815f2071105dee950dae", "score": "0.5199961", "text": "public function setUp()\n {\n parent::setUp();\n $this->_connection = DB::connection('couchdb');\n $this->_client = $this->_connection->getCouchDB();\n for ($i = 0; $i < 3; $i++) {\n $r = [];\n array_push($r, rand(1, 99));\n array_push($r, rand(1, 59));\n array_push($r, rand(1, 999));\n array_push($this->_dummyLapTimes, $r);\n }\n $this->_dummyRunDate = sprintf(\"2018-%02d-%02d\", rand(1, 12), rand(1, 12));\n }", "title": "" }, { "docid": "33dd609a5f62b8b999df96019e59f0bf", "score": "0.5193319", "text": "public function testSeedData(): void\n {\n $seeder = new SeedUpcomingMovies($this->movieRepository, $this->genreRepository, $this->getAllUpcomingMoviesPages);\n $result = $seeder->handle();\n $this->assertTrue($result);\n }", "title": "" } ]
9ac3f541acd4d35e4a98f682bb0f89ce
Is this collection mutable?
[ { "docid": "db52b35547590daf87930939d941cd94", "score": "0.7424351", "text": "public function isMutable(): bool\n {\n return false;\n }", "title": "" } ]
[ { "docid": "7343bb943debd1affbfff3e4607bdc48", "score": "0.7171149", "text": "protected function _isMutable(){\n\t\treturn (bool) false;\n\t}", "title": "" }, { "docid": "b78bb4df6c15417fe69154b2531aea43", "score": "0.7102496", "text": "public function wasMutated(): bool;", "title": "" }, { "docid": "dad0aff7620df9e695c4dbeed2af4307", "score": "0.66054827", "text": "public function modifiesObject()\n {\n return (bool) count($this->modifications);\n }", "title": "" }, { "docid": "bb09d3f4d8ee9e7bc9f27774efd5f1ba", "score": "0.65032554", "text": "final public function wasMutated(): bool\n {\n return $this->mutated;\n }", "title": "" }, { "docid": "165cf4970c81bbe582f6d16472247d29", "score": "0.6187835", "text": "public function hasReadOnly(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "bf7f662444a8a344e1e0892d4bf0aaed", "score": "0.60918236", "text": "public function isImmutable(): bool\n {\n return $this->getAttribute('immutable', false);\n }", "title": "" }, { "docid": "dd56471f4ce4cffc98932d9c288303be", "score": "0.60499716", "text": "public function isModified();", "title": "" }, { "docid": "dd56471f4ce4cffc98932d9c288303be", "score": "0.60499716", "text": "public function isModified();", "title": "" }, { "docid": "2d39a8964e2e331fd0707b6663d2f220", "score": "0.59981114", "text": "public function isCollection(): bool;", "title": "" }, { "docid": "fa40bba1e10d896929625190e5879dd1", "score": "0.5977429", "text": "function collection_writeable($collection)\n\t{\n\t$collectiondata=get_collection($collection);\n\tglobal $userref;\n\tglobal $allow_smart_collections;\n\tif ($allow_smart_collections && !isset($userref)){ \n\t\tif (isset($collectiondata['savedsearch'])&&$collectiondata['savedsearch']!=null){\n\t\t\treturn false; // so \"you cannot modify this collection\"\n\t\t\t}\n\t}\n\t\n\t# Load a list of attached users\n\t$attached=sql_array(\"select user value from user_collection where collection='$collection'\");\n\t\n\t// Can edit if \n\t// - The user owns the collection (if we are anonymous user and are using session collections then this must also have the same session id )\n\t// - The user has system setup access (needs to be able to sort out user issues)\n\t// - Collection changes are allowed and :-\n\t// a) User is attached to the collection or\n\t// b) Collection is public or a theme and the user either has the 'h' permission or the collection is editable\n \n\t\t\n\tglobal $usercollection,$username,$anonymous_login,$anonymous_user_session_collection, $rs_session;\n\tdebug(\"collection session : \" . $collectiondata[\"session_id\"]);\n\tdebug(\"collection user : \" . $collectiondata[\"user\"]);\n\tdebug(\"anonymous_login : \" . $anonymous_login);\n\tdebug(\"userref : \" . $userref);\n\tdebug(\"username : \" . $username);\n\tdebug(\"anonymous_user_session_collection : \" . (($anonymous_user_session_collection)?\"TRUE\":\"FALSE\"));\n\t\t\n\t$writable=($userref==$collectiondata[\"user\"] && (!isset($anonymous_login) || $username!=$anonymous_login || !$anonymous_user_session_collection || $collectiondata[\"session_id\"]==$rs_session))\n\t\t|| \n\t\t(($collectiondata[\"allow_changes\"]==1 || checkperm(\"h\")) && (in_array($userref,$attached) || $collectiondata[\"public\"]==1))\n\t\t|| checkperm(\"a\");\n\treturn $writable;\n\t\n\t}", "title": "" }, { "docid": "38b9c2dc3a47b943ae47b6dc9a102e8f", "score": "0.5957795", "text": "public function isDirty();", "title": "" }, { "docid": "ff7393b39cf88b91b4965d7e2036f694", "score": "0.5953096", "text": "public function isDirty(): bool;", "title": "" }, { "docid": "ebe92863e893f108f02cd23bc5cb596a", "score": "0.5922747", "text": "private function isObjectUpdatable()\n {\n return ($this->_isObjectLoadedFromDB() && $this->_isObjectHaveNewFieldValue());\n }", "title": "" }, { "docid": "3aaa576f50c6f67d0a8e52371d99bee5", "score": "0.5897426", "text": "public function hasLastModificationTime(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "17ddc36d606b1db2950cd9802ed3682c", "score": "0.5885929", "text": "public function isChangeable()\n {\n return !$this->readOnly;\n }", "title": "" }, { "docid": "5fe67b694d5b6f7f2cd8f5c1f882d298", "score": "0.5860744", "text": "public function isByReference(): bool;", "title": "" }, { "docid": "28f99723622475ad56efd26539276199", "score": "0.58582765", "text": "public function hasReadWrite(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "8a39150057b24b991995f8a16d2c2c1c", "score": "0.58531237", "text": "public function canBeModified(): bool\n {\n return false === $this->isLocked() && true === $this->isDraft();\n }", "title": "" }, { "docid": "cf424f9c23de89af7bb11d195ec1cb04", "score": "0.58288974", "text": "function hasChanges() {\n return is_array( $this->insert_keys ) && sizeof( $this->insert_keys ) > 0;\n }", "title": "" }, { "docid": "dccee82fcf36437bd61fc86b267ab04d", "score": "0.57801235", "text": "public function __construct()\n {\n parent::__construct('Collection imutable can not be modify');\n }", "title": "" }, { "docid": "1e2553516349aad0599661abddf69b2c", "score": "0.5774764", "text": "public function unique() : CollectionInterface;", "title": "" }, { "docid": "109035f05840f1a45bcb309d5e29dc63", "score": "0.5758133", "text": "public function propertyIsMutable( $property ) {\n\t\t\treturn ( self::_dynamicPropertyArgument( $property, 'mutable' ) !== false || ! $this->_constructed );\n\t\t}", "title": "" }, { "docid": "ab6850f709862664cf36592ed9052448", "score": "0.5752205", "text": "public function immutable()\n {\n return $this->setAttribute('immutable', true);\n }", "title": "" }, { "docid": "b0b24e7c8d30dc08b9212c0d7f76c5d5", "score": "0.5723284", "text": "public abstract function mSet(array $items): bool;", "title": "" }, { "docid": "2db43993d2b933a444f461b20ece9481", "score": "0.5722944", "text": "public function isModified()\n\t{\n\t\treturn (bool)count($this->modifiedFields);\n\t}", "title": "" }, { "docid": "dfbfbfa21155263bc6ef0b70b3d35867", "score": "0.57219535", "text": "public function hasPortfolioBeenModified(): bool;", "title": "" }, { "docid": "9073653bb74ab911c95aaa1fb4c04a01", "score": "0.5711179", "text": "public function changed() {\n\t\treturn !empty($this->added) || !empty($this->removed) || !empty($this->changed);\n\t}", "title": "" }, { "docid": "04bf4262f5565ae84d8c73ee80103446", "score": "0.56997114", "text": "public function hasObjectsCopiedToSink(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "a4db57b1122e9962f5b09a78a1345748", "score": "0.5682971", "text": "function collection_set_private($collection)\n\t{\n\t\tif (is_numeric($collection)){\n\t\t\t$sql = \"update collection set public = '0' where ref = '$collection'\";\n\t\t\tsql_query($sql);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8c37434827ef6e941af0b70df5b1206d", "score": "0.56809515", "text": "public function isFrozen();", "title": "" }, { "docid": "8c37434827ef6e941af0b70df5b1206d", "score": "0.56809515", "text": "public function isFrozen();", "title": "" }, { "docid": "9f6dd59912363f9f9f3f74b2a37d5d8d", "score": "0.56782424", "text": "public function isModified()\n {\n return $this->originalState != $this->getPropertiesForIsModified();\n }", "title": "" }, { "docid": "62581eeab5739a3b71f2e5e27af7b6f8", "score": "0.5673976", "text": "public function hasChanges() : bool\n {\n return !empty($this->changes());\n }", "title": "" }, { "docid": "807dd09b1a0af49e7a77ebf862b41856", "score": "0.5669237", "text": "private function _allDirty(): bool\n {\n return $this->_allDirty || $this->resaving;\n }", "title": "" }, { "docid": "c46a7bd51c3501ea31acebd77ef84cba", "score": "0.5655798", "text": "public function hasCanged()\n\t{\n\t return $this->value != $this->originalValue;\n\t}", "title": "" }, { "docid": "74c5364025d719435d290dc6b279f0c0", "score": "0.56381804", "text": "public function getCopyable()\n {\n return ($this->metadata->Data_length <= self::$copyableLimit);\n }", "title": "" }, { "docid": "c27ae4662a9334e7ee449ac5f85f09f0", "score": "0.56099075", "text": "public function isChangeable(): bool;", "title": "" }, { "docid": "7a615b29f68e274211b9dffca2749de3", "score": "0.5581946", "text": "public function isReadOnly(): bool;", "title": "" }, { "docid": "e47571d47b8391bd9afb9e7556849ef9", "score": "0.5570455", "text": "public function isReadOnly();", "title": "" }, { "docid": "8a12b2347e43c9a98500b54281be24c2", "score": "0.55581886", "text": "public function valid() {\n return (key($this->collections) != null && key($this->collections) != false);\n }", "title": "" }, { "docid": "bb7159fc247df40d272a858b4b5b3866", "score": "0.5555308", "text": "public function isCollection(): bool\n {\n return $this->isCollection;\n }", "title": "" }, { "docid": "e0f1b72eb902ecfa7970bbb9df6af509", "score": "0.55377704", "text": "public function valid()\n {\n return isset($this->baseArrayMap[$this->iteratorIterationPosition]);\n }", "title": "" }, { "docid": "22141a2e1ff532c1d857aff417693614", "score": "0.55316544", "text": "function isModified() {\n\t\treturn $this->_Modified;\n\t}", "title": "" }, { "docid": "22141a2e1ff532c1d857aff417693614", "score": "0.55316544", "text": "function isModified() {\n\t\treturn $this->_Modified;\n\t}", "title": "" }, { "docid": "22141a2e1ff532c1d857aff417693614", "score": "0.55316544", "text": "function isModified() {\n\t\treturn $this->_Modified;\n\t}", "title": "" }, { "docid": "22141a2e1ff532c1d857aff417693614", "score": "0.55316544", "text": "function isModified() {\n\t\treturn $this->_Modified;\n\t}", "title": "" }, { "docid": "22141a2e1ff532c1d857aff417693614", "score": "0.55316544", "text": "function isModified() {\n\t\treturn $this->_Modified;\n\t}", "title": "" }, { "docid": "416f6f0124837727fbbc6dde8a7ba971", "score": "0.5526991", "text": "public function is_undoable()\n {\n // A collection is always undoable. Fancy that.\n return true;\n }", "title": "" }, { "docid": "2290a1c5dbefceb58a7791847c169e74", "score": "0.55226433", "text": "public function isReadOnly() { }", "title": "" }, { "docid": "b98ac9c749492b6c51aa8b07ffc96531", "score": "0.55207026", "text": "static public function containerWithMutable($mutable);", "title": "" }, { "docid": "f038e53da2511d9354c06d37a0c3be8a", "score": "0.5519211", "text": "public function hasDataChanges()\n {\n if(!$this->isLoaded()) {\n return false;\n }\n\n /* @var $item Mage_Core_Model_Abstract */\n foreach ($this as $item) {\n if ($item->hasDataChanges()) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "541be3386962008f54cc3b77e7c073c9", "score": "0.55054164", "text": "public function isCollection();", "title": "" }, { "docid": "a9fb5a532e4e99b15f38ff447e8f1f81", "score": "0.54934716", "text": "public function __clone()\n {\n return false;\n }", "title": "" }, { "docid": "cbd47d4d8d810aa2a58c12e3cb2fe16d", "score": "0.548105", "text": "abstract public function whenModified();", "title": "" }, { "docid": "733bc057026e3ad7c84a349bd5a0028e", "score": "0.54711324", "text": "public function isDuplicable()\n {\n return $this->_isDuplicable;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.5467858", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "34bc09dae2318aa4a388c1c77c1b5c6d", "score": "0.546783", "text": "public function isDirty(){\n return !empty($this->_dirty);\n }", "title": "" }, { "docid": "3f667df42f4f8906d5d114107a671405", "score": "0.5456589", "text": "public function hasItems(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "2ca854270b5ee7e0eab016f49315a14f", "score": "0.5455125", "text": "function IsCopyable()\n {\n return TRUE;\n }", "title": "" }, { "docid": "a0633b9c6e029f1413c621db7444880a", "score": "0.5436857", "text": "public function __clone()\n {\n return false;\n }", "title": "" }, { "docid": "6250fae2131f83e5f62990e766ad175f", "score": "0.543096", "text": "public function hasOverwriteObjectsAlreadyExistingInSink(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "0592eb9896168752049d1b8b126aa5d4", "score": "0.5430858", "text": "public function isDirty()\n {\n return $this->_dirty;\n }", "title": "" }, { "docid": "4860ef3e2e1e0694a7de8a35cfad601b", "score": "0.541942", "text": "function CacheWritable(){\r\n return (is_array($this->errors) && count($this->errors) > 0) ? false : true;\r\n }", "title": "" }, { "docid": "7a53d740d71908ea96e28fdb18b77de1", "score": "0.5417004", "text": "public function CanAdd()\n {\n return $this->HasBeenRemoved || $this->DoNotAddOnInit();\n }", "title": "" }, { "docid": "c3b19f2bace3ba3f28158c285bf9ba2f", "score": "0.5410859", "text": "public function isOverwritten() {\n return $this->_overwritten;\n }", "title": "" }, { "docid": "6e6b6f66697ef6f76b1d1d1b90f49601", "score": "0.54054356", "text": "public function cacheCollectionEnabled(): bool\n {\n return $this->inCacheMode;\n }", "title": "" }, { "docid": "bc1bc02f572b424dcc40f9239455a69e", "score": "0.5400677", "text": "public function isFrozen()\n {\n }", "title": "" }, { "docid": "42d1577046bbc0b21c7cba757716c701", "score": "0.53952825", "text": "public function isModified(): bool\n {\n return $this->isModified;\n }", "title": "" }, { "docid": "134381d8f37ff0db5a87fee62c212f3c", "score": "0.53823143", "text": "public function isDirty()\n {\n return $this->currentValue !== $this->persistedValue;\n }", "title": "" }, { "docid": "b3fac6dceea0f3ec535608b47ce94182", "score": "0.5376831", "text": "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\treturn $modified;\n\t}", "title": "" }, { "docid": "a908caa49c8c15ef64aa45c9e6cfc19f", "score": "0.53757393", "text": "public function isFrozen()\n {\n return FALSE;\n }", "title": "" }, { "docid": "ae6bdb1aad1f6b08e6cccc7d6a6a1f19", "score": "0.5374189", "text": "public function hasMinTimeElapsedSinceLastModification(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "107c3fa87c47dc9aea200fea0702a038", "score": "0.5362492", "text": "public function isCollection()\n {\n return (bool) $this->getAttribute('collection');\n }", "title": "" }, { "docid": "becbc42b3e7e8c4cae86085e926714e0", "score": "0.5360075", "text": "public function isDuplicable()\n\t\t{\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "3a25d0881c8acae338debe2e8686a662", "score": "0.53578675", "text": "public function isModified()\n {\n return !empty($this->modifiedColumns);\n }", "title": "" }, { "docid": "bc78797a93c6e6b49ad4196807a427be", "score": "0.53550845", "text": "public function isDirty()\n {\n return $this->_isDirty;\n }", "title": "" }, { "docid": "f23a881d828b4581f5942a7f12d9af2a", "score": "0.53549427", "text": "public function hasList(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "9e3acc3bd17c992551cc6f7959afdd77", "score": "0.5354872", "text": "public function valid()\n {\n return isset($this->objects[$this->position]);\n }", "title": "" }, { "docid": "1e9476213592338cfa3aed78e03c0aa1", "score": "0.53497726", "text": "public function isModified() {\n return $this->_modified;\n }", "title": "" }, { "docid": "ab365e5ce5a4e4fd1b7442149017dcd8", "score": "0.53487325", "text": "public function hasDataChanges(): bool\n {\n return $this->hasDataChanges;\n }", "title": "" }, { "docid": "6c624e8983c8b2473d51354eacc39d88", "score": "0.5347222", "text": "public function canBeModified() {\n if($this->real_check_in === null)\n return true;\n return false;\n }", "title": "" }, { "docid": "32bb655fafe1ed0fd22b696d80b0c274", "score": "0.53428614", "text": "public function isClone() : bool;", "title": "" }, { "docid": "aa58bb69103b16002176a12e6eac3af6", "score": "0.533934", "text": "public function retainAllArray(array $collection): bool\n {\n $collectionKeys = array_map(function ($element) { return $this->getKey($element); }, $collection);\n\n $size = $this->count();\n foreach ($this as $element) {\n if (!in_array($this->getKey($element), $collectionKeys, true)) {\n $this->remove($element);\n }\n }\n\n return $size !== $this->count();\n }", "title": "" }, { "docid": "25a32e288c3211e6e7dcc15a82765521", "score": "0.5328512", "text": "public function isModified(){\n\t\treturn $this->isModified;\n\t}", "title": "" }, { "docid": "562a07d8dceadc3345aad52158baff52", "score": "0.53258204", "text": "public function has() {\n return count($this->collections) > 0;\n }", "title": "" }, { "docid": "df17a68a76a1d429e0b283588764ac77", "score": "0.5325216", "text": "public function isDirty(): bool\n {\n return $this->dirty;\n }", "title": "" }, { "docid": "eb165247cd629202485cec9a12235cd0", "score": "0.532474", "text": "public function isDirty()\n\t\t{\n\t\t\treturn $this->_dirty;\n\t\t}", "title": "" }, { "docid": "5cae40f2360249e6d4cc675e786bd216", "score": "0.5320473", "text": "function isPermutable ($array1, $array2) {\n if (count($array1) != count($array2)) {\n return false;\n }\n $map1 = array();\n $map2 = array();\n for ($i=0; $i<count($array1); $i++) {\n $map1[$array1[$i]] = isset($map1[$array1[$i]]) ? $map1[$array1[$i]]+1 : 1;\n $map2[$array2[$i]] = isset($map2[$array2[$i]]) ? $map2[$array2[$i]]+1 : 1;\n }\n \n if (count($map1) != count($map2)) {\n return false;\n }\n foreach ($map1 as $index => $count) {\n if ($map2[$index] != $count) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "30e1c605ae5daaee832e10a3fe383640", "score": "0.5315977", "text": "protected function _testChangeCollection()\n {\n // Create a new collection.\n $this->collection = insert_collection(array('public' => true));\n\n // Update item.\n update_item($this->item, array('collection_id' => $this->collection->id));\n\n $files = $this->item->getFiles();\n foreach ($files as $key => $file) {\n $this->_checkFile($file);\n }\n }", "title": "" }, { "docid": "3e6f44e46289e656a106238077289db7", "score": "0.53143966", "text": "protected function _canModify()\n {\n return !$this->_imapMessage->isSigned() && !$this->_imapMessage->isEncrypted();\n }", "title": "" }, { "docid": "0f0d8145eaac05610d849b2b5ccbbee3", "score": "0.5302715", "text": "public function isDirty()\n {\n return $this->_dirty;\n }", "title": "" }, { "docid": "ea5805dd6b91c81e8b8a34ab03231bf1", "score": "0.5297011", "text": "public function isFrozen() {\n\t\treturn $this->frozen;\n\t}", "title": "" } ]
e1c683f653a28b453d989c1ef2e7379f
return html_entity_decode(stripslashes($input)); //< when demo gets above php 4.3.1
[ { "docid": "265e431bba7a1633153f2d5ff231070b", "score": "0.0", "text": "function stripProperHTML ($input){\n if(!is_array($input)) {\n $input = stripslashes($input);\n $table = get_html_translation_table(HTML_ENTITIES);\n $table = array_flip($table);\n return strtr($input, $table);\n } else {\n array_walk($input, 'stripProperHTML');\n }\n }", "title": "" } ]
[ { "docid": "7553f077a9e031516e8ec4495a469a11", "score": "0.72597545", "text": "function test_input($data)\n\n{\n\n $data = trim($data);\n\n //rimozione backslash aggiunti con la funzione addslashes()\n\n $data = stripslashes($data);\n\n //conversione dei caratteri predefiniti in entità html\n\n $data = htmlspecialchars($data);\n\n return $data;\n}", "title": "" }, { "docid": "0a613db4e6abcdb306318bc64ec19281", "score": "0.7220471", "text": "function test_input($data) {\n $data = trim($data); // strip whitespace from beginning and end\n $data = stripslashes($data); // unquotes a quoted string\n $data = htmlspecialchars($data); // converts special characters to HTML entities, thereby breaking their purpose if used maliciously\n return $data;\n}", "title": "" }, { "docid": "9f625b6d202776d277dd34ea19bff1c4", "score": "0.71923864", "text": "function inputRefine($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "23e27d24c48d82234996ca663f1b1b6f", "score": "0.717866", "text": "public static function html_entity_decode($input)\n {\n return is_string($input) ? html_entity_decode($input) : $input;\n }", "title": "" }, { "docid": "ee49134baa7cedcaf42aff2f2d7f4bac", "score": "0.7145963", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n\t//htmlspecialchars() converts special characters to HTML entities.\r\n $data = htmlspecialchars($data); \r\n return $data;\r\n }", "title": "" }, { "docid": "548eacce09d4c1601255e68f2edb56f8", "score": "0.71209496", "text": "function test_Providerinput($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "7c40972d5952e32b4fcc49b947b34f08", "score": "0.7118098", "text": "function test_input($data) {\n $data = trim($data);\t\t\t\t//la chaine de caractères entrée\n $data = stripslashes($data);\t\t\t//pour éviter les injections\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "8952e06c6f3ec67882ac460e97d6131e", "score": "0.71110606", "text": "function test_input($data) {\r\n $data = trim($data);\r\n //removes backslashes from input\r\n $data = stripslashes($data);\r\n //converts html to special characters\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "38a0c0d01d72698d571a45fe067f7b0b", "score": "0.70656", "text": "function process_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "fd78cca6691de9fb7549f3b0de54c6e1", "score": "0.70628566", "text": "function escape($input) {\n return htmlentities($input, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "55e4b3c277935cf7a526bbebec2e8289", "score": "0.7042366", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "9cd0feedc6993365ae863dcf821dbfe9", "score": "0.7036388", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data); // remember this \r\n $data = htmlspecialchars($data); //remember to ckeck this \r\n return $data;\r\n}", "title": "" }, { "docid": "8d3edcfff0732663b21296412f7d5aa0", "score": "0.703617", "text": "function html_entity_decode_utf8($txt){\n $trans_tbl = get_html_translation_table(HTML_ENTITIES);\n $ttr=array('&rsquo;'=>'\\'','&ldquo;'=>'\"','&rdquo;'=>'\"','&hellip;'=>'...','&bull;'=>'- ','&oelig;'=>'œ');\n foreach($trans_tbl as $k => $v) {\n $ttr[utf8_encode($v)] = utf8_encode($k);\n }\n return strtr($txt, $ttr);\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.7026543", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.7026543", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.7026543", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.7026543", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "29e32138b31e474c7c16a45da317dc38", "score": "0.7011117", "text": "function test_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = strip_tags($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "143e32b69e8775171ed289214ec0ea7e", "score": "0.7007606", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n //$data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "a7496dde47a6d307f3c0fddc0be7969b", "score": "0.69786286", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n\n\n}", "title": "" }, { "docid": "73ef167fa3a4fddfcb72dfecebc17bac", "score": "0.697735", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "73ef167fa3a4fddfcb72dfecebc17bac", "score": "0.697735", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "12aa4bdd9f1a8b4b615aecf8985d9a39", "score": "0.69650644", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "30c40f4ab6e03b34e63cf4390b423e74", "score": "0.6965021", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.6963374", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "4c2d9d0ae7294bda73475d0658151e7f", "score": "0.6953629", "text": "function test_input($data){\r\n $data = trim($data); //remove white spaces\r\n $data = stripcslashes($data); //remove backslashes\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "title": "" }, { "docid": "0292ba1797f9d31fb309e0747a63bc0d", "score": "0.69311655", "text": "public function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = self::escape_apostrophes($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "449bc045f2e019f2c397fd3f982fc4de", "score": "0.6928039", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "65525589c52fc9c85b848a6d7bb57f5b", "score": "0.691951", "text": "function cleanInput($input) {\n\t$input = trim($input);\n\t// \"tere tulemast\" <-- peale eelmist rida\n\t\n\t// \" tere \\\\tulemast \" <--\n\t$input = stripslashes($input);\n\t// \"tere tulemast\"\n\n\t// \"<\"\n\t$input = htmlspecialchars_decode($input);\n\t// \"&lt\"\n\t\n\treturn $input;\n}", "title": "" }, { "docid": "54c75db63739fad7294fd33cb0b392f2", "score": "0.6910381", "text": "function test_input($data) {\r\n \t\t$data = trim($data);\r\n\t \t$data = stripslashes($data);\r\n\t \t$data = htmlspecialchars($data);\r\n\t \t$data = htmlentities($data);\r\n \t \treturn $data;\r\n\t}", "title": "" }, { "docid": "4142737251342458068bf306fbafd81b", "score": "0.688804", "text": "function wp_kses_decode_entities($string) {\n $string = preg_replace_callback('/&#([0-9]+);/', '_wp_kses_decode_entities_chr', $string);\n $string = preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/', '_wp_kses_decode_entities_chr_hexdec', $string);\n\n return $string;\n}", "title": "" }, { "docid": "2c8fa5e4529247e90871d68566875395", "score": "0.687787", "text": "function test_input($data)\n{\n $data = trim($data); //removes whitespace from both sides\n $data = stripslashes($data); //removes backslashes\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "ab9f6c798143a2b8410d823f56efe14a", "score": "0.6876181", "text": "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "title": "" }, { "docid": "08b52f55e310d5d2d3af16c3a3da93d7", "score": "0.68696034", "text": "function re($txt) {\n global $charset; \n return trim(stripslashes(spChars(@html_entity_decode(utf8_decode($txt), ENT_COMPAT, $charset),true)));\n}", "title": "" }, { "docid": "6c27618457f018507b4b9e6ea7e40c79", "score": "0.68646204", "text": "function encoding_conv($var, $enc_out, $enc_in='utf-8')\r\n{\r\n$var = htmlentities($var, ENT_QUOTES, $enc_in);\r\nreturn html_entity_decode($var, ENT_QUOTES, $enc_out);\r\n}", "title": "" }, { "docid": "e7f2bcc6b52b82b8d848f6e8576a0305", "score": "0.68637335", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "cbac36b09ee802977452ebd0f689c84a", "score": "0.6856366", "text": "function testInput($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "6422468fa98294f7c83a2701cc8a38f8", "score": "0.68552756", "text": "function sanitiseString($data){\n\n\t$data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');\n\t$data = htmlspecialchars_decode($data, ENT_QUOTES);\n\t$data = strip_tags(trim($data));\n\n return $data;\n\n}", "title": "" }, { "docid": "a7ec7416ea6b756b3ae5bfbb088c6c0c", "score": "0.683827", "text": "function clean_input($data) {\n $data = trim($data); // strips whitespace from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}", "title": "" }, { "docid": "17b050a84da66925c23c576b4e69b043", "score": "0.6835221", "text": "function test_input($data) \r\n {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "title": "" }, { "docid": "da996dc03ecc8380e616785a97822aaa", "score": "0.6821874", "text": "function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "43ec4680e9c3cac41423da7ea671fda5", "score": "0.68204075", "text": "function input($data) \n{\n\treturn trim(stripslashes(htmlspecialchars($data)));\n}", "title": "" }, { "docid": "fc48aa4ee480bb72cf11170784a87a65", "score": "0.6817872", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "22cd6fd9a989961833c613b910f5aeb0", "score": "0.6817115", "text": "function Chkinput($data) \r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "2e4336a96b00acb9dfa530e71dd2e013", "score": "0.6813633", "text": "function test_input($data)\n {\n $data = trim($data);\n $data =stripslashes($data);\n $data =htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "34a2638f6d8e3bf2df57c4f614118863", "score": "0.6809364", "text": "function test_input($data) {\n\t$data=trim($data);\n\t$data=stripslashes($data);\n\t$data=htmlspecialchars($data);\n\treturn $data;\n\n}", "title": "" }, { "docid": "69603cc283476910aa64d49e8c6181fc", "score": "0.68088615", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "69603cc283476910aa64d49e8c6181fc", "score": "0.68088615", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "69603cc283476910aa64d49e8c6181fc", "score": "0.68088615", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "69603cc283476910aa64d49e8c6181fc", "score": "0.68088615", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "8a936f1c3439582cbbd36ad921da079a", "score": "0.6805046", "text": "public function testHtmlEntityDecode() {\n $this->assertEquals('<html>asdfsadfasf<b>asfasf</b></html>', $this->plugin->tamper('&lt;html&gt;asdfsadfasf&lt;b&gt;asfasf&lt;/b&gt;&lt;/html&gt;'));\n }", "title": "" }, { "docid": "02362a3eccf564c04192acb148b63d42", "score": "0.68020207", "text": "function parse_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "d40e52db311171faf1bb826a2db58bfa", "score": "0.68009853", "text": "function input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "079f5cb32cb0769388c9e1aeb347ce32", "score": "0.6794796", "text": "function wp_kses_normalize_entities($string) {\n # Disarm all entities by converting & to &amp;\n\n $string = str_replace('&', '&amp;', $string);\n\n # Change back the allowed entities in our entity whitelist\n\n $string = preg_replace_callback('/&amp;([A-Za-z]{2,8});/', 'wp_kses_named_entities', $string);\n $string = preg_replace_callback('/&amp;#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string);\n $string = preg_replace_callback('/&amp;#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string);\n\n return $string;\n}", "title": "" }, { "docid": "cdae83813ae4cf1a0f92e4b94f53535d", "score": "0.6794545", "text": "function wp_kses_decode_entities($content)\n {\n }", "title": "" }, { "docid": "087c180a538e8b4500daeb84f16ea562", "score": "0.67904204", "text": "function sanitize_utf8($str){\n return htmlentities($str);\n }", "title": "" }, { "docid": "979bed481bd6d8473a88cc88374cd118", "score": "0.6790399", "text": "function test_input($data){ \n $data = trim($data); //Strip unnecessary characters (extra space, tab, newline) from the user input data (with the PHP trim() function)\n $data = stripslashes($data); //Remove backslashes (\\) from the user input data (with the PHP stripslashes() function)\n $data = htmlspecialchars($data); //The htmlspecialchars() function converts special characters to HTML entities.\n return $data;\n}", "title": "" }, { "docid": "1713b2c2d97b42cc9e16cb3c49b49bf3", "score": "0.6783798", "text": "function parse_input($data) \n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7196e7d4c439966dfa2a7ca4e2793ee5", "score": "0.67786586", "text": "function clean_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "785952f713c24b0924d6d99fc37e6640", "score": "0.67769104", "text": "function test_input($data) {\n //Elimina espais en blanc\n $data = trim($data);\n //Elimina barres / innecessàries, procedents d'algun escape...\n $data = stripslashes($data);\n //Evita atac XSS\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "a23b05979f30ff82471a9e5d1c1c79c1", "score": "0.677625", "text": "function clean_input($data) {\n $data = trim( $data );\n $data = stripslashes( $data );\n $data = htmlspecialchars( $data );\n return $data;\n}", "title": "" }, { "docid": "a372b749d538a2b8d9de2ba7017031f1", "score": "0.6776151", "text": "function e($string){\n\n return htmlentities($string,'UTF-8', ENT_QUOTES,false);\n\n\n\n\n\n}", "title": "" }, { "docid": "af2bfb773bc76493dd26a0d0dd996ccf", "score": "0.67712975", "text": "function to_store($input) {\n $input = trim($input);\n $input = stripslashes($input);\n $input = htmlspecialchars($input);\n return $input;\n }", "title": "" }, { "docid": "e67a2a0bbafe470f4bb3bcaa8ca6396e", "score": "0.6760322", "text": "function test_input($data)\n{\n $data=trim($data);\n $data=addslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "8cd67585267255465691a5f107e4d10d", "score": "0.6753686", "text": "function test_input($data) \n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "c8e175f5e67d1add623e7ba95bf1a61e", "score": "0.6749081", "text": "function test_input($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "title": "" }, { "docid": "c8e175f5e67d1add623e7ba95bf1a61e", "score": "0.6749081", "text": "function test_input($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "title": "" }, { "docid": "a522b8c890d74353cda9c2c8c5ba6030", "score": "0.6744358", "text": "function test_input($data) {\n\t $data = trim($data);\n\t $data = stripslashes($data);\n\t $data = htmlspecialchars($data);\n\t return $data;\n\t}", "title": "" }, { "docid": "8cc91a622e3065e080484baf4c85c9ff", "score": "0.6739597", "text": "function test_input($data)\n{\n\t$data = trim($data); \n\t$data = stripslashes($data); \n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "title": "" }, { "docid": "aefdf4f3b03ab01b8872c4fa912fcfd6", "score": "0.67378706", "text": "function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "a02ae18cd173e7e8517e560f7d07c785", "score": "0.67324287", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "a02ae18cd173e7e8517e560f7d07c785", "score": "0.67324287", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "f036eb78cf9221fd74f0ba1e94160fa3", "score": "0.67277664", "text": "function test_input($data){\n \t$data = trim($data);\n \t$data = stripslashes($data);\n \t$data = htmlspecialchars($data);\n \treturn $data;\n }", "title": "" }, { "docid": "e85ee19bafa13ed754d8bd75041e48b8", "score": "0.6718343", "text": "function testInput($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "317845b8366e22ac954837709659507d", "score": "0.6714559", "text": "function safeContent() {\n $tmpString = $this->prop['value'];\n\n\n //Convert all types of single quotes\n $tmpString = str_replace(chr(145), chr(39), $tmpString);\n $tmpString = str_replace(chr(146), chr(39), $tmpString);\n $tmpString = str_replace(\"'\", \"&#39;\", $tmpString);\n\n //convert all types of double quotes\n $tmpString = str_replace(chr(147), chr(34), $tmpString);\n $tmpString = str_replace(chr(148), chr(34), $tmpString);\n // $tmpString = str_replace(\"\\\"\", \"\\\"\", $tmpString);\n\n //replace carriage returns & line feeds\n $tmpString = str_replace(chr(10), \" \", $tmpString);\n $tmpString = str_replace(chr(13), \" \", $tmpString);\n return $tmpString;\n }", "title": "" }, { "docid": "ca88c133997faa743a75a3a0b9f5e812", "score": "0.67036885", "text": "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" => \"&lt;\",\n\n \">\" => \"&gt;\",\n\n '\"' => \"&quot;\",\n\n \"'\" => \"&apos;\",\n\n \"&\" => \"&amp;\",\n\n )\n\n );\n\n}", "title": "" }, { "docid": "bab9ad636674c7df003b9a2015fa88c5", "score": "0.6703272", "text": "function test_input($data) {\r\n\t\t\t\t $data = trim($data);\r\n\t\t\t\t $data = stripslashes($data);\r\n\t\t\t\t $data = htmlspecialchars($data);\r\n\t\t\t\t return $data;\r\n\t\t\t\t}", "title": "" }, { "docid": "0faa4896c4fcfd89746a697acbe2ab9b", "score": "0.66997457", "text": "function testinput($data) {\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "title": "" }, { "docid": "0faa4896c4fcfd89746a697acbe2ab9b", "score": "0.66997457", "text": "function testinput($data) {\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "title": "" }, { "docid": "d56d068a98c8db239644c59cd460e347", "score": "0.66942114", "text": "function escape($input)\n{\n\tif(!is_string($input)) {\n\t\treturn false;\n\t}\n\n\treturn htmlspecialchars(strip_tags($input));\n}", "title": "" }, { "docid": "22f950248792af771ee008603379f3f1", "score": "0.6690946", "text": "function test_input($input)\n{\n #trip white space\n $input = trim($input);\n\n #Remove all forward and backward slashes.\n $input = stripslashes($input);\n\n #Turn html code into safe letters.\n $input = htmlspecialchars($input);\n\n return $input;\n}", "title": "" }, { "docid": "e40518d0945d7d6ad60425c99033caad", "score": "0.6685518", "text": "function sanitize_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "30e23bc379b2a31c22268e815cfbc560", "score": "0.66816515", "text": "function test_input($input)\n{\n\t$input = trim($input);\n\t$input = stripslashes($input);\n\t$input = htmlspecialchars($input);\n\treturn $input;\n}", "title": "" }, { "docid": "39846c767f126c3447d5b87f7da91559", "score": "0.6678041", "text": "function sanitxt($sanitxt) {\r\n\t$sanitxt = str_replace('><','> <',$sanitxt);\r\n\r\n\t// remove HTML tags\r\n\t$sanitxt = strip_tags($sanitxt);\r\n\r\n\t// remove multiple spaces\r\n\t$sanitxt = preg_replace('/\\s+/', ' ', $sanitxt);\r\n\r\n\t// convert smart quotes into normal\r\n\tconvert_smart_quotes($sanitxt);\r\n\r\n\t// replace quotes and ampersands with HTML chars (recommended)\r\n\t// and encode string to UTF-8. UTF-8 is default from PHP 5.4.0 only\r\n\r\n\t$sanitxt = htmlspecialchars($sanitxt,ENT_QUOTES,\"UTF-8\",FALSE);\r\n\r\nreturn($sanitxt);\r\n}", "title": "" }, { "docid": "c4ee149df61a42dfb356df85bfee28e7", "score": "0.66738075", "text": "public static function returnEscaped($input) {\r\n\t\t//htmlentities escapes all characters which have HTML character entity \r\n\t\t$escapedString = htmlentities($input, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE, 'ISO-8859-1', false);\r\n\t\treturn $escapedString;\r\n\t}", "title": "" }, { "docid": "fdb9fca9e9287d2bbd9af5e5581fb758", "score": "0.6671335", "text": "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}", "title": "" }, { "docid": "d0c01b2264ad523267da498b1fedf78a", "score": "0.6666973", "text": "function print_input_text($object) {\n\n\techo stripslashes(htmlentities($object, ENT_COMPAT));\n\n}", "title": "" }, { "docid": "3a2af7bbdd72c180968c0a7dce865dfe", "score": "0.6662745", "text": "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "1e2ac66f1e364c2ffdcb8e5e5a830afe", "score": "0.6657444", "text": "function h($str){\n return htmlentities($str,ENT_QUOTES,'UTF-8');\n}", "title": "" } ]
7989d41b40506eb26e5ae5c204efb0c9
add lesson page controller.
[ { "docid": "13a58e65d479b647bfa3252db5153d6d", "score": "0.58910644", "text": "public function addLessonAction($idClass, $idSub, $idChap, Request $request, Application $app) {\n \n $class = $app['dao.class']->find($idClass);\n $subject = $app['dao.subject']->find($idSub);\n $chapter = $app['dao.chapter']->find($idChap);\n\n $classes = $app['dao.class']->findAll();\n\n $lesson = new Lesson();\n $lesson->setChapter($chapter);\n $lessonForm = $app['form.factory']->create(LessonType::class, $lesson);\n $lessonForm->handleRequest($request);\n $lessonFormView = $lessonForm->createView(); \n\n if ($lessonForm->isSubmitted() && $lessonForm->isValid()) {\n $app['dao.lesson']->save($lesson);\n\n return $app->redirect($app['url_generator']->generate('add_step', [\n \"idClass\" => $class->getId(),\n \"idChap\" => $chapter->getId(),\n \"idLess\" => $lesson->getId(),\n \"idSub\" => $subject->getId()\n ]));\n } \n\n return $app['twig']->render('add_lesson.html.twig', array(\n 'class' => $class,\n 'classes' => $classes,\n 'subject' => $subject,\n 'chapter' => $chapter,\n 'lessonForm' => $lessonFormView\n ));\n\n \n }", "title": "" } ]
[ { "docid": "7a656d854cdc4280f6f5261fdfc76a76", "score": "0.64738834", "text": "public function addpage() \n\t{\n\t\t//make sure they're an admin\n\t\tAdminModel::auth();\t\t\n\n $this->View->Render('admin/addpage');\n }", "title": "" }, { "docid": "86e1db0298816cf02e9214568c4bd0d7", "score": "0.64334446", "text": "public function addChapter(){\n require('View/addNewChapter.php');\n }", "title": "" }, { "docid": "f67dfb4d06d74d27ac87c460e86c08a4", "score": "0.6398339", "text": "public function insertpage() \n {\n AdminModel::auth();\n\n AdminModel::add_page();\n }", "title": "" }, { "docid": "f74925bf6acaa964935328a2f30ed413", "score": "0.63523865", "text": "public abstract function addPage() : void;", "title": "" }, { "docid": "de69e88cc385a0965e076454f345ec8b", "score": "0.6216769", "text": "public function addAction()\n {\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n $form = new AddForm('page-edit', $data['module']);\n $form->setInputFilter(new AddFilter);\n $form->setData($data);\n if ($form->isValid()) {\n $values = $form->getData();\n foreach (array_keys($values) as $key) {\n if (!in_array($key, $this->pageColumns)) {\n unset($values[$key]);\n }\n }\n $values['custom'] = 1;\n $row = Pi::model('page')->createRow($values);\n $row->save();\n if ($row->id) {\n $message = _a('Page data saved successfully.');\n\n Pi::registry('page')->clear($row->module);\n $this->redirect()->toRoute(\n '',\n [\n 'action' => 'index',\n 'name' => $values['module'],\n ]\n );\n $this->view()->setTemplate(false);\n } else {\n $message = _a('Page data not saved.');\n }\n } else {\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $form = new AddForm('page-edit', $this->params('name'));\n $form->setAttribute(\n 'action',\n $this->url('', ['action' => 'addsave'])\n );\n $message = '';\n }\n\n $this->view()->assign('form', $form);\n $this->view()->assign('title', _a('Setup a page'));\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('system:component/form-popup');\n }", "title": "" }, { "docid": "0a8db19787bc9464c91db0debfa29001", "score": "0.61218023", "text": "public function addAction()\n {\n $this->di->UserSession->requireSession();\n\n $form = new QuestionForm($this->di);\n $form->check();\n\n $this->theme->setTitle(\"Ny fråga\");\n $this->di->views->add('default/page', [\n 'title' => \"Ställ en fråga\",\n 'content' => $form->getHTML()\n ]);\n }", "title": "" }, { "docid": "922e5f5c5d7cfe82c50a0be22984acd8", "score": "0.60812205", "text": "public function store()\n {\n\n Permissions::getInstaince()->allow('lesson_store');\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $validate = \\Validation::validate([\n 'resources_chapter' => array(['required' => 'required']),\n 'course_id' => array(['required' => 'required']),\n 'resources_video' => array(['required' => 'required']),\n ]);\n if (count($validate) == 0) {\n\n $course = array(\n ':resources_chapter' => htmlentities($_REQUEST['resources_chapter']),\n ':course_id' => htmlentities($_REQUEST['course_id']),\n ':resources_video' => htmlentities($_REQUEST['resources_video']),\n );\n $this->model('Lesson');\n $id = $this->model->add($course);\n\n if ($id) {\n Helper::back('/admin/lessons/index/' . $_REQUEST['course_id'], 'add successfully', 'success');\n return;\n }\n } else {\n Helper::back('/admin/lessons/create/' . $_REQUEST['course_id'], 'error in required input', 'danger');\n return;\n }\n }\n\n\n }", "title": "" }, { "docid": "eb4426ec0928cd73e4467994e14fc36b", "score": "0.6029233", "text": "public function AddController(){\n \n //recebendo a string com o nome do controller\n //metodo vindo da ClassRoutes\n $routeController = $this->getRoute();\n //aqui a gente ta montando o caminho para instanciar o controller\n $controller = \"App\\\\Controller\\\\\". $routeController;\n //instanciando o controller\n $this->obj = new $controller;\n //verificando se a variavel da URl possui posicao 1\n //se possuir, quer dizer que estão chamando um metodo!\n if(isset($this->parseUrl()[1])){\n //vai adicionar o metodo que estão chamando\n self::addMethod();\n }\n }", "title": "" }, { "docid": "5d71a956d9d37b734d6580ae18862e93", "score": "0.5973472", "text": "public function pageadd()\n {\n $this->load->view('admin/header');\n $this->load->view('admin/pageadd');\n }", "title": "" }, { "docid": "eb950110f97d7fd9afe13afcd3a67342", "score": "0.5956548", "text": "public function addAction()\n {\n // Create a new page.\n $fieldMapping = new TeiEditionsFieldMapping;\n\n // Set the created by user ID.\n $form = $this->_getForm($fieldMapping);\n $this->view->form = $form;\n $this->_processFieldForm($fieldMapping, $form, 'add');\n }", "title": "" }, { "docid": "9a0f1c0ea9a64186a1d94b38322a520b", "score": "0.5882298", "text": "function addNewPage()\n\t{\n\t \n\t\t\t App::import('model','Article'); // importing Article model\n\t\t\t $this->Article = new Article(); \n\t\t\t\n\t\t\tif($this->data){\n\n\t\t\t\t$this->Article->set($this->data['admins']);\n\t\t\t\tif($this->data['admins']!=''){\n\n\t\t\t\t\tif ($this->Article->validates()) {\n\t\t\t\t\t\t\t\t\t//making data array so we can pass in save mathod\n\t\t\t\t\t\t\t\t\t$saveArray = array();\n\t\t\t\t\t\t\t\t\t$saveArray['Article']['title'] = $this->data['admins']['title'];\n\t\t\t\t\t\t\t\t\t$saveArray['Article']['description'] = $this->data['admins']['description'];\n\t\t\t\t\t\t\t\t\t$saveArray['Article']['published'] = $this->data['admins']['published'];\n\t\t\t\t\t\t\t\t\t$saveArray['Article']['meta_keyword'] = $this->data['admins']['meta_keyword'];\n\t\t\t\t\t\t\t\t\t$saveArray['Article']['meta_description'] = $this->data['admins']['meta_description'];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(trim($this->data['admins']['page_url'])!=\"\")\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \t$saveArray['Article']['page_url'] = $this->common->makeAlias(trim($this->data['admins']['page_url']));\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t \t$saveArray['Article']['page_url'] = $this->common->makeAlias(trim($saveArray['Article']['title']));\t\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\tif(trim($this->data['admins']['meta_title'])!=\"\")\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \t$saveArray['Article']['meta_title'] = $this->data['admins']['meta_title'];\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t \t$saveArray['Article']['meta_title'] = $saveArray['Article']['title'];\t\n\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$this->Article->save($saveArray);\n\t\t\t\t\t\t\t\t\t$this->Session->setFlash('Your data has been submitted successfully.'); \n\t\t\t\t\t\t\t\t\t$this->redirect(array('action' => \"page\"));\n\n\t\t\t\t\t\t}else{ \n\n\t\t\t\t\t\t\t\t\t/*setting error message if validation fails*/\n\t\t\t\t\t\t\t\t\t$errors = $this->Article->invalidFields();\t\n\t\t\t\t\t\t\t\t\t$this->Session->setFlash(implode('<br>', $errors)); \n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t }\n\t}", "title": "" }, { "docid": "32905a233a78ea76ef474aea5a61d4bd", "score": "0.587297", "text": "public function add()\n {\n try {\n if(!(Auth::user()->isAdmin)) {\n throw new Exception('Not Authorized');\n }\n $categories = DB::table('page_categories')->get();\n } catch (Exception $e) {\n return view('/errors/error')->with('page', 'Add Page')->with('messages', $e->getMessage());\n }\n // Take the form input and generate a page in the database.\n return view('/backend/pages/add')->with('categories', $categories);\n }", "title": "" }, { "docid": "93ddc60f3f4c290dd71c6ac5590f1d4d", "score": "0.587219", "text": "public function create()\n {\n $countmaster = Category::where('parent','=',0);\n return view(athr.'.addlesson',[\n 'title'=>trans('author.addlesson'),\n 'countmaster'=>$countmaster->count(),\n 'allmaster'=>$countmaster->get(),\n ]);\n }", "title": "" }, { "docid": "6e1e54dbebf9d5b1df76b5ad10cf455b", "score": "0.58685297", "text": "public function addQuestionPage() {\n $new = true;\n $categories = Categories::all();\n $sub_categories = SubCategories::all();\n $options = Options::all();\n $action = route('addQuestion');\n $data = [\n 'new' => $new,\n 'categories' => $categories,\n 'sub_categories' => $sub_categories,\n 'options' => $options,\n 'action' => $action\n ];\n return view('editPages.edit_question', $data);\n }", "title": "" }, { "docid": "ba48db047bd4e81199df70fe6e188340", "score": "0.5842527", "text": "public function add()\n {\n //Redirect to Login page if user is not logged in\n if (!isset($_SESSION['user'])) {\n redirect('/Login');\n }\n if (!file_exists(APPPATH . 'views/pages/course/addCourseView.php')) {\n show_404();\n }\n\n $data['title'] = ('Course');\n $data['subtitle'] = ('Add Course');\n\n //Sending request to API\n $result = sendGetRequest('api/categories_teachers');\n if($result->status == (\"error\"))\n {\n show_error(\"Add categories and teachers first\" ,500, \"Failure\");\n }\n else{\n $data['categories'] = $result->categories;\n $data['teachers'] = $result->teachers;\n }\n\n $this->load->view('templates/header.php', $data);\n $this->load->view('templates/navbar.php', $data);\n $this->load->view('pages/course/addCourseView.php', $data);\n $this->load->view('templates/footer.php', $data);\n }", "title": "" }, { "docid": "b9fe15659e59f87c270f4448bfdc17d0", "score": "0.58407986", "text": "abstract public function addPage(Page $page);", "title": "" }, { "docid": "22f83f847ef71905231fd4b6d1d52386", "score": "0.58265996", "text": "public function admin_add()\n\t{\n\t\tif ($this->AclExtend->userPermissions(\"Page manager\", null, 'create'))\n\t\t{\n\t\t\tif (!empty($this->data))\n\t\t\t{\n\t\t\t\tif ($this->Page->save($this->data))\n\t\t\t\t{\n\t\t\t\t\t$this->Session->setFlash('Page added.', null);\n\t\t\t\t\t$this->redirect('/admin/pages/index');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->Session->setFlash('You do not have authorisation to access that page.', null);\n\t\t\t$this->redirect('/admin/pages');\n\t\t}\n\t}", "title": "" }, { "docid": "d1e9a2eaca730a1b850853101fa4fc99", "score": "0.5782711", "text": "public function add_page()\n\t{\n\n\t\t$this->authorize('create', Movie::class);\n\n\t\t$genres = Genre::all();\n\n\t\treturn view(\n\t\t\t'pages.add_movie',\n\t\t\t[\n\t\t\t\t'movie' => null,\n\t\t\t\t'genres' => $genres,\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "6acb9cd4d1fb0712813f2a3a3f33fe30", "score": "0.576983", "text": "public function add()\n {\n if (!isset($this->admin)) {\n redirect(base_url().'wpanel');\n\n return;\n }\n $data = [];\n $this->load->layout('wpanel/services/add', $data, []);\n }", "title": "" }, { "docid": "26bb153e81bd19023d9e4eed7721382b", "score": "0.57567245", "text": "public function add_pages() {\n add_management_page('My Page Title', 'My Side menu', 'manage_options', 'm', array($this, 'tools_page'));\n }", "title": "" }, { "docid": "0b32fd0ec2d9d0bdabfaa978999601b5", "score": "0.5705847", "text": "function lesson_add_instance($lesson) {\n global $SESSION, $DB;\n\n lesson_process_pre_save($lesson);\n\n $lesson->id = $DB->insert_record(\"lesson\", $lesson);\n\n lesson_process_post_save($lesson);\n\n lesson_grade_item_update($lesson);\n\n return $lesson->id;\n}", "title": "" }, { "docid": "2802119e706a29e6defca8d67313f457", "score": "0.5678591", "text": "function lesson (){\n\t$header = new header();\n\t$get=$this->input->get();\n\t$data['title']='';\n\tswitch($get['id']){\n\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t$header->index('Làm quen với phần thi reading','/toefl/index/','Tìm kiếm bài test');\n\t\t\t\t$this->load->view('/toefl/lesson/reading_1_1',$data);\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t$header->index('Làm quen với phần thi reading','/toefl/index/','Tìm kiếm bài test');\n\t\t\t\t$this->load->view('/toefl/lesson/reading_1_2',$data);\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t$this->load->view('/toefl/lesson/reading_1_3',$data);\t\t\t\t\n\t\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "973bd9ebc41a4a2eb83b90938e5bf40d", "score": "0.5669006", "text": "function add_step(){\n $languages = new Language();\n $languages->get_iterated();\n\t\t#$data['main_number'] = $this->input->post('step_id');\n #pri dobavlenii novogo shaga budet odno pole vvoda\n $data['number'] = $this->input->post('step_id');\n $data['dm_languages']= $languages;\n\t\t$this->load->view('admin/recipes/subs/step', $data);\n\t}", "title": "" }, { "docid": "d42000cf040de01908da9148ce2b4f16", "score": "0.5626413", "text": "function lesson_extend_settings_navigation($settings, $module) {\n global $PAGE, $CFG, $DB, $USER, $OUTPUT;\n\n $lesson = $DB->get_record('lesson', array('id'=>$PAGE->cm->instance));\n $lessonnavkey = $settings->add(get_string('lessonadministration', 'lesson'));\n $lessonnav = $settings->get($lessonnavkey);\n $lessonnav->forceopen = true;\n\n $canedit = has_capability('mod/lesson:edit', $PAGE->cm->context);\n\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$PAGE->cm->id));\n $key = $lessonnav->add(get_string('preview', 'lesson'), $url);\n\n if ($canedit) {\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/edit.php', array('id'=>$PAGE->cm->id));\n $key = $lessonnav->add(get_string('edit', 'lesson'), $url);\n }\n\n if (has_capability('mod/lesson:manage', $PAGE->cm->context)) {\n $key = $lessonnav->add(get_string('reports', 'lesson'));\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/report.php', array('id'=>$PAGE->cm->id, 'action'=>'reportoverview'));\n $lessonnav->get($key)->add(get_string('overview', 'lesson'), $url);\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/report.php', array('id'=>$PAGE->cm->id, 'action'=>'reportdetail'));\n $lessonnav->get($key)->add(get_string('detailedstats', 'lesson'), $url);\n }\n\n if ($canedit) {\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/essay.php', array('id'=>$PAGE->cm->id));\n $lessonnav->add(get_string('manualgrading', 'lesson'), $url);\n }\n\n if ($lesson->highscores) {\n $url = new moodle_url($CFG->wwwroot.'/mod/lesson/highscores.php', array('id'=>$PAGE->cm->id));\n $lessonnav->add(get_string('highscores', 'lesson'), $url);\n }\n\n if (has_capability('moodle/course:manageactivities', $PAGE->cm->context)) {\n $url = new moodle_url($CFG->wwwroot.'/course/mod.php', array('update' => $PAGE->cm->id, 'return' => true, 'sesskey' => sesskey()));\n $lessonnav->add(get_string('updatethis', '', get_string('modulename', 'lesson')), $url);\n }\n\n if (count($lessonnav->children)<1) {\n $settings->remove_child($lessonnavkey);\n }\n}", "title": "" }, { "docid": "eb54d3c923818d1f230ff9639d7b53a0", "score": "0.5593041", "text": "private function pageController() {\n\t\t$className = \"index\";\n\t\tif (isset($_GET['__page']) && !empty($_GET['__page']))\n\t\t{\n\t\t\t$className = $_GET['__page'];\n\t\t}\n\t\t\n\t\tunset($_GET['__page']);\n\t\t\n\t\t$className = str_replace(\".php\", \"\", $className);\n\t\t$arr = explode(\"/\", $className);\n\t\t\n\t\t// check that size is bigger than one, because the className itself will always be the first one\n\t\tif (sizeof($arr) > 1)\n\t\t{\n\t\t\t$router = new clRouter();\n\t\t\t$router->setData($arr);\n\t\t\t$className = $router->getClass();\n\t\t}\n\t\t\n\t\t// if page file does not exist, show error 404 page\n\t\tif (!file_exists($this->baseFolder . '/view/pages/' . $className . '.php'))\n\t\t{\n\t\t\tclErrors::error404();\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// if the above doesn't validate and object still can't be shown, show the freaking error 404\n\t\tif (!$this->autoload($className))\n\t\t{\n\t\t\tclErrors::error404();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = new $className();\n\t\t\t$page->view();\n\t\t}\n\t\t\n\t\t$content = ob_get_contents();\n\t\tob_clean();\n\t\techo $content;\n\t}", "title": "" }, { "docid": "7ccc689b32e67f62f6bc44a75cc9c32f", "score": "0.5585392", "text": "function index()\n {\n $data['lessons'] = $this->Lesson_model->get_all_lessons();\n \n $data['_view'] = 'lesson/index';\n $this->load->view('layouts/main',$data);\n }", "title": "" }, { "docid": "f25247900e28d90a0e9dba598fca0c65", "score": "0.55777895", "text": "public function learnLesson();", "title": "" }, { "docid": "8eb2f763bd48fe89a0d6a384482839ee", "score": "0.55761814", "text": "function add()\n { \n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('classID','ClassID','required|integer');\n\t\t$this->form_validation->set_rules('lessonFile','LessonFile','required|max_length[150]');\n\t\t$this->form_validation->set_rules('lessonDesc','LessonDesc','required|max_length[150]');\n\t\t$this->form_validation->set_rules('lessonTitle','LessonTitle','required|max_length[50]');\n\t\t$this->form_validation->set_rules('dateUploaded','DateUploaded','required');\n\t\t$this->form_validation->set_rules('dateModified','DateModified','required');\n\t\t$this->form_validation->set_rules('dateExpiry','DateExpiry','required');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'classID' => $this->input->post('classID'),\n\t\t\t\t'lessonFile' => $this->input->post('lessonFile'),\n\t\t\t\t'lessonTitle' => $this->input->post('lessonTitle'),\n\t\t\t\t'dateUploaded' => $this->input->post('dateUploaded'),\n\t\t\t\t'dateModified' => $this->input->post('dateModified'),\n\t\t\t\t'dateExpiry' => $this->input->post('dateExpiry'),\n\t\t\t\t'lessonDesc' => $this->input->post('lessonDesc'),\n );\n \n $lesson_id = $this->Lesson_model->add_lesson($params);\n redirect('lesson/index');\n }\n else\n {\n\t\t\t$this->load->model('Class_model');\n\t\t\t$data['all_classes'] = $this->Class_model->get_all_classes();\n \n $data['_view'] = 'lesson/add';\n $this->load->view('layouts/main',$data);\n }\n }", "title": "" }, { "docid": "cf7e837001fcb825d5fb839eb2942fc8", "score": "0.556177", "text": "public function add()\n\t{\n\t\t$all_pages = Page::get();\n\t\treturn view('admin.where_begin.add', compact('all_pages'));\n\t}", "title": "" }, { "docid": "5b717a2cf3d577264b17e4cd9194237d", "score": "0.5540977", "text": "public function addguide() \n\t{\n\t\tAdminModel::auth();\n\t\t\n $this->View->Render('admin/addguide');\n }", "title": "" }, { "docid": "e6cffb6b3d5936eadb6643dbb0bd1c4b", "score": "0.55360395", "text": "public function addCategoryPage() {\n $new = true;\n $action = route('addCategory');\n return view('editPages.edit_category',['new' => $new, 'action' => $action]);\n }", "title": "" }, { "docid": "b00421b6e5ec3e793e91853729d26450", "score": "0.553498", "text": "public function create()\n {\n return view('CustomerCenter.Lesson.create');\n }", "title": "" }, { "docid": "7f38b99316026607a16fcdc569e38dc5", "score": "0.5516637", "text": "public function create()\n {\n return view('lesson::create');\n }", "title": "" }, { "docid": "29b7f679865b56e278c1d011ed57d941", "score": "0.5488006", "text": "public function create()\n {\n // return view ('LessonCategory.create');\n return view ('pages.admin.createLessonCategory');\n }", "title": "" }, { "docid": "159d7933e4942522d152c050f771d67e", "score": "0.5474054", "text": "public function lesson()\n {\n $courseProgress = request('course')->getProgress();\n $relatedLessons = request('lesson')->getRelated();\n\n return view('pages.classroom.lesson', compact('courseProgress', 'relatedLessons'));\n }", "title": "" }, { "docid": "d9643800b74f09da73d5953ff2b43a8d", "score": "0.5472364", "text": "public function add_page() {\n\n\t\t// Name\n\t\t$name = esc_html__( 'My Library', 'ocean-extra' );\n\t\t$name = apply_filters( 'ocean_my_library_text', $name );\n\n\t\tadd_submenu_page(\n\t\t\t'oceanwp-panel',\n\t\t\tesc_html__( 'My Library', 'ocean-extra' ),\n\t\t\t$name,\n\t\t\t'manage_options',\n\t\t\t'edit.php?post_type=oceanwp_library'\n\t\t);\n\n\t}", "title": "" }, { "docid": "b4364fb0aee626e41583c999a064d043", "score": "0.546805", "text": "public function addurl() {\n\t\t$filename = MODPATH.\"kosearch\".DIRECTORY_SEPARATOR.\"examples\".DIRECTORY_SEPARATOR.\"kohana_home.html\";\n\n\t\t// Note: the Search class is responsible for loading the Zend libraries, so as we\n\t\t// want to instantiate Zend_Search_Lucene_Document_Html prior to calling singleton,\n\t\t// we must first call Search::instance()->load_search_libs();\n\t\tSearch::instance()->load_search_libs();\n\n\t\t$doc = Zend_Search_Lucene_Document_Html::loadHTMLFile($filename, TRUE, \"utf-8\");\n\n\t\tSearch::instance()->addDocument($doc);\n\n\t\t$this->index('Kohana page successfully added &darr;&nbsp;<a href=\"#form2\" title=\"scroll down\">scroll down</a>&nbsp;&darr;');\n\t}", "title": "" }, { "docid": "f6c9d82a830811be94a0f3713d8c4813", "score": "0.5452687", "text": "public function addStepAction($idClass, $idSub, $idChap, $idLess, Request $request, Application $app) {\n \n $class = $app['dao.class']->find($idClass);\n $subject = $app['dao.subject']->find($idSub);\n $chapter = $app['dao.chapter']->find($idChap);\n $lesson = $app['dao.lesson']->find($idLess);\n $steps = $app['dao.step']->findAllByLessonDesc($idLess);\n\n $classes = $app['dao.class']->findAll();\n\n $step = new Step();\n $step->setLesson($lesson);\n $stepForm = $app['form.factory']->create(StepType::class, $step);\n $stepForm->handleRequest($request);\n $stepFormView = $stepForm->createView(); \n\n if ($stepForm->isSubmitted() && $stepForm->isValid()) {\n $app['dao.step']->save($step);\n\n return $app->redirect($app['url_generator']->generate('add_step', [\n \"idClass\" => $class->getId(),\n \"idChap\" => $chapter->getId(),\n \"idLess\" => $lesson->getId(),\n \"idSub\" => $subject->getId()\n ]));\n } \n\n return $app['twig']->render('add_step.html.twig', array(\n 'class' => $class,\n 'classes' => $classes,\n 'subject' => $subject,\n 'chapter' => $chapter,\n 'step' => $step,\n 'steps' => $steps,\n 'stepForm' => $stepFormView\n ));\n\n \n }", "title": "" }, { "docid": "3d0e5d04de275d70c244d1a85f67b437", "score": "0.544777", "text": "public function addeditpage($param) {\n\t\t\n\t\tif(is_numeric($param)) {\n\t\t\t$data['heading']='Edit Page'; \n\t\t\t$page_id = $param;\n\t\t} else {\n\t\t\t$data['heading']='Add Page'; \n\t\t}\n\t\tif($page_id) {\n\t\t\t$array_records = $this->rolepage_model->GetPageById($page_id);\n\t\t} else {\n\t\t\t$array_records = array();\n\t\t}\n\t\t\n\t\t$data['page'] = $array_records;\n\t\t$this->load->view('superadmin/header', $data);\t\t\n\t\t//$this->load->view('superadmin/sidebar');\t\t\n\t\t$this->load->view('superadmin/add-edit-pages', $data);\n\t\t$this->load->view('superadmin/footer');\n\t}", "title": "" }, { "docid": "8ebd697d5800025ae8d610869a3e5a51", "score": "0.5425774", "text": "public function create()\n {\n $lessons = Lesson::all();\n\n return view('admin.component.add_exercise', compact('lessons'));\n }", "title": "" }, { "docid": "ad55360f6462fe680e78b40840574a0c", "score": "0.54093343", "text": "public function addtaskpage(){\n return $this->view('AddTask');\n }", "title": "" }, { "docid": "b941c736eed0ad08160d3bd8239cf7d6", "score": "0.53949404", "text": "function getPageAdd() {\n\tglobal $_WA;\n\t$_WA->html->setPageTitle('Создание серверного сертификата');\n\t// If they have not submitted yet, dump them to the form.\n\tif ($_WA->html->getRequestVar(WA_QS_CONFIRM) !== 'yes') {\n\t\tdie($_WA->html->loadTemplate('server.add.php'));\n\t\t}\n\t$rc = $_WA->actionServerAdd();\n\tif (!($rc === true)) {\n\t\t$_WA->html->errorMsgSet($rc);\n\t\tdie($_WA->html->loadTemplate('server.add.php'));\n\t\t}\n\t// Success ;)\n\t$_WA->html->setPageTitle('Add Server Certificate Results');\n\t$qs = $_WA->html->getMenuQs(MENU_CERTS_SERVER);\n\t$_WA->html->addMenuLink($qs,'Вернуться','greenoutline');\n\t$h = array();\n\t$h[] = $_WA->html->getPageHeader();\n\t$h[] = 'Серверный сертификат успешно добавлен.';\n\t$h[] = $_WA->html->getPageFooter();\n\tdie(implode(\"\\n\",$h) . \"\\n\");\n\t}", "title": "" }, { "docid": "d920e296dc5c60c41de93773ca5c6f43", "score": "0.53908414", "text": "public function slideradd()\n {\n $this->load->view('admin/header');\n $this->load->view('admin/slideradd');\n }", "title": "" }, { "docid": "38f7d1678ced275468da66de51bb4a71", "score": "0.53886765", "text": "public function addpage(){\n\n return view('addproject');\n }", "title": "" }, { "docid": "c4638ffbe97bcca735edb3b02fa545fb", "score": "0.5386268", "text": "public function add()\n {\n if (!function_exists('is_admin')) {\n return;\n }\n\n if (!is_admin()) {\n return;\n }\n\n $pageName = empty($this->name) ? $this->app->pluginName() : $this->name;\n $menuTitle = empty($this->title) ? $this->app->pluginName() : $this->title;\n $capability = empty($this->capability) ? 'administrator' : $this->capability;\n $slug = empty($this->slug) ? $this->app->slug() : $this->slug;\n\n add_action('admin_menu', function () use ($pageName, $menuTitle, $capability, $slug) {\n if ($this->type == 'menu') {\n add_menu_page($pageName, $menuTitle, $capability, $slug, $this->icon, $this->position);\n } elseif ($this->type == 'submenu') {\n add_submenu_page($this->parent, $pageName, $menuTitle, $capability, $slug, $this->getCallable());\n } elseif ($this->type == 'options') {\n add_options_page($pageName, $menuTitle, $capability, $slug, $this->getCallable());\n }\n });\n\n foreach ($this->settings as $setting) {\n add_action('admin_init', function () use ($slug, $setting) {\n register_setting($slug, $setting);\n });\n }\n }", "title": "" }, { "docid": "0cc92b39e9a7bbd91315722afb3a1e54", "score": "0.5384005", "text": "public function add_article(){\r\n $this->enqueue->js_namespace('dashboard_footer');\r\n $this->enqueue->js('js/main',module_url('article'));\r\n $this->Gui->set_title('Add article');\r\n $this->load->module_view('article','add_view');\r\n }", "title": "" }, { "docid": "2e2b4f958775caad54871ff08e79bb11", "score": "0.5381436", "text": "public function create()\n {\n // fetch all teacher\n $teachers = Teacher::all();\n\n return view('pages.admin.lesson.create', [\n 'teachers' => $teachers\n ]);\n }", "title": "" }, { "docid": "171c483b32540bdadc89b92a50bb910d", "score": "0.53792083", "text": "public function show(Lesson $lesson)\n {\n //\n }", "title": "" }, { "docid": "171c483b32540bdadc89b92a50bb910d", "score": "0.53792083", "text": "public function show(Lesson $lesson)\n {\n //\n }", "title": "" }, { "docid": "edbeaabd828302b7fe655f7f8dea154b", "score": "0.5376488", "text": "public function add_teacher() {\n //exit();\n $data = array();\n $data['ADMINMAINCONTENT'] = $this->load->view('admin/add_teacher_form', $data, TRUE);\n $this->load->view('admin/admin_master', $data);\n }", "title": "" }, { "docid": "ef4443bbaad9f4c1151b816de2bcbf85", "score": "0.5368903", "text": "public function webadmin_add() {\n $this->layout = 'admin_main';\n $this->loadModel('Category');\n\n if ($this->request->is('post')) {\n if ($this->Skill->validates()) {\n if ($this->Skill->save($this->request->data)) {\n $this->Session->setFlash('Skills Inserted Successfully', 'success');\n $this->redirect(array('controller' => 'skills', 'action' => 'index'));\n }\n } else {\n $this->Skill->validationErrors;\n }\n }\n }", "title": "" }, { "docid": "cd27f782fba63e9b92eb1a6bde13afd7", "score": "0.5358452", "text": "public function add() : Page {\n add_action('admin_menu', [$this, 'do_add']);\n\n return $this;\n }", "title": "" }, { "docid": "ef3045d89f9e7c7671968ac67920c5a9", "score": "0.53564864", "text": "public function index()\n {\n $subjects = Subject::all();\n\n return view('pages.add')->withSubjects($subjects);\n }", "title": "" }, { "docid": "b15491f9d7fabb8f97a4a59e485c3092", "score": "0.53499573", "text": "public function create()\n {\n $subject = $this->subjectRepository->getAll();\n\n return view('pages.suppervisor.createLesson', compact('subject'));\n }", "title": "" }, { "docid": "099d102f0f36b6cee3876a43126a5e01", "score": "0.5343099", "text": "function add() {\n $view = $this->getView('categorie', 'html'); \n $view->display(); \n }", "title": "" }, { "docid": "accd602728aec94647f23dcdd11bd2f2", "score": "0.5336275", "text": "public function enlacesPaginasController()\n\t{\n\t\t//Se valida que halla un action\n\t\tif (isset($_GET['action'])) {\n\n\t\t\t$enlaces = $_GET['action'];\n\t\t} else {\n\n\t\t\t$enlaces = \"template\";\n\t\t}\n\n\t\t$respuesta = Paginas::enlacesPaginasModel($enlaces);\n\n\t\tinclude $respuesta;\n\t}", "title": "" }, { "docid": "6a452bf307c6107855a07bc281b06c97", "score": "0.53226227", "text": "public function addNews() {\r\n $this->redirectToLogin();\r\n \r\n $this->load->helper( array( 'form', 'url', 'html' ) );\r\n\r\n $this->load->view( 'add-news' );\r\n }", "title": "" }, { "docid": "00550d142758e60c0a5e259df181b877", "score": "0.5319672", "text": "function addPage($page)\n {\n $className = $page['@']['class'];\n $pageName = $page['@']['name'];\n\n $qfcPage =& new $className($pageName);\n $this->_qfc->addPage($qfcPage);\n\n // adds additional action\n foreach ($page as $action => $attr) {\n if ($action == '#' || $action == '@') {\n continue;\n }\n $qfcPage->addAction($action, new $attr['@']['class']);\n }\n\n // adds common action on each page\n $this->addAction($pageName, new HTML_QuickForm_Action_Direct());\n }", "title": "" }, { "docid": "10ca39b55a39cc2be0c0b16238b7a2de", "score": "0.5314657", "text": "public function create()\n {\n redirect('admin/'.$this->namespace.'/'.$this->section);\n }", "title": "" }, { "docid": "df1a171b56e84b1cc81ae0b278dc341a", "score": "0.53127027", "text": "public function managePage()\n {\n $books = Book::getAll();\n require_once('views/book/bookList.php');\n }", "title": "" }, { "docid": "8323fce7e44d622da5aa63ed181a11b0", "score": "0.53119296", "text": "public function index()\n {\n $data = array();\n \n // Get modules\n $modules = $this->_getModules();\n \n // Add modules to data array\n $data['modules'] = $modules;\n \n // Create the scripts array\n $scripts = array();\n \n // Add script to the scripts array\n $scripts[] = base_url('js/add.js');\n \n // Add scripts array to data array\n $data['scripts'] = $scripts;\n\n // Load the header\n $this->load->view('page/header', $data);\n \n // Load the page view\n $this->load->view('add', $data);\n \n // Load the footer\n $this->load->view('page/footer', $data);\n }", "title": "" }, { "docid": "1f479c4fa5fcdfb895942f4ed5a70833", "score": "0.5310788", "text": "public function add_page() {\n\n\t\t// Get the page name when we add the submenu page\n\t\tadd_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t'CHP usage settings',\n\t\t\t'CHP usage settings',\n\t\t\t'administrator',\n\t\t\tself::PAGE_SLUG,\n\t\t\t[ $this, 'page_callback' ]\n\t\t);\n\t}", "title": "" }, { "docid": "e86a02bacd94a38e34f9d61ef273a57f", "score": "0.5307175", "text": "function definePages()\n{\n\t\n\t//Function for custom action button\n\t$showAuthor = function($record, $pageDescriptor, $action)\n\t{\n\t\t//this will open the list page, filtered to the book´s author\n\t\treturn \n\t\t\tResponse::redirectToAction('\\Alddesign\\Crudkit\\Controllers\\AdminPanelController@listView', \n\t\t ['page-id' => 'author', 'ff-0' => 'id', 'fo-0' => '=', 'fv-0' => $record['author_id']]);\n\t};\n\t\n\t$test = function($record, $pageDescriptor, $action)\n\t{\n\t\t//will show the book´s title\n\t\techo $record[\"title\"];\n\t\tdie;\n\t};\n\t\n\treturn\n\t[\n\t\t'author' => (new PageDescriptor('Author', 'author', $this->tables['author']))\n\t\t\t->setSummaryColumnsAll() //defines the columns which are shown on the list page (all in this case)\n\t\t\t->setCardLinkColumns(['id']) //clicking on these column(s) will open the card page\n\t\t\t,\n\t\t'book' => (new PageDescriptor('Title', 'title', $this->tables['title']))\n\t\t\t->setSummaryColumnsAll()\n\t\t\t->setCardLinkColumns(['id'])\n\t\t\t->addAction('authors', 'Author', 'Show author...', $showAuthor,true, true, 'file-text', 'primary')\n\t\t\t->addAction('test', 'Test', 'Click me', $test,true, true, 'file-text', 'primary')\n\t];\n\t//<CRUDKIT-PAGES-END> please do not remove this line - otherwise /admin-panel/auto-generate will not work\n}", "title": "" }, { "docid": "98589b36e8584bca0d4b8c736ed6288f", "score": "0.53048456", "text": "public function p_add_1(){\n\t\t$view = View::instance('v_madlibs_1');\n\n\t\t# Pass all the inputs to the madlib view\n\t\t$view->data = $_POST;\n\n\t\t# Prepare the data to save\n\t\t$madlib['content'] = $view; # Note the content is actually the view\n\t\t$madlib['created'] = Time::now();\n\t\t$madlib['user_id'] = $this->user->user_id;\n\n\t\t# Save\n\t\tDB::instance(DB_NAME)->insert('madlibs', $madlib);\n\t\t\n\n\t\t# Now we load the $view into the main template...didn't do this before the DB insert because we didn't want to save the entire template in the DB.\n\t\t$this->template->content = $view;\n\n\t\t# Display the results\n\t\techo $this->template;\t\t\t\t\n\t}", "title": "" }, { "docid": "1ce540f35769d6e5d0d582b276af0b70", "score": "0.5303521", "text": "function add(){\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Add New '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'add';\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->ipk->table_field;\n\t\t$data['primary_key'] = $this->ipk->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "0befd669871e730629c82d4e6b18ebb0", "score": "0.530198", "text": "public function addPage($label = '')\n {\n $this->_newPage($label);\n return $this->response->success;\n }", "title": "" }, { "docid": "c376f91e0dfda2e05dea1455d799197e", "score": "0.5300139", "text": "public function addAnswerPage() {\n $questions = Questions::all();\n $options = Options::all();\n $new = true;\n $action = route('addQuestion');\n $data = ['options' => $options, 'questions' => $questions, 'action' => $action, 'new' => $new];\n return view('editPages.edit_answer', $data);\n }", "title": "" }, { "docid": "08fafd1e4c3a7653755574506c50e5d2", "score": "0.5299265", "text": "public function add_plugin_page()\n {\n // This page will be under \"Settings\"\n add_options_page(\n 'Nabla Sections Settings', \n 'Nabla Sections Settings', \n 'manage_options', \n $this->domain, \n array( $this, 'create_admin_page' ) // Calls create_admin_page\n );\n }", "title": "" }, { "docid": "17d1611718643b006776292c8343a27b", "score": "0.52991575", "text": "public function add($lessonId) {\n if ($this->request->is('post')) {\n $this->SpeechScript->Exercise->create();\n $exercise = array(\n 'transition_image' => 'practice',\n 'name' => $this->request->data['SpeechScript']['exercise_name'],\n 'lesson_id' => $lessonId,\n );\n\n if ($this->SpeechScript->Exercise->save($exercise)) {\n $newExerciseId = $this->SpeechScript->Exercise->getLastInsertID();\n $this->SpeechScript->Exercise->id = $newExerciseId;\n\n $str = $this->request->data['SpeechScript']['complete_text'];\n\n $arr = explode(\"\\n\", $str);\n \n foreach ($arr as $key => $value) {\n $arr[$key] = trim($arr[$key]);\n if (empty($arr[$key]) || $arr[$key] == \" \") {\n unset($arr[$key]);\n }\n }\n // var_dump($arr);\n $i = 0;\n foreach ($arr as $key => $value) {\n $i++;\n $text = preg_split('/=|\\|/', $value);\n // var_dump($text);\n $speechScript = array(\n 'text_to_show' => $text[0],\n 'text_to_check' => $text[0],\n 'text_to_read' =>\n ($this->request->data['SpeechScript']['fulfill_text_to_read'] === \"1\") ? $text[0] : '',\n 'translation' =>\n (array_key_exists(1, $text)) ? $text[1] : '',\n 'exercise_id' => $this->SpeechScript->Exercise->id,\n 'speech_function_id' => $this->request->data['SpeechScript']['speech_function_id'],\n 'script_index' => $i\n );\n\n $this->SpeechScript->create();\n\n $this->SpeechScript->save($speechScript);\n }\n\n return $this->redirect(array('action' => 'index', $newExerciseId));\n }\n }\n }", "title": "" }, { "docid": "e52c9b86805c2cb639e9525fdbb9937b", "score": "0.5295662", "text": "public function add_subject() {\n //exit();\n $data = array();\n $data['ADMINMAINCONTENT'] = $this->load->view('admin/add_subject_form', $data, TRUE);\n $this->load->view('admin/admin_master', $data);\n }", "title": "" }, { "docid": "b5341955602d4797a14cb9430c0ba419", "score": "0.52950484", "text": "public function createTourPage()\n\t{\n\t\t$data['title']='Tours';\n $data['main']='admin/tours/create-tour';\n\t\t$data['heading']='Easy Trip | Create New Tour';\n\t\t$this->load->view('admin/includes/template', $data);\n\t}", "title": "" }, { "docid": "c5c73cd3b79fea4a13071ee217c09fac", "score": "0.5288476", "text": "public function run()\n {\n auth()->loginUsingId(5);\n \n $items = [\n [\n 'title' => 'PHP Syntax',\n 'slug' => 'php-syntax',\n ],\n [\n 'title' => 'HTML Syntax',\n 'slug' => 'html-syntax',\n ],\n [\n 'title' => 'JavaScript Syntax',\n 'slug' => 'js-syntax',\n ],\n [\n 'title' => 'CSS Syntax',\n 'slug' => 'css-syntax',\n ],\n [\n 'title' => 'Getting Things Ready',\n 'slug' => 'getting-things-ready',\n ],\n [\n 'title' => 'Creating Accounts',\n 'slug' => 'creating-accounts',\n ],\n [\n 'title' => 'Deploying Devices',\n 'slug' => 'deploying-devices',\n ]\n ];\n\n foreach($items as $record)\n {\n \\App\\Lesson::create($record);\n }\n }", "title": "" }, { "docid": "a87e9ef2cad1bbc0fbccbe138f040c5d", "score": "0.5277788", "text": "public function addsaveAction()\n {\n $status = 1;\n //$message = '';\n $page = [];\n\n $data = $this->request->getPost();\n $form = new AddForm('page-edit', $data['module']);\n $form->setInputFilter(new AddFilter);\n $form->setData($data);\n if ($form->isValid()) {\n $values = $form->getData();\n foreach (array_keys($values) as $key) {\n if (!in_array($key, $this->pageColumns)) {\n unset($values[$key]);\n }\n }\n $values['custom'] = 1;\n $values['block'] = 1;\n $row = Pi::model('page')->createRow($values);\n $row->save();\n if ($row->id) {\n $message = _a('Page data saved successfully.');\n\n $id = $row->id;\n $page = [\n 'id' => $row->id,\n 'title' => $row->title,\n 'edit' => $this->url(\n '',\n ['action' => 'edit', 'id' => $row->id]\n ),\n 'delete' => $this->url(\n '',\n ['action' => 'delete', 'id' => $row->id]\n ),\n 'dress' => $this->url(\n '',\n ['action' => 'block', 'page' => $row->id]\n ),\n ];\n Pi::registry('page')->clear($row->module);\n } else {\n $message = _a('Page data not saved.');\n $status = 1;\n }\n } else {\n $messages = $form->getMessages();\n $message = [];\n foreach ($messages as $key => $msg) {\n $message[$key] = array_values($msg);\n }\n $status = -1;\n }\n\n return [\n 'status' => $status,\n 'message' => $message,\n 'data' => $page,\n ];\n }", "title": "" }, { "docid": "718302c18558aef48a218273b4878a55", "score": "0.52736145", "text": "public function add(Request $request)\n {\n $data = $request->all();\n $action = $data['action'];\n if ($action == 'new') {\n $pdf = new PDF();\n $id = $pdf->createInstance($data);\n if (!$id) {\n return redirect()->back()->with('message', 'error');\n }\n $data['mod_id'] = $id;\n $data['url'] = $this->uploadFile($request, 'pdf');\n $content = new PDFContent();\n $contentId = $content->createInstance($data);\n if (!$contentId) {\n return redirect()->back()->with('message', 'error');\n }\n $data['instance'] = $id;\n $data['type_id'] = $this->getType();\n $lessonModule = new LessonModule();\n $success = $lessonModule->createActivity($data);\n if (!$success) {\n return redirect()->back()->with('message', 'Error');\n }\n } else {\n $activityId = $request->input('activity_id');\n $module = LessonModule::where('id', $activityId)->first();\n $data['id'] = $module->instance;\n $video = new PDF();\n $id = $video->updateInstance($data);\n if (!$id) {\n return redirect()->back()->with('message', 'error');\n }\n $data['mod_id'] = $id;\n $data['url'] = $this->uploadFile($request, $id);\n $content = new PDFContent();\n $success = $content->updateInstance($data);\n if (!$success) {\n return redirect()->back()->with('message', 'error');\n }\n\n }\n return redirect()->route('course::lessonOverview', ['id' => $data['course_id'], 'lesson' => $data['lesson_id']]);\n\n }", "title": "" }, { "docid": "4ee7f98819b301379f4fbe24523a1bd0", "score": "0.5268663", "text": "public function addPageadminPages()\n {\n \n $pages = $this->grav['pages'];\n $page = $pages->dispatch($this->route);\n \n if (!$page) {\n // Then no user page pverride; The page default is in our plugin folder pages. Load it up.\n $page = new Page;\n $filename = __DIR__ . \"/pages/pageadmin_\".$this->pageadmin_action.\".md\"; // /pages/pageadmin_edit.md etc.... \n $page->init(new \\SplFileInfo($filename));\n $page->template('form'); //just in case filename is not \"form.md\"\n //doesn't seem to matter which slug base I use.\n //$page->slug(basename($this->route)); \n $page->slug($this->route);\n //when use the page out of teh plugin repository, you need to do this! Why??\n $twig = $this->grav['twig'];\n $twig->twig_vars['form'] = $page->header()->form;\n //add the page into the pages repository\n $pages->addPage($page, $this->route);\n //override the current page (likely a 404) to be this newly added page\n // make sure page is not frozen! Sometimes you get error: Cannot override frozen service \n unset($this->grav['page']);\n $this->grav['page'] = $page;\n //add some debug messages\n $this->grav['debugger']->addMessage(\"[jacpageadmin-addPageadminPages] Looking for route: \".$this->route); \n $this->grav['debugger']->addMessage(\"[jacpageadmin-addPageadminPages] Page was added: \".$filename);\n }else\n {\n $this->grav['debugger']->addMessage(\"[jacpageadmin-addPageadminPages] Using USERS custom form: \".$this->route); \n }\n }", "title": "" }, { "docid": "3047020e26a68f2c430484a45b73e593", "score": "0.52663314", "text": "public function add()\n {\n return view('admin.custom.successstory.addsuccessstory');\n }", "title": "" }, { "docid": "c08a43bf9d4e31fe7538ef998c9254f9", "score": "0.5265469", "text": "public function create($course,$unit)\n {\n return view('admin.lesson.create',compact('course','unit'));\n }", "title": "" }, { "docid": "27a307ce940054f174f02680f0dfb2ad", "score": "0.52636766", "text": "public function add($id=null)\n {\n \n if($id){\n $page = $this->Pages->get($id, [\n 'contain' => []\n ]);\n }else{\n $page = $this->Pages->newEntity();\n }\n if ($this->request->is(['post','patch', 'put'])) {\n $page = $this->Pages->patchEntity($page, $this->request->getData());\n if ($this->Pages->save($page)) {\n $this->Flash->success(__('The page has been saved.'));\n\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('The page could not be saved. Please, try again.'));\n }\n \n $this->set(compact('page'));\n $this->set('_serialize', ['page']);\n }", "title": "" }, { "docid": "1b409d28dfbca0917eb70950e32107d9", "score": "0.52632594", "text": "public function addLesson($classID, $lessonNum, $name, $content){\n global $db_host, $db_name, $db_user, $db_pass;\n\n try {\n $dbh = new PDO(\"mysql:host=$db_host;dbname=$db_name\", $db_user, $db_pass);\n\n $fName = str_replace(\"'\", \"&#039;\", $name);\n\n $fCont = str_replace(\"'\", \"&#039;\", $content);\n\n $dbh->exec(\"INSERT INTO lesson(classID, lessonNum, name, content)\n VALUES ('$classID', '$lessonNum', '$fName', '$fCont')\");\n\n $dbh = NULL;\n }catch(PDOException $e){\n echo $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "4b2745efa00599f3a8240d61ae27b0a6", "score": "0.52543366", "text": "public function add_page() {\n $data = $this->input->post('Pages');\n $data['created_at'] = date('c');\n $data['created_by'] = $this->session->userdata('user_id');\n $this->db->insert('pages', $data);\n }", "title": "" }, { "docid": "27a45dcaa0f015777b8cb3dfa43217d1", "score": "0.5250305", "text": "public function create()\n {\n return view('mains.addpages');\n }", "title": "" }, { "docid": "498ac899c5d91548d3061bd4026cd3aa", "score": "0.5244506", "text": "public function ms_add_page() {\n\t\t\t$this->setup_localization();\n\t\t\tadd_submenu_page( 'sites.php', $this->_name, $this->_name, 'manage_sites', $this->_domain, array( $this, 'admin_page' ) );\n\t\t}", "title": "" }, { "docid": "bb619f581ac89ae82bd0a252f25f7f73", "score": "0.523949", "text": "public function chapterAction()\n {\n $this->view->headScript()\n ->prependFile('/static/js/pins.js')\n ->prependFile('/static/js/chapter.js');\n\n if (!isset($_GET['url'])) {\n throw new Zend_Exception('please input url!');\n }\n\n $id = $this->getItemId($_GET['url']);\n $name = $this->homePageMapper->getNameById($id);\n\n $this->view->title = $this->title . ' - ' . $name;\n }", "title": "" }, { "docid": "6152f6e0fbe3d84f72d4dd5ce8950c0a", "score": "0.5222806", "text": "public function create()\n {\n return view('admin::typeLesson.create');\n }", "title": "" }, { "docid": "cb10c7c361e44f57e29497dcdea906a5", "score": "0.5216905", "text": "public function addnews() \n\t{\n\t\tAdminModel::auth();\n\t\t\n\t\t$this->View->Render('admin/addnews');\n }", "title": "" }, { "docid": "3ce841370ad0dfbbbf3b6110f5427c92", "score": "0.52166945", "text": "public function create()\n {\n $lessons = Lesson::where('course_id', $this->course->id)->get();\n return Inertia::render('Admin/Lesson/Create', [\n \"course\" => $this->course,\n \"lessons\" => $lessons,\n ]);\n }", "title": "" }, { "docid": "7261e58f50e2127e64cff305fb84eed8", "score": "0.5216534", "text": "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n } \n \n return theme('component_entity_add_list', array('content' => $content));\n }", "title": "" }, { "docid": "5ad4432c4b1dff170a903de7021c3295", "score": "0.5215086", "text": "public function viewSliderAddPage()\n {\n return view('admin.slide.slideAdd');\n }", "title": "" }, { "docid": "1ca9faa9aa73416369fcbd0a8c3d0806", "score": "0.5214354", "text": "public function addAction(){\n $action = \"Add\";\n $title = \"{$action} content\";\n \n $form = $this->contentForm();\n $form->check();\n \n $this->theme->setTitle($title);\n \n $this->views->add('text-content/post', [\n 'title' => $title,\n 'action' => $action,\n 'form' => $form->getHTML(array('novalidate' => true))\n ]);\n }", "title": "" }, { "docid": "7e09ce81bd9a1bfd69c02509adafd542", "score": "0.5208313", "text": "function loadPage($smarty, $mysqli, $controllerName, $actionName = 'index') {\n \n include_once PathPrefix . $controllerName . PathPostfix;\n \n $classname = $controllerName . \"Controller\";\n $class = new $classname($mysqli);\n $function = $actionName . 'Action';\n $class->$function($smarty);\n}", "title": "" }, { "docid": "cc8e147c23bb1753d96fe0f5e762673a", "score": "0.5207731", "text": "public function add_slider()\n\t{\n\t\t$this->load->view('admin/pages/add_slider');\n\t}", "title": "" }, { "docid": "3aa5620ac97cf75a6d25526a56eca2b9", "score": "0.52075964", "text": "public function kyc_settings_add_page()\n\t{\n\t\t$this->load->view('settings/kyc/kyc_add');\n\t}", "title": "" }, { "docid": "48f95e38b876623b15d17de754f7aebf", "score": "0.5202363", "text": "public function add()\n\t{\n\t\t$this->admin_only();\n\n\t\t$participants = $this->participantModel->get_all_participants();\n\t\t$experiments = $this->experimentModel->get_all_experiments();\n\t\t$leaders = array_merge($this->userModel->get_all_leaders(), $this->userModel->get_all_admins());\n\n\t\t$data['page_title'] = lang('ad_hoc_participation');\n\t\t$data['action'] = 'participation/add_submit';\n\n\t\t$data['experiments'] = experiment_options($experiments);\n\t\t$data['participants'] = participant_options($participants);\n\t\t$data['leaders'] = leader_options($leaders);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('participation_add_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "c3ba04c33d1ade320d13d67afb574d18", "score": "0.51975", "text": "public function add()\n {\n # javascript UI needs this to return the instance_id\n die($this->_add_to_page(\n valid::id_key($this->tool_id),\n valid::id_key($this->page_id)\n ));\n }", "title": "" }, { "docid": "1b719e0b825b317f880fca6c767ad5d0", "score": "0.5196992", "text": "public function newPage(){ ?>\n\n <div id=\"new-page-container\">\n\n <div class=\"msg-div\"></div><!-- For Displaying response messages -->\n\n <form action=\"<?php echo $_SERVER['PHP_SELF'] ?>\" mehod=\"post\">\n\n <div class=\"field\">\n <div class=\"label\"><label for=\"page-name\">Title</label></div>\n <div class=\"inpt\">\n <input type=\"text\" name=\"page_name\" id=\"page-name\" value=\"\" />\n </div>\n </div>\n\n <div class=\"field\">\n <div class=\"label\"><label for=\"add-page\">Content</label></div>\n <div class=\"inpt\">\n <textarea id=\"add-page\" name=\"page_content\"></textarea>\n </div>\n </div>\n\n <div class=\"field\">\n <input data-pid=\"0\" class=\"button\" type=\"button\" name=\"page_submit\" id=\"page-submit\" value=\"Create Page\" />\n </div>\n\n </form>\n\n </div><?php\n \n }", "title": "" }, { "docid": "aedb090b3c554b7139908922bebcd115", "score": "0.51968205", "text": "public function addPlayer()\t\t//DONE\n\t{\n\t\t$data['step']=0;\n\t\t$this->load->view('addPlayer',$data);\n\t}", "title": "" }, { "docid": "af415e647ba9fecac09011e18bd59e18", "score": "0.5195677", "text": "public function add()\n\t{\n\t\t$url = $this -> basepath();\n\t\t$post = \\App\\App::getInstance() -> getTable('postsManager');\n\t\tif (!empty($_POST)) {\n\t\t\tif (!empty($_POST['title']) && !empty($_POST['chapo']) && !empty($_POST['content'])) {\n\t\t \t$new = $post -> create([\n\t\t\t\t'title' => $_POST['title'],\n\t\t\t\t'chapo' => $_POST['chapo'],\n\t\t \t\t'content' => $_POST['content'],\n\t\t \t\t'category_id' => $_POST['category_id'],\n\t\t \t\t'user_id' => $_SESSION['auth']\n\t\t\t\t]);\n\t\t\t$_SESSION['message'] = 'update/add';\n\t\t \t\n\t\t\t } else{\n\t\t\t $_SESSION['message'] = 'every input';\n\t\t\t }\n\t\t}\n\t\t$form = new \\App\\HTML\\Form();\n\t\t$categories = \\App\\App::getInstance() -> getTable('categoriesManager') -> selectCategories();\n\t\t$this -> page('admin/posts/add', compact('form', 'categories', 'url'));\n\t}", "title": "" }, { "docid": "379927ef2c97b311c4a305898f4bc81b", "score": "0.51927143", "text": "public function addPage(&$aPage, &$aTextArea)\n {\n $this->mPages[] = $aPage;\n $this->mTextAreas[] = $aTextArea;\n }", "title": "" }, { "docid": "f1ff644759baae4f7da191be0e69ccb5", "score": "0.5191585", "text": "function panierAdd(){\n\n if(!isAuthenticatedUser()){\n redirect(\"index.php?action=user&action2=loginForm\");\n }\n\n $ClassPanier = new PanierModel(); \n \n //appel des fontions du model\n $ClassPanier->addPanier((int)$_GET['id']);\n\n //appel de la vue\n require_once 'www/templates/panier/PanierView.phtml';\n}", "title": "" }, { "docid": "e604b324a07d3e4cb5b05cbdf6d36612", "score": "0.5180112", "text": "public function add()\n {\n// $tree = new Tree($category);\n// $str = \"<option value=\\$id \\$selected>\\$spacer\\$name</option>\"; //生成的形式\n// $category = $tree->get_tree(0, $str, 0);\n// $this->assign('category', $category);//导航\n $this->display('form');\n }", "title": "" } ]
ac6290c163ad2dd1f113e3e32f0c3515
Builds a new unmatched returns file.
[ { "docid": "2610ae875f07c00467c8f8dea9073db4", "score": "0.7476461", "text": "public function Build_Unmatched_File()\n\t{\n\t\teCash_EcldUnmatchedReturnFile::createNewFile($this->server->company_id);\n\t}", "title": "" } ]
[ { "docid": "4d5dca73abd016e8b3582d171ff64190", "score": "0.49935803", "text": "function generate_missing_files($path, $filename, $record) {\n if ($record[$filename.\".in\"] == NOT_FOUND) {\n $file = fopen($path.$filename.\".in\", \"w\");\n if (! $file) {\n fwrite(STDERR, \"Could not generate .in file\\n\");\n return FILE_ERROR;\n }\n fclose($file);\n }\n if ($record[$filename.\".out\"] == NOT_FOUND) {\n $file = fopen($path.$filename.\".out\", \"w\");\n if (! $file) {\n fwrite(STDERR, \"Could not generate .out file\\n\");\n return FILE_ERROR;\n }\n fclose($file);\n }\n if ($record[$filename.\".rc\"] == NOT_FOUND) {\n $file = fopen($path.$filename.\".rc\", \"w\");\n if (! $file) {\n fwrite(STDERR, \"Could not generate .rc file\\n\");\n return FILE_ERROR;\n }\n fwrite($file, \"0\");\n fclose($file);\n }\n}", "title": "" }, { "docid": "bcbd3b2686337104c31c415de596c04c", "score": "0.48373264", "text": "function genDiff(string $file1, string $file2, string $format = 'stylish'): string\n{\n $ast = parser($file1, $file2);\n\n $diff = render($ast, $format);\n\n return $diff;\n}", "title": "" }, { "docid": "df99d2d05231d4715762e9f63138a443", "score": "0.47906917", "text": "function add_coveragefile($buildid,$fullpath,$filecontent)\n{\n if(!is_numeric($buildid))\n {\n return;\n }\n \n // Compute the crc32 of the file\n $crc32 = crc32($fullpath.$filecontent);\n \n $coveragefile = pdo_query(\"SELECT id FROM coveragefile WHERE crc32='$crc32'\");\n add_last_sql_error(\"add_coveragefile\");\n \n if(pdo_num_rows($coveragefile)>0) // we have the same crc32\n {\n $coveragefile_array = pdo_fetch_array($coveragefile);\n $fileid = $coveragefile_array[\"id\"];\n\n // Update the current coverage.fileid\n $coverage = pdo_query(\"SELECT c.fileid FROM coverage AS c,coveragefile AS cf \n WHERE c.fileid=cf.id AND c.buildid='$buildid' \n AND cf.fullpath='$fullpath'\");\n $coverage_array = pdo_fetch_array($coverage);\n $prevfileid = $coverage_array[\"fileid\"];\n\n pdo_query (\"UPDATE coverage SET fileid='$fileid' WHERE buildid='$buildid' AND fileid='$prevfileid'\");\n add_last_sql_error(\"add_coveragefile\");\n\n // Remove the file if the crc32 is NULL\n pdo_query (\"DELETE FROM coveragefile WHERE id='$prevfileid' AND file IS NULL and crc32 IS NULL\");\n add_last_sql_error(\"add_coveragefile\");\n }\n else // The file doesn't exist in the database\n {\n // We find the current fileid based on the name and the file should be null\n $coveragefile = pdo_query(\"SELECT cf.id,cf.file FROM coverage AS c,coveragefile AS cf \n WHERE c.fileid=cf.id AND c.buildid='$buildid' \n AND cf.fullpath='$fullpath' ORDER BY cf.id ASC\");\n $coveragefile_array = pdo_fetch_array($coveragefile);\n $fileid = $coveragefile_array[\"id\"];\n pdo_query (\"UPDATE coveragefile SET file='$filecontent',crc32='$crc32' WHERE id='$fileid'\"); \n add_last_sql_error(\"add_coveragefile\");\n }\n \n return $fileid;\n}", "title": "" }, { "docid": "dd9a5c09db10fef5231405a46159532a", "score": "0.47718486", "text": "static function buildHashFile($mofile, $outfile=false, $return=false) {\n if (!$outfile) {\n $stream = fopen('php://stdout', 'w');\n }\n elseif (is_string($outfile)) {\n $stream = fopen($outfile, 'w');\n }\n elseif (is_resource($outfile)) {\n $stream = $outfile;\n }\n\n if (!$stream)\n throw new InvalidArgumentException(\n 'Expected a filename or valid resource');\n\n if (!$mofile instanceof FileReader)\n $mofile = new FileReader($mofile);\n\n $reader = new parent($mofile, true);\n\n if ($reader->short_circuit || $reader->error)\n throw new Exception('Unable to initialize MO input file');\n\n $reader->load_tables();\n\n // Get basic table\n if (!($table = $reader->cache_translations))\n throw new Exception('Unable to read translations from file');\n\n // Transcode the table to UTF-8\n $header = $table[\"\"];\n $info = array();\n preg_match('/^content-type: (.*)$/im', $header, $info);\n $charset = false;\n if ($content_type = $info[1]) {\n // Find the charset property\n $settings = explode(';', $content_type);\n foreach ($settings as $v) {\n @list($prop, $value) = explode('=', trim($v), 2);\n if (strtolower($prop) == 'charset') {\n $charset = trim($value);\n break;\n }\n }\n }\n if ($charset && strcasecmp($charset, 'utf-8') !== 0) {\n foreach ($table as $orig=>$trans) {\n // Format::encode defaults to UTF-8 output\n $source = new Unicode($orig, $charset);\n $trans = new Unicode($trans, $charset);\n $table[(string) $source->encode('utf-8')] =\n (string) $trans->encode('utf-8');\n unset($table[$orig]);\n }\n }\n\n // Add in some meta-data\n $table[self::META_HEADER] = array(\n 'Revision' => $reader->revision, // From the MO\n 'Total-Strings' => $reader->total, // From the MO\n 'Table-Size' => count($table), // Sanity check for later\n 'Build-Timestamp' => gmdate(DATE_RFC822),\n 'Format-Version' => 'A', // Support future formats\n 'Encoding' => 'UTF-8',\n );\n\n // Serialize the PHP array and write to output\n $contents = sprintf('<?php return %s;', var_export($table, true));\n if ($return)\n return $contents;\n else\n fwrite($stream, $contents);\n }", "title": "" }, { "docid": "3d3cfe60f90a26c9708d120faab19216", "score": "0.47581026", "text": "public function testExtractCurrentKeepExistingFile()\n {\n $targetDir = $this->getTempDir() . \"/\";\n $this->archive->extractCurrent( $targetDir, true );\n\n $file1 = $this->getTempDir() . \"/file1.txt\";\n $this->assertEquals( \"Hello world.\\nThe first file.\\n\", file_get_contents( $file1 ) );\n\n $fp = @fopen( $file1, \"w\" );\n fwrite( $fp, \"Garbage\" );\n fclose( $fp );\n\n $this->assertEquals( \"Garbage\", file_get_contents( $file1 ) );\n\n $this->archive->extractCurrent( $targetDir, true );\n $this->assertEquals( \"Garbage\", file_get_contents( $file1 ) );\n }", "title": "" }, { "docid": "ba150b7d7d02f4724d0da4c28aa2c174", "score": "0.4716294", "text": "public function testFiles() {\n foreach (scandir(RASMUS_TEST_FILE_DIR) as $test_file_name) {\n // Skip '.' and '..'\n if (empty($test_file_name)\n || '.' === $test_file_name\n || '..' === $test_file_name\n ) {\n continue;\n }\n\n // Get the path to the test file\n $test_file_path =\n RASMUS_TEST_FILE_DIR . '/' . $test_file_name;\n\n // Get the path of the expected output file\n $expected_file_path =\n RASMUS_EXPECTED_DIR . '/' . $test_file_name . '.expected';\n\n // Read the expected output\n $expected_output =\n trim(file_get_contents($expected_file_path));\n\n // Start reading everything sent to STDOUT\n // and compare it to the expected value once\n // the analzyer finishes running\n ob_start();\n\n try {\n // Run the analyzer\n (new Phan)->analyzeFileList(\n clone($this->code_base),\n [$test_file_path]\n );\n } catch (Exception $exception) {\n // TODO: inexplicably bad things happen here\n // print \"\\n\" . $exception->getMessage() . \"\\n\";\n }\n\n $output = trim(ob_get_clean());\n $wanted_re = preg_replace('/\\r\\n/', \"\\n\", $expected_output);\n\t\t\t// do preg_quote, but miss out any %r delimited sections\n $temp = \"\";\n $r = \"%r\";\n $startOffset = 0;\n $length = strlen($wanted_re);\n while($startOffset < $length) {\n $start = strpos($wanted_re, $r, $startOffset);\n if ($start !== false) {\n // we have found a start tag\n $end = strpos($wanted_re, $r, $start+2);\n if ($end === false) {\n // unbalanced tag, ignore it.\n $end = $start = $length;\n }\n } else {\n // no more %r sections\n $start = $end = $length;\n }\n // quote a non re portion of the string\n $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/');\n // add the re unquoted.\n if ($end > $start) {\n $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')';\n }\n $startOffset = $end + 2;\n }\n $wanted_re = $temp;\n $wanted_re = str_replace(['%binary_string_optional%'], 'string', $wanted_re);\n $wanted_re = str_replace(['%unicode_string_optional%'], 'string', $wanted_re);\n $wanted_re = str_replace(['%unicode\\|string%', '%string\\|unicode%'], 'string', $wanted_re);\n $wanted_re = str_replace(['%u\\|b%', '%b\\|u%'], '', $wanted_re);\n // Stick to basics\n $wanted_re = str_replace('%e', '\\\\' . DIRECTORY_SEPARATOR, $wanted_re);\n $wanted_re = str_replace('%s', '[^\\r\\n]+', $wanted_re);\n $wanted_re = str_replace('%S', '[^\\r\\n]*', $wanted_re);\n $wanted_re = str_replace('%a', '.+', $wanted_re);\n $wanted_re = str_replace('%A', '.*', $wanted_re);\n $wanted_re = str_replace('%w', '\\s*', $wanted_re);\n $wanted_re = str_replace('%i', '[+-]?\\d+', $wanted_re);\n $wanted_re = str_replace('%d', '\\d+', $wanted_re);\n $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re);\n $wanted_re = str_replace('%f', '[+-]?\\.?\\d+\\.?\\d*(?:[Ee][+-]?\\d+)?', $wanted_re);\n $wanted_re = str_replace('%c', '.', $wanted_re);\n // %f allows two points \"-.0.0\" but that is the best *simple* expression\n\n $this->assertRegExp(\"/^$wanted_re\\$/\", $output, \"Unexpected output in $test_file_path\");\n }\n }", "title": "" }, { "docid": "c85a48e653ce28898d0d4aa3f8a62838", "score": "0.47122207", "text": "protected function checkExistingFiles()\n {\n $this->buildMinifiedFilename();\n\n if (file_exists($this->outputDir . $this->filename) && filesize($this->outputDir . $this->filename) > 0)\n {\n $this->minifiedText .= file_get_contents($this->outputDir . $this->filename);\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "83e7653787f3af7cc402019c00d7b1c3", "score": "0.46698752", "text": "function backup_xml_file($parser,$contents,$projectid)\n{\n \n // If the content of the file is empty we return\n if(strlen($contents)==0)\n {\n return; \n }\n\n include(\"cdash/config.php\");\n require_once(\"cdash/pdo.php\");\n \n clean_backup_directory(); // should probably be run as a cronjob\n \n if(@$parser->index[\"BUILD\"] != \"\")\n {\n $file = \"Build.xml\";\n }\n else if(@$parser->index[\"CONFIGURE\"] != \"\")\n {\n $file = \"Configure.xml\";\n }\n else if(@$parser->index[\"TESTING\"] != \"\")\n {\n $file = \"Test.xml\";\n }\n else if(@$parser->index[\"UPDATE\"] != \"\")\n {\n $file = \"Update.xml\";\n } \n else if(@$parser->index[\"COVERAGE\"] != \"\")\n {\n $file = \"Coverage.xml\";\n } \n else if(@$parser->index[\"COVERAGELOG\"] != \"\")\n {\n $file = \"CoverageLog.xml\";\n }\n else if(@$parser->index[\"NOTES\"] != \"\")\n {\n $file = \"Notes.xml\";\n }\n else if(@$parser->index[\"DYNAMICANALYSIS\"] != \"\")\n {\n $file = \"DynamicAnalysis.xml\";\n } \n else\n {\n $file = \"Other.xml\";\n }\n \n // For some reasons the update.xml has a different format\n if(@$parser->index[\"UPDATE\"] != \"\")\n {\n $vals = $parser->vals;\n $sitename = getXMLValue($vals,\"SITE\",\"UPDATE\");\n $name = getXMLValue($vals,\"BUILDNAME\",\"UPDATE\");\n $stamp = getXMLValue($vals,\"BUILDSTAMP\",\"UPDATE\");\n }\n else\n {\n $site = $parser->index[\"SITE\"];\n $sitename = $parser->vals[$site[0]][\"attributes\"][\"NAME\"]; \n $name = $parser->vals[$site[0]][\"attributes\"][\"BUILDNAME\"];\n $stamp = $parser->vals[$site[0]][\"attributes\"][\"BUILDSTAMP\"];\n }\n \n $filename = $CDASH_BACKUP_DIRECTORY.\"/\".get_project_name($projectid).\"_\".$sitename.\"_\".$name.\"_\".$stamp.\"_\".$file;\n \n // If the file is other we append a number until we get a non existing file\n $i=1;\n while($file==\"Other.xml\" && file_exists($filename))\n {\n $filename = $CDASH_BACKUP_DIRECTORY.\"/\".get_project_name($projectid).\"_\".$sitename.\"_\".$name.\"_\".$stamp.\"_Other.\".$i.\".xml\";\n $i++;\n }\n \n while($file==\"CoverageLog.xml\" && file_exists($filename))\n {\n $filename = $CDASH_BACKUP_DIRECTORY.\"/\".get_project_name($projectid).\"_\".$sitename.\"_\".$name.\"_\".$stamp.\"_CoverageLog.\".$i.\".xml\";\n $i++;\n }\n \n if (!$handle = fopen($filename, 'w')) \n {\n echo \"Cannot open file ($filename)\";\n add_log(\"Cannot open file ($filename)\", \"backup_xml_file\");\n return;\n }\n \n // Write the file.\n if (fwrite($handle, $contents) === FALSE) \n {\n echo \"Cannot write to file ($contents)\";\n add_log(\"Cannot write to file ($$contents)\", \"backup_xml_file\");\n fclose($handle);\n return;\n }\n \n fclose($handle);\n}", "title": "" }, { "docid": "c329e4e3538c7f6edb7d7074c9e27f9e", "score": "0.46596226", "text": "protected function makeFileLog()\n\t{\n\t\t$date = date('Y-m-d');\n\n\t\t$file = strtr($this->file_format, [\n\t\t\t'{date}' => $date,\n\t\t]);\n\n\t\treturn $this->path($file);\n\t}", "title": "" }, { "docid": "8214a039c1e6d75fc3807e418d40c795", "score": "0.46521235", "text": "private function _findBuildFile($start, $suffix) {\n $startf = new PhingFile($start);\n $parent = new PhingFile($startf->getAbsolutePath());\n $file = new PhingFile($parent, $suffix);\n\n // check if the target file exists in the current directory\n while (!$file->exists()) {\n // change to parent directory\n $parent = $this->_getParentFile($parent);\n\n // if parent is null, then we are at the root of the fs,\n // complain that we can't find the build file.\n if ($parent === null) {\n throw new ConfigurationException(\"Could not locate a build file!\");\n }\n // refresh our file handle\n $file = new PhingFile($parent, $suffix);\n }\n return $file;\n }", "title": "" }, { "docid": "0a2526ce17b2c805b34f3f58340bc736", "score": "0.46145916", "text": "public function generate($build) {\n\t\t$this->_fileList = array();\n\t\t$output = '';\n\t\tforeach ($this->_getFilesList($build) as $file) {\n\t\t\t$content = $this->_readFile($file);\n\t\t\t$content = $this->_FilterCollection->input($file, $content);\n\t\t\t$output .= $content . \"\\n\";\n\t\t}\n\t\tif (Configure::read('debug') < 2 || php_sapi_name() === 'cli') {\n\t\t\t$output = $this->_FilterCollection->output($build, $output);\n\t\t}\n\t\treturn trim($output);\n\t}", "title": "" }, { "docid": "682104c3f2b01f6dd03f962801e7103e", "score": "0.46082056", "text": "public function testOpenExistingBuildFile()\n {\n file_put_contents( $this->fileName, $this->buildXML );\n\n // Check to be sure that the file exists.\n $this->assertFileExists( $this->fileName );\n\n $buildFile = new phpucBuildFile( $this->fileName );\n\n $this->assertEquals( $this->projectName, $buildFile->projectName );\n }", "title": "" }, { "docid": "978d382e84e9e7e8e43882e16254b041", "score": "0.45765683", "text": "public function testExtractCurrentOverwriteFile()\n {\n $targetDir = $this->getTempDir() . \"/\";\n $this->archive->extractCurrent( $targetDir );\n\n $file1 = $this->getTempDir() . \"/file1.txt\";\n $this->assertEquals( \"Hello world.\\nThe first file.\\n\", file_get_contents( $file1 ) );\n\n $fp = @fopen( $file1, \"w\" );\n fwrite( $fp, \"Garbage\" );\n fclose( $fp );\n\n $this->assertEquals( \"Garbage\", file_get_contents( $file1 ) );\n\n $this->archive->extractCurrent( $targetDir );\n $this->assertEquals( \"Hello world.\\nThe first file.\\n\", file_get_contents( $file1 ) );\n }", "title": "" }, { "docid": "786b20ca6de7e1125472e4a77cd44b8c", "score": "0.4560919", "text": "public function testReadUnsuccessful()\n {\n $base = substr(__DIR__, 0, strlen(__DIR__) - 5);\n $this->path = $base . '/.dev/Tests/Data/testreally-is-not-there.txt';\n $results = $this->adapter->read($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "2fa6eba12693a38e4e48badba5db2e69", "score": "0.4553412", "text": "public function build($filename)\r\n {\r\n return new File($filename);\r\n }", "title": "" }, { "docid": "e814febf840f0a2432d680cc5a1ee1ba", "score": "0.45529383", "text": "function charges($folder)\n{\n global $targetDir, $sourceDir, $keep, $tempDir, $colours;\n\n $sources = scandir($sourceDir . \"charges/$folder\");\n $targets = scandir($targetDir . \"charges/$folder\");\n\n\n /*\n **\tCreate anything in source dir NOT in target dir\n * OR if source is newer than target\n */\n\n foreach ($sources as $sourceItem) {\n if ($sourceItem[0] == '.' || substr($sourceItem, -4) != '.svg') continue;\n $toFind = mapping($folder, substr($sourceItem, 0, -4), null);\n // echo $toFind . '.png ' . (in_array($toFind . '.png', $targets) ? 'found ' : 'not found ') . filemtime(\"$sourceDir/charges/$folder/$sourceItem\") . ' ' .\n //filemtime(\"$targetDir/charges/$folder/$toFind.png\") . PHP_EOL;\n if (!in_array($toFind . '.png', $targets) /*||\n filemtime(\"$sourceDir/charges/$folder/$sourceItem\") >\n filemtime(\"$targetDir/charges/$folder/$toFind.png\") */) {\n $features = getFeatures(\"$sourceDir/charges/$folder/$sourceItem\", \"$targetDir/charges/$folder/$toFind.txt\");\n $specifier = is_numeric($toFind[0]) ? ' ' : ' a ';\n $blazon = \"argent $specifier \" .\n str_replace('-', ' ', $toFind) . \" grey\";\n for ($i = 0; $i < count($features); $i++) {\n $blazon .= ' ' . $features[$i] . ' ' . $colours[$i][0];\n }\n $blazon = rawurlencode($blazon);\n $execString = 'wget -q -O ' . \"$targetDir/charges/$folder/$toFind.png\" .\n ' \"http://test.drawshield.net/include/quickimage.php?blazon=' . $blazon .\n '&outputformat=png&size=400&effect=none&nomask=1\"';\n // echo \"Executing $execString\\n\";\n echo \"Adding $toFind\\n\";\n exec($execString);\n }\n }\n}", "title": "" }, { "docid": "21e89e77dc1f27a937e9cde927314d58", "score": "0.45401937", "text": "public function getFileBuilder();", "title": "" }, { "docid": "8f510c28105a3cf6c5dc0e51f5a5cd69", "score": "0.45349598", "text": "public function invalid()\n\t{\n\t\t$this->valid = false;\n\t\t$this->mtime = 0;\n\t\t$this->fileSize = 0;\n\t\t$this->mimeType = '';\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a5d335e5acb22e2c2d11dd14666da9ff", "score": "0.45319003", "text": "function codegenerator_generatestringfromfile ($instance,$inFileName) {}", "title": "" }, { "docid": "4591aca3bfbbeede34b3677cf977c336", "score": "0.4528033", "text": "public function generateFile()\n {\n // some filesystem doesn't support a directory with many file\n // store file in three subfolder level\n $path = DIRECTORY_SEPARATOR.substr($this->slug, 0, 1).DIRECTORY_SEPARATOR.substr($this->slug, 1, 1).DIRECTORY_SEPARATOR.substr($this->slug, 2, 1);\n $path .= DIRECTORY_SEPARATOR.substr($this->slug, 3);\n \n $this->setFile($path);\n \n return $this->file;\n }", "title": "" }, { "docid": "1aa00cb9c6add12a67f6d972f57d274d", "score": "0.4526356", "text": "public function Search_Unmatched_Returns($from_date, $to_date)\n\t{\n\t\t$from = $from_date->from_date_year . $from_date->from_date_month . $from_date->from_date_day;\n\t\t$to = $to_date->to_date_year . $to_date->to_date_month . $to_date->to_date_day;\n\t\t\n\t\t$data = new stdClass;\n\t\t$data->pending_count = eCash_EcldUnmatchedReturn::countAllUnrecievedMatches($this->server->company_id);\n\t\t$data->unmatched_returns = array();\n\n\t\tforeach(eCash_EcldUnmatchedReturnFile::listMatchingFiles($from, $to, $this->server->company_id) as $file )\n\t\t{\n\t\t\t$new_row = new stdClass();\n\t\t\t$new_row->date_created = date('m/d/Y', strtotime($file['date_created']));\n\t\t\t$new_row->file_name = $file['file_name'];\n\t\t\t$new_row->file_id = $file['ecld_unmatched_return_file_id'];\n\t\t\t$new_row->count = $file['cnt'];\n\t\t\t\n\t\t\t$data->unmatched_returns[] = $new_row;\n\t\t}\n\t\tECash::getTransport()->Set_Data($data);\n\n\t\tECash::getTransport()->Add_Levels('unmatched_returns');\n\t}", "title": "" }, { "docid": "42a21fa46b79ffe58a9f141fac13bcb4", "score": "0.45029318", "text": "public function compareFile($originalFile='', $newFile='', $fileOutput=false){\n if ((file_exists($originalFile)) && (file_exists($newFile))) {\n // Both File exist\n\n // Getting File content\n $originalContent = file_get_contents($originalFile);\n $newContent = file_get_contents($newFile);\n\n // Comparing the files\n $comparedContent = $this->comparer->getdiff($originalContent, $newContent);\n\n // Saving compared data into a new file\n if($fileOutput){\n $newFileName = $this->outputDirectory.'/'.basename($originalFile, '.json').'_compared.json';\n file_put_contents($newFileName, $comparedContent);\n }\n\n return json_decode($comparedContent, true);\n\n } else {\n throw new Exception(\"File \".$originalFile.\" or file \".$newFile.\" does not exist\");\n }\n }", "title": "" }, { "docid": "bc239acac240218e1321e8c118e887cd", "score": "0.45027888", "text": "public function createSafeToTableFile($file, $user, $project, $table, $tableComparer, $fieldComparerNumber){\n\t\tif(!$this->session->userdata('is_logged_in')) {echo \"LOGGED OUT\"; return 0;}\n\t\tif($this->session->userdata('admin') > 2){echo \"LOW PERMISSION\"; return 0;}\n\t\tif(!file_exists($file)){return 0;}\n\t\t\n\t\t$inputHandle = fopen($file, \"r\");\n\t\t$outputHandle = fopen($file.\".safe.txt\", \"w\");\n\t\t\n\t\t\n\t\t\n\t\t$order = array(\"\\r\\n\", \"\\r\");\n\t\t$replace = '\\n';\n\t\t\n\t\t$duplicates = array();\n\t\t$nonduplicates = array();\n\t\t\n\t\tif($inputHandle){\n\t\t\twhile(($line = fgets($inputHandle)) !== false){\n\t\t\t\t$fields = explode(\"\\t\", $line);\n\t\t\t\t$fileComparer = $fields[$fieldComparerNumber];\n\t\t\t\t//Did I already find it to be a nonduplicate? if so just go ahead and write\n\t\t\t\tif(in_array($fileComparer, $nonduplicates)){\n\t\t\t\t\tfwrite($outputHandle, str_replace($order, $replace, $line)); // Note new line conversion\n\t\t\t\t} else {\n\t\t\t\t\t// Did I already find it to be a duplicate? If so then skip the check, it's a duplicate and has already been reported\n\t\t\t\t\tif(!in_array($fileComparer, $duplicates)){\n\t\t\t\t\t\t$query = $this->db->query(\"SELECT * FROM $table WHERE user_id = '$user' AND project_id = '$project' AND $tableComparer = '$fileComparer'\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($query->num_rows() == 0){\n\t\t\t\t\t\t\tfwrite($outputHandle, str_replace($order, $replace, $line)); // Note new line conversion\n\t\t\t\t\t\t\t$nonduplicates[] = $fileComparer; // Make sure to update the nonduplicates\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo $fileComparer.\" is a duplicate entry<br>\";\n\t\t\t\t\t\t\t$duplicates[] = $fileComparer; // Make sure to update the duplicates\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tfclose($inputHandle);\n\t\tfclose($outputHandle);\n\t\t\n\t\treturn $file.\".safe.txt\";\n\t}", "title": "" }, { "docid": "209b402fcdc71407399d682e5b3783b5", "score": "0.44752106", "text": "private function create_file()\n {\n $this->_file = $this->_path.'/codeigniter_'.hash('md5', time()).'.zip';\n return $this;\n }", "title": "" }, { "docid": "dc4891f21d7e0aee0f3bc52078eefe4c", "score": "0.44311962", "text": "public function getNewFilePath()\n {\n //Get the directory path of the source file\n $path = dirname($this->sourceFile);\n\n //Create new unique file name\n $this->fileName = time() . '_' . $this->fileName;\n\n return $path . $this->fileName;\n }", "title": "" }, { "docid": "147eae1cc8e608d27827ea4591327e00", "score": "0.44298765", "text": "public function getConfig ( $file_name )\r\n\t{\r\n\t\t$should_create = true;\r\n\t\tif ( $file_name != null && file_exists( $file_name ) )\r\n\t\t{\r\n\t\t\t// check that the output file is newer than the 2 sources \r\n\t\t\t$t1 = filemtime ( $this->base_file );\r\n\t\t\t$t2 = filemtime ( $this->referrer_file );\r\n\t\t\t$t_out = filemtime ( $file_name );\r\n\t\t\tif ( $t_out >= $t1 && $t_out >= $t2 )\r\n\t\t\t\t$should_create = false;\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\tif ( $should_create )\r\n\t\t{\r\n\t\t\t$res = $this->merge ( );\r\n\t\t\t\r\n\t\t\tif ( $file_name != null )\r\n\t\t\t{\r\n\t\t\t\tfile_put_contents( $file_name , $res ); // sync - OK\r\n\t\t\t\t$this->created_cache = true; \r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$res = file_get_contents( $file_name );\r\n\t\t}\r\n\t\t\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "60ca4bc336ca8e7d85559fbf21815f9e", "score": "0.44230646", "text": "function xdiff_file_patch($file, $patch, $dest, $flags = false)\n{\n}", "title": "" }, { "docid": "2cf58ab2e9b3b654eee91a55c73f25ef", "score": "0.44062167", "text": "function create_image_from_source_file()\r\n {\r\n \r\n // performs some error checking first\r\n // if source file does not exists\r\n if (!is_file($this->sourceFile) || !file_exists($this->sourceFile)) {\r\n \r\n // save the error level and stop the execution of the script\r\n $this->error = 1;\r\n return false;\r\n \r\n // if source file is not readable\r\n } elseif (!is_readable($this->sourceFile)) {\r\n \r\n // save the error level and stop the execution of the script\r\n $this->error = 2;\r\n return false;\r\n \r\n // if target file is same as source file and source file is not writable\r\n } elseif ($this->targetFile == $this->sourceFile && !is_writable($this->sourceFile)) {\r\n \r\n // save the error level and stop the execution of the script\r\n $this->error = 3;\r\n return false;\r\n \r\n // get source file width, height and type\r\n // and if it founds a not-supported file type\r\n } elseif (!list($sourceImageWidth, $sourceImageHeight, $sourceImageType) = @getimagesize($this->sourceFile)) {\r\n \r\n // save the error level and stop the execution of the script\r\n $this->error = 4;\r\n return false;\r\n \r\n // if no errors so far\r\n } else {\r\n\r\n // creates an image from file using extension dependant function\r\n // checks for file extension\r\n switch ($sourceImageType) {\r\n \r\n // if gif\r\n case 1:\r\n \r\n // the following part gets the transparency color for a gif file\r\n // this code is from the PHP manual and is written by\r\n // fred at webblake dot net and webmaster at webnetwizard dotco dotuk, thanks!\r\n $fp = fopen($this->sourceFile, \"rb\");\r\n $result = fread($fp, 13);\r\n $colorFlag = ord(substr($result,10,1)) >> 7;\r\n $background = ord(substr($result,11));\r\n if ($colorFlag) {\r\n $tableSizeNeeded = ($background + 1) * 3;\r\n $result = fread($fp, $tableSizeNeeded);\r\n $this->transparentColorRed = ord(substr($result, $background * 3, 1));\r\n $this->transparentColorGreen = ord(substr($result, $background * 3 + 1, 1));\r\n $this->transparentColorBlue = ord(substr($result, $background * 3 + 2, 1));\r\n }\r\n fclose($fp);\r\n // -- here ends the code related to transparency handling\r\n // creates an image from file\r\n \r\n $sourceImageIdentifier = @imagecreatefromgif($this->sourceFile);\r\n break;\r\n \r\n // if jpg\r\n case 2:\r\n \r\n // creates an image from file\r\n $sourceImageIdentifier = @imagecreatefromjpeg($this->sourceFile);\r\n break;\r\n \r\n // if png\r\n case 3:\r\n \r\n // creates an image from file\r\n $sourceImageIdentifier = @imagecreatefrompng($this->sourceFile);\r\n break;\r\n \r\n default:\r\n \r\n // if file has an unsupported extension\r\n // note that we call this if the file is not gif, jpg or png even though the getimagesize function\r\n // handles more image types\r\n $this->error = 4;\r\n return false;\r\n \r\n }\r\n \r\n }\r\n \r\n // if the date/time of the target file should be the same as the source file's\r\n if ($this->preserveSourceFileTime) {\r\n \r\n // read the source file's date/time\r\n $this->sourceFileTime = filemtime($this->sourceFile);\r\n \r\n }\r\n\r\n // returns an image identifier representing the image obtained from sourceFile and the image's width and height\r\n return array($sourceImageIdentifier, $sourceImageWidth, $sourceImageHeight, $sourceImageType);\r\n \r\n }", "title": "" }, { "docid": "f76be6a2a2fd742749f1ff787cbf6359", "score": "0.44044548", "text": "protected static function createWithDiffReport(): string\n {\n return <<<'XML'\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <checkstyle>\n <file name=\"someFile.php\">\n <error severity=\"warning\" source=\"PHP-CS-Fixer.some_fixer_name_here\" message=\"Found violation(s) of type: some_fixer_name_here\" />\n </file>\n </checkstyle>\n XML;\n }", "title": "" }, { "docid": "98579983be03c89ae316a813dc2ac7ee", "score": "0.44015187", "text": "public function generateAlternative($filePath, array $format);", "title": "" }, { "docid": "f6291b10db45f62da09fed32d462c03e", "score": "0.4395937", "text": "function filter_file($fname_in, $fname_out, $replace) {\n #print \"filter_file:\\n$fname_in\\n$fname_out\\n$replace\\n\";\n if(!file_exists($fname_in)){\n print \"no input file\\n\";\n\treturn;\n }\n $fdi = fopen($fname_in, \"r\");\n if($fdi){\n $fdo = fopen($fname_out, \"w\");\n if($fdo){\n while(!feof($fdi)){\n $str = fgets($fdi, 4096);\n $res = preg_replace (\"/%ROOT%/\", $replace, $str);\n fputs($fdo, $res);\n }\n fclose($fdo);\n }\n fclose($fdi);\n }\n #print \"filter_file end\\n\";\n}", "title": "" }, { "docid": "24be67498aa13a91c4c03d32d4ae47ee", "score": "0.4374709", "text": "public function testReadNotAFile()\n {\n $base = substr(__DIR__, 0, strlen(__DIR__) - 5);\n $this->path = $base . '/.dev/Tests';\n $results = $this->adapter->read($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "3867d5608153352f428b68b1cacc44e4", "score": "0.43698332", "text": "protected function _getResultFile()\n {\n // Normalize relative path\n $relPath = Slug::filter($this->_hash, '_');\n $relPath = Str::low($relPath);\n\n if (!$this->_options->get('debug')) {\n $relPath .= '.min';\n }\n\n // Get full clean path\n $fullPath = FS::real($this->_options->get('cache_path')) . '/' . $relPath . '.css';\n $fullPath = FS::clean($fullPath);\n\n return $fullPath;\n }", "title": "" }, { "docid": "c1519a2df61be7301d73ff879a99e00d", "score": "0.43676287", "text": "public function main() {\n \n $savedTransaction = array();\n for($i=0,$size=count($this->transactions); $i < $size; $i++) {\n $savedTransaction[] = clone $this->transactions[$i];\n }\n \n $savedSqlCommand = $this->sqlCommand;\n\n $this->sqlCommand = trim($this->sqlCommand);\n\n try {\n if ($this->srcFile === null && $this->sqlCommand === \"\" \n && empty($this->filesets)) { \n if (count($this->transactions) === 0) {\n throw new BuildException(\"Source file or fileset, \"\n . \"transactions or sql statement \"\n . \"must be set!\", $this->location);\n }\n }\n \n if ($this->srcFile !== null && !$this->srcFile->exists()) {\n throw new BuildException(\"Source file does not exist!\", $this->location);\n }\n\n // deal with the filesets\n for ($i = 0,$size=count($this->filesets); $i < $size; $i++) {\n $fs = $this->filesets[$i];\n $ds = $fs->getDirectoryScanner($this->project);\n $srcDir = $fs->getDir($this->project);\n \n $srcFiles = $ds->getIncludedFiles();\n \n // Make a transaction for each file\n for ($j=0, $size=count($srcFiles); $j < $size; $j++) {\n $t = $this->createTransaction();\n $t->setSrc(new PhingFile($srcDir, $srcFiles[$j]));\n }\n }\n \n // Make a transaction group for the outer command\n $t = $this->createTransaction();\n if ($this->srcFile) $t->setSrc($this->srcFile);\n $t->addText($this->sqlCommand);\n $this->conn = $this->getConnection();\n\n try {\n \n $this->statement = $this->conn->createStatement();\n \n $out = null;\n \n try {\n \n if ($this->output !== null) {\n $this->log(\"Opening output file \" . $this->output, Project::MSG_VERBOSE);\n $out = new BufferedWriter(new FileWriter($this->output->getAbsolutePath(), $this->append));\n }\n \n // Process all transactions\n for ($i=0,$size=count($this->transactions); $i < $size; $i++) {\n $this->transactions[$i]->runTransaction($out);\n if (!$this->isAutocommit()) {\n $this->log(\"Commiting transaction\", Project::MSG_VERBOSE);\n $this->conn->commit();\n }\n }\n if ($out) $out->close();\n } catch (Exception $e) {\n if ($out) $out->close();\n throw $e;\n } \n } catch (IOException $e) {\n if (!$this->isAutocommit() && $this->conn !== null && $this->onError == \"abort\") {\n try {\n $this->conn->rollback();\n } catch (SQLException $ex) {}\n }\n throw new BuildException($e->getMessage(), $this->location);\n } catch (SQLException $e){\n if (!$this->isAutocommit() && $this->conn !== null && $this->onError == \"abort\") {\n try {\n $this->conn->rollback();\n } catch (SQLException $ex) {}\n }\n throw new BuildException($e->getMessage(), $this->location);\n }\n \n $this->log($this->goodSql . \" of \" . $this->totalSql .\n \" SQL statements executed successfully\");\n } catch (Exception $e) {\n $this->transactions = $savedTransaction;\n $this->sqlCommand = $savedSqlCommand;\n throw $e;\n }\n // finally {\n $this->transactions = $savedTransaction;\n $this->sqlCommand = $savedSqlCommand;\n \n }", "title": "" }, { "docid": "85fce974de011ad4991072200b587305", "score": "0.43586335", "text": "public function testMergeWithDifferentFile(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n\n $this->file->mergeWith(new File('/the/wrong/file/name.php'));\n }", "title": "" }, { "docid": "500fa23c92b8b99edf0d108b3fdaa39f", "score": "0.43521324", "text": "private function createCacheFile () {\r\n\t\tif (!($fp = fopen($this->cacheFile, 'w'))) return false;\r\n\t\tif (!fwrite($fp, $this->html)) return false; \r\n\t\tif (!fclose($fp)) return false; \r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "011616057ae0980592906de53fab7fb6", "score": "0.43496907", "text": "function test_both($file, $expected_value, $out, $in){\n $return_values = array();\n global $interpretpy;\n global $parsephp;\n global $fail;\n global $success;\n\n exec(\"php7.3 $parsephp < $file\", $test_output, $test_return_value);\n\n if ($test_return_value == 0){\n $xml_input = preg_replace('/(.src)$/', \".xml\", $file);\n $generated_file = fopen($xml_input, \"w\");\n foreach($test_output as $xml_instruction){\n fwrite($generated_file, $xml_instruction);\n }\n fclose($generated_file);\n $values = test_interpret_or_parser($xml_input, $expected_value, $out, $in, \"interpret\");\n unlink($xml_input);\n array_push($return_values, $values[0], $values[1], $values[2], $values[3], $values[4]);\n }\n else{\n if ($test_return_value == $expected_value){\n array_push($return_values, $file, $expected_value, $test_return_value, \"\", \"OKAY\");\n $success++;\n }\n else{\n array_push($return_values, $file, $expected_value, $test_return_value, \"\", \"FAILED\");\n $fail++;\n }\n }\n return $return_values;\n\n}", "title": "" }, { "docid": "319341779cd0f0cdc3b485d95134d41b", "score": "0.4343821", "text": "function prepare_newFile()\n\t{\n\t\t$date = new Api\\DateTime();\n\t\t$use_id = $GLOBALS['egw_info']['user']['account_id'];\n\t\t$response = array (\n\t\t\t'result' => 'new_ops',\n\t\t\t'ops'=> array (\n\t\t\t\t0 => array (\n\t\t\t\t\t'optype' => 'AddMember',\n\t\t\t\t\t'memberid' => '0',\n\t\t\t\t\t'timestamp' => $date->getTimestamp(),\n\t\t\t\t\t'setProperties' => array(\n\t\t\t\t\t\t'fullName' => $GLOBALS['egw_info']['user']['account_fullname'],\n\t\t\t\t\t\t'color' => $GLOBALS['egw_info']['user']['preferences']['filemanager']['collab_user_color'],\n\t\t\t\t\t\t'imageUrl' => $GLOBALS['egw_info']['server']['webserver_url'].'/api/avatar.php?account_id='.$use_id,\n\t\t\t\t\t\t'uid' => $use_id\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'head_seq' => '1'\n\t\t);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "5aaf04338c2dec8895a1ccd85f7acb9d", "score": "0.43422738", "text": "public function testInitNewBuildFile()\n {\n $this->assertFileNotExists( $this->fileName );\n\n $buildFile = new phpucBuildFile( $this->fileName, $this->projectName );\n $buildFile->store();\n\n $this->assertFileExists( $this->fileName );\n\n $this->assertXmlStringEqualsXmlString(\n $this->buildXML,\n file_get_contents( $this->fileName )\n );\n }", "title": "" }, { "docid": "54bf7e6ac83befa8fe83b645717f8268", "score": "0.4322642", "text": "public function run() {\n // keep this line\n if (!parent::run()) { return false ; }\n\n $dir_name = NULL;\n $base_file_name = NULL; \n $extension = NULL;\n $use_gzip = FALSE;\n foreach (static::$expected_extensions as $expected_extension) {\n $regex = str_replace('.', '\\.', $expected_extension);\n if (preg_match(\"/$regex$/\", $this->input_file_name)) {\n $base_name = basename($this->input_file_name, $expected_extension);\n $dir_name = dirname($this->input_file_name);\n $extension = $expected_extension;\n break;\n }\n }\n if ($base_name === NULL) {\n $base_name = basename($this->input_file_name);\n $dir_name = dirname($this->input_file_name);\n }\n if (preg_match(\"/.*\\\\.gz$/\", $extension)) {\n $use_gzip = TRUE;\n }\n if ($this->output_file_name == NULL) {\n $this->output_file_name = \"$base_name-definer-fixed$extension\";\n }\n if ($use_gzip) {\n $this->input_file = gzopen($this->input_file_name, 'r');\n if ($this->input_file === FALSE) {\n $this->throw_last_error(\"Error opening input file {$this->input_file_name}\");\n }\n $this->output_file = gzopen($this->output_file_name, 'w');\n if ($this->output_file === FALSE) {\n $this->throw_last_error(\"Error openeing output file {$this->output_file_name}\");\n }\n } else {\n $this->input_file = fopen($this->input_file_name, 'r');\n if ($this->input_file === FALSE) {\n $this->throw_last_error(\"Error opening input file {$this->input_file_name}\");\n }\n $this->output_file = fopen($this->output_file_name, 'w');\n if ($this->output_file === FALSE) {\n $this->throw_last_error(\"Error opening output file {$this->output_file_name}\");\n }\n }\n $this->file_get_contents_by_line(65536, $this, function ($line, $iteration, $fix_definer){\n $regex = '/\\/\\*[^*]*DEFINER=[^*]*\\*\\//';\n $result = fwrite($fix_definer->output_file, preg_replace($regex, '', $line));\n if ($result === FALSE) {\n $this->throw_last_error(\"Error writing to output file {$fix_definer->output_file_name}\");\n }\n });\n\n if ($use_gzip) {\n $result = gzclose($this->input_file);\n if ($result === FALSE) {\n $this->throw_last_error(\"Error closing input file {$this->input_file_name}\");\n }\n $result = gzclose($this->output_file);\n if ($result === FALSE) {\n $this->throw_last_error(\"Error closing input file {$this->input_file_name}\");\n }\n } else {\n $result = fclose($this->input_file);\n if ($result === FALSE) {\n $this->throw_last_error(\"Error closing input file {$this->input_file_name}\");\n }\n $result = fclose($this->output_file);\n if ($result === FALSE) {\n $this->throw_last_error(\"Error closing input file {$this->input_file_name}\");\n }\n }\n }", "title": "" }, { "docid": "8c9834dd38a5ac06cc6498f2a147c28e", "score": "0.4306569", "text": "function check_for_new_bans($delete,$bans,$bans_file){\r\n if(preg_match('/^[zZ].*$|^[xX]{2}.*$|^[yY]{2}.*$|^xtag.*$/',basename($delete))){\r\n if (!in_array(basename($delete),$bans)) {\r\n echo PHP_EOL . basename($delete) . \" was not found in ban list but probably should be\" . PHP_EOL;\r\n echo PHP_EOL . \"Adding \" . basename($delete) . \" to bans list\" . PHP_EOL;\r\n file_put_contents($bans_file, PHP_EOL . basename($delete), FILE_APPEND);\r\n $bans = file($bans_file, FILE_IGNORE_NEW_LINES);\r\n return($bans);\r\n } else {\r\n return($bans);\r\n }\r\n } else {\r\n return($bans);\r\n }\r\n }", "title": "" }, { "docid": "2378f7f4141fc715184938e7e1266858", "score": "0.42896268", "text": "private function _compareVersions()\r\n\t{\r\n\t\t$src\t=\t( $this->getRemove() ? $this->_destination() : $this->_source() );\r\n\t\t$dst\t=\t( $this->getRemove() ? $this->_source() : $this->_destination() );\r\n\t\t\r\n\t\t// Read files\r\n\t\t$source\t=\tfile_exists( $src )\t? @file( $src ) : false;\r\n\t\t$dest\t=\tfile_exists( $dst )\t? @file( $dst ) : false;\r\n\t\t\r\n\t\t// Catch errors reading\r\n\t\tif (! $source || ! $dest ) {\r\n\t\t\t\r\n\t\t\t$this->setErrorcode( ( ! $source ? 1 : 4 ) );\r\n\t\t\t$this->setErrormsg( t( 'jblesta.install.file.error.read', ( ! $source ? 'source' : 'existing template' ) ) );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\t// Find versions of files\r\n\t\t$sv\t=\r\n\t\t$dv\t=\tfalse;\r\n\t\t\r\n\t\tforeach( array( 'sv' => 'source', 'dv' => 'dest' ) as $holder => $item ) {\r\n\t\t\tforeach ( $$item as $s ) {\r\n\t\t\t\tif ( preg_match( '/@version\\s+([0-9\\.]+)/im', $s, $matches, PREG_OFFSET_CAPTURE ) ) {\r\n\t\t\t\t\t$$holder\t=\t$matches[1][0];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// Ensure we found versions\r\n\t\tif (! $dv || ! $sv ) {\r\n\t\t\t$this->setErrorcode( 2 );\r\n\t\t\t$this->setErrormsg( t( 'jblesta.install.file.error.version', ( ! $sv ? 'source' : 'existing template' ) ) );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\t// Do our comparisons\r\n\t\tif ( version_compare( $dv, $sv, 'lt' ) ) {\r\n\t\t\t\r\n\t\t\t$this->setErrorcode( 4 );\r\n\t\t\t$this->setErrormsg( t( 'jblesta.install.file.error.newer', ucfirst( t( 'jblesta.install.file.jwhmcs' ) ), t( 'jblesta.install.file.template' ) ) );\r\n\t\t}\r\n\t\telse if ( version_compare( $dv, $sv, 'gt' ) ) {\r\n\t\t\t$this->setErrorcode( 4 );\r\n\t\t\t$this->setErrormsg( t( 'jblesta.install.file.error.newer', ucfirst( t( 'jblesta.install.file.template' ) ), t( 'jblesta.install.file.jblesta' ) ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "467afa371194cbbfb1c289194630cb97", "score": "0.42841437", "text": "function codegenerator_printindexfile ($instance,$fileList,$outPath) {}", "title": "" }, { "docid": "34a09f06fba6e6e9e84ddd198dcaa23c", "score": "0.4279275", "text": "public function buildAstMatchEntry()\n {\n return $this->buildAstNodeInstance('\\\\PDepend\\\\Source\\\\AST\\\\ASTMatchEntry');\n }", "title": "" }, { "docid": "7bfe80f1390aed2ad72e6009d2c56dc4", "score": "0.42625627", "text": "public function testGetFileContents()\n {\n if (is_array($this->DocxMergeable->mergableParts)\n && !empty($this->DocxMergeable->mergableParts)\n ) {\n foreach ($this->DocxMergeable->mergableParts\n as $mergeableFile => $mergeableDetails\n ) {\n extract($mergeableDetails);\n $sourceXML = $this->DocxMergeable->get($FilePath, $obj_xml);\n if ($mergeableFile != 'docx') {\n $sourceXmlTest = simplexml_load_string(\n $this->DocxMergeable->package->getFromName($FilePath)\n );\n $sourceXML = objectsIntoArray($sourceXML);\n $sourceXmlTest = objectsIntoArray($sourceXmlTest);\n $diff = array_diff($sourceXML, $sourceXmlTest);\n $this->assertTrue(\n empty($diff) ? true : false,\n \"File contents of {$FilePath} file is not set correctly\"\n );\n } else {\n $this->assertEqual(\n strcmp(\n trim($sourceXML),\n trim(\n $this->DocxMergeable->package->getFromName(\n $FilePath\n )\n )\n ),\n 0, \"File contents of {$FilePath} file is not set correctly\"\n );\n }\n }\n }\n }", "title": "" }, { "docid": "10028a4874ee5fc302d8a9d08d383c0f", "score": "0.42619684", "text": "private function bad_result() {\n\t\treturn \"<{$this->tag}/>\".chr(13).chr(10);\n\t}", "title": "" }, { "docid": "420ff946c73e6b3da24b448b3208e574", "score": "0.42601496", "text": "public function assertNotEquals(string $expected, string $message=\"\"): Result\n {\n return new Result(file_get_contents($this->path) != $expected, $message);\n }", "title": "" }, { "docid": "03a93728e975bc6997841cdf2e3369a8", "score": "0.42496988", "text": "private function createFile()\n {\n $res = false;\n $newpath = '';\n\n switch($this->type) {\n case 'model':\n $path = '../app/models/';\n $ext = '.php';\n break;\n case 'controller':\n $path = '../app/controllers/';\n $ext = '.php';\n break;\n case 'view':\n $path = '../app/views/';\n $ext = '.html';\n break;\n default:\n $path = '../app/';\n }\n //$file = strtolower($this->scaffold->tableName);\n $file = $this->scaffold->fileName;\n\n if(is_array($this->data)) {\n foreach ($this->data as $key => $datum) {\n switch ($key) {\n case 0:\n $newfile = 'main';\n $newpath = $path;\n break;\n case 1:\n $newpath = $path . 'partials/';\n $newfile = '_aside-list';\n break;\n case 2:\n $newpath = $path . 'partials/';\n $newfile = '_welcome';\n break;\n case 3:\n $newpath = $path . 'partials/';\n $newfile = '_article';\n break;\n case 4:\n $newpath = $path . 'partials/';\n $newfile = '_main-menu';\n break;\n case 5:\n $newpath = $path . 'partials/';\n $newfile = '_login-form';\n break;\n default:\n $newpath = $path;\n $newfile = $file;\n }\n\n\n $res = $this->makedirs($newpath);\n if($res) {\n $res = $this->writeFile($newpath, $newfile, $ext, $this->data[$key]);\n }\n }\n } else {\n $res = $this->makedirs($path);\n if($res) {\n $res = $this->writeFile($path, $file, $ext, $this->data);\n }\n }\n return $res;\n }", "title": "" }, { "docid": "85e72fdadd9b21a86da336a1ed345e0a", "score": "0.42488405", "text": "private function add_version($match) {\n\t\t\n\t\t// Strip off any hash or query vars.\n\t\t// TODO: reappend the hash and query vars.\n\t\t$originalPath = preg_replace('|([\\?#].*)$|', '', trim($match[1],\"' \"));\n\t\t$path = $this->originaldir . '/' . $originalPath;\n\n\t\tif(file_exists($path)){\n\t\t\t$attribute = preg_replace(\"|url\\(([\\'\\\"]*)([^\\)\\'\\\"]+)([\\'\\\"]*)\\)|\", 'url($1' . $originalPath . '?ver=' . filectime($path) . '$3)' , $match[0]);\n\t\t\t$this->log($attribute);\n\n\t\t\treturn $attribute;\n\t\t} else {\n\t\t\tthrow new BuildException(\"Resource not found: \" . $path, 1);\n\t\t}\n\n \treturn $match[0];\n }", "title": "" }, { "docid": "aed2c10f5e73f5f63768c2e1be0634d6", "score": "0.42440328", "text": "public function testGetFileContents()\n {\n if (is_array($this->PptxMergeable->mergableParts)\n && !empty($this->PptxMergeable->mergableParts)\n ) {\n foreach ($this->PptxMergeable->mergableParts\n as $mergeableFile => $mergeableDetails\n ) {\n extract($mergeableDetails);\n $sourceXML = $this->PptxMergeable->get($FilePath, $obj_xml);\n $sourceXmlTest = simplexml_load_string(\n $this->PptxMergeable->package->getFromName($FilePath)\n );\n $sourceXML = objectsIntoArray($sourceXML);\n $sourceXmlTest = objectsIntoArray($sourceXmlTest);\n $diff = array_diff($sourceXML, $sourceXmlTest);\n $this->assertTrue(\n empty($diff) ? true : false,\n \"File contents of {$FilePath} file is not set correctly\"\n );\n }\n }\n }", "title": "" }, { "docid": "a85f2278d49d125da3a61ffed09e76c8", "score": "0.4242451", "text": "public function intoOutfile($file)\n {\n $this->outfile = $file;\n return $this;\n }", "title": "" }, { "docid": "20c4f328c99383449d35671c1db95b1a", "score": "0.42367584", "text": "public function generate()\n {\n $this->mutables = $this->getParser()\n ->parseFile($this->getFilename());\n $this->parseTokensToMutations($this->mutables);\n\n return $this;\n }", "title": "" }, { "docid": "ccb8152ce776fbd88564e07e7c1a1f4f", "score": "0.422771", "text": "function getPictureDestEdit($checkbadge) {\n $picture=\"\";\n $picturestaffweb=\"../Local/Participant_Images_staffweb/$checkbadge\";\n $picturestaffbook=\"../Local/Participant_Images_staffbook/$checkbadge\";\n $pictureweb=\"../Local/Participant_Images_web/$checkbadge\";\n $picturebook=\"../Local/Participant_Images_book/$checkbadge\";\n $fallback=\"../Local/logo.gif\";\n if (file_exists($picturestaffweb)) {\n $picture=sprintf(\"<img width=300 src=\\\"%s\\\">\",$picturestaffweb);\n } elseif (file_exists($picturestaffbook)) {\n $picture=sprintf(\"<img width=300 src=\\\"%s\\\">\",$picturestaffbook);\n } elseif (file_exists($picturweb)) {\n $picture=sprintf(\"<img width=300 src=\\\"%s\\\">\",$pictureweb);\n } elseif (file_exists($picturebook)) {\n $picture=sprintf(\"<img width=300 src=\\\"%s\\\">\",$picturebook);\n } elseif (file_exists($fallback)) {\n $picture=sprintf(\"<img width=300 src=\\\"%s\\\">\",$fallback);\n }\n return ($picture);\n}", "title": "" }, { "docid": "bd8c085cfd09f686768dc20d68de3787", "score": "0.42272228", "text": "protected abstract function buildArchive();", "title": "" }, { "docid": "65e022e43fd5ebbe7f537c9ed05d33c8", "score": "0.4225507", "text": "public function _buildGlobalFile($config){\n\t\t$filetype = $config->filetype;\n\t\t$sourceFolder = $this->getSourceFolder().$this->_filterString((string)$config->from, $filetype);\n\t\t$destinationFile = $this->_filterString((string)$config->to, $filetype);\n\t\t$content = '';\n\t\t$depend = $config->depend;\n\t\t$build = true;\n\t\tif ($depend){\n\t\t\tforeach ($depend->asArray() as $condition=>$value){\n\t\t\t\tif (!$this->getDataUsingMethod($condition)){\n\t\t\t\t\t$build = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$build){\n\t\t\treturn '';\n\t\t}\n\t\t$content = '';\n\t\tif ($config->method){\n\t\t\t$method = (string)$config->method;\n\t\t\t$content = $this->$method();\n\t\t}\n\t\telse{\n\t\t\tforeach ($config->descend('content/file') as $file){\n\t\t\t\t$sourceContent = $this->getFileContents($sourceFolder.(string)$file->name);\n\t\t\t\t$scope = (string)$file->scope;\n\t\t\t\t$depend = $file->depend;\n\t\t\t\t$scope = $file->scope;\n\t\t\t\tif ($scope == 'entity'){\n\t\t\t\t\tforeach ($this->getEntities() as $entity){\n\t\t\t\t\t\t$valid = true;\n\t\t\t\t\t\tif ($depend){\n\t\t\t\t\t\t\tforeach ($depend->asArray() as $condition=>$value){\n\t\t\t\t\t \t\t\tif (!$entity->getDataUsingMethod($condition)){\n\t\t\t\t\t \t\t\t\t$valid = false;\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($valid){\n\t\t\t\t\t\t\t$replace = $entity->getPlaceholders();\n\t\t\t\t \t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($scope == 'attribute'){\n\t\t\t\t\t$depend = $file->depend;\n\t\t\t\t\t$dependType = $file->depend_type;\n\t\t\t\t\tforeach ($this->getEntities() as $entity){\n\t\t\t\t\t\tforeach ($entity->getAttributes() as $attribute){\n\t\t\t\t\t\t\t$valid = true;\n\t\t\t\t\t\t \tif ($depend){\n\t\t\t\t\t\t \t\tforeach ($depend->asArray() as $condition=>$value){\n\t\t\t\t\t\t \t\t\tif (!$attribute->getDataUsingMethod($condition)){\n\t\t\t\t\t\t \t\t\t\t$valid = false;\n\t\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t\t \t\t\t}\n\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t$typeValid = true;\n\t\t\t\t\t\t\tif ($dependType){\n\t\t\t\t\t\t\t\t$typeValid = false;\n\t\t\t\t\t\t \t\tforeach ($dependType->asArray() as $condition=>$value){\n\t\t\t\t\t\t \t\t\tif ($attribute->getType() == $condition){\n\t\t\t\t\t\t \t\t\t\t$typeValid = true;\n\t\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t\t \t\t\t}\n\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\tif ($valid && $typeValid){\n\t\t\t\t\t\t\t\t$replace = $entity->getPlaceholders();\n\t\t\t\t\t\t\t\t$attributeReplace = $attribute->getPlaceholders();\n\t\t\t\t\t\t\t\t$replace = array_merge($replace, $attributeReplace);\n\t\t\t\t\t \t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, 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\telseif($scope == 'siblings'){\n\t\t\t\t\tforeach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){\n\t\t\t\t\t\t$entities \t\t= $relation->getEntities();\n\t\t\t\t\t\t$replaceEntity \t= $entities[0]->getPlaceholders();\n\t\t\t\t\t\t$replaceSibling = $entities[1]->getPlaceholdersAsSibling();\n\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($scope == 'siblings_both_tree'){\n\t\t\t\t\tforeach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){\n\t\t\t\t\t\t$entities \t\t= $relation->getEntities();\n\t\t\t\t\t\tif ($entities[0]->getIsTree() || $entities[1]->getIsTree()){\n\t\t\t\t\t\t\tif ($entities[0]->getIsTree()){\n\t\t\t\t\t\t\t\t$tree = $entities[0];\n\t\t\t\t\t\t\t\t$sibling = $entities[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$tree = $entities[1];\n\t\t\t\t\t\t\t\t$sibling = $entities[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$replaceEntity \t= $tree->getPlaceholders();\n\t\t\t\t\t\t\t$replaceSibling = $sibling->getPlaceholdersAsSibling();\n\t\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($scope == 'siblings_both_not_tree'){\n\t\t\t\t\tforeach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_SIBLING) as $relation){\n\t\t\t\t\t\t$entities \t\t= $relation->getEntities();\n\t\t\t\t\t\tif ($entities[0]->getIsTree() || $entities[1]->getIsTree()){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$replaceEntity \t= $entities[0]->getPlaceholders();\n\t\t\t\t\t\t$replaceSibling = $entities[1]->getPlaceholdersAsSibling();\n\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replaceEntity \t= $entities[1]->getPlaceholders();\n\t\t\t\t\t\t$replaceSibling = $entities[0]->getPlaceholdersAsSibling();\n\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($scope == 'children'){\n\t\t\t\t\tforeach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_CHILD) as $relation){\n\t\t\t\t\t\t$entities \t\t= $relation->getEntities();\n\t\t\t\t\t\t$replaceEntity \t= $entities[0]->getPlaceholders();\n\t\t\t\t\t\t$replaceSibling = $entities[1]->getPlaceholdersAsSibling();\n\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($this->getRelations(Ultimate_ModuleCreator_Helper_Data::RELATION_TYPE_PARENT) as $relation){\n\t\t\t\t\t\t$entities \t\t= $relation->getEntities();\n\t\t\t\t\t\t$replaceEntity \t= $entities[1]->getPlaceholders();\n\t\t\t\t\t\t$replaceSibling = $entities[0]->getPlaceholdersAsSibling();\n\t\t\t\t\t\t$replace \t\t= array_merge($replaceEntity, $replaceSibling);\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype, $replace, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$valid = true;\n\t\t\t\t\t$depend = $file->depend;\n\t\t\t\t\tif ($depend){\n\t\t\t\t\t\tforeach ($depend->asArray() as $condition=>$value){\n\t\t\t\t \t\t\tif (!$this->getDataUsingMethod($condition)){\n\t\t\t\t \t\t\t\t$valid = 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 ($valid){\n\t\t\t\t\t\t$content .= $this->_filterString($sourceContent, $filetype);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($config->after_build){\n\t\t\t$function = (string)$config->after_build;\n\t\t\t$content = $this->$function($content);\n\t\t}\n\t\t$this->_addFile($destinationFile, $content);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "90073b22c8be30eb7505eee8a54a2f93", "score": "0.4224962", "text": "function svn_fs_make_file($root, $path){}", "title": "" }, { "docid": "b8b397c13361632f713628e4fc950809", "score": "0.42225245", "text": "function merge_to_turtle_file($turtle_filename){\n $file_graph = new SimpleGraph($this->get_index());\n $rdf = trim(file_get_contents($turtle_filename));\n $parser_errors=array();\n if(!empty($rdf)){\n $file_graph->add_rdf($rdf);\n $parser_errors = $file_graph->get_parser_errors();\n }\n if(!empty($parser_errors)){\n throw new InvalidTurtleException();\n //don't lose work by overwriting invalid turtle\n } else {\n $merge = $this->merge($file_graph->get_index());\n $file_graph = new SimpleGraph($merge);\n return file_put_contents($turtle_filename, $file_graph->to_turtle());\n }\n }", "title": "" }, { "docid": "74edfe4912a0cb7d67885195d7c4239b", "score": "0.42180356", "text": "function build($working_source) {\n\t\t$contents = glob($working_source . \"/*\");\n\t\tforeach ($contents as $file) {\n\t\t\t$info = pathinfo($file);\n\t\t\tif (is_dir($file)) {\n\t\t\t\tif (!in_array(basename($file), $this->settings['site']['exclude'])) {\n\t\t\t\t\t$this->build($file, \"\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!in_array($info['extension'], $this->settings['files']['ignore'])) {\n\t\t\t\t\t$dir = $this->settings['site']['build'] . str_replace($this->settings['site']['source'],\"\", $working_source);\n\t\t\t\t\tif (!is_dir($dir)) {\n\t\t\t\t\t\tif (version_compare(phpversion(), \"5.0.0\", \">=\")) {\n\t\t\t\t\t\t\tmkdir($dir, 0755, TRUE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmkdir($dir, 0755);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (in_array($info['extension'], $this->settings['files']['parse'])) {\n\t\t\t\t\t\t$dir = $this->settings['site']['intermediate'] . str_replace($this->settings['site']['source'],\"\", $working_source);\n\t\t\t\t\t\tif (!is_dir($dir)) {\n\t\t\t\t\t\t\tif (version_compare(phpversion(), \"5.0.0\", \">=\")) {\n\t\t\t\t\t\t\t\tmkdir($dir, 0755, TRUE);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmkdir($dir, 0755);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->parse($file, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($this->settings['debug']['list_copied_files']) {\n\t\t\t\t\t\t\techo \"$file (copied)\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcopy($file, $this->settings['site']['build'] . '/' . $file);\n\t\t\t\t\t}\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c1311998481fe1cf07a1448407642788", "score": "0.4209689", "text": "public function compareFiles()\n\t{\t\n\t\t$currentXMLFileLocation = $this->currentXMLFileLocation;\n\t\t$oldXMLFileLocation = $this->oldXMLFileLocation;\n\n\t\tif(!file_exists($currentXMLFileLocation)) {\n\t\t\t$this->responseError = 1;\n\t\t\t$this->responseMessage = 'current.xml does not exist!';\n\t\t\treturn;\n\t\t}\n\n\t\tif(!file_exists($oldXMLFileLocation)) {\n\t\t\tif(is_writable('xml_file')) {\n\t\t\t\tcopy($currentXMLFileLocation, $oldXMLFileLocation);\n\t\t\t\t$this->responseError = 0;\n\t\t\t\t$this->responseMessage = 'old.xml doesn\\'t exist. Nothing to compare.';\n\t\t\t} else {\n\t\t\t\t$this->responseError = 1;\n\t\t\t\t$this->responseMessage = 'XML Directory isn\\'t writable. Can\\'t create old.xml.';\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t$currentXMLFile = file_get_contents($currentXMLFileLocation);\n\t\t$oldXMLFile = file_get_contents($oldXMLFileLocation);\n\n\t\t$currentFileArray = $this->convertXMLToArray($currentXMLFile);\n\t\t$oldFileArray = $this->convertXMLToArray($oldXMLFile);\n\n\t\t$differenceArray = $this->arrayRecursiveDiff($currentFileArray, $oldFileArray);\n\t\t\n\t\tif($differenceArray == null || empty($differenceArray)) {\n\t\t\t$this->responseError = 0;\n\t\t\t$this->responseMessage = 'Action Successful. No differences found.';\n\t\t} else {\n\t\t\tif(is_writable('xml_file')) {\n\t\t\t\tcopy($currentXMLFileLocation, $oldXMLFileLocation);\n\t\t\t\techo '<strong>Differences:</strong><br /><pre>';\n\t\t\t\tprint_r($differenceArray);\n\t\t\t\techo '</pre>';\n\t\t\t\t//input to database\n\t\t\t} else {\n\t\t\t\t$this->responseError = 1;\n\t\t\t\t$this->responseMessage = 'XML Directory isn\\'t writable. Can\\'t copy old.xml.';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8d2e632e6b7a901b58c137db73e87a13", "score": "0.4203216", "text": "private function createImage(): ?string\n {\n $this->compressedFileName = $this->getCompressedFileName($this->sourceFileName);\n $this->compressedFile = $this->compressedFilePath . $this->compressedFileName;\n\n $info = getimagesize($this->sourceFile);\n\n $sourceWeight = filesize($this->sourceFile);\n\n if ($info['mime'] === 'image/jpeg') {\n $image = imagecreatefromjpeg($this->sourceFile);\n imagejpeg($image, $this->compressedFile, $this->quality);\n } else if ($info['mime'] === 'image/webp') {\n $image = imagecreatefromwebp($this->sourceFile);\n imagewebp($image, $this->compressedFile, $this->quality);\n } elseif ($info['mime'] === 'image/png') {\n $pngQuality = 9 - round(0.09 * $this->quality);\n $image = imagecreatefrompng($this->sourceFile);\n imagealphablending($image, false);\n imagesavealpha($image, true);\n imagepng($image, $this->compressedFile, $pngQuality, PNG_ALL_FILTERS);\n }\n\n $compressedWeight = filesize($this->compressedFile);\n\n if (!empty($this->post['only-compressed'])) {\n if ($compressedWeight < $sourceWeight) {\n copy($this->sourceFile, self::UPLOADS_PATH . $this->sourceFileName);\n copy($this->compressedFile, self::UPLOADS_PATH . $this->compressedFileName);\n\n return $this->generateHtml();\n } else {\n unlink($this->compressedFile);\n return null;\n }\n } else {\n copy($this->sourceFile, self::UPLOADS_PATH . $this->sourceFileName);\n copy($this->compressedFile, self::UPLOADS_PATH . $this->compressedFileName);\n\n return $this->generateHtml();\n }\n\n }", "title": "" }, { "docid": "717c2e7f7547c7b141859a1cdaf3bac1", "score": "0.41927046", "text": "private function writeMetaFile(){\n\t\t$this->logOrEcho(\"Creating meta.xml (\".date('h:i:s A').\")... \");\n\t\t\n\t\t//Create new DOM document \n\t\t$newDoc = new DOMDocument('1.0',$this->charSetOut);\n\n\t\t//Add root element \n\t\t$rootElem = $newDoc->createElement('archive');\n\t\t$rootElem->setAttribute('metadata','eml.xml');\n\t\t$rootElem->setAttribute('xmlns','http://rs.tdwg.org/dwc/text/');\n\t\t$rootElem->setAttribute('xmlns:xsi','http://www.w3.org/2001/XMLSchema-instance');\n\t\t$rootElem->setAttribute('xsi:schemaLocation','http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd');\n\t\t$newDoc->appendChild($rootElem);\n\n\t\t//Core file definition\n\t\t$coreElem = $newDoc->createElement('core');\n\t\t$coreElem->setAttribute('encoding',$this->charSetOut);\n\t\t$coreElem->setAttribute('fieldsTerminatedBy',$this->delimiter);\n\t\t$coreElem->setAttribute('linesTerminatedBy','\\n');\n\t\t$coreElem->setAttribute('fieldsEnclosedBy','\"');\n\t\t$coreElem->setAttribute('ignoreHeaderLines','1');\n\t\t$coreElem->setAttribute('rowType','http://rs.tdwg.org/dwc/terms/Occurrence');\n\t\t\n\t\t$filesElem = $newDoc->createElement('files');\n\t\t$filesElem->appendChild($newDoc->createElement('location','occurrences'.$this->fileExt));\n\t\t$coreElem->appendChild($filesElem);\n\n\t\t$idElem = $newDoc->createElement('id');\n\t\t$idElem->setAttribute('index','0');\n\t\t$coreElem->appendChild($idElem);\n\n\t\t$occCnt = 1;\n\t\t$termArr = $this->occurrenceFieldArr['terms'];\n\t\tif($this->schemaType == 'dwc'){\n\t\t\tunset($termArr['localitySecurity']);\n\t\t}\n\t\tif($this->schemaType == 'dwc' || $this->schemaType == 'backup'){\n\t\t\tunset($termArr['collId']);\n\t\t}\n\t\tforeach($termArr as $k => $v){\n\t\t\t$fieldElem = $newDoc->createElement('field');\n\t\t\t$fieldElem->setAttribute('index',$occCnt);\n\t\t\t$fieldElem->setAttribute('term',$v);\n\t\t\t$coreElem->appendChild($fieldElem);\n\t\t\t$occCnt++;\n\t\t}\n\t\t$rootElem->appendChild($coreElem);\n\n\t\t//Identification extension\n\t\t$extElem1 = $newDoc->createElement('extension');\n\t\t$extElem1->setAttribute('encoding',$this->charSetOut);\n\t\t$extElem1->setAttribute('fieldsTerminatedBy',$this->delimiter);\n\t\t$extElem1->setAttribute('linesTerminatedBy','\\n');\n\t\t$extElem1->setAttribute('fieldsEnclosedBy','\"');\n\t\t$extElem1->setAttribute('ignoreHeaderLines','1');\n\t\t$extElem1->setAttribute('rowType','http://rs.tdwg.org/dwc/terms/Identification');\n\n\t\t$filesElem1 = $newDoc->createElement('files');\n\t\t$filesElem1->appendChild($newDoc->createElement('location','identifications'.$this->fileExt));\n\t\t$extElem1->appendChild($filesElem1);\n\t\t\n\t\t$coreIdElem1 = $newDoc->createElement('coreid');\n\t\t$coreIdElem1->setAttribute('index','0');\n\t\t$extElem1->appendChild($coreIdElem1);\n\t\t\n\t\t//List identification fields\n\t\tif($this->includeDets){\n\t\t\t$detCnt = 1;\n\t\t\t$termArr = $this->determinationFieldArr['terms'];\n\t\t\tforeach($termArr as $k => $v){\n\t\t\t\t$fieldElem = $newDoc->createElement('field');\n\t\t\t\t$fieldElem->setAttribute('index',$detCnt);\n\t\t\t\t$fieldElem->setAttribute('term',$v);\n\t\t\t\t$extElem1->appendChild($fieldElem);\n\t\t\t\t$detCnt++;\n\t\t\t}\n\t\t\t$rootElem->appendChild($extElem1);\n\t\t}\n\n\t\t//Image extension\n\t\tif($this->includeImgs){\n\t\t\t$extElem2 = $newDoc->createElement('extension');\n\t\t\t$extElem2->setAttribute('encoding',$this->charSetOut);\n\t\t\t$extElem2->setAttribute('fieldsTerminatedBy',$this->delimiter);\n\t\t\t$extElem2->setAttribute('linesTerminatedBy','\\n');\n\t\t\t$extElem2->setAttribute('fieldsEnclosedBy','\"');\n\t\t\t$extElem2->setAttribute('ignoreHeaderLines','1');\n\t\t\t$extElem2->setAttribute('rowType','http://rs.gbif.org/terms/1.0/Image');\n\t\n\t\t\t$filesElem2 = $newDoc->createElement('files');\n\t\t\t$filesElem2->appendChild($newDoc->createElement('location','images'.$this->fileExt));\n\t\t\t$extElem2->appendChild($filesElem2);\n\t\t\t\n\t\t\t$coreIdElem2 = $newDoc->createElement('coreid');\n\t\t\t$coreIdElem2->setAttribute('index','0');\n\t\t\t$extElem2->appendChild($coreIdElem2);\n\t\t\t\n\t\t\t//List image fields\n\t\t\t$imgCnt = 1;\n\t\t\t$termArr = $this->imageFieldArr['terms'];\n\t\t\tforeach($termArr as $k => $v){\n\t\t\t\t$fieldElem = $newDoc->createElement('field');\n\t\t\t\t$fieldElem->setAttribute('index',$imgCnt);\n\t\t\t\t$fieldElem->setAttribute('term',$v);\n\t\t\t\t$extElem2->appendChild($fieldElem);\n\t\t\t\t$imgCnt++;\n\t\t\t}\n\t\t\t$rootElem->appendChild($extElem2);\n\t\t}\n\t\t\n\t\t$newDoc->save($this->targetPath.$this->ts.'-meta.xml');\n\t\t\n \t$this->logOrEcho(\"Done!! (\".date('h:i:s A').\")\\n\");\n\t}", "title": "" }, { "docid": "31f5ab1107d3bb8b436e2c37c7721a7f", "score": "0.41922936", "text": "function __construct($new_space_api_file, $old_space_api_file)\n {\n global $logger;\n \n if($new_space_api_file === null)\n {\n $logger->logWarn(\"The passed space api file is null\");\n return;\n }\n \n $space_name = $new_space_api_file->name();\n \n\t\t$this->space = $space_name;\n $this->reports_path = CACHEREPORTSDIR;\n\t\t\n\t\t// if the reports directory exists, try to load the space report\n\t\tif(is_dir($this->reports_path))\n\t\t{\n $logger->logDebug(\"Initializing the report\");\n \n\t\t\t$nice_file_name = NiceFileName::json($space_name);\n\t\t\t$this->filename = $this->reports_path . $nice_file_name;\n\t\t\t\n\t\t\tif(file_exists($this->filename))\n\t\t\t{\n $logger->logDebug(\"Loading the last report file: \". $this->filename );\n \n\t\t\t\t$last_report = file_get_contents($this->filename);\n \n if($last_report === false)\n $logger->logDebug(\"The last report file could not be loaded\");\n \n\t\t\t\t$last_report = json_decode($last_report);\n \n if($last_report === null)\n $logger->logDebug(\"The report file could not be decoded\");\n else\n {\n // load the data from the report file\n $this->last_update = $last_report->last_update;\n $this->last_update_ts = $last_report->last_update_ts;\n $this->last_email_sent = $last_report->last_email_sent;\n $this->last_email_sent_ts = $last_report->last_email_sent_ts;\n $this->fail_counter = $last_report->fail_counter;\n $this->email = $last_report->email; \n }\n\t\t\t}\n \n // set the new email if one is available\n if(\n ! $new_space_api_file->has_error() &&\n ! $new_space_api_file->email() == \"\" &&\n $new_space_api_file->email() != $this->email\n )\n {\n $this->email = $new_space_api_file->email();\n }\n \n // If the email is still not set, let's see if we find one in the cache.\n // This check can't be left out since a report file could have been deleted\n // in the meantime while a space has removed the email field from their json.\n if(\n $old_space_api_file !== null &&\n ! $old_space_api_file->has_error() &&\n $old_space_api_file->email() != \"\" &&\n $old_space_api_file->email() != $this->email\n )\n {\n $this->email = $old_space_api_file->email();\n } \n\t\t}\n }", "title": "" }, { "docid": "969cac1b1c9b227546eb4a0edd3baf9d", "score": "0.41922387", "text": "public static function build_temp_results() {\n // Very similar to db_replace function.\n global $DB;\n\n // We skip the same tables as in db_replace but add more that would not have any text.\n $skiptables = array('config', 'config_plugins', 'config_log', 'cache_flags', 'course_modules',\n 'upgrade_log', 'log', 'external_services', 'externatl_services_functions', 'search_simpledb_index',\n 'filter_config', 'sessions', 'events_queue', 'repository_instance_config',\n 'block_instances', 'log_queries', 'log_display',\n 'stats_daily', 'stats_monthly', 'stats_user_daily',\n 'stats_user_monthly', 'stats_user_weekly', 'enrol',\n 'analytics_indicator_calc', 'analytics_models', 'analytics_models_log', 'analytics_predictions',\n 'analytics_predict_samples', 'analytics_train_samples', 'analytics_used_analysables', 'analytics_used_files',\n 'assign_plugin_config', 'backup_controllers', 'block', 'capabilities', 'block_positions', 'question_attempt_steps',\n 'quiz_attempts', 'question_attempt_step_data',\n 'logstore_standard_log',\n 'grade_grades', // No user input here.\n 'files', // No user input here.\n 'stats_weekly', // No user input here.\n 'context',\n 'grade_items_history',\n 'role_assignments',\n 'question_usages',\n 'tool_textcleanup_temp', '');\n\n // Turn off time limits, sometimes upgrades can be slow.\n core_php_time_limit::raise();\n $allunionsarray = [];\n\n if ($tables = $DB->get_tables()) { // No tables yet at all.\n foreach ($tables as $table) {\n if (in_array($table, $skiptables)) { // Don't process these.\n continue;\n }\n if ($columns = $DB->get_columns($table)) {\n $tableselect = self::get_searchtable_columns_query($columns, $table);\n if ($tableselect) {\n $allunionsarray[] = $tableselect;\n }\n }\n }\n }\n\n $fields = static::get_fields_temp_table();\n $selectunion = implode(' UNION ALL ', $allunionsarray);\n $fieldlist = \"u.\" . implode(', u.', $fields);\n\n $insertfieldlist = implode(',', $fields);\n $DB->delete_records(self::TEMP_SEARCHTABLE);\n\n $sql = \"INSERT INTO {\" . self::TEMP_SEARCHTABLE . \"} ($insertfieldlist) SELECT \" .\n \"$fieldlist FROM ($selectunion) u\";\n $DB->execute($sql); // Load all data into the temp table.\n // Then add data from the blocks.\n self::add_block_table();\n }", "title": "" }, { "docid": "eef9014cb57773e28f092ff01996ebea", "score": "0.4190516", "text": "function slurpfile($afile) {\n\n..........................\n\treturn $contents;\n}", "title": "" }, { "docid": "e21690b8f4a908982e5067922b7725ef", "score": "0.4188461", "text": "public function testMergeWith(): void\n {\n $this->file = new File(\n '/some/file/name.php',\n [$this->issues[0], $this->issues[1]]\n );\n $otherFile = new File(\n '/some/file/name.php',\n [$this->issues[2]]\n );\n $this->file->mergeWith($otherFile);\n\n static::assertEquals(2, $this->file->getErrorCount());\n static::assertEquals(1, $this->file->getWarningCount());\n static::assertEquals(\n \\array_values($this->issues),\n \\array_values($this->file->getIssues())\n );\n }", "title": "" }, { "docid": "2a50a313d1ce919cc59a4fee3112f352", "score": "0.41877174", "text": "protected function generateFileText() {\n // Template-Body laden\n $template = file_get_contents(dirname(__FILE__) . '/templates/body.template');\n\n $template = str_replace('{{Creation_Date}}', $this->_creationDate, $template);\n $template = str_replace('{{Creator_Generation-Date}}', $this->_creator['Generation Date'], $template);\n $template = str_replace('{{Creator_Device-Agent}}', $this->_creator['Device Agent'], $template);\n $template = str_replace('{{Creator_Host-Name}}', $this->_creator['Host Name'], $template);\n $template = str_replace('{{Creator_OS-Agent}}', $this->_creator['OS Agent'], $template);\n $template = str_replace('{{Creator_Software-Agent}}', $this->_creator['Software Agent'], $template);\n $template = str_replace('{{UUID}}', $this->_uuid, $template);\n $template = str_replace('{{Time-Zone}}', $this->_timeZone, $template);\n $template = str_replace('{{Activity}}', $this->_activity, $template);\n $template = str_replace('{{Entry-Text}}', $this->entryText, $template);\n\n // Check if location has to be added\n if (isset($this->_location)) {\n // Load Template-Location\n $templateLocation = file_get_contents(dirname(__FILE__) . '/templates/location.template');\n\n $templateLocation = str_replace('{{City}}', $this->_location['city'], $templateLocation);\n $templateLocation = str_replace('{{Country}}', $this->_location['country'], $templateLocation);\n $templateLocation = str_replace('{{Latitude}}', $this->_location['latitude'], $templateLocation);\n $templateLocation = str_replace('{{Longitude}}', $this->_location['longitude'], $templateLocation);\n $templateLocation = str_replace('{{Locality}}', $this->_location['locality'], $templateLocation);\n $templateLocation = str_replace('{{Place_Name}}', $this->_location['name'], $templateLocation);\n\n // Check if Foursquare ID has to be added\n if (isset($this->_location['foursquareId'])) {\n // Load Template-Location\n $templateLocationFoursquare = file_get_contents(dirname(__FILE__) . '/templates/location_foursquare.template');\n\n $templateLocationFoursquare = str_replace('{{Location_Foursquare-ID_Foursquare-ID}}', $this->_location['foursquareId'], $templateLocationFoursquare);\n\n // Put Foursquare ID into location\n $templateLocation = str_replace('{{Location_Foursquare-ID}}', $templateLocationFoursquare, $templateLocation);\n } else {\n $templateLocation = str_replace('{{Location_Foursquare-ID}}', '', $templateLocation);\n }\n\n // Put location text into DayOne-Entry\n $template = str_replace('{{Location}}', $templateLocation, $template);\n } else {\n $template = str_replace('{{Location}}', '', $template);\n }\n\n return $template;\n }", "title": "" }, { "docid": "c23d329bdb8d39abb88cb0281a3cc234", "score": "0.4181616", "text": "function getDiff($version, $use_html=TRUE) {\n\t\t$prev_agreement = TRUE;\n\t\tlist($older_filename, $prev_agreement) = \n\t\t\t$this->loadDocByVersion($version, $prev_agreement);\n\t\tlist($newer_filename) = $this->loadDocByVersion($version + 1);\n\n\t\tif (!file_exists($older_filename) || !file_exists($newer_filename)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$diff = shell_exec(\"diff --unified={$this->diff_context} -b \".\n\t\t\t\"{$older_filename} {$newer_filename}\");\n\n\t\tif (empty($diff)) {\n\t\t\t$msg = 'There was no difference found between these file versions.';\n\n\t\t\tif (!$use_html) {\n\t\t\t\treturn $msg;\n\t\t\t}\n\n\t\t\treturn <<<EOHTML\n\t\t<div class=\"no_difference\">\n\t\t\t<img src=\"display/images/tango/32x32/actions/format-indent-more.png\"\n\t\t\t\twidth=\"32\" height=\"32\"/>\n\t\t\t<img src=\"display/images/tango/32x32/actions/format-indent-less.png\"\n\t\t\t\twidth=\"32\" height=\"32\"/>\n\t\t\t{$msg}\n\t\t</div>\nEOHTML;\n\t\t}\n\n\t\t$lines = explode(\"\\n\", $diff);\n\t\t$lines_copy = array();\n\t\tforeach($lines as $index=>$ind) {\n\t\t\t$l = $ind;\n\t\t\tif ((strpos($l, '---') === 0) ||\n\t\t\t\t(strpos($l, '+++') === 0)) {\n\t\t\t\tunset($lines[$index]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$l = trim($l);\n\t\t\t$l = str_replace('\\r\\n', \"\\n\", $l);\n\t\t\t$l = str_replace('\\n', \"\\n\", $l);\n\t\t\t$l = str_replace('\\r', \"\\n\", $l);\n\t\t\t$l = wordwrap($l, 90);\n\n\t\t\tif (!$use_html) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (strpos($l, '-') === 0) {\n\t\t\t\t$l = \"<span class=\\\"diff_removed\\\">{$l}</span>\";\n\t\t\t}\n\t\t\telse if (strpos($l, '+') === 0) {\n\t\t\t\t$l = \"<span class=\\\"diff_added\\\">{$l}</span>\";\n\t\t\t}\n\t\t\t$lines_copy[] = $l;\n\t\t}\n\t\t$diff = implode(\"\\n\", $lines_copy);\n\n\t\tif (!$use_html) {\n\t\t\treturn <<<EOTXT\nView diff at: http://{$_SERVER['SERVER_NAME']}{$_SERVER['SCRIPT_NAME']}?id=previous_version&agr_id={$this->id}&prev_id={$version}\n\n{$diff}\nEOTXT;\n\t\t}\n\n\t\t$out = $this->getDiffSummary($version, $prev_agreement);\n\t\treturn <<<EOHTML\n\t\t\t{$out}\n\t\t\t<div id=\"diff\">{$diff}</div>\nEOHTML;\n\t}", "title": "" }, { "docid": "2e0a2b0022a04c12c029ee73e105c26b", "score": "0.41771573", "text": "function jd_file_latest_hottest($matches){\n global $jDFPrank, $jDFPcatids;\n\n $db = JFactory::getDBO();\n $user = JFactory::getUser();\n \n $query = $db->getQuery(true);\n $groups = implode(',', $user->getAuthorisedViewLevels());\n \n $jDFPcatids = '';\n $bidon = getCategoryIDs(0);\n\n $filesql = \"SELECT file_id FROM #__jdownloads_files WHERE cat_id IN (\".$jDFPcatids.\") AND access IN ($groups) AND published = 1 ORDER BY {dado} DESC LIMIT \".$db->escape($matches[2]).\";\";\n \n if ($matches[1] == 'latest'){\n $filesql = str_replace(\"{dado}\",'date_added',$filesql);\n }\n else{\n $filesql = str_replace(\"{dado}\",'downloads',$filesql);\n }\n\n $db->setQuery($filesql);\n $files = $db->loadObjectList();\n \n $filetable = '';\n $jDFPrank = 1;\n \n if ($files){\n \t foreach ($files as $file){\n \t\t $sim_matches = array(\"\", \"file\", $file->file_id);\n // create the output\n $filetable .= jd_file_createdownload($sim_matches);\n $jDFPrank++;\n \t }\n }\n return $filetable;\n }", "title": "" }, { "docid": "2061fe217a53b36a57c9ff959b1d6134", "score": "0.41753533", "text": "public function getCompleteFile();", "title": "" }, { "docid": "1243395238a3f3b38f11e6b0fb10b6a4", "score": "0.4170442", "text": "protected function createClassFile()\n {\n foreach ($this->functionsArray as $key => $function) {\n if (!empty($function['url'])) {\n $this->writeFunction($function);\n }\n $this->classOutput .= \"\";\n }\n\n $this->classOutput = str_replace('{{functions}}', $this->classOutput, $this->classTemplate);\n\n file_put_contents($this->classFileLocation . '/' . $this->outputFileName . '.php', $this->classOutput);\n\n return $this;\n }", "title": "" }, { "docid": "7495f5e3ee82dc37bc1ba4aead73a7b3", "score": "0.4155205", "text": "private function buildFileExists()\n {\n return file_exists($this->config['web_root'] . DIRECTORY_SEPARATOR . $this->config['build_path']);\n }", "title": "" }, { "docid": "f35c1d375af3898d6075090d40035aad", "score": "0.4153228", "text": "public function testArchivingModifiedKeepArchivedBothPhysicalFilesWithDifferentFilenames()\n {\n Config::modify()->set(File::class, 'keep_archived_assets', true);\n list($file, $store, $firstHash, $secondHash) = $this->createModifiedFileWithDifferentFilename();\n $file->doArchive();\n $this->assertTrue($store->exists('file.txt', $firstHash));\n $this->assertSame(AssetStore::VISIBILITY_PROTECTED, $store->getVisibility('file.txt', $firstHash));\n $this->assertFalse($store->exists('file.txt', $secondHash));\n $this->assertFalse($store->exists('file-changed.txt', $firstHash));\n $this->assertTrue($store->exists('file-changed.txt', $secondHash));\n $this->assertSame(AssetStore::VISIBILITY_PROTECTED, $store->getVisibility('file-changed.txt', $secondHash));\n }", "title": "" }, { "docid": "33eda2ba2182612387eacd4d5f28b137", "score": "0.41489115", "text": "function buildTorrent()\n {\n if ($this->is_multifile) {\n //we already have the files added\n $metainfo = $this->encodeTorrent();\n } else if ($this->is_file) {\n if (!$info = $this->addFile($this->path)) {\n return false;\n }\n if (!$metainfo = $this->encodeTorrent($info)) {\n return false;\n }\n } else if ($this->is_dir) {\n if (!$diradd_ok = $this->addDir($this->path)) {\n return false;\n }\n $metainfo = $this->encodeTorrent();\n } else {\n throw new File_Bittorrent2_Exception('You must provide a file or directory.', File_Bittorrent2_Exception::make);\n return false;\n }\n return $metainfo;\n }", "title": "" }, { "docid": "0147fb34457328bc05feba53708b7edf", "score": "0.4145693", "text": "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\treturn $this->altContent;\n\t\t}\n\n\t\tif ($this->source != 'external')\n\t\t{\n\t\t\tif ($this->singleSRC == '')\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$objFile = \\FilesModel::findByUuid($this->singleSRC);\n\n\t\t\tif ($objFile === null)\n\t\t\t{\n\t\t\t\tif (!\\Validator::isUuid($this->singleSRC))\n\t\t\t\t{\n\t\t\t\t\treturn '<p class=\"error\">'.$GLOBALS['TL_LANG']['ERR']['version2format'].'</p>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!is_file(TL_ROOT . '/' . $objFile->path))\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->singleSRC = $objFile->path;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "1485f5b6b3a20e54cf887bc6ad375269", "score": "0.41420418", "text": "static function file_match($match=array(),$repository=myPear_photos_path,$reset=False) {\n\n if (is_dir($repository)){\n static $cache = Null;\n if (!($cache instanceof b_cache_S)) $cache = new b_cache_S(__METHOD__);\n \n if ($cache->wasSet($repository) && !$reset){\n\t$c = $cache->get();\n }else{ \n\t$c = scandir($repository,1);\n\t$c = $cache->set($c);\n }\n if (!empty($c)){\n foreach($match as $m){\n if ($reply = array_values(preg_grep(\"/^$m/i\",$c))) return $reply[0];\n }\n }\n }\n return '';\n }", "title": "" }, { "docid": "b6db482440fe75de33e24edb3b185a15", "score": "0.41394264", "text": "function get_fisheye_diff_url($projecturl, $directory, $file, $revision)\n{\n $diff_url = rtrim($projecturl, '/').($directory ? (\"/\".$directory) : \"\").\"/\".$file;\n \n if($revision != '')\n {\n $prev_revision = get_previous_revision($revision);\n if($prev_revision != $revision)\n {\n $diff_url .= \"?r1=\".$prev_revision.\"&r2=\".$revision;\n } \n else \n {\n $diff_url .= \"?r=\".$revision;\n }\n }\n return make_cdash_url($diff_url);\n}", "title": "" }, { "docid": "a1b0059dd5b65a112f292be073bf7a3b", "score": "0.41387016", "text": "function buildSearch($lines, $buildname)\n\t{\n\t\t$line = \"\";\n\t\tfor ($i = 0; $i < count($lines); $i++) {\n\t\t\t$line = explode(\"\\t\", $lines[$i]);\n\t\t\tif (strcmp($line[0], $buildname) == 0) {\n\t\t\t\treturn $line;\n\t\t\t}\n\t\t}\n\t\t$line = \"\";\n\t\treturn $line;\n\t}", "title": "" }, { "docid": "a3fd0c04cf291cf925eafdcd9b4e311c", "score": "0.41367072", "text": "function buildCsv()\n {\n global $LANG;\n\n $strFilepath = PATH_site . 'typo3temp/' . $this->arrModParameters['filename'];\n GeneralUtility::unlink_tempfile($strFilepath);\n\n if ($this->fileHandle = fopen($strFilepath, 'ab')) {\n $this->getSeparator();\n $this->getCodingFormat();\n $this->getBlankAnswersProcessing();\n $arrError['column'] = $this->writeCsvColumnNames();\n $arrError['result'] = $this->writeCsvResult();\n $arrError['close'] = fclose($this->fileHandle);\n GeneralUtility::fixPermissions($strFilepath);\n\n if (!in_array(false, $arrError)) {\n header('Pragma: public');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Expires: 0');\n header('Content-Disposition: attachment; filename=' . $this->arrModParameters['filename'] . '');\n header('Content-type: x-application/octet-stream');\n header('Content-Transfer-Encoding: binary');\n header('Content-length:' . filesize($strFilepath) . '');\n $arrError['read'] = readfile($strFilepath);\n if ($arrError['read']) {\n exit;\n }\n }\n } else {\n $arrOutput[] = $LANG->getLL('error_fileopen');\n }\n\n foreach ($arrError as $strKey => $strValue) {\n if (!$strValue) {\n $this->arrError['error_file' . $strKey] = $LANG->getLL('error_file' . $strKey);\n }\n }\n }", "title": "" }, { "docid": "a158722d3c0d10eb7aa512f82f52ca5c", "score": "0.4121426", "text": "public function testFilterRuntimeFail(): void\n {\n $this->expectException(GeneralException::class);\n $this->expectExceptionMessage(\"An error occurred while copying file \" . self::TEST_FILE_TMP_COPY . \".\");\n $copyFilterMock = \\Mockery::mock(Copy::class)->makePartial()->shouldAllowMockingProtectedMethods();\n $copyFilterMock\n ->shouldReceive('getNewName')\n ->once()\n ->andReturn([\n 'target' => self::TEST_FILE_TMP_COPY,\n 'source' => self::TEST_FILE_TMP_COPY,\n ])\n ->shouldReceive('copyFileToDestination')\n ->once()\n ->andReturn(false)\n ;\n $copyFilterMock->filter(self::TEST_WRONG_FILE);\n }", "title": "" }, { "docid": "45866d43d982109bdacd801d1686117d", "score": "0.4120447", "text": "public function getOutput() {\r\n\r\n\t\t\r\n\t\t$fileCacheName = $this->_getKeyName ();\r\n\t\t$cacheTime=intval($this->_getCacheTime ());\r\n\t\t$pathFC = $this->_cache->getCacheNameFile($fileCacheName);\r\n\t\t\r\n\t\t$this->pathFile = $pathFC;\r\n\t\t\r\n\t\t$fileToCheck = $this->_getFileToCheck ();\r\n\t\tif ($fileToCheck) $fileToCheckTime = @filemtime($fileToCheck);\r\n\t\t$regenerar = false;\r\n\r\n\t\t$tracecache = Http::$get->tracecache;\r\n\t\t\r\n\t\tDebug::add(\"-----------------------------------------------------------------------\");\r\n\t\tDebug::add(\"CLASS \".strtoupper(get_class($this)).\"\");\r\n\t\t\r\n\t\tif (!$this->_update){\r\n\t\t\tif (!($st = @stat($pathFC))) {\r\n\t\t\t\t$this->_update = true;\r\n\t\t\t}else{\r\n\t\t\t\tif (!$cacheTime){\r\n\t\t\t\tif ($fileToCheck && ($st['mtime'] < $fileToCheckTime))\r\n\t\t\t\t$regenerar=true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif ((time() - $st['mtime']) > $cacheTime){\r\n\t\t\t\t\t$regenerar = true;\r\n\t\t\t\t\t$this->setUpdate();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (Http::$get->regenerate == true && !isset($this->_notRegenerate) ) \t$this->_update = true;\r\n\t\t}\r\n\r\n\t\r\n\t\tDebug::add(\"FORZADO = $this->_update \");\r\n\r\n\t\tif ($this->_update){\r\n\t\t\r\n\t\t\t$class = strtoupper(get_class($this));\r\n\t\t\t\r\n\t\t\tDebug::add(date (\"d-m-Y H:m:s\") . \" CLASS: $class CACHE NAME: $fileCacheName\");\r\n\r\n\t\t\tDebug::add(\" CACHE TIME: $cacheTime \");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\t$contenido = $this->_getContent ();\r\n\t\t\t\t$this->_unlinkStaticObject ();\r\n\t\t\t\t// Limpio de blancos\r\n\t\t\t\t//\t$contenido=preg_replace('/([ \\t]*[\\r\\n]+[ \\t]*)+/', \"\\n\", $contenido);\r\n\t\t\t\t//\t$contenido=preg_replace('/[ \\t]+/', ' ', $contenido);\r\n\r\n\t\t\t\t$patron = \".*#DYN#[a-z A-Z]*#DYN#.*\";\r\n\t\t\t\tif(ereg($patron,$contenido)){\r\n\t\t\t\t\t$data = explode(\"#DYN#\",$contenido);\r\n\t\t\t\t\tif(is_array($data)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$c = 0;\r\n\t\t\t\t\t\tforeach($data as $k => $v){\r\n\t\t\t\t\t\t\tif($c == 1){\r\n\t\t\t\t\t\t\t\t$valor =\"\";\r\n\t\t\t\t\t\t\t\tif(method_exists($this,$v)){\r\n\t\t\t\t\t\t\t\t\t$valor = $this->$v();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$contenido = ereg_replace(\"#DYN#$v#DYN#\",$valor,$contenido);\r\n\t\t\t\t\t\t\t\t$c=-1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$c++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->writeCache ($fileCacheName, $contenido);\r\n\t\t\t\t\r\n\t\t\t\tDebug::add(\">>>>>>>>>>>>>ESCRIBO CACHE $fileCacheName <<<<<<<<<<<<<<\");\r\n\t\t\t\t\r\n\t\t\t\treturn $contenido;\r\n\r\n\t\t\t}catch(Exception $e) {\r\n\t\t\t\t$regenerar=true;\r\n\t\t\t\tDebug::add(\"<b>**** ERROR GENERANDO MODULO $class: \".$e->getMessage().\"</b>\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// Envio de la regeneracin del m dulo\r\n\t\tDebug::add(\"CHECK REFRESCO: Time = $cacheTime IDCACHE=$fileCacheName TIME=\".time().\" <> CACHE=\".filemtime($this->_cache->getCacheNameFile($fileCacheName)).\" DIF= \".(time()- filemtime($this->_cache->getCacheNameFile($fileCacheName))).\"\");\r\n\t\t\r\n\t\tif ($fileToCheck) \r\n\t\t\tDebug::add(\"REF FICHERO: $fileToCheckTime. DIF= \".($fileToCheckTime - filemtime($this->_cache->getCacheNameFile($fileCacheName))).\"\");\r\n\r\n\r\n\t\tif ($regenerar){\r\n\t\t\r\n\t\t\tDebug::add(\"************* MANDO REFRESCO ************ (\".(time() - filemtime($this->_cache->getCacheNameFile($fileCacheName))).\"sg.)\");\r\n\t\t\t\r\n\t\t\t$this->_generateStaticObject ();\r\n\t\t\t\r\n\t\t\tDebug::add(\">>>>ESCRIBO SERIALIZADO OBJETO $fileCacheName <<<<\");\r\n\t\t}\r\n\t\tDebug::add(\"LEO CACHE $fileCacheName \"); \r\n\t\t$contenido = @$this->readCache ($fileCacheName);\r\n\r\n\t\treturn $contenido;\r\n }", "title": "" }, { "docid": "3979f09e77883659e9439eae89b3feda", "score": "0.41191536", "text": "public function main() {\n\t\t$elementList = file_get_contents($this->source);\n\n\t\t$this->log('Building index....');\n\t\t$this->log('Source: ' . $this->source);\n\t\t$this->log('Destination: ' . $this->destination);\n\n\t\tpreg_match_all('~\\[\\K[^[\\]]++~', $elementList, $rows);\n\n\t\tif (file_exists($this->destination)) {\n\t\t\t$this->log('Wiping destination file: ' . $this->destination);\n\t\t\tunlink($this->destination);\n\t\t}\n\n\t\t$this->log('Initialising database file: ' . $this->destination);\n\t\t$db = new SQLite3($this->destination);\n\n\t\t$db->exec('pragma synchronous = off;');\n\n\t\t$query = 'CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);';\n\t\t$this->log('Creating database structure');\n\t\t$db->exec($query);\n\n\t\t$query = 'CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path);';\n\t\t$this->log('Creating unique index');\n\t\t$db->exec($query);\n\n\t\t$query = '';\n\t\t$counter = 0;\n\t\tforeach ($rows[0] as $row) {\n\t\t\t$data = explode(',', $row);\n\t\t\t$name = substr($data[1], 1, -1);\n\t\t\t$type = substr($data[0], 1, -1);\n\n\t\t\t$nameParts = explode('::', $name);\n\n\t\t\t$replace = array(\n\t\t\t\t'\\\\\\\\' => '.',\n\t\t\t\t'()' => ''\n\t\t\t);\n\n\t\t\t$file = sprintf(\n\t\t\t\t$this->apigenConfig['templates']['main'][$this->fileName[$type]]['filename'],\n\t\t\t\tstr_replace(array_keys($replace), array_values($replace), $nameParts[0])\n\t\t\t);\n\n\t\t\tif (count($nameParts) > 1) {\n\t\t\t\t$file .= '#' . ('mm' === $type || 'mp' === $type ? 'm' : '') . preg_replace('/([\\w]+)\\(\\)/', '_$1', $nameParts[1]);\n\t\t\t}\n\n\t\t\t$query .= vsprintf(\n\t\t\t\t\t'INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES (\"%s\", \"%s\", \"%s\");',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$name,\n\t\t\t\t\t\t$this->typeIndex[$type],\n\t\t\t\t\t\t$file\n\t\t\t\t\t)\n\t\t\t\t) . \"\\n\";\n\t\t\t//$this->log('Inserting ' . $name . ' pointing at: ' . $file);\n\n\t\t\t$counter++;\n\n\t\t\tif ($counter % 100 == 0) {\n\t\t\t\t$this->log('Inserting on count: ' . $counter);\n\t\t\t\t$db->exec($query);\n\t\t\t\t$query = '';\n\t\t\t}\n\n\n\t\t}\n\n\t\tif ($query !== '') {\n\t\t\t$this->log('Inserting on count: ' . $counter);\n\t\t\t$db->exec($query);\n\t\t}\n\n\t}", "title": "" }, { "docid": "da93fe01f68c9eb4c10e4c491d6db338", "score": "0.41142008", "text": "public function merge ( )\r\n\t{\r\n\t\tif ( $this->should_merge )\r\n\t\t{\r\n\t\t\t// \titerate over $this->referrer_xml and replace elements that are references or fills elements that are partial\r\n\t\t\t$this->recurseXml ( $this->referrer_xml , null , \"\" );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// else - return the file as-is\r\n\t\t}\r\n\r\n\t\t// TODO - make a copy of the referrer and work n top of it.\r\n\t\t// create from scratch ? manipulate / delete current elements ?\r\n\t\treturn trim($this->referrer_xml->asXml());\r\n\t}", "title": "" }, { "docid": "7f8b415616c7d4ad34b408e9b4a8f3ee", "score": "0.41139278", "text": "protected function generateNewPart()\n {\n if ($this->buffer) {\n $this->closeSitemap();\n }\n\n $this->bufferUrlCount = 0;\n $this->bufferSize = 0;\n $this->bufferPart++;\n\n if (!is_writable($this->folder)) {\n throw new \\RuntimeException(sprintf('Unable to write to folder: %s', $this->folder));\n }\n\n $filename = sprintf($this->pattern, $this->bufferPart);\n\n $this->buffer = fopen($this->folder . '/' . $filename, 'w');\n\n $this->bufferSize += fwrite($this->buffer, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\".'<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">'.\"\\n\");\n }", "title": "" }, { "docid": "bf23f7023bdeb1ab406b1ff864845edd", "score": "0.41132423", "text": "public function buildFileID($filename, $hash = null, $variant = null, $cleanfilename = true);", "title": "" }, { "docid": "bb3cb91c6929fed32c3bf4dd2e29621f", "score": "0.4101434", "text": "function buildExportFile()\n\t{\n\t\tswitch ($this->mode)\n\t\t{\n\t\t\tcase \"xls\":\n\t\t\t\treturn $this->buildExportFileXLS();\n\t\t\t\tbreak;\n\t\t\tcase \"xml\":\n\t\t\tdefault:\n\t\t\t\treturn $this->buildExportFileXML();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "d176f920f0110a8f8728505c7109f8a8", "score": "0.40995854", "text": "private function makeResult() {}", "title": "" }, { "docid": "79d664cf9f5cb77242c7b1c1a1a21882", "score": "0.40931413", "text": "private function write()\n {\n $project = $this->getProject();\n\n if (!touch($this->file->getPath())) {\n throw new BuildException(\"Unable to write to \" . $this->file->getPath() . \".\");\n }\n\n $this->log(\"Writing to \" . $this->file->__toString(), Project::MSG_INFO);\n\n if (is_array($this->checksum)) {\n $this->log(\"Using \" . implode(', ', $this->checksum) . \" for checksuming.\", Project::MSG_INFO);\n }\n\n foreach ($this->filesets as $fs) {\n\n $dir = $fs->getDir($this->project)->getPath();\n\n $ds = $fs->getDirectoryScanner($project);\n $fromDir = $fs->getDir($project);\n $srcFiles = $ds->getIncludedFiles();\n $srcDirs = $ds->getIncludedDirectories();\n\n foreach ($ds->getIncludedFiles() as $file_path) {\n $line = $file_path;\n if ($this->checksum) {\n foreach ($this->checksum as $algo) {\n if (!$hash = $this->hashFile($dir . '/' . $file_path, $algo)) {\n throw new BuildException(\"Hashing $dir/$file_path with $algo failed!\");\n }\n\n $line .= \"\\t\" . $hash;\n }\n }\n $line .= \"\\n\";\n $manifest[] = $line;\n $this->log(\"Adding file \" . $file_path, Project::MSG_VERBOSE);\n $this->meta['totalFileCount']++;\n $this->meta['totalFileSize'] += filesize($dir . '/' . $file_path);\n }\n\n }\n\n file_put_contents($this->file, $manifest);\n\n $this->log(\n \"Done. Total files: \" . $this->meta['totalFileCount'] . \". Total file size: \" . $this->meta['totalFileSize'] . \" bytes.\",\n Project::MSG_INFO\n );\n }", "title": "" }, { "docid": "c4abacdb3a29c7bd0637d9077a5aec34", "score": "0.40928674", "text": "protected function createCodeResourceUriForTest()\n {\n list($class, $method) = explode('::', $this->getCallingTestMethod());\n\n if (1 === count($parts = explode('\\\\', $class))) {\n $parts = explode('\\\\', $class);\n }\n\n\n // Strip first two parts\n array_shift($parts);\n\n if (!preg_match('(Version\\d+Test$)', end($parts)) && preg_match('(\\D(\\d+Test)$)', end($parts), $match)) {\n array_pop($parts);\n array_push($parts, $match[1]);\n\n // TODO: Fix this workaround for the existing lower case directories\n array_unshift($parts, strtolower(array_shift($parts)));\n }\n\n $fileName = substr(join(DIRECTORY_SEPARATOR, $parts), 0, -4) . DIRECTORY_SEPARATOR . $method;\n try {\n return $this->createCodeResourceURI($fileName);\n } catch (\\ErrorException $e) {\n return $this->createCodeResourceURI(\"{$fileName}.php\");\n }\n }", "title": "" }, { "docid": "2b7de7c3afb2ace7b51f5f4abae026e5", "score": "0.40910882", "text": "abstract protected function createResult();", "title": "" }, { "docid": "b4f026a3276ae6c8bc3f0d07122d815b", "score": "0.40784934", "text": "function make_file_logger() {\r\n\t\t\r\n\t\t// test to see if file is writable\r\n\t\t$handle = @fopen(owa_coreAPI::getSetting('base', 'error_log_file'), \"a\");\r\n\t\t\r\n\t\tif ($handle != false):\r\n\t\t\tfclose($handle);\r\n\t\t\t$conf = array('mode' => 0600, 'timeFormat' => '%X %x', 'lineFormat' => '%1$s %2$s [%3$s] %4$s');\r\n\t\t\t$logger = Log::singleton('file', owa_coreAPI::getSetting('base', 'error_log_file'), getmypid(), $conf);\r\n\t\t\treturn $logger;\r\n\t\telse:\r\n\t\t\treturn;\r\n\t\tendif;\r\n\t}", "title": "" }, { "docid": "8ca59d5b49ba72b148ccad30b304902e", "score": "0.40772548", "text": "public function testReturn() {\n // Grab a listing of all the JavaScript files and check that they're\n // passed to the callback.\n $all_files = $this->fileSystem->scanDirectory($this->path, '/^javascript-/');\n ksort($all_files);\n $this->assertCount(2, $all_files, 'Found two, expected javascript files.');\n\n // Check the first file.\n $file = reset($all_files);\n $this->assertEquals(key($all_files), $file->uri, 'Correct array key was used for the first returned file.');\n $this->assertEquals($this->path . '/javascript-1.txt', $file->uri, 'First file name was set correctly.');\n $this->assertEquals('javascript-1.txt', $file->filename, 'First basename was set correctly');\n $this->assertEquals('javascript-1', $file->name, 'First name was set correctly.');\n\n // Check the second file.\n $file = next($all_files);\n $this->assertEquals(key($all_files), $file->uri, 'Correct array key was used for the second returned file.');\n $this->assertEquals($this->path . '/javascript-2.script', $file->uri, 'Second file name was set correctly.');\n $this->assertEquals('javascript-2.script', $file->filename, 'Second basename was set correctly');\n $this->assertEquals('javascript-2', $file->name, 'Second name was set correctly.');\n }", "title": "" }, { "docid": "f47f784737503a477d05e000e34fbf18", "score": "0.40769726", "text": "function tracsvn_diff($diffs) {\n\tglobal $settings;\n\n\t// validation\n\tif (!is_array($diffs) || !isset($diffs['path']) || !isset($diffs['rev']) || !isset($diffs['base_rev'])) {\n\t\treturn \"\";\n\t}\n\n\t// get the base revision\n\t$oldfile = tempnam(\"temp\", \"\");\n\t$raw = tracsvn_ExtCmd(tracsvn_quoteCmd($settings['tracsvn_svncmd'].\" cat \".$settings['tracsvn_url'].$diffs['path'].\"@\".$diffs['base_rev'].\" \".$settings['tracsvn_svnauth'].\" > $oldfile\"));\n\tif ($raw[0] == \"ERROR\") {\n\t\t$output = array();\n\t\t$output[] = array();\n\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => 'While retrieving base_rev:');\n\t\tforeach($raw as $nr => $line) {\n\t\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => $line);\n\t\t}\n\t\treturn $output;\n\t}\n\n\t// get the new revision\n\t$newfile = tempnam(\"temp\", \"\");\n\t$raw = tracsvn_ExtCmd(tracsvn_quoteCmd($settings['tracsvn_svncmd'].\" cat \".$settings['tracsvn_url'].$diffs['path'].\"@\".$diffs['rev'].\" \".$settings['tracsvn_svnauth'].\" > $newfile\"));\n\tif ($raw[0] == \"ERROR\") {\n\t\t$output = array();\n\t\t$output[] = array();\n\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => 'While retrieving new_rev:');\n\t\tforeach($raw as $nr => $line) {\n\t\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => $line);\n\t\t}\n\t\treturn $output;\n\t}\n\n\t// get the diff between the two files\n\t$raw = tracsvn_ExtCmd(tracsvn_quoteCmd(\"diff -w -U 2 $oldfile $newfile\"));\n\tif ($raw[0] == \"ERROR\") {\n\t\t$output = array();\n\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => 'While preparing the diff:');\n\t\tforeach($raw as $nr => $line) {\n\t\t\t$output[] = array('left' => \"\", 'right' => \"\", 'line' => $line);\n\t\t}\n\t\treturn $output;\n\t}\n//_debug($raw, true);\n\n\t// delete the temp files\n\t@unlink($oldfile);\n\t@unlink($newfile);\n\n\t// initialisation\n\t$output = array();\n\t$diffcount = 0;\n\n\t// drop the last entry in the raw output\n\tarray_pop($raw);\n\n\t// loop trough the raw output\n\tforeach($raw as $nr => $line) {\n\n\t\t// ignore the first two lines\n\t\tif ($nr == 0 || $nr == 1) continue;\n\n\t\t// check if we have a new diff block\n\t\tif (substr($line,0,2) == \"@@\") {\n\t\t\t// increment the diff count\n\t\t\t$diffcount++;\n\t\t\t// extract the linenumber info\n\t\t\t$line = explode(\" \", substr($line,3,strlen($line)-6));\n\t\t\t$left = explode(\",\", substr($line[0],1));\n\t\t\t$right = explode(\",\", substr($line[1],1));\n\t\t\t$break = $left[1] / 2;\n\t\t\t// if this isn't the first block, insert a separator line\n\t\t\tif (count($output)) $output[] = array('left' => \"...\", 'right' => \"...\", 'line' => \"\");\n\t\t\tcontinue;\n\t\t}\n\t\t// create the array for this line\n\t\t$thisline = array();\n\n\t\t// check what kind of change it is\n\t\tswitch (substr($line,0,1)) {\n\t\t\tcase \"-\":\n\t\t\t\t// removed from the old file\n\t\t\t\t$thisline['left'] = $left[0]++;\n\t\t\t\t$thisline['right'] = \"\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"+\":\n\t\t\t\t// added to the new file\n\t\t\t\t$thisline['left'] = \"\";\n\t\t\t\t$thisline['right'] = $right[0]++;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// same in both files\n\t\t\t\t$thisline['left'] = $left[0]++;\n\t\t\t\t$thisline['right'] = $right[0]++;\n\t\t\t\tbreak;\n\t\t}\n\t\t// line\n\t\t$thisline['line'] = stripinput(substr($line,2));\n\t\t$thisline['line'] = str_repeat(\"&nbsp;\", strlen($thisline['line']) - strlen(ltrim($thisline['line']))) . ltrim($thisline['line']);\n\n\t\t// store this line\n\t\t$output[] = $thisline;\n\t}\n\n\t// store the diffcount\n\t$output[0]['diffcount'] = $diffcount;\n\n\t// and return the output\n\treturn $output;\n}", "title": "" }, { "docid": "caa9ffcb179df11c7f2a9153950b287e", "score": "0.40768924", "text": "function tip_tag($a,$b,$c,$d){\n\n\t$file1 = fopen(\"C:/Program Files (x86)/BaseX/webapp/xml/book2_final.xml\", \"r\");\n\t// make a new file\n\t$file2 = fopen(\"C:/Program Files (x86)/BaseX/webapp/xml/hello.xml\", \"w\");\n\n\t$in_tips = false ;\t\t// for <trans>\n\t//$close_trans = false ;\t\t// for </trans>\n\n\twhile (!feof($file1)) {\n\t\t$temp = fgets($file1);\n\n\t\tif ( !(strpos($temp, $a) === false)) {\n\t\t\t$in_tips = true ;\n\t\t}\n\n\t\tif (!(strpos($temp, $b) === false)) {\n\t\t\t$in_tips = false;\t\n\t\t}\n\n\t\tif ($in_tips && (strpos($temp, $a)===false) ) {\n\t\t\t$temp = $c.PHP_EOL.$temp.$d.PHP_EOL;\n\t\t}\n\n\t\tfputs($file2, $temp);\n\t}\t\t\n\n\tfclose($file1);\n\tfclose($file2);\n\n\t// Part Two \n\t$file = file_get_contents(\"C:/Program Files (x86)/BaseX/webapp/xml/hello.xml\");\n\tfile_put_contents(\"C:/Program Files (x86)/BaseX/webapp/xml/book2_final.xml\", $file);\n}", "title": "" }, { "docid": "14b34301a121e4dd91b1033c4a0c1e37", "score": "0.40755767", "text": "protected function finalOutputFile(SimpleXMLElement $xml) {\n\n\t\t$fileName = str_replace('[sitename]',\n\t\t\tpreg_replace('~[^a-z0-9]+~i','',$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']),\n\t\t\t$this->settings['outputFileName']);\n\n\t\t$fileName = preg_replace('~\\[([a-z_\\-]+)\\]~ie','date(\\'\\\\1\\')',$fileName);\n\t\t$fileName = empty($fileName) ? 'TYPO3Mind_'.mt_rand().'.mm' : $fileName;\n\t\t\n\t\t$xml = str_replace(\n\t\t\tarray('|lt|',\t'|gt|',\t'@#',\t'&amp;gt;',\t'&amp;lt;',\t'&amp;amp;'),\n\t\t\tarray('<',\t\t'>',\t'&#',\t'&gt;',\t\t'&lt;',\t\t'&amp;'),\n\t\t\t$xml->asXML()\n\t\t);\n\n\t\t$md5 = md5($xml);\n\t\t$xml = str_replace(\n\t\t\tarray('###MD5_FILE_HASH####'),\n\t\t\tarray($md5),\n\t\t\t$xml\n\t\t).'<!--HiddenMD5:'.$md5.'-->';\n\n\t\t$fileName = 'typo3temp/'.$fileName;\n\t\t\n\t\t$bytesWritten = file_put_contents(PATH_site.$fileName, $xml );\n\t\tunset($xml);\n\t\t\n\t\tif( $bytesWritten === false ){\n\t\t\tdie('<h2>Write to file '.PATH_site.$fileName.' failed ... check permissions!</h2>');\n\t\t}\n\t\telseif( $bytesWritten == 0 ){\n\t\t\tdie('<h2>Zero bytes written to file '.PATH_site.$fileName.' ... hmmm.... ?</h2>');\n\t\t}\n\t\t\n\t\t/* check if file has been build successfully */\n\t\t$return = array();\n\t\t$return['iserror'] = simplexml_load_file(PATH_site.$fileName) === false ? true : false;\t\t\n\t\t$return['errors'] = array_reverse( libxml_get_errors(), true);\n\t\tforeach($return['errors'] as $k=>$v){\n\t\t\tif( $v->level > 2 ){ $return['errors'][$k] = (array)$v; } else { unset($return['errors'][$k]); }\n\t\t}\n\t\t$return['filekb'] = sprintf('%.2f',$bytesWritten/1024);\n\t\t$return['file'] = $fileName;\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "a8b5f6eb7c4655a9bb98f996b9cbf065", "score": "0.406751", "text": "public static function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" }, { "docid": "a8b5f6eb7c4655a9bb98f996b9cbf065", "score": "0.406751", "text": "public static function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" }, { "docid": "a8b5f6eb7c4655a9bb98f996b9cbf065", "score": "0.406751", "text": "public static function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" }, { "docid": "a8b5f6eb7c4655a9bb98f996b9cbf065", "score": "0.406751", "text": "public static function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" }, { "docid": "196490405ccfbbab83466611bfd278a0", "score": "0.40614212", "text": "public function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" }, { "docid": "196490405ccfbbab83466611bfd278a0", "score": "0.40614212", "text": "public function toRet($merge = []): \\Wei\\Ret\n {\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "bb29b0e3ac26de39d4779d041fe3eec9", "score": "0.0", "text": "public function index()\n {\n //\n $student = Student::paginate(config('student.students_per_page'));\n $student->setPath('student');\n\n return view('student.index')->withStudents($student);\n }", "title": "" } ]
[ { "docid": "1d384f4e78f98647387c1b7298b0696a", "score": "0.74735427", "text": "public function index ()\n {\n $this->list();\n }", "title": "" }, { "docid": "4bed8c9cfd05d9666f1acd8791970421", "score": "0.74595845", "text": "public function index()\n {\n /** @var \\Colibri\\Database\\ModelCollection $items */\n $items = new $this->listClass();\n $this->applyListFilters($items);\n $items->load();\n\n $this->template->vars[$this->listTplVar] = $items;\n if ($this->pagedList) {\n $this->template->vars['pagination'] = [\n 'page' => (int)(isset($_GET['page']) ? $_GET['page'] : 0),\n 'recordsPerPage' => $items->recordsPerPage,\n 'recordsCount' => $items->recordsCount,\n 'pagesCount' => $items->pagesCount,\n 'base_url' => '/' . $this->division . '/' . $this->module,\n ];\n }\n }", "title": "" }, { "docid": "fd728130e464c7ca0e936873b067ad9b", "score": "0.74557644", "text": "public function index()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\n $select = ['id'];\n $eagerLoad = [];\n foreach($resource->fields as $field)\n {\n if($field->list) $select[] = $field->slug;\n\n if($field->type == 'relational')\n {\n $eagerLoad[] = $field->data('method');\n }\n }\n\n $model = $this->getModel($resource);\n $entities = $model::with($eagerLoad)->select($select)->get();\n\n $hasObjects = false;\n if(method_exists($model, 'objects')) $hasObjects = true;\n\n return view('laramanager::resource.index', compact('resource', 'entities', 'hasObjects'));\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "53e8cdd7001e03b480caa697d00c6da2", "score": "0.73947984", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "c66f120116ada3a42cc9932c701e6a9d", "score": "0.7343025", "text": "public function listAction()\n {\n $bookRepository = new BookRepository();\n $books = $bookRepository->getAll();\n\n $argsArray = [\n 'books' => $books\n ];\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "f89eac18f2fecb9e12a4e0696258300d", "score": "0.7321151", "text": "public function listing()\n {\n return $this->render(\"listing.html.twig\");\n }", "title": "" }, { "docid": "27e6e4cef6757eab4dd656d684b1f18f", "score": "0.729922", "text": "public function index()\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->getAll($this->_getListOrder(), $this->_getQueryConditions());\n }\n\n return view('admin.' . $this->resource . '.index')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eb8bf6d357654d40e9f3c6be964ff840", "score": "0.72384673", "text": "public function index()\n {\n $data = $this->model->all();\n return view('admin::resource.index', [\n 'items' => $data,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "1a9358d5e70acc9743aa95c2f18698aa", "score": "0.7216698", "text": "public function listAction()\n {\n $this->View()->assign(\n $this->getList(\n $this->Request()->getParam('start', 0),\n $this->Request()->getParam('limit', 20),\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('filter', []),\n $this->Request()->getParams()\n )\n );\n }", "title": "" }, { "docid": "09297f1ea9fe181abebbfadcb8142222", "score": "0.7186935", "text": "public function index(){\n $this->listItems();\n }", "title": "" }, { "docid": "ecc2dbc48848a139f5406206edda7fd6", "score": "0.70593506", "text": "function seeAll() {\n $results = array();\n $data = Resource::getList();\n $results['resources'] = $data['results'];\n $results['totalRows'] = $data['totalRows'];\n $results['pageTitle'] = \"Resource Archive | Couch To Code\";\n require( $TEMPLATE_PATH . \"/archive.php\" );\n}", "title": "" }, { "docid": "1e170838915eaf18af92a3ce754576f4", "score": "0.70549136", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", 'like', \"%$filter%\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "1bc9d0eeecbb5965922934931cecd66c", "score": "0.7042268", "text": "public function index()\n { \n //Get entries\n $entries = Entry::paginate(10);\n \n //Return collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "d64ddf4f7bf215d8ac46dc7bbfb1a5eb", "score": "0.70275784", "text": "public function listAction()\n {\n $this->_useAdditionalContent = true;\n \t\n \t$dataType = $this->_request->getParam('dataType');\n if($dataType == 'data'){\n \t// Abstract route\n \tthrow new Lib_Exception(\"dataType 'data' not allowed for listAction\");\n }\n $page = $this->_getParam('page', 1);\n $result = Data_Utils::getList($this->_user, $this->_acl, $dataType, $page);\n $items = $this->_paginateData($result['select'], $page, $result['itemsPerPage']);\n\n if(count($items)){\n \t$item = $items->getIterator()->current();\n } else {\n \t$table = ucfirst($dataType);\n \t$table = new $table();\n \t$item = $table->fetchNew();\n }\n Zend_Registry::set('Category', $item->getCategory());\n Zend_Registry::set('SubCategory', $item->getSubCategory());\n\n $this->_helper->layout->setLayout($item->getLayout(Data::ACTION_LIST));\n\n $this->view->items = $items;\n $this->view->dataType = $dataType;\n $this->view->separateFirstContentCardHeader = true;\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "42bf79f7c36bcd7921da4ede6d5056e2", "score": "0.69541866", "text": "public function lists()\n\t{\n\t\t$pics = Picture::all();\n\t\treturn view('default.rc.resources.lists')->with('pics', $pics);\n\t}", "title": "" }, { "docid": "673459c7290880615c394e798a3f1a65", "score": "0.69069874", "text": "public function index()\n {\n return ReadingListResource::collection(ReadingList::all());\n }", "title": "" }, { "docid": "11b3547fc126f6093eb0a2e7e0aef2eb", "score": "0.68977946", "text": "public function listAction()\n {\n $pages = \\Page\\Model\\Page::find();\n $filter = new \\Api\\Filter\\PagesList();\n $payload = new \\Api\\Model\\Payload($filter->filter($pages));\n\n return $this->render($payload);\n }", "title": "" }, { "docid": "76af57d44f9f03d2c164c16d1a203b35", "score": "0.68751", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "d5424d838a7b9b5f2347c4e6d78a4dae", "score": "0.6867298", "text": "public function indexAction()\n\t{\n\t\t$page = $this->getRequest()->getParam('page');\n\n\t\t$resources = Application_Model_Document_Resource::all();\n\t\t// Store the resources in the view so it can render them with partials\n\t\t$this->view->resources = $resources;\n\t\tforeach($resources as $resource) {\n\t\t\t$array[] = $resource;\n\t\t}\n\t\t$paginator = Zend_Paginator::factory($array);\n\t\t$paginator->setCurrentPageNumber(intval($page));\n\t\t$paginator->setItemCountPerPage(8);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "1a97cf3e4d924e503cce423b0ca0da55", "score": "0.6864841", "text": "public function listAction()\n\t{\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\t\t\t\t\n\t\t\n\t\t$paginator = $this->_getPagedData();\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\t\t\n\t\t$this->_model->setRelationships($records);\t\t\n\n\t\t$html = new Fgsl_Html();\t\t\n\t\t$this->_table = $html->createTable($records);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->view->render('list.phtml');\n\t}", "title": "" }, { "docid": "ae4b114ffb14ab57ea0164b2b2a1e2a9", "score": "0.6854672", "text": "public function listing()\n {\n $mode = Input::get('mode') ?: \"search\";\n\n switch ($mode) {\n case 'roots':\n $roots = $this->listRootNodes();\n return response()->json(['data' => $roots]);\n case 'search':\n $page = Input::get('page')?: 1;\n $pageInfoArray = $this->listPage($page);\n return response()->json($pageInfoArray);\n default:\n return response()->json(['message' => 'Invalid search mode', 'errors' => array()])\n ->setStatusCode(400, '');\n }\n }", "title": "" }, { "docid": "b446e47526e7914ef4bdc3737ae4f077", "score": "0.68438184", "text": "public function list(){\n\t\t$this->load->view('listing');\n\t}", "title": "" }, { "docid": "761494348df8b3750a8a88c51e0b7195", "score": "0.68372846", "text": "public function actionList()\n {\n if(!in_array('list',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n $this->render(Yii::app()->request->isAjaxRequest ? $this->listPartial : $this->listView);\n }", "title": "" }, { "docid": "87f5741441fb47fe705676a54aca43a4", "score": "0.68317467", "text": "public function actionList()\n {\n $loansearch= new LoanSearch();\n $dataProvider = $loansearch->search(Yii::$app->request->get());\n \n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'searchmodel' => $loansearch\n ]);\n }", "title": "" }, { "docid": "87bb478103dde18bab9318d72db00152", "score": "0.6822629", "text": "public function index()\n\t{\n\t\t$items = Item::all();\n\t\treturn \\View::make('Item/list_item',compact('items'));\n\t}", "title": "" }, { "docid": "d1b243aa3b9ada5174dcd3dee5386a71", "score": "0.67757565", "text": "public function actionList() {\n\t\t$searchModel = DynamicSearchRecord::forModel ( $this->modelClassname );\n\t\t$dataProvider = $searchModel->search ( \\Yii::$app->request->queryParams );\n\t\t\n\t\treturn $this->owner->render ( 'list.json', [ \n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'dataProvider' => $dataProvider \n\t\t] );\n\t}", "title": "" }, { "docid": "d6f559efcd790aae0721cec604c5738a", "score": "0.67756224", "text": "public function listAction()\n {\n $frontEndDiscountsService = $this->container->get('dft_foapi.front_end_discounts');\n\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $frontEndDiscountsService->fetchAll($this->getAuthenticatedUserIdAndSubAccountIds())\n ));\n }", "title": "" }, { "docid": "48bfc0bd9a7b31cd041cca86fc310bff", "score": "0.6764525", "text": "public function listing() {\n\n $this->getMapper()->tableExists();\n\n // process any paging params\n $offset = 0;\n $limit = 10;\n $order = $this->getMapper()->getKey();\n $asc = TRUE;\n\n // process any offset requirements\n if ($this->request->getQueryParam('offset') !== NULL && is_numeric($this->request->getQueryParam('offset'))) {\n $offset = $this->request->getQueryParam('offset');\n }\n\n // process any limit requirements\n if ($this->request->getQueryParam('limit') !== NULL && is_numeric($this->request->getQueryParam('limit'))) {\n $limit = $this->request->getQueryParam('limit');\n }\n\n // process any order parameters\n if ($this->request->getQueryParam('order') !== NULL) {\n if (property_exists($this->mapper->getModel(), $this->request->getQueryParam('order'))) {\n $order = $this->request->getQueryParam('order');\n }\n }\n\n // process any asccending/decending requirements\r\n if ($this->request->getQueryParam('desc') !== NULL) {\r\n $asc = FALSE;\r\n }\n\n // ensure we arent passing in keys in query params ?keys=1,2,3,4 etc\n if ($this->request->getQueryParam('keys') !== NULL) {\n // List by id\r\n $result = $this->getMapper()->load_multiple(explode(',', $this->request->getQueryParam('keys')), $offset, $limit, $order, $asc);\n $data = $result['list'];\n $total = $result['total'];\n }\n else {\n // List all\n $result = $this->getMapper()->listing(NULL, $offset, $limit, $order, $asc);\n $data = $result['list'];\r\n $total = $result['total'];\n }\n\n // set the data\n $this->response->setMeta(array(\n 'order' => $order,\n 'offset' => $offset,\n 'limit' => $limit,\n 'direction' => ($asc == TRUE) ? 'ASC' : 'DESC',\n 'count' => count($data),\n 'total' => $total\n ));\n $this->response->setData($data);\n\n // Set response\n if (!empty($data)) {\n $this->response->setHeader('__OK', Http::Response(Http::OK));\n return TRUE;\n }\n $this->response->setHeader('__NOT_FOUND', Http::Response(Http::NOT_FOUND));\n return TRUE;\n }", "title": "" }, { "docid": "4af89c443382295cf45d3e2622ace5f2", "score": "0.67597896", "text": "public function show_list(){\n\t\t$fields\t\t\t = $this->get_fields();\n\t\t$display_fields\t = $fields;\n\t\t$db_fields\t\t = array_keys($fields);\n\t\t$this->set_fields($db_fields);\n\t\t$this->set_filters($this->get_filters_filter());\n\t\t$count\t\t\t = $this->get_count($this->get_filters());\n\t\t$this->set_row_count($count);\n\t\t$rows\t\t\t = $this->get_all($this->get_filters(), true);\n\t\t$this->un_set_fields();\n\t\tif($count == 1){\n\t\t\t$id\t\t\t\t = $rows[0][$this->get_primary_id_col()];\n\t\t\t$params\t\t\t = array();\n\t\t\t$params['id']\t = $id;\n\t\t\tif($this->needs_sub_table()){\n\t\t\t\t$params['sub_id'] = $rows[0][$this->get_sub_id_col()];\n\t\t\t}\n\t\t\t$params['action'] = 'edit';\n\t\t\t$this->redirect('', $params);\n\t\t}\n\t\t$col_count\t = count($fields);\n\t\t$filter_url\t = $this->get_ctrl_url();\n\t\t$this\n\t\t\t\t->assign('rows', $rows)\n\t\t\t\t->assign('fields', $display_fields)\n\t\t\t\t->assign('filter_url', $filter_url)\n\t\t\t\t->assign('col_count', $col_count)\n\t\t\t\t->view('list');\n\t}", "title": "" }, { "docid": "d711cb52a8e6005890b369293af69e7b", "score": "0.6758816", "text": "public function index()\n {\n $Recipes = Recipe::with('ingredients')->orderBy('name', 'asc')->paginate(15);\n return RecipeResource::collection($Recipes);\n }", "title": "" }, { "docid": "ff7b9b0b2610bec017a23bdf07c0fadc", "score": "0.6749715", "text": "public function index()\n {\n\n // SECURITY:\n // if view_table_permission is false, abort\n if (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n abort(403, 'Not allowed.');\n }\n\n // get all results for that entity\n $model = $this->crud['model'];\n\n if (isset($this->crud['is_translate']) && $this->crud['is_translate'] == true) {\n $this->data['entries'] = $model::orderby('id', 'ASC')->get();\n } else {\n $this->data['entries'] = $model::all();\n }\n\n // add the fake fields for each entry\n //dd($this->data['entries']);\n //foreach ($this->data['entries'] as $key => $entry) {\n // $entry->addFakes($this->getFakeColumnsAsArray());\n //}\n\n $this->prepareColumns();\n $this->data['crud'] = $this->crud;\n\n // load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\n return $this->firstViewThatExists('vendor.infinety.crud.list', 'crud::list', $this->data);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "d68899c3dabc0c21b0b2be7724f8030d", "score": "0.67380875", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Part Subtitute - '.APP_NAME;\n $this->global['pageMenu'] = 'List Part Subtitute';\n $this->global['contentHeader'] = 'List Part Subtitute';\n $this->global['contentTitle'] = 'List Part Subtitute';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "06f27ec9bf146b469adbf2e6705aabe8", "score": "0.6732888", "text": "public function index()\n {\n $pagination = new Pagination();\n $options = array();\n $pagination->setTotal(call_user_func_array([$this->_modelName, 'count'], array($options)));\n $options['limit'] = $pagination->rowsPerPage;\n $options['page'] = $pagination->offset;\n $records = call_user_func_array([$this->_modelName, 'all'], array($options));\n $this->set(compact('records', 'pagination'));\n }", "title": "" }, { "docid": "c71795f30a5bb75ebbd3e292fb5e8a4b", "score": "0.67322874", "text": "public function index()\n {\n return ProspectListResource::collection(Prospect::paginate());\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "652313a0e1da74ef567bfde3163208da", "score": "0.6711615", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->get());\n }", "title": "" }, { "docid": "09d6b29a7dfc37d687e4be6b37813ff1", "score": "0.66846824", "text": "private function listing()\n {\n //List partners\n $PartnersLib = new PartnersLib($this->DB);\n $this->responseSetContent($PartnersLib->listing());\n }", "title": "" }, { "docid": "66b2855c608ff83c2186cf3c1df31163", "score": "0.6681495", "text": "public function Index()\n\t{\n\t\t$data = parent::_ListData($this->_getPageTitle($this->method), 1000, \"parent_id = \".$this->db->escape_str($this->parent_id), \"\", $this->parent_id.\"/\", \"sort\", \"asc\");\n\n\t\t$data['tpl_page'] = $this->_getController().'/list';\n\t\tparent::_OnOutput($data);\n\t}", "title": "" }, { "docid": "69c11dee847c7c0490ac6622948612f7", "score": "0.6678495", "text": "public function index()\n {\n return view('resource-collections.index', ['resourceCollections' => ResourceCollection::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "79017f87f771247f39999d976e80538f", "score": "0.6677284", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getViews();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "d6bd209eea7a909ec1bbf56afae413a6", "score": "0.66759527", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Search')->findAll();\n\n return $this->render('AppBundle:Search:list.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8f532ae29d0271e5352287d73bdf275b", "score": "0.6675639", "text": "public function index()\n\t\t{\n\t\t\t// Consolidate data\n\t\t\t$data = array('hello' => 'world');\n\n\t\t\t// Handle request\n\t\t\tswitch (\\Request::format())\n\t\t\t{\n\t\t\t\tcase 'json':\n\t\t\t\t\treturn Response::json($data); // API\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->layout->content = \\View::make('scores::admin.listing', $data); // HTML\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b2bfe4741f53980dfae4fe18136b3f9", "score": "0.66670376", "text": "public function consolesListingPage() {\n Auth::redirectToLoginIfNotLoggedIn();\n\n $data['title'] = 'Consoles';\n $data['message'] = 'Here is the entire listing of available consoles.';\n $data['no-consoles'] = \"Sorry, there aren't any consoles available yet.\";\n $data['consoles'] = \\services\\Console::createConsoleObjectArray();\n\n View::rendertemplate('header', $data);\n View::render('consoles/consoles', $data);\n View::rendertemplate('footer', $data);\n }", "title": "" }, { "docid": "26b71fb578321a0935c2ecdff45d3b80", "score": "0.6665553", "text": "public function listAction()\n {\n return $this->render(\n 'AppBundle:employee:list.html.twig',\n [\n 'employees' => $this->get('employee')->loadEmployees(),\n ]\n );\n }", "title": "" }, { "docid": "02a808be513bd750788350c882906a0c", "score": "0.6660171", "text": "public function index() {\n // Get pagination parameters\n $fields = \\Core\\App::getInstance()->request->get(\"fields\");\n $fields = explode(\",\", $fields);\n\n $limit = \\Core\\App::getInstance()->request->get(\"limit\");\n $offset = \\Core\\App::getInstance()->request->get(\"offset\");\n $sort = \\Core\\App::getInstance()->request->get(\"sort\");\n $order = \\Core\\App::getInstance()->request->get(\"order\");\n $search = \\Core\\App::getInstance()->request->get(\"search\");\n $where = \\Core\\App::getInstance()->request->get(\"where\");\n $filter = json_decode(\\Core\\App::getInstance()->request->get(\"filter\"), true);\n\n // Get the data\n $data = \\Helpers\\Database::getObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $offset, $limit, $sort, $order, $filter);\n $count = \\Helpers\\Database::countObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $filter);\n\n // Send response\n \\Helpers\\Response::success([\n 'total' => $count,\n 'rows' => $data\n ]);\n }", "title": "" }, { "docid": "a3406c7ff6face6ebd5912a2a062298a", "score": "0.66530275", "text": "public function listAction()\n\t{\n\t\t$list = $this->db->select();// recuperation les infomations relatif a la function Select du fichier Database.php.\n\t\techo $this->twig->render('listPost.html',\n\t\t\t[\n\t\t\t\t\"list\" => $list\n\t\t\t]\n\t\t);\n\n\t}", "title": "" }, { "docid": "79f5369358653dfc5bbd4ed88772cc37", "score": "0.6647595", "text": "public function index()\n {\n //method show all Tags\n return TagResource::collection(Tag::paginate());\n }", "title": "" }, { "docid": "3e2f78b81b111995e32d53c1e5113d60", "score": "0.6631635", "text": "public function index()\n {\n return view('resource.row',\n [\n 'resources' => Resources::with('category', 'reservation')\n ->get()\n ]);\n }", "title": "" }, { "docid": "4eecf023369060252d00f8bf4fee5c2b", "score": "0.66296786", "text": "public function index()\n {\n return $this->show(\"All\");\n }", "title": "" }, { "docid": "28aaefde81bffe6c35ee93653410bbe4", "score": "0.6615643", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MInformations::getInstance()->getListSelect($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "0ce098c670548596cee63a4f7a02e6d6", "score": "0.6610194", "text": "public function list() { \n try {\n $list = $this->listModel->getList($_POST['pageNo']);\n if($list) {\n $this->response($list,200,'Success');\n } else {\n $this->response('',204,'No content');\n } \n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "title": "" }, { "docid": "01f5c196228688f47955dc605b965462", "score": "0.66081655", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Engineers - '.APP_NAME;\n $this->global['pageMenu'] = 'List Engineers';\n $this->global['contentHeader'] = 'List Engineers';\n $this->global['contentTitle'] = 'List Engineers';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['classname'] = $this->cname;\n $data['readonly'] = $this->readonly;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "7f1c8a5ab63c01e02fb3ba65a1e27120", "score": "0.66048485", "text": "public function index()\n {\n return StudentResource::collection($this->studentRepository->list());\n }", "title": "" }, { "docid": "09ff54f3ae80db26f6fde9cf6871ccdc", "score": "0.6594758", "text": "public function index()\n {\n // Get all Intents\n $intents = Intent::paginate(50);\n\n return IntentResource::collection($intents);\n }", "title": "" }, { "docid": "38d10de11fa88686187f73576fe11a7c", "score": "0.6575308", "text": "public function index()\n {\n View::share('resourceUrl', $this->resourceUrl);\n \n $photos = PhotoModel::all()->toArray();\n $babys = \\BabyModel::all()->lists('name', 'id');\n \n $this->layout->with('title', '列表');\n $this->layout->content = View::make( $this->resourceUrl . 'index' )->with(compact('photos', 'babys'));\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "f9a0a7fc5de7f0a8c0c42ac168169d27", "score": "0.6572973", "text": "public function index()\n {\n $books = Book::all();\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "643e2e525a9956d4f3d154800f2706fb", "score": "0.6567327", "text": "public function index()\n {\n // Get all the resources list.\n\n $contacts = Contact::orderBy('id', 'asc')->paginate(10);\n \n // Check if there is no resource.\n if(is_null($contacts)) {\n return response()->json([\"message\"=>\"No Contact found.\", \"data\"=>[], \"errors\"=>[], \"success\"=>true], 204);\n }\n // Return the list of resources.\n return response()->json([\"message\"=>\"Contacts list.\", \"data\"=>$contacts, \"errors\"=>[], \"success\"=>true], 200);\n }", "title": "" }, { "docid": "c4b3a61da5b12f663884b5e9ad36c7d1", "score": "0.6566601", "text": "public function index()\n {\n $products = Product::paginate(12);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2e6cf3266883ceb02caa28803bff3287", "score": "0.65665895", "text": "public function indexAction()\n {\n return $this->forward()\n ->dispatch(\n $this->params()\n ->fromRoute( 'controller', get_called_class() ),\n array(\n 'action' => 'list',\n 'locale' => (string) $this->locale(),\n )\n );\n }", "title": "" }, { "docid": "98b6312310ec07ad4be1841adb403ce3", "score": "0.656651", "text": "public function actionList() {\n $data = Yii::app()->db->createCommand('SELECT * from products')->queryAll();\n // or $data = Products::model()->findAll();\n $dataProvider = new CArrayDataProvider($data, array(\n 'pagination' => array('pagesize' => 10),\n ));\n $this->render('list', array(\n 'dataProvider' => $dataProvider,\n ));\n }", "title": "" }, { "docid": "131cc08b0e6134cac1d6af3250da5d11", "score": "0.6564312", "text": "public function list()\n {\n //\n return view('admin.onepage.list');\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "54d7b491cb48bf1dc5aa48e4b70243e8", "score": "0.6560677", "text": "public function index()\n {\n //Get Suppliers\n $suppliers = Supplier::paginate(100);\n\n //Return collection of suppliers as resource\n return SupplierResource::collection($suppliers);\n }", "title": "" }, { "docid": "eab040e429e9d0ed7c49740991e16b6a", "score": "0.65539455", "text": "public function actionList()\r\n {\r\n //All Sites\r\n $allSites = new Site('search');\r\n $allSites->unsetAttributes();\r\n if (isset($_GET['Site']))\r\n $allSites->attributes = $_GET['Site'];\r\n\r\n $this->render('list', array(\r\n 'allSites' => $allSites,\r\n 'gridViewSettings' => Site::gridViewSettings(),\r\n ));\r\n }", "title": "" }, { "docid": "b5dabee7628f504a4f1332387216fe1b", "score": "0.6541906", "text": "public function index()\n\t{\n\n\t\t$this->set(strtolower($this->modelNamePlural), $this->model->getAll());\n\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "bce9b2084302b70f248236ecc9038792", "score": "0.65368795", "text": "public function index()\n {\n try {\n $keywords = $this->request->query('keywords');\n $where = $this->request->query('where');\n $category_id = $this->request->query('category_id');\n\n $listings = $this->service\n ->search($keywords, $where, $category_id)\n ->sortByDesc('created_at');\n\n if ($this->paginate !== null) {\n $listings = $listings->paginate($this->paginate);\n }\n\n return new ListingResourceCollection($listings);\n } catch (Exception $ex) {\n return parent::handleException($ex);\n }\n }", "title": "" }, { "docid": "4f95d8e48aed5748b1d47771a5c780ff", "score": "0.65317386", "text": "public function index()\n {\n // Get divisions\n $divisions = Division::latest()->paginate(5);\n\n // Return collection of divisions as a resource\n return DivisionResource::collection($divisions);\n }", "title": "" }, { "docid": "bdc3df82aa2775b984746ad43f1f270d", "score": "0.65289664", "text": "public function listAction() {\n //Render the list twig\n return $this->render('MesdReportDemoBundle:Report:list.html.twig');\n }", "title": "" }, { "docid": "b3239f030ba6e204500bc8512083d8dd", "score": "0.6527235", "text": "public function index()\n {\n return ProgramsResource::collection(Program::paginate(15));\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "a590bbd0ca49f8f16ccf69ff4c577785", "score": "0.651896", "text": "public function index()\n {\n $sortieDetails = SortieDetails::all();\n\n // Return collection of sortie_details as a resource\n return SortieDetailsResource::collection($sortieDetails);\n }", "title": "" }, { "docid": "d88f7c52ab4450961acca7bf2dca42d7", "score": "0.65143025", "text": "public function displayList()\n\t{\n\n\t\t$this->lAdmin->DisplayList();\n\t}", "title": "" }, { "docid": "339c0962f54b7e532fa1290f675bd8c4", "score": "0.6505196", "text": "public function action_listing()\n\t{\n\t\t// populate data array\n\t\t$data = Table::get_all_data();\n\n\t\tif ($submit = \\Input::post('submit'))\n\t\t{\n\t\t\t// update table data via post and redirect\n\t\t\tTable::update_data(\\Input::post(null));\n\n\t\t\t// choose redirect action\n\t\t\tif ($submit == 'Back')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'prev');\n\t\t\t}\n\n\t\t\tif ($submit == 'Next')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'next');\n\t\t\t}\n\n\t\t\t\\Response::redirect($action);\n\t\t}\n\n\t\t// set common template vars\n\t\tself::_set_template_vars($this->template);\n\t}", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "e2c39459334902c7d856712c054793ec", "score": "0.6503653", "text": "public function index()\n {\n return $this->resourceCollection($this->model->with('teams')->get());\n }", "title": "" }, { "docid": "b7bae9c804826cdd9b0c94669ad36536", "score": "0.6501805", "text": "public function index()\n {\n $request = $this->makeRequest('index');\n $result = $this->service->getAll();\n\n return $this->maybeMakeResource('collection', $result);\n }", "title": "" }, { "docid": "56cb1332aceddef95a5e1453e37d8832", "score": "0.6501376", "text": "public function listAction()\n {\n try {\n $this->collectParameters();\n $this->findAirports();\n \n return $this->listActionResponse();\n } catch (\\Exception $e) { // Log exception and return an error response\n return $this->buildErrorResponse($e);\n }\n }", "title": "" }, { "docid": "97eab9d51e99c2a53b12711e284a2665", "score": "0.64992535", "text": "function display() {\n\t\t$this->getDefaultView()->setListingId(KRequest::getInt('listing_id'))->display();\n\t}", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "b806629cb8d4f33084d6c8e3071e3f35", "score": "0.6496737", "text": "public function listAction()\n {\n $params = $this->params();\n $request = $this->getRequest();\n $bodyOnly = $request->isXmlHttpRequest();\n $page = $params->fromRoute( 'page',\n $request->getPost( 'page',\n $request->getQuery( 'page', 1 )\n )\n );\n\n $view = new ViewModel( array(\n 'paginator' => $this->getPaginator(),\n 'page' => ( (int) $page ) ?: 1,\n 'format' => $bodyOnly,\n ) );\n\n if ( $bodyOnly )\n {\n $view->setTerminal( true );\n }\n\n return $view;\n }", "title": "" }, { "docid": "47edbc785ea53823a4f3981e16262e11", "score": "0.64958936", "text": "public function index()\n {\n // Get all clubs\n $clubs = Club::all();\n\n // Return club as a collection of resources\n return ClubResource::collection($clubs);\n }", "title": "" }, { "docid": "50b30c3618e535c4e58fcbcaa800b3f9", "score": "0.6494503", "text": "public function index()\n {\n // Get items from CACHE if exists else get items from database and add them CACHE\n $items = Cache::remember(request()->fullUrl(), 60, function() {\n return Item::paginate(10);\n });\n\n return ResourcesItem::collection($items);\n }", "title": "" }, { "docid": "fb449ee6d59076f97a7b455cd49a361a", "score": "0.6492989", "text": "public function index()\n {\n $cate = Category::paginate();\n return CategoryResource::collection($cate);\n }", "title": "" }, { "docid": "a3105ba14523f4d28c0c61f1ae3a4126", "score": "0.64928555", "text": "public function index()\n {\n $doctor = Doctor::paginate(15);\n // Return collection of articles as a resource\n return DoctorResource::collection($doctor);\n }", "title": "" }, { "docid": "2f893b7055407e4ba0e047d0d86b3713", "score": "0.64906514", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_room->get_all();\n\t\t$this->template->set('title', 'Room List');\n\t\t$this->template->load('template', 'contents', 'room/room_list', $data);\n\t}", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "bcb5195ddfb190dcd7d1cb464966fa39", "score": "0.6483486", "text": "protected function indexAction()\n {\n /* Select all rows request */\n $this->crudHelper->get($this->mapper);\n }", "title": "" }, { "docid": "bee92afbf5f5543a8639ff7712cc6521", "score": "0.6480457", "text": "public function list()\n\t{\n\t\t$chechPermission = get_controller_and_action();\n\t\tif($chechPermission == FALSE)\n\t\t{\n\t\t\tredirect(base_url('access'));\n\t\t}\n\t\t$data['title'] = 'Po List';\n\t\t$this->load->view('admin/includes/_header', $data);\n\t\t$this->load->view('po/po_list');\n\t\t$this->load->view('admin/includes/_footer');\t\n\t}", "title": "" }, { "docid": "0db1519c1fe132e8fd9ea16de60ae674", "score": "0.64800423", "text": "public function index()\n {\n return Resource::collection(User::paginate(10));\n }", "title": "" }, { "docid": "a8c3b4396d681ea7d1b2f1cd417a6d26", "score": "0.64796", "text": "abstract public function view_list();", "title": "" }, { "docid": "8867deb779456d5ddb47aa51a4b25985", "score": "0.6476355", "text": "public function index() {\n $this->all();\n }", "title": "" }, { "docid": "f71ee6e727b6e6ce48d431df89e195db", "score": "0.6474087", "text": "public function index()\r\n {\r\n $this->retrieve();\r\n }", "title": "" } ]
ae2a54aa7758a4d9916f4ccb0b938e10
This Sends a request
[ { "docid": "46d66f1d77c224d28b968ef59dc0c101", "score": "0.0", "text": "protected function sendRequest(string $method, string $url, array $data = null)\n {\n $this->client->request(\n $method,\n $url,\n [],\n [],\n [\n 'CONTENT_TYPE' => 'application/json',\n ],\n $data ? json_encode($data) : null\n );\n\n return $this->client->getResponse();\n }", "title": "" } ]
[ { "docid": "bd794c1f6f27856bc5613f6771502c7d", "score": "0.8271417", "text": "public function sendRequest();", "title": "" }, { "docid": "12692dc666f61abee4413c1aa7864c5c", "score": "0.7824147", "text": "public function sendGetRequest();", "title": "" }, { "docid": "3c8c4690d34b5122ad74cbb7d28b9ff9", "score": "0.74740785", "text": "public function sendRequest($url, $params = array(), $method = 'POST', $headers = array());", "title": "" }, { "docid": "8483653d3309a936d053d7d81e4ab0dc", "score": "0.73711336", "text": "public function send(\\Phalconry\\Http\\Client\\Request $request) {}", "title": "" }, { "docid": "ab412023eec58254dbd84bc68eb0261b", "score": "0.73671776", "text": "private function _send_request()\n\t{\n\t\t$fields = empty($this->_fields) ? '' : '?'.http_build_query($this->_fields);\n\t\t$url = $this->_url.$this->_token.'/'.$this->_endpoit.$fields;\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_REFERER, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$result = curl_exec($ch);\n\t\tif ($result === FALSE)\n\t\t{\n\t\t\t$txt_error = curl_error($ch);\n\t\t\t$cod_error = curl_errno($ch);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$txt_error = '';\n\t\t}\n\n\t\tcurl_close($ch);\n\t\tif ($txt_error)\n\t\t{\n\t\t\tthrow new Telegram_bot_exception($txt_error, $cod_error);\n\t\t}\n\n\t\treturn (object)json_decode($result,TRUE);\n\t}", "title": "" }, { "docid": "71799567e33e41366bdc904e8962d4c2", "score": "0.72740936", "text": "public function sendRequest()\n {\n $this->rawResponse = $this->curl->exec();\n }", "title": "" }, { "docid": "44f20791b02f31a62ebe7fbb494dbf5b", "score": "0.7201497", "text": "function sendRequest($a_request = '')\n\t{\n\t\tglobal $ilErr,$lng;\n\t\t\n\t\t// get request xml data\n\t\t$this->request = $this->xmlDumpMem();\n\n\t\t// compose request header\n\t\t$header = \"Host: \".$this->server_addr.\"\\r\\n\";\n\t\t$header .= \"User-Agent: moodle open source\\r\\n\";\n\t\t$header .= \"Content-Type: text/xml\\r\\n\";\n\t\t$header .= \"Content-Length: \".strlen($this->request).\"\\r\\n\";\n\t\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\n\t\t// open socket connection to server\n if ($this->scheme == 'ssl') {\n //$sock = @fsockopen($this->scheme.\"://\".$this->getServerAddr(), $this->getServerPort(), $errno, $errstr, $this->getAPITimeOut());\n $sock = @fsockopen($this->scheme.\"://\".$this->server_addr, $this->server_port, $errno, $errstr, $this->api_timeout);\n }\n else\n {\n $sock = @fsockopen($this->server_addr, $this->server_port, $errno, $errstr, $this->api_timeout);\n }\n\n\t\tif (!$sock)\n\t\t{\n error($errstr . \"<br>\" . get_string('unknownhost', 'netucate'));\n\t\t}\n\n\t\t// send request\n\t\tfputs($sock, \"POST \".$this->server_path.\" HTTP/1.0\\r\\n\");\n\t\tfputs($sock,$header.$this->request);\n\t\t\n\t\t$response = \"\";\n\t\t// read response data and surpress error from buggy IIS software (missing 'close_notify' cause fatal error)\n\t\twhile (!feof($sock))\n\t\t{\n\t\t\t$response .= @fgets($sock, 128);\n\t\t}\n\t\t\n\t\tfclose($sock);\n\t\t\n\t\t// return netucate response object\n\t\t$response_obj = new ilnetucateResponse($response);\n\t\t\n\t\treturn $response_obj;\n\t}", "title": "" }, { "docid": "19b44f7c565915c491b94c59e54d3100", "score": "0.713093", "text": "public function sendRequest() \n { \n $result = (new Client())\n ->post($this->url(), $this->parameters());\n\n return $result;\n }", "title": "" }, { "docid": "cc5922623a5dca8748303c69eea58c44", "score": "0.707", "text": "public function sendRequest()\n {\n $options = $this->prepareRequestOptions();\n\n $response = $this->client->request($this->method, $this->url, $options);\n\n return $response;\n }", "title": "" }, { "docid": "54b492b13148ee66d938fe75fee8e019", "score": "0.70393306", "text": "protected function sendRequest() {\n $this->response = $this->client->request( 'POST', self::PAGE, [\n 'debug' => $this->remotePlusDebug,\n 'version' => $this->remotePlusHttpVersion,\n 'headers' => [ 'Content-Type' => $this->remotePlusContentType,\n 'Authorization' => $this->getAuthenticationHeaderValue( $this->user, $this->pass ), ],\n 'body' => $this->requestBody,\n ] );\n }", "title": "" }, { "docid": "6e3b7e43fd7196a4c093a1905b9ba4df", "score": "0.6977548", "text": "public function sendPostRequest();", "title": "" }, { "docid": "52c608003eed4227ee237ec757c82082", "score": "0.6951643", "text": "public function sendRequest()\n {\n $this->rawResponse = $this->playerLyncCurl->exec();\n }", "title": "" }, { "docid": "9cb42cd4a67da27e0e73e2c4f288c75d", "score": "0.6940746", "text": "protected function sendRequest()\n {\n $client = new Client();\n /* @var \\yii\\httpclient\\Response $response */\n $response = $client->createRequest()\n ->setMethod('post')\n ->setUrl(self::VERIFY_API_ENDPOINT)\n ->setData($this->getRequestData())\n ->send();\n\n if ($response->getIsOk()) {\n if ($response->data['success'] == false) {\n $this->errors = $response->data['error-codes'];\n }\n } else {\n $this->errors[] = 'Http client error';\n }\n }", "title": "" }, { "docid": "9a3b29a5072ca2d0b8e33f35f9c7958c", "score": "0.69101155", "text": "function sendRequest(WorkestraHTTPRequest $request) {\n\t\t$response=new WorkestraHTTPResponse();\n\n\t\t$http=curl_init();\n\t\tcurl_setopt($http, CURLOPT_URL, $request->url );\n\t\tcurl_setopt($http, CURLOPT_CUSTOMREQUEST, $request->method );\n\t\tcurl_setopt($http, CURLOPT_HTTPHEADER, $request->headers );\n\t\tcurl_setopt($http, CURLOPT_POSTFIELDS, $request->content);\n\n\t\tcurl_setopt($http, CURLOPT_HEADER, true );\n\t\tcurl_setopt($http, CURLOPT_SSL_VERIFYHOST, 2);\n\t\tcurl_setopt($http, CURLOPT_SSL_VERIFYPEER, 1);\n\t\tcurl_setopt($http, CURLOPT_RETURNTRANSFER, 1);\n\t\t\n\t\tcurl_setopt($http, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );\n\t\tcurl_setopt($http, CURLOPT_USERPWD, $this->basicAuthUsername.':'.$this->basicAuthPassword);\n\n\t\t$response->content=curl_exec($http);\n\n\n\t\tif($response->content!==false) {\n\t\t\t$response->statusCode = curl_getinfo($http, CURLINFO_HTTP_CODE);\n\t\t\t$headerSize = curl_getinfo($http,CURLINFO_HEADER_SIZE);\n\t\t\t$response->headers= $this->parseHeaders( substr($response->content, 0, $headerSize) );\n\t\t\t$response->content= substr($response->content, $headerSize );\n\t\t} else {\n\t\t\t$response->statusCode=0;\n\t\t\t$response->content=\"Connection error\";\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "01dfb22b7968fd499b4e0e716785cbec", "score": "0.6909156", "text": "public function sendRequest()\n {\n $aHasPostFields = ['POST', \"PUT\", \"DELETE\"];\n if (in_array($this->sHTTPMethod, $aHasPostFields) === true) {\n return $this->oGuzzleInstance->request($this->sHTTPMethod, $this->sEndpoint, $this->aSubmitFields);\n }\n return $this->oGuzzleInstance->request($this->sHTTPMethod, $this->sEndpoint);\n }", "title": "" }, { "docid": "ae98e89ea9e9976c2fd40592efc439bc", "score": "0.68937093", "text": "function send()\n {\n $url = $this->URL;\n if ( !empty( $this->GetParameterList ) )\n {\n $url .= '?';\n foreach( $this->GetParameterList as $parameter )\n {\n $url .= $parameter['name'] . '=' . urlencode( $parameter['value'] ) . '&';\n }\n }\n\n $postData = null;\n if ( !empty( $this->PostParameterList ) )\n {\n $postData = '';\n foreach( $this->PostParameterList as $parameter )\n {\n $postData .= $parameter['name'] . '=' . urlencode( $parameter['value'] ) . '&';\n }\n }\n\n if ( !empty( $this->PostData ) )\n {\n $postData = $this->PostData;\n }\n\n return $this->sendHTTPRequest( $url, $postData );\n }", "title": "" }, { "docid": "7d796260c0c93deedaabdc94973b3d56", "score": "0.68808323", "text": "public function sendRequest()\n {\n $this->httpRequest->addHeader('User-Agent',\n $this->twit->getOption('userAgent'));\n $res = $this->httpRequest->sendRequest();\n if (PEAR::isError($res)) {\n throw new Servics_TwitPic_Exception($res->getMessage(), $res->getCode());\n }\n }", "title": "" }, { "docid": "35944d53ae9ad844d9343ac4de61decc", "score": "0.6863737", "text": "function sendRequest(){\n\n\t\tsession_start();\n\n\t\tif(isset($_SESSION['login_user'])){\n\n\t\t\t$user = $_SESSION['login_user'];\n\t\t\t$eNam = $_POST['eN'];\n\t\t\t$cNum = $_POST['cN'];\n\t\t\t$uReas = $_POST['uReason'];\n\t\t\tinsertRequest($eNam, $cNum, $uReas, $user);\n\t\t}else{\n\t\t\techo 3;// session does not exist\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.685621", "text": "public function request();", "title": "" }, { "docid": "6541bdedaf8256c758cbf2de57a275b1", "score": "0.68479383", "text": "private function sendRequest()\n { \n try {\n //Llama al metodo del objeto del cliente AWS, para llamarlo se usa el nombre del metodo y se pasa los parametros necesarios para el funcionamiento\n $this->setResponse(call_user_func([$this->getClientConexion()\n ->getClientAWS(),$this->getMethodName()],$this->getParameter()->getParametersFinally()));\n } catch (\\Exception $e) {\n //Se setean los errores\n $this->setErros($e->getMessage());\n } \n }", "title": "" }, { "docid": "03e9b08675f03e5e7ff59c966a3829f6", "score": "0.6774326", "text": "protected function sendRequest($optionalParams = '')\r\n {\r\n $ch = curl_init($this->baseURL . $this->content['endpoint'] . '?key=' . $this->apiPublicKey . '&signature=' . $this->signature . '&' . $optionalParams);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->content);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, [\"X-Requested-With: XMLHttpRequest\"]);\r\n $this->response = curl_exec($ch);\r\n $this->httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n }", "title": "" }, { "docid": "682f23a529e2028d8aa2b2b7b37ce434", "score": "0.6762227", "text": "private function sendRequest() {\n\t\tcurl_setopt($this->channel, CURLOPT_USERPWD, $this->configuration['api_key'] . \":\");\n\t\tcurl_setopt($this->channel, CURLOPT_TIMEOUT, 30);\n\t\tcurl_setopt($this->channel, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tif (count($this->data) > 0) {\n\t\t\tcurl_setopt($this->channel, CURLOPT_POSTFIELDS, $this->data );\n\t\t}\n\t\t$result = curl_exec($this->channel);\n\t\tcurl_close($this->channel);\n return $result;\n }", "title": "" }, { "docid": "d055ce1e3770c6d5a0218746497e35e8", "score": "0.67249787", "text": "function send_request()\r\n\t{\r\n\t\t// Retrieve the input JSON\r\n\t\t$json_array = json_decode(file_get_contents('php://input'));\r\n\r\n\t\t// Insert the request in the requests table\r\n\t\t$stmt = $this->db->prepare(\"INSERT INTO requests (user_id, sender_id, qwizzle_id) VALUES (?, ?, ?)\");\r\n\r\n\t\t$sender_id = $json_array->{'sender_id'};\r\n\t\t$qwizzle_id = $json_array->{'qwizzle_id'};\r\n\r\n\t\t$user_id = $json_array->{'user_id'};\r\n\t\t$request_ids = array();\r\n\t\tforeach($user_id as $id)\r\n\t\t{\r\n\t\t\t$stmt->bind_param(\"ddd\", $id->id, $sender_id, $qwizzle_id);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$request_ids[] = $this->db->insert_id;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\t// Format the return response with the request_id\r\n\t\t$json = array();\r\n\t\t$json['status'] = \"successful\";\r\n\t\t$json['request_ids'] = $request_ids;\r\n\r\n\t\t$json_response = json_encode($json);\r\n\r\n\t\t$this->sendResponse(200, $json_response);\r\n\t}", "title": "" }, { "docid": "0428c4f8675d2eb9e380680528386587", "score": "0.6717226", "text": "protected function send() {\n\n // start a curl request\n $curl = curl_init();\n\n // curl options\n $params = array(\n CURLOPT_URL => $this->options['url'],\n CURLOPT_ENCODING => $this->options['encoding'],\n CURLOPT_CONNECTTIMEOUT => $this->options['timeout'],\n CURLOPT_TIMEOUT => $this->options['timeout'],\n CURLOPT_AUTOREFERER => true,\n CURLOPT_RETURNTRANSFER => $this->options['body'],\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_HEADER => false,\n CURLOPT_HEADERFUNCTION => array($this, 'header')\n );\n\n // add the progress \n if(is_callable($this->options['progress'])) {\n $params[CURLOPT_NOPROGRESS] = false;\n $params[CURLOPT_PROGRESSFUNCTION] = $this->options['progress'];\n }\n\n // add all headers\n if(!empty($this->options['headers'])) $params[CURLOPT_HTTPHEADER] = $this->options['headers'];\n\n // add the user agent\n if(!empty($this->options['agent'])) $params[CURLOPT_USERAGENT] = $this->options['agent'];\n\n // do some request specific stuff\n switch(strtolower($this->options['method'])) {\n case 'post':\n $params[CURLOPT_POST] = true;\n $params[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'put':\n\n $params[CURLOPT_CUSTOMREQUEST] = 'PUT';\n $params[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n\n // put a file\n if($this->options['file']) {\n $params[CURLOPT_INFILE] = fopen($this->options['file'], 'r');\n $params[CURLOPT_INFILESIZE] = f::size($this->options['file']);\n }\n\n break;\n case 'patch':\n $params[CURLOPT_CUSTOMREQUEST] = 'PATCH';\n $params[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'delete':\n $params[CURLOPT_CUSTOMREQUEST] = 'DELETE';\n $params[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'head':\n $params[CURLOPT_CUSTOMREQUEST] = 'HEAD';\n $params[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n $params[CURLOPT_NOBODY] = true;\n break;\n }\n\n curl_setopt_array($curl, $params);\n\n $content = curl_exec($curl);\n $error = curl_errno($curl);\n $message = curl_error($curl);\n $info = curl_getinfo($curl);\n\n curl_close($curl);\n\n $this->response = new RemoteResponse();\n $this->response->headers = $this->headers;\n $this->response->error = $error;\n $this->response->message = $message;\n $this->response->content = $content;\n $this->response->code = $info['http_code'];\n $this->response->info = $info;\n\n return $this->response;\n\n }", "title": "" }, { "docid": "4137356902bdd7e1fce61b019dbe2191", "score": "0.66882336", "text": "function sendRequest($url,$data='',$method='GET'){\n $this->start = $this->_time();\n $this->error = '';\n $this->status = 0;\n\n // parse URL into bits\n $uri = parse_url($url);\n $server = $uri['host'];\n $path = $uri['path'];\n if(empty($path)) $path = '/';\n if(!empty($uri['query'])) $path .= '?'.$uri['query'];\n $port = $uri['port'];\n if($uri['user']) $this->user = $uri['user'];\n if($uri['pass']) $this->pass = $uri['pass'];\n\n // proxy setup\n if($this->proxy_host){\n $request_url = $url;\n $server = $this->proxy_host;\n $port = $this->proxy_port;\n if (empty($port)) $port = 8080;\n }else{\n $request_url = $path;\n $server = $server;\n if (empty($port)) $port = ($uri['scheme'] == 'https') ? 443 : 80;\n }\n\n // add SSL stream prefix if needed - needs SSL support in PHP\n if($port == 443 || $this->proxy_ssl) $server = 'ssl://'.$server;\n\n // prepare headers\n $headers = $this->headers;\n $headers['Host'] = $uri['host'];\n $headers['User-Agent'] = $this->agent;\n $headers['Referer'] = $this->referer;\n $headers['Connection'] = 'Close';\n if($method == 'POST'){\n if(is_array($data)){\n $headers['Content-Type'] = 'application/x-www-form-urlencoded';\n $data = $this->_postEncode($data);\n }\n $headers['Content-Length'] = strlen($data);\n $rmethod = 'POST';\n }elseif($method == 'GET'){\n $data = ''; //no data allowed on GET requests\n }\n if($this->user) {\n $headers['Authorization'] = 'Basic '.base64_encode($this->user.':'.$this->pass);\n }\n if($this->proxy_user) {\n $headers['Proxy-Authorization'] = 'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass);\n }\n\n // stop time\n $start = time();\n\n // open socket\n $socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout);\n if (!$socket){\n $resp->status = '-100';\n $this->error = \"Could not connect to $server:$port\\n$errstr ($errno)\";\n return false;\n }\n //set non blocking\n stream_set_blocking($socket,0);\n\n // build request\n $request = \"$method $request_url HTTP/\".$this->http.HTTP_NL;\n $request .= $this->_buildHeaders($headers);\n $request .= $this->_getCookies();\n $request .= HTTP_NL;\n $request .= $data;\n\n $this->_debug('request',$request);\n\n // send request\n $towrite = strlen($request);\n $written = 0;\n while($written < $towrite){\n $ret = fwrite($socket, substr($request,$written));\n if($ret === false){\n $this->status = -100;\n $this->error = 'Failed writing to socket';\n return false;\n }\n $written += $ret;\n }\n\n\n // read headers from socket\n $r_headers = '';\n do{\n if(time()-$start > $this->timeout){\n $this->status = -100;\n $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start);\n return false;\n }\n if(feof($socket)){\n $this->error = 'Premature End of File (socket)';\n return false;\n }\n $r_headers .= fgets($socket,1024);\n }while(!preg_match('/\\r?\\n\\r?\\n$/',$r_headers));\n\n $this->_debug('response headers',$r_headers);\n\n // check if expected body size exceeds allowance\n if($this->max_bodysize && preg_match('/\\r?\\nContent-Length:\\s*(\\d+)\\r?\\n/i',$r_headers,$match)){\n if($match[1] > $this->max_bodysize){\n $this->error = 'Reported content length exceeds allowed response size';\n if ($this->max_bodysize_abort)\n return false;\n }\n }\n\n // get Status\n if (!preg_match('/^HTTP\\/(\\d\\.\\d)\\s*(\\d+).*?\\n/', $r_headers, $m)) {\n $this->error = 'Server returned bad answer';\n return false;\n }\n $this->status = $m[2];\n\n // handle headers and cookies\n $this->resp_headers = $this->_parseHeaders($r_headers);\n if(isset($this->resp_headers['set-cookie'])){\n foreach ((array) $this->resp_headers['set-cookie'] as $c){\n list($key, $value, $foo) = explode('=', $cookie);\n $this->cookies[$key] = $value;\n }\n }\n\n $this->_debug('Object headers',$this->resp_headers);\n\n // check server status code to follow redirect\n if($this->status == 301 || $this->status == 302 ){\n if (empty($this->resp_headers['location'])){\n $this->error = 'Redirect but no Location Header found';\n return false;\n }elseif($this->redirect_count == $this->max_redirect){\n $this->error = 'Maximum number of redirects exceeded';\n return false;\n }else{\n $this->redirect_count++;\n $this->referer = $url;\n if (!preg_match('/^http/i', $this->resp_headers['location'])){\n $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].\n $this->resp_headers['location'];\n }\n // perform redirected request, always via GET (required by RFC)\n return $this->sendRequest($this->resp_headers['location'],array(),'GET');\n }\n }\n\n // check if headers are as expected\n if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){\n $this->error = 'The received headers did not match the given regexp';\n return false;\n }\n\n $lastsay = 0;\n\n //read body (with chunked encoding if needed)\n $r_body = '';\n if(preg_match('/transfer\\-(en)?coding:\\s*chunked\\r\\n/i',$r_header)){\n do {\n unset($chunk_size);\n do {\n if(feof($socket)){\n $this->error = 'Premature End of File (socket)';\n return false;\n }\n if(time()-$start > $this->timeout){\n $this->status = -100;\n $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start);\n return false;\n }\n $byte = fread($socket,1);\n $chunk_size .= $byte;\n } while (preg_match('/[a-zA-Z0-9]/',$byte)); // read chunksize including \\r\n\n $byte = fread($socket,1); // readtrailing \\n\n $chunk_size = hexdec($chunk_size);\n $this_chunk = fread($socket,$chunk_size);\n $r_body .= $this_chunk;\n if ($chunk_size) $byte = fread($socket,2); // read trailing \\r\\n\n\n if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){\n $this->error = 'Allowed response size exceeded';\n if ($this->max_bodysize_abort)\n return false;\n else\n break;\n }\n\n $this->_status(strlen($r_body));\n } while ($chunk_size);\n }else{\n // read entire socket\n while (!feof($socket)) {\n if(time()-$start > $this->timeout){\n $this->status = -100;\n $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start);\n return false;\n }\n $r_body .= fread($socket,4096);\n $r_size = strlen($r_body);\n if($this->max_bodysize && $r_size > $this->max_bodysize){\n $this->error = 'Allowed response size exceeded';\n if ($this->max_bodysize_abort)\n return false;\n else\n break;\n }\n if($this->resp_headers['content-length'] && !$this->resp_headers['transfer-encoding'] &&\n $this->resp_headers['content-length'] == $r_size){\n // we read the content-length, finish here\n break;\n }\n $this->_status(strlen($r_body));\n }\n }\n\n // close socket\n $status = socket_get_status($socket);\n fclose($socket);\n\n say(strlen($r_body).' bytes read');\n\n // decode gzip if needed\n if($this->resp_headers['content-encoding'] == 'gzip'){\n $this->resp_body = gzinflate(substr($r_body, 10));\n }else{\n $this->resp_body = $r_body;\n }\n\n $this->_debug('response body',$this->resp_body);\n $this->redirect_count = 0;\n return true;\n }", "title": "" }, { "docid": "fc6d6dec8536804a1617781044ccd18c", "score": "0.6673707", "text": "public function send(ApiClient $apiClient, HttpRequest $request);", "title": "" }, { "docid": "e26cfc0a72886725b6c647cc2435df07", "score": "0.6670019", "text": "public function send()\n {\n // Determine the minimun set of values to POST\n $post_fields = array(\n 'ApiLogin' => $this->login,\n 'ApiKey' => $this->password,\n 'TransactionId' => $this->transaction_id,\n 'CCFirst6' => $this->bin\n );\n\n // Add all the rest of order fields to the POST\n foreach ($this->order as $key => $val) {\n $post_fields[$key] = $val;\n }\n\n // Add line items\n if (!$this->line_items) {\n $this->addLineItem($this->line_item);\n }\n $post_fields['LineItems'] = $this->line_items;\n\n // Do the POST\n $ch = curl_init($this->url);\n curl_setopt($ch, CURLOPT_POST, 1);\n $post_fields = http_build_query($post_fields);\n $this->log(\"Sent: \".$post_fields);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $response = curl_exec($ch);\n curl_close($ch);\n $this->log(\"Response: \".$response);\n\n // Get error\n $this->setError('');\n if ($response == 'ok') {\n return 1;\n } else {\n $this->setError($response);\n return 0;\n }\n }", "title": "" }, { "docid": "ecd205cab6d501505484f6f83b2a618a", "score": "0.6652888", "text": "public static function send() {\n\t\ttry {\n\t\t\tif ( ! function_exists( 'curl_version' ) ) {\n\t\t\t\tthrow new BattleNetAPI_Exception( 'It appears that cURL is not enabled. Please check your server configuration.' );\n\t\t\t}\n\n\t\t\tif ( ! self::haveKey() ) {\n\t\t\t\tthrow new BattleNetAPI_Exception( 'An API key is required to interact with the Battle.net API services. If you do not have a key, please create one at <a href=\"https://dev.battle.net/\" target=\"_blank\">https://dev.battle.net/</a>.' );\n\t\t\t}\n\n\t\t\tself::$totalRequests = count( self::$requests );\n\n\t\t\tif ( self::$totalRequests == 0 ) {\n\t\t\t\tthrow new BattleNetAPI_Exception( 'There were no requests to be sent.' );\n\t\t\t}\n\n\t\t\tself::processRequests();\n\t\t}\n\t\tcatch ( BattleNetAPI_Exception $exception ) {\n\t\t\t$exception->showMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "2021459a0f4a647253cf0ec34499db75", "score": "0.6649607", "text": "public function send()\n {\n $this->mount();\n\n $http = new Client();\n\n $http->request('POST', self::ONE_SIGNAL_URL, [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Basic '.env('PUSHER_APP_KEY'),\n 'Accept' => 'application/json',\n ],\n 'json' => $this->params,\n ]);\n }", "title": "" }, { "docid": "f21866770679a0183ca07898772d6474", "score": "0.6644849", "text": "private function _sendRequest ( $request ) {\n $this->error = '';\n $ch = curl_init ( $this->api_url );\n curl_setopt ( $ch, CURLOPT_POST, count ( $request ) );\n curl_setopt ( $ch, CURLOPT_POSTFIELDS, http_build_query ( $request ) );\n curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );\n if ( ($response = curl_exec ( $ch ) ) ) {\n if ( ($response = json_decode ( $response, true ) ) ) {\n return $response;\n } else {\n // response is not valid json\n $this->error = 'Server did not respond with valid JSON.';\n }\n } else {\n // curl_exec failed\n $this->error = 'cURL exec failed: ' . curl_error ( $ch );\n }\n return false;\n }", "title": "" }, { "docid": "d9f33cf8e23e07e015b55e3fad0678e0", "score": "0.6639771", "text": "public function send() {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $this->_url);\n curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);\n curl_setopt($curl, CURLOPT_HEADER, true);\n curl_setopt($curl, CURLINFO_HEADER_OUT, true);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n if (!empty($this->_authUser)) {\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, urlencode($this->_authUser).\":\".urlencode($this->_authPass));\n }\n\n\n if (strpos( $_SERVER['HTTP_HOST'], '-dev.actionstep.com') !== false) {\n curl_setopt($curl, CURLOPT_COOKIE, \"cb=\". $_COOKIE['cb']);\n }\n\n $curlMethodValue = true;\n switch ($this->_method) {\n case 'GET': $curlMethod = CURLOPT_HTTPGET; break;\n case 'POST': $curlMethod = CURLOPT_POST; break;\n case 'PUT': $curlMethod = CURLOPT_CUSTOMREQUEST; $curlMethodValue = 'PUT'; break;\n case 'DELETE': $curlMethod = CURLOPT_CUSTOMREQUEST; $curlMethodValue = 'DELETE'; break;\n default:\n throw new Exception(\"Unknown HTTP method [{$this->_method}]\");\n }\n curl_setopt($curl, $curlMethod, $curlMethodValue);\n\n $headers = array();\n foreach ($this->_headers as $name => $value) {\n $headers[] = \"{$name}: {$value}\";\n }\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n if (!empty($this->_files)) {\n $data = array();\n foreach ($this->_files as $name => $tmpFilename) {\n $data[$name] = curl_file_create($tmpFilename, \"application/octet-stream\", $name);\n }\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n } else {\n switch ($this->_method) {\n case 'POST':\n case 'PUT':\n curl_setopt($curl, CURLOPT_POSTFIELDS, $this->_body);\n break;\n }\n\n }\n $rawResponse = curl_exec($curl);\n // cURL automatically decodes chunked-messages, this means we have to disallow the Zend_Http_Response to do it again\n if (stripos($rawResponse, \"Transfer-Encoding: chunked\\r\\n\")) {\n $rawResponse = str_ireplace(\"Transfer-Encoding: chunked\\r\\n\", '', $rawResponse);\n }\n\n $this->_lastRequest = curl_getinfo($curl, CURLINFO_HEADER_OUT) . \"\\n\" . $this->_body;\n\n $response = new Actionstep_Api_HttpClient_Response($rawResponse);\n $this->_lastResponse = $response->getDecodedHeadersAndBodyAsString();\n\n if (!empty($this->_requestFilename)) {\n file_put_contents($this->_requestFilename, $this->_lastRequest);\n }\n if (!empty($this->_responseFilename)) {\n file_put_contents($this->_responseFilename, $this->_lastResponse);\n }\n\n $this->reset();\n return $response;\n }", "title": "" }, { "docid": "6683f6168fc5bacefb63a45e0b88fea5", "score": "0.6629168", "text": "protected function _sendRequest()\n\t{\n\t\t$this->_setPostString();\n\t\t$post_url = $this->_getPostUrl();\n\t\t$curl_request = curl_init($post_url);\n\t\tcurl_setopt($curl_request, CURLOPT_POSTFIELDS, $this->_post_string);\n\t\tcurl_setopt($curl_request, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($curl_request, CURLOPT_TIMEOUT, 45);\n\t\tcurl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl_request, CURLOPT_SSL_VERIFYHOST, 2);\n\t\tcurl_setopt($curl_request, CURLOPT_SSLVERSION, 6);\n\t\tif ($this->VERIFY_PEER) {\n\t\t\tcurl_setopt($curl_request, CURLOPT_CAINFO, dirname(dirname(__FILE__)) . '/ssl/cert.pem');\n\t\t} else {\n\t\t\tcurl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, false);\n\t\t}\n\n\t\tif (preg_match('/xml/',$post_url)) {\n\t\t\tcurl_setopt($curl_request, CURLOPT_HTTPHEADER, Array(\"Content-Type: text/xml\"));\n\t\t}\n\n\t\t$response = curl_exec($curl_request);\n\n\t\tif ($this->_log_file) {\n\n\t\t\tif ($curl_error = curl_error($curl_request)) {\n\t\t\t\tfile_put_contents($this->_log_file, \"----CURL ERROR----\\n$curl_error\\n\\n\", FILE_APPEND);\n\t\t\t}\n\n\t\t\tfile_put_contents($this->_log_file, \"----Response----\\n$response\\n\\n\", FILE_APPEND);\n\t\t}\n\t\tcurl_close($curl_request);\n\n\t\treturn $this->_handleResponse($response);\n\t}", "title": "" }, { "docid": "7ea32f09478b099c31937e793ecb6f75", "score": "0.66159946", "text": "public function sendRequest(){\n $status = 0;\n\n //if mid and uid are not set, it will not proceed\n if(!$this->prepareRequestStatus){\n return false;\n }\n\n try {\n $request = $this->getRestClient();\n $response = $request->request();\n\n //set status code\n $status = (int)$response->getStatus();\n\n } catch (Zend_Http_Client_Exception $e) {\n Mage::getSingleton('expertrec_recommendation/log')->log(sprintf($this->url .\" failed because HTTP error: %s\", $e->getMessage()),Zend_Log::ERR);\n return false;\n }\n\n if($status >= 200 && $status < 400){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "409e132043fbb266c3a6ecb6f716191f", "score": "0.6606078", "text": "public function post_send () {\n\t\tif (! isset ($_POST['url'])) {\n\t\t\treturn $this->error ('Missing field: url');\n\t\t}\n\n\t\tif (! isset ($_POST['method'])) {\n\t\t\treturn $this->error ('Missing field: method');\n\t\t}\n\n\t\tRequests::register_autoloader ();\n\n\t\tswitch (strtolower ($_POST['method'])) {\n\t\t\tcase 'get':\n\t\t\t\t$type = Requests::GET;\n\t\t\t\tbreak;\n\t\t\tcase 'head':\n\t\t\t\t$type = Requests::HEAD;\n\t\t\t\tbreak;\n\t\t\tcase 'post':\n\t\t\t\t$type = Requests::POST;\n\t\t\t\tbreak;\n\t\t\tcase 'put':\n\t\t\t\t$type = Requests::PUT;\n\t\t\t\tbreak;\n\t\t\tcase 'patch':\n\t\t\t\t$type = Requests::PATCH;\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$type = Requests::DELETE;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $this->error ('Invalid or unsupported request method');\n\t\t}\n\n\t\t$headers = array ();\n\t\tif (is_array ($_POST['headers'])) {\n\t\t\t$headers = $_POST['headers'];\n\t\t}\n\n\t\t$data = array ();\n\t\tif (is_array ($_POST['params'])) {\n\t\t\t$data = $_POST['params'];\n\t\t}\n\t\t$options = array ();\n\n\t\tif (! empty ($_POST['user'])) {\n\t\t\t$options['auth'] = array ();\n\t\t\t$options['auth']['username'] = $_POST['user'];\n\t\t}\n\n\t\tif (! empty ($_POST['pass'])) {\n\t\t\t$options['auth'] = is_array ($options['auth']) ? $options['auth'] : array ();\n\t\t\t$options['auth']['password'] = $_POST['pass'];\n\t\t}\n\n\t\tif (isset ($_POST['body']) && ! empty ($_POST['body'])) {\n\t\t\t$data = $_POST['body'];\n\t\t} else {\n\t\t\t$data = $_POST['params'];\n\t\t}\n\n\t\ttry {\n\t\t\t$res = Requests::request (\n\t\t\t\t$_POST['url'],\n\t\t\t\t$headers,\n\t\t\t\t$data,\n\t\t\t\t$type,\n\t\t\t\t$options\n\t\t\t);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $this->error ($e->getMessage ());\n\t\t}\n\n\t\tif (! $res->success) {\n\t\t\treturn $this->error ('Request failed');\n\t\t}\n\n\t\t$headers = array ();\n\t\tforeach ($res->headers as $name => $value) {\n\t\t\t$headers[$name] = $value;\n\t\t}\n\n\t\t$out = array (\n\t\t\t'status' => $res->status_code,\n\t\t\t'headers' => $headers,\n\t\t\t'body' => $res->body\n\t\t);\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "895df77b676f72fb4308f8ac20903ee8", "score": "0.6592963", "text": "function send_request()\n {\n $ch = curl_init();\n $timeout = 5; // set to zero for no timeout\n \n // fix to allow HTTPS connections with incorrect certificates\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n \n curl_setopt ($ch, CURLOPT_URL, $this->url);\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt ($ch, CURLOPT_ENCODING , \"gzip, deflate\");\n curl_setopt ($ch, CURLOPT_HEADER , 0);\n \n $file_contents = curl_exec($ch);\n curl_close($ch);\n $lines = array();\n $lines = explode(\"\\n\", $file_contents);\n \n if(!($response = $lines))\n {\n echo \"Unable to retrieve file \".$url;\n }\n $response = implode(\"\", $response);\n \n return $response;\n }", "title": "" }, { "docid": "9c55298d7a6870f71a7a732281d90530", "score": "0.6569896", "text": "public function sendRequest($url)\n {\n $ch = curl_init($url);\n\n // should return the transfer\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // execute the request\n return curl_exec($ch);\n }", "title": "" }, { "docid": "5c8ff8c3efa48532992d8c8a666d71ee", "score": "0.656391", "text": "protected function send_pear_request()\n {\n $result = new RestResult();\n $result->set_request_connexion_mode($this->get_connexion_mode());\n $result->set_request_http_method($this->get_http_method());\n $result->set_request_sent_data($this->get_data_to_send());\n $result->set_request_url($this->get_url());\n \n $request_properties = array();\n $request_properties['method'] = $this->get_http_method();\n $request_properties['user'] = $this->get_basic_login();\n $request_properties['pass'] = $this->get_basic_password();\n \n $request = new HTTP_Request($this->get_url(), $request_properties);\n \n /*\n * addition\n */\n // possibly set a proxy\n if ($proxy = $this->get_proxy())\n $request->setProxy($proxy['server'], $proxy['port']);\n \n // add data\n $data_to_send = $this->get_data_to_send();\n \n if (isset($data_to_send))\n {\n \n if (is_string($data_to_send))\n {\n $request->setBody($data_to_send);\n }\n elseif (is_array($data_to_send) && isset($data_to_send['content']))\n {\n /*\n * If $this->data_to_send is an array and the content to send is in $this->data_to_send['content'], we\n * use it\n */\n // $request->addPostData('content', $this->data_to_send['content'], true);\n $request->setBody($data_to_send['content']);\n }\n elseif (is_array($data_to_send) && isset($data_to_send['file']))\n {\n if (is_array($data_to_send['file']))\n {\n $values = array_values($data_to_send['file']);\n if (count($values) > 0)\n {\n $file_path = $values[0];\n \n if ((string) StringUtilities::getInstance()->createString($file_path)->startsWith('@'))\n {\n $file_path = substr($file_path, 1);\n }\n \n if (file_exists($file_path))\n {\n /*\n * The file is on the HD, and therefore must be read to be set in the body\n */\n $file_content = file_get_contents($file_path);\n }\n }\n }\n else\n {\n /*\n * Tries to use the file value as the content of a file in memory\n */\n $file_content = $data_to_send['file'];\n }\n \n $request->setBody($file_content);\n }\n /*\n * addition\n */\n elseif (is_array($data_to_send))\n {\n foreach ($data_to_send as $key => $value)\n {\n $request->addPostData($key, $value);\n }\n }\n \n /*\n * If the mime type is given as a parameter, we use it to set the content-type request\n */\n if (is_array($data_to_send) && isset($data_to_send['mime']))\n {\n $request->addHeader('Content-type', $data_to_send['mime']);\n }\n \n /*\n * addition\n */\n /* add additional headers */\n \n if (is_array($this->get_header_data()))\n {\n foreach ($this->get_header_data() as $n => $header)\n {\n $request->addHeader($header['name'], $header['value']);\n }\n }\n }\n \n $req_result = $request->sendRequest(true);\n if ($req_result === true)\n {\n $result->set_response_http_code($request->getResponseCode());\n $result->set_response_content($request->getResponseBody());\n /*\n * addition\n */\n $result->set_response_header($request->getResponseHeader());\n $result->set_response_cookies($request->getResponseCookies());\n }\n else\n {\n $result->set_response_http_code($request->getResponseCode());\n $result->set_response_error($request->getResponseReason());\n }\n \n return $result;\n }", "title": "" }, { "docid": "214139cb4df2da4a4fdd06818bf5ff9d", "score": "0.65577835", "text": "public function Request(){\n // Populate data for the GET request\n if($this->type == 'GET') $this->MakeUrl();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n if ( isset($_SERVER['HTTP_USER_AGENT']) ) {\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );\n }else {\n // Handle the useragent like we are Google Chrome, if no user-agent was found\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13.');\n }\n curl_setopt($ch , CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n // Populate the data for POST\n if($this->type == 'POST'){\n curl_setopt($ch, CURLOPT_POST, 1); \n if($this->params) curl_setopt($ch, CURLOPT_POSTFIELDS, $this->params);\n }\n\n $result=curl_exec($ch);\n $info=curl_getinfo($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "e6c30a82141d6a4c93edf86dae8825a7", "score": "0.6543866", "text": "protected function sendRequest($data)\n\t{\n\t\t// Build the endpoint\n\t\t$endpoint = $data['url'].$data['params'].'&'.$data['auth'];\n\n try {\n\t $ch = curl_init();\n\t // Will return the response, if false it print the response\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t // Set the url\n\t curl_setopt($ch, CURLOPT_URL,$endpoint );\n\t // Execute\n\t $response=curl_exec($ch);\n\t // Closing\n\t curl_close($ch);\n\t return json_decode($reponse,true); \t\n } catch (Exception $e) {\n \treturn $e;\n }\n\t}", "title": "" }, { "docid": "77fd8e7d273356c5cce80ddb39aeb94e", "score": "0.6505849", "text": "public function sendRequest($body);", "title": "" }, { "docid": "e8c88ddf522489fb851d6b4aacfad015", "score": "0.6497909", "text": "public function sendRequest(Request $request);", "title": "" }, { "docid": "3ea362f27e7292e8a3bb3fa137918919", "score": "0.6452323", "text": "private function performRequest()\n {\n // Set up a default response in case of a failed communication with the Outpost.\n $response = $this->getDefaultResponse();\n\n try {\n $client = new Client;\n $response = $client->request('POST', self::ENDPOINT, ['json' => $this->getPayload(), 'timeout' => 5]);\n $response = json_decode($response->getBody()->getContents(), true);\n } catch (RequestException $e) {\n Log::notice(\"Couldn't reach the Statamic Outpost.\");\n } catch (Exception $e) {\n Log::error(\"Ran into an issue when contacting the Statamic Outpost.\");\n }\n\n $this->response = $response;\n }", "title": "" }, { "docid": "87aa03bcec35c7b22f13f2012a326b27", "score": "0.640765", "text": "function executeRequest($url, $header, $audio)\n{\n // First, we need to set a few SSL options\n $sslOptions = array();\n $sslOptions['verifypeer'] = \"0\";\n $sslOptions['verifyhost'] = \"0\";\n // Create an HttpRequest object\n $r = new HttpRequest($url, HttpRequest::METH_POST);\n // Set the SSL options, Headers, Content-Type, and body\n $r->setSslOptions($sslOptions);\n $r->setHeaders($header);\n $r->setContentType($header['Content-Type']);\n $r->setBody($audio);\n try {\n // Send the request\n $m = $r->send();\n // Return the response object\n return $m;\n } catch (HttpException $ex) {\n // If an error occurs, just display it to the web page\n echo '<br><br><font color=\"red\" Exception: ' . $ex . '</font><br><br>';\n }\n}", "title": "" }, { "docid": "7e54b977adb91a72ac9c8423198a08ee", "score": "0.63973063", "text": "public function send()\n {\n http_response_code($this->code);\n $this->sendHeaders();\n $this->sendBody();\n }", "title": "" }, { "docid": "02ba62ce2fe791f332e1ef92bf737337", "score": "0.6372472", "text": "protected function _sendClientRequest()\n\t{\n\t\t$client = $this->_getInstanceOfClient();\n\n\t\t$request = $client->get($this->getFilenameUrlWithProtocol());\n\n\t\treturn $request->send();\n\t}", "title": "" }, { "docid": "afcee8b8db263326bb18ba4184dea56e", "score": "0.63663626", "text": "public function send()\n {\n if (!defined('HTTP_METH_' . $this->method)) {\n throw new Horde_Http_Exception('Method ' . $this->method . ' not supported.');\n }\n\n $httpRequest = new HttpRequest($this->uri, constant('HTTP_METH_' . $this->method));\n\n $data = $this->data;\n if (is_array($data)) {\n $httpRequest->setPostFields($data);\n } else {\n $httpRequest->setBody($data);\n }\n\n $httpOptions = array('timeout' => $this->timeout);\n\n // Proxy settings\n if ($this->proxyServer) {\n $httpOptions['proxyhost'] = $this->proxyServer;\n if ($this->proxyPort) {\n $httpOptions['proxyport'] = $this->proxyPort;\n }\n if ($this->proxyUsername && $this->proxyPassword) {\n $httpOptions['proxyauth'] = $this->proxyUsername . ':' . $this->proxyPassword;\n $httpOptions['proxyauthtype'] = $this->_httpAuthScheme($this->proxyAuthenticationScheme);\n }\n if ($this->proxyType == Horde_Http::PROXY_SOCKS4) {\n $httpOptions['proxytype'] = HTTP_PROXY_SOCKS4;\n } else if ($this->proxyType == Horde_Http::PROXY_SOCKS5) {\n $httpOptions['proxytype'] = HTTP_PROXY_SOCKS5;\n } else if ($this->proxyType != Horde_Http::PROXY_HTTP) {\n throw new Horde_Http_Exception(sprintf('Proxy type %s not supported by this request type!', $this->proxyType));\n }\n }\n\n // Authentication settings\n if ($this->username) {\n $httpOptions['httpauth'] = $this->username . ':' . $this->password;\n $httpOptions['httpauthtype'] = $this->_httpAuthScheme($this->authenticationScheme);\n }\n\n // Headers\n $httpOptions['headers'] = $this->headers;\n\n // Redirects\n $httpOptions['redirect'] = (int)$this->redirects;\n\n // Set options\n $httpRequest->setOptions($httpOptions);\n\n try {\n $httpResponse = $httpRequest->send();\n } catch (HttpException $e) {\n throw new Horde_Http_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n return new Horde_Http_Response_Peclhttp($this->uri, $httpResponse);\n }", "title": "" }, { "docid": "7674eedbf8774a78a53f4807c02a3c82", "score": "0.6344139", "text": "public function sendRequest(TelegramRequest $request)\n {\n list($url, $method, $headers, $isAsyncRequest) = $this->prepareRequest($request);\n $this->setUri($url/* . '?text=test&chat_id=99339886' */)->setOptions([\n 'timeout' => $request->getTimeOut(),\n 'connecttimeout' => $request->getConnectTimeOut(),\n 'useragent' => 'TelegramBot'\n ])->setMethod($request->getMethod());\n $this->setParameterPost($request->getParams());\n\n $rawResponse = $this->send();\n $returnResponse = $this->getTelegramResponse($request, $rawResponse);\n if ($returnResponse->isError()) {\n throw $returnResponse->getThrownException();\n }\n return $returnResponse;\n }", "title": "" }, { "docid": "2c8034a59001afb2b22371f40056a23f", "score": "0.6326479", "text": "function sendRequest( $cmd, $params, $debug=false )\r\n\t{\r\n\t\t//echo \"!!!\";\r\n\t\t// Make request body\r\n\t\tswitch($cmd)\r\n\t\t{\r\n\t\t\tcase \"send\":\r\n\t\t\t\t//$request_str = $this->builder_GetDomainInfo( \"oktja.eu\" );\r\n\t\t\t\t$request_str = $this->builder_SendSms( $params['sender'], $params['msg'], $params['phones'], $params );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"getprice\":\r\n\t\t\t\t$request_str = $this->builder_SendSmsPrice( $params['sender'], $params['msg'], $params['phones'], $params );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"getstatus\":\r\n\t\t\t\t//$request_str = $this->builder_GetDomainsForClient( $params );\r\n\t\t\t\t$request_str = $this->builder_GetSmsStatus( $params['MsgIds'], $params );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"balance\":\r\n\t\t\t\t//$request_str = $this->builder_CreateMailAccount( 10, \"test_tolik\", \"tolik\" );\r\n\t\t\t\t//$request_str = $this->builder_CreateMailAccount( $params['domain_id'], $params['account_name'], $params['account_pass'], $params );\r\n\t\t\t\t$request_str = $this->builder_GetBalance( $params );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"creditprice\":\r\n\t\t\t\t$request_str = $this->builder_GetCreditPrice( $params );\r\n\t\t\t\tbreak;\r\n\r\n \t\t\tdefault:\r\n \t\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//echo $request_str.\"<br>\";\r\n\r\n\t\tif( $debug )\r\n\t\t\techo $request_str.\"<br />\";\r\n\r\n\t\t$request_str = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.$request_str;\r\n\t\t$request_str = iconv(\"cp1251\", \"UTF-8\", $request_str);\r\n\r\n\t\t//echo $request_str.\"<br />\";\r\n\t\t//echo strlen($request_str).\"<br />\";\r\n\r\n\t\t// Build correct HTTP header for SSL access\r\n\t\t$request_headers = Array();\r\n\t\tfor( $i=0; $i<count($this->headers); $i++ )\r\n\t\t{\r\n\t\t\t$request_headers[$i] = $this->headers[$i];\r\n\t\t}\r\n\t\t$request_headers[$i] = \"Content-Length: \".strlen($request_str);\r\n\r\n\t\t//var_dump($request_headers);\r\n\r\n\t\t// Initialize the curl engine\r\n\t\t$ch = curl_init();\r\n\r\n\t\t// Set the curl options\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n\t\t// this line makes it work under https\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\r\n\t\t// make the curl to return value result but not to ouput stream\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t// Set the URL to be processed\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->url);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $request_str);\r\n\r\n\t\t//echo \"<br />\".$this->url.\"<br />\";\r\n\t\t//echo \"<br />$request_str<br />\";\r\n\r\n\t\t$result = curl_exec($ch);\r\n\t\tif (curl_errno($ch))\r\n\t\t{\r\n\t\t\techo \"\\n\\n-------------------------\\n\" . \"cURL error number:\" . curl_errno($ch);\r\n\t\t\techo \"\\n\\ncURL error:\" . curl_error($ch);\r\n\t\t}\r\n\t\tcurl_close($ch);\r\n\r\n\t\tif( $debug )\r\n\t\t\techo \"<br />+++++++++++++++<br />\".$result.\"<br />+++++++++++++++++++++++<br />\";\r\n\r\n\t\t$this->tmp_res = $result;\r\n\r\n\t\t// check the status\r\n\t\t$status = strtolower(\"OK\");\r\n\t\t$status_s = strpos( $this->tmp_res, \"<status>\" );\r\n \t\tif( $status_s > 0 )\r\n \t\t{\r\n \t\t\t$status_e = strpos( $this->tmp_res, \"</status>\", $status_s + strlen(\"<status>\") );\r\n\r\n\t\t\t$status = strtolower( substr( $this->tmp_res, $status_s + strlen(\"<status>\"), $status_e - $status_s - strlen(\"<status>\") ) );\r\n \t\t}\r\n\r\n \t\t$this->request_status = $status;\r\n\r\n \t\tif( $status != \"ok\" )\r\n \t\t{\r\n \t\t\t$this->getErrorMessage(null);\r\n \t\t}\r\n\r\n\t\t// Make request body\r\n\t\tswitch($cmd)\r\n\t\t{\r\n\r\n\t\t\tcase \"send\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"getprice\":\r\n\t\t\t\t$sendprice = $this->parser_SendSmsPrice( $result );\r\n\t\t\t\treturn $sendprice;\r\n\r\n\t\t\tcase \"getstatus\":\r\n\t\t\t\t$statuslist = $this->parser_SmsStatus( $result );\r\n\t\t\t\treturn $statuslist;\r\n\r\n\t\t\tcase \"balance\":\r\n\t\t\t\t$balance = $this->parser_Balance( $result );\r\n\t\t\t\treturn $balance;\r\n\r\n\t\t\tcase \"creditprice\":\r\n\t\t\t\t$crpr = $this->parser_CreditPrice( $result );\r\n\t\t\t\treturn $crpr;\r\n\r\n\t\t\tcase \"getmailaccount\":\r\n\t\t\t\t$mailboxinfo = $this->parser_MailboxInfo( $result );\r\n\t\t\t\treturn $mailboxinfo;\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "1fbff08522273c3a3511625a012afad3", "score": "0.62908036", "text": "public function sendSoapRequest();", "title": "" }, { "docid": "92ad13746ff4f06201b2ab76bec2a6f9", "score": "0.6287534", "text": "public function send()\n {\n $xmlResponse = $this->request->send();\n\n $this->response->loadXML($xmlResponse);\n// $this->response->parseObjects();\n }", "title": "" }, { "docid": "6e95e8ee54da11e1f85e5cda733b13e7", "score": "0.62765217", "text": "public function send()\n {\n return $this->makeRequest();\n }", "title": "" }, { "docid": "91ef86ae63b6b23323e5f4dc5f9b3db5", "score": "0.62702817", "text": "protected function sendRequest($url, $variables) {\n $this->pendingUrl = $url;\n $this->pendingVariables = $variables;\n\n switch (guifiAPI::output_format) {\n case 'get':\n $get_variables = $variables;\n $post_variables = array();\n break;\n case 'post':\n $get_variables = array();\n $post_variables = $variables;\n break;\n }\n\n $response = $this->httpRequest($url, $get_variables, $post_variables, $this->generateAuthHeader());\n return $response;\n }", "title": "" }, { "docid": "b3216339ef5e37312c52f84dc11f7ba2", "score": "0.62534094", "text": "public function send(\\Grpc\\Request $request): int\n {\n return $this->client->send($request);\n }", "title": "" }, { "docid": "5a9fc628bedbe22d78a8912ed5c0eb9c", "score": "0.624723", "text": "public static function request()\n {\n }", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.6242258", "text": "public function send();", "title": "" }, { "docid": "39eac5a3b2cc9ab36de134098dafeef4", "score": "0.6234567", "text": "public function doRequest() {\n \n /* Create a TCP/IP socket. */\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n if ($socket === FALSE) {\n die(\"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\");\n }\n \n $result = socket_connect($socket, $this->server, $this->port);\n if ($result === FALSE) {\n die(\"socket_connect() failed.\\nReason: ($result) \" . socket_strerror(socket_last_error($socket)) . \"\\n\");\n }\n \n $toSend = json_encode($this->valuesToRequest) . \"\\n\";\n \n socket_write($socket, $toSend, strlen($toSend));\n \n $return = \"\";\n while ($packet = socket_read($socket, 2048)) {\n $return .= $packet;\n }\n \n socket_close($socket);\n \n $this->returnedMap = json_decode($return, TRUE);\n }", "title": "" }, { "docid": "f63536d7111e0d9fc0c3a3859f30a8b2", "score": "0.6231748", "text": "public function send(){\n $stringResponse = \"HTTP/1.0 {$this->response['status_code']} {$this->response['status_text']}\";\n\n header($stringResponse);\n if(array_key_exists('headers',$this->response)){\n foreach ($this->response['headers'] as $header){\n header($header);\n }\n }\n echo $this->response['data'];\n\n }", "title": "" }, { "docid": "0cf7468870ae416746ba708074895aa9", "score": "0.62228584", "text": "public function receiveGetRequest();", "title": "" }, { "docid": "5cbc54e5ce67d3b455aee796c683145d", "score": "0.621957", "text": "private function send_request ( $post ) {\n\t \n\t\t$to_nexmo = curl_init( NX_SERVER );\n\t\tcurl_setopt( $to_nexmo, CURLOPT_POST, true );\n\t\tcurl_setopt( $to_nexmo, CURLOPT_RETURNTRANSFER, true );\n\t\tcurl_setopt( $to_nexmo, CURLOPT_POSTFIELDS, $post );\n\t\t$from_nexmo = curl_exec( $to_nexmo );\n\t\tcurl_close ( $to_nexmo );\n\t\t\n\t\t$from_nexmo = str_replace('-', '', $from_nexmo);\n\t\t$this->unparsed_response = $from_nexmo;\n\t\t\n\t\tif ( $this->parse_response ) {\n\t\t\t$this->nexmo_parse( $from_nexmo );\n\t\t}\n\t \n\t }", "title": "" }, { "docid": "ca779d336f3e8572dcf38fec17e9d34d", "score": "0.6208579", "text": "private function sendRequest($request, $host, $path) {\r\n\t\tif ($this->apiKey === null) {\r\n\t\t\tthrow new CException(\"No Akismet API Key specified\");\r\n\t\t}\r\n\t\t$http_request = \"POST \" . $path . \" HTTP/1.0\\r\\n\";\r\n\t\t$http_request .= \"Host: \" . $host . \"\\r\\n\";\r\n\t\t$http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=utf-8\\r\\n\";\r\n\t\t$http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\r\n\t\t$http_request .= \"User-Agent: Akismet Yii Component \" . $this->_version . \" | Akismet/1.11\\r\\n\";\r\n\t\t$http_request .= \"\\r\\n\";\r\n\t\t$http_request .= $request;\r\n\t\t\r\n\t\t$socketWriteRead = new AAkismetSocketWriteRead($host, $this->getApiPort(), $http_request);\r\n\t\t$socketWriteRead->send();\r\n\t\t\r\n\t\treturn explode(\"\\r\\n\\r\\n\", $socketWriteRead->getResponse(), 2);\r\n\t}", "title": "" }, { "docid": "d354e927a1572c9a6b6185b3bc6f8f73", "score": "0.620581", "text": "public function send()\n {\n $this->prepareUriBeforeSend();\n\n $this->withOption(CURLOPT_HTTPHEADER, $this->headers);\n\n $response = $this->executeClient();\n\n $this->closeClient();\n\n return $response;\n }", "title": "" }, { "docid": "e04d8e7ca58b4a5ca5b8ca69c7ca5888", "score": "0.61989135", "text": "public function request(string $method, string $url, array $parameters = [], array $headers = [], array $cookies = []): string;", "title": "" }, { "docid": "b8cb371df522643e7cb070cc4d5d4c21", "score": "0.6170867", "text": "public function send()\n\t{\n\t\tif ($this->request)\n\t\t{\n\t\t\t$url = $this->getContent();\n\n\t\t\t// Check for relative internal links.\n\t\t\tif (preg_match('/^index2?\\.php/', $url))\n\t\t\t{\n\t\t\t\t$url = $this->request->base() . $url;\n\t\t\t}\n\n\t\t\t// Strip out any line breaks.\n\t\t\t$url = preg_split(\"/[\\r\\n]/\", $url);\n\t\t\t$url = $url[0];\n\n\t\t\t// If we don't start with a http we need to fix this before we proceed.\n\t\t\t// We could validly start with something else (e.g. ftp), though this would\n\t\t\t// be unlikely and isn't supported by this API.\n\t\t\tif (!preg_match('/^http/i', $url))\n\t\t\t{\n\t\t\t\t$prefix = $this->request->scheme() . $this->request->getUserInfo() . $this->request->host();\n\n\t\t\t\tif ($url[0] == '/')\n\t\t\t\t{\n\t\t\t\t\t// We just need the prefix since we have a path relative to the root.\n\t\t\t\t\t$url = $prefix . $url;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// It's relative to where we are now, so lets add that.\n\t\t\t\t\t$parts = explode('/', $this->request->path());\n\t\t\t\t\tarray_pop($parts);\n\t\t\t\t\t$path = implode('/', $parts) . '/';\n\t\t\t\t\t$url = $prefix . $path . $url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->setContent($url);\n\t\t}\n\n\t\treturn parent::send(); //prepare($request);\n\t}", "title": "" }, { "docid": "34780c224b99468e700f289f24afa17c", "score": "0.6160499", "text": "function fn_2lm_bm_send_request($mode, $url_type, $data, $header_type = BLUEMEDIA_HEADER_TRANSACTION)\r\n{\r\n $fields = is_array($data) ? http_build_query($data) : $data;\r\n $bm_url = fn_2lm_bm_get_action_url($mode, $url_type);\r\n\r\n $curl = curl_init($bm_url);\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, ['BmHeader: ' . $header_type]);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\r\n\r\n $curl_response = curl_exec($curl);\r\n// $code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n// $response = curl_getinfo($curl);\r\n curl_close($curl);\r\n\r\n fn_2lm_bm_is_error_response($curl_response);\r\n\r\n return fn_2lm_bm_parse_xml_response_to_array($curl_response);\r\n}", "title": "" }, { "docid": "33e5534c2722c0a4bbc73d4df08a3263", "score": "0.61508185", "text": "private function send_get(){\n\t $this->set_curl_url(\"https://api.exchangeratesapi.io/latest?base=USD\");\n\t return $this->do_send_get();\n }", "title": "" }, { "docid": "cfc8585aac7d06be79584c00baa52386", "score": "0.6126311", "text": "public function sendRequest(array $options = []) {\n $defaults = [\n 'url' => '',\n 'method' => 'GET',\n 'headers' => [],\n 'body' => [],\n ];\n\n $options = array_merge($defaults, $options);\n\n $url = $options['url'];\n $headers = $options['headers'];\n $method = $options['method'];\n $body = $options['body'];\n\n return $this->sendHttpRequest($url, $headers, $method, $body);\n }", "title": "" }, { "docid": "a5437f23de820abc1b5f4bfd87415027", "score": "0.61217993", "text": "public function makeRequest()\n {\n if (Auth::check() == false)\n return Response::json(array('status' => 'error', 'message' => 'You must be logged in.'));\n\n $response = null;\n\n $data = Input::get();\n\n $curl = curl_init(); \n\n curl_setopt($curl, CURLOPT_URL, $data['url']); // url\n curl_setopt($curl, CURLOPT_POST, 1); \n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n curl_setopt($curl, CURLOPT_POSTFIELDS, $data['request']); \n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n\n curl_setopt($curl, CURLOPT_USERPWD, 'username:password');\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); \n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); \n curl_setopt($curl, CURLOPT_USERAGENT, 'Sample Code');\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, array( \n 'Content-Type: application/json', \n 'Content-Length: ' . strlen($data['request'])) \n ); \n\n $response = curl_exec($curl); \n \n curl_close($curl); \n\n $data = json_decode($response);\n $response = \"<pre>\".json_encode($data, JSON_PRETTY_PRINT).\"</pre>\";\n\n\n return Response::json(array('stauts' => 'ok', 'response' => $response));\n }", "title": "" }, { "docid": "4aa00071af2c61400bfd8af00422d369", "score": "0.61185145", "text": "public function __doRequest($request,$location,$action,$version,$one_way=0) { return $this->callCurl($location,$request);\n }", "title": "" }, { "docid": "ebe109f923e45cb172601ea1daa623e9", "score": "0.6113252", "text": "private function _request()\n {\n $ch = curl_init();\n \n $url = self::END_POINT;\n $url .= http_build_query($this->option);\n \n if (strtoupper($this->method) == 'POST') {\n $url = self::END_POINT;\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->option); \n }\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->_agent); \n $out = curl_exec($ch);\n curl_close($ch);\n \n return $out;\n }", "title": "" }, { "docid": "4f522e16e3b4d90518d31dc1d2e90119", "score": "0.61114186", "text": "public function send()\n {\n // Variables\n $headers = null;\n $data = $this->getData();\n\n // send request to payment gateway\n $httpResponse = $this->httpClient->post($this->endpoint, $headers, $data)->send();\n\n // sends data to the below function\n $create_response = $this->createResponse($httpResponse->json());\n return $create_response;\n }", "title": "" }, { "docid": "082a9e8a8c15c4a2f8d836ceee02e6cd", "score": "0.6111046", "text": "public function execute() {\n $ch = curl_init();\n\n\n // Send a custom request if set (instead of standard GET).\n if (isset($this->requestType)) {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->requestType);\n // If POST fields are given, and this is a POST request, add fields.\n if ($this->requestType == 'POST' && isset($this->postFields)) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->postFields);\n }\n }\n\n // Don't print the response; return it from curl_exec().\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_URL, $this->address);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->httpHeaders);\n // Output the header in the response.\n curl_setopt($ch, CURLOPT_HEADER, TRUE); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n \n $response = curl_exec($ch);\n $error = curl_error($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $time = curl_getinfo($ch, CURLINFO_TOTAL_TIME);\n curl_close($ch);\n\n // Set the header, response, error and http code.\n $this->responseHeader = substr($response, 0, $header_size);\n $this->responseBody = substr($response, $header_size);\n $this->error = $error;\n $this->httpCode = $http_code;\n\n }", "title": "" }, { "docid": "98a9503df8fe24341ceb01954abcfcc4", "score": "0.6102121", "text": "private function sendRequest()\n {\n $response = $this->HTTP->post($this->URL, [\n 'form_params' => $this->PARAMS\n ])->getBody()->getContents();\n\n return json_decode($response, true);\n }", "title": "" }, { "docid": "cd4cc3df5f50183de22d771b962a59b5", "score": "0.60943717", "text": "public function sendRequest( $url )\n {\n //echo 'ana';\n if( !$this->setOption( CURLOPT_URL, $url ) )\n return false;\n\n return curl_exec( $this->Curl );\n }", "title": "" }, { "docid": "39be1aee5815aeba66f698da1faa02ff", "score": "0.60864764", "text": "public function sendRequest(SalesforceRequest $request)\r\n {\r\n // Build uri\r\n $uri = $this->buildUri($request->getUri());\r\n // Combine default headers and build request headers\r\n $headers = Helper::buildHeaders(array_merge($this->defaultHeaders, $request->getHeaders()));\r\n // Assign method\r\n $method = strtoupper($request->getMethod());\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $uri);\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n\r\n $verboseHandler = self::verboseHandler();\r\n if ($verboseHandler !== false) {\r\n curl_setopt($ch, CURLOPT_VERBOSE, true);\r\n curl_setopt($ch, CURLOPT_STDERR, $verboseHandler);\r\n }\r\n\r\n // Set request body\r\n if ( in_array($method, [\"POST\", \"PATCH\", \"PUT\", \"OPTIONS\"]) ) {\r\n $postFields = json_encode($request->getBody());\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);\r\n }\r\n\r\n $res = curl_exec($ch);\r\n $info = curl_getinfo($ch);\r\n curl_close($ch);\r\n\r\n // If verbose handler is initialized, then unset it\r\n if ($verboseHandler !== false) {\r\n fclose($verboseHandler);\r\n }\r\n\r\n $res = Helper::parseResponse($info['header_size'], $res);\r\n return new SalesforceResponse(\r\n $info['http_code'],\r\n $res['body'],\r\n $res['headers']\r\n );\r\n }", "title": "" }, { "docid": "06ebc1597dc35a0d796122900dbf64ed", "score": "0.6081513", "text": "protected function sendRequest($request, array $parameters = []){\n $this->checkSoap();\n\n return (string) $this->soap->send(\n $this->urlService,\n $this->urlMethod,\n $this->urlAction,\n 1,\n $parameters,\n $this->soapnamespacesEnv,\n $request,\n null\n );\n }", "title": "" }, { "docid": "f0ea960f7144b5491b0c03d4e291ec51", "score": "0.6077401", "text": "public function execute() {\n\t\t# Create query string\n\t\t$query = http_build_query($this->params);\n\t\t$url = $this->url;\n\t\tif ($query) {\n\t\t\t$url = \"{$this->url}?{$query}\";\n\t\t}\n\t\t# Open connection\n\t\t$ch = curl_init();\n\t\t# Set the url, number of POST vars, POST data, etc\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t# Extra options\n\t\tif ($this->options) {\n\t\t\tforeach ($this->options as $key => $value) {\n\t\t\t\tcurl_setopt($ch, $key, $value);\n\t\t\t}\n\t\t}\n\t\t# Add headers\n\t\tif ($this->headers) {\n\t\t\t$headers = array();\n\t\t\tforeach ($this->headers as $key => $value) {\n\t\t\t\t$headers[] = \"{$key}: {$value}\";\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\t}\n\t\t# SSL\n\t\tif ( preg_match('/https:\\/\\//', $url) === 1 ) {\n\t\t\tif ($this->cainfo) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CAINFO, $this->cainfo);\n\t\t\t} else {\n\t\t\t\tthrow new Exception('Invalid Certificate Authority (CA) bundle path, you need a valid copy of it to perform HTTPS requests.');\n\t\t\t}\n\t\t}\n\t\t# POST/PUT/DELETE\n\t\tif ($this->method != 'get') {\n\t\t\tif ( is_array($this->fields) && count($this->fields) > 0 && $this->method == 'post' ) {\n\t\t\t\t# Standard POST\n\t\t\t\t$has_files = false;\n\t\t\t\t# Check for files\n\t\t\t\tforeach ($this->fields as $field) {\n\t\t\t\t\tif ( $field instanceof \\CURLFile ) {\n\t\t\t\t\t\t$has_files = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t# Now prepare the request\n\t\t\t\tif ($has_files) {\n\t\t\t\t\t# Request has files, send them directly\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->fields);\n\t\t\t\t} else {\n\t\t\t\t\t# Request hasn't files, process the fields\n\t\t\t\t\t$fields = http_build_query($this->fields);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POST, count($this->fields));\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t# May be POST/PUT/DELETE or anything\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($this->method));\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->body);\n\t\t\t}\n\t\t}\n\t\t# File download\n\t\tif ($this->resource) {\n\t\t\tcurl_setopt($ch, CURLOPT_FILE, $this->resource);\n\t\t}\n\t\t# Prepare response objects\n\t\t$body = '';\n\t\t$headers = [];\n\t\t$status = 0;\n\t\t# Headers callback\n\t\tcurl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$headers) {\n\t\t\t$len = strlen($header);\n\t\t\t$header = explode(':', $header, 2);\n\t\t\tif (count($header) < 2)\n\t\t\t\treturn $len;\n\t\t\t$headers[ strtolower( trim( $header[0] ) ) ] = trim( $header[1] );\n\t\t\treturn $len;\n\t\t});\n\t\t$output = null;\n\t\t# Start debug\n\t\tif ($this->verbose) {\n\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, true);\n\t\t\t$output = fopen('php://temp', 'w+');\n\t\t\tcurl_setopt($ch, CURLOPT_STDERR, $output);\n\t\t}\n\t\t# Execute request\n\t\t$body = curl_exec($ch);\n\t\t$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t# @phpstan-ignore-next-line\n\t\t$this->response = new Response($this->resource ? '' : ($body ?: ''), $headers, $status);\n\t\t# Get info about the request\n\t\t$this->error = curl_error($ch);\n\t\t$this->info = curl_getinfo($ch);\n\t\t# End debug\n\t\tif ( $this->verbose && is_resource($output) ) {\n\t\t\trewind($output);\n\t\t\t$this->debug = stream_get_contents($output) ?: '';\n\t\t\tfclose($output);\n\t\t}\n\t\t# Close connection\n\t\tcurl_close($ch);\n\t\t# Return self\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a49da79e4c14d0257cb8080c97634ed", "score": "0.6077105", "text": "protected function sendRequest($url, $message)\n {\n $this->xmlRequest = $message;\n \n //no caso da Prodam o URL é unico para todas as ações\n $url = $this->url[$this->config->tpAmb];\n //o ambiente de testes da Prodam não FUNCIONA!!\n if ($this->config->tpAmb == 2) {\n $this->soapversion = SOAP_1_1;\n }\n if (!is_object($this->soap)) {\n $this->soap = new SoapCurl($this->certificate);\n }\n //para usar o cURL quando está estabelecido o uso do CData na estrutura\n //do xml, terá de haver uma transformação, porém no caso do SoapNative isso\n //não é necessário, pois o próprio SoapClient faz essas transformações,\n //baseado no WSDL.\n $messageText = $message;\n if ($this->withcdata) {\n $messageText = $this->stringTransform(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" . $message);\n }\n $request = \"<\" . $this->method . \"Request xmlns=\\\"\" . $this->xmlns . \"\\\">\"\n . \"<VersaoSchema>$this->versao</VersaoSchema>\"\n . \"<MensagemXML>$messageText</MensagemXML>\"\n . \"</\" . $this->method . \"Request>\";\n $params = [\n 'VersaoSchema' => $this->versao,\n 'MensagemXML' => $message\n ];\n $action = \"\\\"http://www.prefeitura.sp.gov.br/nfe/ws/\" . lcfirst($this->method) . \"\\\"\";\n return $this->soap->send(\n $url,\n $this->method,\n $action,\n $this->soapversion,\n $params,\n $this->namespaces[$this->soapversion],\n $request\n );\n }", "title": "" }, { "docid": "4913bb9c49df2392b990112b651ebd98", "score": "0.6076308", "text": "private function send(): void\n {\n $this->endRequestProcess();\n }", "title": "" }, { "docid": "f9424515028f68a49a9dec2e769954c4", "score": "0.607464", "text": "function request($oAuthToken,$oAuthSecret,$httpMethod, $baseUrl, $aRequestParams = array())\n {\n //Set the httpMethod and base URL for this request\n $this->_oAuthToken = $oAuthToken;\n $this->_oAuthSecret = $oAuthSecret;\n $this->_httpMethod = $httpMethod;\n $this->_baseUrl = $baseUrl;\n $this->_requestFormat = $this->getRequestFormat();\n $this->_requestParams = $this->encodeRequestParams($aRequestParams);\n \n //Create an array of parameters\n $this->buildParams();\n \n //Create the parameter string we will need to send\n $paramString = $this->buildParamString();\n \n //Build the authorization header so Twitter know its us\n $authHeader = $this->buildAuthHeader();\n \n //If we are using GET we need to append the parameters to the URL\n if($httpMethod == 'GET')\n $this->_baseUrl .= '?' . $paramString;\n \n //Use cURL to POST the data needed to send the SMS\n $curl = curl_init($this->_baseUrl);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: ' . $authHeader));\n curl_setopt($curl, CURLOPT_HEADER, FALSE);\n \n //If we are using POST we need to configure cURL to post the parameters\n if($this->_httpMethod == 'POST')\n {\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $paramString);\n }\n \n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_TIMEVALUE, 30);\n\n $oReturn = curl_exec($curl);\n\n if($oReturn === FALSE)\n {\n curl_close($curl);\n return FALSE;\n }\n else\n {\n return $oReturn;\n }\n }", "title": "" }, { "docid": "08068920247d1ea06f8624df60e2003a", "score": "0.60676795", "text": "public function send(\n string $type = 'GET',\n string $url = '/',\n array $formParams = []\n ) {\n try {\n return $this->client->request($type, $url, [\n 'headers' => $this->headers,\n 'curl' => [\n CURLOPT_SSL_VERIFYHOST => false\n ],\n 'form_params' => $formParams\n ]);\n } catch (GuzzleException $ex) {\n Log::error($ex);\n }\n }", "title": "" }, { "docid": "1b56aa019e7f82d29b901830b16bb491", "score": "0.6054931", "text": "public function sendRequest()\n {\n $payload = curl_exec($this->connection);\n $statusCode = (int)curl_getinfo($this->connection, CURLINFO_HTTP_CODE);\n\n $response = new Response($payload, $statusCode);\n\n return $response;\n }", "title": "" }, { "docid": "a9aaa30a02cef51be5cca619009b9ecd", "score": "0.6051001", "text": "public function sendRequest($method, $url, array $params = [], $accessToken = null, $eTag = null)\n {\n $request = $this->request($method, $url, $params, $accessToken, $eTag);\n return $this->lastResponse = $this->client->sendRequest($request);\n }", "title": "" }, { "docid": "f7d941bce226057c3ca4d18491c374d2", "score": "0.6047536", "text": "public function send(HttpRequestInterface $req);", "title": "" }, { "docid": "3fbc9f60c5b1b5b8895ce09d139aa542", "score": "0.60387784", "text": "public function send($method, $uri = '', array $data = array());", "title": "" }, { "docid": "42184ec557fec90584f81c9e8d022349", "score": "0.6032645", "text": "public static function request($requestUrl, $data) {\n if ($data) {\n $requestData = ApiClient::createQueryString($data);\n if (strpos($requestUrl, '?'))\n $requestUrl .= '&';\n else\n $requestUrl .= '?';\n $requestUrl .= $requestData;\n }\n //open connection\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $requestUrl);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n //execute \n $response = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n// var_dump($response);\n return $response;\n }", "title": "" }, { "docid": "b8c42d8fc294cd11e2ac6ecf06019b43", "score": "0.6009941", "text": "public function sendRequest($method,$params)\n\t{\n\t\t$url = $this->endpoint.'/'.$method;\n\n\t\t$params['customerKey'] = $this->customer_key;\n\n\t\t//open connection\n\t\t$ch = curl_init();\n\n\t\t//set the url, number of POST vars, POST data\n\t\tcurl_setopt($ch,CURLOPT_URL, $url);\n\t\tcurl_setopt($ch,CURLOPT_POST, count($params));\n\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($params));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3);\n\t\tcurl_setopt($ch,CURLOPT_TIMEOUT, 20);\n\n\t\t//execute post\n\t\t$result = curl_exec($ch);\n\n\t\t//close connection\n\t\tcurl_close($ch);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9bfa3eca148d54ac7e8c1fe63b549219", "score": "0.6007197", "text": "private function Request($args, &$headers, &$body) {\r\n $args['RequestURI'] = str_replace(' ', '%20', $args['RequestURI']); //Hack to make filenames with spaces work.\r\n //DebMes(\"Request: \".serialize($args));\r\n $http = & $this->_http;\r\n $http->Open($args);\r\n $http->SendRequest($args);\r\n $http->ReadReplyHeaders($headers);\r\n if ($http->response_status[0] != 2) {\r\n switch ($http->response_status) {\r\n case 404:\r\n $this->errNro = NOT_FOUND;\r\n break;\r\n case 401:\r\n $this->errNro = AUTH_REQUIRED;\r\n break;\r\n default:\r\n $this->errNro = UNKNOWN_ERROR;\r\n break;\r\n }\r\n// trigger_error(\"request to $args[RequestURI] failed: $http->response_status\r\n//Error: $http->error\");\r\n $http->close();\r\n return false;\r\n }\r\n $this->errNro = NO_ERROR;\r\n $body = '';\r\n $tbody = '';\r\n for (;;) {\r\n $error = $http->ReadReplyBody($tbody, 1000);\r\n if ($error != \"\" || strlen($tbody) == 0) {\r\n break;\r\n }\r\n $body.= ( $tbody);\r\n }\r\n //print_r($tbody);\r\n $http->close();\r\n return true;\r\n }", "title": "" }, { "docid": "cb9330c7e4b1b38f220d993db93407e0", "score": "0.60065335", "text": "public function sendRequest()\n {\n try {\n $response = $this->request->send();\n } catch (BadResponseException $e) {\n $response = $e->getResponse();\n }\n\n return $this->app->make('trucker.response')->newInstance($this->app, $response);\n }", "title": "" }, { "docid": "33215a92cacbb265a2b92da14597f4c1", "score": "0.6000552", "text": "protected function sendPayRequest()\n {\n $this->newTransaction();\n\n $fields = array(\n 'api_key' => $this->config->get('vandar.api_key'),\n 'amount' => $this->amount,\n 'callback_url' => $this->buildQuery($this->config->get('vandar.callback-url'), array('transaction_id' => $this->transactionId)),\n 'mobile_number' => $this->config->get('jibit.user-mobile'),\n 'factorNumber' => '',\n 'description' => '',\n 'valid_card_number' => ''\n );\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $this->serverUrl.\"/send\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $response = json_decode(curl_exec($ch), true);\n curl_close($ch);\n\n if (isset($response['status']) && $response['status'] === 1) {\n $this->refId = $response['token'];\n $this->transactionSetRefId();\n return true;\n }\n\n $this->transactionFailed();\n $this->newLog(@$response['status'], @$response['errors'][0]);\n throw new VandarException(@$response['errors'][0], @$response['status']);\n }", "title": "" }, { "docid": "9ecb49eb1ec97321b79cc251129d8125", "score": "0.59887916", "text": "public function Request() {\n\t $url = \"https://merchant.shepa.com/api\";\n\t if($this->api == \"sandbox\") {\n $url = \"https://sandbox.shepa.com/api\";\n }\n $data = [\n 'api' => $this->api,\n 'amount' => $this->amount,\n 'callback' => $this->redirect.\"?factorNumber=\".$this->factorNumber,\n 'email' => $this->email,\n 'description' => $this->Description,\n ];\n if (!empty($this->mobile)) {\n $data['mobile'] = $this->mobile;\n }\n return $this->curl_post($url.\"/v1/token\", $data );\n\n\t}", "title": "" }, { "docid": "43fa33236bc203e257d3f5577ec32207", "score": "0.5984523", "text": "public function sendRequest(RequestInterface $request);", "title": "" }, { "docid": "e088b267866adc8c0357c145259cfb8a", "score": "0.59781027", "text": "public function request()\n {\n $service = func_get_arg(0);\n $method = func_get_arg(1);\n // Extract other parameters\n $numargs = func_num_args();\n $arr = array();\n $k = 2;\n while ($k < $numargs && func_get_arg($k) !== false) {\n $add = func_get_arg($k);\n if (is_object($add)) {\n $add = $add->encodeForOpenSRF();\n }\n $arr[] = $add;\n $k++;\n }\n $msg = new OsrfMessage($method, $service, $arr, $this->server);\n return $msg->send();\n }", "title": "" }, { "docid": "786cb46530b6ef97ab2ee799a33b5ba5", "score": "0.59756637", "text": "protected function sendPayRequest()\n {\n $dateTime = new DateTime();\n\n $this->newTransaction();\n\n $fields = [\n 'amount' => $this->amount,\n 'merchantId' => $this->config->get('gateway.irankish.merchantId'),\n 'invoiceNo' => $this->transactionId(),\n 'paymentId' => $this->getCustomInvoiceNo(),\n 'revertURL' => $this->getCallback(),\n 'description' => $this->getCustomDesc(),\n ];\n\n try {\n $soap = new SoapClient($this->serverUrl, ['soap_version' => SOAP_1_1]);\n $response = $soap->MakeToken($fields);\n\n } catch (\\SoapFault $e) {\n $this->transactionFailed();\n $this->newLog('SoapFault', $e->getMessage());\n throw $e;\n }\n\n if ($response->MakeTokenResult->result != true) {\n $this->transactionFailed();\n $this->newLog($response->MakeTokenResult->message, IrankishException::$errors[$response[0]]);\n throw new IranKishException($response[0]);\n }\n $this->refId = $response->MakeTokenResult->token;\n $this->transactionSetRefId();\n }", "title": "" }, { "docid": "3603a7af19728546c829f91af01c7303", "score": "0.59707797", "text": "public function sendRequest(array $arguments)\n\t{\n\t\t$params = '';\n\t\tforeach ($arguments as $key => $argument) $params .= \"{$key}=\" . urlencode($argument) . \"&\";\n\t\t$url = $this->_url . \"?\" . $params;\n\t\tif (function_exists('serendipity_request_url')) {\n\t\t\t$response = unserialize(serendipity_request_url($url));\n\t\t} else {\n\t\t\trequire_once S9Y_PEAR_PATH . 'HTTP/Request.php';\n\t\t\tserendipity_request_start();\n\t\t\t$request = new HTTP_Request($url);\n\t\t\t$request->setMethod(HTTP_REQUEST_METHOD_GET);\n\t\t\t$request->sendRequest();\n\t\t\t$response = unserialize($request->getResponseBody());\n\t\t}\n\t\tif ($response['stat'] != 'ok')\n\t\t\tthrow new Exception($response['message'], $response['code']);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "8a1bbb0fe4254d079b63ff6b8f614af8", "score": "0.5970159", "text": "public function sendRequest($requestBody, $apiCallName) {\n $headers = $this->buildHeaders($apiCallName);\n\n //initialise a CURL session\n $connection = curl_init();\n //set the server we are using (could be Sandbox or Production server)\n curl_setopt($connection, CURLOPT_URL, $this->apiURL);\n\n //stop CURL from verifying the peer's certificate\n curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);\n //set the headers using the array of headers\n curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);\n //set method as POST\n curl_setopt($connection, CURLOPT_POST, 1);\n //set the XML body of the request\n curl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);\n //set it to return the transfer as a string from curl_exec\n curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($connection, CURLOPT_TIMEOUT, 0);\n //Send the Request\n $response = curl_exec($connection);\n //close the connection\n curl_close($connection);\n //return the response\n return $response;\n }", "title": "" } ]
80afac7514cfacd7ad15b97976f8f1be
Redirect output to command output
[ { "docid": "b4978aae45258783300c55f0ca097bca", "score": "0.0", "text": "public function testFormatInputWhenCreatingNewPHPVersion()\n {\n $this->setOutputCallback(function () {\n });\n\n $this->createMocksForUnixEnv();\n\n $this->dockerLfcProcessMock\n ->shouldReceive('isRunning')\n ->andReturn(false);\n $this->dockerLfcProcessMock\n ->shouldReceive('isSuccessful')\n ->andReturn(true);\n $this->dockerLfcProcessMock\n ->shouldReceive('getOutput')\n ->andReturn('');\n $this->dockerLfcProcessMock\n ->shouldReceive('getErrorOutput')\n ->andReturn('');\n $this->dockerLfcProcessMock\n ->shouldReceive('getExitCode')\n ->andReturn(1);\n\n $dockerManageCommandFake = new DockerManageCommand();\n $commandReflection = new \\ReflectionClass($dockerManageCommandFake);\n\n $methodsList = $commandReflection->getMethods();\n\n for ($i = 0; $i < count($methodsList); $i++) {\n $key = $methodsList[$i]->name;\n $commandMethods[$key] = $methodsList[$i];\n $commandMethods[$key]->setAccessible(true);\n }\n\n $propertiesList = $commandReflection->getProperties();\n\n for ($i = 0; $i < count($propertiesList); $i++) {\n $key = $propertiesList[$i]->name;\n $commandProperties[$key] = $propertiesList[$i];\n $commandProperties[$key]->setAccessible(true);\n }\n\n $arguments = [\n 'command' => 'docker:manage',\n 'interactive' => true,\n 'tty' => true,\n 'detached' => true,\n 'phpversion' => '8.0',\n 'threadsafe' => 'nts',\n 'port' => [\n '7474:80',\n '3306:3306',\n ],\n 'mount' => null,\n 'volume' => [\n '${PWD}/:/srv/www',\n '${PWD}/:/srv/test',\n ],\n 'script' => \"lfphp\",\n 'execute' => 'run',\n ];\n\n $arrayInputFake = new InputMock();\n $arrayInputFake->setArguments($arguments);\n\n $output = $commandMethods['formatInput']->invokeArgs(\n $dockerManageCommandFake,\n [$arrayInputFake]\n );\n\n $this->assertSame(\n 'docker run --restart=always -d -i -t -p 7474:80 -p 3306:3306 '\n . '-v ${PWD}/:/srv/www -v ${PWD}/:/srv/test '\n . 'asclinux/linuxforphp-8.2-ultimate:src '\n . '/bin/bash -c \"lfphp-compile 8.0 nts ; lfphp\"',\n $output\n );\n\n $dockerManageCommandFake = new DockerManageCommand();\n $commandReflection = new \\ReflectionClass($dockerManageCommandFake);\n\n $methodsList = $commandReflection->getMethods();\n\n for ($i = 0; $i < count($methodsList); $i++) {\n $key = $methodsList[$i]->name;\n $commandMethods[$key] = $methodsList[$i];\n $commandMethods[$key]->setAccessible(true);\n }\n\n $propertiesList = $commandReflection->getProperties();\n\n for ($i = 0; $i < count($propertiesList); $i++) {\n $key = $propertiesList[$i]->name;\n $commandProperties[$key] = $propertiesList[$i];\n $commandProperties[$key]->setAccessible(true);\n }\n\n $arguments = [\n 'command' => 'docker:manage',\n 'interactive' => true,\n 'tty' => true,\n 'detached' => true,\n 'phpversion' => '8.0',\n 'threadsafe' => 'nts',\n 'port' => [\n '7474:80',\n '3306:3306',\n ],\n 'mount' => null,\n 'volume' => [\n '${PWD}/:/srv/www',\n '${PWD}/:/srv/test',\n ],\n 'script' => \"echo '<?php phpinfo();' > /srv/www/index.php,,,lfphp\",\n 'execute' => 'run',\n ];\n\n $arrayInputFake = new InputMock();\n $arrayInputFake->setArguments($arguments);\n\n $output = $commandMethods['formatInput']->invokeArgs(\n $dockerManageCommandFake,\n [$arrayInputFake]\n );\n\n $this->assertSame(\n 'docker run --restart=always -d -i -t -p 7474:80 -p 3306:3306 '\n . '-v ${PWD}/:/srv/www -v ${PWD}/:/srv/test '\n . '-v ' . $commandProperties['tempScriptFile']->getValue($dockerManageCommandFake)\n . ':/tmp/script.bash --entrypoint /tmp/script.bash '\n . 'asclinux/linuxforphp-8.2-ultimate:src',\n $output\n );\n }", "title": "" } ]
[ { "docid": "49b15762608087679b0017561167de36", "score": "0.66420203", "text": "public function commandOutput($command)\n {\n }", "title": "" }, { "docid": "3169c0ecec5f9907d9413a21e8674c67", "score": "0.5879085", "text": "public function redirect() {\n $this->decideTestType()\n ->handleIfNotForTesting()\n ->decidePhpunitAndConfigPaths()\n ->setModifiedCommandParts()\n ->setUiTestCoverageHint()\n ->printModifiedCommand()\n ->runNewCommand();\n }", "title": "" }, { "docid": "d905b2d683f1e221df63a0080fbb84f2", "score": "0.5796967", "text": "function _cli_command_output($output) {\r\n echo htmlspecialchars_decode($output);\r\n }", "title": "" }, { "docid": "d905b2d683f1e221df63a0080fbb84f2", "score": "0.5796967", "text": "function _cli_command_output($output) {\r\n echo htmlspecialchars_decode($output);\r\n }", "title": "" }, { "docid": "b88818f56038f11e9067e063e6db7c75", "score": "0.57734877", "text": "public function run($outputToCli = TRUE);", "title": "" }, { "docid": "1a99d6e54d2cacb4a5e6de838ba40c94", "score": "0.5733577", "text": "public function buffer( ) {\n\t\t$this->set_output( $this->get_output( ) );\n\t}", "title": "" }, { "docid": "b314da99b4f6f2cfbfb008f570475f38", "score": "0.56784606", "text": "public function _cmd_cliResult(SGL_Registry $input, SGL_Output $output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n $input->tty .= \"\\n\";\n $this->_flush($input->tty, $stopScript = true);\n }", "title": "" }, { "docid": "04a5960c73cb9d51053661c616c482ce", "score": "0.5667556", "text": "function outputRedirect($url) {\n\t\t$this->output($url, 301);\n\t}", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.5513667", "text": "public function output();", "title": "" }, { "docid": "6fe387e6fdff324159c3cab3f0c54f0b", "score": "0.54763794", "text": "public function outputAndExit()\n\t{\n\t\t$this->output();\n\t\texit;\n\t}", "title": "" }, { "docid": "bbcc8dab9b80ed5ef8b077a770a8ac4d", "score": "0.53943473", "text": "protected abstract function endOutputWith();", "title": "" }, { "docid": "9b4b144bce0559f807718f2564e02e87", "score": "0.53768593", "text": "protected function flushOutput()\n {\n if ($this->fileHandle) {\n fflush($this->fileHandle);\n }\n }", "title": "" }, { "docid": "2979bc6907f6af0ba562cdee8140ca53", "score": "0.53629076", "text": "public function getFullCommand($outputToCli = TRUE);", "title": "" }, { "docid": "b9c063bc1294aeafa30fd5626a1ed7c2", "score": "0.5361092", "text": "protected function sendLogStdout() {\n\t\tob_flush();\n\t}", "title": "" }, { "docid": "2f1b1b848b46286f4c9635c11bf8b189", "score": "0.53508836", "text": "public static function run($cmd, $out = '', $append = FALSE, $error_redirect = TRUE)\n {\n if ($error_redirect === TRUE)\n {\n $cmd .= ' 2>&1';\n }\n\n if ($out != '')\n {\n if ($append === TRUE)\n {\n $cmd .= \" >> $out\";\n }\n else\n {\n $cmd .= \" > $out\";\n }\n }\n\n return exec($cmd);\n }", "title": "" }, { "docid": "8be05d92f8311cde9b115ac3a6974a2b", "score": "0.5345612", "text": "abstract public function output();", "title": "" }, { "docid": "b1ebbbfc5a720e4e83c2b26094d2351d", "score": "0.5338042", "text": "public function _cmd_cliResult(SGL_Registry $input, SGL_Output $output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n $input->tty .= \"\\nDone.\\n\";\n $this->_flush($input->tty, $stopScript = true);\n }", "title": "" }, { "docid": "32f77966064fca135f54e18b4a3e0c16", "score": "0.5326228", "text": "function processOutput($cmd_output, $break=\"\\n\")\n\t{\n\t\t$output = '';\n\t\tif (is_array($cmd_output)) {\n\t\t\tforeach ($cmd_output as $outputline) {\n\t\t\t\t$output = $output . $outputline . $break;\n\t\t\t}\n\t\t} else {\n\t\t\t$output = $cmd_output;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "eaca35cb1e9501b461a91ba0fe7b0c8c", "score": "0.52915096", "text": "function beforeOutput(){ return true;}", "title": "" }, { "docid": "6c0fb680bb347a8454e16a7e4a0c9c0d", "score": "0.52647334", "text": "public function testCommandSucceededButErrorInOutput()\n {\n $command = new Command('echo error');\n $command->execute();\n }", "title": "" }, { "docid": "a2ef53f3b414e67fbc1e75252837ea82", "score": "0.5260044", "text": "public function outputResults()\n {\n if ($this->_sapiModeCLI) {\n print $this->getResultsInText();\n } else {\n print $this->getResultsInHTML();\n }\n }", "title": "" }, { "docid": "c689eeb6304d01a9056b48563d0dc010", "score": "0.5226504", "text": "public function setOutput($output) {\n $this->output = $output;\n }", "title": "" }, { "docid": "53c42221b3dab0cbe93b8b9495b72569", "score": "0.52228636", "text": "public function setOutput($output) {\n\t\t$this->output = $output;\n\t}", "title": "" }, { "docid": "fc5b249a1138cc366cc9df1411ce7848", "score": "0.52134", "text": "public function setOutput(Output $output) {\n\t $this->output = $output;\n\t}", "title": "" }, { "docid": "e815df52ce3ef897da7527a205c1f155", "score": "0.5208974", "text": "function flushOutput($output) {\r\n\t\r\n\t// automatically make a new line after\r\n\t$output .= '<br>';\r\n\r\n\t// If this script is running from shell (eg manually or via CRON), convert html tags to shell safe equivalents\r\n\tif (SHELL) {\r\n\t\t$output = str_ireplace(\"<br>\", \"\\n\", $output);\r\n\t\t$output = str_ireplace(\"<br />\", \"\\n\", $output);\r\n\t\t$output = str_ireplace(\"<br/>\", \"\\n\", $output);\r\n\t\t\r\n\t\t// make nice shell <hr>'s :)\r\n\t\t$output = str_ireplace(\"<hr>\", \"###############################################################\\n\", $output);\r\n\t\t\r\n\t\t// strip out any other html tags eg <strong>\r\n\t\t$output = strip_tags($output);\r\n\t}\r\n\t\r\n\techo $output;\r\n\tob_end_flush();\r\n\tflush();\r\n}", "title": "" }, { "docid": "1dab720fbb8fdbd506eec577adf86daa", "score": "0.5186239", "text": "protected function flush() {\n fflush($this->pipes[1]);\n $content = stream_get_contents($this->pipes[1]);\n $this->debug('flush', $content);\n // Get rid of output.\n $this->output = array();\n }", "title": "" }, { "docid": "44924aaec546b467ed8759ccd04020bf", "score": "0.51726264", "text": "public function TrashUnexpectedOutput()\n\t{\n\t\t$this->bTrashUnexpectedOutput = true;\n\t}", "title": "" }, { "docid": "a6cdfa23a2a0bdce5e0e2cb2dcf86995", "score": "0.5154116", "text": "public function commandOutput(OutputInterface $output)\n {\n $output->writeln('Hello from Foo!');\n\n return 1;\n }", "title": "" }, { "docid": "a4bfd73adc31f5bc99b6463181e704df", "score": "0.5150559", "text": "protected function _redirectIO()\n {\n if ($this->_meetRequerements && defined('STDIN') && is_resource(STDIN)) {\n fclose(STDIN);\n $this->_stdin = fopen('/dev/null', 'r');\n }\n if (defined('STDOUT') && is_resource(STDOUT)) {\n fclose(STDOUT);\n $this->_stdout = fopen($this->logFile, 'a');\n }\n if (defined('STDERR') && is_resource(STDERR)) {\n ini_set('error_log', $this->errorLogFile);\n fclose(STDERR);\n $this->_stderr = fopen($this->errorLogFile, 'a');\n }\n }", "title": "" }, { "docid": "521dfde7960bf07161d60d20e5d3d223", "score": "0.5144906", "text": "function output($output) {\n\t\t\t$this->handlers['output']($this, $output);\n\t\t}", "title": "" }, { "docid": "c30f759c90c21e7b6f301396ec9891e0", "score": "0.5130678", "text": "public function output()\n\t{\n\t}", "title": "" }, { "docid": "5e9ec6e4d553a6bf44bad2c31b15219b", "score": "0.51301515", "text": "public function getCommandOutput()\n {\n if (!$this->_commandOutput) {\n $this->setCommandOutput(new CommandOutput);\n }\n\n return $this->_commandOutput;\n }", "title": "" }, { "docid": "8646e29500c7b873e18e8becd1cd78f8", "score": "0.5120928", "text": "public function cli()\n {\n return $this->forward('all');\n }", "title": "" }, { "docid": "e61b2bcfd415bbba589ab6155c7d65a6", "score": "0.51192474", "text": "public function writeOutput()\n\t{\n\t}", "title": "" }, { "docid": "352e6ac1378ef85a60934d356020ec05", "score": "0.51126844", "text": "public static function suppressOutput($clean = false) {\n\t\tif ($clean) {\n\t\t\tob_clean();\n\t\t}\n\t\tob_flush();\n\t\tob_start(\"dummy_output\");\n\t}", "title": "" }, { "docid": "652d1e83170d576b36b3644c84dba167", "score": "0.5111268", "text": "public function exitAfterOutput() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9c2f6742c0d1e468f9ca6c57f893f398", "score": "0.5090894", "text": "abstract public function get_output();", "title": "" }, { "docid": "d2d9a9cedce30dbcac4288b75314e4c9", "score": "0.5084473", "text": "public function processOutput($output);", "title": "" }, { "docid": "b8b4879cd8dcc1876e7e07e2db0e9573", "score": "0.505497", "text": "function output($type = 'success', $output = null) {\n\t\t if ($type == 'success') {\n\t\t echo \"\\033[32m\".$output.\"\\033[0m\".PHP_EOL;\n\t\t } elseif($type == 'error') {\n\t\t echo \"\\033[31m\".$output.\"\\033[0m\".PHP_EOL;\n\t\t } elseif($type == 'fatal') {\n\t\t echo \"\\033[31m\".$output.\"\\033[0m\".PHP_EOL;\n\t\t exit(EXIT_ERROR);\n\t\t } else {\n\t\t echo $output.PHP_EOL;\n\t\t }\n\t\t }", "title": "" }, { "docid": "06d8c38fca796bfbd714e5da5a60a49a", "score": "0.5053298", "text": "public function realtimeStdout()\n {\n return $this->output;\n }", "title": "" }, { "docid": "e4b494f0dbde06826f73f3cb791fbea6", "score": "0.50411254", "text": "public function pass() {\n if ($this->output && !$this->output->isQuiet()) {\n $this->output->write(\".\");\n }\n $this->passed += 1;\n }", "title": "" }, { "docid": "2c97b4b6d5c226fde0f47c3085f0150a", "score": "0.5032563", "text": "public function clearOutput()\n\t{\n\t\tfor ($level = ob_get_level(); $level > 0; --$level) {\n\t\t\t@ob_end_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "2f7657c2c34dab5918af6ca932502307", "score": "0.5030968", "text": "static function capture($output) {\n ob_start();\n $output();\n return ob_get_clean();\n }", "title": "" }, { "docid": "2c07d1db85835c34cb90d619c1fd39be", "score": "0.50251335", "text": "public function out() {\n return $this->readPipe(self::STDOUT);\n }", "title": "" }, { "docid": "a5412f3733bb6ddb2169fcfee1084e38", "score": "0.5024741", "text": "private function execute()\n {\n exec($this->cmd, $output, $return);\n\n if (!$return) {\n $this->out = implode(\"\\n\", $output);\n } else {\n if ($this->exception) {\n throw new InvalidArgumentException(sprintf('Execution of command [%s] failed', $this->cmd));\n }\n $this->out = false;\n }\n }", "title": "" }, { "docid": "9ed1e1268376180596ee8b443ccb35ce", "score": "0.49918905", "text": "private function _set_output($result)\n\t{\n\t\t$output = json_encode($result);\n\t\tset_output('json', $output);\n\t}", "title": "" }, { "docid": "fde73c9867dfc075bfc0a76544b75c28", "score": "0.49846968", "text": "public function redirectToReturnsItself()\n {\n $this->assertSame($this->executor, $this->executor->redirectTo('2>&1'));\n }", "title": "" }, { "docid": "fee6cdb283575f11b21b12646ccf494b", "score": "0.49823967", "text": "public function getOutput() {}", "title": "" }, { "docid": "2e2544c989561cab5c7a54ec610ec088", "score": "0.49705243", "text": "public function handle(ConsoleOutput $output)\n {\n print_r('sathish');\n }", "title": "" }, { "docid": "bbae39b5d677f22aa21772f4ba500ab6", "score": "0.4967234", "text": "public function clearOutput(): static\n {\n ftruncate($this->stdout, 0);\n fseek($this->stdout, 0);\n $this->incrementalOutputOffset = 0;\n\n return $this;\n }", "title": "" }, { "docid": "5889d01bf976df00d84b9125089d8100", "score": "0.4959302", "text": "public function passthru($command)\n {\n passthru($command);\n }", "title": "" }, { "docid": "b5c7ef42493ce29bcbbbd0b166bd5f45", "score": "0.49585134", "text": "public function output($ret = false)\n {\n if($ret)\n return $this->execute();\n\n echo $this->execute();\n }", "title": "" }, { "docid": "fe25b43aba0de40c9ff95bb3bb391b45", "score": "0.49399862", "text": "public function setOutput($output) {\n $this->output = (string) $output;\n return $this;\n }", "title": "" }, { "docid": "3b4c0b77b8af5de9d0b790be37a4f8a5", "score": "0.49385244", "text": "private function sendOutput()\n {\n $this->registry->output->html .= $this->html->convertFooter();\n $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();\n $this->registry->output->sendOutput();\n exit;\n }", "title": "" }, { "docid": "4552e6fc977a0955e293489c0d6e75a3", "score": "0.49370697", "text": "protected function wrap() {\r\n\t\t$this->output = $this->content;\r\n\t}", "title": "" }, { "docid": "b9712d6267a7badd73572e63e3fc7d11", "score": "0.49324903", "text": "function myexec($cmdline,$caption='',$dont_redirect_errors=false) {\n if ($caption!='') echo \"<b>$caption</b>\\n\";\n echo \"<PRE>\\n\";\n passthru('umask 0022 && '.$cmdline.($dont_redirect_errors ? '':' 2>&1'),$status);\n echo \"</PRE><b>execution finished, status $status</b><br><br><br>\\n\";\n \n}", "title": "" }, { "docid": "db18c80ca663e16a98d2d7029f1cb72d", "score": "0.49312887", "text": "public function setCommandOutput(AbstractOutput $output)\n {\n $this->_commandOutput = $output;\n\n return $this;\n }", "title": "" }, { "docid": "45545fcfe2a9b532ef4732384dea7ada", "score": "0.49308717", "text": "public function afterOutput(Response $response) {\r\n \r\n }", "title": "" }, { "docid": "0388c077775f6e6bcfdc3072aa14ac00", "score": "0.49303672", "text": "public function setupStdOutHandler()\n {\n $this->handlers[] = $this->helper->setupStdOutHandler();\n }", "title": "" }, { "docid": "fbc4094be63f4767fd5a8773d3c37ea8", "score": "0.49279812", "text": "public function iRun($command) {\n $this->output = shell_exec($command);\n }", "title": "" }, { "docid": "0572dbc888483fdfafd97bd2f449c2e9", "score": "0.492602", "text": "public function testSuccessfulOutput(): void\n {\n $command = $this->createInstance([\n '--identifier' => 'test-provider',\n '--name' => 'Test Provider',\n ]);\n /** @var \\Symfony\\Component\\Console\\Output\\BufferedOutput $output */\n $output = $command->getOutput();\n\n $command->handle(new EntityManagerStub(), new ProviderServiceStub());\n $text = $output->fetch();\n\n self::assertStringContainsString('Provider has been created.', $text);\n // ProviderServiceStub yields the 'test-provider' details\n self::assertStringContainsString('test-provider | Test Provider', $text);\n }", "title": "" }, { "docid": "be03c2ab008b64db1aea783c90b485e5", "score": "0.49209744", "text": "public function output($data = null)\n {\n if (!$data) return $this->output;\n\n return $this->writeln($data);\n }", "title": "" }, { "docid": "76fa59c00a90499844cc5d0e9661f72f", "score": "0.49205562", "text": "public function setOutput($output =[]) {\n $this->output = $output;\n }", "title": "" }, { "docid": "7f30ebabbd25d354f452f28548b972da", "score": "0.49074072", "text": "public function getLastOutput();", "title": "" }, { "docid": "da819adfbd67bdf15e50f2b459765f09", "score": "0.49065349", "text": "public function isOutputRedirected() : bool\n {\n return $this->cmdResult->isOutputRedirected();\n }", "title": "" }, { "docid": "a60cf80c5644ff22682e2b014f6ec6be", "score": "0.48930565", "text": "function _start_entry_point()\r\n\t{\r\n\t\t$this->output->set_output('');\r\n\t}", "title": "" }, { "docid": "009fa786cbdd4ab0ec286f974bacaea4", "score": "0.4891652", "text": "public function getProcessOutput();", "title": "" }, { "docid": "8d5910d60d262cde79661c69668e55e8", "score": "0.4888637", "text": "abstract public function send_output($text);", "title": "" }, { "docid": "4b2f951c4fb980c04f8356782adc8992", "score": "0.4887189", "text": "private function writeCompassOutput($output)\n {\n // to check if the line is empty, the bash color codes need to be removed\n // we don't change the buffer itself so we can output the colors too later on if the line is really not empty\n // http://unix.stackexchange.com/questions/55546/removing-color-codes-from-output\n if (strlen(trim(preg_replace('/\\x1B\\[[0-9;]*[JKmsu]/', '', $output))) === 0) {\n return;\n }\n\n // remove the whitespace before the actions executed by compass\n // so far there is remove/unchanged/create. because of the bash color codes before the actions and whitespace,\n // simply using trim() doesn't work. this is solely cosmetic and doesn't serve any higher purpose :D\n foreach (explode(\"\\n\", $output) as $line) {\n if(strlen(trim($line)) === 0) {\n continue;\n }\n $this->output->writeln(sprintf(' %s', preg_replace('/\\s+(remove|unchanged|create)/', '\\1', $line)));\n }\n }", "title": "" }, { "docid": "4aadd1767437a43006928c7a4555ca05", "score": "0.48810315", "text": "public function clearErrorOutput(): static\n {\n ftruncate($this->stderr, 0);\n fseek($this->stderr, 0);\n $this->incrementalErrorOutputOffset = 0;\n\n return $this;\n }", "title": "" }, { "docid": "3ab273f5f47da8890a892c762d63623d", "score": "0.48778656", "text": "protected abstract function beginOutputWith();", "title": "" }, { "docid": "c3a61b4f1ec733baff5930f6d5291f88", "score": "0.48589146", "text": "function run_command($command, $verbose=false) {\r\n\t\r\n\t$output = shell_exec($command);\r\n\t\r\n\t// are we in quiet mode or not?\r\n\tif ($verbose) {\r\n\t\t\r\n\t\techo $output.'<br>';\r\n\t\t\r\n\t\t// flush browser resolver cache so output gets displayed\r\n\t\t// on screen immediately before script is finished\r\n\t\tob_end_flush();\r\n\t\tflush();\r\n\t}\r\n\telse {\r\n\t\t// must be in quiet mode\r\n\t\treturn $output;\r\n\t}\r\n}", "title": "" }, { "docid": "ef7a65eceb52a14480fbb4f04a172007", "score": "0.48550966", "text": "public function output()\n \t{\n \t\treturn $this->root->process();\n \t}", "title": "" }, { "docid": "8185ee463ff19f7845d7de007ad57cac", "score": "0.48494062", "text": "protected abstract function out();", "title": "" }, { "docid": "36906dc6c97017101787898e7d4262b8", "score": "0.48463097", "text": "function cli() {\n\t\tproc_close( proc_open( $this->connect_string() , array( 0 => STDIN, 1 => STDOUT, 2 => STDERR ), $pipes ) );\n\t}", "title": "" }, { "docid": "3017e837a166286392d73faa235e9a48", "score": "0.4845771", "text": "protected function getOutput() {\n\t\treturn Application::kernel()->console()->output();\n\t}", "title": "" }, { "docid": "30f9d7b9a20fbf42a8076163e759cb5c", "score": "0.48341554", "text": "public function saveOutput()\n {\n foreach ($this->concatOutput() as $path => $content) {\n $directory = dirname($path);\n if (!is_dir($directory)) {\n $this->io->write(\"<info>creating directory</info>: {$directory}\");\n mkdir($directory, 0755, true);\n }\n\n $this->io->write(\"<info>save output into</info>: {$path}\");\n file_put_contents($path, $content);\n }\n }", "title": "" }, { "docid": "b6a826ee600b8c7c6154cd404d7d3e9d", "score": "0.48232922", "text": "public function getOutput()\n {\n }", "title": "" }, { "docid": "a3c49485cceb3c86ce45cf0c20b1bf9e", "score": "0.4809139", "text": "protected function _setOutputLevel()\n {\n $this->_io->setLoggers(ConsoleIo::NORMAL);\n if (!empty($this->params['quiet'])) {\n $this->_io->level(ConsoleIo::QUIET);\n $this->_io->setLoggers(ConsoleIo::QUIET);\n }\n if (!empty($this->params['verbose'])) {\n $this->_io->level(ConsoleIo::VERBOSE);\n $this->_io->setLoggers(ConsoleIo::VERBOSE);\n }\n }", "title": "" }, { "docid": "a0993f4534c2a41f805904a7b1c2e7e2", "score": "0.48027992", "text": "function shellCommand($command, $print = true, $die = true)\n{\n $debug_prefix = 'shellCommand';\n if($print){\n print \"$debug_prefix Executing command: $command\\n\";\n }\n ob_start();\n\n system($command, $errcode);\n $result = ob_get_contents();\n ob_end_clean();\n\n if($errcode > 0){\n print \"shell output:\\n\";\n print $result;\n if($die){\n die(\"$debug_prefix Error $errcode. Could not perform the following command:\\n$command\\n\");\n }\n } elseif($print){\n print $result;\n }\n return $result;\n}", "title": "" }, { "docid": "ab0f43c20176a1789108b024d08573fb", "score": "0.47989145", "text": "public function __construct()\n {\n $this->output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n parent::__construct();\n }", "title": "" }, { "docid": "32a554c2de3794a5564d0a3b5339a82b", "score": "0.47962683", "text": "function pop_output(){\n $output = $this->final_output;\n $this->final_output = \"\";\n return $output;\n }", "title": "" }, { "docid": "4a3266876384204d8b1898dd7360da0d", "score": "0.47768897", "text": "public function getOutput();", "title": "" }, { "docid": "4a3266876384204d8b1898dd7360da0d", "score": "0.47768897", "text": "public function getOutput();", "title": "" }, { "docid": "0b4591a64d31f853149e6fe58f3a24e5", "score": "0.47741094", "text": "function printOutput()\n {\n }", "title": "" }, { "docid": "8c3c72f69aaa9322516c2f910766552c", "score": "0.47697496", "text": "protected function getCliOutput($command)\n {\n $descriptorspec = array(\n 0 => array('pipe', 'r'),\n 1 => array('pipe', 'w'),\n 2 => array('pipe', 'a')\n );\n\n $process = proc_open($command, $descriptorspec, $pipes);\n\n if (!is_resource($process)) {\n throw new RuntimeException(\n 'Could not open a resource to the exiftool binary'\n );\n }\n \n $result = stream_get_contents($pipes[1]);\n fclose($pipes[0]);\n fclose($pipes[1]);\n fclose($pipes[2]);\n\n proc_close($process);\n \n return $result;\n }", "title": "" }, { "docid": "fa280f5105d752fdd790e2c2e62f04fb", "score": "0.47614244", "text": "public function remove_output_actions() {\n\n\t\t// We need to remove admin menu output to get the original $menu & $submenu.\n\t\tremove_action( 'admin_menu', array( self::get_instance(), 'menu_output' ), 9999 );\n\n\t}", "title": "" }, { "docid": "4098cf4c42c4d5715a7d9b08b3f0a099", "score": "0.47485095", "text": "public static function run_bg($cmd, $out = '', $append = FALSE, $error_redirect = TRUE)\n {\n if ($out == '')\n {\n $out = '/dev/null';\n }\n\n if (($append === TRUE) && ($out != '/dev/null'))\n {\n $cmd .= \" >> $out\";\n }\n elseif ($error_redirect === TRUE)\n {\n $cmd .= \" 1 > $out\";\n $cmd .= \" 2 > $out\";\n }\n else\n {\n $cmd .= \" > $out\";\n }\n\n // run in background\n $cmd .= ' &';\n\n exec($cmd);\n }", "title": "" }, { "docid": "d19ba67acb6ce9277418df1ec62c80c0", "score": "0.4742596", "text": "function add_output($str){\n $this->final_output.=$str;\n }", "title": "" }, { "docid": "002c59470d1ab943625364492b54e818", "score": "0.47350493", "text": "protected function output_line(string $line): void {\n cli_writeln($line);\n }", "title": "" }, { "docid": "279ac40455d02d5a0e6c7cd84c2557a6", "score": "0.4716264", "text": "public function setOutput($value, $key)\n {\n if (!is_null($value)) {\n $this->value($value);\n } //to be overriden\n }", "title": "" }, { "docid": "a5717d83a00a3a2a4d2dcd7739e84782", "score": "0.47145897", "text": "public function beforeOutput(Response $response) {\r\n \r\n }", "title": "" }, { "docid": "0b1f4bcce02ef998745de37af30b9bbb", "score": "0.47107717", "text": "public static function clearOutput()\n {\n // the following manual level counting is to deal with zlib.output_compression set to On\n for ($level = ob_get_level(); $level > 0; --$level) {\n if (!@ob_end_clean()) {\n ob_clean();\n }\n }\n }", "title": "" }, { "docid": "ee8d30616c93189a591456a80c28371c", "score": "0.47090745", "text": "public function flush()\n {\n if (! empty(self::$Output)) {\n echo json_encode(self::$Output);\n }\n self::$Output = [];\n\n return;\n }", "title": "" }, { "docid": "93a99e09ab0b0856cedf6a1934e64ca6", "score": "0.47056794", "text": "public function passthru($command)\n {\n $process = $this->getProcess($command);\n\n try {\n $process->setTty(true);\n $process->mustRun(function ($type, $buffer) {\n echo $buffer;\n });\n } catch (ProcessFailedException $e) {\n echo $e->getMessage();\n }\n\n return $process->getExitCode();\n }", "title": "" }, { "docid": "de817f0fa123ce7b4763de024417e1d3", "score": "0.4702998", "text": "function terminal($command){\n \n if(function_exists('system')){\n \n ob_start();\n system($command, $return_var);\n $output = ob_get_contents();\n ob_end_clean();\n }\n else if(function_exists('passthru')){\n ob_start();\n system($command, $return_var);\n $output = ob_get_contents();\n ob_end_clean();\n }\n else if(function_exists('exec')){\n exec($command, $output, $return_var);\n $output = implode(\"n\", $output);\n }\n else if(function_exists('shell_exec')){\n $output = shell_exec($command);\n }\n else{\n $output = 'Command not found';\n $return_var = 1;\n }\n \n return array('output' => $output, 'status' => $return_var);\n}", "title": "" }, { "docid": "83c0834b7d54a6707db93a4524e7c8fa", "score": "0.46928728", "text": "protected function get_output(){\r\n\t\t\tif( null === $this->output )\r\n\t\t\t\t$this->set_output();\r\n\t\t\t\t\r\n\t\t\treturn $this->output;\r\n\t\t}", "title": "" }, { "docid": "d81b690076b5f19dedd9513b7e83935a", "score": "0.46884465", "text": "public function out(string $string, int $settings = 0): void\n {\n $this->stdout($string . PHP_EOL, $settings);\n \n if ($this->saveLog) {\n $this->logContent .= $string . PHP_EOL;\n }\n }", "title": "" }, { "docid": "b3f1190e00f610a3cdabc81aa7fb2d77", "score": "0.4684116", "text": "public function getStdOut() : string\n {\n return $this->cmdResult->getStdOut();\n }", "title": "" }, { "docid": "dc555ca63e231984ee991c8c795cc359", "score": "0.46823615", "text": "public function doOutputCompress() {}", "title": "" }, { "docid": "0e057b81f4f1e6a2b0f26d707f4d375e", "score": "0.46792945", "text": "public function clearOutput() {\n\t\t$this->output->write(\"\\x1b[0J\");\n\n\t\treturn $this;\n\t}", "title": "" } ]
aeac606a8b87fc8c21a0511d6e4ea435
Sets the bodyText property value. Administratorsupplied body text of the terms and conditions, typically the terms themselves. This is shown to the user on prompts to accept the T&C policy.
[ { "docid": "4327178fa59d88692d5a91df0756b2ca", "score": "0.66897917", "text": "public function setBodyText(?string $value): void {\n $this->getBackingStore()->set('bodyText', $value);\n }", "title": "" } ]
[ { "docid": "255f8687eb20b2f23efa37d5b452d6d2", "score": "0.7348251", "text": "function set_body ($body_text = '') {\r\n\t\r\n\t\t$this->has_body = true;\r\n\t\t$this->body = $body_text;\r\n\t}", "title": "" }, { "docid": "2b953fa7946c60e13d20ce7897e3e16e", "score": "0.69294393", "text": "function setTxtBody( $text ) {\r\n\t\t\t$this->_msg->setText( strip_tags( $text ) );\r\n\t\t}", "title": "" }, { "docid": "98721f804178c9e9747f5b7248ce52f8", "score": "0.6904088", "text": "public function setText($text) {\n\t\t$this->body = preg_replace(\"/ *(\\r\\n|\\r|\\n)/\", \"\\n\", $text);\n\t}", "title": "" }, { "docid": "5dd36e5899c9598c6920c99146378d7f", "score": "0.68360555", "text": "public function setPlainTextPart(string $bodyText) : void;", "title": "" }, { "docid": "1ee5a3f061f496b4d287d99f5650806d", "score": "0.64413184", "text": "public function setMsgTxt(string $body);", "title": "" }, { "docid": "d353bb2a402e695843555de84b1fe396", "score": "0.6435915", "text": "public function setHtmlTextPart(string $bodyHtml) : void;", "title": "" }, { "docid": "b5bed50488d4918d9215c949385fa087", "score": "0.6146787", "text": "protected function text($text)\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "59bfdb94670ca3d85a61d346ede80b08", "score": "0.6127695", "text": "public function body($text = '')\n {\n \n $this->_text = $text;\n \n if (!$this->_html)\n {\n $this->_html = nl2br($text);\n }\n \n return $this;\n \n }", "title": "" }, { "docid": "d0181fd5b329cf2233de5fb22c6593f9", "score": "0.61224973", "text": "public function setText($text) {\n $this->text = $text;\n }", "title": "" }, { "docid": "8d5aaee36960a34793d81511f2860a25", "score": "0.61135006", "text": "function setPlainBody($value, $createHtmlBody = true) {\n\t\t$this->plainBody = $value;\n\t\tif ($createHtmlBody) {\n\t\t\t$this->body = nl2br($value);\n\t\t}\n\t\t$this->needsConstruction = true;\n\t}", "title": "" }, { "docid": "029e61078c5fa9a2ad2fdd4aa97b7c58", "score": "0.6111325", "text": "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "title": "" }, { "docid": "029e61078c5fa9a2ad2fdd4aa97b7c58", "score": "0.6111325", "text": "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "title": "" }, { "docid": "8799bd9c551e049ab1606e561a33aff1", "score": "0.6085609", "text": "function setBody($value, $createPlainBody = true) {\n\t\tif ($createPlainBody) {\n\t\t\t$this->plainBody = HtmlControl::convertToText($value);\n\t\t}\n\t\t$this->body = $value;\n\t\t$this->needsConstruction = true;\n\t}", "title": "" }, { "docid": "fa904a318cd7565d5ba44337058242f4", "score": "0.60310215", "text": "public function setText($text) {\n\t\t$this->text = $text;\n\t}", "title": "" }, { "docid": "4f6daa95c4639293d688473805760185", "score": "0.5953876", "text": "public function setBody( $body )\n\t{\n\t\t$this->body = $body;\n\t}", "title": "" }, { "docid": "d79f168ebaba30b644237af155e1db63", "score": "0.595369", "text": "public function setBody($body)\n {\n $this->body = $body;\n }", "title": "" }, { "docid": "0dff3564c0bce559dc98db5d0943d521", "score": "0.5951348", "text": "public function setBody($body) {\n $this->body = $body;\n }", "title": "" }, { "docid": "8caf5eb914ec299ad689ad24a1ea2b8d", "score": "0.5945665", "text": "public function setText($text) {\n\t\t$this->text = $text;\n\t\t// Reset the rendered text. It will be filled again when the post\n\t\t// is rendered.\n\t\t$this->renderedText = '';\n\t}", "title": "" }, { "docid": "d0195f49f3be1358428ca800eab0b573", "score": "0.5942619", "text": "public function setBody( $body )\n {\n $this->mailer->Body = $body;\n }", "title": "" }, { "docid": "a71914b715485a71daaa75de184e9b7d", "score": "0.59290373", "text": "public function setBody(string $body)\n {\n $this->clearBody();\n $this->appendBody($body);\n }", "title": "" }, { "docid": "954c8b7a328b96ccfee0b8b3acb63254", "score": "0.5887325", "text": "public function setText($text) {\n $this->setVariable(self::TEXT, $text);\n }", "title": "" }, { "docid": "7e05b2b369018b7a87a01a33eb4b068c", "score": "0.5871256", "text": "public function setText(WMailPartText $text) {\n $this->_text = $text;\n }", "title": "" }, { "docid": "3c17ec02f11bf2ef84d1637ae43d74da", "score": "0.58554745", "text": "public function addBodyText(string $text, $plainText = '') {\n\t\tif ($this->footerAdded) {\n\t\t\treturn;\n\t\t}\n\t\tif ($plainText === '') {\n\t\t\t$plainText = $text;\n\t\t\t$text = htmlspecialchars($text);\n\t\t}\n\n\t\t$this->ensureBodyListClosed();\n\t\t$this->ensureBodyIsOpened();\n\n\t\t$this->htmlBody .= vsprintf($this->bodyText, [$text]);\n\t\tif ($plainText !== false) {\n\t\t\t$this->plainBody .= $plainText . PHP_EOL . PHP_EOL;\n\t\t}\n\t}", "title": "" }, { "docid": "a1ac657b1ecb0943b8636122aacf4981", "score": "0.58167416", "text": "public function body_set($body )\n {\n $this->_body = $body;\n }", "title": "" }, { "docid": "388d0a33659e546bdc5f1e501b3c6f5c", "score": "0.5813243", "text": "public function setBody( $body );", "title": "" }, { "docid": "6c5f432afe3c23e2b233a69d667cf78a", "score": "0.5808691", "text": "public function setContent($body)\r\n\t{\r\n\t\t$this->content = $body;\r\n\t}", "title": "" }, { "docid": "dc2e518fdbb8af7c80f610f543b297ca", "score": "0.5799493", "text": "public function setBodyAttribute($body)\n {\n $this->attributes['body'] = Purifier::clean($body, 'linkify');\n }", "title": "" }, { "docid": "67a0aac9061716fa1243fc1fb9ccc460", "score": "0.579263", "text": "public function setPostText($value)\n {\n $this->post_text=$value;\n }", "title": "" }, { "docid": "36c6bdd60f0f326b4a5962e49c5e3a83", "score": "0.57648456", "text": "public function setBody($value)\n {\n $this->body = strval($value);\n }", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.57050854", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.57050854", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.57050854", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.57050854", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.57050854", "text": "public function setBody($body);", "title": "" }, { "docid": "6ee5d908b21cbef05c6fa5bd2e21c6e6", "score": "0.56786954", "text": "public function addToBody($text) {\n\t $this->main .= $text; \n\t}", "title": "" }, { "docid": "61fff5582bbf86335b6a45fdfe14b2e5", "score": "0.5653814", "text": "public function setText(string $text): void\n {\n $this->_text = $text;\n\n }", "title": "" }, { "docid": "00da9f2a6f153986e05b1b5dc9773c7a", "score": "0.5646004", "text": "public function setBody($value)\n\t{\n\t\t$this->body = (string)$value;\n\t}", "title": "" }, { "docid": "50e076547c1052156ba9e8619afbe397", "score": "0.5627078", "text": "public function setText(string $text): void\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "50e076547c1052156ba9e8619afbe397", "score": "0.5627078", "text": "public function setText(string $text): void\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "913f65b9df73803d5d2f2690af976625", "score": "0.5615151", "text": "public function setCheckboxText($text) {\n\t\t$this->checkboxText = $text;\n\t}", "title": "" }, { "docid": "882bc1e813f0f9865b8e35f511f8e86b", "score": "0.55960053", "text": "function getBodyText() {\r\n\r\n\t\treturn $this->bodyText;\r\n\r\n\t}", "title": "" }, { "docid": "78fd6197231b88d59bcd005afa637038", "score": "0.5588706", "text": "public function setText($text)\n {\n $this->text = htmlspecialchars($text);\n\n return $this;\n }", "title": "" }, { "docid": "dd9738855e36ecb43f684f646a68cea2", "score": "0.5577684", "text": "public function textBody($body = null)\n {\n $this->headers['Content-Type'] = 'text/plain; charset=utf-8; format=flowed';\n return $this->body($body ? wordwrap($body, 75, \"\\r\\n\") : $body);\n }", "title": "" }, { "docid": "0e090ba39f66bb0059b9349f16e7b659", "score": "0.55761945", "text": "static function set_body ($body) {\n\t\tself::$body = $body;\n\t}", "title": "" }, { "docid": "bdf2780f62f48b1a74fe5aa3aa892eaa", "score": "0.5556946", "text": "public function setBody($text)\n {\n if (is_string($text)) {\n $this->lines = explode(\"\\n\", $text);\n } elseif (is_array($text)) {\n $this->lines = $text;\n } else {\n throw new InvalidArgumentTypeException('Invalid body type', $text, array('string', 'array'));\n }\n }", "title": "" }, { "docid": "a2ff1cd1d252a8ae64dab29c58906bbb", "score": "0.5546282", "text": "function Body($body) {\n $this->body = $body;\n }", "title": "" }, { "docid": "a86bf29c6bfac4b7431310a8e7c8e334", "score": "0.5539565", "text": "function setHtmlBody( $html, $text='' ) {\r\n\t\t\t$this->_msg->setHtml( $html, $text );\r\n\t\t}", "title": "" }, { "docid": "160b3729e7f876e7d03024ab18b2b046", "score": "0.5525505", "text": "function body($text, &$digester) {\r\n\r\n\t\t$this->digester =& $digester;\r\n\r\n\t\t// This is a hack to set the body text for the rules\r\n\t\t// as keeping track of the rules by reference does not\r\n\t\t// work in PHP as it appears to in Java\r\n\r\n\t\t// Find the matching rule in the rule(s) stack\r\n\t\tfor($i = 0; $i < count($this->digester->rulesMan->rules); $i++) {\r\n\t\t\tif($this->digester->rulesMan->rules[$i]->identifier == $this->identifier)\r\n\t\t\t\t$this->digester->rulesMan->rules[$i]->bodyText = $text;\r\n\t\t}\r\n\r\n\t\t$this->appendCall();\r\n\t}", "title": "" }, { "docid": "dfd5717ab67a3c35448308eb66f23888", "score": "0.5499699", "text": "public function getBodytext() {\n\t\treturn $this->getFieldValue('bodytext');\r\n\t}", "title": "" }, { "docid": "4df1f3816a41facdd940915e2580dd77", "score": "0.5488089", "text": "public function setText($text)\n {\n $this->payload['text'] = $text;\n return $this;\n }", "title": "" }, { "docid": "d553ba60b0f0fd0f3b6460156ee219de", "score": "0.5475599", "text": "public function setBody(array $body): void\n {\n $this->body = $body;\n }", "title": "" }, { "docid": "a3145b946d3f8ecd4d8405a9ea911b3a", "score": "0.54212505", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "939f8ef4f03f33422ff0f55c3a1437a4", "score": "0.5420449", "text": "public function setText(?string $text)\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "8d9f1529bc9bc0c6903b6543b167c1d6", "score": "0.53938144", "text": "public function setBody(string $body): self {\n $this->options['body'] = $body;\n return $this;\n }", "title": "" }, { "docid": "774e9aef95e88dfadd400fbe38978351", "score": "0.53842556", "text": "public function SetAnswerText($_answerText)\n\t{\n\t\t$this->answerText = $_answerText;\n\t}", "title": "" }, { "docid": "631497a06fdfa0475c83adf9fd13f7af", "score": "0.5349436", "text": "public function setAltText($text)\n {\n $this->_altText = $text;\n }", "title": "" }, { "docid": "1abe006674daf4d5104231194de82b02", "score": "0.534457", "text": "function thaim_append_plain_text_email( PHPMailer $phpmailer ) {\n\t$thaim = thaim();\n\n\tif ( ! empty( $thaim->plain_text_email ) ) {\n\t\t$phpmailer->AltBody = $thaim->plain_text_email;\n\n\t\tunset( $thaim->plain_text_email );\n\t}\n}", "title": "" }, { "docid": "bdcde909fe24a9f2ac18ce84ac3fd80f", "score": "0.5320556", "text": "public function getBodyText()\r\n {\r\n return $this->getString(\"getBodyText\", array());\r\n }", "title": "" }, { "docid": "5b2d1f20da67bc6494f07b94c2ac8297", "score": "0.5318661", "text": "public function setText($text)\n {\n $this->text = $text;\n return $this;\n }", "title": "" }, { "docid": "5b2d1f20da67bc6494f07b94c2ac8297", "score": "0.5318661", "text": "public function setText($text)\n {\n $this->text = $text;\n return $this;\n }", "title": "" }, { "docid": "5b2d1f20da67bc6494f07b94c2ac8297", "score": "0.5318661", "text": "public function setText($text)\n {\n $this->text = $text;\n return $this;\n }", "title": "" }, { "docid": "5b2d1f20da67bc6494f07b94c2ac8297", "score": "0.5318661", "text": "public function setText($text)\n {\n $this->text = $text;\n return $this;\n }", "title": "" }, { "docid": "d416238ae9da081982321073de1281dd", "score": "0.5316289", "text": "public function text($text) {\n\t\t$this->text = $text;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8ef1101b0e0dfb0dd1594b11acb540f1", "score": "0.52974784", "text": "public function setOptionsText($optionsText)\n {\n $this->_optionsText = $optionsText;\n }", "title": "" }, { "docid": "c15d49f15643db892298a035bc6e2f5b", "score": "0.5295541", "text": "function setText($languageCode, $variable, $term, $text)\n\t{\n\t\tglobal $addslashes;\n\t\t\n\t\t$languageCode = $addslashes($languageCode);\n\t\t$variable = $addslashes($variable);\n\t\t$term = $addslashes($term);\n\t\t$text = $addslashes($text);\n\t\t\n\t\t$sql = \"UPDATE \".TABLE_PREFIX.\"language_text \n\t\t SET text='\".$text.\"',\n\t\t revised_date = now()\n\t\t WHERE language_code = '\".$languageCode.\"' \n\t\t AND variable='\".$variable.\"' \n\t\t AND term = '\".$term.\"'\";\n\n\t\treturn $this->execute($sql);\n }", "title": "" }, { "docid": "a8ffa7dd1d57168c61829a141b7037bd", "score": "0.52833146", "text": "public function text($text)\n\t{\n\t\t$this->text = $text;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "12ab13e5c7f5337a143dd908dc13f5e8", "score": "0.5278626", "text": "public function setText($text) {\n $this->setParam('text', $text);\n return $this;\n }", "title": "" }, { "docid": "bfc303d7e67b9a39f9201ca92d39d6fb", "score": "0.5271125", "text": "public function setBody($content);", "title": "" }, { "docid": "cb1f4c4a7098dc595cddf434f1653135", "score": "0.52556616", "text": "public function setText($str) {\n $this->_text = $str;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "e255762de9c7399d5a67cc9c5529a530", "score": "0.52520984", "text": "public function setText($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "bcaee45fc14517ecf0b5754dc6102c43", "score": "0.5239244", "text": "public function setText($text)\n {\n $this->_text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "376cc0d0c298f69c6e1fe7b1f4557ab5", "score": "0.5232959", "text": "public function AddBody ($body)\n\t\t{\n\t\t\t// Ci-dessous, les variables communes au site qui peuvent être omises en amont !\n\t\t\t$body = str_replace (\"{WEBSITEACCESS}\", Configuration::getValue (\"http_home\"), $body);\n\t\t\t$this->body = $body;\n\t\t}", "title": "" }, { "docid": "3dba286f4265ffbf6267202da3bee2f0", "score": "0.52259415", "text": "function setText ($text)\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "092f8643eacabc1ae6749b097dff4a8a", "score": "0.522253", "text": "public function setBody(string $body) {\n $this->generator->setBody($body);\n\n return $this;\n }", "title": "" }, { "docid": "ac6968daac29fbbd673c53cbf4423de3", "score": "0.52200174", "text": "public function setMsgHtml(string $body);", "title": "" }, { "docid": "526655419ca460dd486a3a5eb2c9d0e7", "score": "0.5218936", "text": "public function text($text)\n {\n $this->_text = $text;\n return $this;\n }", "title": "" }, { "docid": "6498bb5a77da95b90b213a2bab187cd9", "score": "0.52162063", "text": "public function text($text)\n {\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "db85643e910883e55e118a13579a4023", "score": "0.5209722", "text": "function admin_footer_text()\n {\n $settings = $this->parent->settings;\n $company = array(\n 'name' => $settings['branding']['company_name'],\n 'phone' => $settings['branding']['company_phone'],\n 'email' => $settings['branding']['company_email'],\n 'url' => $settings['branding']['company_url']\n );\n\n set_query_var('company', $company);\n load_template($this->parent->template_path . \"/admin_footer_text.php\");\n }", "title": "" }, { "docid": "0a8c261c0966900678a9f6af9cda6a61", "score": "0.5198915", "text": "public function set_text( $value )\n\t{\n\t\t$this->_data['text'] = ( \\is_array( $value ) ? json_encode( $value ) : $value );\n\t}", "title": "" }, { "docid": "f59196931469428678b931573e8986e5", "score": "0.51792336", "text": "private function set_body( $body ){\n\t\t// If $body is a json string, force encode\n\t\tif( $this->is_json_string( $body ) ){\n\t\t\t$this->options['encode_body'] = true;\n\t\t}\n\n\t\t$body = $this->get_array_body( $body );\n\t\t$this->body = $this->get_array_body( $this->body );\n\t\t$this->body = array_replace_recursive( $this->body, $body );\n\n\t\t//Encode body\n\t\tif( $this->options['encode_body'] && ! in_array( $this->method, $this->methods_no_encode_body() ) ) {\n\t\t\t$this->body = json_encode( $this->body );\n\t\t}\n\t\t$this->options['body'] = $this->body;\n\t}", "title": "" }, { "docid": "7df52d0777375333313944bc6400578a", "score": "0.51751995", "text": "public function text($value) {\n return $this->setProperty('text', $value);\n }", "title": "" }, { "docid": "d0e0276fde8eea52a50a42cc5aa7d1fd", "score": "0.5170972", "text": "public function setText($var)\n {\n GPBUtil::checkString($var, True);\n $this->text = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d0e0276fde8eea52a50a42cc5aa7d1fd", "score": "0.5170972", "text": "public function setText($var)\n {\n GPBUtil::checkString($var, True);\n $this->text = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d0e0276fde8eea52a50a42cc5aa7d1fd", "score": "0.5170972", "text": "public function setText($var)\n {\n GPBUtil::checkString($var, True);\n $this->text = $var;\n\n return $this;\n }", "title": "" }, { "docid": "bac13a6a3a826158c005336adb9e147e", "score": "0.5165297", "text": "public function body($body = null, $type = 'text') {\n\t\tif($body === null) return $this->body;\n\t\tif(!in_array($type, array('text', 'html'))) $type = 'text';\n\t\t$this->body[$type] = (string) $body;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a244fe2606fb860096214e63177f83ae", "score": "0.51560897", "text": "public function setText(string $text)\n {\n $this->text = $text;\n \n return $this;\n }", "title": "" }, { "docid": "bbda00b2004666e28146e75bab2d49b8", "score": "0.51469874", "text": "public function setText($text)\n {\n assert('is_string($text)');\n $this->text = $text;\n\n return $this;\n }", "title": "" }, { "docid": "ff1ec6bd342c983f273bb7de5a50b6a2", "score": "0.5143744", "text": "public function setAltBody(string $alt_body): void\n {\n $this->mailer->AltBody = $alt_body;\n }", "title": "" }, { "docid": "9e5f7f92d14dd52b5acc1da53268ec44", "score": "0.5137504", "text": "public function setText($value)\n {\n $this->_fields['Text']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "d42b057cd09152abb0527504448abd47", "score": "0.5128531", "text": "final function setAnswer_text($value) {\n\t\treturn $this->setAnswerText($value);\n\t}", "title": "" }, { "docid": "cba5629dfc2aab3530813f1f0b3b41af", "score": "0.5121227", "text": "public function setTerms($terms);", "title": "" }, { "docid": "c38812e4fc11ea54aab33a166fe98e09", "score": "0.51198643", "text": "public function text($value)\n {\n return $this->setProperty('text', $value);\n }", "title": "" }, { "docid": "40c821e829c30e6e9571cf29090730c6", "score": "0.51160234", "text": "public function body( string $body )\n {\n\t\t$this->body = $body;\n\t\treturn $this;\n }", "title": "" }, { "docid": "e6b2bbd0b3c3c41f6e129d6f2dd70a62", "score": "0.51015306", "text": "public function body($body) {\n $this->body = $body;\n return $this;\n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "ecef9a704db65932809cc68cc3aecab2", "score": "0.0", "text": "public function __construct()\n {\n\n }", "title": "" } ]
[ { "docid": "173dfa3d2c43c121d2999bbac59bd02a", "score": "0.80462193", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:controller', array_filter([\n 'module' => $this->getModule()['key'],\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $this->argument('name') : null,\n '--api' => $this->option('api'),\n '--querybuilder' => $this->option('querybuilder')\n ]));\n }", "title": "" }, { "docid": "271ca9b8e926903001f4cddda1e8934b", "score": "0.7937227", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('mappweb:make-controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "title": "" }, { "docid": "8de597aaa0579156990513f6c3f4f014", "score": "0.78758895", "text": "protected function createController()\r\n {\r\n $this->geamGenerate('controller');\r\n }", "title": "" }, { "docid": "f8b7b5a53a5586d72cc281608b889e4b", "score": "0.7837234", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('module:controller', [\n 'name' => $controller,\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "fcf4ffc7382d9986feb1910b5bc82392", "score": "0.78074765", "text": "protected function createController()\n {\n $controller = studly_case(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('gen:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--overwrite' => $this->option('overwrite')\n ]);\n }", "title": "" }, { "docid": "f51695fb6049452a2fef7c0ab718ba95", "score": "0.7781493", "text": "protected function createController(): void\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n '--container' => $this->option('container')\n ]));\n }", "title": "" }, { "docid": "15d5429e9249d1a3ab48a87d16d5b6a2", "score": "0.76958287", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "4e344abafb3daad1c379c51f89ef784d", "score": "0.7432941", "text": "protected function makeController()\n {\n $this->handleMeta();\n\n if ($this->filesystem->exists($path = $this->getPath($this->meta['class']))) {\n $confirm = $this->ask('you want to replace your controller ? [y] /', 'N');\n if($confirm == 'y')\n {\n $this->filesystem->delete($path);\n } else {\n return $this->error($this->meta['name'] . ' ' . $this->type . ' is aborded!');\n }\n }\n\n $this->makeDirectory($path);\n\n $this->filesystem->put($path, $this->compileControllerStub());\n\n $this->phpCsFixer->fix($path);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "108dd1a993b29c33d7de679603ad3238", "score": "0.72959983", "text": "protected function createController(): self\n {\n $path = app_path(\"Http/Controllers/{$this->moduleClass}/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/controller');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model controller created');\n\n return $this;\n }", "title": "" }, { "docid": "21f25ba6b5e1b2f9e06f3264d3c16587", "score": "0.7200859", "text": "public function createController(){ if (class_exists($this->controller)){\n $parents = class_parents($this->controller);\n //does the class extend the controller class?\n if (in_array(\"BaseController\", $parents)){\n //does the class contain the requested method?\n if (method_exists($this->controller, $this->action)){\n return new $this->controller($this->action,$this->url_values);\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid action');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid controller');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Controller not existing!');\n }\n }", "title": "" }, { "docid": "78fb141452c021e73d6621a668ecd153", "score": "0.7194267", "text": "protected function makeController() {\n\t\t$cg = new ControllerGenerator($this->files, $this->command);\n\t\t$cg->generate($this->name, $this->schema);\n\t}", "title": "" }, { "docid": "7e5eb92dd3c86131232d7d3ec2291dcf", "score": "0.7039595", "text": "protected function createController()\n {\n $controller = new GuideControllerMock('guide', Yii::$app);\n $controller->interactive = false;\n\n return $controller;\n }", "title": "" }, { "docid": "042b88947ba6fbb7faac82b75f84f463", "score": "0.70082414", "text": "public function getInstance() {\n\n\t\t$class = 'controllers\\\\'.$this->defaultController;\n\n\t\t$this->controllerInstance = Factory::createInstance($class, $this->model);\n\t}", "title": "" }, { "docid": "9b2339223d9d4e08b5a5fdc48a931f54", "score": "0.69759357", "text": "public function createController(){\n\n\t\t\t/**\n\t\t\t * Check if controller class exists\n\t\t\t */\n\n\t\tif(class_exists($this->controller)){\n\t\t\t\n\t\t\t/**\n\t\t\t * Assign an array with the name of the parent classes of the given class.\n\t\t\t */\n\t\t\t\n\t\t\t $parents = class_parents($this->controller);\n\t\t\t \n\t\t\t/**\n\t\t\t * Check if class in question extends controller class\n\t\t\t */\n\n\t\t\tif(in_array(\"Controller\", $parents)){\n\n\t\t\t\t/**\n\t\t\t\t * Check if a controller or action method exists within class \n\t\t\t\t */\n\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * @return object Return a new controller object \n\t\t\t\t\t * @param string The second parameter in the URL\n\t\t\t\t\t * @param array Stores the controller, action and id based on the URL \n\t\t\t\t\t */\n\n\t\t\t\t\treturn new $this->controller($this->action, $this->request,$this->id);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Summary\n\t\t\t\t\t * Method does not exist\n\t\t\t\t\t * \n\t\t\t\t\t * Description\n\t\t\t\t\t * Redirects users to the 404 page if there is no corrosponding method to be called \n\t\t\t\t\t */\n\n\t\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Summary \n\t\t\t\t * Base controller does not exist\n\t\t\t\t * \n\t\t\t\t * Description\n\t\t\t\t * Redirects users to the 404 page if the corrosponding controller does not exist\n\t\t\t\t */\n\n\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t}\n\t\t} else {\n\t\t\n\t\t\t/**\n\t\t\t * Summary\n\t\t\t * Controller class does not exist\n\t\t\t * \n\t\t\t * Description\n\t\t\t * Redirects users to the 404 page if corresponding class does not exist\n\t\t\t */\n\n\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t}\n\t}", "title": "" }, { "docid": "dc15096626e56d54e0cb62f9bc7d69f5", "score": "0.6845808", "text": "public static function create($controllerName)\n {\n $fileName = ucfirst($controllerName) . 'Controller.php';\n $className = \"app\\controllers\\\\\" . ucfirst($controllerName) . 'Controller';\n $filePath = './app/controllers/' . $fileName;\n require_once($filePath);\n if (!class_exists($className)) {\n throw new Exception(\"Class $className not founded!\");\n }\n return new $className();\n }", "title": "" }, { "docid": "89733bc05db4f3c92b8f4c437e9c1340", "score": "0.68361187", "text": "function &createInstance($controller)\n\t{\n\t\tatkdebug(\"atkcontroller::createInstance() \".$controller);\n\t\t//First check if another controller is active. If so make sure this\n\t\t//controller will use atkOutput to return output\n\t\t$currentController = atkController::getInstance();\n\t\tif(is_object($currentController))\n\t\t$currentController->setReturnOutput(true);\n\n\t\t//Now create new controller\n\t\t$controller = &atkController::_instance($controller, true);\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "92898f69b4c66915e6304c974764d7ea", "score": "0.68149567", "text": "public function useController()\n {\n // Require the controller\n require_once('../app/controllers/' . $this->currentController . '.php');\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n }", "title": "" }, { "docid": "9b33775ef28976a2b27da340b07a1696", "score": "0.67380685", "text": "public static function make()\n {\n return new ControllerRequest();\n }", "title": "" }, { "docid": "cdaabb3243a1bb88c50cae3e7294116f", "score": "0.67047995", "text": "public function create()\n {\n // Estou utilizando uma outra tela de seleção ou cliente ou colaborador em AuxController\n }", "title": "" }, { "docid": "04479fb63153ae993154803f188d897b", "score": "0.66272587", "text": "private function setController(){\n $this->controller = new \\PlaceToPay\\Http\\Controllers\\TypePersonController;\n }", "title": "" }, { "docid": "0898017955242f243f6c338b98925715", "score": "0.6617061", "text": "public static function instanceController(string $contoller) : object\n {\n $objContoller = \"App\\\\Controllers\\\\\" . $contoller;\n\n return new $objContoller;\n }", "title": "" }, { "docid": "0488e0fc3eb4fd3d3976b169952b3afe", "score": "0.65683293", "text": "public function loadController()\n {\n //create Crontroler name\n $name = $this->request->controller . \"Controller\";\n $file = ROOT . 'Controllers/' . $name . '.php';\n\n if (!file_exists($file)) {\n header(\"HTTP/1.1 404 Not Found\");\n exit();\n }\n\n //require class\n require($file);\n\n //initiate class\n $controller = new $name();\n\n return $controller;\n }", "title": "" }, { "docid": "1c558ee9e298d7548b802de6c1fa2ed3", "score": "0.65385497", "text": "protected function createController($params)\n {\n $currentPath = $this->container->get('app.context')->getModules($this->module);\n $modulesPath = $this->container->get('app.context')->getModulesPath();\n $namespace = substr($currentPath, strlen($modulesPath));\n //creo el nombre del controlador con el sufijo Controller\n $controllerName = $this->contShortName . 'Controller';\n //uno el namespace y el nombre del controlador.\n $controllerClass = str_replace('/', '\\\\', $namespace . 'Controller/') . $controllerName;\n\n try {\n $reflectionClass = new ReflectionClass($controllerClass);\n } catch (\\Exception $e) {\n throw new NotFoundException(sprintf(\"No exite el controlador \\\"%s\\\" en el Módulo \\\"%sController/\\\"\", $controllerName, $currentPath), 404);\n }\n\n $this->controller = $reflectionClass->newInstanceArgs(array($this->container));\n $this->setViewDefault($this->action);\n\n return array($this->controller, $this->action, $params);\n }", "title": "" }, { "docid": "287e73ab51ae5f5ed5433fe3f9e9dcff", "score": "0.6526465", "text": "public function getController() {\n $page = $this->getPage();\n switch ($page) {\n case \"overview\":\n return new OverviewController();\n \n case \"addDummy\":\n default:\n return new OverviewController();\n \n }\n \n \n }", "title": "" }, { "docid": "1636e8507ca192826ee2c865e5e860a8", "score": "0.64963824", "text": "protected function createApiController(): self\n {\n $path = app_path(\"Http/Controllers/Api/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/apiController');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model API controller created');\n\n return $this;\n }", "title": "" }, { "docid": "ab6766860342aa37180e4292ff6e8cfa", "score": "0.6486022", "text": "protected function createController( $controllerName ) {\n\t\t$factory = $this->getFactory();\n\n\t\treturn $factory->createController(\n\t\t\t$controllerName,\n\t\t\t$this->getRequest(),\n\t\t\t$this->getResponse(),\n\t\t\t$this->renderer,\n\t\t\t$this->context\n\t\t);\n\t}", "title": "" }, { "docid": "ea3d1242a35f89fa036c9d15fc71bee1", "score": "0.6478574", "text": "private function generateController()\n {\n // Figure out the naming\n $controller = Str::plural(ucfirst($this->argument('model')));\n $path = 'app/Http/Controllers/Admin/'.$controller.'.php';\n $file = base_path().'/'.$path;\n\n // Copy the stub over\n if (!file_exists(dirname($file))) {\n mkdir(dirname($file), 0744, true);\n }\n if (file_exists($file)) {\n return $this->comment('Controller already exists: '.$path);\n }\n file_put_contents($file, str_replace('{{controller}}', $controller, file_get_contents($this->stubs.'/controller.stub')));\n $this->info('Controller created: '.$path);\n }", "title": "" }, { "docid": "c88508a31c4f7137cb1f32863e76ff2f", "score": "0.64593387", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n\n $organizationId = $GLOBALS['DS_CONFIG']['organization_id'];\n\n // Call the worker method\n $results = CreateNewUserService::addActiveUser(\n $organizationId,\n $this->args[\"envelope_args\"],\n $this->clientService);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new user\",\n \"Admin API data response output:\",\n \"Results from Users:createUser:\",\n json_encode(($results->__toString()))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "97aa4f9f04258807de5b92717b3203a6", "score": "0.6453595", "text": "public function testCreateController()\n {\n $router = new Route('stdclass', 'stdClass');\n\n $controllerClass = $router->createController();\n\n $this->assertEquals('stdClass', get_class($controllerClass));\n }", "title": "" }, { "docid": "da43cde9358641e0b19a7ba29a51735d", "score": "0.6391873", "text": "private function getController()\n {\n return $this->buildMockedController(ConsoleController::class, [$this->config]);\n }", "title": "" }, { "docid": "94707d8abdcdfd2ec282538b44f008c7", "score": "0.6383847", "text": "private function getControllerInstance()\r\n {\r\n if (!class_exists($this->request->getClass()))\r\n {\r\n throw new NotFoundException('404 Not Found!');\r\n }\r\n $class = $this->request->getClass();\r\n return new $class($this->request, $this->response);\r\n }", "title": "" }, { "docid": "d4dd9e84a5f86fc7490df8e54abdd41b", "score": "0.63834715", "text": "protected function getControllerInstance($controllerClassName, Trace $trace)\n\t{\n\t\treturn new $controllerClassName;\n\t}", "title": "" }, { "docid": "16c77d99cc459739e4bbd5af7508ae2b", "score": "0.6378039", "text": "public function __construct() {\n $module = routing::getModule();\n $action = routing::getAction();\n\n // Require controller class\n require_once \"controller/${module}.php\";\n\n $controllerName = $module . 'Controller';\n if (empty($action))\n $action = $controllerName::$defaultAction;\n\n $actionName = $action . 'Action';\n\n $controller = new $controllerName();\n $controller->$actionName();\n }", "title": "" }, { "docid": "e32b447ea14c9d53dbcf5806204eb746", "score": "0.6364178", "text": "public function initController()\n {\n $controllerNamespace = $this->buildControllerNamespace();\n $this->setParam('namespace', $controllerNamespace);\n\n // throw exception if no controller class found\n if (!class_exists($controllerNamespace)) {\n throw new \\RuntimeException(sprintf('Controller [%s] not found.', $controllerNamespace), 404);\n }\n\n // check if controller class has parent controller\n if (!isset(class_parents($controllerNamespace)[Controller::class])) {\n throw new \\RuntimeException('Controller must be extending the base controller!', 400);\n }\n\n return new $controllerNamespace($this->app);\n }", "title": "" }, { "docid": "517474f51db4ded3ec6a0be8664dbfec", "score": "0.63458043", "text": "public function create(ServerRequestInterface $request): Controller\n {\n $className = $this->getControllerClass($request);\n if ($className === null) {\n throw $this->missingController($request);\n }\n\n $reflection = new ReflectionClass($className);\n if ($reflection->isAbstract()) {\n throw $this->missingController($request);\n }\n\n // If the controller has a container definition\n // add the request as a service.\n if ($this->container->has($className)) {\n $this->container->add(ServerRequest::class, $request);\n $controller = $this->container->get($className);\n } else {\n $controller = $reflection->newInstance($request);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "2100d1d61085d0aef23e02de10164076", "score": "0.6302885", "text": "public static function &instance() {\n\t\tif(self::$instance === nil) {\n\t\t\t// Routing has been completed\n\t\t\tEvent::run('system.post_routing');\n\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Log the current routing state for debugging purposes\n\t\t\tEight::log('debug', 'Routing \"'.Router::$current_uri.'\" using the \"'.Router::$current_route.'\" route, '.Router::$controller.'::'.Router::$method);\n\n\t\t\ttry {\n\t\t\t\t// Start validation of the controller\n\t\t\t\t$class = new ReflectionClass('Controller_'.ucfirst(Router::$controller));\n\t\t\t} catch(ReflectionException $e) {\n\t\t\t\t// Controller does not exist\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\n\t\t\tif($class->isAbstract() OR (IN_PRODUCTION AND $class->getConstant('ALLOW_PRODUCTION') == FALSE)) {\n\t\t\t\t// Controller is not allowed to run in production\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\t\t\t// Run system.pre_controller\n\t\t\tEvent::run('system.pre_controller');\n\n\t\t\t// Create a new controller instance\n\t\t\t$controller = $class->newInstance();\n\n\t\t\t// Controller constructor has been executed\n\t\t\tEvent::run('system.post_controller_constructor');\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Load the controller method\n\t\t\t\t$method = $class->getMethod(Router::$method);\n\n\t\t\t\t// Method exists\n\t\t\t\tif(Router::$method[0] === '_') {\n\t\t\t\t\t// Do not allow access to hidden methods\n\t\t\t\t\tEvent::run('system.404');\n\t\t\t\t}\n\n\t\t\t\tif($method->isProtected() or $method->isPrivate()) {\n\t\t\t\t\t// Do not attempt to invoke protected or private methods\n\t\t\t\t\tthrow new ReflectionException('protected controller method');\n\t\t\t\t}\n\n\t\t\t\t// Default arguments\n\t\t\t\t$arguments = Router::$arguments;\n\t\t\t} catch (ReflectionException $e) {\n\t\t\t\t// Use __call instead\n\t\t\t\t$method = $class->getMethod('__call');\n\n\t\t\t\t// Use arguments in __call format\n\t\t\t\t$arguments = array(Router::$method, Router::$arguments);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// Stop the controller setup benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Start the controller execution benchmark\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t\t\n\t\t\t// We MAY want to prevent a method from running sometimes\n\t\t\tif(Eight::$run_method) {\n\t\t\t\t// Execute the controller method\n\t\t\t\t$method->invokeArgs($controller, $arguments);\n\t\t\t}\n\t\t\t\n\t\t\t// Controller method has been executed\n\t\t\tEvent::run('system.post_controller');\n\n\t\t\t// Stop the controller execution benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t}\n\n\t\treturn Eight::$instance;\n\t}", "title": "" }, { "docid": "387dfa2364e9a29d5cddaf3d655d83da", "score": "0.6294272", "text": "static function create_controller($controller, $action){\n\n\t\t$application = Router::get_active_app();\n\n\t\t$interactive_message = \"Est&aacute; tratando de acceder a un controlador que no existe.\n\t\tKumbia puede codificarlo por usted:\n\t\t<form action='\".KUMBIA_PATH.\"$application/builder/create_controller/$controller/$action' method='post'>\n\t\t <table>\n\t\t \";\n\t\t\t$db = db::raw_connect();\n\t\t\tif($db->table_exists($controller)){\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' checked name='kind' value='standardform'></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t} else {\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='standardform'/></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t}\n\n\t\t$interactive_message.=\"</table>\n\t\t\".submit_tag(\"Aceptar\").\"\n\t\t<a href='#' onclick='this.parentNode.style.display=\\\"\\\"; return false'>Cancelar</a>\n\t\t</form>\";\n\t\tFlash::interactive($interactive_message);\n\t}", "title": "" }, { "docid": "d5ceecf6fad8f2ccff9081ad1d56ae16", "score": "0.6285556", "text": "function loadController(){\n\t\t$name = ucfirst($this->request->controller).'Controller';\n\t\t//inclure le controller\n\t\t$file = ROOT.DS.'controller'.DS.$name.'.php';\n\t\trequire $file;\n\t\treturn new $name($this->request);\n\t}", "title": "" }, { "docid": "5c05f088152db433195daf3c030a54d1", "score": "0.62818384", "text": "public function getController() {\r\n $sController = ucfirst(strtolower((string) $this->_aRequest['controller']));\r\n\r\n try {\r\n # Are extensions for existing controllers available? If yes, use them.\r\n if (EXTENSION_CHECK && file_exists(PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n # There are no extensions, so we use the default controllers\r\n elseif (file_exists(PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Core\\controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n else {\r\n # Bugfix: Fix exceptions when upload file is missing\r\n if($sController && substr(strtolower($sController), 0, 6) !== 'upload')\r\n throw new AdvancedException('Controller not found:' . PATH_STANDARD .\r\n '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php');\r\n }\r\n }\r\n catch (AdvancedException $e) {\r\n AdvancedException::reportBoth($e->getMessage());\r\n Helper::redirectTo('/errors/404');\r\n }\r\n\r\n $this->oController->__init();\r\n return $this->oController;\r\n }", "title": "" }, { "docid": "3fcfa161f92f28bd234dcec8544a9fec", "score": "0.62801427", "text": "public function controller()\n {\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && !class_exists($this->controller)\n ) {\n throw new Exception\\InvalidControllerException(sprintf(\n 'Invalid controller specified: \"%s\"',\n $this->controller\n ));\n }\n\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && class_exists($this->controller)\n ) {\n $controller = $this->controller;\n $this->controller = new $controller;\n }\n\n if (!is_callable($this->controller)) {\n $controller = $this->controller;\n if (is_array($controller)) {\n $method = array_pop($controller);\n $controller = array_pop($controller);\n\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n\n $controller .= '::' . $method;\n }\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n throw new Exception\\InvalidControllerException(sprintf(\n 'Controller \"%s\" is not callable',\n $controller\n ));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "0a49ceeeb394c1f64b577a12ec7b92c1", "score": "0.6273928", "text": "public function createController($pi, array $params)\n {\n $depends = include __DIR__ . '/depends.php';\n $container = new \\phpList\\plugin\\Common\\Container($depends);\n $page = isset($params['page']) ? $params['page'] : $params['p'];\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\Controller\\\\' . ucfirst($page);\n\n return $container->get($class);\n }", "title": "" }, { "docid": "e671f00890c8be49fcae1a0780c34135", "score": "0.62208194", "text": "public function __construct() {\n $url = $this->getUrl();\n //Check if file controller exists based on the URL from the controllers directory\n if ( file_exists('../app/controllers/' . ucwords($url[0]) . '.php') ) {\n //If controller exists, update the currentController \n $this->currentController = ucwords($url[0]); \n //unset $url[0] - Controller Name\n unset($url[0]);\n }\n // else {\n // die(\"Invalid Controller!\");\n // }\n\n //Require the controller file\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n //Instantiate a New Controller Class\n $this->currentController = new $this->currentController;\n\n //Check for the second parameter/part of the URL (i.e. the method name)\n if ( isset($url[1]) ) {\n //Check if the method exists in the controller class\n if ( method_exists($this->currentController, $url[1]) ) {\n $this->currentMethod = $url[1];\n //unset the $url[1] - Method Name\n unset($url[1]);\n }\n }\n\n //Retrieve the remaining parameters/parts of the URL\n $this->params = $url ? array_values($url) : []; \n \n //Call a callback method with parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "b81aded60c440070a5eb67bf0591100f", "score": "0.6218608", "text": "private function setController()\n {\n // Create controller object\n $this->controller = new Controller($this->app);\n\n // Sitewide feed\n $this->app->match('/spaceapi/spacestate.json', array($this->controller, 'spaceapifeed'));\n\n $this->app->match('/spaceapi/spacestate', array($this->controller, 'spaceState'));\n \n $this->app->match('/spaceapi/togglestate', array($this->controller, 'toggleState'));\n \n }", "title": "" }, { "docid": "98c9023bfaf44016718eadd203b5f0e0", "score": "0.61966085", "text": "public function useController()\n {\n $args = func_get_args();\n \n // First args is always used as Controller\n $controller = $args[0];\n $real_controller = explode('@', $controller);\n \n // Other args\n $other_args = [];\n for($i = 1; $i < count($args); $i++) {\n array_push($other_args, $args[$i]);\n }\n\n $class = '\\App\\Controller\\\\' . $real_controller[0];\n $object = new $class();\n $method = $real_controller[1];\n \n if(is_array($other_args)) {\n if(count($other_args) > 0) {\n $object->$method($other_args[0]);\n } else {\n $object->$method();\n }\n }\n }", "title": "" }, { "docid": "731ac4c132b25d11301cccf4581844c3", "score": "0.6176733", "text": "public static function create($router): Controller\n {\n /*\n * --------------------------------------------------------------\n * Ensure the controller file exists and import it.\n * --------------------------------------------------------------\n */\n if (file_exists($router->controllerFile)) {\n require_once $router->controllerFile;\n } else {\n $errMsg = \"Error:: No such controller {$router->controllerFile}\";\n \n throw new InvalidControllerException($errMsg);\n }\n\n // Create and return the instance of the controller class.\n return new $router->controllerClass();\n }", "title": "" }, { "docid": "8c7cfdeefe313f21055cc79a19287760", "score": "0.6144564", "text": "public function controller($controller, $namespace = 'kake', $new = true)\r\n {\r\n if (!strpos($controller, 'Controller')) {\r\n $controller = Helper::underToCamel($controller, false, '-') . 'Controller';\r\n }\r\n $class = '\\service\\controllers\\\\' . $namespace . '\\\\' . $controller;\r\n\r\n if (!$new) {\r\n return $class;\r\n }\r\n\r\n return Helper::singleton(\r\n $class,\r\n function () use ($class) {\r\n return new $class($this->id, $this->module);\r\n }\r\n );\r\n }", "title": "" }, { "docid": "cb84ae4c83e83c46d1d108dcf04a24ce", "score": "0.61302066", "text": "public function __construct(){\n // print_r($this->getUrl());\n\n $url = $this->getUrl();\n\n // Look in controllers for the first value.\n // Checks the controller folder for a php file corresponding to\n // the first parameter.\n // Using ucwords to ensure the file is uppercase, as is standard.\n if(file_exists('../app/controllers/' . ucwords($url[0]) . '.php')){\n\n // If there is such a controller, make it the current one.\n $this->currentController = ucwords($url[0]);\n // After it becomes the new current controller, remove it from the url array.\n unset($url[0]);\n }\n\n // Require the controller.\n // This will be the pages controller or the controller specified through\n // url parameters.\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n // Instantiate controller.\n $this->currentController = new $this->currentController;\n\n // Check for second part of url.\n if(isset($url[1])){\n // Check to see that the second part of the url corresponds to an existing method.\n if(method_exists($this->currentController, $url[1])){\n // If it does exist, make it the current method.\n // If it doesn't, the default is set to index.\n $this->currentMethod = $url[1];\n\n // After it becomes the current method, unset it from url.\n unset($url[1]);\n }\n }\n\n // Grab all url parameters.\n // If url is set / truthy, make params an array consisting of\n // the values of the url array; if it isn't, make it an empty array.\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of params.\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "2442b08fad23aff7f41270d840a240d2", "score": "0.605339", "text": "public function create()\n {\n \n return view(\"lib.class.create\");\n }", "title": "" }, { "docid": "8fbb13394eda19ac9d0420040ddd7d75", "score": "0.6047089", "text": "public function getController(string $name, string $file):object\n {\n require($file);\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "c8b8280d386722b5546abb5d71a512d6", "score": "0.6044492", "text": "function Controller()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "0a59aa930ba57fab18dfc2dff054e452", "score": "0.60213554", "text": "protected function instantiateController($controllerName)\n {\n $reflection = new \\ReflectionClass($controllerName);\n $construct = $reflection->getConstructor();\n\n if (! $construct) {\n return $reflection->newInstance();\n }\n\n $parameters = $construct->getParameters();\n $list = $this->createArgumentList($parameters);\n\n return $reflection->newInstanceArgs($list);\n }", "title": "" }, { "docid": "9481f13fa63b576059207e8eaf51880d", "score": "0.5999503", "text": "private function getControllerInstance(array $getVariables): AbstractController\n {\n if (!isset($getVariables[\"controller\"])) {\n $this->redirectToNotFoundPage();\n }\n\n $controllerName = sprintf('App\\Controller\\%sController', ucfirst($getVariables[\"controller\"]));\n\n if (!class_exists($controllerName)) {\n $this->redirectToNotFoundPage();\n }\n\n return new $controllerName();\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "d8c829809cbdf130ab92e281f35b25eb", "score": "0.5979808", "text": "public function __construct() {\n\t\t$url = $this->_parseUrl();\n\n\t\n\t\t// load new controller\n\t\tif (isset($url[0])) {\n\t\t\tif (file_exists('app/controllers/' . $url[0]. '.class.php')) {\n\t\t\t\t$this->_controller = $url[0];\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequire_once('app/controllers/' . $this->_controller. '.class.php');\n\t\t// load new method\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->_controller, $url[1])) {\n\t\t\t\t$this->_method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\n\t\t// $this->_params\n\t\tcall_user_func_array([new $this->_controller, $this->_method], $this->_params);\n\t}", "title": "" }, { "docid": "65828625ca45d10e3909226e85865d56", "score": "0.5975392", "text": "public static function build($type, $domain, $api_key) {\n $base_url = sprintf('https://%s.chargify.com', $domain);\n\n // Set the response format through the header.\n $header = array(\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json'\n );\n\n // Add the same basic authentication to all requests.\n $basicAuth = new CurlAuthPlugin($api_key, 'x');\n\n $client = new Client($base_url);\n $client->addSubscriber($basicAuth);\n $client->setDefaultHeaders($header);\n\n $class_name = 'Chargify\\\\Controller\\\\' . ucfirst($type);\n\n if (class_exists($class_name)) {\n return new $class_name($client);\n }\n else {\n throw new Exception(\"Invalid controller type given.\");\n }\n }", "title": "" }, { "docid": "eb638069425c512d39710e5206dcf272", "score": "0.59658927", "text": "public static function Factory($requireLogin=true) {\n\t\t$router = RouteParser::Instance();\n\t\tif($router->Dispatch('controller') !== null) {\n\t\t\t$classname=ucfirst(strtolower($router->Dispatch('controller'))).'Controller';\n\t\t\tif(class_exists($classname)) {\n\t\t\t\t$controller=$classname;\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\n\t\t$controller = 'IndexController';\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "647393b5810a52045e873d92c1fe2379", "score": "0.59586406", "text": "public function __construct(\\KubernetesController\\Controller $controller)\n {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "3b3aaf093f2d48490ac4d219b2f6dc6e", "score": "0.59431434", "text": "public function testMakingAControllerWithoutModulesInitialised () : void\n {\n $controller = \"NewController\";\n $this->artisan(\"make:controller\", [\"name\" => $controller]);\n\n // I should have a controller in my app dir\n $this->assertTrue(class_exists(\"App\\\\Http\\\\Controllers\\\\$controller\"));\n $this->assertTrue(is_file(app_path(\"Http/Controllers/$controller.php\")));\n unlink(app_path(\"Http/Controllers/$controller.php\"));\n }", "title": "" }, { "docid": "1316384d618ee7fabd2c40454d82a9d3", "score": "0.5938563", "text": "public function __construct()\n {\n $this->controller = $this->controllersPath . $this->controller;\n }", "title": "" }, { "docid": "c58c3789f04ea2a11ec8577816069a98", "score": "0.5936409", "text": "protected function getSymfonyCmfCreate_Rest_ControllerService()\n {\n return $this->services['symfony_cmf_create.rest.controller'] = new \\Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController($this->get('fos_rest.view_handler'), $this->get('symfony_cmf_create.object_mapper'), $this->get('symfony_cmf_create.rdf_type_factory'), $this->get('symfony_cmf_create.rest.handler'), 'IS_AUTHENTICATED_ANONYMOUSLY', NULL);\n }", "title": "" }, { "docid": "23422a0a7a4de2549e5b09a4170de8e5", "score": "0.5921801", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "059426939ad1ae81474d9e1d3537741c", "score": "0.59128374", "text": "function __construct(){\n\t\t$url = $this->url();\n\n\t\t//[0] => 'Controller'\n\t\t//[1] => 'Method'\n\t\t//[2~] => 'Param'\n\t\tif (!empty($url)) {\n\t\t\tif (file_exists(ROOT_CONTROLLER_FOLDER . $url[0] . \".php\")) {\n\t\t\t\t$this->controller = ucwords($url[0]);\n\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\tdie(\"Controller \" . $url[0] . \" is not found on \" . ROOT_CONTROLLER_FOLDER);\n\t\t\t}\n\t\t}\n\t\t// @Include controller file\n\t\trequire_once ROOT_CONTROLLER_FOLDER . $this->controller . \".php\";\n\n\t\t$this->controller = new $this->controller;\n\t\t\n\n\t\t/**\n\t\t * Check method availability.\n\t\t */\n\t\tif (isset($url[1]) && !empty($url[1]) ) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}else {\n\t\t\t\tdie(\"Method is not found\");\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check Parameters availability.\n\t\t */\n\t\tif (isset($url)) {\n\t\t\t$this->param = $url;\n\t\t} else {\n\t\t\t$this->param = [];\n\t\t}\n\n\t\tcall_user_func_array([\n\t\t\t$this->controller,\n\t\t\t$this->method\n\t\t], $this->param);\n\n\n\t}", "title": "" }, { "docid": "d46a35c396e6b6a6b021a81aa51a8db7", "score": "0.59083337", "text": "static private function _getInstanceController()\n {\n if (!isset($_GET['controller'])) {\n $rout[0] = 'default';\n } else {\n $rout = explode('_', $_GET['controller']);\n }\n\n if (count($rout) == 1) {\n $rout[1] = 'index';\n }\n\n $controllerName = self::getConfig('controllers/' . $rout[0]);\n\n $controllerPuth = self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR .\n $controllerName . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . ucfirst($rout[1]) . 'Controller.php';\n\n if (!file_exists($controllerPuth)) {\n throw new Exception(sprintf('Controller %s not found', $controllerPuth));\n }\n\n require_once $controllerPuth;\n\n self::$autoloader->loadClassModule(self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $controllerName);\n\n $classController = $controllerName . '_Controller_' . ucfirst($rout[1]) . 'Controller';\n\n if (!class_exists($classController)) {\n throw new Exception(sprintf('File has been loaded but class %s not found', $classController));\n }\n\n new $classController;\n\n return true;\n }", "title": "" }, { "docid": "5830efbd2e7f9bdbe6c206569736bbaa", "score": "0.5871468", "text": "function get_instance() {\n return NX_framework\\NX_core\\Controller\\Controller::$instance;\n}", "title": "" }, { "docid": "628c659bcc4935d910c129eddf186721", "score": "0.586621", "text": "public function controller() {\n\t\t// starting session\n\t\tsession_cache_limiter(false);\n\t\tsession_start();\n\n\t\t// load configs\t\t\n\t\trequire_once 'config/envconfig.php';\n\t\t$this->salt = $salt;\n\n\t\t// set timezone\n\t\tdate_default_timezone_set($timezone);\n\t\t\n\t\t// composer autoload\n\t\trequire 'vendor/autoload.php';\n\n\t\t// blade parameter\n\t\trequire 'lib/MyBlade.php';\n\t\t$this->blade = new \\Lib\\MyBlade('view', 'cache');\n\t\t$blade =& $this->blade;\n\n\t\t$this->app = new \\Slim\\Slim(\n\t\t\tarray(\n\t\t\t\t'debug'\t=> $debug\n\t\t\t)\n\t\t);\n\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// custom 404\n\t\t$this->app->notFound(function() {\n\t\t\tprint $this->load_view('404', array('request' => $_SERVER['REQUEST_URI']));\n\t\t});\n\t\t$this->app->error(function($e) {\n\t\t\tprint $this->load_view('500', array('message' => 'Something went WRONG!'));\n\t\t});\n \n\t\t\n\t\t// auto load library\n\t\tspl_autoload_register(function($class) {\n\t\t\t$file = 'lib/' . str_replace('Lib\\\\', '', $class) . '.php';\n\t\t\tif (is_file($file)) {\n\t\t\t\trequire_once $file;\n\t\t\t\tclearstatcache();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// load semua controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file)) {\n\t\t\t\trequire('controller/' . $file);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "dcb3eebd33f194cf731d832d0b9ffcde", "score": "0.5861673", "text": "public function __construct ()\n\t{\n\t\t$this->_controller = new \\Game\\Controller\\CLI();\n\n\t\treturn parent::__construct();\n\t}", "title": "" }, { "docid": "a89295eabd6a2a5d5c1031a0c3e9f486", "score": "0.5857453", "text": "public function createAction() {\n echo \"create action called in IndexController!\";\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "cf5956d060b3cd6791e40d4fbe4cf572", "score": "0.5840165", "text": "public static function create() {\n\n }", "title": "" }, { "docid": "f142db9abeddee3cfd3e6581465a3581", "score": "0.5839", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\sigridjonsson\\Controller\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "d87d1c2be0687b35dfeabfeb797b84b3", "score": "0.58357793", "text": "public function controllerFactory($sType)\n {\n $sDriver = Controller::driver($sType);\n\n if (!isset(self::$hControllerList[$sDriver]))\n {\n self::$hControllerList[$sDriver] = Controller::factory($sType, $this);\n }\n\n return self::$hControllerList[$sDriver];\n }", "title": "" }, { "docid": "5677ae0bc9a4abce52974f59f8374f0a", "score": "0.5831372", "text": "private static function get_controller(string $controller_name): controller {\n // Sanity check on input\n if (!preg_match('#^[a-z_]+$#', $controller_name)) {\n throw new \\Exception('Invalid controller name');\n }\n\n // Work out what the namespace should be\n $namespace = substr(controller::class, 0, strrpos(controller::class, '\\\\'));\n\n // Class name should then be this\n $controller_class = \"{$namespace}\\\\{$controller_name}\";\n\n if (!class_exists($controller_class)) {\n throw new \\Exception('Controller not found');\n }\n\n return new $controller_class();\n }", "title": "" }, { "docid": "8ef61d4368a4fd8ac2a169e035ea54fc", "score": "0.58311236", "text": "public function __construct()\n {\n $uri = Helpers::parseURI();\n\n // Provera da li postoji datoteka sa prosleđenim imenom kontrolera\n $controllerName = isset($uri[0]) ? ucwords($uri[0]) . 'Controller' : '';\n if (isset($uri[0]) && !empty($uri[0]) && file_exists('./app/Controllers/' . $controllerName . '.php')) {\n $this->controller = 'Controllers\\\\' . $controllerName;\n unset($uri[0]);\n }\n\n\n $this->controller = new $this->controller();\n\n // klasa kontrolera prošla metod akcije\n if (isset($uri[1])) {\n $actionName = $uri[1] . 'Action';\n if (method_exists($this->controller, $actionName)) {\n $this->method = $actionName;\n unset($uri[1]);\n }\n }\n\n // Ostali URI parametri\n if ($uri) {\n $this->params = array_values($uri);\n }\n\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "e52216e4b015f524478ae0d0925abb91", "score": "0.5827566", "text": "function controller($params) {\n\t\tinclude \"controllers/\". $params[0] .\".php\";\n\t\tif(!class_exists($params[0], false))\n\t\t\texit(\"Class $params[0] not found\");\n\t\t$controller = new $params[0];\n\t\t// Getting and checking a method\n\t\tif(!method_exists($controller, $params[1]))\n\t\t\texit(\"Method $params[1] not found\");\n\t\t$method = (string)$params[1];\n\t\t// Method call\n\t\treturn $controller->$method();\n\t}", "title": "" }, { "docid": "cf9fb0175486f049acbbeacb66ba609d", "score": "0.58206075", "text": "public function create()\n {\n return view('create_class');\n }", "title": "" }, { "docid": "1e3942d1624faaef51ef5898f15c256f", "score": "0.5820016", "text": "protected function createControllerContext(): ControllerContext\n {\n $httpRequest = new ServerRequest('POST', 'http://localhost');\n $request = ActionRequest::fromHttpRequest($httpRequest);\n $response = new ActionResponse();\n $arguments = new Arguments([]);\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($request);\n\n return new ControllerContext($request, $response, $arguments, $uriBuilder);\n }", "title": "" }, { "docid": "d2d2ffec2eda0b4360fd77907456cea6", "score": "0.58197916", "text": "public function getController($actionConfig = [])\n {\n return new TestController('test', Yii::$app, ['layout' => false, 'actionConfig' => $actionConfig]);\n }", "title": "" }, { "docid": "e01af9b3b9b704e2fbe81830282d9589", "score": "0.58087105", "text": "public function __construct($controller)\n {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "ed4af23c1232a43dcdd34336637d19ab", "score": "0.58060294", "text": "public static function getControllerInstance($class, $request, $response, array $invokeArgs = array())\n {\n return new $class($request, $response, $invokeArgs);\n }", "title": "" }, { "docid": "6a79d5243c6c93538391cd7ed64b2424", "score": "0.5803797", "text": "public function __loadController($_controllerName)\n\t{\n\t\t$_controllerName\t=\tstr_replace(\"/\", \"\", \"\\controllers\\/\".strtolower($_controllerName));\n\t\treturn\tnew $_controllerName();\n\t}", "title": "" }, { "docid": "519c12b1c73f4a2e417d7f14eb7d9e74", "score": "0.5801946", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "ae788f542c25e47565ab4df20b8d09e3", "score": "0.5787671", "text": "private function _loadExistingController() {\n\n $file = $this->_controllerPath . $this->_url[0] . '.php';\n\n if( file_exists( $file ) ) {\n\n include $file;\n\n $this->_controller = new $this->_url[0]();\n\n } else {\n\n $this->_error();\n\n return false;\n\n }\n\n return $this;\n\n }", "title": "" }, { "docid": "fcf52de01d6330d2148d874e7010d4e3", "score": "0.57817113", "text": "function __construct() {\r\n\r\n $url = rtrim($_GET['url'], '/');\r\n $url = explode('/', $url);\r\n $counter = 0;\r\n $indexer = 0;\r\n $args = null;\r\n foreach ($url as $index) {\r\n if ($counter > 1) {\r\n $args[$indexer] = $index;\r\n $indexer++;\r\n }\r\n $counter++;\r\n }\r\n\r\n /*\r\n * Checking if any controller request has been made through the url[0] or not. if not\r\n * then the default controller will be excuted.\r\n * \r\n */\r\n\r\n if (isset($url[0])) {\r\n \r\n $file = 'controllers/' . $url[0] . '.php';\r\n if (file_exists($file)) {\r\n require $file;\r\n $app = new $url[0]();\r\n if (isset($url[1])) {\r\n if (method_exists($app, $url[1])) {\r\n $app->{$url[1]}($args);\r\n } else {\r\n error::error_handler(\"No such Method found\");\r\n }\r\n } else {\r\n if (method_exists($app, 'index')) {\r\n $app->index();\r\n }\r\n }\r\n } else {\r\n error::error_handler(\"No such controller\");\r\n \r\n }\r\n \r\n } else {\r\n echo \"Default controller\";\r\n }\r\n }", "title": "" }, { "docid": "ba64e44da499c249386142425288e474", "score": "0.577916", "text": "private function &__getController() {\n\n require_once('app/app_controller.php');\n\n\n $controller = false;\n $ctrlClass = $this->__loadController($this->params);\n if (!$ctrlClass) {\n return $controller;\n }\n $ctrlClass .= 'Controller';\n if (class_exists($ctrlClass)) {\n $controller = new $ctrlClass();\n }\n return $controller;\n }", "title": "" }, { "docid": "0b02ccf0e48ffb267e5e87f286be0016", "score": "0.5778011", "text": "public function __construct() {\n\t\t$url = $this->parseUrl();\n\n\t\tif (file_exists('../app/controllers/'. @$url[0] .'_controller.php')) {\n\t\t\t$this->controller = $url[0];\n\t\t}\n\t\tunset($url[0]);\n\t\trequire_once '../app/controllers/'. $this->controller .'_controller.php';\n\n\t\t$this->controller = new $this->controller;\n//Se verifica si hay una url en la primera pocision del arreglo\n\t\tif (isset($url[1])) {\n\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t}\n\t\t}\n//Una vez usada, se suelta para poder usarla luego nuevamente\n\t\tunset($url[1]);\n\t\t$this->params = $url ? array_values($url) : [];\n\t\tarray_unshift($this->params);\n\n\t\tcall_user_func_array([$this->controller, $this->method], $this->params);\n\t}", "title": "" }, { "docid": "aaf481233643e0c7b6db695f2066b7d3", "score": "0.577622", "text": "public function newInstance($file)\n {\n if (! isset($this->map[$file])) {\n throw new NoClassForController($file);\n }\n\n $class = $this->map[$file];\n return $this->forge->newInstance($class);\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "63608fb0a8185f0dba4738b591092a72", "score": "0.5768055", "text": "public function makeController($controllerName)\n {\n if (is_object($controllerName)) {\n if ($controllerName instanceof Controller) return $controllerName;\n\n throw new InvalidArgumentException($controllerName);\n }\n\n $controller = mezzo()->make($this->controllerClass($controllerName));\n\n if (!($controller instanceof Controller))\n throw new ModuleControllerException('Not a valid module controller.');\n\n return $controller;\n }", "title": "" }, { "docid": "a4cb0faec86988f6db72238544d87fb4", "score": "0.5766777", "text": "public function create()\n {\n return view('fill_in_the_blanks_controllers.create');\n }", "title": "" }, { "docid": "1d605b4e094471a3e951aac2e0125269", "score": "0.57497156", "text": "public function create()\n {\n // create is into HomeController.php -> index-method\n }", "title": "" }, { "docid": "9bdbfd06d3768808b2075f3429c0cc24", "score": "0.5746798", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Kimchi\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "751c588a56325765a0304a2f958fbc66", "score": "0.5738778", "text": "private function useController($controller, $action)\n {\n $controller = ucfirst($controller);\n $controllerName = $controller . 'Controller';\n $controllerObj = new $controllerName($controller, $action);\n }", "title": "" }, { "docid": "b12b6200d5e060e7bd7b86f69f552b8a", "score": "0.57282233", "text": "public static function controller($name) {\n\t\t\t$class_name = Inflector::classify($name);\n\t\t\t$path_name = FileUtils::join(NIMBLE_ROOT, 'app', 'controller', $class_name . 'Controller.php');\n\t\t\t$view_path = FileUtils::join(NIMBLE_ROOT, 'app', 'view', strtolower(Inflector::underscore($class_name)));\n\t\t\tFileUtils::mkdir_p($view_path);\n\t\t\t$string = \"<?php \\n\";\n\t\t\t$string .= \"\t/**\\n\t* @package controller\\n\t*\t*/\\n\";\n\t\t\t$string .= \" class {$class_name}Controller extends Controller { \\n\";\n\t\t\t$string .= self::create_view_functions($view_path);\n\t\t\t$string .= \" }\\n\";\n\t\t\t$string .= \"?>\";\n\t\n\t\t\t$db = fopen($path_name, \"w\");\n\t\t\tfwrite($db, $string);\n\t\t\tfclose($db);\n\t\t}", "title": "" }, { "docid": "8f2c0b2ff8df98756a4bc02976fbb7bb", "score": "0.57256204", "text": "public function create()\n {\n \\Log::info(__FUNCTION__);\n return view('create');\n }", "title": "" }, { "docid": "35c65899b291d521a7b01d096634c798", "score": "0.57226366", "text": "public function __construct()\n {\n // Get root directory and set paths where controllers and views are located.\n $this->root_dir = App::getInstance()->getRootDir();\n $this->controller_path = $this->root_dir.'/app/classes/controllers';\n $this->view_path = $this->root_dir.'/app/views';\n\n /*\n * Reads the controller directory and files and creates a list of controllers with all their public functions\n * and variables.\n */\n $this->loadControllers();\n\n /*\n * Collect class names, public functions, variables, current view and query string from the current route.\n * For example of current URL is http://localhost/my_projects/tests/questions/1/2/?ref=abc the controller is\n * \"tests\", the function is \"questions\", variables is an array [1,2] and query string is \"?ref=abc\". The view\n * is determined by controller, view and path. In this case the view is full path\n * \"/httpdocs/app/views/Tests/questions.php\".\n */\n [$controller, $function, $variables, $view, $query_string] = $this->getRoute();\n\n // Check if the called controller actually exists in the controller list we created before.\n $this->validateController($controller);\n\n // If controller exists, initialize the controller class.\n $this->controller = new $controller();\n\n // Check if the called controller funcion is in the list of the current controller funtions.\n $this->validateFunction($controller, $function);\n\n // If everything was OK, set the other parameters of the current controller.\n $this->function = $function;\n $this->variables = $variables;\n $this->view = $view;\n $this->query_string = $query_string;\n }", "title": "" }, { "docid": "45f768145816fc230db1a31cb6c45e50", "score": "0.57209027", "text": "function loadController()\n {\n /*(FR) On fait passer la première lettre du contrôleur en majuscule\n (EN) We pass the first letter of the controller in capital letters */\n $name = ucfirst($this->request->controller) . 'Controller';\n\n /*(FR) On stocke le PHP de notre contrôleur dans la variable file\n (EN) We store the PHP of our controller in the variable file */\n $file = ROOT . DS . 'controller' . DS . $name . '.php';\n\n /*(FR) On vérifie si le fichier PHP existe et que ce n'est pas un admin prefixe\n (EN) We check if the PHP file exists and that it is not an admin prefix */\n if(!file_exists($file) && $this->request->controller != conf::$admin_prefixe && $this->request->controller !='admin'){\n\n $this->error('Le controller '.$this->request->controller.' n\\'existe pas');\n } \n /*(FR) Si il existe on le charge\n (EN) If it exists we charge it */\n require $file;\n\n /*(FR) On initialise le contrôleur et on lui passe la variable request \n (EN) Initialize the controller and pass it the request variable */\n $controller = new $name($this->request);\n\n /*(FR) Et on retourne notre contrôleur\n (EN) And we return our controller */\n return $controller;\n }", "title": "" }, { "docid": "ea3ca86b2bf105c904277968058737bb", "score": "0.5718793", "text": "public function testNewFrontControllerInstance()\n {\n $this->assertInstanceOf(FrontController::class, new FrontController($this->model, $this->view, $this->controller, '', []));\n }", "title": "" }, { "docid": "73a4152afb1d1664966de39acfa0061e", "score": "0.5715404", "text": "function __construct()\n {\n tmvc::instance($this,'controller');\n \n /* instantiate load library */\n $this->load = new iMVC_Load; \n\n /* instantiate view library */\n $this->view = new iMVC_View;\n }", "title": "" }, { "docid": "b49f42691b054ac525f308cb7c389471", "score": "0.5711729", "text": "protected function bakeController()\n {\n $controllerName = $this->option('controller') ?: $this->argument('name');\n\n $controller = Str::studly(class_basename($controllerName));\n\n $this->call('bake:controller', [\n 'name' => \"{$controller}Controller\",\n ]);\n }", "title": "" } ]
55b397e1029fde40ab0296a30cb97ba5
Initialize the api private properties.
[ { "docid": "5f9f1ff96af35b782570ab9d8bac2bc4", "score": "0.8456974", "text": "private function initialize()\n {\n $this->resourceName = Config::get('app.api.resource');\n $this->cacheFile = Config::get('app.api.cache');\n $this->type = Config::get('app.api.type');\n $this->varName = Config::get('app.api.variable');\n $this->routerUrl = Config::get('app.api.url');\n }", "title": "" } ]
[ { "docid": "4871adf40190cf3d2a6e5910cb6fabe8", "score": "0.7764157", "text": "function init() {\n\t\t$this->apiContext = new ApiContext(\n\t\t\tnew OAuthTokenCredential($this->client_id, $this->client_secret)\n\t);\n\t\t//print_r($this->apiContext);\n\t}", "title": "" }, { "docid": "0479c1f9e296ee1bf2ee6024b8d05676", "score": "0.7697582", "text": "function __construct() {\n $this->SetAPIHeader();\n }", "title": "" }, { "docid": "724fdcb3bf31107f3ebebef86792b999", "score": "0.7496384", "text": "function __construct()\n {\n\n $this->apiClient = new APIClient();\n }", "title": "" }, { "docid": "9bb26c0873d55dd8c44a159bc93df350", "score": "0.74341905", "text": "public static function _init()\n\t{\n\t\t// Define the properties we'll be working with\n\t\tstatic::properties();\n\t}", "title": "" }, { "docid": "6fc58f67d1612f819280a56d32652698", "score": "0.741883", "text": "public static function _init()\n\t{\n\t\t\\Config::load('campaignmonitor', true);\n\t\tself::$_api_endpoint = \\Config::get('campaignmonitor.api_endpoint');\n\t\tself::$_api_key\t= \\Config::get('campaignmonitor.api_key');\n\t}", "title": "" }, { "docid": "897be9168acd4e1d6b42eb43baaece59", "score": "0.74106765", "text": "function init() {\n\n\t\t$this->_config = $this->webiny()->getConfig()->components->http;\n\n\t\t$this->_query = new Query();\n\t\t$this->_post = new Post();\n\t\t$this->_session = new Session($this->_config->session);\n\t\t$this->_server = new Server();\n\t\t$this->_files = new Files();\n\t\t$this->_env = new Env();\n\t\t$this->_headers = new Headers();\n\n\t\tif(isset($this->_config->trusted_proxies)) {\n\t\t\t$this->_trustedProxies = $this->_config->trusted_proxies;\n\t\t}\n\t}", "title": "" }, { "docid": "7fad6a21a63b4ed11b98293ef272fd5c", "score": "0.739955", "text": "public function rest_api_init() {}", "title": "" }, { "docid": "975c9800a58fe4c38cf77da83e3b085b", "score": "0.73727196", "text": "public static function init() {\n if (self::$apiClient === null)\n self::$apiClient = new APIClient();\n }", "title": "" }, { "docid": "db460aea08ad4cfba43c0fa8dd66ff4d", "score": "0.7355968", "text": "private function __construct() {\n $this->apis = [];\n }", "title": "" }, { "docid": "dac3ff39020f5f3aea1e197f9ad9e6d9", "score": "0.73483247", "text": "private static function _init()\n {\n if (static::$_isInitialize) {\n return;\n }\n $config = \\Yaf_Registry::get(CFG)->aliyunOss;\n static::$_accessKey = $config->get('accessKeyId');\n static::$_keySecret = $config->get('accessKeySecret');\n static::$_endPoint = $config->get('endpoint');\n static::$_bucket = $config->get('bucket');\n static::$_domain = $config->get('domain');\n static::$_dirName = $config->get('dirname');\n\n static::$_isInitialize = true;\n }", "title": "" }, { "docid": "2786b55ca06b63e4a513c85a320f95f6", "score": "0.7325537", "text": "public function init() {\n $this->_service = new stdClass();\n $this->_service->baseurl = trim(get_config('blocks/intelligent_learning', 'ilpapi_url'));\n $connectionid = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionid'));\n $connectionpassword = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionpassword'));\n $this->_service->auth_header = $this->build_service_header($connectionid, $connectionpassword);\n $this->_service->is_ca_authority = trim(get_config('blocks/intelligent_learning', 'ilpapi_issslcaauthority'));\n $this->_service->cert_path = trim(get_config('blocks/intelligent_learning', 'ilpapi_certpath'));\n\n $this->_service->curldefaults = $this->get_curl_defaults();\n }", "title": "" }, { "docid": "6e1f509ec28d98fd87b25b9448670032", "score": "0.7320175", "text": "public function init() {\n }", "title": "" }, { "docid": "e42ac89069675103bf7ce345e2bb0ac2", "score": "0.7284009", "text": "protected function init() {\n }", "title": "" }, { "docid": "b80abd935d2c9cad93e9585485059d8d", "score": "0.7282034", "text": "public function __construct()\n {\n $this->initialize();\n \n // if application is in debug mode\n if (Config::get('app.debug'))\n {\n // force generation of API based on actions classes\n $this->api = $this->createApi();\n }\n else\n {\n // load the direct api in cache file\n if (!file_exists(CACHE_PATH.'/'.$this->cacheFile))\n {\n // force generation of the API and generate the cache file\n $this->api = $this->createApi();\n $this->writeCache($this->api);\n }\n else\n {\n // load the api based on the cache file\n $this->api = json_decode($this->readCache());\n }\n }\n }", "title": "" }, { "docid": "39d580b37b95f1a471e0796ca2ea003f", "score": "0.72801155", "text": "function initialize( $api = '' ) {\n\n\t\t$this->settings = array(\n\n\t\t\t// api\n\t\t\t'api'\t\t\t\t=> $api,\n\n\t\t\t// transients keys\n\t\t\t'json_key'\t\t\t=> 'MC-smarticket-json',\n\t\t\t'last_updated_key'\t=> 'MC-smarticket-json-updated'\n\n\t\t);\n\n\t}", "title": "" }, { "docid": "062920f6715bac77a1203448118927eb", "score": "0.72705775", "text": "public function __construct()\n {\n global $API_AUTHORIZATIONS;\n\n //Construct generic API handler\n parent::__construct();\n\n //Define authorizations for current API module\n $this->AUTH = $API_AUTHORIZATIONS[self::MODULE];\n }", "title": "" }, { "docid": "26c0836944ce0ad44ca1514677dd11ef", "score": "0.7262056", "text": "private function initializeState(){\n $apiRoot = $this->store->get('mpesa.apiUrl', '');\n if (substr($apiRoot, strlen($apiRoot) - 1) !== '/') {\n $apiRoot = $apiRoot . '/';\n }\n $this->baseEndpoint = $apiRoot;\n }", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7254398", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7254398", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7254398", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.7254398", "text": "public function init() {}", "title": "" }, { "docid": "97c4b302fa49ca7979373033f2ea6091", "score": "0.7233212", "text": "private function init()\n {\n $this->people = new PeopleRequests($this);\n $this->hashtags = new HashtagRequests($this);\n $this->locations = new LocationRequests($this);\n $this->post = new PostRequests($this);\n $this->informationRequests = new InformationRequests($this);\n $this->verifySSL = true;\n $this->proxy = null;\n $this->retry = [];\n }", "title": "" }, { "docid": "2795543aefca123fba0c4cc6c4a5ddb4", "score": "0.7217598", "text": "function initApi() {\n\n\t\t// init\n\t\t$this->browsers = $GLOBALS['browsers'];\n\t\t$this->robots = $GLOBALS['robots'];\n\t\t$this->search_engines = $GLOBALS['search_engines'];\n\t\t$this->operating_systems = $GLOBALS['operating_systems'];\n\t\t$this->now = time();\n\t\t$this->getData();\n\n\t\t// instantiate the shared library\n\t\t$this->kestatslib = GeneralUtility::makeInstance('tx_kestats_lib');\n\t}", "title": "" }, { "docid": "fad8657dab9351484045130ed357ef1a", "score": "0.7213317", "text": "protected function init() { }", "title": "" }, { "docid": "d220692bb79e1857e867b0669e69102f", "score": "0.72123873", "text": "public function init()\n {\n parent::init();\n $this->api = new MCAPI(SilverChimpSettings::$api_key,SilverChimpSettings::$secure_connection);\n }", "title": "" }, { "docid": "1eeafc22d4ca706e2854a5bb09e37e80", "score": "0.7206643", "text": "public function init() {\n \n }", "title": "" }, { "docid": "e736dabca782ff019f27a27a59bd021f", "score": "0.718177", "text": "protected function _init()\n {\n \n }", "title": "" }, { "docid": "513000bb443edc52f7e3b0dbbbf81c7e", "score": "0.71524215", "text": "public function init()\n {\n $this->_setParameter('apikey', $this->_apiKey);\n $this->_setParameter('providerkey', $this->_providerKey);\n }", "title": "" }, { "docid": "05b135ab3f6aedf2651984ce62cbf3a2", "score": "0.7151159", "text": "public function init() { }", "title": "" }, { "docid": "0f2130ee9dc96a338f40b5c70c139684", "score": "0.7140392", "text": "protected function init() {\n }", "title": "" }, { "docid": "0f2130ee9dc96a338f40b5c70c139684", "score": "0.7140392", "text": "protected function init() {\n }", "title": "" }, { "docid": "42275c45f44402d9cdddd6ec8e9f0c62", "score": "0.7138472", "text": "public function set_up() {\n\n\t\tparent::set_up();\n\t\t$this->keys = LLMS_REST_API()->keys();\n\n\t}", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "0d4b575bc653cbf2120a34e4a75ff9a5", "score": "0.7135614", "text": "public function init() {\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7134983", "text": "protected function init() {}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.7127467", "text": "public function init(){}", "title": "" }, { "docid": "266d2c78edee12ed152d4806b9466384", "score": "0.71244305", "text": "public function __construct() {\n\t\t$this->user_details = array();\n\t\t$this->api = New Api;\n\t\t$this->client = new Client([\n\t\t\t// Base URI is used with relative requests\n\t\t\t'base_uri' => url('/'),\n // 'base_uri' => url('http://127.0.0.1/'),\n\t\t\t// You can set any number of default request options.\n\t\t\t'timeout' => 3000.0,\n\t\t]);\n\t\t$user_details = $this->check_login();\n\t\t$this->theme = Session::get(\"general\")->theme;\n\t}", "title": "" }, { "docid": "68be7cfeee6afb6f7f74d0cb06a1385b", "score": "0.71089774", "text": "public function init(){\n\t\t\t\n\t\t\t//Establish connection. \t\n\t\t\trequire_once( NN_PATH . 'lib/vendor/autoload.php' );\t\n\t\t\t\n\t\t\t$key = $this->credentials;\n\t\t\t\n\t\t\t\\Stripe\\Stripe::setApiKey( $key );\n\t\t\t\n\t\t\t//dump( __LINE__, __METHOD__, $this );\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7bd5b047805088e0e5af807609d1b222", "score": "0.7105853", "text": "public function init()\n {\n }", "title": "" }, { "docid": "481b16a070ee18f112d5c42301dd15af", "score": "0.71020806", "text": "protected function setUpAPI()\n {\n $config = $this->container->getParameter('crysoft_mpesa.config');\n\n $this->endPoint = $config['mpesa']['endpoint'];\n $this->callbackUrl = $config['mpesa']['callback_url'];\n $this->callbackMethod = $config['mpesa']['callback_method'];\n $this->paybillNumber = $config['mpesa']['paybill_number'];\n $this->passKey = $config['mpesa']['pass_key'];\n }", "title": "" }, { "docid": "2f8a28c1c81e7ea78c618e278a5eaf82", "score": "0.71018", "text": "protected function init() {\r\n }", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.7090541", "text": "public function initialize() {}", "title": "" }, { "docid": "1e670b1ea2e836b0db9d1554a202338d", "score": "0.70759475", "text": "public function _initialize() {}", "title": "" }, { "docid": "c9ed9175a2d1b92f81f499253ca3f109", "score": "0.70589435", "text": "public function __construct()\n {\n $this->api = new SpotifyWebAPI();\n $this->api->setAccessToken(Cache::get('spotifyAccessToken'));\n }", "title": "" }, { "docid": "b2b44f7975f4b1c723b52506e961642e", "score": "0.70543927", "text": "private static function Init()\n {\n\n self::Authorize_Request(self::$request->hash,self::$request->api_key);\n\n self::$CVV = (!empty(self::$request->cvv)) ? self::$request->cvv : null;\n\n self::$CARD = (!empty(self::$request->card)) ? self::$request->card : null;\n\n self::$EXPIRY = (!empty(self::$request->expiry)) ? self::$request->expiry : null;\n\n self::$EMAIL = (!empty(self::$request->email)) ? self::$request->email : null;\n\n self::$TYPE = (!empty(self::$request->type)) ? self::$request->type : null;\n\n self::$MOBILE = (!empty(self::$request->mobile_number)) ? self::$request->mobile_number : null;\n\n }", "title": "" }, { "docid": "589c9841b0c0faace9d0857dada63ddc", "score": "0.70491624", "text": "public function __construct() {\n $this->apikey = null;\n }", "title": "" }, { "docid": "9cae15f4ed3170137c3cf2e9783e3876", "score": "0.70306295", "text": "public function init()\n {\n }", "title": "" }, { "docid": "2754c3c6a18df053dba945c242b42db3", "score": "0.7027937", "text": "public function __construct()\n {\n $this->bergApi = new BergAPI();\n $this->rosskoApi = new RosskoAPI();\n $this->avtoPiterApi = new AvtoPiterAPI();\n }", "title": "" }, { "docid": "c067d24a11d7c0c0ff05eaae2019673d", "score": "0.7022295", "text": "protected function init(): void {}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.7021633", "text": "protected function init(){}", "title": "" }, { "docid": "32e4a9d24cc9b3e06fcca293682ce052", "score": "0.7001358", "text": "public function init() {\r\n\t\t$this->setImport(array(\r\n\t\t\t\t'api.models.*',\r\n\t\t\t\t'api.components.*',\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "9160c658ea6895c88ee85fd7c44d7d16", "score": "0.70009387", "text": "protected function _init_api() : void\n\t{\n\t\t$head = [\n\t\t\t'accept' => 'application/json',\n\t\t\t'user-agent' => 'OpenTHC/CRE/Adapter v420.23.052',\n\t\t\t'openthc-cre' => $this->_cfg['id'],\n\t\t\t'openthc-service-id' => $this->_cfg['service-id'],\n\t\t\t'openthc-contact-id' => $this->_cfg['contact'],\n\t\t\t'openthc-company-id' => $this->_cfg['company'],\n\t\t\t'openthc-license-id' => $this->_cfg['license']\n\t\t];\n\n\t\t$cfg = array(\n\t\t\t'base_uri' => $this->_api_base,\n\t\t\t'allow_redirects' => false,\n\t\t\t'cookies' => true,\n\t\t\t'headers' => $head,\n\t\t\t'http_errors' => false,\n\t\t);\n\n\t\t$this->_c = new \\GuzzleHttp\\Client($cfg);\n\n\t}", "title": "" }, { "docid": "513f212eaf83e2b7bcd431fc1b618834", "score": "0.69898015", "text": "function __construct()\n\t{\n\t\t$test_mode = Config::get('laravel-paymill::test_mode'); \n\t\n\t\t// if it's not in test mode\n\t\tif ( !$test_mode )\n\t\t{\n\t\t\t$api_key = Config::get('laravel-paymill::api_live');\t\t\t \n\t\t\t$this->apiKey = $api_key['key_private']; \n\t\t}\n\t\telse \n\t\t{\n\t\t\t$api_key = Config::get('laravel-paymill::api_test');\t\t\t\n\t\t\t$this->apiKey = $api_key['key_private']; \n\t\t}\n\n\t}", "title": "" }, { "docid": "c4c8daccad56b42130303859bb1fd315", "score": "0.69865555", "text": "public function _init()\n {\n }", "title": "" }, { "docid": "51c9204ea63b223213800171e3b3862d", "score": "0.6985666", "text": "public function __construct(){\n $this->_input();\n $this->_process_api();\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.698267", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.698267", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.698267", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.698267", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "12a0181167b65974a77626de052b21ac", "score": "0.69645596", "text": "public function init() {\n // nothing to do here\n }", "title": "" }, { "docid": "7611abc9b007f9a3a2d0fe08b44e635f", "score": "0.69623315", "text": "public function init() {\r\n\r\n\t\t$this->getDetails ();\r\n\t\t$this->getChapters ();\r\n\t\t$this->getPictures ();\r\n\t\t$this->getVideos ();\r\n\t}", "title": "" }, { "docid": "38952bcf21dcf7cdf1741add68bbf0a4", "score": "0.6961553", "text": "public function __construct()\n {\n // create http client instance\n $this->client = new Client(env('API_BASEURL', ''));\n }", "title": "" }, { "docid": "e12e59deceb2e7f6ab84569a1a99aa29", "score": "0.69596374", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->endpoint = 'api/v' . env('API_VERSION') . '/';\n $this->userEndpoint = 'api/v' . env('API_VERSION') . '/users/';\n $this->adminEmail = '[email protected]';\n $this->studentEmail = '[email protected]';\n }", "title": "" }, { "docid": "1fcb07f865a0ff80dbcb457d548259ec", "score": "0.69534063", "text": "public function __construct()\n {\n $this->oAuthSdk = static::_getOAuthSDK();\n }", "title": "" }, { "docid": "494af0f079b45c2cd2f7fd30714538be", "score": "0.6948787", "text": "public static function init() {\n }", "title": "" }, { "docid": "013b5d2b99bc319967b442888c668b8a", "score": "0.6945225", "text": "public function init()\n {\n \t\n }", "title": "" }, { "docid": "013b5d2b99bc319967b442888c668b8a", "score": "0.6945225", "text": "public function init()\n {\n \t\n }", "title": "" }, { "docid": "2962571a6d2682db3a74e4daf6947301", "score": "0.6944259", "text": "public function __construct($config) \n {\n $this->apiInit($config);\n\t}", "title": "" }, { "docid": "6d7e0eac47e4c2df89bc46404eca60b8", "score": "0.69435036", "text": "public function init ()\n {\n }", "title": "" }, { "docid": "6d7e0eac47e4c2df89bc46404eca60b8", "score": "0.69435036", "text": "public function init ()\n {\n }", "title": "" }, { "docid": "49283f9d55063e312f3d62d3cce8cbc5", "score": "0.69334865", "text": "public static function init() {\n\t\t}", "title": "" }, { "docid": "17000fbbc5b0bbb164f36bbb736dce29", "score": "0.6931827", "text": "public function init() {\n\n }", "title": "" }, { "docid": "17000fbbc5b0bbb164f36bbb736dce29", "score": "0.6931827", "text": "public function init() {\n\n }", "title": "" }, { "docid": "b331cb2396ccb191f061bdcb1eb6eab3", "score": "0.69309556", "text": "private static function setApi()\n {\n self::$api = new PardotApi(\n Environment::getEnv('PARDOT_EMAIL'),\n Environment::getEnv('PARDOT_PASSWORD'),\n Environment::getEnv('PARDOT_CONSUMER_KEY'),\n Environment::getEnv('PARDOT_CONSUMER_SECRET'),\n Environment::getEnv('PARDOT_BUSINESS_UNIT_ID'),\n Environment::getEnv('PARDOT_API_VERSION')\n );\n self::$api->getAuthenticator()->doAuthentication();\n }", "title": "" }, { "docid": "24b7d72967fbd7f200e1fa8976cd515b", "score": "0.6919683", "text": "protected function init(): void\n {\n }", "title": "" } ]
c70f7f936a92a78d94893d1e086ac250
Compare 2 timestamp by days (without caring about the hours)
[ { "docid": "25f2da090b36cda07ce0b8a129376233", "score": "0.64686906", "text": "function admin_comGeneric_compareDays( $time_inf, $time_sup )\n{\n\t$inf = mktime(0,0,0, date('n', $time_inf), date('j', $time_inf), date('Y', $time_inf));\n\t$sup = mktime(0,0,0, date('n', $time_sup), date('j', $time_sup), date('Y', $time_sup));\n\n\tif ($inf <= $sup) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" } ]
[ { "docid": "9e52bff5e6efbdb57b02ed41a8cd83ae", "score": "0.7212423", "text": "function compare_timestamps($a, $b)\n {\n return $a[0] - $b[0];\n }", "title": "" }, { "docid": "9a1382006499646367df2cf034b44d08", "score": "0.68563074", "text": "function dateCompare($a, $b) { \n\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\treturn 0;\n\t}\n\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n}", "title": "" }, { "docid": "9a1382006499646367df2cf034b44d08", "score": "0.68563074", "text": "function dateCompare($a, $b) { \n\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\treturn 0;\n\t}\n\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n}", "title": "" }, { "docid": "9c535237ad7db34c40da0487f1423be8", "score": "0.67037255", "text": "function date_compare($a, $b) {\n $t1 = strtotime($a['periode']);\n $t2 = strtotime($b['periode']);\n return $t1 - $t2;\n }", "title": "" }, { "docid": "2235609d7b3c65059dec5911c5daf3b1", "score": "0.66970974", "text": "function date_compare($a, $b)\n\t{\n\t $t1 = strtotime($a['startDate']);\n\t $t2 = strtotime($b['startDate']);\n\t return $t1 - $t2;\n\t}", "title": "" }, { "docid": "e812bacdb576f7cc6129488bc8d178c4", "score": "0.6571779", "text": "function date_compare($a, $b)\n {\n $t1 = strtotime($a['date']);\n $t2 = strtotime($b['date']);\n return $t2 - $t1;\n }", "title": "" }, { "docid": "6f66496ce049b9ac4f7b70c4a9f22f93", "score": "0.64682287", "text": "public function diff_days($a, $b){\r\n\t $gd_a = getdate( $a );\r\n\t $gd_b = getdate( $b );\r\n\t\r\n\t // Now recreate these timestamps, based upon noon on each day\r\n\t // The specific time doesn't matter but it must be the same each day\r\n\t $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\r\n\t $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\r\n\t\r\n\t // Subtract these two numbers and divide by the number of seconds in a\r\n\t // day. Round the result since crossing over a daylight savings time\r\n\t // barrier will cause this time to be off by an hour or two.\r\n\t return round( abs( $a_new - $b_new ) / 86400 );\r\n\t}", "title": "" }, { "docid": "c5e0c6fb0e51560ddc4fff4c4a29c7e5", "score": "0.62503016", "text": "static function cmp_row_date($a, $b) {\n $a = $a['time'];\n $b = $b['time'];\n if ($a === $b) {\n return 0;\n }\n return ($a < $b) ? 1 : -1;\n }", "title": "" }, { "docid": "c7af21439c541d187b7e2cba13c1e15d", "score": "0.6184881", "text": "function datecomp($a, $b)\n\t{\n\t $t1 = strtotime($a[0]);\n\t $t2 = strtotime($b[0]);\n\t return $t1 - $t2;\n\t}", "title": "" }, { "docid": "521833f035500559e3b2b16df82aabdb", "score": "0.61606264", "text": "function compara_fechas($fecha1, $fecha2) {\n if (preg_match(\"/[0-9]{1,2}\\/[0-9]{1,2}\\/([0-9][0-9]){1,2}/\", $fecha1))\n list($dia1, $mes1, $año1) = split(\"/\", $fecha1);\n\n if (preg_match(\"/[0-9]{1,2}-[0-9]{1,2}-([0-9][0-9]){1,2}/\", $fecha1))\n list($dia1, $mes1, $año1) = split(\"-\", $fecha1);\n if (preg_match(\"/[0-9]{1,2}\\/[0-9]{1,2}\\/([0-9][0-9]){1,2}/\", $fecha2))\n list($dia2, $mes2, $año2) = split(\"/\", $fecha2);\n\n if (preg_match(\"/[0-9]{1,2}-[0-9]{1,2}-([0-9][0-9]){1,2}/\", $fecha2))\n list($dia2, $mes2, $año2) = split(\"-\", $fecha2);\n $dif = mktime(0, 0, 0, $mes1, $dia1, $año1) - mktime(0, 0, 0, $mes2, $dia2, $año2);\n return ($dif);\n}", "title": "" }, { "docid": "56624118fe30e01490d1df835ebe6f73", "score": "0.61600685", "text": "function cmpintv($a, $b)\n{\n return difftime($a['starttime'], $b['starttime']);\n}", "title": "" }, { "docid": "b3b92340f1c1697e5d9cd1bf8ac9ef2b", "score": "0.61172575", "text": "function bankdatecomp($a, $b)\n\t{\n\t $t1 = strtotime($a[0]);\n\t $t2 = strtotime($b[0]);\n\t return $t2 - $t1;\n\t}", "title": "" }, { "docid": "75967c66b9d7a6a8100f8aba0f987323", "score": "0.6117115", "text": "function count_days( $a, $b )\n{\n // First we need to break these dates into their constituent parts:\n $gd_a = getdate( $a );\n $gd_b = getdate( $b );\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\n $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n return round( abs( $a_new - $b_new ) / 86400 );\n}", "title": "" }, { "docid": "bb2b2bd692d1ff715abf9bd8bfe3f9be", "score": "0.6066068", "text": "function __honeyPostCmp($a, $b) {\n if ($a['meta']['published_date'] == $b['meta']['published_date']) {\n return 0;\n }\n $timeA = strtotime($a['meta']['published_date']);\n $timeB = strtotime($b['meta']['published_date']);\n\n return ($timeA > $timeB) ? -1 : 1;\n}", "title": "" }, { "docid": "ee2a890d60c94649d9970712b98dd575", "score": "0.60156727", "text": "function val_dates($datetime1,$datetime2){\n $date1 = new DateTime();\n $newDate1 = $date1->createFromFormat('d/m/Y', $datetime1);\n $date2 = new DateTime();\n $newDate2 = $date2->createFromFormat('d/m/Y', $datetime2);\n var_dump($newDate1->diff($newDate2));\n\n if($date1 <= $date2){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5e8554a6174003fc97838dfc5feb8c1c", "score": "0.6012567", "text": "function compareTime( $a , $b ) \n{\n\tif ( $a->time == $b->time ):\n\t\treturn 0;\n\tendif;\n\t\n\treturn ( $a->time < $b->time ) ? -1 : 1;\n}", "title": "" }, { "docid": "98bac8bc46939efd6e68426abe4b3d8e", "score": "0.5976775", "text": "static function compareEntries($a , $b)\n {\n $aTime = $a['dateModified'];\n $bTime = $b['dateModified'];\n\n if ($aTime == $bTime) {\n return 0;\n }\n return ($aTime > $bTime) ? -1 : 1;\n }", "title": "" }, { "docid": "9d559bcbabdf3847448d78301d6edfb4", "score": "0.5962617", "text": "function date_difference($d1, $d2) {\n\t//check higher timestamp and switch if neccessary\n\tif ($d1 < $d2) {\n\t\t$temp = $d2;\n\t\t$d2 = $d1;\n\t\t$d1 = $temp;\n\t}\n\telse {\n\t\t$temp = $d1; //temp can be used for day count if required\n\t}\n\n\t$d1 = date_parse(date(\"Y-m-d H:i:s\",$d1));\n\t$d2 = date_parse(date(\"Y-m-d H:i:s\",$d2));\n\n\t//seconds\n\tif ($d1['second'] >= $d2['second']){\n\t\t$diff['second'] = $d1['second'] - $d2['second'];\n\t}\n\telse {\n\t\t$d1['minute']--;\n\t\t$diff['second'] = 60-$d2['second']+$d1['second'];\n\t}\n\n\t//minutes\n\tif ($d1['minute'] >= $d2['minute']){\n\t\t$diff['minute'] = $d1['minute'] - $d2['minute'];\n\t}\n\telse {\n\t\t$d1['hour']--;\n\t\t$diff['minute'] = 60-$d2['minute']+$d1['minute'];\n\t}\n\n\t//hours\n\tif ($d1['hour'] >= $d2['hour']){\n\t\t$diff['hour'] = $d1['hour'] - $d2['hour'];\n\t}\n\telse {\n\t\t$d1['day']--;\n\t\t$diff['hour'] = 24-$d2['hour']+$d1['hour'];\n\t}\n\t//days\n\tif ($d1['day'] >= $d2['day']){\n\t\t$diff['day'] = $d1['day'] - $d2['day'];\n\t}\n\telse {\n\t\t$d1['month']--;\n\t\t$diff['day'] = date(\"t\",$temp)-$d2['day']+$d1['day'];\n\t}\n\n\t//months\n\tif ($d1['month'] >= $d2['month']){\n\t\t$diff['month'] = $d1['month'] - $d2['month'];\n\t}\n\telse {\n\t\t$d1['year']--;\n\t\t$diff['month'] = 12-$d2['month']+$d1['month'];\n\t}\n\n\t//years\n\t$diff['year'] = $d1['year'] - $d2['year'];\n\treturn $diff;\n}", "title": "" }, { "docid": "ab9d8035189f4f7f540122e25f9e00b4", "score": "0.59477895", "text": "public static function date_diff($d1, $d2) {\n //check higher timestamp and switch if neccessary\n if ($d1 < $d2) {\n $temp = $d2;\n $d2 = $d1;\n $d1 = $temp;\n } else {\n $temp = $d1; //temp can be used for day count if required\n }\n $d1 = date_parse(date(\"Y-m-d H:i:s\", $d1));\n $d2 = date_parse(date(\"Y-m-d H:i:s\", $d2));\n //seconds\n if ($d1['second'] >= $d2['second']) {\n $diff['second'] = $d1['second'] - $d2['second'];\n } else {\n $d1['minute']--;\n $diff['second'] = 60 - $d2['second'] + $d1['second'];\n }\n //minutes\n if ($d1['minute'] >= $d2['minute']) {\n $diff['minute'] = $d1['minute'] - $d2['minute'];\n } else {\n $d1['hour']--;\n $diff['minute'] = 60 - $d2['minute'] + $d1['minute'];\n }\n //hours\n if ($d1['hour'] >= $d2['hour']) {\n $diff['hour'] = $d1['hour'] - $d2['hour'];\n } else {\n $d1['day']--;\n $diff['hour'] = 24 - $d2['hour'] + $d1['hour'];\n }\n //days\n if ($d1['day'] >= $d2['day']) {\n $diff['day'] = $d1['day'] - $d2['day'];\n } else {\n $d1['month']--;\n $diff['day'] = date(\"t\", $temp) - $d2['day'] + $d1['day'];\n }\n //months\n if ($d1['month'] >= $d2['month']) {\n $diff['month'] = $d1['month'] - $d2['month'];\n } else {\n $d1['year']--;\n $diff['month'] = 12 - $d2['month'] + $d1['month'];\n }\n //years\n $diff['year'] = $d1['year'] - $d2['year'];\n return $diff;\n }", "title": "" }, { "docid": "aec3e5d92271fb25e77aa10ad27170b8", "score": "0.59307885", "text": "static function compareExpiryDates($a, $b) {\n\t\tif (!isset($a->expiryDate) || !isset($b->expiryDate)) return 0;\n if ($a->expiryDate == $b->expiryDate) {\n\t\t\t// So the dates are equal\n return 0;\n }\n return ($a->expiryDate > $b->expiryDate) ? +1 : -1;\n }", "title": "" }, { "docid": "9e090220b956d7125347f243353564c4", "score": "0.5917747", "text": "public static function compareDates($dta1, $dta2) {\n # dta1 is before dta2 = -1\n # dta1 is after dta2 = 1\n\n if ($dta1['year'] == $dta2['year']) {\n if ($dta1['yday'] == $dta2['yday']) {\n $rtn = 0;\n } else if ($dta1['yday'] < $dta2['yday']) {\n $rtn = -1;\n } else {\n $rtn = 1;\n }\n } else if ($dta1['year'] < $dta2['year']) {\n $rtn = -1;\n } else {\n $rtn = 1;\n }\n return $rtn;\n }", "title": "" }, { "docid": "6a51c5a4b322bb3b234360a18296c446", "score": "0.5876579", "text": "function perfDistance($date1, $date2) {\n\t$daySecs = 86400;\n $diff = strtotime($date2) - strtotime($date1);\n $diffDays = (int) abs(round($diff / $daySecs));\n\t$output = '';\n\tif($diffDays === 1) {\n\t\t$output = 'Tomorrow!';\n\t} elseif($diffDays === 0) {\n\t\t$output = 'Today!';\n\t} elseif($diffDays > 1) {\n\t\t$output = $diffDays . ' days from now';\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "f59f6782b46978a80e7db01091c0d079", "score": "0.5842329", "text": "function is_same_day($gmt1, $gmt2) {\r\n\t\t\t$local1 = localtime($gmt1, 1);\r\n\t\t\t$local2 = localtime($gmt2, 1);\r\n\r\n\t\t\treturn ($local1['tm_mday'] == $local2['tm_mday']\r\n\t\t\t\tand $local1['tm_mon'] == $local2['tm_mon']\r\n\t\t\t\tand $local1['tm_year'] == $local2['tm_year']);\r\n\t\t}", "title": "" }, { "docid": "459112eb3b6973c6215e3b9fd88274d5", "score": "0.5837465", "text": "function date_compare($d1,$d2){\n $time1=strtotime($d1['Birthday']);\n $time2=strtotime($d2['Birthday']);\n return $time2-$time1; // or $time1-$time2 if u want ordered from higher to lower\n}", "title": "" }, { "docid": "00f01613f5a608e5aea8a8dcfee438d1", "score": "0.58236414", "text": "function days_between($time1, $time2) {\n\n\t$time = $time2 - $time1;\n\treturn ($time/86400);\n\n}", "title": "" }, { "docid": "2e7e9f0e595f9d4d0513ed8543b3f136", "score": "0.5817328", "text": "public function compareDates($datevalue) {\n\n\t// $strip = $createDate->format('Y-m-d');\n\n\t// $now = new DateTime();\n\t// $difference = $now->diff($createDate, true)->format(\"%a days\");\n\t//var_dump($difference);\n\t//$fieldDate = new DateObject($datevalue, date_default_timezone(), DATE_FORMAT_ISO);\n\t$timezone = drupal_get_user_timezone();\n\n\t$start = new \\DateTime('now', new \\DateTimezone('UTC'));\n\t$start->setTimezone(new \\DateTimeZone(DATETIME_STORAGE_TIMEZONE));\n\t$start = DrupalDateTime::createFromDateTime($start);\n\t$formatted1 = \\Drupal::service('date.formatter')->format($start->getTimestamp(), 'custom', 'Y-m-d at H:m:s');\n\t//echo $formatted1;\n \n\t$end = new \\DateTime($datevalue, new \\DateTimezone('UTC'));\n\t$end->setTimezone(new \\DateTimeZone(DATETIME_STORAGE_TIMEZONE));\n\t$end = DrupalDateTime::createFromDateTime($end);\n\t$formatted2 = \\Drupal::service('date.formatter')->format($end->getTimestamp(), 'custom', 'Y-m-d at H:m:s');\n\t//echo $formatted2;\n\t//echo $time2;\n\t//echo $time1;\n\t//echo $start;\n\t//echo $end;\n\n\t$difference = $start->diff($end, true);\n\t$hours = $difference->h + ($difference->days * 24); \n\n\tif ($formatted1 == $formatted2) {\n \t$ret = \"This event is happening today.\";\n\t}\n\tif($formatted1 < $formatted2) {\n\t\tif($hours < 24) {\n\t\t\t$ret = 'Days left to event start: '.$hours.' hours';\n\t\t}\n\t\telse {\n\t\t\t$ret = 'Days left to event start: '.$difference->format('%a');\n\t\t}\n\t}\n\tif($formatted1 > $formatted2) {\n\t\t$ret = 'This event has passed.';\n\t}\n\t\n\t//$difference = $start->diff($end, true)->format(\"%a days\");\n\treturn $ret;\n }", "title": "" }, { "docid": "4f7543b82784dde71c835690e2487ef6", "score": "0.5789595", "text": "function cmp($a, $b) {\n\t\tif ($a->dated == $b->dated) {\n\t\t\treturn ($a->startdate < $b->startdate) ? -1 : 1;\n\t\t}\n\t\telse {\n\t\t\treturn ($a->dated > $b->dated) ? -1 : 1;\n\t\t}\n\t}", "title": "" }, { "docid": "b2be28a3a9ad8c92c696a8bdc90154cf", "score": "0.5776034", "text": "function event_cmp($a, $b) {\n $date_a = get_field('start_on', $a->ID);\n $date_b = get_field('start_on', $b->ID);\n return strcmp($date_a, $date_b);\n}", "title": "" }, { "docid": "5c07ce04982eb5bdc5a2279206d1ae0b", "score": "0.5774234", "text": "function sortByDate($a, $b)\r\n\t{\r\n\t\t$da = $timestamp = strtotime($a['date']);\r\n\t\t$db = $timestamp = strtotime($b['date']);\r\n\t\treturn $da - $db;\r\n\t}", "title": "" }, { "docid": "732038a6503226c349c258beea5f7525", "score": "0.5761724", "text": "function mm_cmp_mission_by_posted_date($a, $b) {\n\tif($a->time_created == $b->time_created) {\n\t\treturn 0;\n\t}\n\treturn ($a->time_created < $b->time_created) ? 1 : -1;\n}", "title": "" }, { "docid": "fe4175ec8d2d27cd346b6a1707bd9bc9", "score": "0.5743846", "text": "public function diff ($datetime2, $absolute = false) {}", "title": "" }, { "docid": "8431aeafa23c8b8b266d2d6d77b402a3", "score": "0.5743644", "text": "protected static function matchWorkingDays($a, $b)\n\t{\n\t\treturn ($a->id_employee == $b->id_employee\n\t\t\t&& $a->day == $b->day\n\t\t\t&& $a->fromts == $b->fromts\n\t\t\t&& $a->endts == $b->endts\n\t\t\t&& $a->ts == $b->ts\n\t\t\t&& $a->closed == $b->closed);\n\t}", "title": "" }, { "docid": "7678c7b7189b8376be20483e99f44e3b", "score": "0.5725034", "text": "function dateDiffInDays($dateOfPerson1, $dateOfPerson2)\n{\n // Calculating the difference in timestamps\n $diff = strtotime($dateOfPerson2) - strtotime($dateOfPerson1);\n\n // 1 day = 24 hours\n // 24 * 60 * 60 = 86400 seconds\n return abs(round($diff / 86400));\n}", "title": "" }, { "docid": "0e0cf5016d2a49b09b2f2135e37875ae", "score": "0.5724397", "text": "function sortFunction( $a, $b ) {\n return strtotime($a[\"start_date__only\"]) - strtotime($b[\"start_date__only\"]);\n }", "title": "" }, { "docid": "20a849316461abda5ef235e4dc122356", "score": "0.5699222", "text": "function time_compare($a_hour,$a_minute,$a_second,$b_hour,$b_minute,$b_second)\n\t\t{\n\t\t\t// before 1970/1/1, which is the earliest date allowed on windows\n\t\t\t$a_time = mktime((int)$a_hour,(int)$a_minute,(int)$a_second,1,2,1970);\n\t\t\t$b_time = mktime((int)$b_hour,(int)$b_minute,(int)$b_second,1,2,1970);\n\t\t\tif($a_time == $b_time)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telseif($a_time > $b_time)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telseif($a_time < $b_time)\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3262e4b7ca7bb68622e5418891cc1dac", "score": "0.5677391", "text": "public function timeBetweenTwoEntries(){\n $pdo = new PDO_MYSQL();\n $timeOld = $pdo -> query(\"SELECT * FROM entrance_logs WHERE cID = :cID AND success = 1 AND action != 2 AND lID < :lID ORDER BY lID DESC LIMIT 1\",\n [\":cID\" => $this -> cID, \":lID\" => $this -> lID]) -> timestamp;\n return strtotime($this -> timestamp) - strtotime($timeOld);\n }", "title": "" }, { "docid": "6560d052520552bd344d4b5673fa0999", "score": "0.5655485", "text": "function compareByUseDate($a, $b)\n{\n if ($a[3] == $b[3]) {\n return 0;\n }\n return ($a[3] < $b[3]) ? -1 : 1;\n}", "title": "" }, { "docid": "fe03eee42dac4b6f7b8348ce7324a1fe", "score": "0.5644214", "text": "function dateDiff ($d1, $d2) {\n return round((strtotime($d1) - strtotime($d2))/86400);\n\n}", "title": "" }, { "docid": "1f06b70252533a3939b273ecc1bbfa00", "score": "0.56139356", "text": "function mycmp($a,$b) {\n if ($a['change']['ts']==$b['change']['ts']) {\n return 0;\n }\n return ($a['change']['ts'] < $b['change']['ts']) ? -1 : 1;\n}", "title": "" }, { "docid": "339c757a007e94dc3e884fe962b6c2f7", "score": "0.56139183", "text": "function CompareEventTime($val1, $val2) {\n $className = \"clsEventresult_users\";\n $time1 = ($val1 instanceof $className) && is_array($val1->_Time) ? $val1->_Time[ccsHour] * 3600 + $val1->_Time[ccsMinute] * 60 + $val1->_Time[ccsSecond] : 0;\n $time2 = ($val2 instanceof $className) && is_array($val2->_Time) ? $val2->_Time[ccsHour] * 3600 + $val2->_Time[ccsMinute] * 60 + $val2->_Time[ccsSecond] : 0;\n if ($time1 == $time2)\n return 0;\n return $time1 > $time2 ? 1 : -1;\n }", "title": "" }, { "docid": "99af0b9019fd422b02fcf1b84b7b9a78", "score": "0.56043315", "text": "public function timeComperison(string $t1, string $t2): bool {\n if (strtotime(date($t1)) < strtotime($t2)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "509bcaec22304369f8d74c8c4876f9ab", "score": "0.56019026", "text": "function sortFunction( $a, $b ) {\n\t\t\treturn strtotime($a[\"start_date__only\"]) - strtotime($b[\"start_date__only\"]);\n\t\t}", "title": "" }, { "docid": "382e39ce44e68424312788ca3a2a9479", "score": "0.5597551", "text": "static public function diffOfDates($date1, $date2) {\r\n\t\tif (function_exists('date_diff')) // needs PHP >5.3.0\r\n\t\t\treturn (int)date_diff(date_create($date1), date_create($date2))->format('%a');\r\n\r\n\t\t// TODO: Problem because of summer/winter-time\r\n\t\treturn floor(abs(strtotime($date1) - strtotime($date2)) / (3600 * 24));\r\n\t}", "title": "" }, { "docid": "a7f2ffe60038934143e23f69e26cdf92", "score": "0.55908144", "text": "function dateDifference($date_1 , $date_2 , $differenceFormat = '%a' )\n{\n // https://www.php.net/manual/en/function.date-diff.php\n $datetime1 = date_create($date_1);\n $datetime2 = date_create($date_2);\n $interval = date_diff($datetime1, $datetime2);\n return $interval->format($differenceFormat);\n}", "title": "" }, { "docid": "a7f2ffe60038934143e23f69e26cdf92", "score": "0.55908144", "text": "function dateDifference($date_1 , $date_2 , $differenceFormat = '%a' )\n{\n // https://www.php.net/manual/en/function.date-diff.php\n $datetime1 = date_create($date_1);\n $datetime2 = date_create($date_2);\n $interval = date_diff($datetime1, $datetime2);\n return $interval->format($differenceFormat);\n}", "title": "" }, { "docid": "a74eb8fd88ab012bdde4c3483a3c7611", "score": "0.5570645", "text": "function dateDiff ($d1, $d2) {\n\t\treturn round(abs(strtotime($d1) - strtotime($d2))/86400);\n}", "title": "" }, { "docid": "28e3c3a6e9dde6aad941a4756ef2d8f1", "score": "0.5555521", "text": "function datediff($start,$end){\r\n $first_date = strtotime($start);\r\n $second_date = strtotime($end);\r\n $offset = $second_date-$first_date;\r\n return floor($offset/60/60/24);\r\n\r\n\r\n}", "title": "" }, { "docid": "6aa2076a9d335a81131237ab3915b4e1", "score": "0.5553407", "text": "function dateDiff($time1, $time2, $interval) \n\t{\n\t\tif (!is_int($time1)) {\n\t\t $time1 = strtotime($time1);\n\t\t}\n\t\tif (!is_int($time2)) {\n\t\t $time2 = strtotime($time2);\n\t\t}\n\t\t\n\t\t// If time1 is bigger than time2\n\t\t// Then swap time1 and time2\n\t\tif ($time1 > $time2) {\n\t\t $ttime = $time1;\n\t\t $time1 = $time2;\n\t\t $time2 = $ttime;\n\t\t}\n\t\t\n\t\t// Set up intervals and diffs arrays\n\t\t$intervals = array('year','month','day','hour','minute','second');\n\t\tif (!in_array($interval, $intervals)) {\n\t\t return false;\n\t\t}\n\t\t\n\t\t$diff = 0;\n\t\t// Create temp time from time1 and interval\n\t\t$ttime = strtotime(\"+1 \" . $interval, $time1);\n\t\t// Loop until temp time is smaller than time2\n\t\twhile ($time2 >= $ttime) {\n\t\t $time1 = $ttime;\n\t\t $diff++;\n\t\t // Create new temp time from time1 and interval\n\t\t $ttime = strtotime(\"+1 \" . $interval, $time1);\n\t\t}\n\t\t\n\t\treturn $diff;\n \t}", "title": "" }, { "docid": "0e18f0c0feac03f198e491498cbbd6ef", "score": "0.5548013", "text": "function dateDiff($time1, $time2, $precision = 1) {\n\t// If not numeric then convert texts to unix timestamps\n\tif (!is_int($time1)) {\n\t\t$time1 = strtotime($time1);\n\t}\n\tif (!is_int($time2)) {\n\t\t$time2 = strtotime($time2);\n\t}\n\t// If time1 is bigger than time2\n\t// Then swap time1 and time2\n\tif ($time1 > $time2) {\n\t\t$ttime = $time1;\n\t\t$time1 = $time2;\n\t\t$time2 = $ttime;\n\t}\n\t// Set up intervals and diffs arrays\n\t$intervals = array(\n\t\t'year',\n\t\t'month',\n\t\t'day',\n\t\t'hour',\n\t\t'min',\n\t\t'sec'\n\t);\n\t$diffs = array();\n\t// Loop thru all intervals\n\tforeach ($intervals as $interval) {\n\t\t// Create temp time from time1 and interval\n\t\t$ttime = strtotime('+1 ' . $interval, $time1);\n\t\t// Set initial values\n\t\t$add = 1;\n\t\t$looped = 0;\n\t\t// Loop until temp time is smaller than time2\n\t\twhile ($time2 >= $ttime) {\n\t\t\t// Create new temp time from time1 and interval\n\t\t\t$add++;\n\t\t\t$ttime = strtotime(\"+\" . $add . \" \" . $interval, $time1);\n\t\t\t$looped++;\n\t\t}\n\t\t$time1 = strtotime(\"+\" . $looped . \" \" . $interval, $time1);\n\t\t$diffs[$interval] = $looped;\n\t}\n\t$count = 0;\n\t$times = array();\n\t// Loop through all diffs\n\tforeach ($diffs as $interval => $value) {\n\t\t// Break if we have needed precission\n\t\tif ($count >= $precision) {\n\t\t\tbreak;\n\t\t}\n\t\t// Add value and interval \n\t\t// if value is bigger than 0\n\t\tif ($value > 0) {\n\t\t\t// Add s if value is not 1\n\t\t\tif ($value != 1) {\n\t\t\t\t$interval .= \"s\";\n\t\t\t}\n\t\t\t// Add value and interval to times array\n\t\t\t$times[] = $value . \" \" . $interval;\n\t\t\t$count++;\n\t\t}\n\t}\n\tif ($times == null) {\n\t\t// Return base string\n\t\treturn \"just now\";\n\t} else {\n\t\t// Return string with times\n\t\t$time = implode(\", \", $times) . \" ago\";\n\t\treturn $time;\n\t}\n}", "title": "" }, { "docid": "cfc58efa9aa3ce67ee80efd8d429c441", "score": "0.55389166", "text": "function getDaysBetween($s_date1, $s_date2)\r\n{\r\n\t$date1 = new Date($s_date1);\r\n\t\r\n\t$date2 = new Date($s_date2);\r\n\t\r\n\t$ts1 = $date1->getTimestamp();\r\n\t$ts2 = $date2->getTimestamp();\r\n\t\r\n\tif($ts1 > $ts2)\r\n\t{\t\t\r\n\t\ttrigger_error(\"For the period statistic, Day 1 is AFTER Day 2. It's impossible, sorry.\", E_USER_ERROR);\r\n\t}\r\n\t\r\n\t$return = array();\r\n\twhile($ts1 <= $ts2)\r\n\t{\r\n\t\t$return[] = getDateFromTimestamp($ts1);\r\n\t\t\r\n\t\t$ts1 += 86400;\r\n\t}\r\n\treturn $return;\r\n}", "title": "" }, { "docid": "b09822d7edf069804a35b0166b5ce29a", "score": "0.5532302", "text": "static function dateDiff($time1, $time2, $precision = 6) {\n // If not numeric then convert texts to unix timestamps\n if (!is_int($time1)) {\n $time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n \n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n \n // Set up intervals and diffs arrays\n $intervals = array('year','month','day','hour','minute','second');\n $diffs = array();\n \n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Set default diff to 0\n $diffs[$interval] = 0;\n // Create temp time from time1 and interval\n $ttime = strtotime(\"+1 \" . $interval, $time1);\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n\t$time1 = $ttime;\n\t$diffs[$interval]++;\n\t// Create new temp time from time1 and interval\n\t$ttime = strtotime(\"+1 \" . $interval, $time1);\n }\n }\n \n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n\tbreak;\n }\n // Add value and interval \n // if value is bigger than 0\n if ($value > 0) {\n\t// Add s if value is not 1\n\tif ($value != 1) {\n\t $interval .= \"s\";\n\t}\n\t// Add value and interval to times array\n\t$times[$interval] = $value;\n\t$count++;\n }\n }\n return $times;\n // Return string with times\n return implode(\", \", $times);\n }", "title": "" }, { "docid": "0373f5699aaa5d37ac4a1d82900b8cdc", "score": "0.5520147", "text": "function DiffBetweenDates($fechaI, $fechaF) {\r\n if ($fechaF == \"NOW\")\r\n $fechaF = date(USERDATE_READ);\r\n if ($fechaI == \"NOW\")\r\n $fechaI = date(USERDATE_READ);\r\n $seg_dif = strtotime(STRdate_format($fechaF, USERDATE_READ, \"Y-m-d H:i\")) - strtotime(STRdate_format($fechaI, USERDATE_READ, \"Y-m-d H:i\"));\r\n return round($seg_dif / 60, 0, PHP_ROUND_HALF_DOWN);\r\n}", "title": "" }, { "docid": "5cd31d74467bc0ca548bc3680c439fdc", "score": "0.55188465", "text": "protected function sortStartDateTime($a,$b)\n {\n if ($a['DTSTART'] == $b['DTSTART'])\n return 0;\n\n return ($a['DTSTART'] > $b['DTSTART']) ? +1 : -1;\n }", "title": "" }, { "docid": "b59f6d0e7762de7cb7cb351a205e6ac1", "score": "0.5504439", "text": "public function fecha_diff_function($data1,$data2)//Obtener la diferencia en dias entre una fecha y otra\r\n {\r\n $segundos = strtotime($data2)-strtotime($data1);\r\n $dias = intval($segundos/86400);\r\n //$segundos -= $dias*86400;\r\n //$horas = intval($segundos/3600);\r\n //$segundos -= $horas*3600;\r\n //$minutos = intval($segundos/60);\r\n //$segundos -= $minutos*60;\r\n //$sl_retorna = $dias;\r\n //return $sl_retorna;\r\n return $dias;\r\n }", "title": "" }, { "docid": "73e333a13d9c7ca5505fd1c2c945491d", "score": "0.5490708", "text": "public function dateDiff($time1, $time2, $precision = 6) {\n\t\t// If not numeric then convert texts to unix timestamps\n\t\tif (!is_int($time1)) {\n\t\t\t$time1 = strtotime($time1);\n\t\t}\n\t\tif (!is_int($time2)) {\n\t\t\t$time2 = strtotime($time2);\n\t\t}\n\t\n\t\t// If time1 is bigger than time2\n\t\t// Then swap time1 and time2\n\t\tif ($time1 > $time2) {\n\t\t\t$ttime = $time1;\n\t\t\t$time1 = $time2;\n\t\t\t$time2 = $ttime;\n\t\t}\n\t\n\t\t// Set up intervals and diffs arrays\n\t\t$intervals = array('year','month','day','hour','minute','second');\n\t\t$diffs = array();\n\t\n\t\t// Loop thru all intervals\n\t\tforeach ($intervals as $interval) {\n\t\t\t// Create temp time from time1 and interval\n\t\t\t$ttime = strtotime('+1 ' . $interval, $time1);\n\t\t\t// Set initial values\n\t\t\t$add = 1;\n\t\t\t$looped = 0;\n\t\t\t// Loop until temp time is smaller than time2\n\t\t\twhile ($time2 >= $ttime) {\n\t\t\t\t// Create new temp time from time1 and interval\n\t\t\t\t$add++;\n\t\t\t\t$ttime = strtotime(\"+\" . $add . \" \" . $interval, $time1);\n\t\t\t\t$looped++;\n\t\t\t}\n\t\n\t\t\t$time1 = strtotime(\"+\" . $looped . \" \" . $interval, $time1);\n\t\t\t$diffs[$interval] = $looped;\n\t\t}\n\t\n\t\t$count = 0;\n\t\t$times = array();\n\t\t// Loop thru all diffs\n\t\tforeach ($diffs as $interval => $value) {\n\t\t\t// Break if we have needed precission\n\t\t\tif ($count >= $precision) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Add value and interval\n\t\t\t// if value is bigger than 0\n\t\t\tif ($value > 0) {\n\t\t\t\t// Add s if value is not 1\n\t\t\t\tif ($value != 1) {\n\t\t\t\t\t$interval .= \"s\";\n\t\t\t\t}\n\t\t\t\t// Add value and interval to times array\n\t\t\t\t$times[] = $value . \" \" . $interval;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\n\t\t// Return string with times\n\t\treturn implode(\", \", $times);\n\t}", "title": "" }, { "docid": "c7508d6bec5a3ee6cdc32d34a51c1179", "score": "0.5488176", "text": "private function sortByDateDesc($a, $b) \n\t{ \n\t\tif ($a['info']['mtime'] == $b['info']['mtime']) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn ($a['info']['mtime'] > $b['info']['mtime']) ? -1 : 1;\n\t}", "title": "" }, { "docid": "71a7ae77494fa39a7125ad20167505cc", "score": "0.54696316", "text": "function datechk($date1, $date2)\r\n{\r\n $dec = strtotime($date1) - strtotime($date2);\r\n $diff = abs($dec);\r\n $years = floor($diff / (365*60*60*24));\r\n $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\r\n $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));\r\n if($dec < 0)\r\n $dec = '-';\r\n else \r\n $dec = '+';\r\n $diffarr = array('year'=>$years, 'month'=>$months, 'day'=>$days, 'flag'=>$dec);\r\n //printf(\"%d years, %d months, %d days\\n\", $years, $months, $days);\r\n return $diffarr;\r\n}", "title": "" }, { "docid": "7ff9df3c9f5ba59c7b48d1248876b8a6", "score": "0.5457751", "text": "protected function isSameTime(DrupalDateTime $startDate, DrupalDateTime $endDate) {\n return $startDate->getTimestamp() === $endDate->getTimestamp();\n }", "title": "" }, { "docid": "9dd15a3bfc80000581c81bdaa54542a6", "score": "0.54450494", "text": "function sort_posts_by_unix_time($b, $a) {\n if($a->unix_time == $b->unix_time){ return 0 ; }\n return ($a->unix_time < $b->unix_time) ? -1 : 1;\n}", "title": "" }, { "docid": "8ff7680ccc640d9f29670f042fd65bf3", "score": "0.5438515", "text": "function compareEventTimes($evtA, $evtB) {\r\n\t\tif ( ($evtA->myEndTime) == ($evtB->myEndTime) ) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn ( ($evtA->myEndTime) < ($evtB->myEndTime) ) ? -1 : 1;\r\n\t}", "title": "" }, { "docid": "d796646185c5dc10170644bd57f3aec8", "score": "0.5434593", "text": "function mm_cmp_by_updated($a, $b) {\n\tif($a->time_updated == $b->time_updated) {\n\t\treturn 0;\n\t}\n\treturn ($a->time_updated > $b->time_updated) ? -1 : 1;\n}", "title": "" }, { "docid": "b1052c0a29b71d02c8cd206cf4778669", "score": "0.54083884", "text": "function CalDate($time1, $time2)\n{\n $time1 = strtotime($time1);\n $time2 = strtotime($time2);\n\n //$diffdate=$time1-$time2\n $distanceInSeconds = round(abs($time2 - $time1)); //จะได้เป็นวินาที\n $distanceInMinutes = round($distanceInSeconds / 60); //แปลงจากวินาทีเป็นนาที\n\n $days = floor(abs($distanceInMinutes / 1440));\n\n return $days;\n}", "title": "" }, { "docid": "557f01142a7b8659f6f3403d56a2cf7c", "score": "0.54078084", "text": "function date_sort($a, $b) {\n return strtotime($b['begin']) - strtotime($a['begin']);\n }", "title": "" }, { "docid": "4de3ab4bfe102550ce17696a5fe58508", "score": "0.5403877", "text": "function compare_dates($date1, $date2) {\n $blocks = array(\n array('name' => 'year',\t\t'amount' => 60*60*24*365),\n array('name' => 'month',\t'amount' => 60*60*24*30\t),\n array('name' => 'week',\t\t'amount' => 60*60*24*7\t),\n array('name' => 'day',\t\t'amount' => 60*60*24\t\t),\n array('name' => 'hour',\t\t'amount' => 60*60\t\t\t),\n array('name' => 'minute',\t'amount' => 60\t\t\t\t),\n array('name' => 'second',\t'amount' => 1\t\t\t\t)\n );\n\n $diff = abs($date2-$date1);\n\n $levels = 2;\n $current_level = 1;\n $result = array();\n\n foreach($blocks as $block) {\n if ($current_level++ > $levels && !empty($result)) {\n break;\n }\n if ($diff / $block['amount'] >= 1) {\n $amount = floor($diff / $block['amount']);\n $plural = $amount > 1 ? 's' : '';\n $result[] = $amount . ' ' . $block['name'] . $plural;\n $diff -= $amount * $block['amount'];\n\n if($block['name'] == 'year' && $amount >= 3) { break; }\t//\tif 3 years old, stop counting months\n }\n }\n return ($date2 > $date1 ? '' : '-') . implode(' ', $result) . ' old';\n}", "title": "" }, { "docid": "f2c9d47d21e167c250b20193f77862ba", "score": "0.5381917", "text": "protected function compare($value1, $value2) {\n\t\tif ($value1->time === $value2->time){\n return 0;\n }\n\t\treturn $value1->time > $value2->time ? 1 : -1;\n\t}", "title": "" }, { "docid": "ae68ec73865f46a42f6fd191bf16c862", "score": "0.53796005", "text": "function dateTimeDiff($datefrom, $dateto,$interval='', $using_timestamps = false) {\n /*\n $interval can be:\n yyyy - Number of full years\n q - Number of full quarters\n m - Number of full months\n y - Difference between day numbers\n (eg 1st Jan 2004 is \"1\", the first day. 2nd Feb 2003 is \"33\". The datediff is \"-32\".)\n d - Number of full days\n w - Number of full weekdays\n ww - Number of full weeks\n h - Number of full hours\n n - Number of full minutes\n s - Number of full seconds (default)\n */\n \n if (!$using_timestamps) {\n $datefrom = strtotime($datefrom.\" GMT\", 0);\n $dateto = strtotime($dateto.\" GMT\", 0);\n }\n // print $dateto; print \"<br>\";\n //print $datefrom;\n\t$difference = $dateto - $datefrom; // Difference in seconds\n \n switch($interval) {\n \n case 'yyyy': // Number of full years\n\n $years_difference = floor($difference / 31536000);\n if (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom), date(\"j\", $datefrom), date(\"Y\", $datefrom)+$years_difference) > $dateto) {\n $years_difference--;\n }\n if (mktime(date(\"H\", $dateto), date(\"i\", $dateto), date(\"s\", $dateto), date(\"n\", $dateto), date(\"j\", $dateto), date(\"Y\", $dateto)-($years_difference+1)) > $datefrom) {\n $years_difference++;\n }\n $datediff = $years_difference;\n break;\n\n case \"q\": // Number of full quarters\n\n $quarters_difference = floor($difference / 8035200);\n while (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom)+($quarters_difference*3), date(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto) {\n $months_difference++;\n }\n $quarters_difference--;\n $datediff = $quarters_difference;\n break;\n\n case \"m\": // Number of full months\n\n $months_difference = floor($difference / 2678400);\n while (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom)+($months_difference), date(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto) {\n $months_difference++;\n }\n $months_difference--;\n $datediff = $months_difference;\n break;\n\n case 'y': // Difference between day numbers\n\n $datediff = date(\"z\", $dateto) - date(\"z\", $datefrom);\n break;\n\n case \"d\": // Number of full days\n\n $datediff = floor($difference / 86400);\n break;\n\n case \"w\": // Number of full weekdays\n\n $days_difference = floor($difference / 86400);\n $weeks_difference = floor($days_difference / 7); // Complete weeks\n $first_day = date(\"w\", $datefrom);\n $days_remainder = floor($days_difference % 7);\n $odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder?\n if ($odd_days > 7) { // Sunday\n $days_remainder--;\n }\n if ($odd_days > 6) { // Saturday\n $days_remainder--;\n }\n $datediff = ($weeks_difference * 5) + $days_remainder;\n break;\n\n case \"ww\": // Number of full weeks\n\n $datediff = floor($difference / 604800);\n break;\n\n case \"h\": // Number of full hours\n\n $datediff = floor($difference / 3600);\n break;\n\n case \"n\": // Number of full minutes\n\n $datediff = floor($difference / 60);\n break;\n\n default: // Number of full seconds (default)\n\n $datediff = $difference;\n break;\n } \n//print $datediff;\n return $datediff;\n\n}", "title": "" }, { "docid": "d12cde1eb4a874b5efdd4b44c4c23083", "score": "0.5375684", "text": "function dateDiff($date1, $date2)\n{\n if (version_compare(PHP_VERSION, '5.3.0') >= 0)\n {\n return $date1->diff($date2);\n }\n\n $diff = new stdClass();\n\n //Make sure $date1 is ealier\n $diff->invert = $date2 < $date1;\n if ($diff->invert)\n {\n list($date1, $date2) = array($date2, $date1);\n }\n\n //Calculate R values\n $R = ($date1 <= $date2 ? '+' : '-');\n $r = ($date1 <= $date2 ? '' : '-');\n\n //Calculate total days\n $diff->days = round(abs($date1->format('U') - $date2->format('U'))/86400);\n\n //A leap year work around - consistent with DateInterval\n $leap_year = $date1->format('m-d') == '02-29';\n if ($leap_year)\n {\n $date1->modify('-1 day');\n }\n\n //Years, months, days, hours\n $periods = array('years'=>-1, 'months'=>-1, 'days'=>-1, 'hours'=>-1);\n\n foreach ($periods as $period => &$i)\n {\n if ($period == 'days' && $leap_year)\n {\n $date1->modify('+1 day');\n }\n\n while ($date1 <= $date2 )\n {\n $date1->modify('+1 '.$period);\n $i++;\n }\n\n //Reset date and record increments\n $date1->modify('-1 '.$period);\n }\n\n list($diff->y, $diff->m, $diff->d, $diff->h) = array_values($periods);\n\n //Minutes, seconds\n $diff->s = round(abs($date1->format('U') - $date2->format('U')));\n $diff->i = floor($diff->s/60);\n $diff->s = $diff->s - $diff->i*60;\n\n return $diff;\n}", "title": "" }, { "docid": "afe1dbc95a0a3adf61f597c6a1276938", "score": "0.5371891", "text": "function duration2($datetime1, $datetime2)\r\n{ \r\n $stayduration = date_diff($datetime1,$datetime2);\r\n return $stayduration;\r\n}", "title": "" }, { "docid": "25a03fbe753b7b322d3a981231a95b31", "score": "0.5370538", "text": "function diff_dates($date1, $date2, $details=false)\n{\n\t$date1 = strtotime($date1);\n\t$date2 = strtotime($date2);\n\t//$dateDiff = $date1 > $date2 ? $date1 - $date2 : $date2 - $date1;\n\t$dateDiff = $date1 - $date2;\n\t$fullDays = floor($dateDiff/(60*60*24));\n\t//$dateDiff = $date1 > $date2 ? $date1 - $date2 : $date2 - $date1;\n\t$dateDiff = $date1 - $date2;\n\t$fullDays = floor($dateDiff/(60*60*24));\n\tif ($details)// still don't return it\n\t{\n\t\t$fullHours = floor(($dateDiff-($fullDays*60*60*24))/(60*60));\n\t\t$fullMinutes = floor(($dateDiff-($fullDays*60*60*24)-($fullHours*60*60))/60);\n\t}\n\treturn $fullDays;\n}", "title": "" }, { "docid": "19adabcd5ca65efbcc4cd0dc03e84e07", "score": "0.53693295", "text": "function get_date_diff( $time1, $time2, $precision = 2 ) \r\n {\r\n if( !is_int( $time1 ) ) {\r\n $time1 = strtotime( $time1 );\r\n }\r\n if( !is_int( $time2 ) ) {\r\n $time2 = strtotime( $time2 );\r\n }\r\n \r\n // If time1 > time2 then swap the 2 values\r\n if( $time1 > $time2 ) {\r\n list( $time1, $time2 ) = array( $time2, $time1 );\r\n }\r\n \r\n // Set up intervals and diffs arrays\r\n $intervals = array( 'year', 'month', 'day', 'hour', 'minute', 'second' );\r\n $diffs = array();\r\n \r\n foreach( $intervals as $interval ) {\r\n // Create temp time from time1 and interval\r\n $ttime = strtotime( '+1 ' . $interval, $time1 );\r\n // Set initial values\r\n $add = 1;\r\n $looped = 0;\r\n // Loop until temp time is smaller than time2\r\n while ( $time2 >= $ttime ) {\r\n // Create new temp time from time1 and interval\r\n $add++;\r\n $ttime = strtotime( \"+\" . $add . \" \" . $interval, $time1 );\r\n $looped++;\r\n }\r\n \r\n $time1 = strtotime( \"+\" . $looped . \" \" . $interval, $time1 );\r\n $diffs[ $interval ] = $looped;\r\n }\r\n \r\n $count = 0;\r\n $times = array();\r\n foreach( $diffs as $interval => $value ) {\r\n // Break if we have needed precission\r\n if( $count >= $precision ) {\r\n break;\r\n }\r\n // Add value and interval if value is bigger than 0\r\n if( $value > 0 ) {\r\n if( $value != 1 ){\r\n $interval .= \"s\";\r\n }\r\n // Add value and interval to times array\r\n $times[] = $value . \" \" . $interval;\r\n $count++;\r\n }\r\n }\r\n \r\n // Return string with times\r\n return implode( \", \", $times );\r\n }", "title": "" }, { "docid": "137abe1710be4258effa6091e28d9eef", "score": "0.5367095", "text": "function dateDiffInDays($date1, $date2) \n{\n $diff = strtotime($date2) - strtotime($date1); \n \n // 1 day = 24 hours \n // 24 * 60 * 60 = 86400 seconds \n return abs(round($diff / 86400)); \n}", "title": "" }, { "docid": "e042f11445e4a1f6de2afa733c96b67b", "score": "0.53669906", "text": "public function seeDateMatches($d1, $d2) {\n \\PHPUnit_Framework_Assert::assertTrue($this->_ParseDate($d1)->eq($this->_ParseDate($d2)));\n }", "title": "" }, { "docid": "9fd82449bce25abc772220ed6bb0d187", "score": "0.5359192", "text": "function dateDiff($date2) \n\t{\n $date1= date(\"Y-m-d\");\n\t $date1_ts = strtotime($date1);\n\t $date2_ts = strtotime($date2);\n\t $diff = $date2_ts - $date1_ts;\n\t return round($diff / (60*60*24));\n\t}", "title": "" }, { "docid": "a1d2740c598928cfe36018e5fe4890d4", "score": "0.5355459", "text": "protected function sortDateTime($a,$b)\n {\n if ($a == $b)\n return 0;\n\n return ($a > $b) ? +1 : -1;\n }", "title": "" }, { "docid": "971edf6c6209580e6ec4e5ea2b072cfd", "score": "0.5336916", "text": "static public function diffInDays($time_1, $time_2 = 0) {\r\n\t\tif ($time_2 == 0)\r\n\t\t\t$time_2 = time();\r\n\r\n\t\treturn floor(abs(($time_1 - $time_2)/(3600*24)));\r\n\t}", "title": "" }, { "docid": "d2c511e1ca5f0d2093ea028e63cfd9c9", "score": "0.5327602", "text": "function compareDateToNow($date)\n {\n // $date format = 28-02-2017 09:00 (n\\'oubliez pas les 0 et les -)\n // function return = bool => true si $date > Now\n $date_now = new DateTime(\"now\");\n // http://php.net/manual/fr/datetime.diff.php\n echo '<pre>';\n echo '<br>$date_now : '; var_dump($date_now);\n echo '<br>$date_now : '; var_dump($date_now->date);\n echo '<br>$date_arrivee_compare < $date_now : '; var_dump($date_arrivee_compare < $date_now->date);\n echo '<br>$date_arrivee_compare > $date_now : '; var_dump($date_arrivee_compare > $date_now->date);\n echo '<br>$date_depart_compare < $date_arrivee_compare : '; var_dump($date_depart_compare < $date_arrivee_compare);\n echo '<br>$date_depart_compare > $date_arrivee_compare : '; var_dump($date_depart_compare > $date_arrivee_compare);\n echo '</pre>';\n\n // VALIDER L'ARGUMENT date => son format\n // http://php.net/manual/fr/datetime.createfromformat.php\n function validateDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }\n if(!validateDate($date, 'd-m-Y H:i'))\n {\n $message .= '<div class=\"row\"><div class=\"col-sm-4 col-sm-offset-4 alert alert-danger\" role=\"alert\">Attention, vous devez respecter le format<br>Exemple : 28-02-2018 09:00<br>N\\'oubliez pas les 0 et les -</div></div>';\n }\n\n if($date > $date_now->date ? \"TRUE\" : \"FALSE\");\n\n }", "title": "" }, { "docid": "d6529aaa40f9197d467d0e32c30e3dc2", "score": "0.5320882", "text": "function timecompare($dato, $tid){\n \n if(date(makefulltime($dato, $tid)) > date(time())){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "c282f4e5a49c128838aef90b241a6ed0", "score": "0.5310037", "text": "private function cbCommentDateSort($a, $b)\n {\n if ($a['stamp'] == $b['stamp']) {\n return 0;\n } // if\n\n return ($a['stamp'] < $b['stamp']) ? -1 : 1;\n }", "title": "" }, { "docid": "5f638594ac93c8b83d27d32b3356816d", "score": "0.5308846", "text": "function calcDateDiff($date1 = 0, $date2 = 0) {\r\n // Otherwise you'll get negative results.\r\n if ($date2 > $date1)\r\n return FALSE;\r\n\r\n $seconds = $date1 - $date2;\r\n\r\n // Calculate each piece using simple subtraction\r\n\r\n $weeks = floor($seconds / 604800);\r\n $seconds -= $weeks * 604800;\r\n\r\n $days = floor($seconds / 86400);\r\n $seconds -= $days * 86400;\r\n\r\n $hours = floor($seconds / 3600);\r\n $seconds -= $hours * 3600;\r\n\r\n $minutes = floor($seconds / 60);\r\n $seconds -= $minutes * 60;\r\n\r\n // Return an associative array of results\r\n return array(\"weeks\" => $weeks, \"days\" => $days, \"hours\" => $hours, \"minutes\" => $minutes, \"seconds\" => $seconds);\r\n }", "title": "" }, { "docid": "03a6e7d35a390f6d0122315455269e38", "score": "0.5280736", "text": "function datediff($datefrom, $dateto, $interval='d', $using_timestamps = false) {\n\n vd($datefrom);\n vd($dateto);\n if (!$using_timestamps) {\n $datefrom = strtotime($datefrom, 0);\n $dateto = strtotime($dateto, 0);\n }\n $difference = $dateto - $datefrom; // Difference in seconds\n\n switch ($interval) {\n\n case 'yyyy': // Number of full years\n\n $years_difference = floor($difference / 31536000);\n if (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom), date(\"j\", $datefrom), date(\"Y\", $datefrom) + $years_difference) > $dateto) {\n $years_difference--;\n }\n if (mktime(date(\"H\", $dateto), date(\"i\", $dateto), date(\"s\", $dateto), date(\"n\", $dateto), date(\"j\", $dateto), date(\"Y\", $dateto) - ($years_difference + 1)) > $datefrom) {\n $years_difference++;\n }\n $datediff = $years_difference;\n break;\n\n case \"q\": // Number of full quarters\n\n $quarters_difference = floor($difference / 8035200);\n while (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom) + ($quarters_difference * 3), date(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto) {\n $months_difference++;\n }\n $quarters_difference--;\n $datediff = $quarters_difference;\n break;\n\n case \"m\": // Number of full months\n\n $months_difference = floor($difference / 2678400);\n while (mktime(date(\"H\", $datefrom), date(\"i\", $datefrom), date(\"s\", $datefrom), date(\"n\", $datefrom) + ($months_difference), date(\"j\", $dateto), date(\"Y\", $datefrom)) < $dateto) {\n $months_difference++;\n }\n $months_difference--;\n $datediff = $months_difference;\n break;\n\n case 'y': // Difference between day numbers\n\n $datediff = date(\"z\", $dateto) - date(\"z\", $datefrom);\n break;\n\n case \"d\": // Number of full days\n\n $datediff = floor($difference / 86400);\n break;\n\n case \"w\": // Number of full weekdays\n\n $days_difference = floor($difference / 86400);\n $weeks_difference = floor($days_difference / 7); // Complete weeks\n $first_day = date(\"w\", $datefrom);\n $days_remainder = floor($days_difference % 7);\n $odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder?\n if ($odd_days > 7) { // Sunday\n $days_remainder--;\n }\n if ($odd_days > 6) { // Saturday\n $days_remainder--;\n }\n $datediff = ($weeks_difference * 5) + $days_remainder;\n break;\n\n case \"ww\": // Number of full weeks\n\n $datediff = floor($difference / 604800);\n break;\n\n case \"h\": // Number of full hours\n\n $datediff = floor($difference / 3600);\n break;\n\n case \"n\": // Number of full minutes\n\n $datediff = floor($difference / 60);\n break;\n\n default: // Number of full seconds (default)\n\n $datediff = $difference;\n break;\n }\n\n return $datediff;\n}", "title": "" }, { "docid": "0ec25362d9ba71664d7837684e73b746", "score": "0.5280478", "text": "protected static function compareDate(DateTimeInterface $date1, DateTimeInterface $date2)\n {\n if ($date1 > $date2) {\n return 1;\n }\n\n if ($date1 < $date2) {\n return -1;\n }\n\n $micro1 = $date1->format('u');\n $micro2 = $date2->format('u');\n\n if ($micro1 > $micro2) {\n return 1;\n }\n\n if ($micro1 < $micro2) {\n return -1;\n }\n\n return 0;\n }", "title": "" }, { "docid": "90ef536bd74c6f7b64e5364c00f3b791", "score": "0.52784497", "text": "public static function LaterDate($d1, $d2) {\n\t\tif($d1 == $d2) return false;\n\n\t\t$arr1 = explode(\"-\", $d1);\n\t\t$arr2 = explode(\"-\", $d2);\n\n\t\t//\tif years equal\n\t\tif((int)$arr1[0] == (int)$arr2[0]) {\n\n\t\t\t//\tif months equal\n\t\t\tif((int)$arr1[1] == (int)$arr2[1]) {\n\t\t\t\t//\tbigger day\n\t\t\t\treturn ((int)$arr1[2] > (int)$arr2[2]) ? $d1 : $d2;\n\t\t\t}\n\t\t\t//\tmonths inequal, bigger month\n\t\t\treturn ((int)$arr1[1] > (int)$arr2[1]) ? $d1 : $d2;\n\t\t}\n\t\t//\tmonths and year different, bigger year\n\t\treturn ((int)$arr1[0] > (int)$arr2[0]) ? $d1 : $d2;\n\t}", "title": "" }, { "docid": "2315147a3d5c8b63e5b0807ea32948af", "score": "0.5268295", "text": "function sortByCreatedOnDesc($a, $b) {\n $dt_a = DateTime::createFromFormat('m-d-Y H:i:s', $a->sys_created_on);\n $dt_b = DateTime::createFromFormat('m-d-Y H:i:s', $b->sys_created_on);\n return $dt_a < $dt_b;\n}", "title": "" }, { "docid": "3de13dd87444abcfeaa4a27664db4111", "score": "0.52662855", "text": "public function dateDiff($time1, $time2, $precision = 6)\n {\n // If not numeric then convert texts to unix timestamps\n if (!is_int($time1)) {\n $time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n // Set up intervals and diffs arrays\n $intervals = array(\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second'\n );\n $diffs = array();\n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Create temp time from time1 and interval\n $ttime = strtotime('+1 ' . $interval, $time1);\n // Set initial values\n $add = 1;\n $looped = 0;\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n // Create new temp time from time1 and interval\n $add++;\n $ttime = strtotime(\"+\" . $add . \" \" . $interval, $time1);\n $looped++;\n }\n $time1 = strtotime(\"+\" . $looped . \" \" . $interval, $time1);\n $diffs[$interval] = $looped;\n }\n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n break;\n }\n // Add value and interval \n // if value is bigger than 0\n if ($value > 0) {\n // Add s if value is not 1\n if ($value != 1) {\n $interval .= \"s\";\n }\n // Add value and interval to times array\n $times[] = $value . \" \" . $interval;\n $count++;\n }\n }\n // Return string with times\n return implode(\", \", $times);\n }", "title": "" }, { "docid": "b3deabf1e6d0134be65f0a383d2aed1c", "score": "0.5260998", "text": "function TimeIsBetweenTwoTimes($from, $till, $input) {\r\n $f = DateTime::createFromFormat('H:i:s', $from);\r\n $t = DateTime::createFromFormat('H:i:s', $till);\r\n $i = DateTime::createFromFormat('H:i:s', $input);\r\n if ($f > $t) $t->modify('+1 day');\r\n\treturn ($f <= $i && $i <= $t) || ($f <= $i->modify('+1 day') && $i <= $t);\r\n}", "title": "" }, { "docid": "aa6e2cc7282eafa2b288eb92da404bed", "score": "0.52570325", "text": "function is_new_day($ts) {\n $lastday=date_create();\n date_timestamp_set($lastday,$ts);\n $newday=date_create();\n date_time_set($newday,0,0,0);\n return ($newday>$lastday);\n}", "title": "" }, { "docid": "b192698f868f200d0d9e74b175a1183c", "score": "0.5254848", "text": "function dates_difference($date1, $date2) {\n\t$day_of_year1 = intval($date1->format(\"z\"));\t//The day of the year (starting from 0)\n\t$day_of_year2 = intval($date2->format(\"z\"));\n\treturn $day_of_year2 - $day_of_year1;\n}", "title": "" }, { "docid": "e45f90cafdb56a5c1049859b7197e7aa", "score": "0.5247222", "text": "public function dateDiff($time1, $time2, $interval) \r\n\t{\r\n\t if (!is_int($time1)) {\r\n\t $time1 = strtotime($time1);\r\n\t }\r\n\t if (!is_int($time2)) {\r\n\t $time2 = strtotime($time2);\r\n\t }\r\n\t \r\n\t // If time1 is bigger than time2\r\n\t // Then swap time1 and time2\r\n\t if ($time1 > $time2) {\r\n\t $ttime = $time1;\r\n\t $time1 = $time2;\r\n\t $time2 = $ttime;\r\n\t }\r\n\t \r\n\t // Set up intervals and diffs arrays\r\n\t $intervals = array('year','month','day','hour','minute','second');\r\n\t if (!in_array($interval, $intervals)) {\r\n\t return false;\r\n\t }\r\n\t \r\n\t $diff = 0;\r\n\t // Create temp time from time1 and interval\r\n\t $ttime = strtotime(\"+1 \" . $interval, $time1);\r\n\t // Loop until temp time is smaller than time2\r\n\t while ($time2 >= $ttime) {\r\n\t $time1 = $ttime;\r\n\t $diff++;\r\n\t // Create new temp time from time1 and interval\r\n\t $ttime = strtotime(\"+1 \" . $interval, $time1);\r\n\t }\r\n\t \r\n\t return $diff;\r\n \t}", "title": "" }, { "docid": "64182bc54ebe3f164f1b428b6b722871", "score": "0.52459896", "text": "function dateGap($date1,$date2=null){\n if(!isset($date2)){\n $date2=dateToday();\n }\n $date1_array = explode(\"/\",$date1);\n $date2_array = explode(\"/\",$date2);\n $timestamp1 =\n mktime(0,0,0,$date1_array[0],$date1_array[1],$date1_array[2]);\n $timestamp2 =\n mktime(0,0,0,$date2_array[0],$date2_array[1],$date2_array[2]);\n if ($timestamp1>$timestamp2) {\n $gap=$timestamp1-$timestamp2;\n return timestampToDate($gap);\n } else if ($timestamp1<$timestamp2) {\n $gap=$timestamp2-$timestamp1;\n return timestampToDate($gap);\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "98e0cb900945c64fc26c40673870a6f6", "score": "0.52292484", "text": "public static function diffOfDates($date1, $date2) {\n\t\treturn (int)date_diff(date_create($date1), date_create($date2))->format('%a');\n\t}", "title": "" }, { "docid": "8a073013b83bfad3366fbdc7b3de2bf4", "score": "0.5228864", "text": "function DateCompare(iResponseBase $baseItem1, iResponseBase $baseItem2): int {\n \n if ($baseItem1->getCreatedDate() < $baseItem2->getCreatedDate()) \n return 1; \n else if ($baseItem1->getCreatedDate() > $baseItem2->getCreatedDate()) \n return -1; \n else\n return 0; \n }", "title": "" }, { "docid": "5423fd69f6292f646e36e411dd77a4ba", "score": "0.5227308", "text": "function dateDifference($date_1 , $date_2 , $differenceFormat = '%a' )\n{\n\t$datetime1 = date_create($date_1);\n\t$datetime2 = date_create($date_2);\n\n\t$interval = date_diff($datetime1, $datetime2);\n\n\treturn $interval->format($differenceFormat);\n\n}", "title": "" }, { "docid": "2dbcbedd3d0beb50f719248272d8bb13", "score": "0.52226686", "text": "function timeDiff($t1, $t2)\r\n{\r\n\tif($t1 > $t2)\r\n\t{\r\n\t\t$time1 = $t2;\r\n\t\t$time2 = $t1;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$time1 = $t1;\r\n\t\t$time2 = $t2;\r\n\t}\r\n\t$diff = array(\r\n\t\t\t//'years' => 0,\r\n\t\t\t//'months' => 0,\r\n\t\t\t//'weeks' => 0,\r\n\t\t\t//'days' => 0,\r\n\t\t\t'hours' => 0,\r\n\t\t\t'minutes' => 0,\r\n\t\t\t'seconds' =>0\r\n\t);\r\n\r\n\t//foreach(array('years','months','weeks','days','hours','minutes','seconds') as $unit)\r\n\tforeach(array('hours','minutes','seconds') as $unit)\r\n\t{\r\n\t\twhile(TRUE)\r\n\t\t{\r\n\t\t\t$next = strtotime(\"+1 $unit\", $time1);\r\n\t\t\tif($next < $time2)\r\n\t\t\t{\r\n\t\t\t\t$time1 = $next;\r\n\t\t\t\t$diff[$unit]++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn($diff);\r\n}", "title": "" }, { "docid": "53e61b770919a3388ac0af4752a788ad", "score": "0.5216896", "text": "function mm_cmp_mission_by_closed_date($a, $b) {\n\tif($a->time_closed == $b->time_closed) {\n\t\treturn 0;\n\t}\n\treturn ($a->time_closed < $b->time_closed) ? 1 : -1;\n}", "title": "" }, { "docid": "f7b4c9578deaf89fc18ef80f19f8e1ac", "score": "0.5214402", "text": "function calc_days($date1, $date2, $time_limit=false)\n{\n\t$date2_str = strtotime($date2);\n $date1_str = strtotime($date1);\n $datediff = $date2_str - $date1_str;\n $datediff = floor($datediff/(60*60*24));\n if ($time_limit)\n\t{\n\t\t$time2 = substr($date2, strpos($date2, ' '));\n\t\t$time2 = strtotime($time2);\n\t\t$time1 = strtotime($time_limit.':00');\n\t\tif ($time1 > $time2)\n\t\t{\n\t\t\t$datediff++;\n\t\t}\n\t}\n return $datediff;\n}", "title": "" }, { "docid": "ee8f3f4016a520fed333da5e9b314d27", "score": "0.52093166", "text": "public function usesTimestamps();", "title": "" }, { "docid": "690b2e7fff8cb190f8e3d57e21e7d641", "score": "0.5209274", "text": "public function isSameDay()\n {\n return $this->startTime->isSameDay($this->endTime);\n }", "title": "" }, { "docid": "69875dc44a31231cfe93cf434f567494", "score": "0.5207084", "text": "function cmp($a, $b)\n{\n\t$a = strtotime($a['snippet']['publishedAt']);\n\t$b = strtotime($b['snippet']['publishedAt']);\n\n\tif ($a == $b) {\n\t\treturn 0;\n\t}\n\treturn ($a > $b) ? -1 : 1;\n}", "title": "" }, { "docid": "8f267cad9a7557d861c5b9b20d12919f", "score": "0.52001834", "text": "function is_all_day($gmt1, $gmt2) {\r\n\t\t\t$local1 = localtime(($gmt1 <= $gmt2 ? $gmt1 : $gmt2), 1);\r\n\t\t\t$local2 = localtime(($gmt1 <= $gmt2 ? $gmt2 : $gmt1), 1);\r\n\r\n\t\t\treturn (abs($gmt2 - $gmt1) == 86400\r\n\t\t\t\tand $local1['tm_hour'] == 0);\r\n\t\t}", "title": "" }, { "docid": "1f93bf8803fcd47971ca7c6a4e52544f", "score": "0.51956016", "text": "static function getDateDifference($dateFrom, $dateTo, $unit = 'd')\n{\n $difference = null;\n\n $dateFromElements = split(' ', $dateFrom);\n $dateToElements = split(' ', $dateTo);\n\n $dateFromDateElements = split('-', $dateFromElements[0]);\n $dateFromTimeElements = split(':', $dateFromElements[1]);\n $dateToDateElements = split('-', $dateToElements[0]);\n $dateToTimeElements = split(':', $dateToElements[1]);\n\n // Get unix timestamp for both dates\n\n $date1 = mktime($dateFromTimeElements[0], $dateFromTimeElements[1], $dateFromTimeElements[2], $dateFromDateElements[1], $dateFromDateElements[0], $dateFromDateElements[2]);\n $date2 = mktime($dateToTimeElements[0], $dateToTimeElements[1], $dateToTimeElements[2], $dateToDateElements[1], $dateToDateElements[0], $dateToDateElements[2]);\n\n if( $date1 > $date2 )\n {\n return null;\n }\n\n $diff = $date2 - $date1;\n\n $days = 0;\n $hours = 0;\n $minutes = 0;\n $seconds = 0;\n\n if ($diff % 86400 <= 0) // there are 86,400 seconds in a day\n {\n $days = $diff / 86400;\n }\n\n if($diff % 86400 > 0)\n {\n $rest = ($diff % 86400);\n $days = ($diff - $rest) / 86400;\n\n if( $rest % 3600 > 0 )\n {\n $rest1 = ($rest % 3600);\n $hours = ($rest - $rest1) / 3600;\n\n if( $rest1 % 60 > 0 )\n {\n $rest2 = ($rest1 % 60);\n $minutes = ($rest1 - $rest2) / 60;\n $seconds = $rest2;\n }\n else\n {\n $minutes = $rest1 / 60;\n }\n }\n else\n {\n $hours = $rest / 3600;\n }\n }\n\n switch($unit)\n {\n case 'd':\n case 'D':\n\n $partialDays = 0;\n\n $partialDays += ($seconds / 86400);\n $partialDays += ($minutes / 1440);\n $partialDays += ($hours / 24);\n\n $difference = $days + $partialDays;\n\n break;\n\n case 'h':\n case 'H':\n\n $partialHours = 0;\n\n $partialHours += ($seconds / 3600);\n $partialHours += ($minutes / 60);\n\n $difference = $hours + ($days * 24) + $partialHours;\n\n break;\n\n case 'm':\n case 'M':\n\n $partialMinutes = 0;\n\n $partialMinutes += ($seconds / 60);\n\n $difference = $minutes + ($days * 1440) + ($hours * 60) + $partialMinutes;\n\n break;\n\n case 's':\n case 'S':\n\n $difference = $seconds + ($days * 86400) + ($hours * 3600) + ($minutes * 60);\n\n break;\n\n case 'a':\n case 'A':\n\n $difference = array (\n \"days\" => $days,\n \"hours\" => $hours,\n \"minutes\" => $minutes,\n \"seconds\" => $seconds\n );\n\n break;\n }\n\n return $difference;\n}", "title": "" } ]
5c084936ac26de5bae836c3e2ebe7401
OneToMany (owning side) Get fkPessoalServidores
[ { "docid": "2828fd9b24661a8adbc4a4bdc9c50d60", "score": "0.81097424", "text": "public function getFkPessoalServidores()\n {\n return $this->fkPessoalServidores;\n }", "title": "" } ]
[ { "docid": "7b6f24668e404d0156303a52265a0e0f", "score": "0.7306173", "text": "public function getFkPessoalServidorConjuges()\n {\n return $this->fkPessoalServidorConjuges;\n }", "title": "" }, { "docid": "b411497d420d4be4cdb118685f0db4c5", "score": "0.71711344", "text": "public function getFkPessoalServidor()\n {\n return $this->fkPessoalServidor;\n }", "title": "" }, { "docid": "2dd11a7ef83cc079c08b1c48120d6b3b", "score": "0.68994504", "text": "public function getFkPessoalContratoServidorLocais()\n {\n return $this->fkPessoalContratoServidorLocais;\n }", "title": "" }, { "docid": "7e1711c0d9226cb58bc9ad103b3c9996", "score": "0.68984306", "text": "public function getFkPessoalContratoServidorCedencias()\n {\n return $this->fkPessoalContratoServidorCedencias;\n }", "title": "" }, { "docid": "e589c6420fcc950c3239dd6a2c670ce9", "score": "0.6731259", "text": "public function parentServidores()\n {\n return $this->belongsTo(Servidores::class);\n }", "title": "" }, { "docid": "836f696b52d5b63f9bb2d9dffe474fcb", "score": "0.66533923", "text": "public function getFkPessoalDependentes()\n {\n return $this->fkPessoalDependentes;\n }", "title": "" }, { "docid": "4315b29429e17e22823d8854813c0a31", "score": "0.65193474", "text": "public function perfil_cliente() {\n return $this->hasMany(PerfilCliente::class,'linea_credito_id','id');\n }", "title": "" }, { "docid": "574c6c641c076d01708a6153195c8e2c", "score": "0.6497136", "text": "public function getFkPessoalContratoServidorSalario()\n {\n return $this->fkPessoalContratoServidorSalario;\n }", "title": "" }, { "docid": "9a0b16b6e5035abd080210e8c08acd25", "score": "0.64624697", "text": "public function getFkFrotaVeiculoPropriedades()\n {\n return $this->fkFrotaVeiculoPropriedades;\n }", "title": "" }, { "docid": "a3171c995a8e5f2bfd9b74bfbdc0cc56", "score": "0.6405747", "text": "public function partes()\r\n {\r\n return $this->hasMany('CapOut\\SsoPartes','idDocProcCont');\r\n }", "title": "" }, { "docid": "fb2e79d86638ea9bc4d30488881a8abb", "score": "0.63337296", "text": "public function vendedores()\n {\n return $this->belongsToMany(Vendedor::class, 'cliente_vendedor')->withTimestamps();\n }", "title": "" }, { "docid": "c3a0a36d6e87962bea070a48b78ab5c0", "score": "0.63111705", "text": "public function Paciente (){\n \treturn $this->belongsto(Paciente::class);\n }", "title": "" }, { "docid": "6a559de8ff606c40da853e7a68830414", "score": "0.6307262", "text": "public function servicios()\n {\n return $this->hasOne('App\\Models\\servicio', 'id_alumnos', 'id_alumnos');\n }", "title": "" }, { "docid": "d4569cf55ccd733bdf1508fc92e1af51", "score": "0.630614", "text": "public function pedidos() {\n return $this->hasMany('Soportem\\Pedido', 'PRIORIDAD', 'PRIORIDAD');\n }", "title": "" }, { "docid": "9c788cdcaa8c98f77f7a81b459c8f9d4", "score": "0.62951916", "text": "public function seguidores()\n {\n \treturn $this->hasMany('App\\User_user','seguidor_id');\n \t}", "title": "" }, { "docid": "2513d9f14b866b0ab5781477ac68e23a", "score": "0.62474746", "text": "public function clientes()\n {\n return $this->hasMany(Cliente::class,'provinciap_id','provincia_id');\n }", "title": "" }, { "docid": "f42b981535e90f9c27eadf04dd2496fc", "score": "0.62326854", "text": "public function getFkFrotaVeiculoDocumentos()\n {\n return $this->fkFrotaVeiculoDocumentos;\n }", "title": "" }, { "docid": "832abc48eb59ba1405f5e83c300c5b54", "score": "0.622324", "text": "public function perfil_cliente()\n {\n //Segundo el nombre de la tabla pivot )perfil_cliente_tipo_producto)\n //La clave foranea de la Clase Principal (TipoProducto)\n // la clave foranea de la clase a relacionar (PerfilCliente= ..(perfil_cliente_id)\n return $this->belongsToMany('App\\Http\\Models\\PerfilCliente','perfil_cliente_tipo_producto','tipo_producto_id','perfil_cliente_id')\n ->withPivot('id');\n // ->withTimestamps();\n }", "title": "" }, { "docid": "c84b5cfa1c70ca9d166dd8838de78d89", "score": "0.62222266", "text": "public function cliente()\n {\n return $this->belongsTo('Serbinario\\Entities\\Cliente','cliente_id');\n }", "title": "" }, { "docid": "2d031a2649aa36424d56ed73c3efb5e0", "score": "0.6222212", "text": "public function sProcedimiento()\n {\n return $this->hasOne('App\\Models\\SProcedimiento','aviso','id');\n }", "title": "" }, { "docid": "0ce48c4125ab6af331cecbee3c693fdc", "score": "0.6199633", "text": "public function father()\n {\n return $this->belongsToMany('App\\Petz', 'sire_id');\n }", "title": "" }, { "docid": "518067f1899a5b059d89d51de93abe6f", "score": "0.6180089", "text": "public function clientes()\n {\n return $this->belongsToMany('App\\Cliente', 'clientes_tipos_ventas', 'id_tipo_venta', 'id_cliente');\n }", "title": "" }, { "docid": "536893c0f0a6bba1d8f7562b007ba8e8", "score": "0.6178745", "text": "public function getPedidos()\n \n {\n return $this->hasMany(Pedido::className(), ['app_idApp' => 'idApp']);\n }", "title": "" }, { "docid": "8ee51b1bda79b78340a4f86c44c5dbe9", "score": "0.61510414", "text": "public function encargadoSinPedido(){\n return $this->hasMany(Encargado::class); //este encargado pertenece a la\n }", "title": "" }, { "docid": "dccab5e8a5129e52ef3dc4bd90f59ee5", "score": "0.6148647", "text": "public function proveedor()\n {\n return $this->belongsTo(Proveedor::class);\n }", "title": "" }, { "docid": "f5a83b29b828e96bf00d31d7600bba88", "score": "0.6144192", "text": "public function semestres(){\n\n \t\treturn $this->hasMany('App\\Semestre','ciclo_escolars_id');\n\t}", "title": "" }, { "docid": "a7e43e3ec4947fc2c592abf8aa7440af", "score": "0.614349", "text": "public function pacientes()\n {\n return $this->belongsTo('App\\Models\\Paciente', 'paciente_id');\n }", "title": "" }, { "docid": "9d8448c990e3003d6c7422927c161ec7", "score": "0.6141149", "text": "public function sucursales()\n {\n return $this->belongsToMany(Sucursal::class, 'cliente_sucursal')->withTimestamps();\n }", "title": "" }, { "docid": "7f1dd87f5e0f5c8323f7e273660cf99d", "score": "0.6116252", "text": "public function getPedidos()\n {\n return $this->hasOne(Pedidos::className(), ['id' => 'pedidos_id']);\n }", "title": "" }, { "docid": "6543569bfb7a3623bf238f7132bc0a7b", "score": "0.61098915", "text": "public function getFkArrecadacaoFaturamentoServicos()\n {\n return $this->fkArrecadacaoFaturamentoServicos;\n }", "title": "" }, { "docid": "2eb17ac60e5842a0c026bc3d7761685b", "score": "0.61050254", "text": "public function getPedidos()\n {\n return $this->hasMany(Pedido::className(), ['id_veiculo' => 'matricula']);\n }", "title": "" }, { "docid": "7ae9175b566358cbff642af84828b1b2", "score": "0.60777277", "text": "public function getFkDividaDocumentos()\n {\n return $this->fkDividaDocumentos;\n }", "title": "" }, { "docid": "2aae211a853e6120ccb19b8a77ddd1eb", "score": "0.60694605", "text": "public function seccionv(){\n return $this->hasMany('App\\vivienda_seccion_v');\n }", "title": "" }, { "docid": "8c4d390a15a06e44812a36a2d39e18e4", "score": "0.60694075", "text": "public function tipoServico()\n {\n return $this->belongsTo('App\\TipoServico');\n }", "title": "" }, { "docid": "9abf5cc092bfa29230d305da2b170ddf", "score": "0.60676146", "text": "public function projekcija()\n {\n return $this -> hasMany(\\App\\Rezervacija::class, 'projekcija_id', 'id');\n }", "title": "" }, { "docid": "e7166342fff7659920bb7f3b5abbcb1f", "score": "0.6060967", "text": "public function pedidos(){\n return $this->hasMany(Pedido::class)->with('usuario'); //este encargado pertenece a la\n }", "title": "" }, { "docid": "36b104bd5b990e7f06630b02449520c8", "score": "0.60447174", "text": "public function getFksocioempleo()\n {\n return $this->fksocioempleo;\n }", "title": "" }, { "docid": "b2f448358e715ba3c5cfda9b9f4f9ab1", "score": "0.604382", "text": "public function getFkFrotaMotoristaVeiculos()\n {\n return $this->fkFrotaMotoristaVeiculos;\n }", "title": "" }, { "docid": "4cea2612f933d0487cb7918cda85a9f9", "score": "0.6041945", "text": "public function getPedidos()\n {\n return $this->hasMany(Pedidos::class, ['id' => 'pedidos_id'])->viaTable('pedidos_productos', ['productos_id' => 'id']);\n }", "title": "" }, { "docid": "d19782a05579cce8d53f01c821499fbe", "score": "0.6032818", "text": "public function getPoblacion()\n {\n return $this->hasOne(Poblaciones::className(), ['id' => 'poblacion_id'])->inverseOf('empleos');\n }", "title": "" }, { "docid": "fb164ea770d00893a87eb521f654fb1b", "score": "0.6024082", "text": "public function proveedor()\n {\n return $this->belongsTo('App\\Proveedor', 'PRO_RUB_COD');\n }", "title": "" }, { "docid": "30daea36664187c7741c349f3bf8ee3e", "score": "0.59996784", "text": "public function getFkPessoalSubDivisao()\n {\n return $this->fkPessoalSubDivisao;\n }", "title": "" }, { "docid": "2fea74e4edb0d611d691636b72d750d6", "score": "0.59983253", "text": "public function getFk_idproduto()\n {\n return $this->fk_idproduto;\n }", "title": "" }, { "docid": "e76b97f51c4c126905cdb07dc41f8d06", "score": "0.5977655", "text": "public function pago(){\n return $this->belongsTo(Pago::class); //Pertenece a un Cliente.\n }", "title": "" }, { "docid": "c29b1688525643c5a22fed22de4b0874", "score": "0.5964134", "text": "public function puesto()\n {\n return $this->belongsToMany('App\\Puesto');\n }", "title": "" }, { "docid": "d7204a917946fbf9832d3a18850be6c7", "score": "0.5958548", "text": "public function departamentos() \n {\n return $this->belongsTo('FCS\\Departamento', 'departamento');\n }", "title": "" }, { "docid": "da71283051e9eeba6c3322da699f0317", "score": "0.5935661", "text": "public function getFkPessoalResponsavelLegais()\n {\n return $this->fkPessoalResponsavelLegais;\n }", "title": "" }, { "docid": "689e48ddfbe90802f763bbe7387b37c4", "score": "0.59302264", "text": "public function subProduto() {\n return $this->hasMany('produto','id','idpai'); // this matches the Eloquent model\n }", "title": "" }, { "docid": "9f1f482d7eced5232f5eee7fa95965da", "score": "0.5928153", "text": "public function aProcedimientos()\n {\n return $this->hasMany('App\\Models\\AProcedimiento','aviso','id');\n }", "title": "" }, { "docid": "e35ec63659576f3a3b37d2eef7e5903a", "score": "0.5919962", "text": "public function platos()\n {\n return $this->belongsToMany('App\\Plato', 'OrdenPlatos', \"orden_id\");\n }", "title": "" }, { "docid": "34b11f258821c06753179eda1b89abe2", "score": "0.5919893", "text": "public function produtos()\n {\n return $this->belongsToMany('App\\Produto');\n }", "title": "" }, { "docid": "1d5148b304c0b3cca9717d6afc6d7822", "score": "0.5917942", "text": "public function proyectos()\n {\n /* En una relacion M:N 'belongsToMany'\n es cualquiera de las dos partes */\n return $this->belongsToMany('App\\Proyecto');\n }", "title": "" }, { "docid": "c450dbf6d4712ea6de63a7a5d18728e5", "score": "0.59157276", "text": "public function getFkFrotaVeiculoCessoes()\n {\n return $this->fkFrotaVeiculoCessoes;\n }", "title": "" }, { "docid": "5e302482ea90972985c25adb07654543", "score": "0.5907693", "text": "public function getUsuarioFk()\n {\n return $this->hasOne(UsuarioSistema::class, ['id_usuario' => 'id_usuario_fk']);\n }", "title": "" }, { "docid": "b0bdd24676596927e9231ac99bfb7903", "score": "0.5902141", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Cliente','id_cliente');\n }", "title": "" }, { "docid": "5a833229bd6bf0ba72c34ef11b0ee108", "score": "0.5895168", "text": "public function vivienteAsistente()\n {\n return $this->belongsToMany('App\\Vivientes');\n }", "title": "" }, { "docid": "615d5796b1271ff6f60b76219ee709b2", "score": "0.58864176", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Models\\Cliente','cliente_id','id');\n }", "title": "" }, { "docid": "28e37f6c0292ddfbbcc26a38454b8dfd", "score": "0.5881724", "text": "public function getFkTcepeConfiguracaoGestores()\n {\n return $this->fkTcepeConfiguracaoGestores;\n }", "title": "" }, { "docid": "eb235ebde326dd6bbc2dcadc3af383cd", "score": "0.58807933", "text": "public function vivientes()\n {\n return $this->hasMany('App\\Viviente');\n }", "title": "" }, { "docid": "50e5cd91bf029b2021efbb7b00defa4c", "score": "0.5880734", "text": "public function parcial()\n\t{\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = materia_id, localKey = id)\n\t\treturn $this->hasMany(Parcial::class,'clave_materia');\n\t}", "title": "" }, { "docid": "7bff97f60d973af6a85978ee8153a981", "score": "0.58733386", "text": "public function paciente()\n {\n return $this->belongsTo(Paciente::class);\n }", "title": "" }, { "docid": "22f8b31f50026dfa423de9458c65281d", "score": "0.58706945", "text": "public function getFkSwPais()\n {\n return $this->fkSwPais;\n }", "title": "" }, { "docid": "0ee4d5aa55011a90c7115d61ea1b728f", "score": "0.58634496", "text": "public function getFkLicitacaoParticipanteDocumentos()\n {\n return $this->fkLicitacaoParticipanteDocumentos;\n }", "title": "" }, { "docid": "73515b35c2d262d5ae4beefa245aab14", "score": "0.5861507", "text": "public function produtos()\n {\n return $this->belongsToMany('App\\Models\\Produto');\n }", "title": "" }, { "docid": "91017573ba2c5cf12f8ace419432941b", "score": "0.5861", "text": "public function getFkCseDomicilios()\n {\n return $this->fkCseDomicilios;\n }", "title": "" }, { "docid": "acd45e1c62a10577efd91f5a06eb4f51", "score": "0.5859519", "text": "public function getPedidopagamentos()\n {\n return $this->hasOne(Pedidopagamentos::className(), ['idpagamento' => 'idpagamento']);\n }", "title": "" }, { "docid": "b54726cf6ce160b9689a71f47b0bfaa3", "score": "0.58568305", "text": "public function publicidades(){\n return $this->belongsToMany('Publicidad','publicidad_conjunto','conjunto_id','publicidad_id');\n }", "title": "" }, { "docid": "70694b794f7bc6ad7b119056985d73a3", "score": "0.58546877", "text": "public function clientes(){\n return $this->HasMany(Cliente::class);\n }", "title": "" }, { "docid": "681d695673ac0effb8ceb2d58e83ffa1", "score": "0.5853207", "text": "public function cliente(){\n return $this->belongsTo(\"App\\Models\\Cliente\");\n }", "title": "" }, { "docid": "fc07cb2909ccc5b0f4b511495225170e", "score": "0.585235", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Cliente','id_cliente');\n }", "title": "" }, { "docid": "b1e643e5bb035f49a462cfd22621c0b2", "score": "0.58496594", "text": "public function movimientos()\n {\n return $this->hasMany(Contabilidad::class, 'propietario_id');\n }", "title": "" }, { "docid": "2e3f9af49dfb6e4a6d022d6ef8d074f5", "score": "0.584941", "text": "public function getProdutos()\n {\n return $this->hasMany(Produto::className(), ['id_usuario_fk' => 'id_usuario']);\n }", "title": "" }, { "docid": "b49fab939eacec9e0e9cd973bea646d9", "score": "0.5848925", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Cliente', 'CLI_RUBRO');\n }", "title": "" }, { "docid": "6da7c5922c5e8bfa5eedce65902c6761", "score": "0.5844473", "text": "public function getFkPessoalPensionistas()\n {\n return $this->fkPessoalPensionistas;\n }", "title": "" }, { "docid": "b6c7bb1c6c38a9c5c2b288a01eac9548", "score": "0.5839442", "text": "public function origenes(){\n \treturn $this->hasMany('App\\Ruta','destino_id','id');\n }", "title": "" }, { "docid": "3461d836b7693a99ac7911001d9f8eb7", "score": "0.58352464", "text": "public function getObjEsp()\n {\n return $this->hasOne(ObjetivoEspecifico::className(), ['id_objetivo' => 'id_obj_esp']);\n }", "title": "" }, { "docid": "4658e1b2d72a49c3b082aeebc96a9b76", "score": "0.58345336", "text": "public function servicio_detalle_pago(){\n return $this->hasMany('App\\ServicioDetallePago');\n }", "title": "" }, { "docid": "cd33b62f29f963dd9554435ffc007104", "score": "0.5833276", "text": "public function getFkCoordenador()\n {\n return $this->hasOne(Coordenador::className(), ['id' => 'fk_coordenador_id']);\n }", "title": "" }, { "docid": "0288801da28279c6bf522a7f4aeac312", "score": "0.58283573", "text": "public function getFkEconomicoEmissaoDocumentos()\n {\n return $this->fkEconomicoEmissaoDocumentos;\n }", "title": "" }, { "docid": "7946f6cc5b0da2b64f0cb11a90617716", "score": "0.5827386", "text": "public function participantes() {\n return $this->belongsTo(Participantes::class, 'id_participante');\n }", "title": "" }, { "docid": "48085a1c1021f93796e28f914580e264", "score": "0.5827093", "text": "public function usuarios(){\n return $this->belongsToMany('App\\User', 'preferencia_d', 'id_tipo_impresion', 'id_usuario');\n }", "title": "" }, { "docid": "1127ea3b39b234f05ac5b33d61fe5866", "score": "0.5823955", "text": "public function adresa()\n {\n //return $this->belongsTo('App\\SkolaAdresa', 'typy_skoly_id', 'id');\n }", "title": "" }, { "docid": "56ff856b193510b819a3938b5374fffd", "score": "0.5823597", "text": "public function compras(){\n\t\t //Se tiene una relacion de 1:n \n\t\t //Utilizando Eloquent ORM, se agrega el atributo proveedores_id ya que con ese nombre\n\t\t //se encuentra en la base de datos, si no se agregara El orm asume proveedore_id\n return $this->hasMany('RED\\Compra','proveedores_id');\n\t\t \n\t }", "title": "" }, { "docid": "b89d780c5e14ea642de09f0b39a76b2c", "score": "0.5823449", "text": "public function pokemons(){\n\t return $this->hasMany('proyecto\\Pokemon'); // retorna la relacion de uno a muchos\n\t \t\t\t\t\t\t\t\t\t\t\t// que un cliente tiene muchos pokemons\t\n\t}", "title": "" }, { "docid": "fd2edf1b5e1e9c927b5d0704b2cb67af", "score": "0.5822454", "text": "public function identificacao()\r\n {\r\n return $this->hasOne('CapOut\\DocProc', 'idDocProc', 'idDocProc');\r\n }", "title": "" }, { "docid": "7544d9b83921aa441e64d3648b2ed69e", "score": "0.5814868", "text": "public function Departamentos()\n{\n return $this->belongsTo(Departamento::class);\n}", "title": "" }, { "docid": "a1ce4b08917fc27618d76cce5c1420f6", "score": "0.5814457", "text": "public function papeis(){\n return $this->belongsToMany(Papel::class);\n }", "title": "" }, { "docid": "967a3778a53180eb9d4db6e5d3833e3b", "score": "0.5813431", "text": "public function adjuntos()\n {\n return $this->hasMany('App\\Models\\OficinaVirtual\\PedidoAdjunto');\n }", "title": "" }, { "docid": "449a5f2c8f3d55597d4b21004ba869ed", "score": "0.581151", "text": "public function paciente()\n {\n return $this->belongsTo('App\\Models\\Paciente');\n }", "title": "" }, { "docid": "6d29ce0ae079b72a864fe77600053497", "score": "0.5808414", "text": "public function bitacoraPendientes()\n {\n return $this->hasMany('App\\Models\\BitacoraPendiente','aviso','id');\n }", "title": "" }, { "docid": "b0490bcabdc2103a56dccd9e53a3c60f", "score": "0.5806536", "text": "public function parteResponsavel()\r\n {\r\n return $this->hasOne('CapOut\\SsoPartes','idDocProcCont','idDocProcCont')->where('flTipoParte',5);\r\n }", "title": "" }, { "docid": "96729afc06fd6461b78db7ec73964110", "score": "0.5804096", "text": "public function comuni()\n {\n return $this->belongsToMany(Comune::class, 'COMUNE_PROV', 'PROVINCIA','COD');\n }", "title": "" }, { "docid": "c9794cadda7fdfe8f141613483736366", "score": "0.5797385", "text": "public function getFkDividaAutoridades()\n {\n return $this->fkDividaAutoridades;\n }", "title": "" }, { "docid": "aa2023d4242e6b183eea6ef1de4b755a", "score": "0.5795198", "text": "public function getUsuarioDependencias()\n {\n return $this->hasMany(UsuarioDependencia::className(), ['idDependencia' => 'idDependecia']);\n }", "title": "" }, { "docid": "92095aa45b3ef99c0afde543eac6f4bf", "score": "0.5793981", "text": "public function relacionAnteproyecto()\n {\n return $this->hasOne(Anteproyecto::class, 'PK_NPRY_IdMctr008', 'FK_NPRY_IdMctr008');\n }", "title": "" }, { "docid": "7cb832d0e960eff6a4a22cd634907fd2", "score": "0.5790372", "text": "public function getPedidosProductos()\n {\n return $this->hasMany(PedidosProductos::class, ['productos_id' => 'id']);\n }", "title": "" }, { "docid": "6f1faabca816330fbbf71077c2205c47", "score": "0.5789257", "text": "public function getDespesas()\n {\n return $this->hasMany(Despesas::className(), ['id_usuario_fk' => 'id_usuario']);\n }", "title": "" }, { "docid": "096d2fb957f488b73d729bd8eaa3d181", "score": "0.57834566", "text": "public function getFk_idpedvenda()\n {\n return $this->fk_idpedvenda;\n }", "title": "" }, { "docid": "33b7d5e864aad68001f5295fa17d4ccc", "score": "0.5782216", "text": "public function cliente()\n {\n return $this->belongsTo(Cliente::class, 'id', 'id');\n }", "title": "" }, { "docid": "271a507a8b28d28e1b4d76650a622d1f", "score": "0.57804316", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Models\\Cliente\\ClienteModel', 'id_cliente');\n }", "title": "" } ]
4021118c9697a6723723b27af487b61e
Checks to see if this page is the table of contents
[ { "docid": "5c226c934c58247346e73eefae513013", "score": "0.0", "text": "function digressit_is_mainpage(){\n global $is_frontpage, $is_mainpage, $blog_id;\n \n if(digressit_is_multisite() && file_exists(get_template_directory(). '/frontpage.php')){\n if(is_home() || is_front_page()){\n if($blog_id == 1): \n return false;\n else:\n return true;\n endif;\n }\n }\n else{\n return false;\n }\n}", "title": "" } ]
[ { "docid": "8ad7ea8727a43dc45785844564617b1d", "score": "0.7064529", "text": "public function showTableOfContents() {\n return (isset($this->text->div) && (count($this->text->div) > 1 ||\n\t (isset($this->text->div[0]->div) && count($this->text->div[0]->div) > 1)));\n }", "title": "" }, { "docid": "0145ee6dc1126a995dee2d6d7aa8b419", "score": "0.7041521", "text": "public function hasTOC()\n {\n // Is there a table of contents in the MARC record?\n if ($this->marcRecord->getFields('505')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4d66df3137e912c55071d573e650afd6", "score": "0.68269837", "text": "public function isPage()\n\t{\n\t\treturn ('html' === $this->page);\n\t}", "title": "" }, { "docid": "fa1b91263e90c7802251ece8172997d1", "score": "0.64047354", "text": "public function isTable(): bool;", "title": "" }, { "docid": "41be51ea39f23c6cde42f582c7f19617", "score": "0.6328236", "text": "public static function is_template_page() {\n\t\treturn is_singular( array( 'tf_template', 'tf_template_part' ) ) || defined( 'DOING_AJAX' );\n\t}", "title": "" }, { "docid": "93e9d9cdf3444167a141f8dce7459fbb", "score": "0.6304017", "text": "public function isPage()\n {\n if ($this->name) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "51295d449d7498efbab9e4fe03951406", "score": "0.6192611", "text": "public function hasContent();", "title": "" }, { "docid": "ce4d6eb2c815bda079531c67aeeb108b", "score": "0.6155531", "text": "public function is_page(){\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "e6e07aa3a9003105f0e1fe0650754281", "score": "0.6118182", "text": "public static function is_content_builder_page() {\n\t\treturn ( is_singular() && ! is_singular( array( 'tf_template', 'tf_template_part' ) ) ) || defined( 'DOING_AJAX' );\n\t}", "title": "" }, { "docid": "fd9864eddf951026234726b6aee673a6", "score": "0.6105028", "text": "public function is_page(){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6f018dbe5826e4a11c23f84c6f427f4d", "score": "0.6101402", "text": "public function hasTabContent(Individual $individual): bool\n {\n return true;\n }", "title": "" }, { "docid": "bcd72ca1bed4b36a2788ec6b57931b16", "score": "0.6100733", "text": "public function _isInThePage() {\n \n // If it's not in one of the post type's pages\n if ( ! $this->oProp->bIsAdmin ) {\n return false;\n }\n if ( ! in_array( $this->oProp->sPageNow, array( 'edit.php', 'edit-tags.php', 'post.php', 'post-new.php' ) ) ) {\n return false;\n }\n \n return ( $this->oUtil->getCurrentPostType() == $this->oProp->sPostType );\n\n }", "title": "" }, { "docid": "d5a4a515a9a872ebd331fbeaff9de2bd", "score": "0.60897565", "text": "function display_tables_of_contents($all_content, $lan = NULL, $id = NULL) {\r\n\t\t\t$found = FALSE;\r\n\t\t\t$i = 0;\r\n\t\t\t$_SESSION['selected_lan'] = $lan;\r\n\t\t\t$_SESSION['selected_content'] = $all_content;\r\n\t\t\tforeach ($all_content as $key => $value) {\r\n\t\t\t\tif ((++$i) % 2) {\r\n\t\t\t\t\techo \"<table class='table'>\";\r\n\t\t\t\t\t$record_of_one_content = searchRecordFromDB($lan, $value);\r\n\t\t\t\t\tif ($record_of_one_content != NULL) {//only desplay if there is sub_content under the a content\r\n\t\t\t\t\t\t$found = TRUE;\r\n\t\t\t\t\t\ttable_header($value);\r\n\t\t\t\t\t\tif ($id == NULL)\r\n\t\t\t\t\t\t\tdisplay_record($record_of_one_content);\r\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdisplay_record_with_edit($record_of_one_content, $id);\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\techo \"</table>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $found;\r\n\t\t}", "title": "" }, { "docid": "53f75beb4a39d7e9f2d303c5afcbe6d8", "score": "0.6078471", "text": "public static function is_table_head(){\r\n $is_tbl_head = isset( self::$datas['head'] ) && self::$datas['head'] == 'on' ? true : false;\r\n return apply_filters( 'wpt_is_table_head', $is_tbl_head );\r\n }", "title": "" }, { "docid": "46de3ed7fc2a3f0e6efec779ab786665", "score": "0.60555923", "text": "public function isPageTab () {\n return isset($this->signed_request['page']);\n }", "title": "" }, { "docid": "0d82a983bedab21a65db942de3bcae9c", "score": "0.6044775", "text": "private static function isInPage() {\n\t\treturn (Request::query('controller') == 'InPage::edit');\n\t}", "title": "" }, { "docid": "574ba957cbd66bdb0c3efef5282ce149", "score": "0.6026248", "text": "public function isWebPage()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "63120580c04cf6c29a626f5a5f73f4f1", "score": "0.5990312", "text": "public function is_content()\n {\n return (bool)($this->_content_id != null);\n }", "title": "" }, { "docid": "e26b378ee9f8672fae9a3a0715b6df5f", "score": "0.596468", "text": "public function isTable(): bool\n {\n return $this->is_table === true;\n }", "title": "" }, { "docid": "5a5985fc172e09c199ac5bda4db0a907", "score": "0.59594387", "text": "public function hasContent(): bool;", "title": "" }, { "docid": "4dd19c0faa546fe8db2205ef7ff48851", "score": "0.5956613", "text": "function hasContent() {\n return true;\n }", "title": "" }, { "docid": "323e5e52ba1d7c4c34667f702844095f", "score": "0.59325665", "text": "final public function is_page(){\n\t\t\n\t\treturn $this->is_post_type( 'page' );\t\n\t}", "title": "" }, { "docid": "3a97d89ae1d4161e06b18ed7e043a5f9", "score": "0.592863", "text": "function TableOfContents() {\n\t\t// and wuts, lists them for further browsing\n\t\treturn 'pseudo code does not tell much :(';\n\t}", "title": "" }, { "docid": "f4232c79e4284327aad6ba98c49dfec6", "score": "0.59062994", "text": "function table_of_contents($content) {\n\t\n\t\tglobal $wpdb,$post;\n\t\t$wpw_options = get_option('wpw_options');\n\t\t(get_post_meta($post->ID, '_wiki_page_toc', true) == 1) ? $toc = true : $toc = false;\n\t\t\n\t\tif (!$this->WikiHelper->is_wiki('front_end_check')) {\n\t\t\treturn $content;\n\t\t}\n\t\n\t // Check whether table of contents is set or not\n\t\t// second condition checks: are we on the front page and\n\t\t// is front page displaying set. - [email protected]\n\t\tif ( !$toc || is_front_page() && !$wpw_options['show_toc_onfrontpage'] ) {\n\t\t\treturn $content;\n\t\t}\n\t\n\t\tpreg_match_all(\"|<h2.*>(.*)</h2>|\", $content, $h2s, PREG_PATTERN_ORDER);\n\t\t$content = preg_replace(\"|<h2.*>(.*)</h2>|\", \"<a name='$1'></a><h2>$1</h2>\", $content);\n\t\t$content = preg_replace(\"|<h3.*>(.*)</h3>|\", \"<a name='$1'></a><h3>$1</h3>\", $content);\n\t\t$h2s = $h2s[1];\n\t\t$content = str_replace(\"\\n\", \"::newline::\", $content);\n\t\tpreg_match_all(\"|</h2.*>(.*)<h2>|U\", $content, $h3s_contents, PREG_PATTERN_ORDER);\n\t\t\n\t\t//The following lines are really ugly for finding <h3> after the last </h2> please tidy it up if u know a better solution, and please let us know about it.\n\t\n\t\t$last_h2_pos = explode('</h2>', $content);\n\t\t$last_h2_pos = array_pop($last_h2_pos);\n\t\tif(!empty($last_h2_pos)){\n\t\t\t$last_h2_pos[1] = $last_h2_pos;\n\t\t\t$h3s_contents[1][] = $last_h2_pos;\n\t\t}\n\t\tif (empty($h3s_contents[1])) {\n\t\t\t$h3s_contents[1] = array();\n\t\t}\n\t\tarray_push($h3s_contents[1], $last_h2_pos);\n\t\t\tforeach ($h3s_contents[1] as $key => $h3s_content) {\n\t\t\t\tpreg_match_all(\"|<h3.*>(.*)</h3>|U\", $h3s_content, $h3s[$key], PREG_PATTERN_ORDER);\n\t\t\t}\n\t\t$table = \"<ol class='content_list'>\";\n\t\tforeach($h2s as $key => $h2) {\n\t\t\t$table .= \"<li><a href='#$h2'>\".($key+1).\" \".$h2.\"</a></li>\";\n\t\t\tif (!empty($h3s[$key][1])) {\n\t\t\t\tforeach($h3s[$key][1] as $key1 => $h3) {\n\t\t\t\t\t$table .= \"<li class='lvl2'><a href='#$h3'>\".($key+1).\".\".($key1+1).\" \".$h3.\"</a></li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$table .= \"</ol>\";\n\t\t$content = str_replace(\"::newline::\", \"\\n\", $content);\n\t\treturn \"<div class='contents alignright'><h3>\".__('Contents').\"</h3><p> &#91; <a class='show' onclick='toggle_hide_show(this)'>\".__('hide').\"</a> &#93; </p>$table</div>\".$content;\n\t}", "title": "" }, { "docid": "644f4f9bcbafbb61fe26de07d5da41ba", "score": "0.5865995", "text": "public function hasContent(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "f6413b2ff21e571f02cd445144abc018", "score": "0.58507246", "text": "function isTemplatePageNonEmpty($id){\n $result = db_query(sprintf(\"SELECT * from plugin_phpwiki_nonempty where id=%d\", $id));\n if (db_numrows($result)){ \n return true;\n }else{ \n return false;\n }\n }", "title": "" }, { "docid": "b4eece30e21ddaefdbc4670532aebe6d", "score": "0.58288676", "text": "protected function isPage()\n {\n global $post;\n\n // Add parent pages to the list\n $this->addParents($post);\n\n // Add the current page to the list\n $this->add(get_the_title(), false, true);\n }", "title": "" }, { "docid": "9a1bff77b58b26591f8e0d08183824e6", "score": "0.5824062", "text": "private function isMainPage()\n {\n return preg_match('#' . $this->addSlashes(PH7_PATH_TPL . PH7_TPL_NAME . PH7_DS . $this->getMainPage()) . '#', $this->sTemplateDirFile);\n }", "title": "" }, { "docid": "80009d08de2cc8cdaf3b49c3fc1af9ac", "score": "0.58040386", "text": "function contentValidation() {\n\t\tif($this->data['Page']['page_type']=='content' && strip_tags($this->data['Page']['content'])=='') {\n\t \t return false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "17c2645f008330a5724824d337774d22", "score": "0.57960695", "text": "public function showPageTable( $context ) {\n\t\tif ( $this->mIncluding ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$output = $this->getOutput();\n\t\t$output->addHTML( $this->generatePageTable( $context ) );\n\t}", "title": "" }, { "docid": "cfe326aaf1c3c2e6c60c03b128e6b074", "score": "0.5782486", "text": "public function customAdminPageTablesExist(){\n\t\t$query = $this->db->query(\"SHOW TABLES LIKE '\" . DB_PREFIX . \"circloid_custom_admin_page'\");\n\n\t\tif($query->num_rows > 0){\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "5f444e5ac7419c90d86a590197363104", "score": "0.5764314", "text": "public function hasContent()\n {\n return $this->Content !== null;\n }", "title": "" }, { "docid": "13ce3953ba48e25a3e91d190d55bba91", "score": "0.56974006", "text": "private function checkTable() {\n\t\t\t// is there a table specified?\n\t\t\t$accessibleTables = $this->accessibleTables();\n\t\t\tif(!count($accessibleTables)) die($this->viewNoAccess());\n\n\t\t\t$this->table = $this->request['table'];\n\t\t\tif(!in_array($this->table, $accessibleTables)) $this->table = $accessibleTables[0];\n\t\t}", "title": "" }, { "docid": "575b3855de7cc2b27bde676e06806b96", "score": "0.56655747", "text": "public function hasViewableContent() {\n\t\treturn $this->exists() || $this->mTitle->isAlwaysKnown();\n\t}", "title": "" }, { "docid": "70f5201d6a10e2ad77991e8afe83e836", "score": "0.5647639", "text": "private function is_shortcode_page() {\n\t\tglobal $post;\n\n\t\t$content = null;\n\t\tif ( is_singular() && is_a( $post, 'WP_Post' ) ) {\n\t\t\t$content = $post->post_content;\n\t\t}\n\n\t\treturn has_shortcode( $content, 'job_alerts' );\n\t}", "title": "" }, { "docid": "3f05db93258e40544dfce748a98a43c8", "score": "0.56434107", "text": "protected function is_edit_page() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "056b155cdb212a4ddd13bfe73b266fa1", "score": "0.562762", "text": "public function isAllowedPage()\n {\n return in_array($this->getFullActionName(), $this->getAllowedPages(), true);\n }", "title": "" }, { "docid": "52189ad843a2d2579d918d348071e1a0", "score": "0.5626488", "text": "protected function html_has_valid_content($node)\n {\n $children = $node->children();\n $result = count($children) == 2 && $children[0]->name() == 'head' && $children[1]->name() == 'body';\n return $result;\n }", "title": "" }, { "docid": "75f5fb55f8b9a1fe022ac3871cf93c86", "score": "0.5612975", "text": "public function should_display_content_editor() {\n\t\treturn ! hestia_edited_with_pagebuilder();\n\t}", "title": "" }, { "docid": "fce213f57e0142f6deb34eda04b2f601", "score": "0.5603339", "text": "private function is_in_page() {\n\t\t$screen = get_current_screen();\n\t\tif ( is_object( $screen ) && in_array( $screen->id, array(\n\t\t\t\t'defender_page_wdf-schedule-scan',\n\t\t\t\t'defender_page_wdf-schedule-scan-network'\n\t\t\t) )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "68b0664fe8fba00b8a055330ce80ebcf", "score": "0.5601134", "text": "protected function is_list_page() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c7c12cc458861e79482c57cda34425bf", "score": "0.556492", "text": "public function tocCellContainsText()\n {\n $contains = true;\n $text = \"\";\n if ($this->getTagName() == 'td') {\n $inner = $this->getInnerElements();\n for ($i = 0; $i < count($inner); $i++) {\n $text .= $inner[$i]->getInnerText();\n }\n $needles = array(\"<strong >\",\"</strong>\",\"<em >\",\"</em>\",\"<br />\");\n $text = trim(str_replace($needles, \"\", $text));\n\n if (strlen($text) == 0) {\n $contains = false;\n }\n }\n\n return $contains;\n }", "title": "" }, { "docid": "4038948cb7e5bf7587ef58e68605ffff", "score": "0.5553056", "text": "public static function checkTable()\r\n {\r\n try {\r\n $count = dibi::query('\r\n SELECT count(*)\r\n FROM information_schema.tables\r\n WHERE table_schema = %s', YouTubeRSS\\DatabaseConfig::database,'\r\n AND table_name = %s', YouTubeRSS\\DatabaseConfig::table,'\r\n ')->fetchSingle();\r\n\r\n return ($count)? true : false;\r\n } catch (Dibi\\Exception $e) {}\r\n return false;\r\n }", "title": "" }, { "docid": "16a0776c3082f00ffeea174d5953d56a", "score": "0.55500954", "text": "function CheckTable($table) {\n $result = $this->query(\"SELECT name FROM sqlite_master WHERE type='table' AND name='\" . $table . \"'\");\n $rows = $result->fetchArray();\n if ($rows != false) {\n return true;\n }\n }", "title": "" }, { "docid": "bae2b7a01d2c6968f6ae69fbcc0761c8", "score": "0.5542176", "text": "function tableExistsForItem() {\n return ($this->getTable() !== null);\n }", "title": "" }, { "docid": "0ba53ef25ca00011db19334367b494f0", "score": "0.55208516", "text": "public function hasContent()\n {\n if ($this->content === null) {\n return false;\n }\n return $this->content !== '';\n }", "title": "" }, { "docid": "cc9de50856f63823a26dd32ec913d433", "score": "0.551513", "text": "function ctrl_content_exists() {\r\n if ($this->content == '') {\r\n $this->msg_error(JText::_('UP_NO_CONTENT'));\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "172f185816e8f7b456fa56eb2f420709", "score": "0.5513855", "text": "public function hasTables(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "891d452acb0a60519511a06cb90d5420", "score": "0.5493147", "text": "function fiorello_mikado_dashboard_page() {\n\t\treturn is_page_template('user-dashboard.php');\n\t}", "title": "" }, { "docid": "2eac3e092c5e7302a1625e7ac420bc15", "score": "0.54759336", "text": "public function getIsCmsPage()\n {\n return ((int) Mage::getBlockSingleton('cms/page')->getPage()->getData('page_id')) > 0;\n }", "title": "" }, { "docid": "93dbce143010a14491872c5c2fcefe3d", "score": "0.5471289", "text": "public static function is_admin_or_embed_page() {\n\t\treturn self::is_admin_page() || self::is_embed_page();\n\t}", "title": "" }, { "docid": "28c3e9a32807b46a8acfcd0af0f3eab1", "score": "0.5455777", "text": "public static function hasContentColumn(): bool\n {\n return false;\n }", "title": "" }, { "docid": "446694f3f5168d758e12e6062e841957", "score": "0.54492366", "text": "protected static function checkPage($output = null)\n {\n if( property_exists($output->query->pages, '-1')) {\n return false;\n } else {\n return true;\n }\n //Want to make sure we are returning the same word\n// $obj = get_object_vars($output->query->pages);\n//\n// $key = key($obj);\n//\n// return $obj[$key]->title;\n\n\n }", "title": "" }, { "docid": "e81b0dc2f6a6eeab91a287179c3a43c6", "score": "0.5441667", "text": "public function istable($table) {\n\t\t$query = @$this->prepare(\"SHOW TABLES FROM {$this->db} LIKE '$table'\");\n\t\t$query->execute();\n\t\treturn $query->rowCount() == 1 ? true : false;\n\t}", "title": "" }, { "docid": "f2d333911df04692aaa5225e654fa83a", "score": "0.5429663", "text": "public function isPagezonePage() {\n return $this instanceof tx_newspaper_PageZone_Page;\n }", "title": "" }, { "docid": "4f4061588da382c42cbf895e9a9652bf", "score": "0.5415574", "text": "protected static function isTableForCache($tableName)\n {\n return ($tableName === 'pages' || $tableName === 'pages_language_overlay');\n }", "title": "" }, { "docid": "901b6a0c5adf36469f8d055577ad831a", "score": "0.5404291", "text": "public function HasContent()\n {\n $bHasContent = false;\n if ('' !== $this->data) {\n $bHasContent = true;\n }\n\n return $bHasContent;\n }", "title": "" }, { "docid": "e6d492a1ae36f929a04d8b779f3e0908", "score": "0.53914595", "text": "function is_plugin_page(){\n\n\t\tglobal $pagenow;\n\n\t\t$plugin_pages = array(\n\t\t\t'edit_job_fields',\n\t\t\t'edit_company_fields',\n\t\t\t'edit_resume_fields',\n\t\t\t'edit_education_fields',\n\t\t\t'edit_links_fields',\n\t\t\t'edit_experience_fields',\n\t\t\t'field-editor-settings'\n\t\t);\n\n\t\t$current_page = ( isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : '' );\n\n\t\tif ( $pagenow == 'edit.php' && in_array( $current_page, $plugin_pages ) ) return true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e29e90f66a054a8d165ce3e02c462e15", "score": "0.53906393", "text": "public function isWebpage($url) {\n\t\t$c = curl_init(); \n\t\tcurl_setopt($c, CURLOPT_URL, $url); \n\t\tcurl_setopt($c, CURLOPT_HEADER, 1); // get the header \n\t\tcurl_setopt($c, CURLOPT_NOBODY, 1); // and *only* get the header \n\t\tcurl_setopt($c, CURLOPT_RETURNTRANSFER, 1); // get the response as a string from curl_exec(), rather than echoing it \n\t\tcurl_setopt($c, CURLOPT_FRESH_CONNECT, 1); // don't use a cached version of the url \n\t\t$result = curl_exec($c);\n\t\t\n\t\tif (!$result) { \n\t\t\treturn false; \n\t\t} \n\t\t\n\t\tif (stripos($result, 'Content-type: text/html')) {\n\t\t\t$svc = new RestfulService($url);\n\t\t\t$response = $svc->request('', 'GET');\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ed8e33cbdfadc418247272fed3b1c531", "score": "0.53905064", "text": "function bimber_is_top_page() {\n\treturn is_page( bimber_get_top_page_id() );\n}", "title": "" }, { "docid": "039f397492a096a6928e4b2ae845ae77", "score": "0.5387928", "text": "function jht_is_convpage() {\n\tif ( is_page_template('page-brochure.php') ||\n\t\t\tis_page_template('page-buyersguide.php') ||\n\t\t\tis_page_template('page-escape.php') ||\n\t\t\tis_page_template('page-new-dealer.php') ||\n\t\t\tis_page_template('page-quote.php') ||\n\t\t\tis_page_template('page-tradein.php') ||\n\t\t\tis_page_template('page-twoColForm.php') ) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "e9d9e3e983521eba2bb37a8b05fdbbe3", "score": "0.53744495", "text": "public function is_empty() {\n if (!has_capability('block/course_checker:view', $this->context)) {\n return true;\n }\n\n $this->get_content();\n return(empty($this->content->text) && empty($this->content->footer));\n }", "title": "" }, { "docid": "aaf9c3d691ffbffe819b365c624d3332", "score": "0.5335056", "text": "protected function _has_page_error()\n\t{\n\t\treturn $this->page_contains(\".error\");\n\t}", "title": "" }, { "docid": "cf7309c1fe9f838031f7c9c7fd4d8112", "score": "0.5331884", "text": "public function hasStudyTables(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "e43bce4c96d16239195f1442f9fbdbe5", "score": "0.5331276", "text": "public function hasFirstPage()\n {\n return $this->getFirstPage() != 0;\n }", "title": "" }, { "docid": "34c026d0e04d99c67634c9cacf173756", "score": "0.53231186", "text": "public function hasContent()\n\t{\n\t\treturn (isset($this->headers['content-type'])\n\t\t\t&& (isset($this->headers['content-length']) || isset($this->headers['transfer-encoding']))\n\t\t);\n\t}", "title": "" }, { "docid": "923f7f81e737bfee061529156edcbded", "score": "0.5322893", "text": "public function isPagelike()\n {\n $check = (\\is_post_type_hierarchical($this->specific)\n && !\\get_post_type_archive_link($this->specific));\n\n if ($check && $this->more_specific) {\n return ($this->more_specific !== \\get_option('page_for_posts'));\n }\n \n return $check;\n }", "title": "" }, { "docid": "d5c7a8b89c26c8a165c460269ae59383", "score": "0.53218406", "text": "public function is_current_post_type_editing_page() {\r\n\t\t$screen = get_current_screen();\r\n\t\t\r\n\t\treturn in_array( $screen->base, $this->post_types );\r\n\t}", "title": "" }, { "docid": "ef9c6cde4468ba5f7e0f267268a9ac18", "score": "0.53115034", "text": "protected function is_trashed_page() {\n\t\treturn 'trashed' === Param::get( 'status' );\n\t}", "title": "" }, { "docid": "c007a1b9ac1d7c94970a8b58cbea7b43", "score": "0.531011", "text": "protected function checkPageType()\n {\n $pat = '/mobile\\/(comics|\\d{1,})\\/(.+)/';\n if (preg_match($pat, $this->url, $matches)) {\n if (is_int($matches[1])) {\n $this->mangaID = $matches[1];\n return 1;\n }\n $this->chapterID = $matches[2];\n return 2;\n }\n return false;\n }", "title": "" }, { "docid": "bde4f9aca6b4684254e72065560f5976", "score": "0.5307499", "text": "public function hasTable(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "cc78016bef509019741f3ed3135440c8", "score": "0.5274809", "text": "public function currentPageExists(): bool {\n\t\t$Page = $this->Context->get();\n\n\t\treturn ($Page->template != Page::TEMPLATE_NAME_404);\n\t}", "title": "" }, { "docid": "d7264540c1598fd31f847639443d9463", "score": "0.5273778", "text": "function is_envira_page() {\n\n\tif ( ! is_admin() ) {\n\t\treturn false;\n\t}\n\tif ( ! function_exists( 'get_current_screen' ) ) {\n\t\treturn false;\n\t}\n\n\t$current_screen = get_current_screen();\n\n\tif ( ! isset( $current_screen->post_type ) || 'envira' !== $current_screen->post_type ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n\n}", "title": "" }, { "docid": "ebf03233301156780e0b9703d6f39afe", "score": "0.52636635", "text": "public function hasTable(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "1a5a432cc2ddd5f79249a144ce5e9d01", "score": "0.5255868", "text": "public static function canHaveContentTemplates()\n {\n return false;\n }", "title": "" }, { "docid": "9049c54d3df373a77dae77fced113c89", "score": "0.5239941", "text": "public function is_allowed_page() {\n\n\t\t\tglobal $current_screen;\n\n\t\t\tif ( empty( $current_screen ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( is_array( $this->args['page'] ) && ! in_array( $current_screen->id, $this->args['page'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( is_string( $this->args['page'] ) && $current_screen->id !== $this->args['page'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "2f681046760bcf06061eebe1bc95fcbb", "score": "0.52376044", "text": "public function isText(){\n if (!isset($this->header['Content-Type'])) {return false;}\n return (preg_match(\"/text\\/html/\",$this->header['Content-Type']))? true:false;\n }", "title": "" }, { "docid": "50272b05afc61ae2cd362a566603049a", "score": "0.5227531", "text": "public function hasTable(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "b86d15f5711971e871d82da26caa3f97", "score": "0.5221559", "text": "public function hasTaskContent()\n {\n return $this->get(self::TASK_CONTENT) !== null;\n }", "title": "" }, { "docid": "6bccab48baf895fc6b78f7d55715f598", "score": "0.52179885", "text": "public function hasTemplate()\n {\n if ($this->template) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0c2137d75decf42dadc710bd283cb57e", "score": "0.5216781", "text": "function checkin()\n\t{\n\t\tif ($this->_id)\n\t\t{\n\t\t\t$article = & JTable::getInstance('content');\n\t\t\treturn $article->checkin($this->_id);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ffead76b224b09106c64948acf1ab332", "score": "0.5214243", "text": "protected function protectPage() {\n\t\treturn ($this->session->userdata('home') === 'committee');\n\t}", "title": "" }, { "docid": "bc24fe8b647d3fab12354646a44018c3", "score": "0.5213443", "text": "function table_exists( $tablename='' )\n {\n if( $tablename != '' )\n {\n $listresult = $this->list_tables();\n $counttables = count( $listresult );\n\n if( in_array( $tablename, $listresult ) )\n {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "58d82440be2d3d0622d9ce4e1bb34037", "score": "0.5207251", "text": "function is_index_page(){\n\t\treturn in_array($GLOBALS['pagenow'], array('index.php'));\n\t}", "title": "" }, { "docid": "47054d9ddcc67fa4698edf12155b6e08", "score": "0.5204823", "text": "public function hasParentTemplate() {\n\t\treturn $this->row['parent'] != 0;\n\t}", "title": "" }, { "docid": "610ce34253e39b5243487d56d4396ae8", "score": "0.51846635", "text": "public function hasTemplate()\n {\n return !empty($this->template);\n }", "title": "" }, { "docid": "fc766b31e307e65957c66e1a869327c8", "score": "0.5175434", "text": "public function isTableCreated()\n {\n $query = 'SHOW TABLES';\n $statement = $this->dbal->prepare($query);\n $statement->execute();\n\n while ($col = $statement->fetchColumn()) {\n if ($col == $this->tableName) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "aca8adc1face99fb9845c1176bb13756", "score": "0.5175203", "text": "public function valid()\n {\n return $this->_page <= $this->_maximumPage;\n }", "title": "" }, { "docid": "9dae72e3fc72d59093813478aa564a0c", "score": "0.5171659", "text": "public function isInSection()\n {\n return ($this->docPart == 'section');\n }", "title": "" }, { "docid": "3781e1353d52847501783f71ae387819", "score": "0.51532227", "text": "public function hasTable(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "9802c21c528d75cf241d6112730aab1d", "score": "0.5147619", "text": "private function tableExists()\n {\n try {\n $result = DB::select($this->sql_table_search, [$this->schema, $this->table]);\n return $result[0]->total > 0;\n }\n catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "b2576feb347fd2c54e6f11af7dc940f6", "score": "0.51473993", "text": "public function valid()\n {\n return isset($this->currentPage)\n && !is_null($this->currentPage);\n }", "title": "" }, { "docid": "e9785a71de5945a603d11f3b0288fdae", "score": "0.5142858", "text": "public function exists()\n {\n $list=array_flip($this->tables);\n $sql=\"SHOW TABLES\";\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_row($result))\n {\n if(isset($list[$row[0]]))\n {\n array_splice($list, $row[0],1);\n }\n }\n }\n if(count($list)>0)\n {\n return(false);\n }\n else\n {\n return(true);\n }\n }", "title": "" }, { "docid": "26050cca26e38b59d9cf5f1914e122cc", "score": "0.5137943", "text": "public function is_entry_detail() {\n\t\treturn isset( $this->_is_entry_detail ) ? (bool) $this->_is_entry_detail : GFCommon::is_entry_detail();\n\t}", "title": "" }, { "docid": "497179fb605ecf0d1ef37ea66fdaa2e9", "score": "0.5135692", "text": "public function hasIsHead(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "441db6435f0b53a56e5c79e26101708e", "score": "0.5125962", "text": "public function hasHeaderContentType()\n {\n return $this->hasHeaderContentType;\n }", "title": "" }, { "docid": "d9db35f1e34d8ea3b3fc2a29f7b7580e", "score": "0.5124525", "text": "private function isMainCompilePage()\n {\n return preg_match(\n '#' . $this->addSlashes($this->sCompileDir . static::MAIN_COMPILE_DIR . PH7_DS . PH7_TPL_NAME . PH7_DS . static::MAIN_COMPILE_PAGE) . '#',\n $this->sCompileDirFile\n );\n }", "title": "" }, { "docid": "e86968b820a9d1010511cd834bda05c7", "score": "0.512339", "text": "public function isContentEditable()\n {\n return $this->getTemplateObject()->isContentEditable();\n }", "title": "" }, { "docid": "6a3c46979bbe0258a4a804211d393d87", "score": "0.5123", "text": "public function isChildOfKnownPageListing()\n {\n $knownPageListings = ['elements','attributes'];\n\n $needles = explode('/', $this->getName());\n $size = (int) count($needles);\n\n if ($size < 2) {\n return false;\n }\n\n return in_array($needles[ $size - 2 ], $knownPageListings);\n }", "title": "" }, { "docid": "1fed0b74752c11051acea37eede92f46", "score": "0.5120485", "text": "public function isSelfservePageContainer()\n {\n return $this->elementContainer == ElementContainer::SELFSERVE_PAGE;\n }", "title": "" }, { "docid": "42e1875b4221d5af7facff6a11a306e2", "score": "0.51084626", "text": "public function isSection()\n {\n return false;\n }", "title": "" } ]
e34f40d6b6aa2e03ebd91356fdd505b3
Filter the query on the transaction_id column Example usage: $query>filterByTransactionId('fooValue'); // WHERE transaction_id = 'fooValue' $query>filterByTransactionId('%fooValue%'); // WHERE transaction_id LIKE '%fooValue%'
[ { "docid": "4c9269aa2269afb9975ee67390c95f83", "score": "0.5682524", "text": "public function filterByTransactionId($transactionId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($transactionId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $transactionId)) {\n $transactionId = str_replace('*', '%', $transactionId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(Be2billTransactionTableMap::TRANSACTION_ID, $transactionId, $comparison);\n }", "title": "" } ]
[ { "docid": "cbb841d7e994a9adf188d4ea7793e202", "score": "0.59323215", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TransactionPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "a6d54703faeac08efef5207bf493118d", "score": "0.5743562", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(Be2billTransactionTableMap::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "b187e1ce29156fb768dfbc0bf6f6ae72", "score": "0.5672229", "text": "public function actionGetTransactions($id)\n {\n /* @var $model \\app\\models\\Account */\n $model = $this->findModel($id);\n\n $queryParams = Yii::$app->request->queryParams;\n unset($queryParams['id']);\n\n $dataProvider = Transaction::search($queryParams);\n $dataProvider->query\n ->andWhere([\n 'or',\n ['account_id' => $model->id],\n ['recipient_account_id' => $model->id],\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "9eb91585e195369efb7eccafae103623", "score": "0.5670383", "text": "public function filteringByContractId($contract_id = '')\n {\n if ($contract_id != '') {\n $this->model = $this->model->where('to_contract_id', $contract_id);\n }\n }", "title": "" }, { "docid": "d6240a03dd3e0ee7bd4bcff61bce6ecb", "score": "0.5653251", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TransaksiPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "4732ac2443c86d054e4c9abe2a770016", "score": "0.557351", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(TransUnitPeer::MSG_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "5038bfcccace1a3df1da313e2bcb5271", "score": "0.5459379", "text": "public function filterColumn();", "title": "" }, { "docid": "2078e32fb05ff507372d2089d1e64e10", "score": "0.53189534", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliLogWalletTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "475f1a24cdcfd0ba1a3a52804e167bb9", "score": "0.52675444", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(StorePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "32bf48dc593f2cfc39ebc65d843185ec", "score": "0.5249716", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TempContractPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f36b111322a03cb27c72194904d5eaf7", "score": "0.5224072", "text": "public function filterById(int $id): self;", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.5207877", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.5207877", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "55e5f796ade0413ec2746c3bf5e5839f", "score": "0.51405406", "text": "public function filterById($id = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($id)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $id)) {\n\t\t\t\t$id = str_replace('*', '%', $id);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(TransUnitPeer::ID, $id, $comparison);\n\t}", "title": "" }, { "docid": "d21e5230e1bb5d20e4138156783635d7", "score": "0.51230997", "text": "public function filter($query);", "title": "" }, { "docid": "8ea11d797ef34f0a3cead30e458a324d", "score": "0.5111378", "text": "public function findTransactionByPaynetId($paynetId, array $filters = []);", "title": "" }, { "docid": "302e6622ab20ae280e04acd2fe95f4f8", "score": "0.5078677", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(LogOtorisasiPeer::TOKEN_SESI, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.50718504", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.50718504", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.50718504", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.50718504", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.50718504", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "801e3807a058ab7cfc91c1f8058eb638", "score": "0.5048473", "text": "public function getWhere($id_transaksi)\n {\n return $this->db->where('id_transaksi', $id_transaksi)->get('tbl_transaksi')->row();\n }", "title": "" }, { "docid": "d72eb179f1afa038ee400f9fe706f486", "score": "0.5039016", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ServicePeer::IDSERVICE, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "8b30b9d85661f862405daeee51476067", "score": "0.5020109", "text": "protected function prepareCndTransactionID(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)\n {\n if (!empty($value)) {\n $queryBuilder->linkLeft('o.payment_transactions', 'payment_transactions')\n ->andWhere('payment_transactions.public_id LIKE :transactionID')\n ->setParameter('transactionID', '%' . $value . '%');\n }\n }", "title": "" }, { "docid": "4acde9f5942219e0f912b57d2e098ccb", "score": "0.500599", "text": "public function doSearch($payid){\n $criteria = new CDbCriteria;\n $criteria->alias = \"t\";\n $criteria->compare('t.id',$payid);\n return self::model()->findAll($criteria);\n }", "title": "" }, { "docid": "2016aa259a35826ad1fa26b50afba7f0", "score": "0.4991738", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CodigosScoutingPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "e5d977e49ba99ec52724b4d42b70c477", "score": "0.49900985", "text": "function getByTransactionId($id = '')\n\t{\n\t\tif($id == '')\n\t\t\t$id = $this->getId();\n\t\tif(!$id)\n\t\t\ttrigger_error(\"you must set id to get by it\", E_USER_ERROR);\n\n\t\t$query = \"select * from Sale where transaction_id=?\";\n\t\t$sth = $this->db->prepare($query);\n\t\t$res = $this->db->execute($sth, array($id));\n\n\t\t$row = $res->fetchRow(DB_FETCHMODE_ASSOC);\n\n\t\t$this->setId($row['id']);\n\t\t$this->setDatetime($row['datetime']);\n\t\t$this->setAffiliateId($row['affiliate_id']);\n\t\t$this->setNotes($row['notes']);\n\t\t$this->setType($row['type']);\n\t\t$this->setIpaddress($row['ipaddress']);\n\t\t$this->setAmount($row['amount']);\n\t\t$this->setHitsid($row['hits_id']);\n\t\t$this->setAffiliatePayout($row['affiliate_payout']);\n\t\t$this->setScaleId($row['scale_id']);\n\t\t$this->setProcessorID($row['processor_id']);\n\t\t$this->setSiteId($row['site_id']);\n\t\t$this->setTransactionID($row['transaction']);\n\t\t$this->setMemberId($row['member_id']);\n\t\t$this->_record_exists = true;\n\t\t$this->_modified = false;\n\t}", "title": "" }, { "docid": "a59deec576b783d4e059ecf22711f98f", "score": "0.49658263", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliEsalehTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "2458976b01cb0f925262052f4798952f", "score": "0.4934403", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(Oops_Db_CustomerMessagePeer::ID_CUSTOMER_MESSAGE, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "c7f81fb25f1c869eb7263993309bf381", "score": "0.492904", "text": "public function searchIncomeTransactions($query) {\n\t\t$sql = $this->remoteDb->fetchAll('SELECT t1.id,t1.income_no,t1.receipt_no,t1.date,t1.transaction_description,t1.fkcustomer_id,t1.fktax_id,t2.customer_name,t3.tax_code FROM income_transaction as t1\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN customers as t2 ON (t1.fkcustomer_id=t2.id) LEFT JOIN taxcodes as t3 ON(t1.fktax_id=t3.id)\n\t\t\t\t\t\t\t\t\t\t WHERE ((t1.income_no LIKE \"%'.$query.'%\" OR t1.receipt_no LIKE \"%'.$query.'%\" OR t1.transaction_description LIKE \"%'.$query.'%\" OR t2.customer_name LIKE \"%'.$query.'%\" OR t3.tax_code LIKE \"%'.$query.'%\") AND (t1.delete_status=1))');\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "4dc9020aad02c775ba0b752f81816004", "score": "0.49061814", "text": "public function filterWhere()\n {\n }", "title": "" }, { "docid": "a2abb666cdfc4804dd46aa73921d1e81", "score": "0.48678327", "text": "public function filterByUUID(UniqueId $uuid): self;", "title": "" }, { "docid": "09af6834f3ea211da1f91232f2ea845a", "score": "0.4867323", "text": "public function filterByPrimaryKey($key)\n {\n return $this->addUsingAlias(CollectibleForSalePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "26d566f46f6309e19ae348dc76a79f5e", "score": "0.48618856", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TaskPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "58506aa22351633c17afc721789653f9", "score": "0.48593357", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RegularEntryTypePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "e78483b4db480cf1cf678cb89d57effa", "score": "0.48381546", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(LogPeer::ID_LOG, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "0d0de4856f8b6112f64d91a7de234c37", "score": "0.48065576", "text": "function getTransIDforSale(mysqli $db, $receiptData)\n{\n $sql = \"SELECT * FROM `Sale` WHERE `Customer_ID` LIKE '\";\n $sql.= $receiptData['CustomerID'] . \"' AND \";\n $sql.= \"`EmployeeID` LIKE '\";\n $sql.= $receiptData['EmployeeID'] . \"' AND \";\n $sql.= \"`DOS` LIKE '\";\n $sql.= $receiptData['DOS'] . \"'\";\n\n return $db->query($sql);\n}", "title": "" }, { "docid": "3e68af785d29e8a57a267607b366e9c8", "score": "0.48017126", "text": "function findBy($table, $filters) {\r\n global $mysqli;\r\n\r\n $criterias = [];\r\n foreach ($filters as $column => $value) {\r\n $criterias[] = \"`\".$column.\"`='\".mysqli_real_escape_string($mysqli, $value).\"'\";\r\n }\r\n\r\n $query = mysqli_query($mysqli, \"SELECT * FROM `\".$table.\"` WHERE \".implode('AND', $criterias));\r\n\r\n return $query->fetch_all(MYSQLI_ASSOC);\r\n}", "title": "" }, { "docid": "c3d62734d8784017e4a019de936d86f6", "score": "0.47879893", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(WarehouseTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "0f388e650dee69897b3280d0f2752de5", "score": "0.47845876", "text": "public function prepare_field_filter_statement($column = '', $value = '')\n\t{\n\t\t// Carrega controlador CI para uso de funcoes internas\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('acme/validation');\n\t\t\n\t\t// Só acrescenta a linha caso o valor do campo seja diferente de vazio\n\t\tif($value != '')\n\t\t{\n\t\t\tif($CI->validation->is_integer_($value) || $CI->validation->is_float_($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = $value\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_alfa($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_currency($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = '\" . $value . \"'\";\n\t\t\t}\n\t\t\t\n\t\t\telseif(isset($value)) \n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "12134eccf095ddd41869065f7a6567cc", "score": "0.47759014", "text": "private function getQueryFilter() {\n \n $units = array();\n foreach ( $this->filter as $key => $value) {\n $units[] = \"$key=$value\";\n }\n \n $filter = implode(',', $units);\n \n return \"(&($filter)(objectClass=*))\";\r\n }", "title": "" }, { "docid": "f7527a7fc91eeac87dcf837be795a1ea", "score": "0.47743717", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(teCalendarEventPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ced4d2b0e43c8fbbdfe60c78529fd2ed", "score": "0.47705343", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TiketPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "b4f362d23e76bdc652d9e72887f17bce", "score": "0.47702917", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(WebdavLockPeer::TOKEN, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "321ab6764016c0cc71c3332309018662", "score": "0.47701207", "text": "function forWallet(WalletId $wallet)\n {\n // easier to use DQL.\n return $this->entityManager\n ->createQuery('SELECT t FROM '.Transaction::class.' t WHERE t.from = :wallet OR t.to = :wallet')\n ->setParameter('wallet', $wallet->value())\n ->getResult();\n }", "title": "" }, { "docid": "af31d60ce0b480cd7abc499bd7a2e273", "score": "0.47664237", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(PayoutPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "13ca32e325fa3b8a0d57d7c33591bb65", "score": "0.47635993", "text": "static public function getFilter($param=\"\")\n {\n //return(self::getWhere($param));\n return(\"\");\n }", "title": "" }, { "docid": "299052d262a360ed87c53bd81f8f4b12", "score": "0.4753587", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ComboTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "154db9e7475e8298600b9686146e8297", "score": "0.47492534", "text": "public function searchCreditTransactions($query) {\n\t\t\t$where = '((t1.credit_no LIKE \"%'.$query.'%\" OR t3.product_id LIKE \"%'.$query.'%\" OR t2.customer_name LIKE \"%'.$query.'%\" OR t4.tax_code LIKE \"%'.$query.'%\") AND (t1.delete_status=1))';\n\t\t\t$select = $this->remoteDb->select()\n\t\t\t\t\t ->from(array('t1' => 'credit'),array('t1.id','t1.credit_no','t1.date'))\n\t\t\t\t\t ->joinLeft(array('t2' => 'customers'),'t1.fkcustomer_id = t2.id',array('t2.customer_name'))\n\t\t\t\t\t ->joinLeft(array('t3' => 'credit_product_list'),'t3.fkcredit_id = t1.id',array('t3.id as pid','t3.product_id'))\n\t\t\t\t\t ->joinLeft(array('t4' => 'taxcodes'),'t3.fktax_id = t4.id',array('t4.tax_code'))\n\t\t\t\t\t ->where($where)\n\t\t\t\t\t ->group('t1.id');\n\t\t $sql = $this->remoteDb->fetchAll($select);\n\t\t\treturn $sql;\n\t}", "title": "" }, { "docid": "b504b9f3dfea551fe7605fc6101f2698", "score": "0.47446045", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TbofertaPeer::ID_OFERTA, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "0b49b22eda767ebaab9c8557344494c2", "score": "0.47405237", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(BancoPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "62302da83e26f8e68df5f723b49e8c65", "score": "0.47390583", "text": "public function onDataMapperQueryFilter(DataMapperQueryFilterEvent $event): void\n {\n // Ignore if there is no filter we have to apply\n if (empty($this->filter)) {\n return;\n }\n call_user_func($this->filter, $event);\n }", "title": "" }, { "docid": "c478eb85dccf1e23742caccfffdd6f2d", "score": "0.4737662", "text": "public function searchInvoiceTransactions($query) {\n\t\t\t$where = '((t1.invoice_no LIKE \"%'.$query.'%\" OR t3.product_id LIKE \"%'.$query.'%\" OR t5.name LIKE \"%'.$query.'%\" OR t2.customer_name LIKE \"%'.$query.'%\" OR t4.tax_code LIKE \"%'.$query.'%\") AND (t1.delete_status=1))';\n\t\t\t$select = $this->remoteDb->select()\n\t\t\t\t\t ->from(array('t1' => 'invoice'),array('t1.id','t1.invoice_no','t1.date'))\n\t\t\t\t\t ->joinLeft(array('t2' => 'customers'),'t1.fkcustomer_id = t2.id',array('t2.customer_name'))\n\t\t\t\t\t ->joinLeft(array('t3' => 'invoice_product_list'),'t3.fkinvoice_id = t1.id',array('t3.id as pid','t3.product_id'))\n\t\t\t\t\t ->joinLeft(array('t4' => 'taxcodes'),'t3.fktax_id = t4.id',array('t4.tax_code'))\n\t\t\t\t\t ->joinLeft(array('t5' => 'products'),'t3.product_description = t5.id',array('t5.name'))\n\t\t\t\t\t ->where($where)\n\t\t\t\t\t ->group('t1.id');\n\t\t $sql = $this->remoteDb->fetchAll($select);\n\t\t\treturn $sql;\n\t}", "title": "" }, { "docid": "e215397f8d81f0ae6a8a0038bc492468", "score": "0.47316068", "text": "public function filter($table)\n {\n $this->applyGenericFilters($table);\n }", "title": "" }, { "docid": "f22278f7c004d016e1b6714b337ffe85", "score": "0.4728926", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PurchaseDetailTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "51867751f5cd9fbcaf3ab0513a91970a", "score": "0.47217265", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CardPeer::CARD_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "18e24ae1d2a19e4ad301543666bb1904", "score": "0.4717775", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ItemPeer::DATA_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "692edffa966995dd5f7a2b0197c8a8a6", "score": "0.47175813", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AccountPeer::ACCOUNT_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "4fa468a096ae21162f8e52acef4cd907", "score": "0.4709516", "text": "protected function getFilterSQL() {\n\t\t$result = '';\n\t\t$firstrun = true;\n\t\t\n\t\tforeach ($this->filter as $val){\n\t\t\tif($firstrun) {\n\t\t\t\t$firstrun = false;\n\t\t\t} else {\n\t\t\t\t$result .= \"\\nAND \";\n\t\t\t}\n\t\t\t\n\t\t\tif ($val['op'] == 'bw'\n\t\t\t\t|| $val['op'] == 'ew'\n\t\t\t\t|| $val['op'] == 'ct'\n\t\t\t) {\n\t\t\t\t//we need to treat everything as string\n\t\t\t\t$result .= \"LOWER(CONVERT(\" . $this->getFieldSQLName($val['key']) . \", CHAR)) LIKE \";\n\t\t\t\t\n\t\t\t\tif ($val['val'] instanceof Amount) {\n\t\t\t\t\t$stringVal = $val['val']->getFormatted();\n\t\t\t\t} else if ($val['val'] instanceof Date) {\n\t\t\t\t\t$stringVal = $val['val']->getFormatted();\n\t\t\t\t} else {\n\t\t\t\t\t$stringVal = (string) strtolower($val['val']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($val['op']) {\n\t\t\t\t\tcase 'bw':\n\t \t\t\t\t$result .= \"'\" . addslashes($stringVal) . \"%'\";\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t\t\t\t\tcase 'ew':\n\t \t\t\t\t$result .= \"'%\" . addslashes($stringVal) . \"'\";\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t\t\t\t\tcase 'ct': \t\n\t \t\t\t\t$result .= \"'%\" . addslashes($stringVal) . \"%'\";\n\t \t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//standard comparison\n\t\t\t\t$result .= $this->getFieldSQLName($val['key']);\n\n\t\t\t\tswitch ($val['op']) {\n\t\t\t\t\tcase 'eq':\n\t\t\t\t\t\t$result .= ' = ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'lt':\n\t\t\t\t\t\t$result .= ' < ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'le':\n\t\t\t\t\t\t$result .= ' <= ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'gt':\n\t\t\t\t\t\t$result .= ' > ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ge':\n\t\t\t\t\t\t$result .= ' >= ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ne':\n\t\t\t\t\t\t$result .= ' != ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$result .= $this->formatForDB($val['val'], $this->getFieldType($val['key']));\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "850ebaaf0bb7bfd451bce0dc2e6dce8a", "score": "0.470778", "text": "public function whereLike($column, $value, $filter = false)\n {\n return $this->where($column, 'LIKE', $value, $filter);\n }", "title": "" }, { "docid": "03d6b0a0596725d33c108da6e1b7a652", "score": "0.46981865", "text": "protected function getStoreId($id = '')\r\n\t{\r\n\t\t$id\t.= ':'.$this->getState('filter.search');\r\n\t\t$id\t.= ':'.$this->getState('filter.state');\r\n\r\n\t\treturn parent::getStoreId($id);\r\n\t}", "title": "" }, { "docid": "0100334b5e84ab7ccc875acad4211826", "score": "0.4692029", "text": "public function getFilterId()\n {\n return $this->filterId;\n }", "title": "" }, { "docid": "9b96237de9a40908f2ce2d1bb0846f5a", "score": "0.46898776", "text": "public static function findAll($transactionId)\n {\n return Configuration::gateway()->transactionLineItem()->findAll($transactionId);\n }", "title": "" }, { "docid": "99ab35b4aa88c20d9dbb904f164cb35e", "score": "0.468976", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TickerTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "22db5cc55e9847874f499860ff02a1b9", "score": "0.4688128", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliCalcPoschange1TableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "c99d3bbce60d11d21d5ea2b94f64a671", "score": "0.46691406", "text": "public function searchExpenseTransactions($query) {\n\t\t\t$where = '((t1.expense_no LIKE \"%'.$query.'%\" OR t1.receipt_no LIKE \"%'.$query.'%\" OR t3.product_description LIKE \"%'.$query.'%\" OR t2.vendor_name LIKE \"%'.$query.'%\" OR t4.tax_code LIKE \"%'.$query.'%\") AND (t1.delete_status=1))';\n\t\t\t$select = $this->remoteDb->select()\n\t\t\t\t\t ->from(array('t1' => 'expense_transaction'),array('t1.id','t1.expense_no','t1.date'))\n\t\t\t\t\t ->joinLeft(array('t2' => 'vendors'),'t1.fkvendor_id = t2.id',array('t2.vendor_name'))\n\t\t\t\t\t ->joinLeft(array('t3' => 'expense_transaction_list'),'t3.fkexpense_id = t1.id',array('t3.id as eid','t3.product_description'))\n\t\t\t\t\t ->joinLeft(array('t4' => 'taxcodes'),'t3.fktax_id = t4.id',array('t4.tax_code'))\n\t\t\t\t\t ->where($where)\n\t\t\t\t\t ->group('t1.id');\n\n\t\t $sql = $this->remoteDb->fetchAll($select);\n\t\t\treturn $sql;\n\t}", "title": "" }, { "docid": "94b3f4e3d974fb0d08242ce14fb229a5", "score": "0.46687463", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "94b3f4e3d974fb0d08242ce14fb229a5", "score": "0.46687463", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "671ea630300466a3d53c4b416480d596", "score": "0.4666181", "text": "function extjsTextboxFiltering($prefix = \"\", $field = \"\", $value = \"\") {\n\t\t$filter_query = \"\";\n\t\tif($field!=\"\" && $value!=\"\") {\n\t\t\t$value = str_replace(\"\\\\\", \"\", $value);\n\t\t\tif((substr($value, 0, 1)==\"'\" && substr($value, (strlen($value)-1), 1)==\"'\") || substr($value, 0, 1)==\"\\\"\" && substr($value, (strlen($value)-1), 1)==\"\\\"\") {\n\t\t\t\t$value = substr($value, 1, (strlen($value)-2));\n\t\t\t\t$value = \"'\".str_replace(array(\"\\\"\",\"'\"), array(\"\\\\\\\"\",\"\\'\"), $value).\"'\";\n\t\t\t\t$filter_query .= \" AND \".($prefix!=\"\"?$prefix.\".\":\"\").$field.\" = \".$value.\"\";\n\t\t\t} else {\n\t\t\t\t$value = str_replace(array(\"\\\"\",\"'\"), array(\"\\\\\\\"\",\"\\'\"), $value);\n\t\t\t\t$filter_query .= \" AND \".($prefix!=\"\"?$prefix.\".\":\"\").$field.\" LIKE '%\".$value.\"%'\";\n\t\t\t}\n\t\t}\n\t\t//echo $filter_query;exit;\n\t\treturn $filter_query;\n\t}", "title": "" }, { "docid": "d1d82f7ee51f150293176f8fb9cd52cc", "score": "0.46657148", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ReservasPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "958bab21bdb6b60d01d8888f567d9236", "score": "0.46646342", "text": "protected function stringValueClause($id)\n {\n $this->query->where($this->column, '=', $id);\n\n return $this->query;\n }", "title": "" }, { "docid": "afab43d533b8b6f38584704c9a55f41b", "score": "0.46589345", "text": "protected function XgetStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t//$id\t.= ':'.$this->getState('filter.search');\n\t\t//$id\t.= ':'.$this->getState('filter.access');\n\t\t$id\t.= ':'.$this->getState('filter.state');\n\t\t$id\t.= ':'.$this->getState('filter.folder');\n\t\t$id\t.= ':'.$this->getState('filter.type');\n\t\t//$id\t.= ':'.$this->getState('filter.language');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "3c16b4efb599383eb5ed117a1133348b", "score": "0.4651065", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientQuotingPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "c454324e9eb4bb173db78a04f8420a26", "score": "0.46487972", "text": "public function getFilterQueries () {}", "title": "" }, { "docid": "b991dacbed8c2f22b68aef6615a73267", "score": "0.46479204", "text": "public function applyFilter($value)\n\t{\n\t\tif (!$this->hasFilter())\n\t\t\treturn;\n\t\t$datagrid=$this->getDataGrid(TRUE);\n\t\t$column=$this->getName();\n\t\t$cond=array();\n\t\t$cond[]=array(\"[$column] = %t\", $value);\n\t\t$datagrid->dataSource->where('%and', $cond);\n\t}", "title": "" }, { "docid": "29826149a651fef523d97c07de189e6d", "score": "0.4629841", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(SocioAlquilerPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "4c0d3d5ea4b5161723eb8d84a5553c68", "score": "0.46235162", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'sumber': return \"s.namasumberbeasiswa = '$key'\";\n\t\t\t\tdefault:\n\t\t\t\t\treturn parent::getListFilter($col,$key);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4a9d1c7c71b00e340b0939b0de0542bb", "score": "0.4610945", "text": "public function getByTransactionId($transactionId) {\n\n return $this->fetchRow(\n $this->select()\n ->where(\"`transactionId` = ?\", $transactionId)\n );\n }", "title": "" }, { "docid": "dc70a0b947a492068d6bd6d3ac614818", "score": "0.46088284", "text": "public function andWhereLike($column, $value, $filter = false)\n {\n return $this->andWhere($column, 'LIKE', $value, $filter);\n }", "title": "" }, { "docid": "148d283c8b1d14c67d65f71a1e04644c", "score": "0.4608241", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(LayananKhususPeer::ID_LK, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "3709ea940143c5684288aa8d29b69c00", "score": "0.46059448", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(DropboxFilePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "efc013e0b418da451725f3f9c0241c3c", "score": "0.46051016", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(FeesTableMap::COL_FEE_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "b76e806717c5c77daa756a55b62e1ec1", "score": "0.46050978", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "bee8b64367af71723d9ba1260ebd3dd5", "score": "0.46032897", "text": "public function setTransactionId($value)\n {\n }", "title": "" }, { "docid": "9b978659c1f19721d83e86a57774eb34", "score": "0.46017954", "text": "public function query(TransactionModel $model)\n {\n $trn = $model->newQuery()->Where(function ($query) {\n $query->where('payeeId', env('PAYEE_ID'))\n ->orWhere('payerId', env('PAYEE_ID'));\n })\n ->whereIn('payUsing', ['WALLET', 'MERCHANT_WALLET']);\n\n if ($this->request()->has('dateRange')) {\n\n Log::info($this->request()->get('dateRange'));\n\n $dateRange = $this->request()->get('dateRange');\n $dateRange = explode(\":\", $dateRange);\n if (count($dateRange) > 1) {\n $from = $dateRange[0] . ' 00:00:00';\n $to = $dateRange[1] . ' 23:59:59';\n $trn->whereBetween('dateTime', [$from, $to]);\n } else {\n $dateRange = $this->request()->get('dateRange');\n $from = $dateRange . ' 00:00:00';\n $to = $dateRange . ' 23:59:59';\n $trn->whereBetween('dateTime', [$from, $to]);\n }\n } else {\n $date = Carbon::now()->format('Y-m-d');\n $from = $date . ' 00:00:00';\n $to = $date . ' 23:59:59';\n $trn->whereBetween('dateTime', [$from, $to]);\n }\n\n if($this->request()->has('type')){\n $trn->where('type', $this->request()->get('type'));\n }\n\n if($this->request()->has('api')){\n $trn->where('initializedBy', $this->request()->get('api'));\n }\n//\n if ($this->request()->has('status')) {\n $status = $this->request()->get('status');\n $trn->where('status', \"'$status'\");\n }\n//\n// if($this->request()->has('policyNo')){\n// $poNo = $this->request()->get('policyNo');\n// $trn->where('policy_no', \"$poNo\");\n// }\n\n return $trn;\n }", "title": "" }, { "docid": "70a1253719251c5ee0ecda6339d136d7", "score": "0.45982665", "text": "public function getTransactionId(): string;", "title": "" }, { "docid": "887c86c3e3a1876d47775c798e7ad78f", "score": "0.45927522", "text": "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The TblSettings object has no primary key');\n }", "title": "" }, { "docid": "7c03b67c20eb25df61bcf6c844f5abd5", "score": "0.45924884", "text": "public function filterByPrimaryKey($key)\r\n\t{\r\n\t\treturn $this->addUsingAlias(CircuitPeer::ID, $key, Criteria::EQUAL);\r\n\t}", "title": "" }, { "docid": "953bd68c08cd53fead84001a74bb408e", "score": "0.45920792", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(CreditCardTableMap::COL_CREDIT_CARD_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "b96a811041553428d4dfb75b3ef95bc8", "score": "0.45880762", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(PatternPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "d40d02343d6e7ae55ebdbd3cc1d4bc22", "score": "0.4581062", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(IntegranteTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6babbac403f4e1be9e789d49993184a5", "score": "0.45745036", "text": "public function search($params,$id)\n {\n $query = self::find();\n $dataProvider = new ActiveDataProvider([\n 'query' => $query->select('*')->andFilterWhere(['customer_id'=>$id]),\n 'pagination' => [\n 'pagesize' =>'10',\n ]\n ]);\n if (!($this->load($params,'') && $this->validate())) {\n return $dataProvider;\n }\n //关键词\n if($this->keywords){\n $query->andFilterWhere(['like','truename',$this->keywords]);\n }\n $query->addOrderBy(['id'=>SORT_DESC]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "0326c145444fc09c37bb75a25c4a6c8c", "score": "0.45642433", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ee01090af2b9c178a3b8b97b95b7bed5", "score": "0.45604947", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ClientePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ee01090af2b9c178a3b8b97b95b7bed5", "score": "0.45604947", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ClientePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "f27a6a9eefa98409d575cd00378876fc", "score": "0.455948", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'propinsi': return \"substring(idkabupaten,1,2) = '$key'\";\n\t\t\t\tcase 'kabupaten': return \"substring(idkecamatan,1,4) = '$key'\";\n\t\t\t\tcase 'kecamatan': return \"substring(idkelurahan,1,6) = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6389b12f982fc52514be3c4a33c233e0", "score": "0.4559318", "text": "function filter($value);", "title": "" }, { "docid": "91ea0f1b5b8c1005bf25a09cb3aab1af", "score": "0.45581526", "text": "function processQueryWithFilters(&$query, $idCliente, $idArea, $idConsultor, $idProyecto){\n\t\tif($idCliente != -1)\n\t\t\t$query = $query.' AND cp.`idCliente` = '.$idCliente;\n\n\t\tif($idArea != -1)\n\t\t\t$query = $query.' AND cu.`idArea` = '.$idArea;\n\n\t\tif($idConsultor != -1)\n\t\t\t$query = $query.' AND cu.`id` = '.$idConsultor;\n\t\t\n\n\t\tif($idProyecto != -1)\n\t\t\t$query = $query.' AND cp.`id` = '.$idProyecto;\n\n\t\treturn $query;\t\t\n\t}", "title": "" }, { "docid": "43056f768ecba3d53c87cf327b9bc82b", "score": "0.45545766", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SupplierSettingTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" } ]
164bd2a595ca9436ad5b5acddd10ca14
haer metodos seter y geter
[ { "docid": "7a7e81dbcd7afbe5dd97ae5559a0725d", "score": "0.0", "text": "function setCdInventario($cd_inventario) {\n $this->cd_inventario = $cd_inventario;\n }", "title": "" } ]
[ { "docid": "6f7c1266fccf9f4b5b9ab8edd2b46f70", "score": "0.6624149", "text": "public function test__set()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "6f7c1266fccf9f4b5b9ab8edd2b46f70", "score": "0.6624149", "text": "public function test__set()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "dea25490a0f89e7eeab9180fbab0e99a", "score": "0.63678247", "text": "static function set(){\n\t}", "title": "" }, { "docid": "515dcfa6bfe74195b7d22b78b6774ae2", "score": "0.6314773", "text": "public function set()\n {\n }", "title": "" }, { "docid": "089b102388fa1e257b2ac9631f003b43", "score": "0.6287642", "text": "function setTitulo($titulo = \"Titulo por defecto\"){\n $this->titulo = $titulo; //$this-> = $\n }", "title": "" }, { "docid": "cbef349d89caaedf3e199106fcf67ea8", "score": "0.6274809", "text": "public function set() {\n\t\t}", "title": "" }, { "docid": "4944896b2a5ff1d6e4e17148cd1d692a", "score": "0.6164283", "text": "public function setMeta()\n {\n // Carga los datos del meta\n $send_meta_data = WebSite::where('id', $this->web_sis)->first();\n $send_meta_title = $this->seo_title;\n $send_meta_description = $this->seo_description;\n $send_meta_keywords = $this->seo_keywords;\n $send_lang = $this->lang;\n // Indicar si queremos que se indexe o no a los robots\n $send_meta_robot = 'index,follow';\n // Carga de los metadatos en esta variable para ser pasados al view\n $this->meta_sis = CoreMeta::MetaTags($send_meta_data, $send_lang, $send_meta_title, $send_meta_description, $send_meta_keywords, $send_meta_robot);\n }", "title": "" }, { "docid": "e732084c0e2e09258848d387b3c7a199", "score": "0.6156858", "text": "private function setMetabox(){\n\n\n\t\t}", "title": "" }, { "docid": "482bda2be6ec5bca6786f2dfab89f90c", "score": "0.61354923", "text": "function setNome($nome) {\r\n $this->nome = $nome;\r\n}", "title": "" }, { "docid": "80c6ba5a23e42d7f28f6e84a1cd408fd", "score": "0.6103633", "text": "public function setTitulo($val){ // $titulos\n\n $this->titulo = $val;\n\n }", "title": "" }, { "docid": "1f1cf39d15f9c40e9808734d2cb9e5da", "score": "0.5996923", "text": "public function setMetodo($metodo)\r\n {\r\n $this->metodo = $metodo;\r\n }", "title": "" }, { "docid": "37c8a01523dd390141dedd8d85cc15f9", "score": "0.59879434", "text": "public function ligarMudo()\n {\n }", "title": "" }, { "docid": "605823e15d6bba4bb2937e733d0de3a7", "score": "0.5912104", "text": "public static function set() {\n ArmadoLinks::setCacheURL();\n $url = ArmadoLinks::getCacheURL();\n\n $secciones = '';\n if (VariableControl::getSitioNombre() === false) {\n if (is_string($url) && ($url != '')) {\n $secciones = strtr($url, array('/' => ' | ', '-' => ' - '));\n }\n if (isset($_GET['id'])) {\n $secciones = substr($secciones, 0, -(strlen($_GET['id']) + 3));\n }\n }\n\n $sitio_nombre = VariableGet::globales('sitio_nombre') . $secciones;\n\n if ((VariableGet::sistema('subniveles_inferiores_css_js') != false) && (VariableGet::sistema('subniveles_inferiores_css_js') != '')) {\n $url_subnivel = '/' . VariableGet::sistema('subniveles_inferiores_css_js');\n } else {\n $url_subnivel = '';\n }\n\n $encabezados = '\n <meta charset=\"UTF-8\">\n <title>' . $sitio_nombre . '</title>\n <link rel=\"icon\" href=\"' . $url_subnivel . '/favicon.ico\" type=\"image/x-icon\">\n <link rel=\"shortcut icon\" href=\"' . $url_subnivel . '/favicon.ico\" type=\"image/x-icon\">\n <meta name=\"title\" CONTENT=\"' . $sitio_nombre . '\">\n <link rel=\"canonical\" href=\"' . self::urlActual() . '\" />\n <meta name=\"description\" CONTENT=\"' . VariableGet::globales('sitio_description') . '\">\n <meta name=\"keywords\" CONTENT=\"' . VariableGet::globales('sitio_palabras_claves') . '\">\n <meta name=\"generator\" content=\"KIRKE-framework ' . Version::get() . '\" >\n <meta name=\"robots\" CONTENT=\"all\">\n <meta name=\"rating\" content=\"General\">' . RedesSociales::obtenerDatos() . '\n <link rel=\"stylesheet\" type=\"text/css\" href=\"' . $url_subnivel . '/css/estilos.css\">';\n\n if (ArmadoFormulario::existeFormulario()) {\n $encabezados .= '\n <link rel=\"stylesheet\" type=\"text/css\" href=\"' . $url_subnivel . '/css/formulario.css\">';\n }\n\n $encabezados .= '\n <script type=\"text/javascript\" language=\"javascript\" src=\"' . $url_subnivel . '/js/jquery.js\"></script>';\n if (ArmadoFormulario::existeFormulario()) {\n $encabezados .= '\n <script type=\"text/javascript\" language=\"javascript\" src=\"' . $url_subnivel . '/js/formulario.js\"></script>\n <script type=\"text/javascript\" language=\"javascript\" src=\"' . $url_subnivel . '/js/formulario_validaciones.js\"></script>';\n }\n\n if (ArmadoFormulario::existeFormulario()) {\n $encabezados .= '\n <script type=\"text/javascript\">\n $(document).ready(function(){';\n $encabezados .= '\n formulario();';\n $encabezados .= '\n });\n </script>';\n }\n\n if (count(self::$encabezados_estaticos) > 0) {\n $encabezados .= implode(\"\\n\", self::$encabezados_estaticos) . \"\\n\";\n }\n VariableSet::globales('kk_encabezados', $encabezados);\n }", "title": "" }, { "docid": "3c9a4c7b5cec44f0b0abdbae710e865f", "score": "0.58491254", "text": "function __construct ()\r\n\t{\r\n\t\t# run the set function\r\n\t\t$this->set();\r\n\t}", "title": "" }, { "docid": "ca1e8206578476ea8627a0e6c2b60e5a", "score": "0.5830914", "text": "function call_to_set_items()\r\n\t{\r\n\t\t//pass @todo.. think of what the function should do first\r\n\t}", "title": "" }, { "docid": "b4579449a31da7ecaa52486b9a016ef1", "score": "0.5827072", "text": "function setNombre($val)\n { $this->nombre=$val;}", "title": "" }, { "docid": "e9711735866dccab60fff3e3a6863b8d", "score": "0.58247745", "text": "function setTitulo($titulo) {\n $this->titulo = $titulo;\n }", "title": "" }, { "docid": "a8a6993336f0e84331f71557e63121d0", "score": "0.5795605", "text": "function setidasistencia($val) {$this->idasistencia=$val;}", "title": "" }, { "docid": "3f53a2dcd4e1d1077aff2e8615c28c4b", "score": "0.57796586", "text": "public function setSetings(){\n\n\t\t$this->theme->loader = $this;\n\n\t\t$this->theme->thmUrl = $this->config->base_url();\n\n\t}", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.5756164", "text": "abstract protected function setup();", "title": "" }, { "docid": "3838b50a0bc52a7cedec605802614228", "score": "0.5723491", "text": "protected function apagado()\n {\n }", "title": "" }, { "docid": "665f8bd336d23c192a1396e5f68dc26c", "score": "0.57081157", "text": "protected function setUp() {\n $this->object = new EdaAmbitos();\n\n $this->datos[0] = 18; // Id\n $this->datos[1] = 1; // Id_ambitotipo\n $this->datos[2] = 1; // Id_periodo\n $this->datos[3] = 'ACTIVO'; // estado {ACTIVO | INACTIVO}\n\n }", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.57025564", "text": "protected function setup() {}", "title": "" }, { "docid": "c750e6d98cc91450b042bee03a72ea16", "score": "0.56659645", "text": "public function masheryUseSettersAndGetters();", "title": "" }, { "docid": "dd7fab2c1203b30ee08d59a75a4f6fef", "score": "0.5661356", "text": "public function testSetOption()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "1322d97094f895cb46c16f24a16db59b", "score": "0.56352705", "text": "function setNombrePersona(){\r\n\r\n\t}", "title": "" }, { "docid": "58d9f6ada5ddc4272f0c536d93c3102e", "score": "0.562623", "text": "public function setNome($nome)\n{\n$this->nome = $nome;\n\nreturn $this;\n}", "title": "" }, { "docid": "4156891bcdaf4ef2f53ba20058002f92", "score": "0.56233484", "text": "public function setTitre($titre)\n{\n$this->titre = $titre;\n\nreturn $this;\n}", "title": "" }, { "docid": "5b30a8b9fe7b1a5e5922964e267edc67", "score": "0.5616516", "text": "protected function set_up()\n {\n }", "title": "" }, { "docid": "872e369e57aec89f10e2ece7779bdc1a", "score": "0.5602972", "text": "function __set($atributo,$valor) {\r\n $this->$atributo = $valor;\r\n}", "title": "" }, { "docid": "e2d4f952d634099bb0d0410420c06310", "score": "0.55687076", "text": "public function setUp() {\n $this->set= new HashSet();\n }", "title": "" }, { "docid": "ec7bd7f429f5e668262b1308fc1c547f", "score": "0.55686593", "text": "function __construct(){\n $this->_set = new Settings();\n\n }", "title": "" }, { "docid": "a8bfa17aa08ef1bac793adae8bc3008c", "score": "0.55663264", "text": "function __set($atributo,$valor){\r\n $this->$atributo = $valor;\r\n}", "title": "" }, { "docid": "6d2e0dc05e315a39ae218c1ea424f848", "score": "0.55656177", "text": "function Setancho($aa)\n{\n $this->ancho=$aa;\n}", "title": "" }, { "docid": "fa6aa415c5567eed63c3deba1300ec1a", "score": "0.5549973", "text": "protected function setup() { }", "title": "" }, { "docid": "003a41df79ba957730dfa90b4f48aad7", "score": "0.5549501", "text": "protected function setup(){\n \n }", "title": "" }, { "docid": "9c3de5488ac6bedf8fbfb2088fecb1b7", "score": "0.55484664", "text": "public function alterar(){\n\t}", "title": "" }, { "docid": "71a5d138e9e11a92d84450932f043e73", "score": "0.5544468", "text": "function set($data);", "title": "" }, { "docid": "f32cb060d8a5aa819ac6735333bf6725", "score": "0.5531025", "text": "public function setUp()\n\t{\n $this->CI = &get_instance();\n\t $this->CI->load->model('setsentity');\n\t $this->item = new SetsEntity();\n\t $this->item->setid = 1;\n\t $this->item->sofaid = 1;\n\t}", "title": "" }, { "docid": "6367c085b39115b4397d347d33ceb85c", "score": "0.552656", "text": "public function setup()\n {\n $this->_model = Kizano::getInstance();\n }", "title": "" }, { "docid": "29bc52f24b3763bd2ae8276c5bb0a99d", "score": "0.55237985", "text": "private function __construct()\n {\n $this->set();\n }", "title": "" }, { "docid": "91c0fcbfe9b9c68a0f6166baf8aebe42", "score": "0.5518513", "text": "function admin_fetes(){\n\n\t\t$this->set($d);\n\n\t}", "title": "" }, { "docid": "891711bec89b04b70477e01d63faa6a9", "score": "0.5516314", "text": "function cl_lab_requisicao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"lab_requisicao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "195f6948d912e8666b59b79a91c5b302", "score": "0.5505571", "text": "function emplois_autoriser(){}", "title": "" }, { "docid": "f3f5a6427dbba6a2c1d30b0bbb6ba248", "score": "0.54964435", "text": "function cl_empagenotasordem() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagenotasordem\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54879653", "text": "public static function setters();", "title": "" }, { "docid": "7eed5574d1d0ec9f91d13152e157009a", "score": "0.54817563", "text": "public function set_suara($suaranya){\n $this->suara = $suaranya;\n return $this; //menambakan keyword this, gunanya untuk mengembalikan objeknya yaitu '$objek_manusia'\n }", "title": "" }, { "docid": "030c3e9dcfa6c0bbd78ed91b07482b66", "score": "0.54814905", "text": "function cl_avaliacaoestruturafrequencia() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturafrequencia\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "916a1282f9a24fd2df1c44c47ada0360", "score": "0.54753596", "text": "public function refrshMe()\n {\n \n }", "title": "" }, { "docid": "adad34dcb75c9b14e4fbbe75b812de19", "score": "0.54738253", "text": "public function kontak()\n {\n }", "title": "" }, { "docid": "7472728d40fb4bd8c90c4c3392b22f8c", "score": "0.5472842", "text": "public function setTitulo($titulo){\n\t\t$this->titulo = $titulo;\n\t}", "title": "" }, { "docid": "8316fb2e093eaa03c4411241b0fd5e5b", "score": "0.5471874", "text": "protected function setUp()\n {\n $this->object = new VarietyDescriptionAmateur;\n /*\n * @todo: uncomment this line\n * $this->object = new VarietyDescriptionAmateur;\n */\n }", "title": "" }, { "docid": "403cf9412eff00e18f56a51d55ccee56", "score": "0.5468215", "text": "protected function setUp() {\r\n $this->object = new ValidaDadosCandidato;\r\n \r\n $this->object->set('login', 'teste');\r\n $this->object->set('nomeCompleto', 'rodrigo teste');\r\n $this->object->set('senha1', '123456');\r\n $this->object->set('senha2', '123456');\r\n $this->object->set('cpf', '11111111111');\r\n $this->object->set('email', '[email protected]'); \r\n $this->object->set('telefone', '11111111');\r\n $this->object->set('conclusao', 'teste');\r\n\r\n }", "title": "" }, { "docid": "2bb75e57c75af3160c7504c62e9ac005", "score": "0.54603124", "text": "public function test__get()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "2bb75e57c75af3160c7504c62e9ac005", "score": "0.54603124", "text": "public function test__get()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "59528b831b009c64b51da1bdaec6c29a", "score": "0.5459247", "text": "function alta($objeto){\n\n\t\t\n\t\t\t$objeto->agregar($objeto);\n\t\n\t\t}", "title": "" }, { "docid": "6b66c53eb03e7f18cd3001233fd41e3f", "score": "0.5455297", "text": "protected function setUp() {\n $this->object = new JsonData(\"nome\", null);\n }", "title": "" }, { "docid": "065520898913ea0f86fd85ac09899bde", "score": "0.54392856", "text": "public function setup() { \r\n }", "title": "" }, { "docid": "1d8e26c15745e5f527eacc324ae59c5f", "score": "0.5437718", "text": "function cl_configdbprefarretipo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"configdbprefarretipo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "2d4aa396ed0b4cf35498a9b6fb9409b1", "score": "0.54352146", "text": "public function setSetor($setor)\n{\n$this->setor = $setor;\nreturn $this;\n}", "title": "" }, { "docid": "721802282154e577bee73bc1634f2ebb", "score": "0.543434", "text": "function setData($the_spry, $the_name, $the_label, $the_required, $the_size, $the_tooltip, $the_class, $the_action, $the_data, $the_msg_required, $the_noManage){\n\t\t\t$this->spry = $the_spry; $this->name = $the_name; $this->label = $the_label; $this->required = $the_required; $this->size = $the_size; $this->tooltip = $the_tooltip; $this->class = $the_class; $this->action = $the_action; $this->data = $data; $this->msg_required = $the_msg_required; $this->noManage = $the_noManage;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "d06b8b7e71ec79d5513f2b3d6440919d", "score": "0.5427556", "text": "protected function __setup() {\n \n }", "title": "" }, { "docid": "3bf861a32cb77115961836c9661a99db", "score": "0.5426807", "text": "public function testSetOptions()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "0e2227583792aec710e64630852f7c84", "score": "0.5422217", "text": "protected function setUp() {\n $this->object = new Cidade;\n $this->object->setID('1');\n $this->object->setNome('Criciúma');\n $this->object->setSigla_uf('SC');\n }", "title": "" }, { "docid": "15b7845fd0949524498719dff2d71606", "score": "0.5420928", "text": "function Fiche()\n{\n\t$this->type_moi = \"fiches\";\n}", "title": "" }, { "docid": "2690cca5506ad24438ebbc65b7292512", "score": "0.5416327", "text": "abstract function setPermisos();", "title": "" }, { "docid": "7c89e053d9873622d4b779a004454bcb", "score": "0.5410712", "text": "private function setNombre($nombre){\n \t$this->nombre=$nombre;\n }", "title": "" }, { "docid": "717bb2e1f589b3ff069c59f1ad2bc739", "score": "0.5402622", "text": "public function setName($name){\n $this->nombre=$name;\n }", "title": "" }, { "docid": "908f6174713274ac09d3679c6dbb7bdf", "score": "0.5402455", "text": "function cl_administracaomedicamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"administracaomedicamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "31750a14e4b4e77eaafd12d1f5ae2dff", "score": "0.5399985", "text": "function cl_bancohoras() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bancohoras\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6c32e152a4f40dce79bcd8e8cf04d88b", "score": "0.5395657", "text": "public function setup() {\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| BASIC CRUD INFORMATION\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n $this->crud->setModel(\"App\\Models\\Memoire\");\n $this->crud->setRoute(\"admin/memoire\");\n $this->crud->setEntityNameStrings('mémoire', 'mémoires');\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| COLUMNS AND FIELDS\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\t\t// ------ CRUD COLUMNS\n $this->crud->setColumns(['titre']);\n\t\t// ------ CRUD FIELDS\n $this->crud->addField([\n\t\t\t'name' => 'titre',\n\t\t\t'label' => \"Titre*\"\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'image',\n\t\t\t'label' => \"Image\",\n\t\t\t'type' => 'browse'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'resume',\n\t\t\t'label' => \"Résumé*\",\n\t\t\t'type' => 'wysiwyg'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'texte',\n\t\t\t'label' => \"Texte\",\n\t\t\t'type' => 'wysiwyg'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'etudiant',\n\t\t\t'label' => \"Nom de l'étudiant*\"\n\t\t]);\n }", "title": "" }, { "docid": "88f5707b8fad534ad2a8e7c6a370519e", "score": "0.53916585", "text": "public function setup($moo, $foo = 'test123') {\n\t}", "title": "" }, { "docid": "db041a5c8500b207d75c681762f08ff2", "score": "0.5380402", "text": "function setLugar($slugar = '')\n {\n $this->slugar = $slugar;\n }", "title": "" }, { "docid": "b2d959576b99266b40e4ef01f27b7878", "score": "0.53796697", "text": "public function setNom($nom)\n{\n$this->nom = $nom;\n\nreturn $this;\n}", "title": "" }, { "docid": "b07291d10a0b686aca425e7c7243d2d8", "score": "0.53795165", "text": "public function getSetor()\n{\nreturn $this->setor;\n}", "title": "" }, { "docid": "8c19639783bfb24c49bb53892396dae1", "score": "0.5375743", "text": "function cl_rhgeracaofolha() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhgeracaofolha\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0bb14af332b439b4c39bdfc6d77d0af7", "score": "0.5371215", "text": "public function __construct() {\n $this->nombre = \"Antonio Almeida\";\n $this->email = \"[email protected]\";\n }", "title": "" }, { "docid": "1f1a18ecc745b44151fe43808b199257", "score": "0.5363843", "text": "public function setTrabalhando($trabalhando)\n{\n$this->trabalhando = $trabalhando;\nreturn $this;\n}", "title": "" }, { "docid": "eb0a77ca8b625f0c782997bdbd602767", "score": "0.53589284", "text": "public function __construct()\n {\n $this->dataSekolah = env('MOCKUP_MODE', false) ? DataSekolah::getMockup() : DataSekolah::get();\n }", "title": "" }, { "docid": "067f373ddb924e1e47df1e77b1e12b69", "score": "0.5358243", "text": "protected function setUp() {\r\n $this->object = new Primzahl;\r\n }", "title": "" }, { "docid": "fdc5270aca47745b345955d462627eee", "score": "0.53505504", "text": "public function testGettersAndSettersPrenom(){\n $patient = $this->getPatient(\"Dupont\",\"David\",30);\n $patient->setPrenom(\"David\");\n $this->assertEquals(\"David\",$patient->getPrenom());\n }", "title": "" }, { "docid": "5197355c65543dc57e3db38e431c90b5", "score": "0.5346158", "text": "public function access ()\n\t{\n\t\t$this->age = 234; # change a public value\n\t\t$this->junk = 'foul'; # change a protected value\n\t\t$this->thoughts = 'sleeping'; # does not modify User thoughts or cause error!!\n\t}", "title": "" }, { "docid": "70981d957c65dc8647c148730fa9015c", "score": "0.53407717", "text": "public function testGettersAndSettersNom(){\n $patient = $this->getPatient(\"Dupont\",\"David\",30);\n $patient->setNom(\"Dupont\");\n $this->assertEquals(\"Dupont\",$patient->getNom());\n }", "title": "" }, { "docid": "512859433b949ceae306fa85e2c58eff", "score": "0.5334929", "text": "public function beforeSet()\n {\n $name = trim($this->getProperty('content_key'));\n if (empty($name)) {\n $this->modx->error->addField('content_key', $this->modx->lexicon('Вы должны указать ключ в контенте'));\n }\n\n $name = trim($this->getProperty('key_text'));\n if (empty($name)) {\n $this->modx->error->addField('key_text', $this->modx->lexicon('Вы должны заполнить содержимое'));\n }\n\n return parent::beforeSet();\n }", "title": "" }, { "docid": "1725f1c7a38ad0cbc049368bc44603f7", "score": "0.5331066", "text": "function admin_contenu(){\n\n\t\t$this->set($d);\n\n\t}", "title": "" }, { "docid": "ac73b45ff70fdf5040e602f2e745adb2", "score": "0.53283936", "text": "public function setSenha($senha)\n{\n$this->senha = $senha;\n\nreturn $this;\n}", "title": "" }, { "docid": "094d553e71cc293e994b7f7168e0070a", "score": "0.5319412", "text": "private function init(): void\n {\n $name = 'some name';\n $status = 10;\n $this->name = $name;\n $this->status = $status;\n }", "title": "" }, { "docid": "9d0e2996568d28631d4d216dff4b750e", "score": "0.5316865", "text": "protected function setUp(): void {\n $this->list = new Ul();\n }", "title": "" }, { "docid": "beed4c1d24d9f3ad9171934ecb64860c", "score": "0.5316729", "text": "public function setup() {\n $pageObj = $this->getPageObj();\n if (!$pageObj) {\n $page['user_id'] = $this->getId();\n $page['route'] = Util::prepareUrl($this->getName());\n $page['active'] = 0;\n Model_Page::addPageObj($page);\n }\n $settingObj = $this->getSettingObj();\n if (!$settingObj) {\n Model_Settings::addSettingObj($this->getId(),1,0,0,0);\n }\n }", "title": "" }, { "docid": "49579c724c296f2df434164c2669ff8a", "score": "0.531669", "text": "public function test__isset()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "a65ff006ae78eb4498dfe2a2f061e217", "score": "0.5311937", "text": "public function __construct()\n {\n $this->tituloVista = 'Documento Trámites';\n }", "title": "" }, { "docid": "35b7bd47e98cfe4a844a5e8be2a0d638", "score": "0.53082573", "text": "function setSubmissao (\t$titulo,\n \t$secao,\n \t$autor,\n \t$co_autores,\n \t$d_original,\n \t$d_revisao,\n \t$d_aceitacao,\n \t$palavras_chave,\n \t$status )\n {\n\t$this->titulo= $titulo;\n\t$this->secao= $secao;\n\t$this->autor= $autor;\n\t$this->co_autores= $co_autores;\n\t$this->d_original= $d_original;\n\t$this->d_revisao= $d_revisao;\n\t$this->d_aceitacao= $d_aceitacao;\n\t$this->palavras_chave= $d_aceitacao;\n\t$this->status = $d_aceitacao;\n\n }", "title": "" }, { "docid": "59d24efb2ec41e4184eb77042f2af143", "score": "0.53072697", "text": "public function setGoal()\n {\n }", "title": "" }, { "docid": "aa1f60d481da5c525336ac5d6655bd54", "score": "0.5302881", "text": "public function __construct()\n\t{\n\t\tglobal $majale;\n\t\t$this->majale = $majale;\n\t}", "title": "" }, { "docid": "6de613d44ece1654dd98f2b1f88ac10f", "score": "0.530142", "text": "function set_autocomplete($set)\n \t{\n \t\t$this->autocomplete = $set;\n \t}", "title": "" }, { "docid": "eb9c3137cd4fdd82879cfe05f59898bc", "score": "0.5300003", "text": "protected function setUp() {\n\t\tparent::setUp ();\n\t\t$this->a = 'a';\n\t\t$this->c = rest_Client::instance();\n\t}", "title": "" }, { "docid": "83eb7514b7a294876fda1f003d70bcc6", "score": "0.5297958", "text": "function cl_aluno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aluno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ad1892a2361ea926f21c472ec81453b4", "score": "0.529708", "text": "public function setup() {\n }", "title": "" }, { "docid": "216129fe1c62fee17f9d1750f28243b6", "score": "0.5295598", "text": "function Hijo($hijo) {\r\n $this ->Relaciones('hijo', $hijo);\r\n $hijo->Relaciones('parentesco', $this);\r\n }", "title": "" }, { "docid": "f98010836f4a880aaa3cebb513414905", "score": "0.5294086", "text": "protected function set_default_value(){\n $this->set_view('sarung/admin/index');\n $this->set_min_power( 10 );\n\t\t$this->set_title('Negara');\n\t\t$this->set_body_attribute( \" class='admin admin_sarung_body' \" );\n $this->set_name_for_text('Negara');\n $this->set_negara_name('negara_name');\n $this->set_table_name('negara');\n //! for url\n $this->set_url_this_dele($this->get_url_admin_sarung().\"/negara/eventdel\" );\n $this->set_url_this_edit($this->get_url_admin_sarung().\"/negara/eventedit\");\n $this->set_url_this_add ($this->get_url_admin_sarung().\"/negara/eventadd\" );\n $this->set_url_this_view($this->get_url_admin_sarung().\"/negara\");\n\n $this->set_model_obj(new Negara_Model() );\n\t\t$this->set_inputs_rules( array( $this->get_negara_name() => 'required') );\n }", "title": "" }, { "docid": "830a7160be1c893194536f807ac0e4ce", "score": "0.5293853", "text": "function cl_rhlota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhlota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" } ]
4dfa664c83ff426d37720140289414a1
/ / Magic methods /
[ { "docid": "3c856dc444cb826d41c3a00c3c5c2d30", "score": "0.0", "text": "public function __toString () : string {\n return $this->ip;\n }", "title": "" } ]
[ { "docid": "82304869db2126aa7894cd950d960bae", "score": "0.6564463", "text": "abstract public function etc();", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.6456988", "text": "private function __() {\n }", "title": "" }, { "docid": "bd3b836095608767a9ca2835e744f8d4", "score": "0.640846", "text": "abstract protected function patchable();", "title": "" }, { "docid": "bc16a0f14fc15016cdea7e58b113007e", "score": "0.6259308", "text": "function _hook_methName(){}", "title": "" }, { "docid": "25119405211122839aa71ea28f059802", "score": "0.6225908", "text": "public function method()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "25119405211122839aa71ea28f059802", "score": "0.6225908", "text": "public function method()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "25119405211122839aa71ea28f059802", "score": "0.6225908", "text": "public function method()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "e4984a37af5708fa4445fbd3164161b3", "score": "0.61586875", "text": "function __constract()\n\t\t{\n\t\t\t}", "title": "" }, { "docid": "166dd4b8e15c674fb818112315eab1e5", "score": "0.6024415", "text": "abstract public function method();", "title": "" }, { "docid": "bdf2cef256fe39aa40fe93c73675d66e", "score": "0.60175276", "text": "public function forMods() {\n\t}", "title": "" }, { "docid": "7157f75462a924e0b17327f1834f8cbc", "score": "0.5981595", "text": "public function dummyMethod()\n {\n }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5882117", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5882117", "text": "final private function __construct() {}", "title": "" }, { "docid": "dd79160e84707e8545d7c73b5920ee0c", "score": "0.58808595", "text": "public function asasasd (){\n \t\n }", "title": "" }, { "docid": "32a8d1f128cecbb03359407ee8cf22b3", "score": "0.58422303", "text": "private function static_things()\r\n\t{\r\n\t\t# code...\r\n\t}", "title": "" }, { "docid": "fb4c3f07ec66dc085096bd8483bf3da6", "score": "0.57951266", "text": "private final function __construct(){}", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.5791575", "text": "private final function __construct() {}", "title": "" }, { "docid": "50c7e76fb6f8de39df9aa144d9b06add", "score": "0.5788539", "text": "public function method()\n {\n }", "title": "" }, { "docid": "f6730b7079c7e06a3b334221aedeca57", "score": "0.57862467", "text": "protected function _minutely() {\n\n }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.57800996", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.57800996", "text": "final private function __construct() { }", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5775541", "text": "private function __construct() {}", "title": "" }, { "docid": "c4a38ad89c1962d7456ec6f03134af64", "score": "0.5774745", "text": "abstract function methods();", "title": "" }, { "docid": "15f695115c2c735a8c346788b6cb2511", "score": "0.5769053", "text": "private function __construct (){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5762324", "text": "private function __construct(){}", "title": "" }, { "docid": "236d0b9a9f6746fec3fd59ead5fa9d9c", "score": "0.5728254", "text": "final private function __construct() {}", "title": "" }, { "docid": "18e66d0ed2857cc8fe47435b0e548e74", "score": "0.5723981", "text": "public function operator();", "title": "" }, { "docid": "af320883cb449fe40b4310f18d684895", "score": "0.5696884", "text": "abstract public function troCap();", "title": "" }, { "docid": "813b67675d2f7218fcf89417bb82a3f3", "score": "0.5677821", "text": "private function __construct()\n \t{\n \t\t\t\n \t}", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5665046", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5665046", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5665046", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.5660663", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.5660663", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.5660663", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.5660663", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.5660663", "text": "protected function __construct(){}", "title": "" } ]
12729d1d85e115907a47f3b64f68d9f2
Test for `scan()` method, from tests
[ { "docid": "68d8e1b8b3798c5204e913361cc447f5", "score": "0.59369814", "text": "public function testScanFromTests(): void\n {\n //Sets events. They will add some output to the `$this->debug` property\n $this->getEventManager()->instance()\n ->on('LinkScanner.beforeScanUrl', fn() => $this->debug[] = sprintf('Scanning %s', func_get_arg(1)))\n ->on('LinkScanner.foundLinkToBeScanned', fn() => $this->debug[] = sprintf('Found link: %s', func_get_arg(1)))\n ->on('LinkScanner.foundRedirect', fn() => $this->debug[] = sprintf('Found redirect: %s', func_get_arg(1)));\n\n $expectedDebug = [\n 'Scanning http://localhost',\n 'Found link: https://google.it',\n 'Scanning https://google.it',\n 'Found link: http://localhost/pages/first_page',\n 'Scanning http://localhost/pages/first_page',\n 'Found link: http://localhost/favicon.ico',\n 'Scanning http://localhost/favicon.ico',\n 'Found link: http://localhost/css/default.css',\n 'Scanning http://localhost/css/default.css',\n 'Found link: http://localhost/js/default.js',\n 'Scanning http://localhost/js/default.js',\n 'Found link: http://localhost/pages/second_page',\n 'Scanning http://localhost/pages/second_page',\n 'Found link: http://localhost/pages/no-html',\n 'Scanning http://localhost/pages/no-html',\n 'Found link: http://localhost/pages/redirect',\n 'Scanning http://localhost/pages/redirect',\n 'Found link: http://localhost/pages/same-redirect',\n 'Scanning http://localhost/pages/same-redirect',\n ];\n $LinkScanner = $this->getLinkScannerClientReturnsFromTests();\n $LinkScanner->scan();\n $this->assertEquals($expectedDebug, $this->debug);\n\n //Results contain different status code\n $this->assertFalse($LinkScanner->ResultScan->match(['code' => 200])->isEmpty());\n $this->assertFalse($LinkScanner->ResultScan->match(['code' => 302])->isEmpty());\n $this->assertFalse($LinkScanner->ResultScan->match(['code' => 404])->isEmpty());\n\n //Results contain both internal and external urls\n $expectedInternal = [\n 'http://localhost',\n 'http://localhost/pages/first_page',\n 'http://localhost/favicon.ico',\n 'http://localhost/css/default.css',\n 'http://localhost/js/default.js',\n 'http://localhost/pages/second_page',\n 'http://localhost/pages/no-html',\n 'http://localhost/pages/redirect',\n 'http://localhost/pages/same-redirect',\n ];\n $expectedExternal = ['https://google.it'];\n $internalLinks = $LinkScanner->ResultScan->match(['external' => false])->extract('url');\n $externalLinks = $LinkScanner->ResultScan->match(['external' => true])->extract('url');\n $this->assertEquals($expectedInternal, $internalLinks->toList());\n $this->assertEquals($expectedExternal, $externalLinks->toList());\n\n $this->debug = [];\n\n $expectedDebug = [\n 'Scanning http://localhost',\n 'Found link: https://google.it',\n 'Scanning https://google.it',\n 'Found link: http://localhost/pages/first_page',\n 'Scanning http://localhost/pages/first_page',\n 'Found link: http://localhost/favicon.ico',\n 'Scanning http://localhost/favicon.ico',\n 'Found link: http://localhost/css/default.css',\n 'Scanning http://localhost/css/default.css',\n 'Found link: http://localhost/js/default.js',\n 'Scanning http://localhost/js/default.js',\n 'Found link: http://localhost/pages/second_page',\n 'Scanning http://localhost/pages/second_page',\n 'Found link: http://localhost/pages/no-html',\n 'Scanning http://localhost/pages/no-html',\n 'Found link: http://localhost/pages/redirect',\n 'Scanning http://localhost/pages/redirect',\n 'Found redirect: http://localhost/pages/third_page',\n 'Scanning http://localhost/pages/third_page',\n 'Found link: http://localhost/pages/same-redirect',\n 'Scanning http://localhost/pages/same-redirect',\n ];\n $LinkScanner = $this->getLinkScannerClientReturnsFromTests();\n $LinkScanner->setConfig('followRedirects', true)->scan();\n $this->assertEquals($expectedDebug, $this->debug);\n\n array_pop($expectedInternal);\n array_pop($expectedInternal);\n $expectedInternal[] = 'http://localhost/pages/third_page';\n $internalLinks = $LinkScanner->ResultScan->match(['external' => false])->extract('url');\n $externalLinks = $LinkScanner->ResultScan->match(['external' => true])->extract('url');\n $this->assertEquals($expectedInternal, $internalLinks->toList());\n $this->assertEquals($expectedExternal, $externalLinks->toList());\n\n $LinkScanner = $this->getLinkScannerClientReturnsFromTests();\n $LinkScanner->setConfig('maxDepth', 1)->scan();\n $this->assertCount(1, $LinkScanner->ResultScan);\n $item = $LinkScanner->ResultScan->first();\n $this->assertSame($item->get('code'), 200);\n $this->assertFalse($item->get('external'));\n $this->assertEmpty($item->get('referer'));\n $this->assertStringStartsWith('text/html', $item->get('type'));\n $this->assertSame($item->get('url'), 'http://localhost');\n\n $LinkScanner = $this->getLinkScannerClientReturnsFromTests();\n $LinkScanner->setConfig('exportOnlyBadResults', true)->scan();\n $LinkScanner->export();\n $this->assertTrue($LinkScanner->ResultScan->match(['code' => 200])->isEmpty());\n $this->assertTrue($LinkScanner->ResultScan->match(['code' => 302])->isEmpty());\n $this->assertFalse($LinkScanner->ResultScan->match(['code' => 404])->isEmpty());\n }", "title": "" } ]
[ { "docid": "fa341ffbf2c24b5d645fcd615bcbcd9a", "score": "0.80410755", "text": "abstract public function scan();", "title": "" }, { "docid": "5533d189d72139a0ae5444b22540bedb", "score": "0.7928984", "text": "public function scan();", "title": "" }, { "docid": "bcbbb97bcafdd0869530707a437a6ea2", "score": "0.7117959", "text": "private function testscanList() {\n\n self::writeInfo(\"Testing scanList()...\");\n try {\n\n // Do the call\n $test = $this->scanList();\n\n // Test if anything is returned\n if (count($test) <= 0)\n self::writeWarning(\"Empty response for scanList(). It could mean that there are 0 scans for this user. Rest of the tests will not run.\");\n\n if (count($test) > 0) {\n\n self::writeInfo(\"Received \" . count($test) . \" scans. Trying to access values from the first one...\");\n $first_key = key($test);\n\n self::writeInfo(\n \"Scan 1 has (uuid, completion_current, completion_total, readablename, status, start_time) (\"\n . $first_key . \", \"\n . $test[$first_key]['completion_current'] . \", \"\n . $test[$first_key]['completion_total'] . \", \"\n . $test[$first_key]['readablename'] . \", \"\n . $test[$first_key]['status'] . \", \"\n . $test[$first_key]['start_time'] . \", \"\n . \")\"\n );\n }\n\n self::writeOk(\"scanList() testing passed.\");\n $this->success_count++;\n\n } catch (\\Exception $e) {\n\n self::writeError(\"scanList() test failed. Error: \" . $e->getMessage());\n $this->failure_count++;\n }\n }", "title": "" }, { "docid": "1fbd866b9043fc3f42ba2673b1a0116d", "score": "0.66942334", "text": "public function testScanItemsSchemeType1() : void\n {\n $this->checkOut->scan('ipd');\n $this->checkOut->scan('ipd');\n $billAmount = $this->checkOut->total();\n $this->assertSame($billAmount);\n\n }", "title": "" }, { "docid": "773654cee97490f7e8468a740d0d5e85", "score": "0.6463274", "text": "private function testscanResume() {\n\n self::writeInfo(\"Testing scanResume()...\");\n try {\n\n self::writeInfo(\"Sleeping for 3s to allow Nessus to do 'things'...\");\n sleep(3);\n\n // Do the call\n $test = $this->scanResume($this->running_scan_uuid);\n\n self::writeInfo(\n \"Paused scan \" . $this->running_scan_uuid\n . \". Nessus response was (readableName, start_time, status, name, uuid, shared, user_permissions, default_permisssions, owner, owner_id, last_modification_date, creation_date, type, id) (\"\n . $test['response']['readableName'] . \", \"\n . $test['response']['start_time'] . \", \"\n . $test['response']['status'] . \", \"\n . $test['response']['name'] . \", \"\n . $test['response']['uuid'] . \", \"\n . $test['response']['shared'] . \", \"\n . $test['response']['user_permissions'] . \", \"\n . $test['response']['default_permisssions'] . \", \"\n . $test['response']['owner'] . \", \"\n . $test['response']['owner_id'] . \", \"\n . $test['response']['last_modification_date'] . \", \"\n . $test['response']['creation_date'] . \", \"\n . $test['response']['type'] . \", \"\n . $test['response']['id'] . \", \"\n . \")\"\n );\n\n self::writeOk(\"scanResume() testing passed.\");\n $this->success_count++;\n\n } catch (\\Exception $e) {\n\n self::writeError(\"scanResume() test failed. Error: \" . $e->getMessage());\n $this->failure_count++;\n }\n }", "title": "" }, { "docid": "672d1f46728c14480ba3d3518c890bb9", "score": "0.62618995", "text": "private function testscanPause() {\n\n self::writeInfo(\"Testing scanPause()...\");\n try {\n\n self::writeInfo(\"Sleeping for 3s to allow Nessus to do 'things'...\");\n sleep(3);\n\n // Do the call\n $test = $this->scanPause($this->running_scan_uuid);\n\n self::writeInfo(\n \"Paused scan \" . $this->running_scan_uuid\n . \". Nessus response was (readableName, start_time, status, name, uuid, shared, user_permissions, default_permisssions, owner, owner_id, last_modification_date, creation_date, type, id) (\"\n . $test['response']['readableName'] . \", \"\n . $test['response']['start_time'] . \", \"\n . $test['response']['status'] . \", \"\n . $test['response']['name'] . \", \"\n . $test['response']['uuid'] . \", \"\n . $test['response']['shared'] . \", \"\n . $test['response']['user_permissions'] . \", \"\n . $test['response']['default_permisssions'] . \", \"\n . $test['response']['owner'] . \", \"\n . $test['response']['owner_id'] . \", \"\n . $test['response']['last_modification_date'] . \", \"\n . $test['response']['creation_date'] . \", \"\n . $test['response']['type'] . \", \"\n . $test['response']['id'] . \", \"\n . \")\"\n );\n\n self::writeOk(\"scanPause() testing passed.\");\n $this->success_count++;\n\n } catch (\\Exception $e) {\n\n self::writeError(\"scanPause() test failed. Error: \" . $e->getMessage());\n $this->failure_count++;\n }\n }", "title": "" }, { "docid": "9c4226abd6b3ea56260cc477e1afa531", "score": "0.6245288", "text": "public function __construct(Scan $scan)\n {\n $this->scan = $scan;\n }", "title": "" }, { "docid": "6813d33123ee9a4a4e735a446a711165", "score": "0.60673296", "text": "private function testscanStop() {\n\n self::writeInfo(\"Testing scanStop()...\");\n try {\n\n self::writeInfo(\"Sleeping for 3s to allow Nessus to do 'things'...\");\n sleep(3);\n\n // Do the call\n $test = $this->scanStop($this->running_scan_uuid);\n\n self::writeInfo(\n \"Paused scan \" . $this->running_scan_uuid\n . \". Nessus response was (readableName, start_time, status, name, uuid, shared, user_permissions, default_permisssions, owner, owner_id, last_modification_date, creation_date, type, id) (\"\n . $test['response']['readableName'] . \", \"\n . $test['response']['start_time'] . \", \"\n . $test['response']['status'] . \", \"\n . $test['response']['name'] . \", \"\n . $test['response']['uuid'] . \", \"\n . $test['response']['shared'] . \", \"\n . $test['response']['user_permissions'] . \", \"\n . $test['response']['default_permisssions'] . \", \"\n . $test['response']['owner'] . \", \"\n . $test['response']['owner_id'] . \", \"\n . $test['response']['last_modification_date'] . \", \"\n . $test['response']['creation_date'] . \", \"\n . $test['response']['type'] . \", \"\n . $test['response']['id'] . \", \"\n . \")\"\n );\n\n self::writeOk(\"scanStop() testing passed.\");\n $this->success_count++;\n\n } catch (\\Exception $e) {\n\n self::writeError(\"scanStop() test failed. Error: \" . $e->getMessage());\n $this->failure_count++;\n }\n }", "title": "" }, { "docid": "6b8fa9531bca9c588d5ccd555cf0c4a4", "score": "0.58720356", "text": "public function scan(string $sku);", "title": "" }, { "docid": "be9635d16c3fc8e4af66cb692eaebed3", "score": "0.57827574", "text": "public function init_scan() {\r\n\t\t// Clear the cache.\r\n\t\t$this->clear_cache();\r\n\r\n\t\t// Start the test.\r\n\t\tself::set_doing_report();\r\n\t\t$api = Utils::get_api();\r\n\t\t$api->performance->ping();\r\n\r\n\t\t// Clear dismissed report.\r\n\t\tif ( self::report_dismissed() ) {\r\n\t\t\tself::dismiss_report( false );\r\n\t\t}\r\n\r\n\t\t// TODO: this creates a duplicate task from cron.\r\n\t\tdo_action( 'wphb_init_performance_scan' );\r\n\t}", "title": "" }, { "docid": "f4c03ec261ec7609723a35c1b9fbba49", "score": "0.573497", "text": "private function testnewScanTemplate() {\n\n self::writeInfo(\"Testing newScanTemplate()...\");\n try {\n\n self::writeInfo(\"Preparing some fake data for a scan...\");\n\n // First, we need to prepare some premade data\n $template_name = \"PHPNessusAPI \" . self::$version . \" Function Test\";\n\n // We will just scan 127.0.0.0/8 for testing purposes\n $target = \"127.0.0.0/8\";\n\n // Choose now + 1 year for the test scheduled scan.\n $starttime = \\Carbon\\Carbon::now('UTC')->addYear();\n\n // Parse the date into something that Nessus Understands, ie 20150819T155405+0000\n $parsedtime = $starttime->year\n . sprintf('%02d', $starttime->month)\n . sprintf('%02d', $starttime->day)\n . 'T'\n . sprintf('%02d', $starttime->hour)\n . sprintf('%02d', $starttime->minute)\n . sprintf('%02d', $starttime->second)\n . '0000';\n\n // Ask for a policyID\n self::writeInfo(\"Asking Nessus for a Policy ID to use...\");\n\n $policy = $this->policyList();\n $policy_id = key($policy['policies']);\n\n self::writeInfo(\"Will use PolicyID \" . $policy_id . \" called \" . $policy['policies'][$policy_id]);\n\n self::writeWarning(\n \"Scheduling a scan to start at \" . $starttime->toDateTimeString() . \" for \" .\n $target . \" using a template name of '\" . $template_name . \"'\"\n );\n\n // Do the call\n $test = $this->newScanTemplate($template_name, $policy_id, $target, $parsedtime);\n\n // Test if everything is OK\n if (!isset($test['response'])) {\n\n self::writeWarning(\"Empty response for newScanTemplate(). Investigate this!\");\n $this->failure_count++;\n\n return;\n }\n\n // Print the response\n self::writeInfo(\n \"Scheduled scan details (name, policy_id, readableName, owner, target, rRules, startTime) (\"\n . $test['response']['name'] . \", \"\n . $test['response']['policy_id'] . \", \"\n . $test['response']['readableName'] . \", \"\n . $test['response']['owner'] . \", \"\n . $test['response']['target'] . \", \"\n . $test['response']['rRules'] . \", \"\n . $test['response']['startTime'] . \", \"\n . \")\"\n );\n\n $this->scheduled_scan_template_uuid = $test['response']['name'];\n\n self::writeOk(\"newScanTemplate() testing passed.\");\n $this->success_count++;\n\n } catch (\\Exception $e) {\n\n self::writeError(\"newScanTemplate() test failed. Error: \" . $e->getMessage());\n $this->failure_count++;\n }\n }", "title": "" }, { "docid": "7b842ff8664de8a1ccbbb3c449c00161", "score": "0.56197315", "text": "private function __scan($format) \n\t{ \n\t\tif( !is_null($this->_handle) ) \n\t\t\treturn fscanf( $this->_handle, $format ); \n\t\treturn; \n\t}", "title": "" }, { "docid": "95c0b8d27b6d68ec181e1e9305c81b1e", "score": "0.5609723", "text": "public function testGetReader()\n {\n }", "title": "" }, { "docid": "6094574971959f0913226b9d039d7752", "score": "0.5514383", "text": "public function stepScan()\n\t{\n\t\tif (!$this->scanEngineSetup())\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'status' => false,\n\t\t\t\t'error' => 'Could not load the file scanning engine; please try reinstalling the component',\n\t\t\t\t'done' => true\n\t\t\t);\n\t\t}\n\n\t\tFactory::loadState(AKEEBA_BACKUP_ORIGIN);\n\n\t\t$kettenrad = Factory::getKettenrad();\n\n\t\t$kettenrad->tick();\n\n\t\tFactory::saveState(AKEEBA_BACKUP_ORIGIN);\n\n\t\treturn $this->parseScanArray($kettenrad->getStatusArray());\n\t}", "title": "" }, { "docid": "145ad00d517735f8147b8ea6861191b2", "score": "0.5405625", "text": "public function __construct(Scanner $scanner) {\n $this->scanner = $scanner;\n }", "title": "" }, { "docid": "3e8f2274ac3e43b936b48ee2d1108c7f", "score": "0.5391665", "text": "public function scanStarted(AbstractScanStrategy $scanStrategy, $detect): void\n {\n }", "title": "" }, { "docid": "8e5fee10024c9c1f977b4267b9b9216f", "score": "0.5357826", "text": "public function scan(&$iterator, $pattern = null, $count = null)\n {\n if ((string)$iterator === '0') {\n return null;\n }\n $this->init();\n if ($this->actualDriver() === self::DRIVER_PREDIS) {\n $returned = $this->driver->scan($iterator, ['match' => $pattern, 'count' => $count]);\n $iterator = $returned[0];\n return $returned[1];\n }\n return $this->driver->scan($iterator, $pattern, $count);\n }", "title": "" }, { "docid": "8c2bfde27aca64929773da0ae3823fcb", "score": "0.5334276", "text": "public function result(): ScanResult;", "title": "" }, { "docid": "a5c83a8c1f4e9af86adf1cdd9a11e884", "score": "0.52954507", "text": "public function hscan($key)\n {\n }", "title": "" }, { "docid": "6333a362d38dae8cd00d57da6f3ba85f", "score": "0.5254107", "text": "function scan($id, $duration=\"00:10:00\", $callback = FALSE) {\n\t\t$res = $this->send('/interface/wireless', 'scan', FALSE, array('.id' => $id, 'duration' => $duration), $callback);\n\t\t\n\t\tif($callback) {\n\t\t\treturn $res;\n\t\t}\n\n\t\t$results = array();\n\t\t\n\t\twhile(true) {\n\t\t\t$ret = array();\n\t\t\tswitch($type = $this->response($ret)) {\n\t\t\t\tcase '!done':\n\t\t\t\t\treturn $results;\n\t\t\t\t\t\n\t\t\t\tcase '!re':\n\t\t\t\t\t$results[$ret['address']] = $ret;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '!trap':\n\t\t\t\t\t$this->trap($ret);\n\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\techo(\"scan: undefined type: $type\\n\");\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "077d923abcb7acbdaa755bd8da7b0d7e", "score": "0.5218882", "text": "public static function scan($iterator, $patten=\"*\")\n {\n return self::instance()->scan($iterator, $patten);\n }", "title": "" }, { "docid": "22f36442804538d8d68c436b587d7d2d", "score": "0.52022815", "text": "public function vector_scan()\n\t{\n\t\t\n\t\t// Hostnames\n\t\t$vectors = $this->Vector->typeList('hostname', false, true);\n\t\t$this->out($this->Vector->shellOut());\n\t\t\n\t\t// add the new records\n\t\t$results = $this->Hostname->checkAddBlank(array_keys($vectors));\n\t\t$this->out($this->Hostname->shellOut());\n\t\t\n\t\t// Ip Addresses\n\t\t$vectors = $this->Vector->typeList('ipaddress', false, true);\n\t\t$this->out($this->Vector->shellOut());\n\t\t\n\t\t// add the new records\n\t\t$results = $this->Ipaddress->checkAddBlank(array_keys($vectors));\n\t\t$this->out($this->Ipaddress->shellOut());\n\t}", "title": "" }, { "docid": "a230741561123cc0a02dd4e11dfea915", "score": "0.51991326", "text": "public function start_a_scan() {\n\t\tif ( ! WD_Utils::check_permission() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( WD_Utils::http_post( 'wd_scan_nonce' ), 'wd_start_a_scan' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tWD_Scan_Api::clear_cache();\n\t\t$scan = WD_Scan_Api::create_scan_record();\n\n\t\tif ( ! is_wp_error( $scan ) ) {\n\t\t\t//setup a cronjob\n\t\t\t//wp_schedule_single_event( time(), 'wd_scanning_hook' );\n\t\t\twp_send_json( array(\n\t\t\t\t'status' => 1,\n\t\t\t\t'redirect_url' => network_admin_url( 'admin.php?page=wdf-scan' )\n\t\t\t) );\n\t\t} else {\n\t\t\twp_send_json( array(\n\t\t\t\t'status' => 0,\n\t\t\t\t'error' => $scan->get_error_message()\n\t\t\t) );\n\t\t}\n\t}", "title": "" }, { "docid": "a1d97e2a206df41b41ec1f73e31372b2", "score": "0.51781225", "text": "public function testIter()\n {\n $reduced = array(\n array('str' => 'abc', 'int' => 5, 'float' => 3.),\n array('str' => 'def', 'int' => 3, 'float' => 4.),\n );\n $reader = new Core\\AggregateReader($this->reader, 'str');\n $reader->reduce(\n array(new Core\\CallbackReduction('array_sum', 'int'), '__invoke'),\n array(new Core\\CallbackReduction('max', 'float'), '__invoke')\n );\n $this->assertEquals($reduced, iterator_to_array($reader));\n return;\n }", "title": "" }, { "docid": "6cc808a5d182a7836dd438ec11890c36", "score": "0.51754034", "text": "protected function _scan_devices() {\n $if = $this->db->pq(\"SELECT value FROM options WHERE name='scan_interface'\");\n if (!sizeof($if)) $this->error('No scan interface defined');\n $if = $if[0]['value'];\n\n $res = [];\n $devices = [];\n exec($this->nmcli.' dev wifi rescan ifname '.escapeshellarg($if).' 2>&1');\n exec($this->nmcli.' dev wifi list ifname '.escapeshellarg($if).' 2>&1', $res);\n\n array_shift($res);\n foreach ($res as $r) {\n $parts = preg_split('/\\s+/', $r);\n if (substr($parts[1], 0, strlen($this->baseid)) === $this->baseid) {\n array_push($devices, [\n 'ssid' => $parts[1],\n 'chan' => $parts[3],\n 'signal' => $parts[6],\n ]);\n }\n }\n\n $this->output($devices);\n }", "title": "" }, { "docid": "82719a6dff8ce4302d6f0dc7f43f6015", "score": "0.5173376", "text": "public function testListReaders()\n {\n }", "title": "" }, { "docid": "80035be729107ebb2be83b5b59e48b53", "score": "0.51731706", "text": "public function getScanners();", "title": "" }, { "docid": "a0dc75aa6d9d9f25f111519944007d18", "score": "0.51332575", "text": "public function __construct(\n protected ScanResult $result\n ) {\n }", "title": "" }, { "docid": "d2fc52e13de3c0903000f32f167824dc", "score": "0.51252496", "text": "public function scan($input) {\n\n\t\t$stream = $this->tokenize($input);\n\t\t$stream->rewind();\n\n\t\treturn $stream;\n\t}", "title": "" }, { "docid": "2a6a1670bfb22f79c160c79d576a6834", "score": "0.50976205", "text": "public function testCreateReader()\n {\n }", "title": "" }, { "docid": "200fddcb05a7ba762c910f5912f0213a", "score": "0.5092225", "text": "public function testReadBarcodes()\n {\n }", "title": "" }, { "docid": "8fc3e39d32394fbe28ceec37844324b5", "score": "0.5069823", "text": "public function testWhenIteratorUsageThenSucceeds()\n {\n $tokens = ['filename', 'test', 'test2'];\n $cmd = new Command($tokens);\n $cmd[0];\n $cmd->rewind();\n $cmd->next(); //skip -h\n $cmd->next(); //skip --help\n $val = $cmd->current();\n $key = $cmd->key();\n $this->assertEquals('test', $val);\n $this->assertEquals(2, $key);\n }", "title": "" }, { "docid": "6ce0a7219f60d162c7864021ec9747b8", "score": "0.5001288", "text": "public function processScan()\n {\n $moon_cnt = array();\n $goo_cnt = array();\n $res_arr = array();\n\n if (!empty($this->data_collector)) {\n foreach ($this->data_collector as $moon => $goo) {\n // assure the AtMoon entry exist to add goo to him\n $moon_id = $this->writeMoon($moon);\n $this->persistMoonGoo($moon_id, $goo);\n\n $moon_cnt[] = $moon_id;\n $goo_cnt = $goo_cnt + $goo;\n }\n $res_arr = array(\n 'moons' => count($moon_cnt),\n 'goo' => count($goo_cnt)\n );\n }\n return($res_arr);\n }", "title": "" }, { "docid": "45f4ebb314a1e6e5cb054e0313b606e9", "score": "0.49728692", "text": "public function getDataScan()\n {\n return $this->data_scan;\n }", "title": "" }, { "docid": "8a440c1d9e5684b011e498ab0b1be106", "score": "0.49396032", "text": "public function startScan()\n\t{\n\t\tif (!$this->scanEngineSetup())\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'status' => false,\n\t\t\t\t'error' => 'Could not load the file scanning engine; please try reinstalling the component',\n\t\t\t\t'done' => true\n\t\t\t);\n\t\t}\n\n\t\tPlatform::getInstance()->load_configuration(1);\n\t\tFactory::resetState();\n\t\tFactory::getFactoryStorage()->reset(AKEEBA_BACKUP_ORIGIN);\n\n\t\t$configOverrides['volatile.core.finalization.action_handlers'] = array(\n\t\t\tnew Email()\n\t\t);\n\n\t\t$configOverrides['volatile.core.finalization.action_queue'] = array(\n\t\t\t'remove_temp_files',\n\t\t\t'update_statistics',\n\t\t\t'update_filesizes',\n\t\t\t'apply_quotas',\n\t\t\t'send_scan_email'\n\t\t);\n\n\t\t// Apply the configuration overrides, please\n\t\t$platform = Platform::getInstance();\n\t\t$platform->configOverrides = $configOverrides;\n\n\t\t$kettenrad = Factory::getKettenrad();\n\t\t$options = array(\n\t\t\t'description' => '',\n\t\t\t'comment' => '',\n\t\t\t'jpskey' => ''\n\t\t);\n\t\t$kettenrad->setup($options);\n\n\t\tFactory::getLog()->open(AKEEBA_BACKUP_ORIGIN);\n\t\tFactory::getLog()->log(true, '');\n\n\t\t$kettenrad->tick();\n\t\t$kettenrad->tick();\n\n\t\tFactory::saveState(AKEEBA_BACKUP_ORIGIN);\n\n\t\treturn $this->parseScanArray($kettenrad->getStatusArray());\n\t}", "title": "" }, { "docid": "d9136f372d3b95bb8a61ff0ff3e9758e", "score": "0.49227813", "text": "public function scanCompleted(AbstractScanStrategy $scanStrategy, $detect): void\n {\n }", "title": "" }, { "docid": "7b5952caf3fd91bb9bdbe5ffba04f4c1", "score": "0.49187964", "text": "public function startScan($input = null)\n\t{\n\t\tif($input instanceof StartScanRequest === false)\n\t\t\t$input = new StartScanRequest($input ?? []);\n\n\t\treturn $input->execute($this)->getResults();\n\t}", "title": "" }, { "docid": "9075c6d02a4e80cd55469b64c8f19150", "score": "0.49147013", "text": "public function scanSystemProfile()\n {\n $this->init();\n $results = [];\n // return slowest queries first\n $cursor = $this->collection->find([])->sort(['millis' => 1]);\n $counter = 0;\n\n while ($cursor->hasNext()) {\n ++$counter;\n $record = $cursor->getNext();\n\n $docsReturned = isset($record['ntoreturn']) ? $record['ntoreturn'] : 0;\n $docsScanned = isset($record['nscanned']) ? $record['nscanned'] : 0;\n $millis = isset($record['millis']) ? $record['millis'] : 0;\n\n /*\n * if there were more items scanned than returned, we may have an issue...\n * only track queries that have exceeded 0 ms\n * http://docs.mongodb.org/manual/reference/database-profiler/\n */\n if ($docsReturned < $docsScanned & $millis) {\n $results[] = [\n 'query' => $record['query'],\n 'duration' => $millis . 'ms',\n 'collection' => $record['ns']\n ];\n }\n\n if ($counter % 2 === 0) {\n error_log(\"${counter} number of queries scanned\");\n sleep(1);\n }\n }\n\n // write results to file if there are results otherwise output a happy message\n if (count($results)) {\n file_put_contents($this->filePath, json_encode($results, JSON_PRETTY_PRINT));\n echo 'There are slow ' . count($results) . ' queries to check on in ' . $this->filePath . PHP_EOL;\n } else {\n echo 'All clear, merry coding! ' . PHP_EOL;\n }\n }", "title": "" }, { "docid": "ee8ad04972721bb02d554a59c10fc327", "score": "0.49027115", "text": "function scan($idScan = null){\n\t\t$id = $idScan ? $idScan : $this->input->post(\"qr_id\");\n\t\tif($this->session->userdata('event')){\n\t\t\t$data=array(\n\t\t\t\t'id'=>null,\n\t\t\t\t'comp'=>null,\n\t\t\t\t'get_data'=>null\n\t\t\t);\n\t\t\tif($id){\n\t\t\t\t$company = $this->Model_dop->get_table_where_array('m_company','qr_id',$id);\n\t\t\t\t// debug($company);exit;\n\t\t\t\tif($company){\n\t\t\t\t\t$pegawai = $this->Model_wiki->dataAbsen($company[0]['id'],$this->session->userdata('event')['id_event']);\n\t\t\t\t\t// debug($pegawai);exit;\n\t\t\t\t\t$data=array(\n\t\t\t\t\t\t'id'=>$id,\n\t\t\t\t\t\t'comp'=>$company,\n\t\t\t\t\t\t'get_data'=>$pegawai\n\t\t\t\t\t);\n\t\t\t\t}else{\n\t\t\t\t\tredirect(\"dashboard/scan\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t$this->load->view('element/v_header_style',$data);\t\t\n\t\t\t$this->load->view('camera/camera');\n\t\t}else{\n\t\t\tredirect(\"dashboard/event/3\");\n\t\t}\n\t}", "title": "" }, { "docid": "5e6fbf1c5d3e6920e33f532d4e982f80", "score": "0.48970664", "text": "public function scan()\n {\n return $this->getIterator(RecursiveIteratorIterator::SELF_FIRST);\n }", "title": "" }, { "docid": "0d8790e9f13d7d569683856807c0ae90", "score": "0.48746893", "text": "public function scanStudent($obj){\n// $student = studentExist($obj->id,$obj->name,$obj->surname);\n $student = studentExistById($obj->id);\n if(!(array)$student)\n {\n echo Request_Handler::error(\"Scan Error\",\"The student does not exist in the database\");\n return;\n }\n else\n {\n $res = enterScan($student->id,$student->class_id,$obj->temperature);\n if($res == 1)\n echo Request_Handler::success(\"Student Successfully Scanned\");\n else\n echo Request_Handler::error(\"Scan Error\",\"The student was not successfully scanned\");\n }\n //ADD TO SCAN\n }", "title": "" }, { "docid": "87d6d7151f9868436fcc5b8b7c2ba94f", "score": "0.4873581", "text": "public function testExtract(): void { }", "title": "" }, { "docid": "02009727c905e3666fa71596abca9e4a", "score": "0.4805805", "text": "public function __construct(IScanner $scanner) {\n parent::__construct($scanner);\n }", "title": "" }, { "docid": "861265fe3ff349ac1595a4f8d055a1c3", "score": "0.48002145", "text": "public function testSearchObits()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c848422ebe9825f2ebfa3bb7724b61d0", "score": "0.4798068", "text": "public function __construct(array $scan)\n {\n parent::__construct($scan);\n\n foreach (Finder::create()->files()->in(__DIR__.'/Annotations') as $file) {\n AnnotationRegistry::registerFile($file->getRealPath());\n }\n }", "title": "" }, { "docid": "6da6153c405c0d0d8df2cd94d78d7e9a", "score": "0.47887656", "text": "public function testGetCards() {\n $this->mockProcessor->expects($this->exactly(1))->method('getCards');\n $this->cardator->getCards();\n }", "title": "" }, { "docid": "476c61d6286a0ee2429ef8d5561e7bf6", "score": "0.47552976", "text": "public function testFunctionValid()\n {\n $read_file = array();\n while (is_array($this->reader->current()) && $this->reader->valid()) {\n $read_file[] = $this->reader->current();\n $this->reader->next();\n }\n self::assertFalse($this->reader->valid(), 'File reading has finished and it is still valid');\n self::assertEquals($this->getExpectedArray(), $read_file, 'File has not been read correctly');\n }", "title": "" }, { "docid": "f2d441d1580d59e9915473bf0ad3c0a1", "score": "0.47494614", "text": "private function doRegexScan($vars)\n {\n foreach ($this->scanlist as $i => $fileinfo) {\n if (!in_array($fileinfo->getVerdict(), array(\n RapidScanStorageRecord::WHITE,\n RapidScanStorageRecord::BLACK,\n RapidScanStorageRecord::DUAL_USE\n ))\n ) {\n $this->_regexScan($fileinfo, $i, $vars);\n }\n }\n }", "title": "" }, { "docid": "726147670d6abc951ab79e7a2461dc92", "score": "0.47427413", "text": "private function isFullScan(): bool\n {\n return defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1';\n }", "title": "" }, { "docid": "ab37a748cd0d21c94cca22ac2d896d65", "score": "0.47017488", "text": "public function scan($file)\n {\n if(file_exists($file))\n {\n $scan = $this->send(\"SCAN $file\");\n\n $scan = substr(strrchr($scan, \":\"), 1);\n\n if($scan !== false)\n {\n $this->message = trim($scan);\n\n if($this->message == \"OK\")\n {\n return true;\n }\n }\n else\n {\n // return value from clamd: 1 is virus found, 2 is error\n $this->message = \"Scan failed\";\n }\n }\n else\n {\n $this->message = \"File not found\";\n }\n return false;\n }", "title": "" }, { "docid": "481c3f3b07e8ad4291d8acab70b78bd8", "score": "0.4676765", "text": "public function match() {\n }", "title": "" }, { "docid": "606abb5196777bca2f3a6376c1b20346", "score": "0.4672105", "text": "function scan($product) {\n switch ($product) {\n case 'A':\n $this->countProductA++;\n break;\n case 'B':\n $this->countProductB++;\n break;\n case 'C':\n $this->countProductC++;\n break;\n case 'D':\n $this->countProductD++;\n break;\n }\n }", "title": "" }, { "docid": "52f4fd15e2699c6cee0363edd4e22845", "score": "0.46609843", "text": "public function testMatches()\n {\n // check keep matches\n $tok = new RegexTokenizer(array(\n array(\"/(\\s+)?(\\w+)(\\s+)?/\",2)\n ));\n\n $tokens = $tok->tokenize(\"0 1 2 3 4 5 6 7 8 9\");\n $this->assertCount(10, $tokens);\n $this->assertEquals(\"0123456789\",implode(\"\",$tokens));\n }", "title": "" }, { "docid": "95190b0e3360e846da18484617d2cc30", "score": "0.46558702", "text": "function register_scannedjob($scan)\n{\n\tglobal $CFG;\n\tglobal $scansfoldername;\n\t$jobid = $scan->id;\n\t$fieldspath=blended_getOMRFieldsetDir($scan);\n\t$logfile = blended_getOMRInputLogFilePath($scan); \n\n\ttry{\n\t\tif ($logfile!='null')\n\t\t\t$logelements=read_log_file($logfile);\n\t\tif (!isset($logelements) || count($logelements) == 0)\n\t\t{\n\t\tthrow new OMRError(\"Log file is empty\",OMRError::LOG_FILE_IS_EMPTY);\n\t\t}\n\t}catch (OMRError $e)\n\t{\n\t\tthrow $e;\n\t}\n\t\n\t// open a transaction\n\tbegin_sql();\n\t\n\tforeach ($logelements as $logelement)\n\t{\n\t\ttry\n\t\t{\n\t\t\t//cada elemento es un registro de blended_images.\n\t\t\t\n\t\t\t$image_result=parse_log_elements($logelement);\n\t\t\t$image_result->jobid=$jobid;\n\t\t\t\t\n\t\t\tregister_image($image_result);\n\t\t\t$acode=$image_result->activitycode;\n\t\t\tif ($acode!= null)\n\t\t\tif ($acode=='Undetected')\n\t\t\t\t{\n\t\t\t\tmtrace(\"Undetected activity code for result:\".$logelement);\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\tmtrace('<br>REGISTERING FIELDS...');\n\t\t\t\tregister_template_fields($image_result,$fieldspath);\n\t\t\t\tmtrace('<br>REGISTERING RESULTS...');\n\t\t\t\tregister_result_files($image_result,$fieldspath);\n\t\t\t\tmtrace('<br>CHECKING VALIDITY...');\n\t\t\t\tcheck_invalid_results($image_result);\n\t\t\t\t}\t\n\t\t}\n\t\t//catch (OMRError $e)\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tmtrace ('OMRError: '.$e->getMessage());\n\t\t\n\t\t\tregister_exception($e,$jobid);\n\t\t\t\n\t\t\t$errorcode = $e -> getCode(); \n\t\t\tif ($errorcode == 5 or $errorcode == 6)\n\t\t\t{\n\t\t\t\t//print_object($e);\n\t\t\t\t//throw $e;\n\t\t\t\tcontinue; // process next result\n\t\t\t}\n\t\t}\n\t\n\t}\n\tmtrace('<br>UPDATING SCANJOB QUEUE...');\n\tupdate_record('blended_scans', $scan);\n\t// End the transaction\n\tcommit_sql();\n\treturn;\n}", "title": "" }, { "docid": "4ecf911d48b6cfcdaf552f9e9d9909d9", "score": "0.46523795", "text": "public function testBasic() {\n $valuesExpected = array(\n 'string' => 'String',\n 'abC1@3' => 'AbC1@3',\n 'a b C' => 'A b C'\n );\n\n foreach($valuesExpected as $input => $output) {\n $this->assertEquals($output, $this->_filter->filter($input));\n }\n }", "title": "" }, { "docid": "008b5feb7cfd52d837ec386671866b7d", "score": "0.46446377", "text": "public function next( );", "title": "" }, { "docid": "7e0d939dbfa8a12e7714bf4137bac40e", "score": "0.46445936", "text": "protected function scan($source)\n {\n $cache = PHP_CompatInfo_Cache::getInstance(\n $this->options['cacheDriver'], $this->options\n );\n $cached = $cache->isCached($source);\n\n if ($cached) {\n $results = $cache->getCache($source);\n\n $this->excludes = $results['excludes'];\n $this->includes = $results['includes'];\n $this->versions = $results['versions'];\n $this->extensions = $results['extensions'];\n $this->namespaces = $results['namespaces'];\n $this->traits = $results['traits'];\n $this->interfaces = $results['interfaces'];\n $this->classes = $results['classes'];\n $this->functions = $results['functions'];\n $this->constants = $results['constants'];\n $this->globals = $results['globals'];\n $this->tokens = $results['tokens'];\n $conditions = $results['conditions'];\n\n } else {\n\n $this->excludes = array();\n $this->includes = array();\n $this->versions = array('4.0.0', '');\n $this->extensions = array();\n $this->namespaces = array();\n $this->traits = array();\n $this->interfaces = array();\n $this->classes = array();\n $this->functions = array();\n $this->constants = array();\n $this->globals = array();\n $this->tokens = array();\n $conditions = false;\n\n /**\n * @link http://www.php.net/manual/en/tokens.php\n * List of Parser Tokens\n */\n $options = array(\n 'containers' => array(\n 'const' => 'constants',\n 'core' => 'internalFunctions',\n 'token' => 'tokens',\n 'glob' => 'globals'\n ),\n 'properties' => array(\n 'interface' => array('keywords', 'methods', 'parent'),\n 'class' => array('keywords', 'methods', 'parent', 'interfaces'),\n 'function' => array('keywords', 'visibility', 'arguments'),\n 'require_once' => array(),\n 'require' => array(),\n 'include_once' => array(),\n 'include' => array(),\n )\n );\n $reflect = new PHP_Reflect($options);\n\n // internal functions\n $reflect->connect(\n 'T_STRING',\n 'PHP_CompatInfo_Token_STRING',\n array('PHP_CompatInfo_TokenParser', 'parseTokenString')\n );\n\n // constants\n $reflect->connect(\n 'T_CONSTANT_ENCAPSED_STRING',\n 'PHP_CompatInfo_Token_CONSTANT_ENCAPSED_STRING',\n array('PHP_CompatInfo_TokenParser', 'parseTokenConstant')\n );\n\n // magic constants\n $reflect->connect(\n 'T_LINE',\n 'PHP_Reflect_Token_LINE',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_FILE',\n 'PHP_Reflect_Token_FILE',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_DIR',\n 'PHP_Reflect_Token_DIR',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_FUNC_C',\n 'PHP_Reflect_Token_FUNC_C',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_CLASS_C',\n 'PHP_Reflect_Token_CLASS_C',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_TRAIT_C',\n 'PHP_Reflect_Token_TRAIT_C',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_METHOD_C',\n 'PHP_Reflect_Token_METHOD_C',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n $reflect->connect(\n 'T_NS_C',\n 'PHP_Reflect_Token_NS_C',\n array('PHP_CompatInfo_TokenParser', 'parseTokenMagicConstant')\n );\n\n // globals and super globals\n $reflect->connect(\n 'T_VARIABLE',\n 'PHP_Reflect_Token_VARIABLE',\n array('PHP_CompatInfo_TokenParser', 'parseTokenGlobals')\n );\n\n // language features / tokens\n $reflect->connect(\n 'T_CATCH',\n 'PHP_Reflect_Token_CATCH',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_CLONE',\n 'PHP_Reflect_Token_CLONE',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_INSTANCEOF',\n 'PHP_Reflect_Token_INSTANCEOF',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_THROW',\n 'PHP_Reflect_Token_THROW',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_TRY',\n 'PHP_Reflect_Token_TRY',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_HALT_COMPILER',\n 'PHP_Reflect_Token_HALT_COMPILER',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_GOTO',\n 'PHP_Reflect_Token_GOTO',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_UNSET_CAST',\n 'PHP_Reflect_Token_UNSET_CAST',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_INSTEADOF',\n 'PHP_Reflect_Token_INSTEADOF',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n\n $reflect->connect(\n 'T_OBJECT_OPERATOR',\n 'PHP_CompatInfo_Token_OBJECT_OPERATOR',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n $reflect->connect(\n 'T_OPEN_SQUARE',\n 'PHP_CompatInfo_Token_OPEN_SQUARE',\n array('PHP_CompatInfo_TokenParser', 'parseTokenFeatures')\n );\n\n $reflect->scan($source);\n\n $this->_namespaces\n = $reflect->getNamespaces(PHP_Reflect::NAMESPACES_ALL);\n\n /**\n * @link http://www.php.net/manual/en/language.namespaces.php\n * Namespaces\n */\n $namespaces = $reflect->getNamespaces();\n if ($namespaces === null) {\n // adds (at least) global namespace\n $ns = '\\\\';\n $namespaces = array($ns => array());\n $defaultVersion = '4.0.0';\n } else {\n $ns = true;\n $defaultVersion = '5.3.0';\n }\n $this->getInfo('namespaces', $defaultVersion, $namespaces, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/language.control-structures.php\n * Control Structures\n */\n $includes = $reflect->getIncludes(true);\n foreach ($includes as $key => $values) {\n $this->includes[$key] = array_keys($values);\n }\n\n foreach (array_keys($namespaces) as $ns) {\n /**\n * @link http://www.php.net/manual/en/language.oop5.traits.php\n * Traits\n */\n $traits = $reflect->getTraits($ns);\n $this->getInfo('traits', '5.4.0', $traits, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/language.oop5.interfaces.php\n * Object Interfaces\n */\n $interfaces = $reflect->getInterfaces($ns);\n $this->getInfo('interfaces', '5.0.0', $interfaces, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/language.oop5.php\n * Classes and Objects\n */\n $classes = $reflect->getClasses($ns);\n $this->getInfo('classes', '4.0.0', $classes, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/language.constants.php\n * Constants\n */\n $constants = $reflect->getConstants($ns);\n $this->getInfo('constants', '4.0.0', $constants, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/functions.user-defined.php\n * User-defined functions\n * @link http://www.php.net/manual/en/functions.internal.php\n * Internal (built-in) functions\n */\n $userFunctions = (array)$reflect->getFunctions($ns);\n $coreFunctions = (array)$reflect->getInternalFunctions($ns);\n\n $functions = array_merge_recursive(\n $userFunctions,\n $coreFunctions\n );\n $this->getInfo('functions', '4.0.0', $functions, $source, $ns);\n\n // language features\n $tokens = (array)$reflect->offsetGet(array('tokens' => $ns));\n $this->getInfo('tokens', '5.0.0', $tokens, $source, $ns);\n\n /**\n * @link http://www.php.net/manual/en/language.variables.superglobals.php\n * Superglobals\n */\n $globals = (array)$reflect->getGlobals(true, null, $ns);\n\n foreach ($globals as $glob => $gdata) {\n foreach ($gdata as $name => $data) {\n $data['name'] = $name;\n $global = array($glob => $data);\n $this->getInfo('globals', '4.0.0', $global, $source, $ns);\n }\n }\n }\n\n // updates current source versions only if element is not excluded\n $keys = array(\n 'namespaces', 'traits', 'interfaces', 'classes',\n 'functions', 'constants', 'globals', 'tokens'\n );\n foreach ($keys as $key) {\n foreach ($this->$key as $ext => $items) {\n foreach ($items as $name => $data) {\n if ($data['excluded'] === false) {\n $this->updateVersion(\n $data['versions'][0],\n $this->versions[0]\n );\n $this->updateVersion(\n $data['versions'][1],\n $this->versions[1]\n );\n }\n }\n }\n }\n }\n\n $this->results[$source] = array(\n 'excludes' => $this->excludes,\n 'includes' => $this->includes,\n 'versions' => $this->versions,\n 'extensions' => $this->extensions,\n 'namespaces' => $this->namespaces,\n 'traits' => $this->traits,\n 'interfaces' => $this->interfaces,\n 'classes' => $this->classes,\n 'functions' => $this->functions,\n 'constants' => $this->constants,\n 'globals' => $this->globals,\n 'tokens' => $this->tokens,\n 'conditions' => $conditions,\n );\n\n if ($conditions === false) {\n // search for conditional code\n $this->results[$source]['conditions'] = $this->getConditions(\n null, $source\n );\n }\n\n if (!$cached) {\n // write results in a cache to improve speed for later uses\n $cache->setCache($source, $this->results[$source]);\n }\n }", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.4634073", "text": "public function next();", "title": "" }, { "docid": "830ee4038026c7a7bae5346a5e32dedf", "score": "0.46316257", "text": "public function testScanResponseNotOk(): void\n {\n $LinkScanner = $this->getLinkScannerClientReturnsFromTests('http://localhost/noExisting');\n $EventManager = $this->getEventManager($LinkScanner);\n $LinkScanner->scan();\n\n $this->assertEventFired('LinkScanner.responseNotOk', $EventManager);\n }", "title": "" }, { "docid": "4bccdb6b5e25597c404f1eec9e5ded33", "score": "0.46286154", "text": "public function testOCR()\n {\n }", "title": "" }, { "docid": "892a7e734ec9514dc44358d9375747ee", "score": "0.46223825", "text": "public function testNextCounter()\n {\n $next = $this->nextCounter();\n $this->assertInstanceOf(InvokedAtIndex::class, $next);\n }", "title": "" }, { "docid": "dca04af2cba8c0e0a282645334aadc13", "score": "0.4620815", "text": "public function testMain()\n {\n echo \"\\n >----------- Test Main : ---------> \\n\";\n error_log(\"Search :\");\n//result : 9999\n $this->search_basic_count(10, \"ASC\", \"batch\", \"research_interest\", '%Io%');\n// $this->search_basic(10, \"ASC\", \"batch\", \"research_interest\", '%Io%');\n//--------------------\n// $this->search_education_count(10, \"ASC\", \"passing_year\", \"institue_name\", '%School%');\n// $this->search_education(10, \"ASC\", \"id\", \"institue_name\", '%School%');\n// $this->search_education(10, \"DESC\", \"batch\", \"institue_name\", '%School%');\n//result : 7\n// $this->search_education_count(10, \"DESC\", \"batch\", \"institue_name\", '%School%');\n//result : 'wu' -> 1\n//result : 'tiger' -> 4\n//result : type->'pri' -> 9\n// $this->search_jobs(10, \"DESC\", \"batch\", \"type\", '%pub%');\n//result : organization_name->'wu' -> 1\n//result : organization_name->'tiger' -> 4\n//result : type->'pri' -> 9\n// $this->search_jobs_count(10, \"DESC\", \"batch\", \"type\", '%pri%');\n\n\n }", "title": "" }, { "docid": "ae30e0bd165a6f390e2595916ae16904", "score": "0.4609259", "text": "public function testReading() : void\n {\n $this->assertEquals($this->testData, $this->getReaderForFile('test_read.' . Factory::EXT_CSV)->read());\n }", "title": "" }, { "docid": "a8b90ed2fd13ec5d8225e1e613fb0672", "score": "0.46006513", "text": "protected abstract function runTest($test);", "title": "" }, { "docid": "4c41b9cf32f4cf8a2d795038910b6125", "score": "0.4596969", "text": "private function firstScan()\n {\n // In addition, collect list of:\n // + parent code (code here is barcode, will be switched to asset code soon)\n // + location code\n // + category code\n // + department code\n // + model code\n // + uom code\n // + supplier code\n // + manufacturer code\n // + owner code\n // + original code\n // + status code\n // + user code\n // If file is empty, it cannot pass previous verification step\n $required_sheets = $this->options['required_sheets'];\n foreach ($required_sheets as $kr => $required_sheet) {\n $header = $required_sheet['header'];\n // must using importSheet_fastexcel_withheader() in order to access cell's value via index\n importSheet_fastexcel_withheader($required_sheet['sheet'],\n function ($line, $key) use ($header, &$sheet_total) {\n if ($key > 2) {\n $data = [];\n foreach ($header as $field => $title) {\n $data[$field] = $line[$title];\n }\n $this->getCampaignCollection()->push($data);\n }\n });\n }\n }", "title": "" }, { "docid": "a3c0ee539d6dbb27ff1fddf7450eb550", "score": "0.4596937", "text": "public function testGetIterator()\n\t{\n\t\t$listener0 = function ()\n\t\t{\n\t\t};\n\n\t\t$listener1 = function ()\n\t\t{\n\t\t\treturn false;\n\t\t};\n\n\t\t$this->instance->add($listener0, 10);\n\t\t$this->instance->add($listener1, 3);\n\n\t\t$listeners = array();\n\n\t\tforeach ($this->instance as $listener)\n\t\t{\n\t\t\t$listeners[] = $listener;\n\t\t}\n\n\t\t$this->assertSame($listeners[0], $listener0);\n\t\t$this->assertSame($listeners[1], $listener1);\n\t}", "title": "" }, { "docid": "ddda35e63d56b467ae0aaa1908ff0213", "score": "0.45935836", "text": "public function run_tests()\n {\n $this->test_nfd();\n $this->test_nfkd();\n $this->test_nfc();\n $this->test_nfkc();\n $this->test_case_fold();\n }", "title": "" }, { "docid": "6a53fe5f94ddc4826cf79443c724c31c", "score": "0.45927587", "text": "public function consume()\n {\n foreach($this->tokens as $index => $timestamp){\n $sleep = $timestamp - microtime(true);\n if($sleep > 0){\n usleep($sleep * 1000000);\n }\n yield $index;\n }\n }", "title": "" }, { "docid": "5d2b83a524b4bb2c311c438a0127fa0e", "score": "0.45859072", "text": "public function testFindBook()\n {\n }", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "5f824c1c45acb738e4c2e355bacfc0d9", "score": "0.4577228", "text": "public function next() {}", "title": "" }, { "docid": "f9771a5ac5b30fc6151e041ca31a767a", "score": "0.45737883", "text": "public function testIteration()\n {\n $db = '';\n $vcard = new VCard();\n $vcard->addName(\"Admiraal\", \"Wouter\");\n $db .= $vcard->buildVCard();\n\n $vcard = new VCard();\n $vcard->addName(\"Lorem\", \"Ipsum\");\n $db .= $vcard->buildVCard();\n\n $parser = new VCardParser($db);\n foreach ($parser as $i => $card) {\n $this->assertEquals($card->fullname, $i == 0 ? \"Wouter Admiraal\" : \"Ipsum Lorem\");\n }\n }", "title": "" }, { "docid": "580ce356ac5ae7fc9c8ad6f266d85b71", "score": "0.456339", "text": "function scanLib() {\n\t\t_log(\"Scanning library: \".$this->exh->getLibPath());\n\t\t$this->scanPath($this->exh->getLibPath()); // Will recurse\n\t}", "title": "" }, { "docid": "5cc5fde2ed791812a5a5c170f6e509c5", "score": "0.45623106", "text": "public function testPublicMethodOfInterestCalculator()\n {\n $calculator = new InterestCalculator(4);\n $this->assertEquals(4000, $calculator->calculateInterests(100000));\n }", "title": "" }, { "docid": "0888301dd150b8b288142b00fef09ce8", "score": "0.45509622", "text": "public function hscan($key, &$iterator, $pattern = null, $count = null)\n {\n if ((string)$iterator === '0') {\n return null;\n }\n $this->init();\n if ($this->actualDriver() === self::DRIVER_PREDIS) {\n $returned = $this->driver->hscan($key, $iterator, ['match' => $pattern, 'count' => $count]);\n $iterator = $returned[0];\n return $returned[1];\n }\n return $this->driver->hscan($key, $iterator, $pattern, $count);\n }", "title": "" }, { "docid": "7dcf7e91336a5a825e76957064975b4e", "score": "0.45454365", "text": "public function testGetDeviceWirelessConnectionStats()\n {\n }", "title": "" }, { "docid": "1c0754c76d3ceeccc6d7feb71fc2602e", "score": "0.45418745", "text": "function testSearch2()\n {\n // Das Streben nach Glück\n // http://www.imdb.com/find?s=all&q=Das+Streben+nach+Gl%FCck\n \n $data = engineSearch('Das Streben nach Glück', 'imdb', true);\n $this->assertTrue(sizeof($data) > 0);\n\n $data = $data[0];\n# dump($data);\n\n $this->assertEqual($data[id], 'imdb:0454921');\n $this->assertPattern('/The Pursuit of Happyness|Das Streben nach Glück/', $data[title]);\n }", "title": "" }, { "docid": "c223806648a002797d6696ce3055dfd6", "score": "0.45229802", "text": "function run() {\n eval('?>'.$this->skipif);\n \n set_error_handler(array(&$this, 'onError')); {\n error_reporting(E_ALL);\n\n ob_start();\n eval('?>'.$this->code);\n $this->output= rtrim(ob_get_contents());\n ob_end_clean();\n } restore_error_handler();\n \n return $this->expectancy->matches($this->output);\n }", "title": "" }, { "docid": "290da1f359474b6163d30b95738d19dd", "score": "0.4520358", "text": "function searchNewScans($_xml, $_mangas)\n {\n foreach ($_xml->channel->item as $item) {\n foreach ($_mangas as $manga) {\n $newScans = array();\n $manga_name = $manga[0];\n $manga_last_scan = $manga[1];\n $manga_date = $manga[2];\n $manga_id = $manga[3];\n $item_scan_number = findScanNumber($item->link);\n $item_scan_date = convertToDateTime(strtotime($item->pubDate->__toString()));\n if (mangasToSearch($item->title, $manga_name)) {\n if ($item_scan_date > $manga_date && $item_scan_number > $manga_last_scan) {\n $newScan = createNewScan($manga_id, $manga_name, $item_scan_number, $item->link, $item_scan_date);\n array_push($newScans, $newScan);\n }\n }\n if (count($newScans) > 0) {\n for ($i = count($newScans) - 1; $i >= 0; $i--) {\n $newScan = $newScans[$i];\n messageNewScan($newScan[\"name\"], $newScan[\"scan_number\"], $newScan[\"date\"], $newScan[\"url\"]);\n }\n $lastestScan = $newScans[0];\n addNewScanToDb($lastestScan[\"id\"], $lastestScan[\"scan_number\"], $lastestScan[\"date\"]);\n }\n }\n }\n }", "title": "" }, { "docid": "09441f0f62d48b42f2e8a3d9dfcc79fc", "score": "0.45161965", "text": "public function match();", "title": "" }, { "docid": "a59fa97e3e2870b6b26e8689f666df2a", "score": "0.45147157", "text": "private function _regexScan($fileInfo, $i, $vars)\n {\n $regex_res = $this->regexScan($fileInfo->getFilename(), $i, $vars);\n if (!is_array($regex_res)) {\n return;\n }\n list($result, $sigId, $snippet) = $regex_res;\n $fileInfo->setVerdict($result);\n if ($result !== RapidScanStorageRecord::RX_GOOD) {\n $fileInfo->setSignature($sigId);\n $fileInfo->setSnippet($snippet);\n }\n }", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" }, { "docid": "9b5c375edd5cc16ac246532f874d5e08", "score": "0.4512068", "text": "public function next () {}", "title": "" } ]
41ff5c1195885bc4adcefd1f3c2c710b
Vstupy na MP Friends
[ { "docid": "88eb9f60f6d8fa50721eb7b06f0cb4c0", "score": "0.0", "text": "function mp_load_friends_entry($entry_id, $entry_type, $entry_uid, $entry_target)\n\t\t{\n\t\t\tglobal $db, $template, $phpbb_root_path, $phpEx;\n\n\t\t\tif (!isset($this->friends_entry[$entry_uid]))\n\t\t\t{\n\t\t\t\t$u1_sql = \"SELECT user_id, username, user_colour\n\t\t\t \tFROM \" . USERS_TABLE . \"\n\t\t\t\t\t\t\t\tWHERE user_id = \" . $entry_uid;\n\t\t\t\t$u1_result = $db->sql_query($u1_sql);\n\t\t\t\t$this->friends_entry[$entry_uid] = $db->sql_fetchrow($u1_result);\n\t\t\t\t$db->sql_freeresult($u1_result);\n\t\t\t}\n\n\t\t\tif (!isset($this->friends_entry[$entry_target]))\n\t\t\t{\n\t\t\t\t$u2_sql = \"SELECT user_id, username, user_colour\n\t\t \tFROM \" . USERS_TABLE . \"\n\t\t\t\t\t\t\tWHERE user_id = \" . $entry_target;\n\t\t\t\t$u2_result = $db->sql_query($u2_sql);\n\t\t\t\t$this->friends_entry[$entry_target] = $db->sql_fetchrow($u2_result);\n\t\t\t\t$db->sql_freeresult($u2_result);\n\t\t\t}\n\n\t\t\treturn array(\n\t\t\t\t'ID'\t\t\t\t => $entry_id,\n\t\t\t\t'TYPE'\t\t\t\t => $entry_type,\n\t\t\t\t'USER1_USERNAME'\t => $this->friends_entry[$entry_uid]['username'],\n\t\t\t\t'USER2_USERNAME'\t => $this->friends_entry[$entry_target]['username'],\n\t\t\t\t'U_USER1_PROFILE'\t => $this->p_master->get_username_string($this->p_master->config['mp_colour_username'], 'full', $this->friends_entry[$entry_uid]['user_id'], $this->friends_entry[$entry_uid]['username'], $this->friends_entry[$entry_uid]['user_colour']),\n\t\t\t\t'U_USER2_PROFILE'\t => $this->p_master->get_username_string($this->p_master->config['mp_colour_username'], 'full', $this->friends_entry[$entry_target]['user_id'], $this->friends_entry[$entry_target]['username'], $this->friends_entry[$entry_target]['user_colour']),\n\t\t\t);\n\t\t}", "title": "" } ]
[ { "docid": "c57d70107737954d485eee4a72a84c9f", "score": "0.544063", "text": "function friends_list_moderation()\n \t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$md5check \t\t = substr( $this->ipsclass->input['md5check'], 0, 32 );\n\t\t$friends \t = array();\n\t\t$friend_ids = array();\n\t\t$friend_member_ids = array();\n\t\t$_friend_ids = array();\n\t\t$friends_already = array();\n\t\t$friends_update = array();\n\t\t$member \t\t = array();\n\t\t$pp_option = trim( $this->ipsclass->input['pp_option'] );\n\t\t$message\t\t = '';\n\t\t$subject\t\t = '';\n\t\t$msg = 'pp_friend_approved';\n\t\t\n\t\t//-----------------------------------------\n \t// Get the emailer module\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.\"sources/classes/class_email.php\" );\n\t\t\n\t\t$email = new emailer();\n\t\t$email->ipsclass =& $this->ipsclass;\n\t\t$email->email_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get MSG library class\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.'sources/lib/func_msg.php' );\n \t\t\n\t\t$msg_lib = new func_msg();\n\t\t$msg_lib->ipsclass =& $this->ipsclass;\n\t\t$msg_lib->init();\n\t\t$this->ipsclass->load_language( 'lang_msg' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// MD5 check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $md5check != $this->ipsclass->return_md5_check() )\n \t{\n \t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' );\n\t\t\texit();\n \t}\n\n\t\t//-----------------------------------------\n\t\t// Get friends...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! is_array( $_POST['pp_friend_id'] ) OR ! count( $_POST['pp_friend_id'] ) )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Figure IDs\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach( $_POST['pp_friend_id'] as $key => $value )\n\t\t{\n\t\t\t$_key = intval( $key );\n\t\t\t\n\t\t\tif ( $_key )\n\t\t\t{\n\t\t\t\t$_friend_ids[ $_key ] = $_key;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( ! is_array( $_friend_ids ) OR ! count( $_friend_ids ) )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check our friends are OK\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_friend_id='.$this->ipsclass->member['id'].' AND friends_approved=0 AND friends_member_id IN ('.implode(',',$_friend_ids ). ')' ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$friend_ids[ $row['friends_id'] ] = $row['friends_id'];\n\t\t\t$friend_member_ids[ $row['friends_member_id'] ] = $row['friends_member_id'];\n\t\t}\n\t\t\n\t\tif ( ! is_array( $friend_ids ) OR ! count( $friend_ids ) )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Load friends...\n\t\t//-----------------------------------------\n\t\t\n\t\t$friends = $this->personal_function_load_member( $friend_member_ids );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get member...\n\t\t//-----------------------------------------\n\t\t\n\t\t$member = $this->personal_function_load_member( $this->ipsclass->member['id'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! is_array( $friends ) OR ! count( $friends ) OR ! $member['id'] )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab=pending' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// What to do?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $pp_option == 'delete' )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Ok.. delete them in the DB.\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$this->ipsclass->DB->do_delete( 'profile_friends', 'friends_id IN('.implode(',', $friend_ids ) . ')' );\n\t\t\t\n\t\t\t$msg = 'pp_friend_removed';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Ok.. approve them in the DB.\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$this->ipsclass->DB->do_update( 'profile_friends', array( 'friends_approved' => 1 ), 'friends_id IN('.implode(',', $friend_ids ) . ')' );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Reciprocal mode?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $pp_option == 'add_reciprocal' )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Find out who isn't already on your list...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_member_id='.$this->ipsclass->member['id'].' AND friends_approved=1 AND friends_friend_id IN ('.implode(',',$_friend_ids ). ')' ) );\n\n\t\t\t\t$this->ipsclass->DB->exec_query();\n\n\t\t\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t{\n\t\t\t\t\t$friends_already[ $row['friends_friend_id'] ] = $row['friends_friend_id'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Check which aren't already members...\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach( $friend_member_ids as $id => $_id )\n\t\t\t\t{\n\t\t\t\t\tif ( in_array( $id, $friends_already ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$friends_update[ $id ] = $id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Gonna do it?\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( is_array( $friends_update ) AND count( $friends_update ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $friends_update as $id => $_id )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->DB->do_insert( 'profile_friends', array( 'friends_member_id' => $member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_friend_id' => $id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_approved' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_added' => time() ) );\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\t// Send out message...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tforeach( $friends as $friend )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// INIT\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$message = '';\n\t\t\t\t$subject = '';\n\t\t\t\t\n\t\t\t\tif ( $friend['pp_setting_notify_friend'] )\n\t\t\t\t{\n\t\t\t\t\t$email->get_template(\"new_friend_approved\");\n\t\t\t\t\n\t\t\t\t\t$email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'FRIEND_NAME' => $member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'LINK'\t\t\t\t => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) );\n\t\t\t \n\t\t\t\t\t$message = $email->message;\n\t\t\t\t\t$subject = $email->lang_subject;\n\t\t\t\t\t$return_msg = '';\n\t\t\t\t}\n\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Got anything to send?\n\t\t\t\t//-----------------------------------------\n\t\t\n\t\t\t\tif ( $message AND $subject )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Email?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t\t\tif ( $friend['pp_setting_notify_friend'] == 'email' OR $friend['members_disable_pm'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$email->subject = $subject;\n\t\t\t\t\t\t$email->message = $message;\n\t\t\t\t\t\t$email->to = $friend['email'];\n\t\t\t\t\n\t\t\t\t\t\t$email->send_mail();\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// PM?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg_lib->to_by_id = $friend['id'];\n\t\t \t\t\t\t$msg_lib->from_member = $member;\n\t\t \t\t\t\t$msg_lib->msg_title = $subject;\n\t\t \t\t\t\t\n\t\t \t\t\t\t$msg_lib->postlib->parser->parse_bbcode \t= 1;\n\t\t \t\t\t\t$msg_lib->postlib->parser->parse_smilies \t= 0;\n\t\t \t\t\t\t$msg_lib->postlib->parser->parse_html \t\t= 0;\n\t\t \t\t\t\t$msg_lib->postlib->parser->parse_nl2br \t\t= 1;\n\t\t \t\t\t\t$msg_lib->msg_post = $msg_lib->postlib->parser->pre_display_parse( $msg_lib->postlib->parser->pre_db_parse( $message ) );\n\n\t\t\t\t\t\t$msg_lib->force_pm = 1;\n\t\t\t\t\n\t\t\t\t\t\t$msg_lib->send_pm();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->personal_function_recache_members_friends( $friend );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Recache..\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->personal_function_recache_members_friends( $member );\n\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg='.$msg.'&tab=pending' );\n\t}", "title": "" }, { "docid": "55d0d1f78ecd1a69592df5179a718879", "score": "0.5391113", "text": "function friends_list_remove()\n \t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend_id \t\t = intval( $this->ipsclass->input['member_id'] );\n\t\t$md5check \t\t = substr( $this->ipsclass->input['md5check'], 0, 32 );\n\t\t$tab \t = substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['tab'] ), 0, 20 );\n\t\t$friend \t\t = array();\n\t\t$member \t\t = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// MD5 check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $md5check != $this->ipsclass->return_md5_check() )\n \t{\n \t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab );\n\t\t\texit();\n \t}\n\n\t\t//-----------------------------------------\n\t\t// Get friend...\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend = $this->personal_function_load_member( $friend_id );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get member...\n\t\t//-----------------------------------------\n\t\t\n\t\t$member = $this->personal_function_load_member( $this->ipsclass->member['id'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $friend['id'] OR ! $member['id'] )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// NOT PENDING...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $tab != 'pending' )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Already a friend?\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"friends_member_id=\".$this->ipsclass->member['id'].\" AND friends_friend_id=\".$friend['id'] ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif ( ! $friend_check['friends_id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab );\n\t\t\t\texit();\n\t\t\t}\n\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Remove from the DB\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_id='.$friend_check['friends_id'] ) );\n\t\t}\n\t\t//-----------------------------------------\n\t\t// PENDING...\n\t\t//-----------------------------------------\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Already a friend?\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"friends_member_id=\".$friend['id'].\" AND friends_friend_id=\".$this->ipsclass->member['id'] ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif ( ! $friend_check['friends_id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error&tab='.$tab );\n\t\t\t\texit();\n\t\t\t}\n\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Remove from the DB\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_id='.$friend_check['friends_id'] ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Recache..\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->personal_function_recache_members_friends( $member );\n\t\t$this->personal_function_recache_members_friends( $friend );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Bounce\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=pp_friend_removed&tab='.$tab );\n\t}", "title": "" }, { "docid": "dce32ffc57e6363140b2239cf04f6fbc", "score": "0.5389746", "text": "private function getMyFriends()\r\n {\r\n \t$this->_obj_usrinfo=unserialize($_SESSION['userData']);\r\n $result=$this->_objFrndModel->getFriends($this->_obj_usrinfo);\r\n $this->_objFriend->setMyFriendsNetwork($result);\r\n $_SESSION['myFriends']=serialize($this->_objFriend); \r\n }", "title": "" }, { "docid": "a440809fd7ff7f62414bc510a44d23b9", "score": "0.53740215", "text": "function friends_list_list()\n \t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$content \t= '';\n\t\t$member_id \t= intval( $this->ipsclass->member['id'] );\n\t\t$friends \t= array();\n\t\t$tab \t= substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['tab'] ), 0, 20 );\n\t\t$friends_filter = substr( $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['friends_filter'] ), 0, 20 );\n\t\t$_mutual_ids = array( 0 => 0 );\n\t\t$query \t= '';\n\t\t$join_field\t = '';\n\t\t$time_limit = time() - $this->ipsclass->vars['au_cutoff'] * 60;\n\t\t$per_page = 25;\n\t\t$start = intval( $this->ipsclass->input['st'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check we're a member\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $member_id )\n\t\t{\n\t\t\tprint '';\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// To what are we doing to whom?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $tab == 'pending' )\n\t\t{\n\t\t\t$query = 'f.friends_friend_id='.$member_id.' AND f.friends_approved=0';\n\t\t\t$join_field = 'f.friends_member_id';\n\t\t}\n\t\telse if ( $tab == 'mutual' AND $friends_filter == 'added' )\n\t\t{\n\t\t\t$query = 'f.friends_friend_id='.$member_id.' AND f.friends_approved=1';\n\t\t\t$join_field = 'f.friends_member_id';\n\t\t}\n\t\telse if ( $tab == 'mutual' )\n\t\t{\n\t\t\t# My friends...\n\t\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_member_id='.$member_id.' AND friends_approved=1' ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\n\t\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$_mutual_ids[] = $row['friends_friend_id'];\n\t\t\t}\n\t\t\t\n\t\t\t$query = 'f.friends_member_id IN ('.implode(',', $_mutual_ids).') AND f.friends_friend_id='.$member_id.' AND f.friends_approved=1';\n\t\t\t$join_field = 'f.friends_member_id';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = 'f.friends_member_id='.$member_id;\n\t\t\t$join_field = 'f.friends_friend_id';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Filtered?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $friends_filter == 'online' )\n\t\t{\n\t\t\t$query .= \" AND ( ( m.last_visit > $time_limit OR m.last_activity > $time_limit ) AND m.login_anonymous='0&1' )\";\n\t\t}\n\t\telse if ( $friends_filter == 'offline' )\n\t\t{\n\t\t\t$query .= \" AND ( m.last_activity < $time_limit OR ( m.login_anonymous='0&0' OR m.login_anonymous='1&0' ) )\";\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get count...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 'COUNT(*) as count',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'profile_friends' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => $query,\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( 0 => array( 'select' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'm.id='.$join_field,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'inner' ) ) ) );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t$count = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Pages...\n\t\t//----------------------------------------- \n\t\t\n\t\t$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'no_dropdown' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t \t \t 'PER_PAGE' => $per_page,\n\t\t\t\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\t\t\t 'L_SINGLE' => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=friends_list_popup&tab='.$tab.'&friends_filter='.$friends_filter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t//-----------------------------------------\n\t\t// Get current friends...\t\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 'f.*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'profile_friends' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => $query,\n\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'm.members_l_display_name ASC',\n\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( $start, $per_page ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( 0 => array( 'select' => 'me.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'member_extra' => 'me' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'me.id='.$join_field,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'select' => 'pp.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'profile_portal' => 'pp' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'pp.pp_member_id='.$join_field,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 2 => array( 'select' => 'm.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'm.id='.$join_field,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) ) ) );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get and store...\n\t\t//-----------------------------------------\n\t\t\n\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Others...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' );\n\t\t\t\n\t\t\tif( $row['login_anonymous']{0} == '1' )\n\t\t\t{\n\t\t\t\t// Member last logged in anonymous\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] )\n\t\t\t\t{\n\t\t\t\t\t$row['_last_active'] = $this->ipsclass->lang['private'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' );\n\t\t\t$row['g_title'] = $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'];\n\t\t\t\n\t\t\t$row = $this->personal_portal_set_information( $row );\n\t\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Add row...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$friends[] = $row;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Show...\n\t\t//-----------------------------------------\n\t\t\n\t\t$content = $this->ipsclass->compiled_templates['skin_profile']->friends_list_list( $friends, $pages );\n\t\t\n\t\t$this->ipsclass->print->pop_up_window( $this->ipsclass->lang['m_title_friends'], $content );\n\t}", "title": "" }, { "docid": "a1884a79f88b5804cca361260207d3a9", "score": "0.5359655", "text": "public function memberships();", "title": "" }, { "docid": "a1884a79f88b5804cca361260207d3a9", "score": "0.5359655", "text": "public function memberships();", "title": "" }, { "docid": "ccf83c465c65174bc17cec3d55a1e2cc", "score": "0.5346103", "text": "function personal_iframe_friends()\n \t{\n \t\t//-----------------------------------------\n \t\t// INIT\n \t\t//-----------------------------------------\n\t\t\n\t\t$member_id \t\t = intval( $this->ipsclass->input['member_id'] );\n\t\t$md5check \t\t = substr( $this->ipsclass->input['md5check'], 0, 32 );\n\t\t$content \t\t = '';\n\t\t$friends_perpage = 10;\n\t\t$pages = '';\n\t\t$start\t\t\t = intval( $this->ipsclass->input['st'] );\n\t\t$friends = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// MD5 check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $md5check != $this->ipsclass->return_md5_check() )\n \t{\n \t\tprint '';\n\t\t\texit();\n \t}\n\n\t\t//-----------------------------------------\n\t\t// Load member\n\t\t//-----------------------------------------\n\t\t\n\t\t$member = $this->personal_function_load_member( $member_id );\n \t\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\n \tif ( ! $member['id'] )\n \t{\n\t\t\tprint '';\n\t\t\texit();\n \t}\n\n\t\t//-----------------------------------------\n\t\t// How many comments must a man write down\n\t\t// before he is considered a spammer?\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend_count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as friend_count',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'friends_member_id='.$member_id . ' AND friends_approved=1' ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Pages\n\t\t//-----------------------------------------\n\t\t\n\t\t$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => intval( $friend_count['friend_count'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'no_dropdown' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t \t \t 'PER_PAGE' => $friends_perpage,\n\t\t\t\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\t\t\t 'L_SINGLE' => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url . 'act=profile&member_id='.$member_id.'&CODE=personal_iframe_friends&md5check='.$this->ipsclass->md5_check,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Grab the friends\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 'f.*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'profile_friends' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'f.friends_member_id='.$member_id . ' AND f.friends_approved=1',\n\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( $start, $friends_perpage ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( 0 => array( 'select' => 'me.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'member_extra' => 'me' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'me.id=f.friends_friend_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'select' => 'pp.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'profile_portal' => 'pp' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'pp.pp_member_id=f.friends_friend_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 2 => array( 'select' => 'm.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'm.id=f.friends_friend_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) ) ) );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get and store...\n\t\t//-----------------------------------------\n\t\t\n\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Others...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['_last_active'] = $this->ipsclass->get_date( $row['last_activity'], 'SHORT' );\n\t\t\t\n\t\t\tif( $row['login_anonymous']{0} == '1' )\n\t\t\t{\n\t\t\t\t// Member last logged in anonymous\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] OR $this->ipsclass->vars['disable_admin_anon'] )\n\t\t\t\t{\n\t\t\t\t\t$row['_last_active'] = $this->ipsclass->lang['private'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$row['_friends_added'] = $this->ipsclass->get_date( $row['friends_added'], 'SHORT' );\n\t\t\t$row['g_title'] = $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_title'];\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Add row...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$friends[ $row['members_display_name'] ] = $this->personal_portal_set_information( $row );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Sort\n\t\t//-----------------------------------------\n\t\t\n\t\tksort( $friends );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Ok.. show the friends\n\t\t//-----------------------------------------\n\t\t\n\t\t$content = $this->ipsclass->compiled_templates['skin_profile']->personal_portal_iframe_friends( $member, $friends, $pages );\n\t\t\n\t\t$this->ipsclass->print->pop_up_window( '', $content );\n\t\t\n\t}", "title": "" }, { "docid": "b00ebe6fd874daede55283c5cbaab0c4", "score": "0.5299771", "text": "public function isFriend();", "title": "" }, { "docid": "3b04aa1b674fd3171d8c9e7c0a1b03ff", "score": "0.5260852", "text": "public function players();", "title": "" }, { "docid": "ced5032a3647049f5514ee460ddf1a0d", "score": "0.52219737", "text": "function get_profile_or_friends_list($userid, $update, $ret){\n\t\n\tglobal $PROFILE_PATH,$FRIENDS_PATH;\t\n\n\t$profile_path = \"{$PROFILE_PATH}{$userid}_profile.xml\"; //absolute path to profiles\n\t$profile_xml; \n\n\t$friends_path = \"{$FRIENDS_PATH}{$userid}_friends.xml\"; //absolute path to friends list\n\t$friends_xml;\n\t\n\t/*\n\t* $update is what will be loaded, or a new copy will be retrieved if there is no \n\t* existing copy - if none is specified, both are updated\n\t*/\n\tswitch($update){\n\t\tcase \"profile\":\n\t\t\tif (is_numeric($userid) && file_exists($profile_path)){\n\t\t\t\t$profile_xml = simplexml_load_file($profile_path);\n\t\t\t}else{\n\t\t\t\t$profile_xml = get_steam_profile_xml($userid);\n\t\t\t\tif ($profile_xml!=null)\t$profile_xml->asXML($profile_path);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"friends\"://must pass in numeric $userid!\n\t\t\tif (file_exists($friends_path)){\n\t\t\t\t$friends_xml = simplexml_load_file($friends_path);\n\t\t\t}else{\t\n\t\t\t\t$friends_xml = get_steam_friends_xml($userid);\n\t\t\t\tif ($friends_xml!=null)\t$friends_xml->asXML($friends_path);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$profile_xml = get_steam_profile_xml($userid);\n\t\t\t$userid = $profile_xml->steamID64;\n\t\t\t$friends_xml = get_steam_friends_xml($userid);\t\n\t\t\n\t\t\tif ($profile_xml!=null)\t$profile_xml->asXML($profile_path);\n\t\t\tif ($friends_xml!=null)\t$friends_xml->asXML($friends_path);\n\t\t\tbreak;\n\t}\n\n\tif ($ret=='friends' && $friends_xml!=null) return $friends_xml;\n\telseif ($ret=='profile' && $profile_xml!=null) return $profile_xml;\n}", "title": "" }, { "docid": "4d378ded6b0b7c5ee45060fc7cb2b7ea", "score": "0.5198577", "text": "function presence($pubnub, $presence) {\n }", "title": "" }, { "docid": "638bb3563a206f8eaf3b07bad9e68b2d", "score": "0.5187095", "text": "public function egift_petunjuk() {\n \n }", "title": "" }, { "docid": "137bd3bcc8580cb545914acd2a0833cd", "score": "0.5172002", "text": "function friend_list()\n\t{\n\t\treturn $this->fql('SELECT uid,name,username,pic FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name ASC');\t\n\t}", "title": "" }, { "docid": "a3e15deb2871fb11a205a7239a75c139", "score": "0.51680493", "text": "public static function get_list_of_friends();", "title": "" }, { "docid": "2dcf4a971c2ae04200d1a24e0a3a99f4", "score": "0.50975704", "text": "function getFriends($username){\n\n}", "title": "" }, { "docid": "a37e086437fc54c71162f7bd4dba08d4", "score": "0.5045151", "text": "function getFriends($uid, $faith_uid, $faith_client_ip, $faith_app_id){\n\t\n global $dsl_soap_client;\n\n $api_array = array('method' => 'getFriends');\n $api_array['uid'] = $uid;\n \n $result = $dsl_soap_client->__soapCall(\"getFriends\",array($uid));\n \n if(!faith_accessAllowed($faith_uid, $faith_client_ip, $faith_app_id, \"getFriends\", $api_array, $result))\n {\t\n \treturn array();\n }\n else\n {\n \treturn $result;\n }\n}", "title": "" }, { "docid": "1cbe132c20a8bc34b54b6f8a0bb8d9f9", "score": "0.50440675", "text": "public static function wpph_update_who(){\n //@Todo\n }", "title": "" }, { "docid": "6f18f387442ac2af1d83c08c070db770", "score": "0.5009054", "text": "public function sendFriendRequest(){\n\t\t//build a friendship request\n\t\t$target = $_GET['userid'];\n\t\t$me = $this->user->user_id;\n\t\t//2 is friend requesting\n\t\t$q = \"INSERT INTO `relationships`(`me`, `you`, `kind`) VALUES($me, $target, 2) ON DUPLICATE KEY UPDATE `kind` = 2\";\n\t\tDB::instance(DB_NAME)->query($q);\n\t}", "title": "" }, { "docid": "b30a504cd6d41b56345668bbd5950ff8", "score": "0.5005221", "text": "public function createAll() {\n set_time_limit(1200);\n // assumption: that you run sync lists first to fully update your local db\n\t $yg = new Yiigun(); \n // check if master list exists at mailgun\n $exists = false;\n $cloud_lists = $yg->fetchLists();\n foreach ($cloud_lists->items as $item) {\n if ($item->address == 'all_members@'.Yii::app()->params['mail_domain']) {\n $exists=true;\n break;\n }\n } \n $newlist = new stdClass;\n $newlist->address = 'all_members@'.Yii::app()->params['mail_domain']; \n $newlist->name = 'All members';\n $newlist->description = 'An automatically created list with all of your members.';\n $newlist->access_level = 'readonly'; \n if (!$exists) {\n // create list in the cloud\n \t $result = $yg->listCreate($newlist);\n } \n // check if master list exists locally\n $lookup_item=$this->findByAttributes(array('address'=>$newlist->address)); \n if (is_null($lookup_item)) {\n // if not create it locally\n $mgl = new Mglist();\n $mgl->name = $newlist->name;\n $mgl->access_level = $newlist->access_level;\n $mgl->address = $newlist->address;\n $mgl->description = $newlist->description;\n $mgl->created_at =new CDbExpression('NOW()'); \n $mgl->modified_at =new CDbExpression('NOW()'); \n $mgl->save();\n $all_list_id = $mgl->id;\n } else {\n $all_list_id = $lookup_item->id;\n }\n // loop through all unique local members by 1000 \n//$members=Membership::model()->findAll(array('select'=>'member_id','distinct'=>true,'condition'=>'mglist_id<>:mglist_id','params'=>array(':mglist_id' => $all_list_id),'order'=>'member_id asc')); \n \n // find all distinct email addresses\n $members=Member::model()->findAll(array('select'=>'address','distinct'=>true,'order'=>'address asc')); \n \n $counter = 0;\n $uploadStr='';\n // add to combined list locally\n foreach ($members as $member) {\n $m=Member::model()->findByAttributes(array('address'=>$member['address']));\n Member::model()->addToList($m['id'],$all_list_id);\n $uploadStr.=$yg->createJsonMember($m['name'],$m['address']);\n $counter+=1;\n // count by 1000 to manage cloud upload\n if ($counter>=900) {\n $uploadStr=$yg->wrapJsonStr($uploadStr);\n // add to combined list in the cloud with bulk import\n $yg->memberBulkAdd($newlist->address,$uploadStr);\n $counter =0;\n $uploadStr='';\n }\n } \n // upload last group to cloud \n if ($uploadStr<>'') {\n $uploadStr=$yg->wrapJsonStr($uploadStr);\n $yg->memberBulkAdd($newlist->address,$uploadStr); \n }\n }", "title": "" }, { "docid": "e8a37c10224fd7b3a684c78fa683e266", "score": "0.5001009", "text": "function tweets_networkwe($friendList,$uid) {\n\t\n\t\t\tif ($friendList) {\n\t\t\t\t\t\t$friendLists = @implode(',',$friendList);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$friendLists = $uid;\n\t\t\t\t}\n\t\t\t\t\tif ($friendLists) {\n\t\t\t\t\t\t$get_tweets = ClassRegistry::init('tweets')->find('all', array('fields' => 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 tweets.tweet,\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 tweets.user_id,\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 tweets.id,\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 tweets.photo,\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 tweets.created,\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 users_profiles.firstname,\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 users_profiles.lastname,\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 users_profiles.photo,\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 users_profiles.user_id,\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 users_profiles.handler\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'order'=>'tweets.created DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'limit' =>6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'joins'=>array(\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 array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left', 'foreignKey' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions' => array('tweets.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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'conditions'=>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\tarray('tweets.user_id IN ('.$friendLists.')'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'tweets.parent_id =0 AND tweets.status=2'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'group'=>'tweets.id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\treturn $get_tweets;\n\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "6f43732cd1152f8e33cfa801eb5b832a", "score": "0.4972858", "text": "function SendNewFriendNotificationsV4($job, &$log){\n\t$success = true;\n\t$dbHandle = DbHandler::getConnection();\n\t$user_collection = $dbHandle->users;\n\t$notification_collection = $dbHandle->notifications;\n $user_args= json_decode ($job->workload(), true);\n $log[] = \"Received job: \" . $job->handle() . \"\\n\";\n\t$friendResource = new Friends();\n\t$notification = new Notifications();\n\t$users = new CreateUser();\n\t$search = new SearchUser();\n\t$poke_friends = array();\n\t$friends_uids = array();\n\t$uid = $user_args['uid'];\n\t$name = \"Unknown\";\n\t//$details = $user_collection->findOne(array('uid' => intval($uid)), array('name', 'fbid', 'country'));\n\t$myfbid = $user_args['fbid'];\n if (isset ($user_args['name'])){\n $name = $user_args['name'];\n }\n\n\t$friends = $friendResource->getFriends($uid, false);\n\tforeach ($friends as $friend){\n\t\tif ($friend['fbid'] == $myfbid){\n\t\t\tcontinue;\n\t\t}\n\t\telse{\n \t\tarray_push ($poke_friends, \"\".$friend['uid'].\"\");\n \tarray_push ($friends_uids, intval ($friend['uid']));\n\t\t}\n }\n\tif (count ($poke_friends) == 0){\n\t\t$log[] = \"No friends to send notifications\";\n\t\treturn;\n\t}\n\t\n\t$device_tokens = $users->getDeviceTokens($friends_uids);\n\t$type = 6; //friend addition.\n\t$message = \"Nice! Your friend \".$name. \" has joined amplyfy.me\";\n\t$country = \"IN_airtel\"; //get this from user table. \n\t$args = array ('from_id' => $uid, 'message' => $message, 'type' => $type, 'is_read' => 0, 'created_on' => new MongoDate(time()), 'country' => $country);\n\t$result = $notification->insertNotification($args, $poke_friends, $device_tokens, $message);\n \tif ($result) {\n \t$log[] = \"Notifications successfully posted\";\n } else {\n \t$log[] = \"Error in posting notifications\";\n }\n\t$update = new Updates();\n\t$friend_notif = $update->getUpdatesOfFriends(\"\".$uid, \"\".$myfbid, $poke_friends);\n\tif (count ($friend_notif) != 0){\n\t\t$success = $notification_collection->batchInsert($friend_notif);\n\t}\n\tif ($success){\n\t\t$log[] = \"Notifications of friend added to user\";\n\t}\n\telse{\n\t\t$log[] = \"Error in adding Notifications\";\n\t}\n\treturn;\n}", "title": "" }, { "docid": "8be9802f8e71208e272cc6eb76cd3862", "score": "0.49636245", "text": "public function get_friend($userid, $p, $seachWord = '') {\n\t\t// $fanids = $this->select_data('lz_friend', 'userid2', $where, 'id desc', 0, 10);\n\n\t\t$p = $p * 18;\n\t\t$where = \" and userid1 = \".$userid;\n\t\tif(!empty($seachWord)) {\n\t\t\t$where .= ' and userid2 in (select userid from lz_user where nickname like \"%'.$seachWord.'%\" ) ';\n\t\t}\n\n\t\t$sql = \"SELECT userid2 FROM lz_friend WHERE 1 = 1 \".$where.\" ORDER BY id DESC LIMIT {$p},18\";\n\t\t$query = $this->db->query($sql);\n\t\t// echo $this->db->last_query();\n\t\t$fanids = $query->result_array();\n\n\t\t$friend = array();\n\t\tforeach ($fanids as $key => $value) {\n\n\t\t\t$redis_key = 'userid_'.$value['userid2'];\n\t\t\t$field = array('userid', 'avatar', 'nickname', 'productcount', 'librarycount');\n\t\t\t$friend[$key]['user'] = $this->getRedis(5, $redis_key, 'set_user', $userid, $field);\n\n\n\t\t\t$where = array('userid' => $value['userid2'],'isdel'=>0);\n\t\t\t$friend[$key]['pro'] = $this->select_data('lz_product', 'proid, smallpic', $where, 'proid desc', 0, 3);\n\n\t\t}\n\n\t\t// var_dump($friend);\n\t\treturn $friend;\n\n\t}", "title": "" }, { "docid": "87a7473d434498dd7dadb81f2631dbfa", "score": "0.49601433", "text": "function addFriends($friendList, $username) {\n}", "title": "" }, { "docid": "aa477c07fda79ba68fdc29bc44dbf29c", "score": "0.49560302", "text": "function teamspeak3_get_teamspeak_userlist($vserver)\n{\n\t$offset=0;\n $limit=200; // 200 is the max \n\t$count=1;\n\t$ts3_userlist=array();\n\twhile($offset < $count)\n\t{\n\t\t//echo \"offset: \".$offset.\"<br>\";\n\t\t$arr_ClientList = $vserver->clientListDb($offset,$limit);\n\n\t\tforeach($arr_ClientList as $ts3_Client)\n\t\t{\n\t\t\tif($ts3_Client[\"count\"]) $count=$ts3_Client[\"count\"];\n\t\t\tif($ts3_Client[\"client_type\"]) continue;\n\t\t\t$ts3_userlist = array_merge($ts3_userlist, array($ts3_Client));\n\t\t}\n\t\t$offset = $offset + $limit;\n\t}\n\n\t//echo \"<br>Gesamtanzahl: \".$count;\n\t//teamspeak3_print_r('ts3_userlist',$ts3_userlist);\n\treturn $ts3_userlist;\n}", "title": "" }, { "docid": "cdd8e0cef1f5f46e4fb2752b3734b28e", "score": "0.4947841", "text": "function getFBAMFriends($uid){\n\t\t$friend_list_fb = array();\n\t\t$friend_list = array();\n //call FB get app friends and populate the fbids\n if ($uid == '' || is_null ($uid)){\n $this->logger->log (\"uid should be present\",Zend_Log::INFO);\n return null;\n }\n\n $search = new SearchUser();\n $access_token = $search->getAccessTokenFromUID($uid);\n if($access_token == \"\")\n {\n $this->logger->log(\"access_token not stored\",Zend_Log::INFO);\n }\n\t\telse{\n \t$url = \"https://api.facebook.com/method/friends.getAppUsers?access_token=\".$access_token.\"&format=json\";\n \t$curl = new CURL();\n \t$curl->retry = 1;\n \t$opts = array( CURLOPT_RETURNTRANSFER => true);\n \t$curl->addSession($url, $opts);\n \t$result = $curl->exec();\n \t$curl->clear();\n \t$friend_list_fb = json_decode($result,1);\n \tif(array_key_exists('error_code', $friend_list)){\n \t$this->logger->log(\"access token expired\",Zend_Log::INFO);\n\t\t\t\t$token_error = true;\n \t}\n\t\t}\n\t\tif (count ($friend_list_fb) != 0){\n\t\t\t$friend_list_fb_str = array();\n\t\t\tforeach ($friend_list_fb as $fb){\n\t\t\t\t$friend_list_fb_str[] = \"\".$fb;\n\t\t\t}\n\t\t\t$collection = $this->dbHandle->users;\n\t\t\t$users = $collection->find(array (\"fbid\" => array ('$in' => $friend_list_fb_str)), array (\"uid\"));\n\t\t\tforeach ($users as $user){\n\t\t\t\t$friend_list[] = $user['uid'];\n\t\t\t}\n\t\t}\n\t\t\n $ret = $search->getAmplyfyFriends($uid);\n if (isset ($ret['amplyfy_friend'])){\n $amplyfy_friends = $ret['amplyfy_friend'];\n }\n $amplyfy_friends[] = $uid;//add my uid too\n if (!is_null($amplyfy_friends)){\n foreach ($amplyfy_friends as $amplyfy_friend){\n if (!in_array ($amplyfy_friend, $friend_list)){\n array_push($friend_list, $amplyfy_friend);\n }\n }\n }\n\t\treturn $friend_list;\t\n\t}", "title": "" }, { "docid": "33c292ed2b1675c1a331325a526945e6", "score": "0.49447817", "text": "function getMatchLocal (){\n// $mapper->getMatch($senderid,$recieverid);\n}", "title": "" }, { "docid": "94d6fbebc0235347a0ca419589c6a2d1", "score": "0.49387583", "text": "public function member();", "title": "" }, { "docid": "99f95eba0e1bfaa5c94ff8129492e47a", "score": "0.49384925", "text": "function getFriendUname() {\n\t\tglobal $icmsUser;\n\t\t$uid = isset($_REQUEST['uid'])?intval($_REQUEST['uid']):$icmsUser->uid();\n\t\t$friend_uid = ($uid==$this->getVar('friend2_uid')) ? $this->getVar('friend1_uid') : $this->getVar('friend2_uid');\n\t\treturn XoopsUser::getUnameFromId($friend_uid);\n\t}", "title": "" }, { "docid": "e321716ac623c28a212d607ec221d44c", "score": "0.49294496", "text": "private function administrate_players() \n\t{\n\t\t$players = $this->players->all();\n\n\t\t$players_array = array();\n\t\tforeach ($players as $player) \n\t\t{\n\t\t\t$players_array[] = (array) $player;\n\t\t}\n\t\t$this->data['adminplayertable'] = $players_array;\n\t}", "title": "" }, { "docid": "fc857ded2168f35d8be057546d772789", "score": "0.49275932", "text": "function bindme($mnet, $vmoodlesub, $url = '') {\n global $DB, $MNET, $CFG;\n static $application;\n\n if (empty($application)) {\n $application = $DB->get_record('mnet_application', array('name' => 'moodle'));\n }\n\n if (!empty($vmoodlesub)) {\n $remoteurl = $vmoodlesub->vhostname;\n } else {\n if (!empty($url)) {\n $remoteurl = $url;\n } else {\n die (\"No url given to bind to\\nExiting...\\n\");\n }\n }\n\n $mnetpeer = new mnet_peer();\n $mnetpeer->wwwroot = $remoteurl;\n echo \"Bootstrapping to $remoteurl.\\n\";\n $mnetpeer->bootstrap($mnetpeer->wwwroot, null, $application->id, true);\n $mnetpeer->commit();\n /*\n if ($CFG->debug == E_ALL) {\n echo \"Is Boostrapped : {$mnetpeer->bootstrapped}\\n\";\n echo \"Mnet Public key : {$mnetpeer->public_key}\\n\";\n }\n */\n cache_helper::invalidate_by_definition('core', 'config');\n\n /*\n * Get default strategy for main to sub service exchanges.\n * All nodes in the network should have the same vmoodle services settings so\n * each node knows the main and the sub behaviour.\n */\n vmoodle_get_service_strategy(null, $mainstrategy, $peerstrategy, 'main');\n\n // Bind main services.\n if (!empty($vmoodlesub)) {\n // We are in a main.\n // Bind our main strategy to the peer (which is a sub).\n mtrace(\"Binding main strategy to peer $mnetpeer->name\\n\");\n try {\n vmoodle_bind_services($mnetpeer, $mainstrategy);\n } catch (Exception $ex) {\n die(\"Worker has thrown exception : \".$ex->getMessage().\"\\n\");\n }\n\n } else {\n // We are in a sub so the peer strategy applies to us regarding the mnetpeer (which is main)\n // Bind the sub strategy to main.\n mtrace(\"Binding sub strategy to peer $mnetpeer->name\\n\");\n vmoodle_bind_services($mnetpeer, $peerstrategy);\n }\n}", "title": "" }, { "docid": "10163472a844a8e7ba27aaf2d435f9d2", "score": "0.49060145", "text": "public function _set_mutual_frnd_box() {\n\t\t// set mutual friend details\n\t\tif ($this->activeUser != null) {\n\t\t\t$user_friends_details = $this->FbFriend->find('all', array('conditions' => array('user_fb_id' => $this->activeUser['User']['fb_id'])));\n\t\t\t// pr($user_friends_details);\n\t\t\t$user_fb_id = array();\n\t \tforeach ($user_friends_details as $key => $value) {\n\t \t\t\tarray_push($user_fb_id, $value['FbFriend']['fb_id']);\n\t \t}\n\t \t// pr($user_fb_id);\n\t \t$mutual_friend_details = array();\n\t \tforeach ($user_fb_id as $fb_id) {\n\t \t\t$tmp_detials = $this->User->find('first', array('fields' => array('fb_name', 'fb_profilepic', 'fb_id'), 'conditions' => array('fb_id' => $fb_id)));\n\n\t \t\t// get last ad of friend\n\t \t\t$find_result = 'by_fb_id:\"'.$fb_id.'\"';\n\t\t\t\t$post = $this->AdPost->curlGet('axi_fxchng/_design/ad/_search/adSearch?q='.$find_result.'&sort=%22-sort_time%22&include_docs=true&limit=1');\n\t\t\t\t// pr($post);\n\t\t\t\tif ($post['total_rows'] == 1) {\n\t\t\t\t\t$this->set('post' ,$post['rows']);\n\t\t\t\t\t// pr($post);\n\t\t\t\t\t$ad_detail = '1 ad posted till';\n\t\t\t\t\t$ad_id = $post['rows'][0]['doc']['_id'];\n\t\t\t\t} else if ($post['total_rows'] > 1) {\n\t\t\t\t\t$ad_detail = $post['total_rows']. ' ads posted till.';\n\t\t\t\t\t$ad_id = $post['rows'][0]['doc']['_id'];\n\t\t\t\t} else {\n\t\t\t\t\t$ad_detail = 'No ad posted till';\n\t\t\t\t\t$ad_id = '0';\n\t\t\t\t}\n\t\t\t\tif ($tmp_detials != null) {\n\t\t\t\t\t$tmp_mutual_friend_details['mutual_friend_fb_id'] = $tmp_detials['User']['fb_id'];\n\t\t \t\t$tmp_mutual_friend_details['mutual_friend_name'] = $tmp_detials['User']['fb_name'];\n\t\t \t\t$tmp_mutual_friend_details['mutual_friend_pic'] = $tmp_detials['User']['fb_profilepic'];\n\t\t \t\t$tmp_mutual_friend_details['ad_detial'] = $ad_detail;\n\t\t \t\t$tmp_mutual_friend_details['mutual_friend_ad_details'] = $ad_id;\n\t\t \t\tarray_push($mutual_friend_details, $tmp_mutual_friend_details);\n\t\t\t\t}\n\t \t}\n\n\t \t$this->set('mutual_friend_details', $mutual_friend_details);\n\t\t}\n\t}", "title": "" }, { "docid": "1fe70cdb54a81ffb2467e3f479781768", "score": "0.4904311", "text": "function acceptFriend($userId,$profileId) {\n $db = connect();\n if ($db == null) {\n return false;\n }\n if (isFriendPending($profileId,$userId) && !isFriend($userId,$profileId)) {\n $result = addFriend($userId,$profileId);\n if ($result) {\n try {\n $db->users->update(array('_id'=>new MongoId($userId)),array('$pull'=>array('requests.friendRequests'=>array('userId'=>new MongoId($profileId)))));\n $db->users->update(array('_id'=>new MongoId($profileId)),array('$pull'=>array('requestsMade.friendRequestsMade'=>array('profileId'=>new MongoId($userId)))));\n } catch (Exception $e) {\n echo \"error in acceptFriend\";\n print_r($e);\n }\n $result = true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "c3edf463586d8eeb55e79c0ee29bd28a", "score": "0.49037656", "text": "function PHPTube () {\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "550f9b52798bc1d428c2f960b7e9e122", "score": "0.4902521", "text": "public function moveParticipatingPlayers(): void {\n\n if (MonthlyPvpParticipant::all()->isEmpty()) {\n event(new GlobalMessageEvent('The Creator is sad, no one want to participate in monthly PVP :( Maybe next month! Shiny rewards yo!'));\n\n MonthlyPvpParticipant::truncate();\n\n return;\n }\n\n $query = (new UserOnlineValue())->getUsersOnlineQuery();\n\n if (!$this->doWeHaveEnoughUsersOnLine($query)) {\n return;\n }\n\n $users = $query->pluck('user_id')->toArray();\n\n $usersInFight = Character::whereIn('user_id', $users)->join('monthly_pvp_participants', function($join) {\n $join->on('monthly_pvp_participants.character_id', '=', 'characters.id');\n })->select('characters.*');\n\n if (!$this->doWeHaveEnoughRegisteredPlayersOnline($usersInFight)) {\n return;\n }\n\n event(new GlobalMessageEvent('ATTN! Monthly pvp is about to start! Moving all participants!'));\n\n $usersInFight->chunkById(100, function($characters) {\n foreach ($characters as $character) {\n $this->movePlayerToNewLocation($character);\n }\n });\n\n event(new GlobalMessageEvent('ATTN! Participants for monthly pvp have been moved. Battle is about to begin in 2 minutes. Please stand by!'));\n\n MonthlyPvpFight::dispatch($usersInFight->get())->delay(now()->addMinutes(2))->onQueue('default_long');\n }", "title": "" }, { "docid": "b9aea3a2538371b89baac5ffc2a2c732", "score": "0.49001083", "text": "private function me() {\n $user = $this->user;\n $friends = [];\n $allfriends = [];\n $users = \\App\\Models\\User::where('users.id', $user->id) /*->with('myclass')*/\n ->select('users.id',\n 'users.name',\n 'users.email',\n 'users.mid_name',\n 'users.last_name',\n 'users.FB_UID',\n 'users.FB_PASS',\n 'users.email_verified',\n 'users.active_verification_code',\n 'users.activated_at',\n 'users.acctype',\n 'users.avatar',\n 'users.showcase',\n 'users.status',\n 'users.country_id',\n 'users.institute_id'\n )->withCount('friends')->withCount('followers') /*->with('friendsinvers')->with('requested')->withCount('requested')->with('requester')*/->first();\n\n // $friends['friend'] = array_column($users->friendsinvers->toArray(), 'id');\n // $friends['requested'] = array_column($users->requested->toArray(), 'requester_id');\n // $friends['requester'] = array_column($users->requester->toArray(), 'requested_id');\n // foreach ($friends as $key => $value) {\n // for ($i = 0; $i < count($value); $i++) {\n // $allfriends[$value[$i]] = $key;\n // }\n // }\n // unset($users->friends, $users->friendsinvers, $users->requester, $users->requested);\n // $users->friend = $allfriends;\n\n $permissions = new members(['action' => 'getPermissions', 'user_id' => \\Auth::user()->id]);\n $users['level'] = $permissions->level;\n $users['permission'] = ['home' => $permissions->permissions['home'], 'social' => $permissions->permissions['social']];\n $count = \\App\\Models\\notification::where('receiver_id', \"=\", $user->id)->where('seen', \"=\", 0)->count();\n $users['un_seen_notifications'] = $count;\n return ($users);\n }", "title": "" }, { "docid": "17dc7bed92da6eee029f933dbe94ccf4", "score": "0.48962843", "text": "private function friendVisit(){\n\t\t$this->template->content = View::instance('v_otheruser');\n\t\t$client_files = Array(\"../css/profile.css\",\n\t\t\t\t\t\t\t \"../javascripts/otheruser.js\",\n\t\t\t\t\t\t\t \"../javascripts/friendRequest.js\");\n\t\t$q = DB::instance(DB_NAME)->select_row(\"SELECT `name`, `headshot` FROM `users` WHERE `user_id`=\".$_GET['userID']);\n\t\t\n\t $this->template->client_files = Utils::load_client_files($client_files);\n\t\t$this->template->title = $q['name'].\"'s Profile\";\n\t\t$this->template->content->name = $q['name'];\n\t\t$this->template->content->headshot = $q['headshot'];\n\t\t\n\t\techo $this->template;\n\t}", "title": "" }, { "docid": "f042d2002f2900f2f393e84fcf1f5495", "score": "0.48826897", "text": "public function partner() {\r\n\t}", "title": "" }, { "docid": "3768ec1d6d42d2ce96c80701ba80e7e0", "score": "0.4863905", "text": "public function fetchPlayList()\n {\n }", "title": "" }, { "docid": "7b76b9daf8fd0ad5ce46081fb68382ff", "score": "0.48627406", "text": "public function searchUPNP(string $member){\n\t\t/*mögliche Aufrufe:\n\t\t$ST_ALL = \"ssdp:all\";\n\t\t$ST_RD = \"upnp:rootdevice\";\n\t\t$ST_AV = \"urn:dial-multiscreen-org:service:dial:1\"; \n\t\t*/\n\t\t$ST_MR = \"urn:schemas-upnp-org:device:MediaRenderer:1\";\n\t\t$ST_MS = \"urn:schemas-upnp-org:device:MediaServer:1\";\n\t\t/*\n\t\t$ST_CD = \"urn:schemas-upnp-org:service:ContentDirectory:1\";\n\t\t$ST_RC = \"urn:schemas-upnp-org:service:RenderingControl:1\";\n\t\t--------------------------------------------------------------------------------\n\t\t*/\n\t\tif ($member == \"client\"){\n\t\t\t$this->SetValue(\"upnp_ClientArray\", 'suche Devices ...');\n\t\t\t$SSDP_Search_Array = $this->mSearch($ST_MR);\n\t\t\t//IPSLog('mSearch Ergebnis ',$SSDP_Search_Array);\n\t\t\t\n\t\t\t$SSDP_Array = $this->array_multi_unique($SSDP_Search_Array);\n\t\t\t//IPSLog('bereinigtes mSearch Ergebnis ',$SSDP_Array);\n\t\t\t\n\t\t \t$UPNP_Device_Array = $this->create_UPNP_Device_Array($SSDP_Array); \n\t\t\t//IPSLog('create Device Ergebnis ',$UPNP_Device_Array);\n\t\t\t//Ergebnis wird als ARRAY in ID_CLIENT_ARRAY in Subfunctions gespeichert;\n\t\t\t$array = $this->GetValue(\"upnp_ClientArray\");\n\t\t\tif ($array){$result = true;}\n\t\t\telse{$result = false;}\n\t\t}\n\t\tif ($member == \"server\"){\n\t\t\t$this->setvalue(\"upnp_ServerArray\", 'suche Server ...');\n\t\t\t$SSDP_Search_Array = $this->mSearch($ST_MS);\n\t\t\t$SSDP_Array = $this->array_multi_unique($SSDP_Search_Array);\n\t\t\t//IPSLog('bereinigtes mSearch Ergebnis ',$SSDP_Array);\n\t\t \t$UPNP_Server_Array = $this->create_UPNP_Server_Array($SSDP_Array); \n\t\t\t//Ergebnis wird als ARRAY in ID_Server_ARRAY in Subfunctions gespeichert;\n\t\t\t$array = $this->GetValue(\"upnp_ServerArray\");\n\t\t\tif ($array){$result = true;}\n\t\t\telse{$result = false;}\n\t\t}\n\t\t//IPSLog('FERTIG ', $result);\n\t\treturn($result);\n\t}", "title": "" }, { "docid": "aebe33370d6ce5861910e8b58b87a693", "score": "0.48555627", "text": "public function petunjuk_fm() {\n \n }", "title": "" }, { "docid": "4813617b15def4108575c6343df04121", "score": "0.48551568", "text": "function getFriendLinkedUname() {\n\t\tglobal $icmsUser;\n\t\t$uid = isset($_REQUEST['uid'])?intval($_REQUEST['uid']):$icmsUser->uid();\n\t\t$friend_uid = ($uid==$this->getVar('friend2_uid')) ? $this->getVar('friend1_uid') : $this->getVar('friend2_uid');\n\t\treturn icms_getLinkedUnameFromId($friend_uid);\n\t}", "title": "" }, { "docid": "60ee3f568b80a43d86142e04110a0d8d", "score": "0.48544016", "text": "public function updateNames()\n {\n \\DB::table('users')->update(['on_server' => 0]);\n\n foreach($this->voiceServer->getMembers() AS $id => $name)\n {\n $userProvider = $this->userProvider->getByProvider('discord', $id);\n if ($userProvider) {\n $userProvider->user->name = $name;\n $userProvider->user->new = false;\n $userProvider->user->on_server = true;\n $userProvider->user->save();\n }\n }\n }", "title": "" }, { "docid": "7ae3a8fb63124c6055319869702efaac", "score": "0.48390335", "text": "function adminipwhitelist_upgrade($vars) {\r\n}", "title": "" }, { "docid": "2e3dc9542d41cc87699acfd39dbb80f4", "score": "0.4837433", "text": "public function invite_friends(){\r\n\r\n\t//\t$this->clearsession();\r\n\t\t$ok = $this->twconnect->twredirect('twtest/invite_callback');\r\n\r\n\t\tif (!$ok) {\r\n\t\t\techo 'Could not connect to Twitter. Refresh the page or try again later.';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4d2863896a615f3fbc7a990b487a027b", "score": "0.48313203", "text": "abstract public static function UP();", "title": "" }, { "docid": "fb43565ef60d7c46a24750d53e89289f", "score": "0.4826342", "text": "function addFriend($friendUsername);", "title": "" }, { "docid": "a4c8d64cf36040bf09965328404b1598", "score": "0.48197636", "text": "function friends_list_add()\n \t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend_id \t\t = intval( $this->ipsclass->input['member_id'] );\n\t\t$md5check \t\t = substr( $this->ipsclass->input['md5check'], 0, 32 );\n\t\t$friend \t\t = array();\n\t\t$member \t\t = array();\n\t\t$friends_approved = 1;\n\t\t$message\t\t = '';\n\t\t$subject\t\t = '';\n\t\t$to = array();\n\t\t$from = array();\n\t\t$return_msg = '';\n\t\t\n\t\t//-----------------------------------------\n \t// Get the emailer module\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.\"sources/classes/class_email.php\" );\n\t\t\n\t\t$email = new emailer();\n\t\t$email->ipsclass =& $this->ipsclass;\n\t\t$email->email_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get MSG library class\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.'sources/lib/func_msg.php' );\n \t\t\n\t\t$msg_lib = new func_msg();\n\t\t$msg_lib->ipsclass =& $this->ipsclass;\n\t\t$msg_lib->init();\n\t\t$this->ipsclass->load_language( 'lang_msg' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// MD5 check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $md5check != $this->ipsclass->return_md5_check() )\n \t{\n \t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' );\n\t\t\texit();\n \t}\n\n\t\t//-----------------------------------------\n\t\t// Adding yourself?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->member['id'] == $friend_id )\n \t{\n \t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' );\n\t\t\texit();\n \t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get friend...\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend = $this->personal_function_load_member( $friend_id );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get member...\n\t\t//-----------------------------------------\n\t\t\n\t\t$member = $this->personal_function_load_member( $this->ipsclass->member['id'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $friend['id'] OR ! $member['id'] )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=error' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Already a friend?\n\t\t//-----------------------------------------\n\t\t\n\t\t$friend_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'friends_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'profile_friends',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"friends_member_id=\".$this->ipsclass->member['id'].\" AND friends_friend_id=\".$friend['id'] ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tif ( $friend_check['friends_id'] )\n\t\t{\n\t\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg=pp_friend_already' );\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Friend requires approval?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $friend['pp_setting_moderate_friends'] )\n\t\t{\n\t\t\t$friends_approved = 0;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add to DB\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'profile_friends', array( 'friends_member_id' => $member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_friend_id' => $friend['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_approved' => $friends_approved,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'friends_added' => time() ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// What are we doing? Sending out 'mod' or 'yay'\n\t\t// message?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $friends_approved AND $friend['pp_setting_notify_friend'] )\n\t\t{\n\t\t\t$email->get_template(\"new_friend_request\");\n\t\t\t\t\n\t\t\t$email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t 'FRIEND_NAME' => $member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t 'LINK'\t\t\t\t => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) );\n\t\t\t \n\t\t\t$message = $email->message;\n\t\t\t$subject = $email->lang_subject;\n\t\t\t$to = $friend;\n\t\t\t$from = $member;\n\t\t\t$return_msg = 'pp_friend_added_mod';\n\t\t}\n\t\telse if ( $friend['pp_setting_notify_friend'] != 'none' )\n\t\t{\n\t\t\t$email->get_template(\"new_friend_added\");\n\n\t\t\t$email->build_message( array( 'MEMBERS_DISPLAY_NAME' => $friend['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t 'FRIEND_NAME' => $member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t 'LINK'\t\t\t\t => $this->ipsclass->vars['board_url'] . '/index.' . $this->ipsclass->vars['php_ext'] . '?act=profile&CODE=personal_portal_view&tab=settings&id='.$friend['id'] ) );\n\n\t\t\t$message = $email->message;\n\t\t\t$subject = $email->lang_subject;\n\t\t\t$to = $friend;\n\t\t\t$from = $member;\n\t\t\t$return_msg = 'pp_friend_added';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Got anything to send?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $message AND $subject )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Email?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $friend['pp_setting_notify_friend'] == 'email' OR ( $friend['pp_setting_notify_friend'] AND $friend['members_disable_pm'] ) )\n\t\t\t{\n\t\t\t\t$email->subject = $subject;\n\t\t\t\t$email->message = $message;\n\t\t\t\t$email->to = $to['email'];\n\t\t\t\t\n\t\t\t\t$email->send_mail();\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// PM?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\telse if ( $friend['pp_setting_notify_friend'] )\n\t\t\t{\n\t\t\t\t$msg_lib->to_by_id = $to['id'];\n \t\t\t\t$msg_lib->from_member = $from;\n \t\t\t\t$msg_lib->msg_title = $subject;\n \t\t\t\t\n \t\t\t\t$msg_lib->postlib->parser->parse_bbcode \t= 1;\n \t\t\t\t$msg_lib->postlib->parser->parse_smilies \t= 0;\n \t\t\t\t$msg_lib->postlib->parser->parse_html \t\t= 0;\n \t\t\t\t$msg_lib->postlib->parser->parse_nl2br \t\t= 1;\n \t\t\t\t$msg_lib->msg_post = $msg_lib->postlib->parser->pre_display_parse( $msg_lib->postlib->parser->pre_db_parse( $message ) );\n\t\t \t\t\t\t\n\t\t\t\t$msg_lib->force_pm = 1;\n\t\t\t\t\n\t\t\t\t$msg_lib->send_pm();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Recache..\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->personal_function_recache_members_friends( $member );\n\t\t$this->personal_function_recache_members_friends( $friend );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->boink_it( $this->ipsclass->base_url . '&act=profile&CODE=friends_list_popup&___msg='.$return_msg );\n\t}", "title": "" }, { "docid": "61e4a1aab34279a4e3cec4b0d87c2da2", "score": "0.48190597", "text": "function wpea_username_to_smf_member_name($username) {\n global $wpea_smf_member_names;\n if (isset($wpea_smf_member_names) && is_array($wpea_smf_member_names)) {\n if (isset($wpea_smf_member_names[$username])) {\n return $wpea_smf_member_names[$username];\n }\n }\n if ($email = wpea_get_user_email($username)) {\n $res = wpea_lookup_smf_member_by_email($email);\n if ($res) return $res;\n if ($smf_email = wpea_lookup_smf_member_email($username)) {\n if ($email != $smf_email) {\n\t// There's already an SMF member with $username, but a different email address.\n\t// If this were real, it would have been in $wpea_smf_member_names.\n\t// Create a new $username that is not yet in the database\n\t// This means that if you change the email in WP eMember, you MUST change it in SMF\n\tfor ($cnt=2; ; $cnt++) {\n\t $un = $username . $cnt;\n\t if (!wpea_lookup_smf_member_id($un)) return $un;\n\t}\n }\n }\n }\n return $username;\n}", "title": "" }, { "docid": "32da1527c7e452d2a6b1b1bf48bba7c9", "score": "0.48147956", "text": "public function sql_get_friends_list() {\n \n \t$rArray = array();\n \n $member_id = $this->EE->TMPL->fetch_param(\"member_id\");\n \n \t $imgArray = $this->sql_get_all_image();\n \n $sql = 'SELECT * FROM exp_members \n LEFT JOIN exp_member_data\n ON ( exp_members.member_id = exp_member_data.member_id) ORDER BY exp_members.member_id';\n \n $allMembers = $this->EE->db->query( $sql );\n \n $sql = \"SELECT * FROM exp_channel_data where exp_channel_data.channel_id = 6 AND ( (exp_channel_data.field_id_31 = $member_id) OR (exp_channel_data.field_id_55 = $member_id) ) \";\n// $sql = \"SELECT * FROM v_friends where ( (v_friends.field_id_31 = $member_id) OR (exp_channel_data.field_id_55 = $member_id) ) \";\n// $sql = \"SELECT * FROM v_friends where (friend_id = $member_id OR sender_id = $member_id)\";\n \n $query = $this->EE->db->query( $sql );\n if ($query->num_rows() > 0){\n foreach($query->result_array() as $row) {\n \n $friend = $row['field_id_31'];\n \n if( $row['field_id_31'] == $member_id ){\n $friend = $row['field_id_55'];\n }\n \t \n foreach($allMembers->result_array() as $mRow) { \n \n //exp_channel_titles`.`status`\n //$mRow['status'] \n \n // if (strcmp( $mRow['status'], \"Approved\" ) == 0) {\n \t\t\t\t\t \t\t\t\t\t\n\t\t if ($friend == $mRow['member_id'] ){ \n\t\t \n\t\t\t\t $img = \"\"; \n\t\t \t \t for($x = 0; $x < count($imgArray); $x++ ) { \t \n\t\t\t \t \t\tif( $imgArray[$x][\"member\"] == $friend ){\n\t\t\t \t\t\t\t $img = $imgArray[$x][\"image\"];\n\t\t\t \t\t\t\t break; \n\t\t\t \t \t } \n\t\t\t } \n\t\t\t \t \t \t \n\t\t\t \t array_push($rArray, array( \"id\" => $friend, \"usr\" => $mRow['username'], \n\t\t\t \t \"first\" => $mRow['m_field_id_1'], \"last\" => $mRow['m_field_id_2'],\n\t\t\t \t \"phone\" => $mRow['m_field_id_3'], \"img\" => $img )); \n\t\t\t \t \n\t\t\t\t \t break; \n\t\t } \n \n // }\n \n } \n }\n }\n \n return json_encode($rArray);\n }", "title": "" }, { "docid": "862153f938812f084b073549cf64cb8e", "score": "0.48140475", "text": "function gi2m_displayMembers()\n {\n include('admin/gi2m_membersView.php');\n }", "title": "" }, { "docid": "22bae140fa7265016d7d6f2608f79b16", "score": "0.48132473", "text": "public function how_it_works(){\n\t\t\n\t}", "title": "" }, { "docid": "31103ec61102cb343920fd1d3fa455ca", "score": "0.4808118", "text": "function updateNominatorInfo(){\n\t\t$nominator = R::findOne('peer','slackid = ?', [$this->fromId]);\n\t\tif (empty($nominator)){\n\t\t\t//else try to find by user name based on previous recognitions to provide ID\n\t\t\t$nominator = R::findOne('peer','handle = ?', [$this->fromHandle]);\n\t\t if (empty($nominator)){\n\t\t\t\t$nominator=R::dispense('peer');\n\t\t } \n\t\t}\n\t\t$nominator->slackid = $this->fromId;\n\t\t$nominator->handle = $this->fromHandle;\n\t\t\n\t\tR::store($nominator);\n\t}", "title": "" }, { "docid": "f0e45706daa9e83d55da464b3e26ed89", "score": "0.4803798", "text": "function friends($uid) {\n\t\t$method = \"/friends\".\".\".$this->format.\"?\";\n\t\t\n\t\tif(isset($uid) && $uid != NULL && ($uid > 0))\n\t\t\t$method .= \"&uid=\".$uid;\n\t\t\n\t\t$this->response = $this->connect($method);\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "3a54b768fbbf40ccf1e6149c501cd488", "score": "0.4791613", "text": "function getFriendUid() {\n\t\tglobal $icmsUser;\n\t\t$uid = isset($_REQUEST['uid'])?intval($_REQUEST['uid']):$icmsUser->uid();\n\t\t$friend_uid = ($uid==$this->getVar('friend2_uid')) ? $this->getVar('friend1_uid') : $this->getVar('friend2_uid');\n\t\treturn $friend_uid;\n\t}", "title": "" }, { "docid": "f3123f79af083189f0b09caeefd971b4", "score": "0.4779191", "text": "public function listFriendsAdmin(){\n\n $sql = \"SELECT * FROM friends\";\n $pdostm = $this->dbconn->prepare($sql);\n $pdostm->execute();\n\n $friends = $pdostm->fetchAll(PDO::FETCH_OBJ);\n return $friends;\n }", "title": "" }, { "docid": "42e837483d4a82552727b07afa541e49", "score": "0.47768536", "text": "public function api_public() {\n\t\t$this->_checkVars ( array (\n\t\t\t\t'user_big' \n\t\t) );\n\t\t\n\t\t$memBig = $this->api ['user_big'];\n\t\t\n\t\t// Get member data\n\t\tunbindAllBut ( $this->Member );\n\t\t$params = array (\n\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t'Member.big' => $this->api ['user_big'] \n\t\t\t\t),\n\t\t\t\t'fields' => array (\n\t\t\t\t\t\t'Member.big',\n\t\t\t\t\t\t'Member.name',\n\t\t\t\t\t\t'Member.middle_name',\n\t\t\t\t\t\t'Member.surname',\n\t\t\t\t\t\t'Member.photo_updated',\n\t\t\t\t\t\t'Member.sex',\n\t\t\t\t\t\t'Member.birth_date',\n\t\t\t\t\t\t'Member.address_town',\n\t\t\t\t\t\t'Member.address_country' \n\t\t\t\t) \n\t\t);\n\t\t\n\t\t$privacySettings = $this->PrivacySetting->getPrivacySettings ( $memBig );\n\t\t$photosVisibility = $privacySettings [0] ['PrivacySetting'] ['photosvisibility'];\n\t\t\n\t\t$data = $this->Member->find ( 'first', $params );\n\t\t$xisFriend = 0;\n\t\t$xfriend = $this->Friend->FriendsAllRelationship ( $this->api ['user_big'], $this->api ['member_big'] );\n\t\tif (count ( $xfriend ) > 0) {\n\t\t\t$xisFriend = 1;\n\t\t\t$data ['Member'] ['friendstatus'] = $xfriend [0] ['Friend'] ['status'];\n\t\t}\n\t\t$data ['Member'] ['isFriend'] = $xisFriend;\n\t\t\n\t\t// debug($data);\n\t\t// Get checkin or join\n\t\t$checkin = $this->Member->Checkin->getCheckedinEventFor ( $memBig, true );\n\t\t// debug($checkin);\n\t\tif (! empty ( $checkin ) && $checkin ['Event'] ['type'] == 2 && $checkin ['Event'] ['status'] == 0) {\n\t\t\t\n\t\t\t$params = array (\n\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t'Place.big' => $checkin ['Event'] ['place_big'] \n\t\t\t\t\t),\n\t\t\t\t\t'recursive' => - 1 \n\t\t\t);\n\t\t\t$place = $this->Member->Checkin->Event->Place->find ( 'first', $params );\n\t\t\t\n\t\t\t/*\n\t\t\t * from condition...\t\t\t'fields' => array ( 'Place.name', 'Place.default_photo_big', 'Place.category_id' ),\n\t\t\t */\n\t\t\t\n\t\t\t$place = $this->_addPlacePhotoUrls ( $place );\n\t\t\t\n\t\t\tif (empty ( $place )) {\n\t\t\t\t$this->_apiEr ( __('Nonexistent place.') );\n\t\t\t}\n\t\t\t\n\t\t\t$category = $this->Place->Category->getOne ( $place ['Place'] ['category_id'] );\n\t\t\t\n\t\t\t$place ['CatLang'] = $category ['CatLang'];\n\t\t\t$place ['CatLang'] ['photo'] = $this->FileUrl->category_picture ( $place ['Place'] ['category_id'], $category ['Category'] ['updated'] );\n\t\t\t\n\t\t\t$data ['Member'] ['place_big'] = $checkin ['Event'] ['place_big'];\n\t\t\t$data ['Member'] ['event_name'] = $place ['Place'] ['name'];\n\t\t\t$data ['Member'] ['physical'] = $checkin ['Checkin'] ['physical'];\n\t\t\t$data ['Member'] ['place_category_id'] = $place ['Place'] ['category_id'];\n\t\t\t/*\n\t\t\t * $data ['Member'] ['place_address_street'] = $place ['Place'] ['address_street']; $data ['Member'] ['place_address_street_no'] = $place ['Place'] ['address_street_no']; $data ['Member'] ['place_rating'] = $place ['Place'] ['rating_avg']; $data ['Member'] ['place_rating'] = $place ['Place'] ['rating_avg']; $data ['Member'] ['place_rating'] = $place ['Place'] ['rating_avg'];\n\t\t\t */\n\t\t\t\n\t\t\t$data ['Member'] ['Place'] = $place ['Place'];\n\t\t} elseif (! empty ( $checkin )) {\n\t\t\t\n\t\t\t$params = array (\n\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t'Place.big' => $checkin ['Event'] ['place_big'] \n\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\t'recursive' => - 1 \n\t\t\t);\n\t\t\t$place = $this->Member->Checkin->Event->Place->find ( 'first', $params );\n\t\t\t\n\t\t\t$place = $this->_addPlacePhotoUrls ( $place );\n\t\t\t\n\t\t\tif (empty ( $place )) {\n\t\t\t\t$this->_apiEr ( __('Nonexistent place.') );\n\t\t\t}\n\t\t\t\n\t\t\t$category = $this->Place->Category->getOne ( $place ['Place'] ['category_id'] );\n\t\t\t\n\t\t\t$place ['CatLang'] = $category ['CatLang'];\n\t\t\t$place ['CatLang'] ['photo'] = $this->FileUrl->category_picture ( $place ['Place'] ['category_id'], $category ['Category'] ['updated'] );\n\t\t\t\n\t\t\t$data ['Member'] ['event_big'] = $checkin ['Event'] ['big'];\n\t\t\t$data ['Member'] ['event_name'] = $checkin ['Event'] ['name'];\n\t\t\t$data ['Member'] ['physical'] = $checkin ['Checkin'] ['physical'];\n\t\t\t$data ['Member'] ['place_category_id'] = $place ['Place'] ['category_id'];\n\t\t\t$data ['Member'] ['Place'] = $place ['Place'];\n\t\t}\n\t\t\n\t\t// Get checkins count\n\t\t$checkinsCount = $this->Member->Checkin->getCheckinsCountForMember ( $memBig );\n\t\t$data ['Member'] ['checkins_count'] = intval ( $checkinsCount );\n\t\t\n\t\t// Photos processing\n\t\tif (isset ( $data ['Member'] ['photo_updated'] ) and $data ['Member'] ['photo_updated'] > 0) {\n\t\t\t$data ['Member'] ['profile_picture'] = $this->FileUrl->profile_picture ( $data ['Member'] ['big'], $data ['Member'] ['photo_updated'] );\n\t\t} else {\n\t\t\t$sexpic = 2;\n\t\t\tif ($data ['Member'] ['sex'] == 'f') {\n\t\t\t\t$sexpic = 3;\n\t\t\t}\n\t\t\t\n\t\t\t$data ['Member'] ['profile_picture'] = $this->FileUrl->profile_picture ( $sexpic );\n\t\t}\n\t\tunset ( $data ['Member'] ['photo_updated'] );\n\t\t\n\t\t// Get uploaded photos if photosVisibility=1\n\t\t\n\t\t$params = array (\n\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t'Photo.member_big' => $memBig \n\t\t\t\t),\n\t\t\t\t'fields' => array (\n\t\t\t\t\t\t'Photo.big',\n\t\t\t\t\t\t'Photo.original_ext',\n\t\t\t\t\t\t'Gallery.*' \n\t\t\t\t),\n\t\t\t\t'joins' => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t'table' => 'galleries',\n\t\t\t\t\t\t\t\t'alias' => 'Gallery',\n\t\t\t\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t\t\t'Photo.gallery_big = Gallery.big' \n\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t'recursive' => - 1 \n\t\t);\n\t\t\n\t\tif ($photosVisibility > 0) {\n\t\t\t\n\t\t\t$photos = $this->Member->Photo->find ( 'all', $params );\n\t\t\t$photosCount = $this->Member->Photo->find ( 'count', $params );\n\t\t\t\n\t\t\t$photos = $this->_addMemberPhotoUrls ( $photos );\n\t\t} else {\n\t\t\t$photos = array ();\n\t\t\t$photosCount = $this->Member->Photo->find ( 'count', $params );\n\t\t}\n\t\t$data ['Uploaded'] = $photos;\n\t\t$data ['Member'] ['photos_count'] = $photosCount;\n\t\t\n\t\t// ADDED key for frindship\n\t\t$xfriend = $this->Friend->FriendsAllRelationship ( $this->logged ['Member'] ['big'], $data ['Member'] ['big'] );\n\t\t$xisFriend = 0;\n\t\t$xstatus = 'NO';\n\t\tif (count ( $xfriend ) > 0) {\n\t\t\t$xisFriend = 1;\n\t\t\t$data ['Member'] ['friendstatus'] = $xfriend [0] ['Friend'] ['status'];\n\t\t\t$xstatus = $xfriend [0] ['Friend'] ['status'];\n\t\t}\n\t\t\n\t\tif ($xstatus != 'A') {\n\t\t\t$data ['Member'] ['surname'] = substr ( $data ['Member'] ['surname'], 0, 1 ) . '.';\n\t\t}\n\t\t\n\t\t$data ['Member'] ['isFriend'] = $xisFriend;\n\t\t// debug($data);\n\t\t// $this->Util->transform_name ( $data );\n\t\t// debug($data);\n\t\t// SAVES A VISIT TO PROFILE!!\n\t\t// debug ( $data );\n\t\t$this->ProfileVisit->saveVisit ( $this->logged ['Member'] ['big'], $this->api ['user_big'] );\n\t\t\n\t\t$this->_apiOk ( $data );\n\t}", "title": "" }, { "docid": "38b798cc6d57ac0d71f9897237cdfa94", "score": "0.4775867", "text": "function convert_friends(&$item, $key){\n\t$item = User::get_instance_by_nick($item->nick)->get_id();\n}", "title": "" }, { "docid": "67fb158d7b587d264acd928a06bc3a5d", "score": "0.47642076", "text": "function getOnlineUsers();", "title": "" }, { "docid": "1ff458acf8f26b63e13c885cc474f77c", "score": "0.47589326", "text": "protected function _get_friends(){\n\t\t$temp=FB::$graph->api('/me/friends');\n\t\t$friends=array();\n\t\tforeach($temp['data'] as $friend){\n\t\t\t$friends[strtr($friend['name'], 'ĘÓĄŚŁŻŹŃęóąśłżźćń', 'EOASLZZCNeoaslzzcn').$friend['id']]=$friend;\n\t\t}\n\t\tasort($friends);\n\t\treturn $friends;\n\t}", "title": "" }, { "docid": "2a27708b1763f5b802a5988186a7d097", "score": "0.47586215", "text": "function phpblock_whosonline()\n{\n global $_CONF, $_TABLES, $_USER, $LANG01, $_IMAGE_TYPE;\n\n $retval = '';\n\n $expire_time = time() - $_CONF['whosonline_threshold'];\n\n $byname = 'username';\n if( $_CONF['show_fullname'] == 1 )\n {\n $byname .= ',fullname';\n }\n if( $_CONF['user_login_method']['openid'] || $_CONF['user_login_method']['3rdparty'] )\n {\n $byname .= ',remoteusername,remoteservice';\n }\n\n $result = DB_query( \"SELECT DISTINCT {$_TABLES['sessions']}.uid,{$byname},photo,showonline FROM {$_TABLES['sessions']},{$_TABLES['users']},{$_TABLES['userprefs']} WHERE {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND start_time >= $expire_time AND {$_TABLES['sessions']}.uid <> 1 ORDER BY {$byname}\" );\n $nrows = DB_numRows( $result );\n\n $num_anon = 0;\n $num_reg = 0;\n\n for( $i = 0; $i < $nrows; $i++ )\n {\n $A = DB_fetchArray( $result );\n\n if( $A['showonline'] == 1 )\n {\n $fullname = '';\n if( $_CONF['show_fullname'] == 1 )\n {\n $fullname = $A['fullname'];\n }\n if( $_CONF['user_login_method']['openid'] || $_CONF['user_login_method']['3rdparty'] )\n {\n $username = COM_getDisplayName( $A['uid'], $A['username'],\n $fullname, $A['remoteusername'], $A['remoteservice'] );\n }\n else\n {\n $username = COM_getDisplayName( $A['uid'], $A['username'],\n $fullname );\n }\n $url = $_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . $A['uid'];\n $retval .= COM_createLink($username, $url);\n\n if( !empty( $A['photo'] ) AND $_CONF['allow_user_photo'] == 1)\n {\n $usrimg = '<img src=\"' . $_CONF['layout_url'] . '/images/smallcamera.'\n . $_IMAGE_TYPE . '\" border=\"0\" alt=\"\"' . XHTML . '>';\n $retval .= '&nbsp;' . COM_createLink($usrimg, $url);\n }\n $retval .= '<br' . XHTML . '>';\n $num_reg++;\n }\n else\n {\n // this user does not want to show up in Who's Online\n $num_anon++; // count as anonymous\n }\n }\n\n $num_anon += DB_count( $_TABLES['sessions'], 'uid', 1 );\n\n if(( $_CONF['whosonline_anonymous'] == 1 ) &&\n COM_isAnonUser() )\n {\n // note that we're overwriting the contents of $retval here\n if( $num_reg > 0 )\n {\n $retval = $LANG01[112] . ': ' . $num_reg . '<br' . XHTML . '>';\n }\n else\n {\n $retval = '';\n }\n }\n\n if( $num_anon > 0 )\n {\n $retval .= $LANG01[41] . ': ' . $num_anon . '<br' . XHTML . '>';\n }\n\n return $retval;\n}", "title": "" }, { "docid": "016fc15a2b2bad5ecf2180fdc223fbb9", "score": "0.47566998", "text": "public function shareWithGroupMembersOnly();", "title": "" }, { "docid": "a4f2f6c48e771207d53746081c6f2045", "score": "0.4751065", "text": "public function getPlayers();", "title": "" }, { "docid": "89782ad00132fcb5c621664e57296999", "score": "0.47430956", "text": "function gi2m_displayMemberInfo()\n {\n include('admin/gi2m_profileView.php');\n }", "title": "" }, { "docid": "8055020c5cdd5700075fcb1e2e4f7e34", "score": "0.47374955", "text": "function ________utils___________(){}", "title": "" }, { "docid": "70d1721552b0e7e6d727303ae7592ec5", "score": "0.47371995", "text": "function sc_online_members_list_extended()\n\t{\n\t\treturn $this->onlineMembersList;\n\t}", "title": "" }, { "docid": "f96c74bc66dae00daeedb384e5258a2f", "score": "0.47369415", "text": "public function getFriendsOf($subtype = \"\", $limit = 10, $offset = 0);", "title": "" }, { "docid": "240248c4dee88f6b23496bada5280361", "score": "0.47326654", "text": "function exectiveSpeaker($limit)\n\t\t\t{\n\t\t\t$sqledt=\"SELECT executive_coaching_topics FROM tbl_users\";\n\t\t\t$edtresult=mysql_query($sqledt);\n\t\t\tif ($data=mysql_fetch_array($edtresult)) {\n\t\t\t\t\t$executive_coaching_topics=$data['executive_coaching_topics']; //print_r($keynotes_topics);\n\t\t\t\t\t$executive_coaching_topics=explode(',' , $executive_coaching_topics); }//print_r($keynotes_topics);}\n\t\t\t$this->sql = \"SELECT * FROM tbl_users,\n\t\t\t \t\t\t\t\ttbl_business WHERE tbl_users.executive_coaching_topics=tbl_executive.id\n\t\t\t\t\t\t\t\t AND tbl_users.status='1'\n\t\t\t\t\t\t\t\t ORDER BY rand()\n\t\t\t \t\t\t\t\tLIMIT $limit\";\t\t\t \n\t\t\t$this->exec();\n\t\t\t\n\t\t\t$list = array();\n\t\t\t\n\t\t\tif($this->result)\n\t\t\t\t{\n\t\t\t\twhile($rows = $this->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t$vo = new UsersVO();\n\t\t\t\t\t\n\t\t\t\t$vo->id = $rows['id'];\n\t\t\t\t $vo->usertype = $rows['usertype'];\n\t\t\t\t $vo->company = $rows['company'];\n\t\t\t\t$vo->occupation = $rows['occupation'];\n\t\t\t\t$vo->city = $rows['city'];\n\t\t\t\t$vo->state = $rows['state'];\n\t\t\t\t\n\t\t\t\t$vo->gender = $rows['gender'];\n\t\t\t\t$vo->fname = $rows['fname']; \n\t\t\t\t$vo->lname = $rows['lname'];\n\t\t\t\t$vo->username = $rows['username'];\n\t\t\t\t$vo->email = $rows['email'];\n\t\t\t\t$vo->password = $rows['password'];\n\t\t\t\t$vo->zipcode = $rows['zipcode'];\n\t\t\t\t$vo->country = $rows['country'];\n\t\t\t\t$vo->address = $rows['address'];\n\t\t\t\t$vo->phone = $rows['phone'];\n\t\t\t\t$vo->mobile = $rows['mobile'];\n\t\t\t\t$vo->fax = $rows['fax'];\n\t\t\t\t$vo->image = $rows['image'];\n\t\t\t\t\n\t\t\t\t$vo->profiles = $rows['profiles'];\n\t\t\t\t$vo->courses = $rows['courses'];\n\t\t\t\t$vo->customer_review = $rows['customer_review'];\n\t\t\t\t$vo->education = $rows['education'];\n\t\t\t\t$vo->keynotes_topics = $rows['keynotes_topics'];\n\t\t\t\t$vo->business_training_topics = $rows['business_training_topics'];\n\t\t\t\t$vo->executive_coaching_topics = $rows['executive_coaching_topics'];\n\t\t\t\t$vo->public_speaking_topics = $rows['public_speaking_topics'];\n\t\t\t\t$vo->registerDate = $rows['registerDate'];\n\t\t\t\t$vo->lastvisitDate = $rows['lastvisitDate'];\n\t\t\t\t$vo->status = $rows['status'];\n\t\t\t\t$vo->executive_topics = $rows['executive_topics'];\n\t\t\t\t$vo->publicsem_topics = $rows['publicsem_topics'];\n\t\t\t\t\t\n\t\t\t\t\t$vo->formatFetchVariables();\n\t\t\t\t\tarray_push($list, $vo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//print_r($list);\n\t\t\treturn $list;\n\t\t\t}", "title": "" }, { "docid": "d6c656039eaed003eea2f09c655a9603", "score": "0.47300687", "text": "function testPossibleFriends() {\n $userGraph = array(\n 'Users'=> array(\n\t array(\n\t\t'Email' => '[email protected]',\n\t\t'Name' => null,\n\t\t'Surname' => null,\n\t\t'Birthdate' => '0001-01-01T00:00:00',\n\t\t'HumourStatusId' => 1,\n\t\t'InterestsIDs' => array (1,2,3,4\n\t\t ),\n\t\t'PhoneNumber' => null,\n\t\t'LinkedInProfile' => null,\n\t\t'FacebookProfile' => null,\t\t\n\t\t),\n array(\n\t\t'Email' => '[email protected]',\n\t\t'Name' => null,\n\t\t'Surname' => null,\n\t\t'Birthdate' => '0001-01-01T00:00:00',\n\t\t'HumourStatusId' => 1,\n\t\t'InterestsIDs' => array (1,2,3,4\n\t\t ),\n\t\t'PhoneNumber' => null,\n\t\t'LinkedInProfile' => null,\n\t\t'FacebookProfile' => null,\t\t\n\t\t),\n\tarray(\n\t\t'Email' => '[email protected]',\n\t\t'Name' => null,\n\t\t'Surname' => null,\n\t\t'Birthdate' => '0001-01-01T00:00:00',\n\t\t'HumourStatusId' => 1,\n\t\t'InterestsIDs' => array (1,4),\n\t\t'PhoneNumber' => null,\n\t\t'LinkedInProfile' => null,\n\t\t'FacebookProfile' => null,\t\t\n\t\t),\n\tarray(\n\t\t'Email' => '[email protected]',\n\t\t'Name' => null,\n\t\t'Surname' => null,\n\t\t'Birthdate' => '0001-01-01T00:00:00',\n\t\t'HumourStatusId' => 1,\n\t\t'InterestsIDs' => array (2,3),\n\t\t'PhoneNumber' => null,\n\t\t'LinkedInProfile' => null,\n\t\t'FacebookProfile' => null,\t\t\n\t\t)\n ),\n 'Relationships' => array(\n\t array('UserAEmail' => '[email protected]',\n\t\t'UserBEmail' => '[email protected]',\n\t\t'RelationshipTagId' => 1,\n\t\t'Strength' => 2\n\t\t),\n\t array('UserAEmail' => '[email protected]',\n\t\t'UserBEmail' => '[email protected]',\n\t\t'RelationshipTagId' => 2,\n\t\t'Strength' => 5\n\t\t),\n\t array('UserAEmail' => '[email protected]',\n\t\t'UserBEmail' => '[email protected]',\n\t\t'RelationshipTagId' => 1,\n\t\t'Strength' => 5\n\t\t),\n array('UserAEmail' => '[email protected]',\n\t\t'UserBEmail' => '[email protected]',\n\t\t'RelationshipTagId' => 1,\n\t\t'Strength' => 5\n\t\t),\n ),\n 'Interests' => array(),\n 'RelationshipTags' => array(),\n 'HumourStatus' => array()\n );\n\n $cookieJar = new HTTP_Request2_CookieJar();\n \n $request = new HTTP_Request2('http://localhost:5000/loadusergraph');\n $request->setMethod(HTTP_Request2::METHOD_POST)\n ->setHeader('Content-Type: application/json')\n ->setBody(json_encode($userGraph, JSON_PRETTY_PRINT));\n $request->setCookieJar($cookieJar);\n\n //echo \"Sent object:\" . json_encode($userGraph, JSON_PRETTY_PRINT) . \"\\n\\n\";\n // Send the request\n $response = $request->send(); \n\n //echo $response->getBody();\n\n \n //--------------7\n /*$interests = array(2,3);\n $expected_users = array('[email protected]','[email protected]');\n \n echo \"Requesting users with these interests in common:\\n\";\n print_r($interests);\n \n $request2 = new HTTP_Request2('http://localhost:5000/getfriendswithcommoninterests');\n $request2->setMethod(HTTP_Request2::METHOD_POST)\n ->setHeader('Content-Type: application/json')\n ->setBody(json_encode($interests, JSON_PRETTY_PRINT));\n $request2->setCookieJar($cookieJar);\n $response2 = $request2->send();\n $rcvUserList = json_decode($response2->getBody());*/\n //-------------------------\n \n echo \"Requesting new friends:\\n\";\n $request2 = new HTTP_Request2('http://localhost:5000/[email protected]');\n $request2->setMethod(HTTP_Request2::METHOD_GET);\n $request2->setCookieJar($cookieJar);\n $response2 = $request2->send();\n $rcvStats = json_decode($response2->getBody());\n //print_r($rcvStats);\n \n echo \"#######################################################\\n\";\n echo \"Check if received users matches the ones we expect:\";\n \n $expected_friend = '[email protected]';\n \n if($expected_friend == $rcvStats[0]) {\n echo \"YES!\\n\";\n } else {\n echo \"NO <------------\\n\";\n }\n echo \"\\n\\n\\n\";\n}", "title": "" }, { "docid": "b00c526291660898d0d2b4070be4bdc8", "score": "0.47285414", "text": "private function getMyFriendsDis(){\r\n \t$this->_obj_usrinfo=unserialize($_SESSION['userData']);\r\n \t$result=$this->_objFrndModel->getFrndsDis($this->_obj_usrinfo);\r\n \treturn ($result);\r\n }", "title": "" }, { "docid": "87ad29fbc6b62538c5a845a281a0e81b", "score": "0.47162834", "text": "function onlineGivingFunds() {\n\t\t\n\t}", "title": "" }, { "docid": "e38648b6a08ae46d2513b65505648580", "score": "0.47153193", "text": "public function friend ()\n {\n $id_friend = $_REQUEST['id_friend'];\n filter_var($id_friend,FILTER_SANITIZE_NUMBER_INT);\n\n $this->model->setFriend($this->id_user, $id_friend);\n\n $this->profil();\n }", "title": "" }, { "docid": "d2642bb0f025cd9f1443c64c499e44f7", "score": "0.47117075", "text": "function getNumberOnlineMembers()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "e455b41fc13c9f51b856be5e715fcbcc", "score": "0.47084555", "text": "private function hamburgbmember()\n {\n\n $data = $this->getRequest('https://www.abgeordnetenwatch.de/api/parliament/hamburg/deputies.json');\n\n $allData = json_decode($data, true);\n\n $i = 0;\n foreach($allData['profiles'] as $item)\n {\n\n $personal = $item['personal'];\n\n // find or create an entity\n $entity = Entity::firstOrCreate(['name' => $personal['first_name'] . ' ' . $personal['last_name']]);\n\n // add person if needed\n if($entity->entitable_type == null)\n {\n $current = Person::create($personal);\n\n $entity->entitiable_type = 'App\\Person';\n $entity->entitiable_id = $current->id;\n\n $entity->save();\n }\n else\n {\n $current = Person::find($entity->entitable_id);\n }\n\n\n // Add district association\n if($current->district_id == null)\n {\n $current_district = District::firstOrCreate(['name' => $item['parliament']['name'], 'state' => true]);\n $current->district_id = $current_district->id;\n $current->save();\n }\n\n $party = Party::firstOrCreate(['name' => $item['party'], 'district_id' => $current->district_id]);\n\n\n // Add party affiliation\n if(PartyAffiliation::where('person_id', $entity->person->id)->exists())\n {\n // get most recent party affiliation\n $current_party = PartyAffiliation::where('person_id', $entity->person_id)\n ->orderBy('start')\n ->first();\n\n if(isset($current_party->party_id) && !$current_party->party_id == $party->id)\n {\n $current_party->end = Carbon::now();\n $current_party->save();\n\n $current_party = PartyAffiliation::create([\n 'start' => Carbon::now(),\n 'party_id' => $party->id,\n 'person_id' => $current->id\n ]);\n }\n\n\n }\n else\n {\n $current_party = PartyAffiliation::create([\n 'start' => Carbon::now(),\n 'party_id' => $party->id,\n 'person_id' => $current->id\n ]);\n }\n\n }\n\n }", "title": "" }, { "docid": "ec4a35d02e060091e3232190c38ff21c", "score": "0.47079024", "text": "function lookup_member_page($member, &$name, &$id, &$ip)\n{\n if (!addon_installed('stats')) {\n return array();\n }\n\n require_code('type_sanitisation');\n require_lang('submitban');\n\n if (is_numeric($member)) {\n // From member ID\n $name = $GLOBALS['FORUM_DRIVER']->get_username(intval($member));\n if (is_null($name)) {\n return array();\n }\n $id = intval($member);\n $ip = $GLOBALS['FORUM_DRIVER']->get_member_ip($id);\n if (is_null($ip)) {\n $ip = '127.0.0.1';\n }\n } elseif ((is_email_address($member)) && (method_exists($GLOBALS['FORUM_DRIVER'], 'get_member_from_email_address'))) {\n // From e-mail address\n $id = $GLOBALS['FORUM_DRIVER']->get_member_from_email_address($member);\n $name = $GLOBALS['FORUM_DRIVER']->get_username($id);\n if (is_null($id)) {\n return array();\n }\n $ip = $GLOBALS['FORUM_DRIVER']->get_member_ip($id);\n if (is_null($ip)) {\n $ip = '127.0.0.1';\n }\n } elseif ((strpos($member, '.') !== false) || (strpos($member, ':') !== false)) {\n // From IP\n $ids = wrap_probe_ip($member);\n $ip = $member;\n if (is_null($ip)) {\n $ip = '127.0.0.1';\n }\n if (count($ids) == 0) {\n return array();\n } else {\n $id = $ids[0]['id'];\n }\n if (count($ids) != 1) {\n $also = new Tempcode();\n foreach ($ids as $t => $_id) {\n if ($t != 0) {\n if (!$also->is_empty()) {\n $also->attach(do_lang('LIST_SEP'));\n }\n $also->attach($GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($_id['id'], false, '', false));\n }\n }\n attach_message(do_lang_tempcode('MEMBERS_ALSO_ON_IP', $also), 'inform');\n }\n $name = $GLOBALS['FORUM_DRIVER']->get_username($id);\n if (is_null($name)) {\n $name = do_lang('UNKNOWN');\n }\n } else {\n // From name\n $id = $GLOBALS['FORUM_DRIVER']->get_member_from_username($member);\n $name = $member;\n if (is_null($id)) {\n return array();\n }\n $ip = $GLOBALS['FORUM_DRIVER']->get_member_ip($id);\n if (is_null($ip)) {\n $ip = '127.0.0.1';\n }\n }\n\n return $GLOBALS['SITE_DB']->query_select('stats', array('ip', 'MAX(date_and_time) AS date_and_time'), array('member_id' => $id), 'GROUP BY ip ORDER BY date_and_time DESC');\n}", "title": "" }, { "docid": "25cd72dcc96b2e9e094ce3dd46f706d4", "score": "0.470091", "text": "function pertePv()\n {\n }", "title": "" }, { "docid": "7454aab81d82ab88fdaf52a52575d3a4", "score": "0.46884495", "text": "public function getFriends()\n\t{\n\t\t$avt_model\t=\tFD::model('Avatars');\n\t\t$default\t=\t$avt_model->getDefaultAvatars(0, $type = SOCIAL_TYPE_PROFILES);\n\n\t\t// Init variable\n\t\t$app\t\t=\tJFactory::getApplication();\n\t\t$user\t\t=\tJFactory::getUser($this->plugin->get('user')->id);\n\t\t$userid\t\t=\t$app->input->get('target_user', 0, 'INT');\n\t\t$filter \t= $app->input->get('filter', 'all', 'STRING');\n\t\t$search\t\t=\t$app->input->get('search', '', 'STRING');\n\t\t$limit\t\t=\t$app->input->get('limit', 10, 'INT');\n\t\t$limitstart\t=\t$app->input->get('limitstart', 0, 'INT');\n\t\t$target_user = $userid;\n\n\t\t// $options['limit']=$limit;\n\t\t// $options['limitstart']=$limitstart;\n\n\t\t$mapp\t\t=\tnew EasySocialApiMappingHelper;\n\n\t\t// Response Object\n\t\t$res\t\t\t\t\t=\tnew stdClass;\n\t\t$res->result = array();\n\t\t$res->empty_message = '';\n\n\t\tif ($userid == 0)\n\t\t{\n\t\t\t$userid = $user->id;\n\t\t}\n\n\t\t$frnd_mod = FD::model('Friends');\n\t\t$frnd_mod->setState('limit', $limit);\n\n\t\t// $frnd_mod->setState('limitstart',$limitstart);\n\t\t$ttl_list = array();\n\t\t$options['state']\t= SOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t$flag =\t0;\n\n\t\tswitch ($filter)\n\t\t{\n\t\t\tcase 'pending':\n\n// \t\t\t\t\t\tGet the total pending friends.\n\t\t\t\t\t\t\t$options['state']\t=\tSOCIAL_FRIENDS_STATE_PENDING;\n\t\t\t\t\t\t\t$mssg\t\t\t\t=\tJText::_('PLG_API_EASYSOCIAL_NO_PENDING_REQUESTS');\n\t\t\tbreak;\n\t\t\tcase 'all':\n\n// \t\t\t\t\t\tGetting all friends\n\t\t\t\t\t\tif ($target_user == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// $options['state']\t=\tSOCIAL_FRIENDS_STATE_FRIENDS;\n\t\t\t\t\t\t\t$mssg\t\t\t\t=\tJText::_('PLG_API_EASYSOCIAL_NO_FRIENDS');\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$mssg = JText::_('PLG_API_EASYSOCIAL_NO_FRIENDS_YET');\n\t\t\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'request':\n\n// \t\t\t\t\t\tGetting sent requested friends.\n\t\t\t\t\t\t\t$options[ 'state' ]\t\t=\tSOCIAL_FRIENDS_STATE_PENDING;\n\t\t\t\t\t\t\t$options[ 'isRequest' ]\t=\ttrue;\n\t\t\t\t\t\t\t$mssg\t\t\t\t\t=\tJText::_('PLG_API_EASYSOCIAL_NOT_SENT_REQUEST');\n\t\t\tbreak;\n\t\t\tcase 'suggest':\n\n// \t\t\t\t\t\tGetting suggested friends\n\t\t\t\t\t\t\t$sugg_list\t\t\t\t=\t$frnd_mod->getSuggestedFriends($userid);\n\n\t\t\t\t\t\t\tforeach ($sugg_list as $sfnd)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ttl_list[]\t=\t$sfnd->friend;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$flag = 1;\n\n\t\t\t\t\t\t\tif (empty($ttl_list))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$mssg = JText::_('PLG_API_EASYSOCIAL_NO_SUGGESTIONS');\n\t\t\t\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'invites':\n\n// \t\t\t\t\t\tGetting invited friends\n\t\t\t\t\t\t\t$invites['data']\t=\t$frnd_mod->getInvitedUsers($userid);\n\t\t\t\t\t\t\t$mssg\t\t\t\t=\tJText::_('PLG_API_EASYSOCIAL_NO_INVITATION');\n\n\t\t\t\t\t\t\tif (empty($invites['data']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$res->empty_message\t=\t$mssg;\n\n\t\t\t\t\t\t\t\t// $res->status = false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->plugin->setResponse($res);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t$options[ 'state' ]\t= SOCIAL_FRIENDS_STATE_FRIENDS;\n\n\t\t\t\t\tif ($target_user == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mssg = JText::_('PLG_API_EASYSOCIAL_NO_FRIENDS');\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$mssg = JText::_('PLG_API_EASYSOCIAL_NO_FRIENDS_YET');\n\t\t\t\t\t}\n\t\t}\n\n\t\t// if search word present then search user as per term and given id\n\t\tif (empty($search) && empty($ttl_list) && $flag != 1)\n\t\t{\n\t\t\t$ttl_list\t=\t$frnd_mod->getFriends($userid, $options);\n\t\t}\n\t\telseif (!empty($search) && empty($filter))\n\t\t{\n\t\t\t$ttl_list\t=\t$frnd_mod->search($userid, $search, 'username');\n\t\t}\n\n\t\tif (count($ttl_list) > '0')\n\t\t{\n\t\t\t$res->result = $mapp->mapItem($ttl_list, 'user', $userid);\n\t\t\t$res->result = $mapp->frnd_nodes($res->result, $user);\n\t\t\t$myoptions['state']\t\t=\tSOCIAL_FRIENDS_STATE_PENDING;\n\t\t\t$myoptions['isRequest']\t=\ttrue;\n\t\t\t$req\t\t\t\t\t=\t$frnd_mod->getFriends($user->id, $myoptions);\n\t\t\t$myarr\t\t\t\t\t=\tarray();\n\n\t\t\tif (!empty($req))\n\t\t\t{\n\t\t\t\tforeach ($req as $ky => $row)\n\t\t\t\t{\n\t\t\t\t\t$myarr[]\t=\t$row->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get other data\n\t\t\tforeach ($res->result as $ky => $lval)\n\t\t\t{\n\t\t\t\t// Get mutual friends of given user\n\n\t\t\t\tif ($lval->id != $user->id)\n\t\t\t\t{\n\t\t\t\t\t$lval->mutual\t=\t$frnd_mod->getMutualFriendCount($user->id, $lval->id);\n\t\t\t\t\t$lval->isFriend\t=\t$frnd_mod->isFriends($user->id, $lval->id);\n\t\t\t\t\t$lval->isself\t=\tfalse;\n\n\t\t\t\t\tif (in_array($lval->id, $myarr))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lval->isinitiator\t=\ttrue;\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$lval->isinitiator\t=\tfalse;\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$lval->mutual\t=\t$frnd_mod->getMutualFriendCount($userid, $lval->id);\n\t\t\t\t\t$lval->isFriend\t=\t$frnd_mod->isFriends($userid, $lval->id);\n\t\t\t\t\t$lval->isself\t=\ttrue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->result\t=\t$ttl_list;\n\t\t}\n\n\t\t// If data is empty givin respective message and status.\n\n\t\tif (count($res->result))\n\t\t{\n\t\t// As per front developer requirement manage list\n\n\t\t\t$res->result\t\t=\tarray_slice($res->result, $limitstart, $limit);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->empty_message\t=\t$mssg;\n\t\t}\n\n\t\t$this->plugin->setResponse($res);\n\t}", "title": "" }, { "docid": "11e0900d12cfd96f37f4a31433de325e", "score": "0.46874022", "text": "function COXYMallUsers() {\n\t}", "title": "" }, { "docid": "fe1775c7abfb00329599a4a134c1b0fc", "score": "0.46820992", "text": "function MLCH_syncWithMC($uid)\r\n{\r\n global $_TABLES, $_CONF_MLCH;\r\n\r\n $uid = (int)$uid;\r\n if ($uid < 1) return ''; // nothing to do for anon users\r\n\r\n // Get the user's email address & all the lists they belong go.\r\n $email = MLCH_getEmail($uid);\r\n //USES_mailchimp_class_api();\r\n $api = Mailchimp\\API::getInstance();\r\n $out = $api->listsForEmail($email);\r\n if (is_array($out) && !isset($out['error'])) {\r\n $lists = array();\r\n foreach ($out as $list_info) {\r\n if (isset($list_info['id'])) {\r\n $lists[] = $list_info['id'];\r\n }\r\n }\r\n MLCH_updateCache($uid, $lists, true);\r\n }\r\n return $email;\r\n}", "title": "" }, { "docid": "6c288c2ea3d73051a70085a1c8cd7a56", "score": "0.46814504", "text": "function gi2m_displayMemberProfile()\n {\n include('public/gi2m_profileView.php');\n }", "title": "" }, { "docid": "b7f00964ee28c562730e58f49eeeae5f", "score": "0.467626", "text": "function soapsympa_affiche_milieu($flux){\r\n\r\n\t$exec = $flux['args']['exec'];\r\n\r\n\tif (in_array($exec,array('auteur_infos','auteur','configurer_soapsympa','soapsympa_review','edition_soapsympa'))){\r\n\t\t//on récupere les réglages du plugins (clés du serveur Sympa)\r\n\t\t$conf = unserialize($GLOBALS['meta']['soapsympa']);\r\n\r\n\t\t//instanciation de la classe\r\n\t\t$Sympa = new SympaTrustedApp($conf['serveur_distant'], $conf['identifiant'], $conf['mot_de_passe']);\r\n\t\t//a remplace par les valeur de meta\r\n\t\t// $Sympa->remote_host = $conf['remote_host']; pas utile pour l (instant\r\n\t\t//$Sympa->SYMPA_ROBOT = $conf['robot']; pas utile pour l (instant\r\n\r\n\t\tif ((($exec=='auteur_infos') || ($exec=='auteur')) && (autoriser('gerer_abonnements'))){\r\n\r\n\t\t\t$Id = _request('id_auteur');\r\n\t\t\t$email = sql_getfetsel(\"email\", \"spip_auteurs\", \"id_auteur=$Id\");\r\n\r\n\t\t\tif ($email){\r\n\t\t\t\t$contexte['email'] = $email;\r\n\t\t\t\t$contexte['id_auteur'] = $Id;\r\n\t\t\t\t$flux['data'] .= recuperer_fond('prive/boite/abonnements', $contexte);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//fin if auteur\r\n\r\n\t\t//Page de configuration et d edition du plugin on affiche la liste des listes\r\n\t\tif (($exec=='configurer_soapsympa') || ($exec=='edition_soapsympa')){\r\n\t\t\t$Sympa->USER_EMAIL = $conf['proprietaire'];\r\n\t\t\t$res = $Sympa->complexlists($Sympa->USER_EMAIL);\r\n\t\t\tif (isset($res) && gettype($res)=='array'){\r\n\r\n\t\t\t\t$Listes = array(array());\r\n\t\t\t\t$i = 0;\r\n\t\t\t\tforeach ($res as $list){\r\n\t\t\t\t\tlist ($list->listName, $list->listDomain) = explode(\"@\", $list->listAddress);\r\n\t\t\t\t\t$Listes[$i]['listaddress'] = utf8_decode($list->listAddress);\r\n\t\t\t\t\t$Listes[$i]['listname'] = utf8_decode($list->listName);\r\n\t\t\t\t\t$Listes[$i]['subject'] = utf8_decode($list->subject);\r\n\t\t\t\t\t$i++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$contexte['listoflists'] = $Listes;\r\n\t\t\t\t$flux['data'] .= recuperer_fond('prive/boite/configuration', $contexte, array('ajax' => true));\r\n\t\t\t}\r\n\t\t}\r\n\t\t//fin if exec = configurer_soapsympa\r\n\r\n\r\n\t\t//Page abonnés d'une liste (review)\r\n\t\tif ($exec=='soapsympa_review'){\r\n\t\t\t$List = _request('list');\r\n\t\t\t$Listname = explode(\"@\", $List);\r\n\t\t\t$contexte['listname'] = $Listname[0];\r\n\t\t\t$flux['data'] .= recuperer_fond('prive/boite/abonnes_liste', $contexte, array('ajax' => true));\r\n\t\t}\r\n\t\t//fin if exec = review\r\n\r\n\t}\r\n\t//fin ensuite retour des valeurs dans le flux\r\n\r\n\treturn $flux;\r\n}", "title": "" }, { "docid": "66d266f5347d4b0d094ebfe7a744e356", "score": "0.46748048", "text": "function getFriends($uid){\r\n\tglobal $facebook;\r\n\t$person = $facebook->api(\"/$uid/friends\");\r\n\t$friends =$person['data'];\r\n\t$ids = array();\r\n\tforeach ($friends as $friend){\r\n\t\t$ids[] = $friend['id'];\r\n\t}\r\n\treturn $ids;\r\n}", "title": "" }, { "docid": "de75c33e8b290dfcc1eac79054364d31", "score": "0.46739787", "text": "function elica_simulation_get_page_content_friends($user_guid) {\n\n\t$user = get_user($user_guid);\n\tif (!$user) {\n\t\tforward('elica/all');\n\t}\n\n\t$return = array();\n\n\t$return['filter_context'] = 'friends';\n\t$return['title'] = elgg_echo('elica:title:friends');\n\n\t$crumbs_title = $user->name;\n\telgg_push_breadcrumb($crumbs_title, \"elica/owner/{$user->username}\");\n\telgg_push_breadcrumb(elgg_echo('friends'));\n\n\telgg_register_title_button();\n\n\tif (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) {\n\t\t$return['content'] .= elgg_echo('friends:none:you');\n\t\treturn $return;\n\t} else {\n\t\t$options = array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'elica_simulation',\n\t\t\t'full_view' => FALSE,\n\t\t);\n\n\t\tforeach ($friends as $friend) {\n\t\t\t$options['container_guids'][] = $friend->getGUID();\n\t\t}\n\n\t\t// admin / owners can see any posts\n\t\t// everyone else can only see published posts\n\t\t$show_only_published = true;\n\t\t$current_user = elgg_get_logged_in_user_entity();\n\t\tif ($current_user) {\n\t\t\tif (($user_guid == $current_user->guid) || $current_user->isAdmin()) {\n\t\t\t\t$show_only_published = false;\n\t\t\t}\n\t\t}\n\t\tif ($show_only_published) {\n\t\t\t$options['metadata_name_value_pairs'][] = array(\n\t\t\t\tarray('name' => 'status', 'value' => 'published')\n\t\t\t);\n\t\t}\n\n\t\t$list = elgg_list_entities_from_metadata($options);\n\t\tif (!$list) {\n\t\t\t$return['content'] = elgg_echo('elica:simulation:none');\n\t\t} else {\n\t\t\t$return['content'] = $list;\n\t\t}\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "179ed9938917a1d4a1a8a59a3f622101", "score": "0.4670644", "text": "function Profile_memberslistapi_whosonline($args)\n{\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // Get database setup\n $pntable = pnDBGetTables();\n\n // define the array to hold the resultant items\n $items = array();\n // It's good practice to name the table and column definitions you are\n // getting - $table and $column don't cut it in more complex modules\n $sessioninfocolumn = $pntable['session_info_column'];\n $sessioninfotable = $pntable['session_info'];\n\n // get active time based on security settings\n $activetime = adodb_strftime('%Y-%m-%d %H:%M:%S', time() - (pnConfigGetVar('secinactivemins') * 60));\n\n // Get items\n $sql = \"SELECT DISTINCT $sessioninfocolumn[uid]\n FROM $sessioninfotable\n WHERE $sessioninfocolumn[uid] != 0\n AND $sessioninfocolumn[lastused] > '$activetime'\n GROUP BY $sessioninfocolumn[uid]\";\n\n $result = DBUtil::executeSQL($sql);\n\n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($result === false) {\n return LogUtil::registerError(__('Error! Could not load data.', $dom));\n }\n\n // Obtain the number of items\n list($numitems) = $result->fields;\n\n // Put items into result array.\n for (; !$result->EOF; $result->MoveNext()) {\n list($uid) = $result->fields;\n $items[$uid] = pnUserGetVars($uid);\n }\n\n // All successful database queries produce a result set, and that result\n // set should be closed when it has been finished with\n $result->Close();\n\n // Return the items\n return $items;\n}", "title": "" }, { "docid": "7af4803536b5cb23ff297a5e5e91916a", "score": "0.466897", "text": "public function fetchRoomWishes($member);", "title": "" }, { "docid": "89d26e95455a1690d874cab8b4770b67", "score": "0.4662552", "text": "function get_connected_users($salt,$bbb_url)\n{\n // Instatiate the BBB class:\n $bbb = new BigBlueButton($salt,$bbb_url);\n\n $meetings = $bbb->getMeetingsWithXmlResponseArray();\n\n $sum = 0;\n foreach($meetings as $meeting){\n $mid = $meeting['meetingId'];\n $pass = $meeting['moderatorPw'];\n if($mid != null){\n $info = $bbb->getMeetingInfoWithXmlResponseArray(array('meetingId' => $mid, 'password' => $pass));\n $sum += $info['participantCount'];\n }\n }\n return $sum;\n\n}", "title": "" }, { "docid": "f44d9260e49a5cd38bbf9e9bc7d0aeab", "score": "0.46517396", "text": "function main(){\r\n /* 実際の処理を書きます */\r\n /* $this->uses に追加したモデルが使用できます */\r\n ///usr/bin/php /var/www/html/shirotouch/cake/cake/console/cake.php id_convert -app /var/www/html/shirotouch/cake/app\r\n echo \"start\";\r\n $datas = $this->IdConvert->select_members();\r\n foreach($datas as $data){\r\n $mixi_account_id = 1;\r\n $odata = $this->oauth_get_user_account($data['members']['mixi_account_code']);\r\n $mixi_account_id = $odata['platformUserId'];\r\n echo $data['members']['member_name'].'('.$data['members']['member_code'].')->'.$odata['nickname'].'('.$odata['platformUserId'].')';\r\n echo \"\\r\\n\";\r\n $this->IdConvert->update_member_id($data['members']['member_code'],$mixi_account_id);\r\n }\r\n echo \"end\";\r\n }", "title": "" }, { "docid": "57f6c1adc4bbd5d7c9eecc67d267b0eb", "score": "0.46456903", "text": "public function init(){\n\t\t\tif(count($this->cmfields) < 1){\n\t\t\t\t$this->cmfields = $this->pdh->get('profile_fields', 'fieldlist');\n\t\t\t\tif (is_array($this->cmfields)) {\n\t\t\t\t\tforeach($this->cmfields as $mmdata){\n\t\t\t\t\t\t$this->presets['profile_'.$mmdata] = array('profile_field', array('%member_id%', $mmdata), array($mmdata));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cached data not outdated?\n\t\t\t$this->data \t\t\t\t= $this->pdc->get('pdh_members_table');\n\t\t\t$this->member_connections\t= $this->pdc->get('pdh_member_connections_table');\n\t\t\tif($this->data !== NULL && $this->member_connections !== NULL){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t//connection data\n\t\t\t$conn_sql =\t\t\"SELECT m.member_id, mu.user_id\n\t\t\t\t\t\t\tFROM __members m\n\t\t\t\t\t\t\tLEFT JOIN __member_user mu ON mu.member_id = m.member_id\n\t\t\t\t\t\t\tWHERE (m.requested_del != '1' OR m.requested_del IS NULL)\n\t\t\t\t\t\t\tORDER BY m.member_main_id;\";\n\t\t\t$conn_result = $this->db->query($conn_sql);\n\n\t\t\t$this->member_connections = array(array());\n\t\t\t$this->member_user = array();\n\t\t\twhile ($drow = $this->db->fetch_record($conn_result) ){\n\t\t\t\t$this->member_connections[$drow['user_id']][] = $drow['member_id'];\n\t\t\t\t$this->member_user[$drow['member_id']] = $drow['user_id'];\n\t\t\t}\n\t\t\t$this->db->free_result($conn_result);\n\n\t\t\t// The free to take members..\n\t\t\t$free_sql =\t\t\"SELECT m.member_id, mu.user_id\n\t\t\t\t\t\t\tFROM __members m\n\t\t\t\t\t\t\tLEFT JOIN __member_user mu ON m.member_id = mu.member_id\n\t\t\t\t\t\t\tWHERE mu.user_id IS NULL\n\t\t\t\t\t\t\tAND (m.requested_del != '1' OR m.requested_del IS NULL)\n\t\t\t\t\t\t\tORDER BY m.member_main_id;\";\n\t\t\t$free_result = $this->db->query($free_sql);\n\t\t\twhile ($drow = $this->db->fetch_record($free_result) ){\n\t\t\t\t$this->member_connections[0][] = $drow['member_id'];\n\t\t\t\t$this->member_user[$drow['member_id']] = 0;\n\t\t\t}\n\t\t\t$this->db->free_result($free_result);\n\t\t\t$this->pdc->put('pdh_member_connections_table',\t\t$this->member_connections,\tnull);\n\n\t\t\t// basic member data\n\t\t\t$bmd_sql = \"SELECT\n\t\t\t\t\t\tmember_id,\n\t\t\t\t\t\tmember_name AS name,\n\t\t\t\t\t\tmember_level AS level,\n\t\t\t\t\t\tmember_status AS status,\n\t\t\t\t\t\tmember_class_id AS class_id,\n\t\t\t\t\t\tmember_race_id AS race_id,\n\t\t\t\t\t\tmember_rank_id AS rank_id,\n\t\t\t\t\t\tmember_main_id AS main_id,\n\t\t\t\t\t\tmember_creation_date AS creation_date,\n\t\t\t\t\t\tpicture,\n\t\t\t\t\t\tnotes,\n\t\t\t\t\t\tlast_update,\n\t\t\t\t\t\tprofiledata,\n\t\t\t\t\t\trequested_del,\n\t\t\t\t\t\trequire_confirm,\n\t\t\t\t\t\tdefaultrole\n\t\t\t\t\t\tFROM __members;\";\n\t\t\t$bmd_result = $this->db->query($bmd_sql);\n\n\t\t\twhile( $bmd_row = $this->db->fetch_record($bmd_result) ){\n\t\t\t\tif(!isset($this->data[$bmd_row['member_id']]['name'])){\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['name']\t\t\t\t= $bmd_row['name'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['class_id']\t\t\t= $bmd_row['class_id'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['class_name']\t\t= $this->get_classname($bmd_row['member_id']);\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['race_id']\t\t\t= $bmd_row['race_id'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['race_name']\t\t\t= $this->get_racename($bmd_row['member_id']);\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['rank_id']\t\t\t= $bmd_row['rank_id'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['status']\t\t\t= $bmd_row['status'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['level']\t\t\t\t= $bmd_row['level'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['main_id']\t\t\t= ($bmd_row['main_id'] > 0)? $bmd_row['main_id'] : $bmd_row['member_id'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['creation_date']\t\t= $bmd_row['creation_date'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['picture']\t\t\t= $bmd_row['picture'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['notes']\t\t\t\t= $bmd_row['notes'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['last_update']\t\t= $bmd_row['last_update'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['requested_del']\t\t= $bmd_row['requested_del'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['require_confirm']\t= $bmd_row['require_confirm'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['defaultrole']\t\t= $bmd_row['defaultrole'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['profiledata']\t\t= $bmd_row['profiledata'];\n\t\t\t\t\t$this->data[$bmd_row['member_id']]['user']\t\t\t\t= isset($this->member_user[$bmd_row['member_id']]) ? $this->member_user[$bmd_row['member_id']] : 0;\n\t\t\t\t\tif(is_array($this->cmfields)){\n\t\t\t\t\t\t$my_data = $this->xmltools->Database2Array($bmd_row['profiledata']);\n\t\t\t\t\t\tforeach($this->cmfields as $mmdata){\n\t\t\t\t\t\t\t$this->data[$bmd_row['member_id']][$mmdata] = (isset($my_data[$mmdata]) && !is_array($my_data[$mmdata])) ? $my_data[$mmdata] : '';\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$this->db->free_result($bmd_result);\n\t\t\t$this->pdc->put('pdh_members_table', $this->data, null);\n\t\t}", "title": "" }, { "docid": "f4fde55899433769799376a18f9f55f9", "score": "0.464423", "text": "function send_info()\n {\n $type = 0;\n $value = count($this->players) . \",\" . count($this->ready) . \",\" . count($this->gaming);\n foreach($this->players as $player)\n {\n $player->send_message($type,$value);\n }\n }", "title": "" }, { "docid": "d65497031aba557c6d9b50116ad909a6", "score": "0.46354255", "text": "public function seedFriendshipsLookup()\n\t{\n\t\t// User ID and screen name\n\t\treturn array(\n\t\t\tarray(null, '234654235457'),\n\t\t\tarray(null, '234654235457,245864573437'),\n\t\t\tarray('testUser', null),\n\t\t\tarray('testUser', '234654235457'),\n\t\t\tarray(null, null)\n\t\t\t);\n\t}", "title": "" }, { "docid": "f5ff7831d6712700ac75348125633495", "score": "0.46308059", "text": "function isFriend() {\n\t\treturn ($this->_isFriend != 0);\n\t}", "title": "" }, { "docid": "894d8a43bfd65e3fa130a68b42fdc501", "score": "0.46304527", "text": "public function checkWarmup();", "title": "" }, { "docid": "5bc6789f34b5a074141f8b20209b4c14", "score": "0.46246377", "text": "function get_allowed_users($trail, &$userlist){\n global $myDB;\n// die(\"drin\");\n if (!is_array($userlist))\n error('Invalid call', 'userlist is not an array', __LINE__, __FILE__);\n $str = \"\";\n for($x=0; $x < count($userlist); $x++)\n $str .= \"'\".$userlist[$x]['username'].\"',\";\n $str = substr($str, 0, strlen($str)-1); //remove the last ,\n \n $query = FormatSQL(SQL_SHARE_PERM_OWNER_SUBS, array($str, $trail, $str, $trail, $str, $trail));\n// die(\"<pre>$query</pre>\");\n $myDB->query($query);\n //don't call this strange code. it is not. it is actually guite cool\n while ($myDB->next_record()){\n $donot[$myDB->f(\"subscribed\")] = 1;\n $donot[$myDB->f(\"owner\")] = 1;\n }\n $query = FormatSQL(SQL_SHARE_SUGGESTED_MSGS, array($str));\n $myDB->query($query);\n while ($myDB->next_record()){\n $data = unserialize($myDB->f(\"Data\"));\n if ($data['Trail'] == $trail)\n $donot[$myDB->f(\"username\")] = 1;\n }\n foreach($userlist as $key => $value){\n if($donot[$value['username']] == 1){\n array_splice($userlist, $key, 1);\n }\n }\n reset($userlist); \n }", "title": "" }, { "docid": "cc90a296002607073856bf6e40490126", "score": "0.46184927", "text": "public function social();", "title": "" }, { "docid": "153c70172d218648b6d1870f27f89500", "score": "0.46153665", "text": "function sendRemoteConferrenceUsers(){\n\t\tif (isset($_REQUEST['connect_to_conf']) && isset($_REQUEST['connect_to_num']) && $_REQUEST['connect_to_num']!=\"\"){\n\t\t\tconnectUser($_REQUEST['connect_to_conf'], $_REQUEST['connect_to_num']);\n\t\t\tsleep(4);\n\t\t\tmakeUserXML($_REQUEST['connect_to_conf']);\n\t\t}\n\t\telse if (isset($_REQUEST['conf_num']) && isset($_REQUEST['display_users']) && !isset($_REQUEST['operation'])){\n\t\t\tmakeUserXML($_REQUEST['conf_num']);\n\t\t}\n\t\telse if(isset($_REQUEST['operation']) ){\n\t\t\tperformOperation($_REQUEST['conf_num'],$_REQUEST['operation'], $_REQUEST['user_id']);\n\t\t\tsleep(2);\n\t\t\tmakeUserXML($_REQUEST['conf_num']);\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "6bc9b378c5f60199e3b3063f58e7b200", "score": "0.46142626", "text": "public function getMembersList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "82a5c4c8c8cf50680f893636faa561af", "score": "0.4613471", "text": "public function hasFriendid(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "dbc960615f5954a794148584b0fce722", "score": "0.46109107", "text": "public function actionAvatar()\n {\n $players=Player::find()->active()->all();\n foreach($players as $player)\n {\n $robohash=new \\app\\models\\Robohash($player->profile->id,'set1');\n $image=$robohash->generate_image();\n if(get_resource_type($image)=== 'gd')\n {\n $dst_img=\\Yii::getAlias('@app/web/images/avatars/'.$player->profile->id.'.png');\n imagepng($image,$dst_img);\n imagedestroy($image);\n $player->profile->avatar=$player->profile->id.'.png';\n $player->profile->save(false);\n }\n }\n }", "title": "" }, { "docid": "dbc960615f5954a794148584b0fce722", "score": "0.46109107", "text": "public function actionAvatar()\n {\n $players=Player::find()->active()->all();\n foreach($players as $player)\n {\n $robohash=new \\app\\models\\Robohash($player->profile->id,'set1');\n $image=$robohash->generate_image();\n if(get_resource_type($image)=== 'gd')\n {\n $dst_img=\\Yii::getAlias('@app/web/images/avatars/'.$player->profile->id.'.png');\n imagepng($image,$dst_img);\n imagedestroy($image);\n $player->profile->avatar=$player->profile->id.'.png';\n $player->profile->save(false);\n }\n }\n }", "title": "" }, { "docid": "53faedc0233672966629aa8a1ad979db", "score": "0.46067536", "text": "function joinSomeGames( $db, $gpu, $msglist=array() ){\n $sql = \"SELECT * FROM invitation LIMIT $gpu\";\n $invitationlist = $db->fetchAll( $sql );\n $addedcount = 0;\n foreach($invitationlist as $row){\n //var_dump( \"adding \" . $row[ 'to_id' ] . \" to game \" . $row[ 'game_id' ] );\n $error = $db->addUserIdToGame( $row[ 'game_id' ], $row[ 'to_id' ] );\n if( !$error ){\n $addedcount++;\n }\n }\n $s = ( 1 == $addedcount ) ? '' : 's' ;\n $msglist[] = \"added $addedcount users to games\";\n return $msglist;\n}", "title": "" }, { "docid": "7c303e8d92dc9162776fe00af1225d6c", "score": "0.46043667", "text": "function remoteUsers($user,$path,$selected_server,$local_server){\n\t\t$path_local = $local_server['freepbx_url'].\"admin/config.php?type=tool&display=conference_bridge\";\n\t\t?>\t\t\t\n\t\t\t<tr align=\"center\">\n \t\t\t\t<td align=\"center\"><?php echo $user['EXT']; //Phone/Ext ?></td> \n \t\t\t\t<td align=\"center\"><?php echo $user['CLID']; //Caller Id ?></td>\n \t\t\t\t<td align=\"center\"><?php echo $user['MODE']; //Mode - Muted/UnMuted ?></td> \n \t\t\t\t<?php\n \t\t\t\tif($user['MODE']==\"Muted\"){ //Muted - So display UnMute link\n \t\t\t\t\t?>\n \t\t\t\t\t<td align=\"center\"><a href=\"<?php echo $path.\"&server_list=\". $selected_server[\"server_ip\"] .\"&display_users=true&conf_num=\".$user['CNUM'] .\"&operation=unmute&user_id=\".$user['CLID']; ?>\" >UnMute</a></td>\n \t\t\t\t\t<?php\t\n \t\t\t\t}else if($user['MODE']==\"UnMuted\"){ //UnMuted - So display Mute link\n\t \t\t\t?>\n\t \t\t\t\t<td align=\"center\"><a href=\"<?php echo $path.\"&server_list=\". $selected_server[\"server_ip\"] .\"&display_users=true&conf_num=\".$user['CNUM'] .\"&operation=mute&user_id=\".$user['CLID']; ?>\" >Mute</a></td>\n\t \t\t\t\t<?php\n\t \t\t\t}\n\t \t\t\t?>\n \t\t\t\t<td align=\"center\"><a href=\"<?php echo $path.\"&server_list=\".$selected_server[\"server_ip\"] .\"&display_users=true&conf_num=\".$user['CNUM'] .\"&operation=kick&user_id=\".$user['CLID']; ?>\" >Disconnect</a></td>\n \t\t\t</tr>\n\t\t<?php \t\n\t}", "title": "" }, { "docid": "7d8a13650a76abfd46a72d6da749612d", "score": "0.4603973", "text": "function getEventMembers($eventId)\n{\n // We also get a dictionary of username => fullname, this will be useful to us when\n // we have to get the fullname using the username\n $nameQuery = sendQuery(\"SELECT * from person\");\n $nameArray = array();\n if (! $nameQuery ) {\n return $nameArray;\n }\n \n while($row = $nameQuery->fetch_assoc()) {\n // add it to our array\n $nameArray[$row[\"username\"]] = $row[\"fullname\"];\n }\n\n // print all users\n // foreach ($nameArray as $name) {\n // echo \"username: \" . $nameArray['vbhor'] . \"<br>\";\n // }\n \n $memberQuery = sendQuery(\"SELECT * FROM planit.participate where eventid = '$eventId'\");\n $memberArray = array();\n \n if (! $memberQuery ) {\n return $memberArray;\n }\n // output data of each row\n while($row = $memberQuery->fetch_assoc()) {\n // create object (username,fullname)\n $memberProfile = new stdClass();\n $memberProfile->username = $row[\"username\"];\n $memberProfile->memberName = $nameArray[$memberProfile->username];\n $memberProfile->role = $row[\"role\"];\n // add it to our array\n array_push($memberArray,$memberProfile);\n }\n \n // print all our friends\n // foreach ($memberArray as $member) {\n // echo \"friend: \" . $member->username. \" - friendname: \" . $member->memberName. \"<br>\";\n // }\n return $memberArray;\n}", "title": "" } ]
69c0ee1de6366e1a816f91bf889b81c0
Set entry in session
[ { "docid": "5be46e270c44eb033e949ad865ed0549", "score": "0.0", "text": "public function set($key, $value)\n {\n $keys = explode('.', $key);\n\n $array =& $_SESSION;\n\n while (count($keys) > 1)\n {\n $key = array_shift($keys);\n\n if ( ! isset($array[$key]) or ! is_array($array[$key]))\n {\n $array[$key] = array();\n }\n\n $array =& $array[$key];\n }\n\n $array[array_shift($keys)] = $value;\n }", "title": "" } ]
[ { "docid": "97f8821a6d15bd66fd97c9dc16d7a89f", "score": "0.7235452", "text": "function core_session_Set($key, $value)\n{\n $_SESSION[$key] = $value;\n}", "title": "" }, { "docid": "63886f9ac728990f16ded775c3b1e67c", "score": "0.71530217", "text": "function setSessionValue($name, $value);", "title": "" }, { "docid": "cc37a8750ccc369217a1c5a716a4c1f6", "score": "0.71015227", "text": "function jpid_session_set( $key, $value ) {\n return JPID()->session->set( $key, $value );\n}", "title": "" }, { "docid": "56752860faec82e814b397f7c906a6ba", "score": "0.7044013", "text": "public function setSessionValue($key, $value);", "title": "" }, { "docid": "9ab0b1ee1c93ece82773a38e0d1ede71", "score": "0.69969845", "text": "public function set($key, $value): SessionInterface;", "title": "" }, { "docid": "ab2dcbd1942ac273d315ea1ef6861b0b", "score": "0.69891816", "text": "public function __set($key, $value) \r\n {\r\n $_SESSION[$key] = $value;\r\n }", "title": "" }, { "docid": "bf6c8eac451e37a54270035ca00f7479", "score": "0.6979716", "text": "public function set($key = \"\",$value = \"\"){\n\t\t$_SESSION[$key] = $value;\n\t}", "title": "" }, { "docid": "a3ba3d84485258e04aa873a001a36871", "score": "0.69732964", "text": "public function set($session, $data=null) \r\n { \r\n $_SESSION[$session] = $data;\r\n }", "title": "" }, { "docid": "04566c6c2a86622cd083398cbd6caaa9", "score": "0.6955989", "text": "public function save() \r\n\t{\r\n\t\t$_SESSION[$this->key] = $this->id();\r\n\t}", "title": "" }, { "docid": "30137094e6c8dd7bcd3fc9d350191d48", "score": "0.6924587", "text": "public function saveToSession()\n {\n Session::setParameter($this->getSessionId(), $this);\n }", "title": "" }, { "docid": "d95fb244ef90578458f8a2b1c6456c23", "score": "0.69177204", "text": "static public function set($index, $value){\n\t\tSession::initSessionData();\n\t \t$_SESSION['session_data'][(string) $index] = $value;\n\t}", "title": "" }, { "docid": "bdb97061875252fe61c30f98a7776e78", "score": "0.6889871", "text": "function set($id, $value)\n {\n $_SESSION[$this->prefix][$id] = $value;\n }", "title": "" }, { "docid": "e933e5d3280b67e18e0a5add61502daa", "score": "0.6871605", "text": "static function set($name, $value)\n\t\t{\n\t\t\t$_SESSION[$name]=$value;\n\t\t}", "title": "" }, { "docid": "719b59c728d464c0f6a5d4a07af9681f", "score": "0.6870373", "text": "final function _setSession($p,$v) {\n setSessionVar('mod'.$this->_moid.$p,$v);\n }", "title": "" }, { "docid": "9d959a3e725ac6e8795683480c5500c0", "score": "0.68665546", "text": "function swrite($key, $value){\n Yii::app()->session[$key]=$value;\n }", "title": "" }, { "docid": "600817a3cbf8c9f2844d19ba902da48b", "score": "0.68646127", "text": "function set_session($key, $value) {\n // Set key element = value\n $_SESSION[$key] = $value;\n return true;\n}", "title": "" }, { "docid": "36526d717fbcc8e91f189c7d177fdcab", "score": "0.6854949", "text": "public static function setObject($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "f6b10e95d5610d3f04cff84462efb2ba", "score": "0.6851348", "text": "public function __set( $name , $value )\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "f6b10e95d5610d3f04cff84462efb2ba", "score": "0.6851348", "text": "public function __set( $name , $value )\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "c7208fe7512993182910f31dad0925fa", "score": "0.6823628", "text": "private function set_session_data($key, $value)\n\t{\n\t\t$this->session->set_userdata($key . '_' . $this->setting->get('sess_id'), $value);\n\t}", "title": "" }, { "docid": "392ba258a4ddc235a8787c8ff6939198", "score": "0.6822055", "text": "function set($key, $val)\n\t{\n\t\t$_SESSION[\"$key\"] = $val;\n\t}", "title": "" }, { "docid": "d1864d3e115db5117bb39b916812118d", "score": "0.6821612", "text": "function set($key, $val) {\n\t\t$_SESSION[$key] = $val;\n\t}", "title": "" }, { "docid": "4d2ca887d025629139039da9f64eded5", "score": "0.68191564", "text": "public function update() {\n\t\t$_SESSION = $this->data;\n\t}", "title": "" }, { "docid": "deef0ca4a5e286eeaa828d67309a9976", "score": "0.6816304", "text": "function set(string $key, $value): void\n\t{\n\t\t$_SESSION[$key] = $value;\n\t}", "title": "" }, { "docid": "dfc5eee3dba8a58de795145911e22e77", "score": "0.68065536", "text": "public function set($key, $value){\n\n\t\t$_SESSION[$key] = $value;\n\n\t}", "title": "" }, { "docid": "9371055ee03a0cb7b63cfec8a7487624", "score": "0.680163", "text": "function set_session($key, $value)\n{\n\t$_SESSION[$key ] = $value;\n}", "title": "" }, { "docid": "9f0057ed6a7e7bd837e673ef4ce65e6a", "score": "0.6797237", "text": "public function set($key, $value)\n {\n $_SESSION[$key]=$value;\n }", "title": "" }, { "docid": "944bb07d7d94093766efbf9805f04493", "score": "0.6792326", "text": "public function setSessionData($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "4ec3ac057321d0758cb2859bfaa8cebc", "score": "0.6772439", "text": "public function set($key, $value) {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "a704b961dc61c7b72b9c960bdec21b34", "score": "0.67694235", "text": "public function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "a704b961dc61c7b72b9c960bdec21b34", "score": "0.67694235", "text": "public function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "6da2dbb5f273297029180844ceb8bab3", "score": "0.6740322", "text": "function set($key, $value){\n\t\t\tif($this->_isset( $key )){\n\t\t\t\t$this->remove( $key );\n\t\t\t}\n\t\t\t$_SESSION[$key] = serialize($value);\n\t\t}", "title": "" }, { "docid": "50faa22a588acccd97d6937e0aef254c", "score": "0.67264974", "text": "public function session_put($key, $value) {\n $this->launch->session_put($key, $value);\n }", "title": "" }, { "docid": "94fd11c78e03c3aff8b35488a9f8c210", "score": "0.6678413", "text": "public function set($name, $value)\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "47a3b227f6d8714cdbb1f64ef659f57f", "score": "0.6648247", "text": "static function setValue($var, $val){\r\n $_SESSION[$var]=$val;\r\n }", "title": "" }, { "docid": "d41f7b6a6457bdf81822650c47ce71fb", "score": "0.66419077", "text": "public function set(string $key, $value): void\n {\n // To use $_SESSION variable we need to start session first\n if (true === $this->exists()) {\n $uniqueKey = $this->getUniqueKey($key);\n\n $_SESSION[$uniqueKey] = $value;\n }\n }", "title": "" }, { "docid": "b8ea91ab68586119c8cee18f3b273577", "score": "0.66374886", "text": "public function set(string $key, $value)\r\n {\r\n $this->ensureStarted();\r\n $this->collections->set($key, $value);\r\n $_SESSION[$key] = $value;\r\n }", "title": "" }, { "docid": "fc4a8a4e167562ab665cd3afde202f96", "score": "0.66350967", "text": "public function __set($name, $value) {\n $_SESSION[$this->auth_name][$name] = value;\n }", "title": "" }, { "docid": "7ff6238fa39978d19c62ead27cf2116f", "score": "0.6623862", "text": "function setValue($name,$value,$expiration=null){\n\t\t$this->_SessionStorer->writeValue($name,$value, $expiration);\n\t}", "title": "" }, { "docid": "757e708f5dcbd31522c689b9cdf16365", "score": "0.6621796", "text": "public function set(string $key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "b0129c6f85cbaaca51157e28de6676f5", "score": "0.66101027", "text": "private function storeUserInSession()\n {\n $this->Session->write('user.id', $this->uid);\n }", "title": "" }, { "docid": "db7eeede32fdc4b810126dbf9eed1063", "score": "0.66084707", "text": "public function set($name, $value)\n\t{\n\t\t$_SESSION[$name] = $value;\n\t}", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.65973806", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.65973806", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.65973806", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.65973806", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "d0fb7448031e204cce37c4cabbada3cf", "score": "0.6593292", "text": "public function set($key, $val){\n\t\t$_SESSION[$key] = $val;\n\t}", "title": "" }, { "docid": "cc0c999d23eef572f806f6124d46ee4b", "score": "0.65872943", "text": "public function set($attribute, $value)\n {\n $_SESSION[$attribute] = $value;\n }", "title": "" }, { "docid": "bb583d21d235d1ff38d1442a7109e02e", "score": "0.6584606", "text": "function session_set($name, $value)\n{\n\tglobal $_session_prefix;\n\t_session_start();\n\t$_SESSION[$_session_prefix . $name] = $value;\n}", "title": "" }, { "docid": "2f52d70d3b427a0c12353e09a8dfd19d", "score": "0.6579625", "text": "public static function put($name, $value){\r\n return $_SESSION[$name] = $value;\r\n }", "title": "" }, { "docid": "0ae24f0ff7759094d1668bf44cec2e68", "score": "0.6578048", "text": "public function setSession( _TaskSession $oSession ) {\n\n foreach ($oSession as $sAtributo => $sValor) {\n db_putsession($sAtributo, $sValor);\n }\n }", "title": "" }, { "docid": "811ce2109966772d2c9af03c580bc293", "score": "0.6572354", "text": "public function offsetSet($index, $value) { $_SESSION[$index] = $value; return $this; }", "title": "" }, { "docid": "0e18770c261552dd018308af03cbc7ff", "score": "0.6571431", "text": "private function _set_session() {\n $this->actual = $this->untrusted;\n $this->__data__ = $this->remote_storage->__array__();\n }", "title": "" }, { "docid": "052122ac8450db449371b3225a517291", "score": "0.65697306", "text": "public static function set($key, $value) {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "25376ef1b559f7304815d2477a8710b3", "score": "0.65599555", "text": "public static function set($key, $value) {\n\t\t$_SESSION[$key] = $value;\n\t}", "title": "" }, { "docid": "6a85ab5d7c69cdc13c574cbafb6d67b4", "score": "0.655764", "text": "private function setValueSession(string $key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "f78bbd7184c6c4512207ebd994055f7b", "score": "0.65571266", "text": "public function setSession($key, $data)\n {\n $session = $this->_session;\n $session->$key = $data;\n }", "title": "" }, { "docid": "b85355222d59ece9b2209d55e4ec5060", "score": "0.6552871", "text": "protected function __set($name, $value)\n {\n if(is_array($_SESSION[$this->session_name]))\n {\n $_SESSION[$this->session_name][$name] = $value;\n }\n }", "title": "" }, { "docid": "ddc01f24b9efe0dce29b3107a9960036", "score": "0.6552032", "text": "protected function setSessionVar(array $row = null)\n {\n $this->session->user = $row;\n }", "title": "" }, { "docid": "9e5f8ead76dee36e0aa2f142d8e30b74", "score": "0.6546204", "text": "public static function set(string $data, string $value) {\n $_SESSION[$data] = $value;\n }", "title": "" }, { "docid": "397c1a9449b5a71cb1085006559487bd", "score": "0.65422255", "text": "public static function put($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "6d5a043ef2ef705ff711564107ff522b", "score": "0.6538808", "text": "public function write($key, $value){\r\n\t\t$_SESSION[$key] = $value;\r\n\t}", "title": "" }, { "docid": "0244f4edf428cbec0d002b3aa46c73a5", "score": "0.65313727", "text": "public function setValue( $key, $value )\n {\n $_SESSION[ $key ] = $value;\n }", "title": "" }, { "docid": "ed1a05a5376fa4a3650f10e932215ffc", "score": "0.65299726", "text": "public static function set($key, $value) {\n\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "90bc09fa4d9aa48e3170c36747c47924", "score": "0.65287113", "text": "protected function setSession()\n {\n\n }", "title": "" }, { "docid": "86a3708f673d2882c2e92656c22cb453", "score": "0.65252614", "text": "public function sess_data_set($name, $value)\n {\n $info = $this->sess_data_get();\n $info[$name] = $value;\n $data = array();\n $data['data'] = $info;\n $this->sess_set($data);\n }", "title": "" }, { "docid": "c1077e989f5acb58f8ce221e42a1817d", "score": "0.6507133", "text": "function setUser($value){\n $_SESSION[\"User\"] = $value; // Setzt den aktuell eingeloggten User\n }", "title": "" }, { "docid": "bfb5b488e3b284871f1c4b1dbe936929", "score": "0.64869165", "text": "public function save() {\n if(php_sapi_name() != \"cli\" || $_SESSION[self::SESSION_NAMESPACE])\n {\n $key = self::SESSION_KEY_CUSTOM_ITEMS;\n $this->session->$key = $this->customItems;\n\n $key = self::SESSION_KEY_USERID;\n $this->session->$key = $this->userId;\n\n $key = self::SESSION_KEY_ASSORTMENT_TENANT;\n $this->session->$key = $this->currentAssortmentTenant;\n\n $key = self::SESSION_KEY_ASSORTMENT_SUB_TENANT;\n $this->session->$key = $this->currentAssortmentSubTenant;\n\n $key = self::SESSION_KEY_CHECKOUT_TENANT;\n $this->session->$key = $this->currentCheckoutTenant;\n\n $key = self::SESSION_KEY_USE_GUEST_CART;\n $this->session->$key = $this->useGuestCart;\n }\n }", "title": "" }, { "docid": "92060509dd153f5a06e929db98ab96e3", "score": "0.64830536", "text": "public function setUserData($row){\n $_SESSION['isLoggedIn'] = true;\n $_SESSION['user_id'] = $row->id;\n $_SESSION['name'] = $row->name;\n $_SESSION['lastname'] = $row->lastname;\n $_SESSION['email'] = $row->email;\n $_SESSION['avatar'] = $row->avatar;\n $_SESSION['coachStatus'] = $row->coachStatus;\n $_SESSION['adminStatus'] = $row->adminStatus;\n }", "title": "" }, { "docid": "98771517d45348011bb26f117f0f1807", "score": "0.64792633", "text": "public static function set(string $key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "aab3345ef68a3d9a5452ac6edc7c8e8a", "score": "0.6478559", "text": "static function set_userdata( $value ) {\n\t\t$_SESSION['user_data'] = $value;\n\t}", "title": "" }, { "docid": "15eb1a1fe77a37f49bcab768faa2bf66", "score": "0.64758825", "text": "public function save() {\r\n $_SESSION[$this->guid] = (array) $this;\r\n\t }", "title": "" }, { "docid": "4504274492e318d67267bd3d51ff1d7e", "score": "0.6463174", "text": "public function setSession($key, $val){\n $session = Yii::$app->session;\n $session->set($key, $val);\n }", "title": "" }, { "docid": "d4c28157e65cda579a7a588aecd9b527", "score": "0.6453874", "text": "private function setSession($key, $value)\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "85db0a8097a3e9d2ee1c8d48308ca32c", "score": "0.6446427", "text": "public function setValue($key, $value) {\n\t\t$_SESSION[$key] = $value;\n\t}", "title": "" }, { "docid": "f75b1bb1d2467350a7b06c3b2b2723ff", "score": "0.64430165", "text": "function setSession($sessionName,$value){\n\n\t\t\t\t@session_start();\n\n\t\t\t\t$_SESSION[$sessionName] = $value;\n\n\t\t}", "title": "" }, { "docid": "bc4b37a4622316be883c4c773b4e0d30", "score": "0.64375293", "text": "public function intoSession()\n {\n foreach ($this->array as $key => $value)\n {\n $_SESSION[$key] = $value;\n }\n }", "title": "" }, { "docid": "38d6ae3dd53eb23f11428361279c1f4b", "score": "0.6429818", "text": "function set_session($user){\n $_SESSION[\"id\"] = $user[\"id\"];\n $_SESSION[\"username\"] = $user[\"username\"];\n }", "title": "" }, { "docid": "2c2e7f1b3491ad03993747702f92cb49", "score": "0.64269406", "text": "public static function set(string $index, $value)\n {\n $_SESSION[$index] = $value;\n }", "title": "" }, { "docid": "13dd06b11bc68e5b79b1288343b6e5a6", "score": "0.64231575", "text": "public function setSession()\n {\n $_SESSION['user'] = [\n\n\n 'id' => $this->id, \n 'email' => $this->email,\n 'roles' => $this->roles\n\n \n \n ];\n\n }", "title": "" }, { "docid": "95717a8574c96e4dfe568b6ed5e44bb9", "score": "0.64227027", "text": "public function setSessionObj($sessionObj){\n\t\t// so if an object were removed from the cart, it would still be in the session.\n\t\tunset($_SESSION['ShippingProductSession']);\n\t\tSession::set('ShippingProductSession', $sessionObj);\n\t\tSession::save();\n\t}", "title": "" }, { "docid": "8848a3c9943ff5c5412df4ac9a969c7a", "score": "0.64105964", "text": "public static function setValue($name, $value) {\r\n $_SESSION[$name] = $value;\r\n }", "title": "" }, { "docid": "feaa44fddea05cbacbbc72c532cdfa4f", "score": "0.6408673", "text": "function savePosition()\n \t{\n \t\t$this->user->setKey(\"ses\",$this->sessionVar, serialize($this->stored));\n \t}", "title": "" }, { "docid": "9fc9053380f0c92ae36d43b777852da3", "score": "0.6396081", "text": "public function setSession ($data)\r\n {\r\n $_SESSION['id'] = $data['id'];\r\n $_SESSION['student_id'] = $data['student_id'];\r\n $_SESSION['first_name'] = $data['first_name'];\r\n $_SESSION['last_name'] = $data['last_name'];\r\n $_SESSION['user_type'] = $data['user_type'];\r\n }", "title": "" }, { "docid": "dff83ff753a5f6581ee880936d64c438", "score": "0.63933754", "text": "public function put($key, $value)\n\t{\n\t\tArr::set($this->session['data'], $key, $value);\n\t}", "title": "" }, { "docid": "ec5b8a85bae9277fd5d7e99005c73694", "score": "0.6386399", "text": "final public function set($name,$value) {\n $_SESSION[$name]=$value;\n if(!isset($_SESSION[$name])) {\n throw new SessionException(\"Failed to set session var: {$name}\");\n }\n $this->logger->info(\"Setting session var:{$name}\");\n }", "title": "" }, { "docid": "d88266c16c3c0ea89c9c26726b5a630a", "score": "0.63830525", "text": "public function saveToSession()\n {\n $this->session = Instance::ensure($this->session, Session::className());\n $this->session[$this->cartId] = $this->getSerialized();\n $this->session[$this->cartId.'_lunch'] = $this->getSerializedLunch();\n }", "title": "" }, { "docid": "d27087663c36f8422da9b43bbfacbc44", "score": "0.63739294", "text": "public static function set($key, $value)\n\t{\n\t\t$_SESSION[(string)$key]\t= $value;\n\t}", "title": "" }, { "docid": "de67d684d290985cc1d0a17fb4ceef4f", "score": "0.63690656", "text": "public static function put($name,$value)\n {\n return $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "43131cd7fc8c795192d8da01b0a57bef", "score": "0.63543993", "text": "public static function set($key, $val) { // dans un tableau.\n\n\t\t$_SESSION[$key] = $val;\n\t}", "title": "" }, { "docid": "0de80cd13583cee3be93f491f968d1c4", "score": "0.6343429", "text": "private function uhpdgames_set_session($key, $value = null){\n if (isset($value)) {\n if(isset($_SESSION[$key])) unset($_SESSION[$key]);\n $_SESSION[$key] = $value;\n }\n if (isset($_SESSION[$key])) return $_SESSION[$key];\n }", "title": "" }, { "docid": "52580c30dbd2f0fb9747186c9f4a71dc", "score": "0.63374215", "text": "public function set_session(){\n\n $this->session->set_userdata( array(\n\n 'id'=>$this->details->id,\n\n 'name'=> $this->details->fname . ' ' . $this->details->lname,\n\n 'email'=>$this->details->email,\n\n 'country'=>$this->details->country,\n\n 'phone'=>$this->details->phone,\n\n 'isLoggedIn'=>true));\n\n }", "title": "" }, { "docid": "7c76424fe8ed75d6111d0134cc29c1e5", "score": "0.6329117", "text": "public function set($name = array(), $value = '') {\r\n if (is_string($name)) {\r\n $_SESSION[$name] = $value;\r\n } elseif (is_array($name)) {\r\n foreach ($name as $key => $val) {\r\n $this->set($key, $val);\r\n }\r\n } \r\n }", "title": "" }, { "docid": "8b4dbf2e1371436777e6b5fdfd3250ea", "score": "0.6321859", "text": "public function setToSession($key,$obj) {\n\t\t$arr = $this->restoreFromSession();\n\t\t$arr[$key] = $obj;\n\t\t$this->writeToSession($arr);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8c93d78c8226c28045e71cea1be84260", "score": "0.6321398", "text": "function session_set($vname, $vvalue){\n\t\tif(is_array($_SESSION)){\n\t\t\t$_SESSION[$vname] = &$vvalue;\n\t\t\treturn(true);\n\t\t}\n\t\treturn(false);\n\t}", "title": "" }, { "docid": "662c876262b0c9036385ec3806841cc3", "score": "0.6303701", "text": "public function store($key, $value)\n {\n $sessionData = $this->sessionObject->getSessionData($this->storageKey);\n $sessionData[$key] = $value;\n $this->sessionObject->setAndSaveSessionData($this->storageKey, $sessionData);\n }", "title": "" }, { "docid": "126288c451b34133cdc2767b861ad094", "score": "0.63016707", "text": "public function setSession($session) {\n if ($session instanceof SessionApi) {\n $session = $session->getId();\n }\n\n $this->session_id = $session;\n $this->toSave['session.id'] = $session;\n }", "title": "" }, { "docid": "75f63a2a8692304d98f4cf45a3156ac5", "score": "0.62946934", "text": "public function setContent($name,$value){\n \t\t$this->session->set_userdata($name,$value);\n \t}", "title": "" }, { "docid": "3f9795927b19077f23d90dd5f4a4d70a", "score": "0.6290465", "text": "public static function write($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "9563ced49dbede11aceab01930c9e451", "score": "0.62748134", "text": "public function store(){\n $this->oSession->store();\n }", "title": "" }, { "docid": "e9e97e633a95755b51f94302d0b73e14", "score": "0.62723094", "text": "function setSession( $key , $value )\n\t{\n\t\tif( property_exists ( $this , $key) )\n\t\t{\n\t\t\t$_SESSION[$key] = $this->{$key} = ($value) ;\n\t\t}else{\n\t\t\t$_SESSION[$key] = $this->tmpArr[$key] = ($value) ;\n\t\t}\n\t\t\n\t\treturn $this;\n\t\t//\tthrow new Exception( \"[\".$key.\"] session\".print_r(debug_backtrace(), true)); \n\t}", "title": "" } ]
dc0d275bd28af06a90c87f8ec92295f0
get order ID formated for Redsys with a 4 digits at least
[ { "docid": "5e213fbdd06884909b4a21a0209f8e60", "score": "0.6741705", "text": "private static function getOrderId($id)\n {\n if(strlen($id) < 4) $id = str_pad($id, 4, '0', STR_PAD_LEFT);\n return $id;\n }", "title": "" } ]
[ { "docid": "940f82e32b8d9c2839f95f994a776401", "score": "0.7097671", "text": "public function getOrderID(): string\n {\n return $this->token['orderID'];\n }", "title": "" }, { "docid": "f2f2ec28cf4bfeeedb03aa271c9bff80", "score": "0.67752594", "text": "public function get_order_id() {\n\t\treturn $this->get_field( Pronamic_Pay_Gateways_Ogone_Parameters::ORDERID );\n\t}", "title": "" }, { "docid": "f5e9d462cec84d6a9a96e2f788b5431d", "score": "0.6623419", "text": "public function getOrderNumber()\n {\n $query = $this->newQuery()\n ->selectRaw(\"CAST(RIGHT(delivery_number, 6) AS UNSIGNED) + 1 AS order_number\")\n ->whereMonth('created_at', date('m'))\n ->whereYear('created_at', date('Y'))\n ->orderBy('created_at', 'desc')\n ->take('1');\n\n $orderPad = '000001';\n if ($query->count()) {\n $orderPad = str_pad($query->first()->order_number, 6, '0', STR_PAD_LEFT);\n }\n\n $prefix = empty($this->type) ? 'D' : $this->type == 'INBOUND' ? 'DI' : 'DO';\n\n return $prefix . '-' . date('ym') . $orderPad;\n }", "title": "" }, { "docid": "f8d411d3fa505b92b828d6d77d88d403", "score": "0.6522857", "text": "protected function generateOrdID()\n {\n // $rand = substr('0000' . strval($rand), -4);\n\n // $dt = date('ymd');\n // return $empID . '-' . $dt;\n\n $dt = date('ymd');\n $str = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';\n $str_a = 'ABCDEFGHJKLMNPQRSTUVWXYZ';\n do {\n $rand_code = '';\n $rand_num = rand(0, 23);\n $rand_code .= $str_a[$rand_num];\n $len = 2;\n for ($i = 0; $i < $len; $i++) {\n $rand_num = rand(0, 31);\n $rand_code .= $str[$rand_num];\n }\n $result = $rand_code . '-' . $dt;\n // dd($this->orderModel->find($result));\n } while ($this->orderModel->find($result) != null);\n return $result;\n }", "title": "" }, { "docid": "9ed4abb5fd5ce7228dc5d95ad727daa1", "score": "0.65199775", "text": "function webendev_woocommerce_order_number( $oldnumber, $order ) {\n return 'REC' . $order->id;\n}", "title": "" }, { "docid": "d27eb1003a7786029b51258e5d6b7193", "score": "0.6475435", "text": "function getIDByString() {\n\t\treturn gmp_strval(gmp_init($this->id, 10), 62);\n\t}", "title": "" }, { "docid": "e01e2ff15104ea11a2d56fea3e93977e", "score": "0.6463974", "text": "public function getId() : string\n {\n return $this->get('id', 'orders');\n }", "title": "" }, { "docid": "7b95dbfe871360f686aba55fd85d0c03", "score": "0.64575523", "text": "public function getOrderID()\r\n {\r\n return $this->fields['OrderID']['value'];\r\n }", "title": "" }, { "docid": "595b3b9e3a98e52e85c06973b0377579", "score": "0.6400977", "text": "public static function generateOrderId()\n {\n $uuid = self::getGuid();\n $mostSignificantBits = substr($uuid, 0, 8);\n $leastSignificantBits = substr($uuid, 23, 8);\n\n return substr(\n base64_encode($mostSignificantBits . $leastSignificantBits),\n 0,\n 22\n );\n }", "title": "" }, { "docid": "4a1bfaff36c3a53ad79a185e5ef67bb9", "score": "0.6381317", "text": "public static function getGUIDProperty()\n {\n return 'PurchaseOrderID';\n }", "title": "" }, { "docid": "30d3ce30173b3f24d028b89c1e371944", "score": "0.63466", "text": "public function GenerateOrderNumber()\n\t{\n\t\t//prefix\n\t\t$retour = date('Ymd').'BC';\n\t\t\n\t\t//Trouve le prochain\n\t\tfor ($i=1;$i<30;$i++)\n\t\t{\n\t\t\t//définit le numéro\n\t\t\t$temp = $retour.$i;\n\t\t\t\n\t\t\t//Verifie si existe\n\t\t\t$collection = Mage::getModel('Purchase/Order')\n\t\t\t\t->getCollection()\n\t\t\t\t->addFieldToFilter('po_order_id', $temp);\n\t\t\t\n\t\t\tif (sizeof($collection) == 0)\n\t\t\t\treturn $temp;\n\t\t}\n\t\t\n\t\treturn $retour;\n\t}", "title": "" }, { "docid": "8fee1d7456e0622756f8b31ebf4cf830", "score": "0.63277006", "text": "public function extractOgOrderId($data){\r\n\t\treturn (string)$data->head->orderOgId;\r\n\t}", "title": "" }, { "docid": "ef363f5f40404729d1c98d0c6db46927", "score": "0.6291771", "text": "private function getBankOrderNumber(){\n //Generates the order number to be sent to the bank\n $chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\";\n\t $string_length = 12;\n\t $randomstring = \"\";\n\n for ($i=0; $i<$string_length; $i++) {\n if ($i<4){\n $randomstring .= rand(0,9);\n }else{\n $randomstring .= $chars[rand(0,strlen($chars)-1)];\n }\n } \n\n return $randomstring;\n }", "title": "" }, { "docid": "b72aefa2c4a971f3bf91590d64d233d7", "score": "0.6288108", "text": "public function get_order_id() {\n\t\treturn get_post_meta( $this->get_id(), '_order_id', true );\n\t}", "title": "" }, { "docid": "6e509e2bd25fe83aeadfcbd1a267c9da", "score": "0.6254136", "text": "public function getNumber()\n {\n $ars = str_split($this->id);\n return $this->code.end($ars);\n }", "title": "" }, { "docid": "6d4c25ac09fbe496a71460af02aeb947", "score": "0.62521046", "text": "function generate_order_number($id,$update=FALSE) {\r\n $order_number = date('ymd').str_pad($id%10000,4,'0',STR_PAD_LEFT);\r\n\r\n if ($update) {\r\n $this->update_transaction($id,array('ordernumber'=>$order_number));\r\n }\r\n\r\n return $order_number; \r\n }", "title": "" }, { "docid": "5dd94f37ef9d12371d25db51f86bb329", "score": "0.62223583", "text": "protected function makeId()\n {\n $time = sprintf('%0.6f', (microtime(1) - date('Z')));\n $idWithDot = uniqid(\n $this->getPrefix() . self::ID_SEPARATOR . self::ID_SEPARATOR\n . $time . self::ID_SEPARATOR . self::ID_SEPARATOR\n , true\n );\n $id = str_replace('.', self::ID_SEPARATOR, $idWithDot);\n\n return $id;\n }", "title": "" }, { "docid": "81a538f3647d4139f66dbf7ae9ddea47", "score": "0.6204146", "text": "function generateOrderNumber($orderId)\n {\n $prefix = config('common.pattern.order');\n $diff = strlen($prefix) - strlen($orderId);\n if ($diff > 0) {\n return substr($prefix, 0, strlen($prefix) - strlen($orderId)) . $orderId;\n }\n return $orderId;\n }", "title": "" }, { "docid": "8eb4cf6f5fdf25d3a57eba095bcc2701", "score": "0.6175348", "text": "private function generateEntityId()\n {\n return sprintf('%u', crc32(json_encode($this->routeQueryParts)));\n }", "title": "" }, { "docid": "8b3168a2f1c7a3e507ce20b961406ac1", "score": "0.61662084", "text": "public function getOrderID() {\r\n return $this->_output->reissueCertificateResponse->orderID;\r\n }", "title": "" }, { "docid": "eccda7308cf93c64a6326941b21e2d36", "score": "0.61554843", "text": "function getEncodedId() {\n\t\t\tif (MO_DEBUG) {\n\t\t\t\treturn $this->getId();\n\t\t\t} else {\n\t\t\t\treturn IntegerTableEncoder::encodeInt($this->getId());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "109e60054db2e389ddd7cb506bcd50a0", "score": "0.61451244", "text": "public function getUuidKey()\n {\n return 'order_id';\n }", "title": "" }, { "docid": "188154973a7b5b12bf2b441adafc084a", "score": "0.61450684", "text": "public function getOID() {\n return $this->OID . \"\";\n }", "title": "" }, { "docid": "b6d3528881476c1bb203d27ba694ea1a", "score": "0.6131793", "text": "protected function _getIdStr() {\n if (isset($this->_properties['id_str'])) {\n return $this->_properties['id_str'];\n }\n return (string)($this->job_processing_uid) . '_' . (string)($this->test_type_uid) . '_' . (string)($this->test_counter);\n }", "title": "" }, { "docid": "c4da54039be1585e37d2ba352e9d0aca", "score": "0.61317813", "text": "public function get_id() {\n\t\tif (isset($this->params->params['pass'][0]) && strlen($this->params->params['pass'][0]) == 24 && strpos($this->params->params['pass'][0], '_')===false)\n\t\t\t$iditem = $this->params->params['pass'][0];\n\t\telse if ($this->Session->check($this->name . 'ViewId'))\n\t\t\t$iditem = $this->Session->read($this->name . 'ViewId');\n\t\telse {\n\t\t\t//find last id\n\t\t\t$where_query = array();\n\t\t\t$this->identity($where_query);\n\t\t\tif($this->name == 'Salesorders' && !$this->check_permission('salesorders_@_view_worktraq_@_view')){\n\t \t$where_query['code'] = array('$not' => new MongoRegex('/WT-/'));\n\t }\n\t\t\tif ( isset($this->opm) ) {\n\t\t\t\t$arr_tmp = $this->opm->select_one($where_query, array('_id'), array('_id' => -1));\n\t\t\t} else {\n\t\t\t\t$module = $this->modelName;\n\t\t\t\t$this->selectModel($module);\n\t\t\t\t$arr_tmp = $this->$module->select_one($where_query, array('_id'), array('_id' => -1));\n\t\t\t}\n\t\t\tif (isset($arr_tmp['_id']) && is_object($arr_tmp['_id'])) {\n\t\t\t\t$iditem = (array) $arr_tmp['_id'];\n\t\t\t\t$iditem = $iditem['$id'];\n\t\t\t} else if (isset($arr_tmp['_id']) && strlen($arr_tmp['_id']) == 24) {\n\t\t\t\t$iditem = $arr_tmp['_id'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$iditem = '';\n\t\t}\n\t\treturn $iditem;\n\t}", "title": "" }, { "docid": "707b62629dd2e30a45b77da82b126cb4", "score": "0.61135036", "text": "public function get_last_id() {\n\t\t$where_query = array();\n\t\tif($this->name == 'Salesorders' && !$this->check_permission('salesorders_@_view_worktraq_@_view')){\n \t$where_query['code'] = array('$not' => new MongoRegex('/WT-'));\n }\n $this->identity($where_query);\n\t\t$arr_tmp = $this->opm->select_one($where_query, array('_id'), array('_id' => -1));\n\t\tif (isset($arr_tmp['_id']))\n\t\t\treturn $arr_tmp['_id'];\n\t\telse\n\t\t\treturn '';\n\t\tdie;\n\t}", "title": "" }, { "docid": "afb137e5712b9ab761503fa9ee371e05", "score": "0.6088908", "text": "public static function makeTransID()\n\t{\n\t\t$r = date('YmdHis') . rand(10, 99) . round(microtime(true) * 1000);\n\t\treturn CHG_PARTNERCODE . '_' . $r;\n\t}", "title": "" }, { "docid": "7868e8ab03bd0ac14bf6263f7b99aec7", "score": "0.60708994", "text": "public function get_order_id()\n {\n $data = $this->input->get_post('data');\n $response = json_decode(base64_decode($data));\n\n $ext = $response->cp_order_id;\n $money = $response->money;\n\n log_message('debug', $this->platform . ' get_order_id: ' . $ext . ' money: ' . $money);\n log_message('debug', $this->platform . ' get_order_id: ' . json_encode($response));\n\n $condition = array('u_order_id' => $ext);\n $this->load->model('Game_order_model');\n $game_order = $this->Game_order_model->get_one_by_condition($condition);\n\n if ($money != $game_order->money) {\n return false;\n }\n\n return $ext;\n }", "title": "" }, { "docid": "e36b63ffd65e8d2663546b0eb3268a9c", "score": "0.60627496", "text": "public function getOrderNumber()\n {\n $query = $this->newQuery()\n ->selectRaw(\"CAST(RIGHT(job_number, 6) AS UNSIGNED) + 1 AS order_number\")\n ->whereMonth('created_at', date('m'))\n ->whereYear('created_at', date('Y'))\n ->orderBy('created_at', 'desc')\n ->take('1');\n\n $orderPad = '000001';\n if ($query->count()) {\n $orderPad = str_pad($query->first()->order_number, 6, '0', STR_PAD_LEFT);\n }\n\n $prefix = 'JOB';\n switch ($this->job_type) {\n case self::TYPE_UNLOADING:\n $prefix = 'UL';\n break;\n case self::TYPE_STRIPPING_CONTAINER:\n $prefix = 'SP';\n break;\n case self::TYPE_RETURN_EMPTY_CONTAINER:\n $prefix = 'EC';\n break;\n case self::TYPE_UNPACKING_GOODS:\n $prefix = 'UP';\n break;\n case self::TYPE_REPACKING_GOODS:\n $prefix = 'RP';\n break;\n case self::TYPE_LOADING:\n $prefix = 'LO';\n break;\n case self::TYPE_TAKE_STOCK:\n $prefix = 'TS';\n break;\n }\n\n return $prefix . '-' . date('ym') . $orderPad;\n }", "title": "" }, { "docid": "c6d9eecfcf66f3972a7eb7530f6c1e1a", "score": "0.60515076", "text": "private function next_order_number()\n {\n $ord = sprintf(\"%5s-%012d\", strtoupper(substr(Globals::$site_id, 0, 5)),\n ShoppingCart::$parameters->next_order_number);\n ShoppingCart::$parameters->next_order_number += 1;\n return $ord;\n }", "title": "" }, { "docid": "e158cd08836f8692204c80f98899df94", "score": "0.6031238", "text": "public function getPurchaseOrderNumber();", "title": "" }, { "docid": "9c63179e334b5518af768f69a6ba09b8", "score": "0.6029284", "text": "public function strID($val) {\n\t\treturn '_' . ltrim($val, '_O');\n\t}", "title": "" }, { "docid": "51763e0b247d95eed7f3c77f981b501e", "score": "0.60240906", "text": "public function getOrderNumber();", "title": "" }, { "docid": "620049b2ccf6f62854ddfe44f821b7dd", "score": "0.5980412", "text": "public function intID($val) {\n\t\treturn (int) ltrim($val, '_O');\n\t}", "title": "" }, { "docid": "650eae6066bab3ac1890f57a77ce5d79", "score": "0.5977152", "text": "public function transactionId()\n {\n return str_pad(rand(1, 999999999), 12, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "e81babead2184ca437c6490225f6658b", "score": "0.59414506", "text": "public function getIdPattern()\n {\n return '/(' . $this->getPrefix() . '__[0-9]{10}_[0-9]{6}__[a-zA-Z0-9_]{23})/';\n }", "title": "" }, { "docid": "7e884f27ba14707681bed89b11c95731", "score": "0.5917938", "text": "public function getOrderId()\n {\n return isset($this->order_id) ? $this->order_id : '';\n }", "title": "" }, { "docid": "be5af6c3ebd01ec2fee1fb4a2b2fcdb0", "score": "0.58909094", "text": "private function createOrderId()\n {\n static $id = null;\n\n // Generate only once for multiple calls\n if ($id === null) {\n $id = uniqid();\n }\n\n return $id;\n }", "title": "" }, { "docid": "eb3b01a2a4e1241ebedbdd6687ce2c06", "score": "0.5863769", "text": "function getID($length) {\n $id = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet.= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet.= \"0123456789\";\n $max = strlen($codeAlphabet); // edited\n\n for ($i=0; $i < $length; $i++) {\n $id .= $codeAlphabet[crypto_rand_secure(0, $max-1)];\n }\n\n return $id;\n }", "title": "" }, { "docid": "6acbd1e3b2b108e0d1786aaeea700714", "score": "0.58635527", "text": "public function get_order_id( $order ) {\n\t\treturn $order->get_id();\n\t}", "title": "" }, { "docid": "175215e19ae01dfea39c5194ba699334", "score": "0.5863194", "text": "public function generateIdPenyewa()\n {\n $data = $this->selectMax('IdPenyewa')->get()->getRowArray();\n $id = $data['IdPenyewa'];\n\n $order = (int) substr($id, 2, 4);\n\n $order++;\n\n $alphabet = 'P-';\n $id = $alphabet . sprintf(\"%04s\", $order);\n\n return $id;\n }", "title": "" }, { "docid": "858d7368ccb9c68733e9cce5fd7dd0ec", "score": "0.5849323", "text": "public function getOrderID(){\n\t\treturn $this->orderid;\n\t}", "title": "" }, { "docid": "dbc329cee6918feb4c229d464c6c7928", "score": "0.58486813", "text": "public function getMyId()\n {\n return 'CRON'.$GLOBALS['sugar_config']['unique_key'].':'.md5($this->jobserver);\n }", "title": "" }, { "docid": "3df05050443a86d1f47622f2d849aaff", "score": "0.5836772", "text": "public function orderId(): int\n {\n return $this->orderid;\n }", "title": "" }, { "docid": "e516c9bc3e25f5047e48532908178a5e", "score": "0.5830844", "text": "public function getStrId();", "title": "" }, { "docid": "5e03c6101675762ba0e99f5e31f88df0", "score": "0.5825838", "text": "public static function getID(): string\n {\n return self::mustGet('PHEROMONE_ID');\n }", "title": "" }, { "docid": "765f10a19f69e77597ea6fb47f8b726f", "score": "0.581801", "text": "private function get_order_number_prefix() {\n\n\t\tif ( ! isset( $this->order_number_prefix ) ) {\n\t\t\t$this->order_number_prefix = get_option( 'woocommerce_order_number_prefix', \"\" );\n\t\t}\n\n\t\treturn $this->order_number_prefix;\n\t}", "title": "" }, { "docid": "225749556ac025a789518f3b10795ddb", "score": "0.5814026", "text": "public static function generateOrderNumber($user_id)\n\t{\n\t\t// Convert user locale from ASCII to decimal\n\t\t$locale_in_decimal = ord( substr( get_locale(), 3, 1 ) ) . ord( substr( get_locale(), 4, 1 ) );\n\n\t\treturn sprintf( '%d-%s-%d', $user_id, date( 'ymd-his' ), $locale_in_decimal );\n\t}", "title": "" }, { "docid": "1ef70476c31ef6ef2fbdf86c1dde2df4", "score": "0.5807082", "text": "public function getOrderInternalId(){\n\t\treturn $this->orderInternalId;\n\t}", "title": "" }, { "docid": "fd62ea92b3046da3d245eab34da1d804", "score": "0.5790971", "text": "public function getUnidadeProdutoIdFormatted(): int\n {\n return $this->unidadeProdutoId;\n }", "title": "" }, { "docid": "6196f6f2c2a818442c235bbae0dc381d", "score": "0.5781172", "text": "private function genRefundTradeNumber()\n {\n // constraint: 退款日期(8位当天日期)+流水号(3~24位, 不能接受“000”,但是可以接受英文字符)\n //\n // Our implementation:\n // - 14 chars current date(8) and time (6)\n // - 13 chars generate with uniqid()\n // - 5 chars random number between [1, 99999]. if not 5 in length, left pad with '0'\n //\n return date('YmdHis') . uniqid() . str_pad(rand(1, 99999), 5, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "994c90295dd0da5c24b4ca5bca4d5c21", "score": "0.57775825", "text": "private function genCodigo()\n {\n return Uuid::uuid4();\n }", "title": "" }, { "docid": "4a25c4d921d4ea75f1c153005ac75d6e", "score": "0.57706004", "text": "public function getOrderIncrementId()\n {\n return $this->getData('order_increment_id');\n }", "title": "" }, { "docid": "adfc9a6ede6ca976eaf6be732e30ab63", "score": "0.57575816", "text": "abstract protected function get_order_id($entity);", "title": "" }, { "docid": "2107f28895daacc537dce150ab47e89b", "score": "0.57426834", "text": "public function generateNumber()\n {\n $latestId = (int) optional(static::latest('id')->first())->id + 1;\n\n return sprintf('FIC/%s/%s', date('y'), str_pad($latestId, 6, 0, STR_PAD_LEFT));\n }", "title": "" }, { "docid": "aef21011d218de597d13803aaa3c6e75", "score": "0.573387", "text": "public function getIDItemIn()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_item_in,5)) as kd_max from tbl_master_item_in\");\n $kd = \"\";\n if($q->num_rows()>0)\n {\n foreach($q->result() as $k)\n {\n $tmp = ((int)$k->kd_max)+1;\n $kd = sprintf(\"%09s\", $tmp);\n }\n }\n else\n {\n $kd = \"000000001\";\n }\n return \"IDP-RII-\".$kd;\n }", "title": "" }, { "docid": "d18dc345556743509d9b91067982a37d", "score": "0.57322085", "text": "public function generateRiskSessionId(): string\n {\n return preg_replace('~[^a-zA-Z0-9]~', '', uniqid('rsi', true));\n }", "title": "" }, { "docid": "c0bb1453ee993bf70decbe1f5fbf9561", "score": "0.57230115", "text": "public function getOrderId(): string;", "title": "" }, { "docid": "5e423ad499cc9d9f67dd1565d771ff5d", "score": "0.5708644", "text": "public function getOrderId() : string\n {\n return implode(',', $this->multishipping->getOrderIds());\n }", "title": "" }, { "docid": "d595dc4bebd9072bef2e49902d998c10", "score": "0.57035863", "text": "private function sanitizeWorkOrderId() {\r\n $wkOrderId = trim($this->getWorkOrderId());\r\n\t\r\n\t if(strlen($wkOrderId) > 0 && (preg_match('/^[1-9][0-9]*$/', $wkOrderId) === 1)) {\r\n\t return intval($wkOrderId);\r\n }\r\n\t\r\n\t return null;\r\n }", "title": "" }, { "docid": "ee160a54d5bb49d8c0d8e99e7abf8695", "score": "0.5703399", "text": "function generateDocumentId($prefix='rec')\n{\n\treturn $prefix . '-' . str_replace('-', '', \\UUID::mint()->string);\n}", "title": "" }, { "docid": "03f4c4f4bc5fcff4dd421ca9e947836c", "score": "0.5693462", "text": "public function getOrderId()\n {\n return $this->_getValue('oepaypal_orderid');\n }", "title": "" }, { "docid": "de60bee85d95802c8566d5453e3660cf", "score": "0.56802446", "text": "protected function generateCryptId(): string\n {\n $return = '';\n for ($i = 0; $i < $this->tokenLength; $i++) {\n $return .= $this->getRandomChar();\n }\n\n return $return;\n }", "title": "" }, { "docid": "e9ee66c3c9016792dfae5e5c6eaac936", "score": "0.56747633", "text": "private function _reconciliationId() {\n return (string) time() . rand(10000000, 99999999);\n }", "title": "" }, { "docid": "9093ed2d0745c7930c86ea9ad9146168", "score": "0.56698656", "text": "function rt_id_encode( $id ){\n\treturn 'RT' . base64_encode( $id ) . substr( uniqid() , 7 , 6 );\n}", "title": "" }, { "docid": "41ca9516d14e122cfe64c0146be151c8", "score": "0.5666146", "text": "public function otpIdentifier();", "title": "" }, { "docid": "a08ccfefd4252800d181f1051c76d2fb", "score": "0.5665162", "text": "public function generateTagNumber()\r\n {\r\n $strTemp = uniqid(TRUE);\r\n $strTemp = substr($strTemp, 2, 8); // Only use 8 digits\r\n\r\n return ($strTemp);\r\n }", "title": "" }, { "docid": "142794cb598ccf995c85c5696a774957", "score": "0.5663872", "text": "public function getCheckoutPurchaseOrderNo();", "title": "" }, { "docid": "9d1d5218eb9a43cbf6adc00414fe914b", "score": "0.56638265", "text": "public function getOrderLineId()\n\t{\n\t\t$column = self::COL_ORDER_LINE_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "b182cb7efb486a855720ca2ee99a6330", "score": "0.56585413", "text": "public function generateTicketId()\n {\n return (int)str_pad(rand(0, pow(10, 10)-1), 10, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "95b824e9ce3a76b15d97fb89c11c694f", "score": "0.56540483", "text": "private function createId(): string\n {\n return '_' . time() . '_' . explode(' ', microtime())[0];\n }", "title": "" }, { "docid": "26e8c8c9014caba667ed4cea35379d6d", "score": "0.5652815", "text": "private static function generateId( ){\n $id = \"\";\n $i = ceil( UserDataBase::getNb() / IdGenerator::perChar()) + 1;\n do {\n $id = IdGenerator::create(3, 3+$i);\n $i++;\n } while (UserDataBase::idExists( $id));\n return $id;\n }", "title": "" }, { "docid": "0d681160aa737cb3f2186f4303e368e8", "score": "0.56500465", "text": "function gen_id_date($order_id) {\n return (date(\"Y\")).\"/\".(date(\"m\")).\"/\".$order_id;\n }", "title": "" }, { "docid": "1b289ec63169620a4aa74ab4b7c5dea2", "score": "0.5645079", "text": "public function getBaseId()\n\t{\n\t\tif( isset( $this->values['order.base.coupon.baseid'] ) ) {\n\t\t\treturn (string) $this->values['order.base.coupon.baseid'];\n\t\t}\n\t}", "title": "" }, { "docid": "07618e6836e5642cdfbef60d5663b31f", "score": "0.56248987", "text": "public function ProductID()\n\t{\treturn 'SU' . $this->id;\n\t}", "title": "" }, { "docid": "3b43ad9c52c6ab737a602938fc13db4e", "score": "0.5624451", "text": "public function getOrderIncrementId()\n {\n return $this->getOrder()->getIncrementId();\n }", "title": "" }, { "docid": "3b43ad9c52c6ab737a602938fc13db4e", "score": "0.5624451", "text": "public function getOrderIncrementId()\n {\n return $this->getOrder()->getIncrementId();\n }", "title": "" }, { "docid": "d3a6eab21166d25f206eb566b6237e12", "score": "0.5618551", "text": "public function getOrderId(): ?string\n {\n return $this->getData(self::ORDER_ID);\n }", "title": "" }, { "docid": "d9340a7da736ec8efec6f0f712e57652", "score": "0.56182384", "text": "protected function getCustomerReferenceNumber(OrderInterface $order) {\n return $order->id();\n }", "title": "" }, { "docid": "3ed07526bcc4082c5ffb24ce04826d05", "score": "0.5600522", "text": "function normalize_id($uprid) {\n if (preg_match(\"/^\\d+$/\", $uprid)){\n return $uprid;\n } else {\n $product_id = tep_get_prid($uprid);\n preg_match_all('/\\{(\\d+)/', $uprid, $arr);\n $oids = $arr[1];\n preg_match_all('/\\}(\\d+)/', $uprid, $arr);\n for ($i=0;$i<count($arr[1]);$i++){\n $vids[$oids[$i]] = $arr[1][$i];\n }\n ksort($vids);\n return tep_get_uprid($product_id, $vids);\n }\n}", "title": "" }, { "docid": "e8c28f8dc5917f2f92f70ff5426cd971", "score": "0.5598919", "text": "public function getOrderno()\n {\n return $this->orderno;\n }", "title": "" }, { "docid": "1873d48314caabb7de957e92972a3208", "score": "0.55962896", "text": "function parse_id($full_id, $extension) {\n\treturn intval(str_replace($extension, '', $full_id));\n}", "title": "" }, { "docid": "f5fe6a8bc08272df377d70bc44d2509d", "score": "0.558728", "text": "function toUserID($id) {\n if (preg_match('/^STEAM_/', $id)) {\n $split = explode(':', $id);\n return $split[2] * 2 + $split[1];\n } elseif (preg_match('/^765/', $id) && strlen($id) > 15) {\n return bcsub($id, '76561197960265728');\n } else {\n return $id; // We have no idea what this is, so just return it.\n }\n}", "title": "" }, { "docid": "8345ba2b536ebf0442d09ede2ccdcabf", "score": "0.5586679", "text": "public function get_order_id()\n {\n log_message('debug', $this->platform . ' order: ' . json_encode($_POST));\n $app_id = $this->input->get_post('app_id');\n $open_id = $this->input->get_post('open_id');\n $trade_no = $this->input->get_post('trade_no');\n $money = $this->input->get_post('total_fee');\n $time = $this->input->get_post('time');\n $sign = $this->input->get_post('sign');\n $ext = json_decode($this->input->get_post('ext'));\n $ext = $ext->ext;\n\n $condition = array('u_order_id' => $ext);\n $this->load->model('Game_order_model');\n $game_order = $this->Game_order_model->get_one_by_condition($condition);\n $game_id = $game_order->game_id;\n log_message('debug', $this->platform.' my money '.$money.' '.$game_order->money);\n\n $key = $this->Game_model->get_key($game_id, 'appkey');\n // $my_sign = md5(\"ext=$ext\" . \"money=$money\" . \"orderId=$orderId\" . \"time=$time\" . \"userId=$userId\" . \"$key\");\n\n if (intval($money)!= $game_order->money) {\n return false;\n }\n\n return $ext;\n }", "title": "" }, { "docid": "c02da3440a2fa01352e6910cba7418a0", "score": "0.5585333", "text": "public static function getNextSKUNumber()\n\t{\n \t$lastSKU = Product::orderBy('created_at', 'desc')->first();\n\n \tif ( ! $lastSKU )\n \t// We get here if there is no order at all\n \t// If there is no number set it to 0, which will be 1 at the end.\n\n \t$number = 0;\n \telse \n \t$number = substr($lastSKU->sku_number, 3);\n\n \t// If we have ORD000001 in the database then we only want the number\n \t// So the substr returns this 000001\n\n \t// Add the string in front and higher up the number.\n \t// the %05d part makes sure that there are always 6 numbers in the string.\n \t// so it adds the missing zero's when needed.\n \n \treturn sprintf('%08d', intval($number) + 1);\n\t}", "title": "" }, { "docid": "81dca6e6f102058f2e14de7bd05670ce", "score": "0.55801445", "text": "public function generateTeamId() {\n\t\t$time = date('ym');\n\t\t$cond['id'] = array('LIKE', \"T$time%\");\n\t\t$list = DBModel::getByFields('cernet_team', $cond);\n\t\t$last_id = $list[count($list)-1]['id'];\n\t\t$number = (int)(substr($last_id, 5, 4));\n\t\t#$number = 1000;\n\t\t$number += 1;\n\t\t$number = ''.$number;\n\t\twhile (strlen($number) < 4)\n\t\t\t$number = '0'.$number;\n\t\treturn 'T'.$time.$number;\n\t}", "title": "" }, { "docid": "87ef63f3747bef30d443750effcefc1d", "score": "0.55766594", "text": "protected function getHashid(): string\n {\n return Hashids::encode($this->getAttribute($this->getKeyName()), config('cortex.foundation.obscure.numbers'));\n }", "title": "" }, { "docid": "aa8c49b5a4d368a6772279c272157fd4", "score": "0.5575378", "text": "public function getModuleId()\n {\n $this->vaildRequirment();\n return $this->replacement['VENDOR'] . $this->normalizerModuleName;\n }", "title": "" }, { "docid": "8f1df4901a70962c2ecdde63087c51b9", "score": "0.5569046", "text": "public function getIdFromSessionId()\n\t{\n\t\t$id = substr($this->p24_session_id, 4, strlen($this->p24_session_id));\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "f58328b8558ad40abb23777b7d6ddd87", "score": "0.5552894", "text": "public function getIDItemOut()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_item_out,5)) as kd_max from tbl_master_item_out\");\n $kd = \"\";\n if($q->num_rows()>0)\n {\n foreach($q->result() as $k)\n {\n $tmp = ((int)$k->kd_max)+1;\n $kd = sprintf(\"%09s\", $tmp);\n }\n }\n else\n {\n $kd = \"000000001\";\n }\n return \"IDP-RIO-\".$kd;\n }", "title": "" }, { "docid": "567c5d5027677e2ead502a1f27ceea52", "score": "0.55460125", "text": "public function getId()\n {\n return $this->source['order_id'];\n }", "title": "" }, { "docid": "e41e9d6d41fc32193d27e4a1b30acc71", "score": "0.5545032", "text": "public function caldulateId() {\n \t$sql = 'SELECT uuid_reddit(UUID()) AS id';\n \t$rs = DI::getDefault()->get('db')->query($sql);\n\t\t$rs->setFetchMode(\\Phalcon\\Db::FETCH_ASSOC);\n\t\treturn $rs->fetch()['id'];\n }", "title": "" }, { "docid": "ad214901e4ba9df1670f03d9d3a8660a", "score": "0.5544285", "text": "function rock_id_string($id) {\n\tif (is_object($id) && $id instanceof MongoId) {\n\t\treturn $id->__toString();\n\t}\n\treturn $id;\n}", "title": "" }, { "docid": "29b02233e4d34dd6109c115c0f3ce676", "score": "0.55409724", "text": "abstract protected function getFieldToGenerateId();", "title": "" }, { "docid": "277856c445c372eb825712d9bf81efa9", "score": "0.5536474", "text": "public function getOrderNumber() {\n\t\treturn $this->_getField(self::$ORDER_NUMBER);\n\t}", "title": "" }, { "docid": "0b154f90b1b9120647c79de96b3d0629", "score": "0.5532775", "text": "function object_id() {\n\t\t$class_parts = explode('_', get_called_class());\n\t\t$result = $class_parts[0].\"://\";\n\t\t$object_id = $this->__object_id();\n\t\tunset($class_parts[0]);\n\t\t$result .= implode('-', $class_parts).'/'.implode('/', $this->__object_id());\n\t\treturn strtolower($result);\n\t}", "title": "" }, { "docid": "e8d959da1aeb76b488a8a60af9c0a867", "score": "0.55305165", "text": "private static function makeReceiptId($prefix = '')\n {\n return $prefix . uniqid();\n }", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.5530145", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.5530145", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.5530145", "text": "public function getUniqueIdentifier() : string {}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a78144e5bc61174e420681c6bad18ace", "score": "0.0", "text": "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = University::orderByDesc('id')->get();\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n $btn = '<a href=\"'.route('university.edit',$row->id).'\" title=\"Edit\" class=\"btn btn-info btn-sm\"><i class=\"fal fa-edit\"></i></a> <a href=\"'.route('university.destroy',$row->id).'\" class=\"edit btn btn-danger btn-sm\" onclick=\"return confirm_delete('.$row->id.')\" title=\"Delete\"><i class=\"fal fa-trash\"></i></a><form id=\"delete_form_'.$row->id.'\" action=\"'.route('university.destroy',$row->id).'\" method=\"POST\">\n <input type=\"hidden\" name=\"_method\" value=\"DELETE\">\n <input type=\"hidden\" name=\"_token\" value=\"'.csrf_token().'\">\n </form>';\n return $btn;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n $title = 'University List';\n $menu = 'Profile Attributes';\n return view('backend.university.index',compact('title','menu'));\n }", "title": "" } ]
[ { "docid": "401f14dad055920ac5aa27d774922113", "score": "0.7704874", "text": "public function index() {\n $resource_info = $this->Resources->find('all');\n\n $this->set('resource_info', $this->paginate($resource_info));\n }", "title": "" }, { "docid": "aaad0bca56bcca6a005037e0278b1ae4", "score": "0.75253195", "text": "public function index() {\n\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\n\t}", "title": "" }, { "docid": "5d3b04082e8a634586a1ed8f8cdb546c", "score": "0.74725807", "text": "public function listAction()\n {\n $this->render('listPage');\n }", "title": "" }, { "docid": "6d93e4dca95df8ed0c7b3b8b2657ffd6", "score": "0.7455782", "text": "public function listAction()\n {\n $this->_initAction();\n $this->renderLayout();\n }", "title": "" }, { "docid": "5683700221387a4648da639ad72101ea", "score": "0.7411398", "text": "public function listAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Get record list\n $uid = Pi::user()->getId();\n $records = Pi::api('record', 'forms')->getRecordList($uid);\n\n // Set template\n $this->view()->setTemplate('archive-list');\n $this->view()->assign('config', $config);\n $this->view()->assign('records', $records);\n }", "title": "" }, { "docid": "1600316acdacf01cc93550ae2e9a85af", "score": "0.7193138", "text": "public function indexAction()\n {\n $objects = $this->getRepository()->findAll();\n\n return $this->render($this->getResource()->getTemplate('index'), array(\n 'objects' => $objects,\n 'resource' => $this->getResource()\n ));\n }", "title": "" }, { "docid": "883e2a9c193b1ec54d21d41093f06c70", "score": "0.7133651", "text": "public function listAction() {\n\t\t\n\t\t$this->init();\n\n\t\tif(!$this->id) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\t\t$fileFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory');\n\n\t\t$file = $fileFactory->retrieveFileOrFolderObject($this->id);\n\t\t\n\t\tif ($file instanceof \\TYPO3\\CMS\\Core\\Resource\\Folder) {\n\t\t\t$this->redirect('listFolder');\n\t\t}\n\n\t\tif (!($file instanceof \\TYPO3\\CMS\\Core\\Resource\\File)) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\n\t\t$processedFiles = $this->getProcessedFilesForFile($file);\n \n\t\t$this->view->assign('file', $file);\n\t\t$this->view->assign('processedFiles', $processedFiles);\n\t}", "title": "" }, { "docid": "735397dbae5dd6de4a32f9ab46c8479f", "score": "0.7097046", "text": "public function index()\n\t{\n\t\t$resources = $this->resourcesRepository->paginate(100);\n\n\t\treturn view('resources.index')\n\t\t\t->with('resources', $resources);\n\t}", "title": "" }, { "docid": "fec316528723462375530f41e571b4fe", "score": "0.704424", "text": "public function listing()\n\t{\n\t\tglobal $admin, $user; // Superglobales\n\n\t\tif($admin)\n\t\t{\n\t\t\t$pageTwig = 'users/listing.html.twig'; // Chemin de la View\n\t\t\t$template = $this->twig->load($pageTwig); // chargement de la View\n\n\t\t\t$result = $this->model->getAllUsers(); // Retourne la liste de tous les utilisateurs\n\n\t\t\techo $template->render([\"url\" => $_SERVER['REQUEST_URI'], \"result\" => $result, \"admin\" => $admin, \"user\" => $user]); // Affiche la view et passe les données en paramêtres\n\t\t}\n\t}", "title": "" }, { "docid": "027627f1e20a0806fbdf50a2ba14c78c", "score": "0.70438755", "text": "public function show()\n {\n $params = $this->getProjectFilters('listing', 'show');\n $query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();\n\n $paginator = $this->paginator\n ->setUrl('listing', 'show', array('project_id' => $params['project']['id']))\n ->setMax(30)\n ->setOrder(TaskModel::TABLE.'.id')\n ->setDirection('DESC')\n ->setQuery($query)\n ->calculate();\n\n $this->response->html($this->helper->layout->app('listing/show', $params + array(\n 'paginator' => $paginator,\n 'categories_list' => $this->category->getList($params['project']['id'], false),\n 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),\n 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),\n )));\n }", "title": "" }, { "docid": "d293f3fdec60349ef0877e91df4a099b", "score": "0.70241606", "text": "public function index()\n {\n $resources = Resources::orderBy('id', 'desc')->get();\n return view('Backend/Resources/viewResource', compact('resources'));\n }", "title": "" }, { "docid": "dab649efb652b22919255920aff18021", "score": "0.69978404", "text": "public function index()\n\t{\n\t\t$data['listing'] = Listing::paginate(15);\n\n\t\treturn view('admin.listing', $data);\n\t}", "title": "" }, { "docid": "fb266928c00d205f35924b707dcdadf4", "score": "0.6995689", "text": "public function listAction() {\n // Check if the item exists\n $id = $this->getParam('id');\n $item = get_record_by_id('Item', $id);\n if (!$item) {\n throw new Omeka_Controller_Exception_404;\n }\n // Respond with JSON\n try {\n $jsonData = IiifItems_Util_Annotation::buildList($item);\n $this->__respondWithJson($jsonData);\n } catch (Exception $e) {\n $this->__respondWithJson(array(\n 'message' => $e->getMessage()\n ), 500);\n }\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "f20bd0e93af1502c691a240521847e9d", "score": "0.6946605", "text": "public function index() {\n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources'));\n }", "title": "" }, { "docid": "6803a23af3bc653e90735ffd2b2ed35f", "score": "0.6941913", "text": "public function index()\n {\n\n $resource = (new AclResource())->AclResource;\n\n return view('Admin.acl.resource.index')->withResource($resource);\n }", "title": "" }, { "docid": "924e51ba82c2eab34f48f3bbfecb5197", "score": "0.692225", "text": "public function index()\n {\n return view('resources.index', [\n 'resources' => Resource::orderBy('id', 'DESC')->get()\n ]);\n }", "title": "" }, { "docid": "f7e7cbb28c97549abd73fed7818403a4", "score": "0.6920865", "text": "public function list()\n {\n return $this->Get('list');\n }", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "f0fa2690ffaab13556ebf9f8ee023468", "score": "0.6886966", "text": "public function listing()\n {\n // solo permite mostrar listado de TODOS los productos al administrador\n // si no es admin, redireccion a la lista de productos disponibles\n if (!$this->isAdmin())\n $this->redirect(\"product\", \"available\");\n\n $products = \\models\\Product::findBy(null);\n\n // se le pasa el listado a la vista y se renderiza\n $this->view->assign(\"list\", $products);\n $this->view->render(\"product_list\");\n }", "title": "" }, { "docid": "1cacb33ba12b36b95c20025febdd4b33", "score": "0.68812966", "text": "public function index()\n {\n // atau saat membuka page lain pada pagination\n $this->list();\n }", "title": "" }, { "docid": "3a0850cc56c832a1affe3d6906e36183", "score": "0.68409985", "text": "public function listAction()\n {\n return $this->render('MesdHelpWikiBundle:Default:list.html.twig', array());\n }", "title": "" }, { "docid": "7de268658a226bfb1078da5310cd732b", "score": "0.6829061", "text": "public function index()\n {\n $showData = Input::has('showData') ? (bool) Input::get('showData') : false;\n\n if ($showData === true) {\n $this->setTransformerFilters();\n }\n\n $limit = Input::has('limit') ? Input::get('limit') : 10000;\n\n\n // handle search\n if (Input::has('q')) {\n\n $resources = $this->service->search(\n Input::get('q'),\n $limit,\n $showData\n );\n\n return $this->respondWithCollection($resources,\n $showData === true ? $this->transformer : new ListTransformer());\n } else {\n return $this->respondWithCollection($this->service->showList($limit, $showData),\n $showData === true ? $this->transformer : new ListTransformer());\n }\n }", "title": "" }, { "docid": "d46bb32faa9e8a7d477db9cdd1aa50f0", "score": "0.6800859", "text": "public function index()\n {\n // Add a record\n// $obj = Resource::create([\n// 'seq'=>1.0,\n// 'name'=>'My image',\n// 'description'=>'My special image',\n// 'type'=>'IMAGE',\n// 'url'=>'',\n// 'status'=>'ACTIVE',\n// 'image'=>'chalky.jpg',\n// 'thumb'=>'chalky.jpg',\n// 'created_at'=>'2015-10-20 21:30:13',\n// 'updated_at'=>'2015-10-20 21:30:13'\n// ]);\n// $obj->save();\n\n $resources = Resource::all();\n\n // This would return json, as if for a basic API\n// return $resources;\n\n // Here we rely on a template to format the data\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "db4daec9f8d8cd89f2cb81ded0d0e9ea", "score": "0.68007904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->memberRepository->all();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "a8dcf059f191629c6258ae65433dac79", "score": "0.68005747", "text": "public function index()\n {\n //Grab all listings - with a descending sort by create timestamp.\n $listings = Listing::orderBy('created_at', 'desc')->get();\n\n //Return view with listings data.\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "01e703b1d51958083a171c504a5fbe86", "score": "0.67932504", "text": "public function list()\n {\n // ...\n }", "title": "" }, { "docid": "8f780116288779687a52681d9b84a0ef", "score": "0.6789059", "text": "public function listAction()\n {\n $all = $this->users->findAll();\n $table = $this->createTable($all);\n\n $this->theme->setTitle(\"Användare\");\n $this->views->add('users/index', ['content' => $table, 'title' => \"Användare\"], 'main-wide');\n }", "title": "" }, { "docid": "fd7b1f8fd083bf003bd937783f973341", "score": "0.6786347", "text": "public function index() {\n\t\t/// Displaying all items from the database\n\t\t$list = Item::findAll();\n\t\t$list[\"title\"] = \"All items\";\n\t\t$this->render(\"index\", $list);\n\t}", "title": "" }, { "docid": "2581dc8a87e69733d9a5051a2ba197df", "score": "0.6784052", "text": "public function view_list();", "title": "" }, { "docid": "74f1d55e2353d3983fa09829081123b9", "score": "0.67709553", "text": "public function index()\n {\n // Get articles\n $articles = Article::latest()->paginate(5);\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "a127bb62f2b51cad9508439ded53e39b", "score": "0.67696005", "text": "public function index()\n {\n $tests = Test::all();\n return TestForListResource::collection($tests);\n }", "title": "" }, { "docid": "1e182d51ef856ffdebfbd850cf50bee9", "score": "0.67537886", "text": "public function index()\n {\n $result = Information::where('active', true)->orderby('id', 'DESC')->paginate(20);\n return InformationResource::collection($result);\n }", "title": "" }, { "docid": "3dac8ae8178b5ab6ec8f744af3d4b5bb", "score": "0.67486656", "text": "public function index()\n {\n $inventories = Inventory::orderBy('created_at', 'desc')->paginate($this->inventoriesInPage);\n return $this->renderOutputAdmin(\"inventories.list\", [\n \"inventories\" => $inventories\n ]);\n }", "title": "" }, { "docid": "0753ada8c8a122f6b6886e1cc84a5965", "score": "0.67384964", "text": "public function index()\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['collections'] = $this->resource->getRowsData();\n $this->data['attributes'] = $this->resource->getAttributes();\n\n return view('vellum::catalog', $this->data);\n }", "title": "" }, { "docid": "92224d4b1facc85c25b765eda1c899d2", "score": "0.6737816", "text": "public function actionIndex()\n {\n $searchModel = new ResourcesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "66c285f8944542cf7713edaba3a0ad2c", "score": "0.6725589", "text": "public function index()\n {\n $this->data['url_data'] = site_url($this->class_path_name.'/list_data');\n $this->data['add_url'] = site_url($this->class_path_name.'/add');\n $this->data['record_perpage'] = SHOW_RECORDS_DEFAULT;\n }", "title": "" }, { "docid": "80d12db260f6dfe4b5aceed4625f5855", "score": "0.6721976", "text": "public function listAction()\n {\n $this->_datatable();\n return $this->render('BackendBundle:Foodies:list.html.twig');\n }", "title": "" }, { "docid": "b26e0dccffef1f4b909a7cc8c4dffc74", "score": "0.67117697", "text": "public function listAction()\n\t{\n\t\tif ($this->_getParam('json')) {\n\t\t\t$this->listJsonAction();\n\t\t} else {\n\t\t\t$project = $this->projectService->getProject((int) $this->_getParam('projectid'));\n\t\t\t$this->view->features = $this->featureService->getProjectFeatures($project);\n\t\t\t$this->view->project = $project;\n\t\t\tif ($this->_getParam('_ajax')) {\n\t\t\t\t$this->renderRawView('feature/list.php');\n\t\t\t} else {\n\t\t\t\t$this->renderView('feature/list.php');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b9ec8f3eb9fe45d7e52c09e49cd1f9d", "score": "0.67012614", "text": "public function index()\n {\n $offers = Offer::paginate(10);\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "190c6247941c857dd2767bd08ced001b", "score": "0.66836476", "text": "public function index()\n {\n $device_logs = DeviceLog::filter()->paginate();\n // $this->authorize('index', 'App\\DeviceLog'); // TODO: Policy\n\n return Resource::collection($device_logs);\n }", "title": "" }, { "docid": "9956226ca0d6a5a308e812db7aa3c8dd", "score": "0.6680364", "text": "public function index()\n {\n return view('listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "b4b19a0a264ba05f056ca1d352c15ab3", "score": "0.6679044", "text": "public function listAction() {\n\t\t$tags = $this->getTags();\n\t\t$this->view->assign('tags', $tags);\n\t}", "title": "" }, { "docid": "5d423b3e213eb36859bc854e0ea0821c", "score": "0.66765565", "text": "public function index()\n\t{\n\t\t$this->get();\n\t}", "title": "" }, { "docid": "962ec92f5da4e239f0963901dd679303", "score": "0.667593", "text": "public function list()\n {\n $this->checkLoginStatus('list');\n return new HtmlResponse();\n }", "title": "" }, { "docid": "f11e7dc71257fc35d626a4cc0df754c5", "score": "0.6671179", "text": "public function index()\n {\n $books = Book::paginate(10);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "67da517f1e843dce244d42bf3c00c83c", "score": "0.66616595", "text": "public function index()\n {\n $resources = Resource::getResourcesByUserServiceProvider();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "d1469f07edbbe4ff69af75d8f005780f", "score": "0.6661017", "text": "public function index()\n {\n $listings = Listing::get();\n return view('pages.backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4972cd57158bca324de2cdc88e1141c7", "score": "0.6659724", "text": "public function index()\n {\n $specifier = Specifier::paginate();\n return SpecifierResource::collection($specifier);\n }", "title": "" }, { "docid": "cbfc53f61a9472895d3345b43532b0f6", "score": "0.6659596", "text": "public function actionList()\n {\n $searchModel = new IgualasSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Se buscan también los servicios\n $serviciosModel = new \\app\\models\\ServiciosSearch(['activo'=>true]);\n $serviciosProvider = $serviciosModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'serviciosProvider' => $serviciosProvider,\n ]);\n }", "title": "" }, { "docid": "ec7aa7b9d406ecdd3cbfb90dfff07cc9", "score": "0.66576624", "text": "public function index()\n {\n // Getting all the articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(6);\n\n // Return article collection as a resource\n return aResource::collection($articles);\n }", "title": "" }, { "docid": "348728c06ffc3f7f47ab7a2486701300", "score": "0.66531324", "text": "public function list()\n {\n return view('items.list');\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "3340a40aeb9ca6134a87997b56d911be", "score": "0.6645119", "text": "public function indexAction()\n {\n $item = new Item;\n $items = $item->getAll();\n View::renderTemplate('Home/index.html', ['items_list' => $items]);\n }", "title": "" }, { "docid": "e7a070ae572c193acb7a79ecc2d34f28", "score": "0.66418844", "text": "public function index()\n {\n // Get activities\n $activities = Activity::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of activities as a resource\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "ae0412e2b98e2acf1da43d334bdc55fa", "score": "0.6638416", "text": "public function index()\n\t{\n\t\t$datas = $this->model->where('cat_status', 'open')->orderBy('sort_order')->paginate(15);\n\t\treturn View::make($this->resourceView.'.index')->with(compact('datas'));\n\t}", "title": "" }, { "docid": "81e310e3464b83f2e25e4bb5406f1a35", "score": "0.663706", "text": "public function index()\n {\n $products = Product::latest()->paginate(10);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.66361564", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "5b0d18ee7af036a0126d30b01aac4670", "score": "0.6635448", "text": "public function index( )\n\t{\t\n\t\tif(!\\Sentry::getUser()->hasAccess('manage_listings')){\n\t\t\treturn redirect()->action('AdminController@properties');\n\t\t}\n\n\t\t$listings= $this->listing->get();\n\t\t$website = $this->website->get();\n\t\treturn view('admin.listings', array('listings'=>$listings, 'websites'=>$website));\n\n\t}", "title": "" }, { "docid": "2e96526efb31162a0f4ca3bb61f781c5", "score": "0.66319674", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[0]['count'], $this->_pagination);\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "9fe55a7f3832e2905b2600e03b1356d2", "score": "0.6627155", "text": "public function index()\n\t{\n\t\tif (Input::get('list'))\t\treturn Response::json($this->model->getList(), 200);\n\t\telse \t\t\t\t\t\treturn Response::json($this->model->fetch(Input::all()), 200);\n\t}", "title": "" }, { "docid": "5438ea6951e01b2b0c5f44bd2895ba5d", "score": "0.6627067", "text": "public function index()\n {\n $listing = Listing::paginate(15);\n\n return view('listing.index', compact('listing'));\n }", "title": "" }, { "docid": "28c7c5fe8eff5e4f7e67018271a3970f", "score": "0.6621494", "text": "public function index()\n {\n //\n $resources = \\App\\Resource::all();\n return $resources;\n }", "title": "" }, { "docid": "7049b0be3d5ee96fe0213da94a5eabdc", "score": "0.66211265", "text": "public function list(): Response\n {\n $repository = $this->getDoctrine()->getRepository(ShowList::class);\n return $this->render('concert/concert.html.twig', [\n 'name' => \"list\",\n 'concerts' => $repository->findAll()\n ]\n );\n }", "title": "" }, { "docid": "de6e1eefbb1c8632afb33575e2d66697", "score": "0.66209346", "text": "public function index()\n {\n return BookListResource::collection(Book::all());\n // // return $author->books;\n }", "title": "" }, { "docid": "fb7ed7947ab536b91c04edc0db5a20e5", "score": "0.6608123", "text": "public function listAction()\n {\n $title = $this->t->_('List ') . $this->t->_($this->model_name);\n $this->tag->setTitle($title);\n $this->view->title = $title;\n\n $model = $this->getModel();\n\n if (is_null($model)) {\n $this->response->redirect('/admin/dashboard');\n }\n\n $query_urls = $this->request->getQuery();\n unset($query_urls['_url']);\n unset($query_urls['submit']);\n unset($query_urls['page']);\n\n // search\n $search_opt = $this->getFieldsSearch($query_urls, $model->list_view['fields']);\n $conditions = $search_opt['conditions'];\n $parameters = $search_opt['parameters'];\n // sort\n\n $list_data = $model::find(array(\n $conditions,\n 'bind' => $parameters\n ));\n\n // pagination\n $currentPage = $this->request->getQuery('page');\n $paginator_limit = 20; // @TODO\n $paginator = new PaginatorModel(array(\n \"data\" => $list_data,\n \"limit\" => $paginator_limit,\n \"page\" => $currentPage > 0 ? $currentPage : 1\n ));\n // get page\n $page = $paginator->getPaginate();\n\n $this->view->page = $page;\n $this->view->data = $page->items;\n $this->view->list_view = $model->list_view;\n $this->view->search = $query_urls;\n\n $controller = strtolower($this->controller_name);\n $action = strtolower($this->action_name);\n\n $this->view->controller = $controller;\n $this->view->action = $action;\n $this->view->action_detail = $this->action_detail;\n $this->view->action_edit = $this->action_edit;\n $this->view->action_delete = $this->action_delete;\n $this->view->menu = $model->menu;\n\n $query_urls = empty($query_urls) ? array('nosearch' => 1) : $query_urls;\n $this->view->current_url = $this->url->get(\"/admin/$controller/$action\", $query_urls);\n\n $exists = $this->view->exists($controller . '/' . $action);\n if (!$exists) {\n $this->view->pick('view_default/list');\n }\n }", "title": "" }, { "docid": "4075f3e85858e8eac990a25721c76630", "score": "0.66057074", "text": "public function index()\n {\n return $this->sendResponse( [\n \"items\"=> BookResource::collection(Book::all()->toArray())\n ],\n \"Books Retrieved successfully!\"\n );\n\n }", "title": "" }, { "docid": "f148c3920960427ce58f996986160dfa", "score": "0.6605562", "text": "public function index()\n { \n $articles = Article::latest()->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "5bd87f0ad66d0212e0bec36ece123e1e", "score": "0.6600455", "text": "public function index()\n {\n $user = Student::latest()->get();\n return $this->showAll(StudentResource::collection($user));\n }", "title": "" }, { "docid": "4815297dfe29adcb934ed5d6b8357ceb", "score": "0.65940166", "text": "public function index()\n\t{\n\t\t// // Check for list permission\n\t\t// if (! $this->model->mayList())\n\t\t// {\n\t\t// \treturn $this->user();\n\t\t// }\n\n\t\treturn $this->display();\n\t}", "title": "" }, { "docid": "a84c8d0a92b2e2efb69455a9790926e0", "score": "0.65936685", "text": "public function index()\n {\n return AulaResource::collection(Aula::paginate());\n }", "title": "" }, { "docid": "8395c06faebc6da915e86b24ff1c40b8", "score": "0.6591476", "text": "public function index()\n {\n //Get all articles, paginate function could be improved\n // $articles = Article::paginate(15);\n\n $articles = Article::get();\n //Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "6847e76913911cac71a85fa2835bf369", "score": "0.6583209", "text": "public function listAction()\n {\n $this->View()->assign($this->getAvailableStatuses());\n }", "title": "" }, { "docid": "244698ad57c10b2cf9bea875ed11f4e2", "score": "0.6582496", "text": "public function index()\n {\n return view('listing.index')->with([\n 'listings' => app('listings')->take(7),\n 'tags' => Tag::all(),\n ]);\n }", "title": "" }, { "docid": "965ff224495731f89e5a39ec8d28c56c", "score": "0.6580476", "text": "public function indexAction()\n\t{\n\t\t$paginator = $this->_getPaginator();\n\t\t$this->_configurePagination($paginator);\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\n\t\t$this->view->assign('records',$records);\n\n\t\t$this->configureView();\n\n\t\t$this->view->render('index.phtml');\n\t}", "title": "" }, { "docid": "5ae3dc8a0646433f9c872265b7fae9bb", "score": "0.6579524", "text": "public function index()\n {\n save_resource_url();\n $items = Document::with('documentable')->get();\n\n return $this->view('resources.documents.index')->with('items', $items);\n }", "title": "" }, { "docid": "f7f0617a1c3535ff5bd60dabc6ef0b2a", "score": "0.65772367", "text": "public function index()\n {\n $resources=Resource::orderBy('created_at','desc')->get();\n return view('admin.index',compact('resources'));\n }", "title": "" }, { "docid": "93c8e2fb25d358967a7239099ffa01be", "score": "0.6576169", "text": "public function actionList()\n {\n $model = new ImageList();\n\n $path = $model->getDataRequest('path');\n $imageList = $model->loadImage($path);\n\n return $this->render('list',compact('model','imageList','path'));\n }", "title": "" }, { "docid": "caa63ad0b7f03a52984cdbcc404b742e", "score": "0.6566202", "text": "public function listingAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d085389ae4d1b9ed456fd3f7f897fb44", "score": "0.65618056", "text": "public function index()\n {\n return ProjectListResource::collection(Project::paginate());\n }", "title": "" }, { "docid": "fb5cc939df880d31486688650542e9ef", "score": "0.6560243", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = EmisiCo2Tahunan::query();\n\n $query->when(request()->filled('tahun'), function ($query) {\n return $query->where('tahun', 'ILIKE', \"%\" . request()->query('tahun') . \"%\");\n });\n\n if(request()->has('provinsi')){\n $query->when(request()->filled('provinsi'), function ($query) {\n return $query->whereHas('Provinsi',function($q){\n return $q->where('nama_provinsi', 'ILIKE', \"%\" . request()->query('provinsi') . \"%\");\n });\n });\n }\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "d9aec54688559be15dcc145297ec98e9", "score": "0.6559387", "text": "public function index()\n {\n return view('backend.item.list_item');\n }", "title": "" }, { "docid": "e9a03ea28e2df914c978aa5c0d3a5637", "score": "0.6554056", "text": "public function index()\n {\n $options = $this->getQueryHelperOptions();\n $items = $this->repo->allPaged($options);\n\n if ( ! $items)\n {\n return $this->respondNotFound('Unable to fetch the selected resources');\n }\n\n $response = [\n 'data' => [],\n 'meta' => [\n 'pagination' => []\n ]\n ];\n\n $resource = new Fractal\\Resource\\Collection($items->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($items));\n\n $response['data'] = $this->fractal->createData($resource)->toArray()['data'];\n\n $paginator = new Fractal\\Pagination\\IlluminatePaginatorAdapter($items);\n\n $response['meta']['pagination'] = [\n 'total' => $paginator->getTotal(),\n 'count' => $paginator->count(),\n 'per_page' => $paginator->getPerPage(),\n 'current_page' => $paginator->getCurrentPage(),\n 'total_pages' => $paginator->getLastPage()\n ];\n\n return $response;\n }", "title": "" }, { "docid": "64c23385ebf3abebc1a7abc1fe27b69a", "score": "0.65517366", "text": "public function index()\n {\n return EntryResource::collection(Auth::user()->entries);\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "91ef4976872522e55ce7d21232db8ce3", "score": "0.6541719", "text": "public function getlist()\n {\n \t$specieses = Species::all();\n\n \treturn view( 'species.index-species' )->withSpecieses($specieses);\n }", "title": "" }, { "docid": "13e213cc4f2553888dd031c39274477f", "score": "0.65387595", "text": "public function index()\n {\n $objects = Thing::availableForCatalog()->paginate(40)->toJson();\n\n return view('web.pages.objects.index', compact('objects'));\n }", "title": "" }, { "docid": "7e319cde9d05f34fd876660ef419e5c1", "score": "0.6535465", "text": "public function index()\n {\n return CursoResource::collection(Curso::paginate());\n }", "title": "" }, { "docid": "80349a31fc145e69c11f76d6fe21f244", "score": "0.6525081", "text": "public function listAction($page)\n {\n $list = ApiDataSource::getList(!empty($page) ? $page : 1);\n\n if (!empty($list)) {\n try {\n echo TemplateEngine::get()->render(\n 'index.html.twig',\n array(\n \"shipList\" => !empty($list['results']) ? $list['results'] : null,\n \"currentPage\" => $page,\n \"totalPages\" => !empty($list['results']) && !empty($list['count']) ? ceil($list['count'] / Config::get()->getSection('api')['perPage']) : 0\n )\n );\n } catch (\\Exception $e) {\n Logger::get()->error($e->getMessage());\n header('HTTP/1.0 500 Internal server error');\n }\n } else {\n header('HTTP/1.0 404 Not Found');\n }\n }", "title": "" }, { "docid": "8db12a9417955f7cafd859a2f084db66", "score": "0.6524149", "text": "public function index()\n {\n $articles=$this->articleRepository->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "b02a86792172e9aa0d15ce71523bf18a", "score": "0.6522924", "text": "public function listAction()\n {\n $postManager = new PostManager();\n $posts = $postManager->getAllPosts();\n $this->render('Post/list.html.twig', ['posts' => $posts]);\n }", "title": "" }, { "docid": "3facf87d49c58736d719a1d9ceb098c4", "score": "0.6515679", "text": "public function index()\n {\n $halls = Hall::all();\n return HallResource::collection($halls);\n }", "title": "" }, { "docid": "5e65da9a34ee6f80605137959439b41c", "score": "0.6511205", "text": "public function index()\n {\n //\n return EmployeeResource::collection(Employee::latest()->paginate(5));\n }", "title": "" }, { "docid": "3f890ba095bdb75af4cc34f24821df21", "score": "0.651028", "text": "public function index()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resourceFields = json_encode(Otter::getAvailableFields($this->resource));\n\n return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));\n }", "title": "" }, { "docid": "1fa5cdf3237bc23c42125528d9db4212", "score": "0.650871", "text": "public function listAction()\n {\n $this->view->assign('posts', $this->findPosts());\n }", "title": "" }, { "docid": "c7253bf5ee3c82a3ec81a23e84bfc054", "score": "0.6507231", "text": "public function index()\n {\n return Response::custom('list', $this->service->all(), \\Illuminate\\Http\\Response::HTTP_OK);\n }", "title": "" }, { "docid": "16cbe42e288d6db09ecb33ee711d2c85", "score": "0.650502", "text": "public function index()\n {\n $items = Item::all();\n\n return response([\n 'items' => ItemResource::collection($items),\n 'message' => 'Retrieved successfully'\n ], 200);\n }", "title": "" }, { "docid": "9b9cf4a5c0a3cf48f806a2c95874afa6", "score": "0.6503013", "text": "public function index()\n {\n //\n if (\\Gate::allows('canView')) {\n $category = Category::latest()->paginate(10);\n return CategoryResource::collection($category);\n } else {\n return ['result' => 'error', 'message' => 'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4b682e76649352c45a12edca169568ff", "score": "0.65024114", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_Book_type->get_all();\n\t\t$this->template->set('title', 'Book Type List');\n\t\t$this->template->load('template', 'contents', 'book_type/book_type_list', $data);\n\t}", "title": "" }, { "docid": "12f45a4dbd72d90586e475e387aa5ee9", "score": "0.6500511", "text": "public function list()\n {\n // récupération de tous les users grâce à la méthode statique \"findAll()\"\n $users = User::findAll();\n\n // génération d'un token aléatoire\n // pour protéger la route\n $token = $this->generateCsrfToken();\n\n // définition du tableau de données $viewVars à passer à ma vue\n $viewVars = [\n 'users' => $users,\n 'token' => $token,\n ];\n\n // j'appelle ma méthode show qui va afficher le bon template\n // à qui je passe mon tableau de données viewVars\n $this->show('user/list', $viewVars);\n }", "title": "" } ]
2c08215633cd740d5d746afad12e52cf
Get the array representation of the notification.
[ { "docid": "2b9d5bd0831206f2b8ed2d27dc59a259", "score": "0.66654325", "text": "public function toArray($notifiable) {\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}", "title": "" } ]
[ { "docid": "a1cc29054a7deb839647b169f3d83a66", "score": "0.75598466", "text": "public function toArray($notifiable)\n {\n return [\n 'text' => $this->notify_msg,\n 'order_id' => 0,\n 'type' => 'public'\n ];\n }", "title": "" }, { "docid": "df22b0e36f02f90edcba18c1d5dd6e58", "score": "0.7471352", "text": "private function notification_to_array( Yoast_Notification $notification ) {\n\n\t\treturn $notification->to_array();\n\t}", "title": "" }, { "docid": "2c83c3a1cc5e6719f20de6d8a6e9359c", "score": "0.74390763", "text": "public function toArray()\n {\n return [\n 'data' => $this->get('data'),\n 'reason' => $this->get('reason'),\n 'reasonName' => $this->get('reasonName'),\n 'line' => $this->get('line'),\n 'msg' => $this->get('msg'),\n 'raw_msg' => $this->get('raw_msg'),\n 'version' => $this->get('version'),\n 'targetId' => $this->get('targetId'),\n ];\n }", "title": "" }, { "docid": "b70b5a8139c8b832c419be4be5327a52", "score": "0.7432826", "text": "public function asArray() : array\n {\n return [\n 'message' => $this->message,\n ];\n }", "title": "" }, { "docid": "8ea00536778c8068e8842410e35fdc35", "score": "0.74195874", "text": "public function toArray()\n {\n return [\n 'message_name' => $this->messageName,\n 'uuid' => $this->uuid->toString(),\n 'version' => $this->version,\n 'payload' => $this->payload(),\n 'metadata' => $this->metadata,\n 'created_at' => $this->createdAt(),\n ];\n }", "title": "" }, { "docid": "67e407646a9479f054fcda98d1c88aa2", "score": "0.7383455", "text": "public function toArray($notifiable)\n {\n return [\n 'notification' => \"client replied to \".$this->ticket->name,\n 'not_id' => $this->ticket->id,\n 'not_type' => 'ticket',\n 'object_id' => $notifiable->id\n ];\n\n }", "title": "" }, { "docid": "893deb541ee42357bac82e6577180062", "score": "0.73187697", "text": "public function toArray($notifiable)\n {\n return [\n // 'data' => $this->notifyData['data']\n // 'notification_type' => $this->details['notification_type'],\n // 'title' => $this->details['title'],\n // 'module_id'=> $this->details['module_id'],\n // 'for' => $this->details['for'],\n // 'created_by' => $this->details['created_by'],\n // 'sender_id' => $this->details['sender_id'],\n // 'receiver_id' => $this->details['receiver_id']\n ];\n }", "title": "" }, { "docid": "8edda6024ba970a0ed88d3a58b9ec030", "score": "0.724501", "text": "public function toArray()\n {\n return [\n $this->id => [\n 'id' => $this->id,\n 'message' => $this->message,\n 'type' => $this->type,\n 'datetime' => $this->datetime,\n 'created_at' => date('Y-m-d H:i:s'),\n ]\n ];\n }", "title": "" }, { "docid": "0b19857a38d47eb81434a4a472e324e0", "score": "0.7229872", "text": "public function toArray()\n {\n $data = [\n 'name' => $this->name,\n 'data' => $this->data,\n 'notification' => $this->notification,\n 'android' => $this->android,\n 'webpush' => $this->webpush,\n 'apns' => $this->apns,\n 'fcm_options' => $this->fcmOptions,\n ];\n\n if ($this->token) {\n $data['token'] = $this->token;\n }\n\n if ($this->condition) {\n $data['condition'] = $this->condition;\n }\n\n return $data;\n }", "title": "" }, { "docid": "6e283e4e6fab8fd42169e68f07c28d23", "score": "0.7204997", "text": "public function toArray($request)\n {\n /** @var $Notification */\n return [\n 'id' => $this->id,\n 'from' => $this->data['from'],\n 'subject' => $this->data['subject'],\n 'body' => $this->data['body'],\n 'type' => $this->type(),\n 'created' => $this->created_at,\n 'readAt' => $this->read_at,\n 'sender' => $this->sender(),\n ];\n }", "title": "" }, { "docid": "34869afcf75fc746812466a4be5b4e04", "score": "0.7178752", "text": "public function toArray()\n {\n $return = array(\n 'status' => $this->status,\n 'message' => $this->message,\n );\n\n if (!empty($this->data))\n {\n $return['data'] = $this->data;\n }\n else\n {\n $return['data'] = null;\n }\n\n return $return;\n }", "title": "" }, { "docid": "1f00564798ea5aab676a5d8b03b94d83", "score": "0.71215653", "text": "public function toArray($notifiable)\n {\n return [\n 'phone' => $notifiable->phone,\n 'message' => $this->message\n ];\n }", "title": "" }, { "docid": "d89fca11e9ca8e5654376eb0fd040819", "score": "0.7121525", "text": "public function toArray()\n {\n $data = [];\n if (isset($this->keypath)) {\n $data['keypath'] = $this->keypath;\n }\n if (isset($this->message)) {\n $data['message'] = $this->message;\n }\n if (isset($this->value)) {\n $data['value'] = $this->value;\n }\n return $data;\n }", "title": "" }, { "docid": "8ba43741ece8323fd8dd9020c56cf6b7", "score": "0.7096074", "text": "public function toArray() {\n $msg = ['data' => $this->data];\n if ($this->collapseKey !== null)\n $msg['collapse_key'] = $this->collapseKey;\n if ($this->delayWhileIdle !== null)\n $msg['delay_while_idle'] = $this->delayWhileIdle;\n if ($this->ttl !== null)\n $msg['time_to_live'] = $this->ttl;\n if ($this->isDryRun !== null)\n $msg['dry_run'] = $this->isDryRun;\n\n return $msg;\n }", "title": "" }, { "docid": "db697c238de5652a90efec217c1787d8", "score": "0.70919156", "text": "public function getNotifications(): array;", "title": "" }, { "docid": "3505e8b27e0fbdaa34b45f1f39ef680c", "score": "0.7079772", "text": "public function getNotifications(): array\n {\n return $this->notifications;\n }", "title": "" }, { "docid": "6d31a97f56207e8e990a95f58e209ae9", "score": "0.7049304", "text": "public function toArray($notifiable)\n {\n return [\n \"message\" => $this->message,\n\t\t\t\"subject\" => $this->subject,\n\t\t\t\"level\" => $this->level,\n\t\t\t\"type\" => \"AdminAlert\"\n ];\n }", "title": "" }, { "docid": "d18395510d81f0d7856b2ee58f2c2a90", "score": "0.70457995", "text": "public function toArray() {\n $messages = array();\n \n foreach ($this->_messages as $message) {\n $messages[] = $message->toArray();\n }\n return $messages;\n }", "title": "" }, { "docid": "0de583d87c5a374e238e39556678f0fa", "score": "0.703443", "text": "public function toArray(): array\n {\n return [\n 'type' => get_class($this),\n 'message' => $this->message,\n 'data' => $this->data,\n ];\n }", "title": "" }, { "docid": "592be77cb28f4b2788d2ae59cff74750", "score": "0.70280033", "text": "public function toArray(): array\n {\n $notifs = $this->getNotifications();\n $fields = $this->getFields();\n $errors = [];\n\n $notificationsDetails = [];\n $fieldsDetails = [];\n\n\n // notifications\n foreach ($notifs as $notification) {\n $notificationsDetails[] = [\n \"type\" => $notification->getType(),\n \"message\" => $notification->getMessage(),\n ];\n }\n\n\n // fields\n foreach ($fields as $fieldId => $field) {\n $fieldsDetails[$fieldId] = $field->toArray();\n\n $fieldErrors = $field->getErrors();\n if ($fieldErrors) {\n $errors[$fieldId] = $fieldErrors;\n }\n\n }\n\n return [\n \"isPosted\" => $this->isPosted(),\n \"notifications\" => $notificationsDetails,\n \"fields\" => $fieldsDetails,\n \"errors\" => $errors,\n \"properties\" => $this->properties,\n \"mode\" => $this->mode,\n \"jsCode\" => $this->jsCode,\n \"cssId\" => $this->cssId,\n \"id\" => $this->formId,\n ];\n }", "title": "" }, { "docid": "255be6c2d485c63c6a023c2773f98075", "score": "0.7010085", "text": "public function toArray($notifiable) {\n return array('title' => $this->push->title, 'body' => $this->push->body);\n }", "title": "" }, { "docid": "2564b8aa088d60f442bc5b274e617f08", "score": "0.70077395", "text": "public static function as_array()\n\t{\n\t\t$session = Session::instance();\n\n\t\treturn $session->get_once('notices', array());\n\t}", "title": "" }, { "docid": "401ee2ad42217fd26f7d52e1c39569fa", "score": "0.69915146", "text": "public function notifications(): array\n {\n return [\n 'status' => 200,\n 'unreadCount' => 0,\n 'data' => [\n [\n 'title' => 'Hello!',\n 'body' => 'Real time notifications are now supported. Click <a href=\"https://github.com/spiral/toolkit/tree/master/packages/notifications\">here</a> to read documentation',\n 'read' => false,\n 'icon' => 'download',\n 'date' => 1597828433980,\n 'id' => '1',\n ],\n ],\n ];\n }", "title": "" }, { "docid": "a47f8f523c44899ebc99064edb69e9e9", "score": "0.69819933", "text": "public function toArray($notifiable)\n {\n return [\n 'message' => $this->message,\n 'user_id' => $notifiable->id,\n 'user_email' => $notifiable->email\n ];\n }", "title": "" }, { "docid": "3e71cd0e97c982f42044e420d677b641", "score": "0.69701743", "text": "public function toArray($notifiable)\n {\n return [\n 'chat_id' => $this->repliable->id,\n 'text' => $this->text,\n ];\n }", "title": "" }, { "docid": "78fca16db8d0e468ea001fda568379a4", "score": "0.6948565", "text": "public function toArray($notifiable)\n\t{\n\t return $this->data;\n\t}", "title": "" }, { "docid": "0997d656badd755a380d2cdfa86d9bb9", "score": "0.69481564", "text": "public function toArray($notifiable)\n {\n return [\n 'title' => $this->title,\n 'message' => $this->message,\n 'notification_type' => $this->notification_type,\n 'redirect_url' => $this->redirect_url,\n ];\n }", "title": "" }, { "docid": "9925149149ab128dcb21e996e7f45563", "score": "0.6938462", "text": "public function toArray($notifiable)\n {\n return [\n 'data' => $this->event,\n ];\n }", "title": "" }, { "docid": "c70b1d6c32d8a991bc2b8aa9fa5a3c05", "score": "0.6935622", "text": "public function toArray()\n {\n return [\n 'status' => $this->status() ? $this->status()->toArray() : null,\n 'requestId' => $this->requestId(),\n 'reference' => $this->reference(),\n 'signature' => $this->signature(),\n ];\n }", "title": "" }, { "docid": "d6f04c13ff85b4a5222d12b5cd9ac5fb", "score": "0.69083047", "text": "public function toArray($notifiable)\n { \n switch ($this->type) \n {\n case 'updated':\n $message = '<label>'.Auth::user()->name.' ['.Auth::user()->roll_no.'] </label> updated the event <label>'.$this->event->title.'</label>';\n $url = route('user.events.show', $this->event->id);\n break;\n case 'deleted':\n $message = '<label>'.Auth::user()->name.' ['.Auth::user()->roll_no.'] </label> deleted the event <label>'.$this->event->title.'</label>';\n $url = route('events.index');\n break;\n case 'expired':\n $message = '<label>'.$this->event->title.'</label> which you are associated has ended ';\n $url = route('user.events.show', $this->event->id);\n break;\n case 'invite':\n $message = '<label>'.Auth::user()->name.'</label> invited you to his Event '.$this->event->title;\n $url = route('user.events.show', $this->event->id);\n break; \n }\n\n return [\n 'message' => $message,\n 'url' => $url\n ];\n }", "title": "" }, { "docid": "d72daaca7e165fcf02a28f4620bab000", "score": "0.69048464", "text": "public function toArray($notifiable)\n {\n return [\n 'title' => $this->title,\n 'message' => $this->message\n ];\n }", "title": "" }, { "docid": "bf785378253774cec3d1abe0d1c70f9b", "score": "0.6877794", "text": "public function getArray(){\n\n\t\t\treturn $this->logArray;\n\t\t}", "title": "" }, { "docid": "e6094080603e434fc5c7f6fd5e7f8cf3", "score": "0.6859645", "text": "public function toArray($notifiable)\n {\n return [\n 'notification' => 'on_hold_rejected_by_designer',\n 'user_id' => $this->campaign->user_id,\n ];\n }", "title": "" }, { "docid": "5df77153fc92ea001b9496b62dd8f624", "score": "0.6855778", "text": "public function __toArray()\n {\n $arr = array();\n foreach ($this->changes as $key => $val) {\n if ($val instanceof \\DateTime) {\n $arr[$key] = $val->format('Y-m-d H:i:s');\n } else if (is_bool($val)) {\n $arr[$key] = $this->boolToStr($val);\n } else if ($val instanceof Base) {\n $arr[$key . 'id'] = $val->getId();\n } else {\n $arr[$key] = $val;\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "859efbb2b58e4aa3fc6b3f96392f9ec1", "score": "0.68395764", "text": "public function toArray() {\n return array(\n 'sensor_name' => $this->getSensorId(),\n 'value' => $this->getValue(),\n 'expected_value' => $this->getExpectedValue(),\n 'numeric_value' => $this->toNumber(),\n 'status' => $this->getStatus(),\n 'message' => $this->getMessage(),\n 'execution_time' => $this->getExecutionTime(),\n 'timestamp' => $this->getTimestamp(),\n );\n }", "title": "" }, { "docid": "c79934310ab8d9e6ef72f48f1fb8dbcb", "score": "0.6833358", "text": "public function toArray($notifiable)\n {\n return [\n 'job_order_id' => $this->jo->id,\n 'job_order_no' => $this->jo->job_order_no,\n 'project_name' => $this->jo->project_name,\n 'status' => 'unread',\n 'message' => $this->user->profile->full_name . ' Updated the Job Order '.$this->jo->job_order_no,\n 'timestamp' => $this->currentDateTime\n ];\n }", "title": "" }, { "docid": "14a39a91f56f6896213a555306a2b95e", "score": "0.68159044", "text": "public function toArray(): array\n {\n return [\n 'channel' => $this->channel,\n 'content' => $this->content,\n 'extra' => $this->extra,\n ];\n }", "title": "" }, { "docid": "eb4e40af2b725da2bb4d63cccafc476b", "score": "0.68063676", "text": "public function toArray() : Array {\n\t\t\treturn $this -> data;\n\t\t}", "title": "" }, { "docid": "0fa527e03111f48ce56dd40ed417ff58", "score": "0.67918783", "text": "public function toArray($notifiable)\n\t{\n\t return $notifiable->toArray();\n\t}", "title": "" }, { "docid": "074d0676e68aa7fdb2fa649add03e098", "score": "0.67766184", "text": "public function toArray($notifiable)\n {\n return $this->data;\n }", "title": "" }, { "docid": "1a870671d2e256fbd52ad2fbf0744c0a", "score": "0.6760351", "text": "public function toArray()\n {\n return [\n 'text' => $this->content,\n 'recipients' => $this->recipients,\n ];\n }", "title": "" }, { "docid": "901ccf05bfd065d14780d13fd04d6804", "score": "0.6754909", "text": "public function toArray($notifiable)\n {\n return [\n 'message' => 'Заказ ' . $this->order->getId() . ' завершен.',\n 'partner' => $this->order->partner->getEmail(),\n 'vendors' => $this->order->getVendorsEmailToArray(),\n 'items' => $this->order->getProductsToArray(),\n 'sum' => $this->order->getSum(),\n ];\n }", "title": "" }, { "docid": "475a4a863f4b405f7e4775e62ea9129d", "score": "0.6730855", "text": "public function toArray($notifiable): array\n\t{\n\t\treturn Notif::make()\n\t\t\t->info(__('A new order has been placed, check it out'))\n\t\t\t->subtitle($this->order->purchase)\n\t\t\t->routeDetail('orders', $this->order->id)\n\t\t\t->toArray();\n\t}", "title": "" }, { "docid": "0a83ea72e02219fccc266b01a46e2f71", "score": "0.67241645", "text": "public function toArray()\n {\n return $this->array;\n }", "title": "" }, { "docid": "d2c9822f38284f1e124cf51d560977fd", "score": "0.67187893", "text": "public function toArray()\n {\n if ($this->hasAttachment) {\n return $this->attachmentMessageToArray();\n }\n\n if (count($this->buttons) > 0) {\n return $this->buttonMessageToArray();\n }\n else if (count($this->cards) > 0) {\n return $this->genericMessageToArray();\n }\n else if (count($this->replies) > 0) {\n return $this->repliesMessageToArray();\n }\n else if ($this->hasText) {\n return $this->textMessageToArray();\n }\n\n throw CouldNotCreateMessage::dataNotProvided();\n }", "title": "" }, { "docid": "f3cc2374653a65e1d845df0ce21484f5", "score": "0.6711741", "text": "public function toArray($notifiable): array\n {\n return [\n 'postReply' => $this->postReply,\n ];\n }", "title": "" }, { "docid": "6840c24d377f89ff3fe676a28d8f9cb1", "score": "0.67089045", "text": "protected function repliesMessageToArray()\n {\n $message = [];\n \n if ($this->hasText) {\n $message['text'] = $this->text;\n }\n\n $message['quick_replies'] = $this->replies;\n\n return $message;\n }", "title": "" }, { "docid": "ad33ca3242a6ead1d249e37c1c67f9c5", "score": "0.670731", "text": "public function toArray($notifiable)\n\t{\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}", "title": "" }, { "docid": "b6913ca654139b9c029c324bdc4ab312", "score": "0.6696023", "text": "public function toArray()\n {\n return [\n 'level' => $this->level,\n 'subject' => $this->subject,\n 'greeting' => $this->greeting,\n 'salutation' => $this->salutation,\n 'elements' => $this->elements,\n 'subcopy' => $this->subcopy,\n 'heading' => $this->heading,\n 'logo' => $this->parseLogoConfig(),\n ];\n }", "title": "" }, { "docid": "e5b4f18ab05932abd7ad0c99d5245102", "score": "0.6684882", "text": "public function toArray()\n {\n return [\n 'confidence' => $this->getConfidence(),\n 'id' => $this->getId(),\n 'raw' => $this->getRaw(),\n ];\n }", "title": "" }, { "docid": "397387cf53da3f8d73b01923919edcad", "score": "0.6669167", "text": "public function to_array() {\n\t\treturn [\n\t\t\t'id' => $this->id,\n\t\t\t'timestamp' => $this->timestamp,\n\t\t\t'installed' => $this->installed,\n\t\t\t'imports' => $this->imports,\n\t\t];\n\t}", "title": "" }, { "docid": "4de76a40512b265d7eabc23b2a820d43", "score": "0.6662858", "text": "public function get_array()\n\t{\n\t\treturn $this->log;\n\t}", "title": "" }, { "docid": "bd5ec5b137ce40353a7f4e83574cf797", "score": "0.66579115", "text": "public function toArray()\r\n {\r\n $a = [];\r\n \r\n $a['username'] = $this->username;\r\n $a['userid'] = $this->userid;\r\n $a['handle'] = $this->handle;\r\n \r\n if (!empty($this->message)) {\r\n $a['msg'] = $this->message;\r\n }\r\n if (!empty($this->from)) {\r\n $a['from'] = $this->from;\r\n }\r\n if (!empty($this->to)) {\r\n $a['to'] = $this->to;\r\n }\r\n if (!empty($this->customid)) {\r\n $a['customid'] = $this->customid;\r\n }\r\n if (!empty($this->price)) {\r\n $a['price'] = $this->price;\r\n }\r\n if (!empty($this->mccmnc)) {\r\n $a['mccmnc'] = $this->mccmnc;\r\n }\r\n if (!empty($this->credit)) {\r\n $a['credit'] = $this->credit;\r\n }\r\n \r\n return $a;\r\n }", "title": "" }, { "docid": "2e85d15e8fcf685ad7cdd1200a3bfe9f", "score": "0.66518056", "text": "public function toArray($notifiable)\n {\n return $this->getData();\n }", "title": "" }, { "docid": "16e6d61226abca56dcaf696a8e87afc0", "score": "0.66432023", "text": "public function toArray($notifiable)\r\n {\r\n return [\r\n //\r\n ];\r\n }", "title": "" }, { "docid": "74dabdde9e1d1c34692c7f15ee8383f1", "score": "0.66417104", "text": "public function toArray()\n {\n // return the instance\n return array(\n $this->getNoteId()->intValue(),\n $this->getSubject()->stringValue(),\n $this->getNoteTypeName()->stringValue(),\n $this->getCreateUserUsername()->stringValue(),\n TDProject_Core_Formatter_Date::get()\n ->format($this->getRemindAt())->stringValue()\n );\n }", "title": "" }, { "docid": "3c621a640ced656992b7c3555b33c695", "score": "0.664129", "text": "public function getMessageData()\n {\n return array();\n }", "title": "" }, { "docid": "fb20633a650d1dbf6215863c5c51bef3", "score": "0.6629057", "text": "public function toArray(): array {\n return $this->subjectArray;\n }", "title": "" }, { "docid": "33531acd266fb5053811427c7df8f743", "score": "0.66230375", "text": "function toArray() {\n\t\treturn [\n\t\t\t\"changed\" => ISODate::convert($this->getChanged()),\n\t\t\t\"city\" => $this->getCity(),\n\t\t\t\"commit\" => $this->getCommit(),\n\t\t\t\"created\" => ISODate::convert($this->getCreated()),\n\t\t\t\"email\" => $this->getEmail(),\n\t\t\t\"name\" => $this->getName(),\n\t\t\t\"note\" => $this->getNote(),\n\t\t\t\"phone\" => $this->getPhone(),\n\t\t\t\"postcode\" => $this->getPostcode(),\n\t\t\t\"street\" => $this->getStreet(),\n\t\t\t\"uuid\" => $this->getUuid(),\n\t\t\t\"web\" => $this->getWeb(),\n\t\t];\n\t}", "title": "" }, { "docid": "582307e86308217f4c8809862e7921d9", "score": "0.6620194", "text": "public function toArray($notifiable)\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "582307e86308217f4c8809862e7921d9", "score": "0.6620194", "text": "public function toArray($notifiable)\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "34fb0df889e32c96ac576df5b48d1262", "score": "0.6603107", "text": "public function toArray()\n {\n return [\n 'subject' => $this->adder->only(['id', 'name', 'username', 'avatar']),\n 'action' => 'added you to ' . $this->groupType,\n 'object_type' => $this->groupType,\n 'object_name' => $this->groupName,\n 'object_id' => $this->groupId,\n 'url' => url($this->groupType . 's/' . $this->groupId),\n ];\n }", "title": "" }, { "docid": "27a3b8bfe1070f1d1b8ae9bcba4c861d", "score": "0.6601724", "text": "public function toArray() {\n return $this->_Array;\n }", "title": "" }, { "docid": "1007a8a40fbd7a8df9778cc42457e643", "score": "0.65819764", "text": "public function notificationsToJSON()\n\t{\n\t\t$notifications = $this->queries->getNotifications();\n\n\t\t// JSON string to build\n\t\t$notificationsJSON = \"[\";\n\n\t\t// Convert each individual message to a JSON string\n\t\tforeach ($notifications as $notification) {\n\t\t\t$notificationno = $notification['notification_id'];\n\t\t\t$notificationsJSON .= json_encode($notification) . \",\";\n\t\t}\n\n\t\t// Remove the final comma (invalid JSON syntax) and add final brace to JSON object\n\t\t$notificationsJSON = substr($notificationsJSON, 0, -1) . \"]\";\n\n\t\tif (self::DEBUG) {\n\t\t\treturn $this->prettyPrintJSON($notificationsJSON);\n\t\t} else {\n\t\t\treturn $notificationsJSON;\n\t\t}\n\t}", "title": "" }, { "docid": "f6c3004491bf5da25aa045337295fcb4", "score": "0.6572308", "text": "public function toArray()\n\t{\n\t\treturn $this->_array;\n\t}", "title": "" }, { "docid": "f7b3b115782b1e414b721f02db17e53d", "score": "0.65720904", "text": "public function toArray($notifiable)\n {\n $dbEmail = $this->emailService->get($this->emailKey);\n\n return [\n 'subject' => $dbEmail->subject,\n 'from' => PortalHelper::name(),\n 'body' => $this->emailService->getRenderedBody($dbEmail->body, [\n 'portalAdmin' => $this->portalAdmin,\n 'company' => $this->company,\n 'styles' => $this->portalAdmin->getNotificationStyles(),\n 'employee' => $this->employee,\n 'permissions' => implode(',', $this->employee->permissions->pluck('label')->toArray()),\n 'operation' => count($this->employee->permissions) > 0 ? 'add' : 'remove'\n ])\n ];\n }", "title": "" }, { "docid": "ad469c92d726f1049b5d592cb97abb58", "score": "0.6570005", "text": "public function toArray($notifiable)\n {\n\n $curation = $this->curation;\n //文本描述\n $message = \"您对题目“{$curation->question->description}”纠错\n 【{$curation->getTypes()[$curation->type]}】已被采纳,\n 恭喜您获得奖励:{$curation->gold_awarded}智慧点\";\n\n $data = [\n 'type' => $curation->getMorphClass(),\n 'id' => $curation->id,\n 'title' => \"题目纠错\", //标题\n 'message' => $message, //通知主体内容\n ];\n\n return $data;\n }", "title": "" }, { "docid": "18975d140468a8a904bdb76c9c0cb484", "score": "0.6569852", "text": "public function toArray($request)\n {\n $notification = app(Notification::class);\n $label = $notification->parse($this);\n\n return [\n \"id\" => $this->id,\n \"logo\" => $this->notifiable->avatar ? asset($this->notifiable->avatar) : asset(\"img/profile_images/default.jpg\"),\n \"url\" => route(\"notifications.read\", ['id' => $this->id]),\n 'label' => $label,\n \"label_strip\" => strip_tags($label),\n 'read' => !is_null($this->read_at),\n 'create_at' => $this->created_at->timestamp\n ];\n }", "title": "" }, { "docid": "f120a7de323e9d2bedf6d113e1dc4849", "score": "0.656776", "text": "public function toArray(): array\n {\n return $this->array;\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "4469a2d036ff0e28924a4be1f962e63e", "score": "0.6566306", "text": "public function toArray($notifiable)\n {\n return [\n //\n ];\n }", "title": "" } ]
91953320fd6da0bcb47a738a38bd5b48
Sends a kill signal to the daemon and deletes the lock file
[ { "docid": "11d4f5d4b698d922b55c048e98fdd5d6", "score": "0.60242593", "text": "public function stop() {\n\t\t$pid = $this->getPidFromPidfile();\n\n\t\tif ($pid === 0) {\n\t\t\tthrow new DaemonException(sprintf(\"pidfile %s does not exist.\\nDaemon not running?\\n\", $this->getPidFilename()));\n\t\t}\n\n\t\tif (!posix_kill($pid, SIGTERM)) {\n\t\t\tthrow new DaemonException('Could not kill daemon process with ID: ' . $pid);\n\t\t} else {\n\t\t\t$this->deletePidFile();\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "5eba4471ebdba85bc45a564837125464", "score": "0.63630015", "text": "public function kill(){}", "title": "" }, { "docid": "5eba4471ebdba85bc45a564837125464", "score": "0.63623077", "text": "public function kill(){}", "title": "" }, { "docid": "5eba4471ebdba85bc45a564837125464", "score": "0.63623077", "text": "public function kill(){}", "title": "" }, { "docid": "4bcb4bb1fc013d508beffc43a47c2ef4", "score": "0.6342773", "text": "public function stop()\n {\n if ($this->isRunning()) {\n $pidFile = $this->getPidFile();\n $stdout = exec(\"start-stop-daemon --stop --oknodo --retry=5 -p \" . escapeshellarg($pidFile));\n if (! $stdout) {\n unlink($pidFile);\n }\n }\n }", "title": "" }, { "docid": "cdd94daa3c73531d7ff52bc3c30e520f", "score": "0.63302004", "text": "public static function kill($pid, $signal_no){}", "title": "" }, { "docid": "63c1ad839110a5b94afc00db2480e90b", "score": "0.6278245", "text": "public function unlock()\n {\n if (file_exists($this->filename)) {\n $lockSaved = (integer) file_get_contents($this->filename);\n if ($lockSaved == getmypid()) {\n unlink($this->filename);\n }\n }\n }", "title": "" }, { "docid": "5890ef26e1846276a4cfdf8dcc5320a4", "score": "0.6267419", "text": "private function registerKillSignal(): void\n {\n $onceReceived = false;\n $handler = function () use (&$onceReceived) {\n if ($onceReceived === true) {\n $this->logger->info('Force exit!');\n exit;\n }\n $onceReceived = true;\n $this->logger->info('Stopping stealer...');\n $this->worker->stop();\n $this->client->stop();\n $this->loop->addPeriodicTimer(1, function () {\n if ($this->worker->isStopped() && $this->client->isStopped()) {\n $this->logger->info('Stealer stopped. Goodbye!');\n exit;\n }\n });\n };\n\n $this->loop->addSignal(SIGINT, $handler);\n $this->loop->addSignal(SIGTERM, $handler);\n $this->loop->addSignal(SIGHUP, $handler);\n }", "title": "" }, { "docid": "850cb24265a8d54e344ffb3b84755022", "score": "0.6080519", "text": "public function releaseDaemon()\n\t{\n\t\t$posixPid = posix_getpid();\n\t\t$this->writeDaemonLog('releaseDaemon called.');\n\n\t\tif ($this->pidFileCreated === true) {\n\t\t\t$pidfileContent = file_get_contents($this->pidFileLocation);\n\t\t\tif ($posixPid == $pidfileContent) {\n\t\t\t\t$this->writeDaemonLog(\n\t\t\t\t\t'releaseDaemon unlinking pidFile! pidfileLocation: %s | Pid is %d.',\n\t\t\t\t\t$this->pidFileLocation,\n\t\t\t\t\t$this->pid\n\t\t\t\t);\n\t\t\t\tunlink($this->pidFileLocation);\n\t\t\t} else {\n\t\t\t\t$this->writeDaemonLog(\n\t\t\t\t\t'releaseDaemon unlinking called, but no pid file was deleted! pidfileLocation: %s | Pid is %d.',\n\t\t\t\t\t$this->pidFileLocation,\n\t\t\t\t\t$this->pid\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "906d7338635285af8b01126212d88fbb", "score": "0.60530424", "text": "public function delete()\n {\n $this->forge->deleteDaemon($this->serverId, $this->id);\n }", "title": "" }, { "docid": "71e3dfbf8235a71b4705b7c1e7c61670", "score": "0.595245", "text": "public function kill_process() {\n\t\tif ( ! $this->is_queue_empty() ) {\n\t\t\t$this->delete_all_batches();\n\t\t\twp_clear_scheduled_hook( $this->cron_hook_identifier );\n\t\t}\n\t}", "title": "" }, { "docid": "73df0a1b2e118004cc6c124bdb162eb0", "score": "0.5926281", "text": "public final function kill(int $signal = 2): void\n {\n\n if ($this->alive()) {\n\n $timeout = new TimeoutInterval();\n do {\n\n posix_kill($this->pid, $signal);\n $killed = posix_getpgid($this->pid) === false;\n if ($timeout->expired()) break;\n\n } while (!$killed);\n\n }\n\n }", "title": "" }, { "docid": "af38a92af72b3db88d65951b678ae83a", "score": "0.5889964", "text": "protected function abort(int $signal = 1): void {\n\t\t$this->deletePid($this->pid);\n\n\t\texit($signal);\n\t}", "title": "" }, { "docid": "6bee8365d1214530b60382f3dcdb723b", "score": "0.583622", "text": "public function kill() {\n\t\treturn $this->signal(SIGKILL);\n\t}", "title": "" }, { "docid": "6bee8365d1214530b60382f3dcdb723b", "score": "0.583622", "text": "public function kill() {\n\t\treturn $this->signal(SIGKILL);\n\t}", "title": "" }, { "docid": "fcf57d94b71e839ee698cfc45752997e", "score": "0.58083004", "text": "public function kill()\n {\n $this->running = false;\n\n foreach ($this->workers as $worker) {\n $worker->kill();\n }\n }", "title": "" }, { "docid": "ecfd84db9ab4aced4e96b4ea92811f14", "score": "0.5805786", "text": "private function delete() {\r\n onapp_debug(__METHOD__);\r\n global $_ALIASES;\r\n $this->ssh_connect ( );\r\n\r\n $this->remove_cronjob( urldecode(onapp_get_arg('cron_job')) );\r\n\r\n $_SESSION['message'] = 'CRON_JOB_HAS_BEEN_DELETED_SUCCESSFULLY';\r\n onapp_redirect( ONAPP_BASE_URL . '/' . $_ALIASES['cron_manager'] );\r\n }", "title": "" }, { "docid": "369c07f9c5a8b19b1444aa41be931421", "score": "0.57503706", "text": "public function delSignal(){}", "title": "" }, { "docid": "0cf162b8b88d3c7b681591fdf151ce84", "score": "0.57498986", "text": "public function shutdownDaemon(){\n socket_write( $this->socket, pack( 'C', 1 ), 1 );\n }", "title": "" }, { "docid": "9642e5f2307344e4e25ca0e9afd2cc04", "score": "0.5740461", "text": "protected function unlock()\n {\n unlink(\n $this->getLockFile()\n );\n }", "title": "" }, { "docid": "7cc7b123af7049c0be7fd32ad47e1278", "score": "0.5693479", "text": "function hosting_queued_stop($signal) {\n watchdog('hosting_queued', 'Received signal @signal, waiting for children to die.', array('@signal' => $signal));\n $status = NULL;\n pcntl_wait($status);\n drush_log('Releasing lock on task queue.');\n lock_release('hosting_queue_tasks_running');\n watchdog('hosting_queued', 'Stopped daemon');\n exit($status);\n}", "title": "" }, { "docid": "136214cf2d8b1390c95740d02be6bb07", "score": "0.5628336", "text": "static function hardExit(){\n\t\tposix_kill(getmypid(), SIGKILL);\n\t\tsleep(1);\n\t\techo \"i must don't be here ever\\n\";\n\t\texit;\n\t}", "title": "" }, { "docid": "45ee07286181ad940f5bc794058f054d", "score": "0.5626576", "text": "public static function stop(){\n shell_exec('kill -9 ' . Self::get_pid());\n }", "title": "" }, { "docid": "585e9f45cfc71e46daa9b29a7c87fae5", "score": "0.5594831", "text": "public static function kill($script) {\n $path = self::getLockForScript($script);\n if (!file_exists($path)) {\n return false;\n }\n\n if (!self::isRunning($script)) {\n return false;\n }\n\n if ($lock = fopen($path, 'c+')) {\n $killCmd = \"pgrep -f 'app/console/$script' | xargs kill\";\n shell_exec($killCmd);\n\n fclose($lock);\n\n // will return true on success, false on failure\n return unlink($path);\n }\n }", "title": "" }, { "docid": "f4330f81779920ffd1d840e7cb5e9639", "score": "0.55838877", "text": "abstract public function _oKill();", "title": "" }, { "docid": "610304925da5fb8c0513d6a4f1a14e78", "score": "0.55732685", "text": "private static function stopServer($pidfile) {\n if (file_exists($pidfile)) {\n $pids = file($pidfile);\n foreach ($pids as $pid) {\n shell_exec('kill -9 ' . $pid);\n }\n unlink($pidfile);\n }\n unlink('server_out.txt');\n }", "title": "" }, { "docid": "fb5514bd25d28a947f571cf8c266bb6c", "score": "0.5551053", "text": "public function reaper() {\n foreach($this->pids as $uuid => $pid) {\n $result = pcntl_waitpid($pid, $status, WNOHANG);\n if($result == $pid) {\n\t$status = pcntl_wexitstatus($status);\n\tif($status != 0) {\n\t print \"$uuid exited with status $status.\\n\";\n\t}\n\tMemcacheSingleton::get()->delete(\"KILL-$uuid\");\n\tunset($this->pids[$uuid]);\n\t$this->progressMonitor->remove($uuid);\n }\n }\n }", "title": "" }, { "docid": "5415c1ad2a045b833b25fb5a3a770557", "score": "0.5548428", "text": "public static function clearLock()\r\n\t{\r\n\t\tif(self::$_lockhandle !== null)\r\n\t\t{\r\n\t\t\t@fclose(self::$_lockhandle);\r\n\t\t\tself::$_lockhandle = null;\r\n\t\t}\r\n\r\n\t\t@unlink(self::getLockFilename());\r\n\t\tself::$_locked = false;\r\n\t}", "title": "" }, { "docid": "b3c3836904adb3a19e17eebfd7400f8d", "score": "0.55406046", "text": "protected function _killPid($pid_file)\n {\n if (file_exists($pid_file))\n {\n $pid = file_get_contents($pid_file);\n\n $cmd = \\App\\Utilities::run_command('kill -9 '.$pid);\n\n if (!empty($cmd['output']))\n $this->log($cmd['output']);\n\n if (!empty($cmd['error']))\n $this->log($cmd['error'], 'red');\n\n @unlink($pid_file);\n }\n else\n {\n $this->log('No PID file found.');\n }\n }", "title": "" }, { "docid": "26a670667d2fd88093010cf38663f86f", "score": "0.55393046", "text": "function kill_plugin() {\n\t}", "title": "" }, { "docid": "257e22e5394eeecb97486f989e6a136c", "score": "0.5485261", "text": "public function kill($pid, $forcefully = false);", "title": "" }, { "docid": "5571745a0709f260416c2ce577e376b0", "score": "0.54793835", "text": "private function killExistingFpm(): void\n {\n // Never seen this happen but just in case\n if (! file_exists(self::PID_FILE)) {\n unlink(self::SOCKET);\n return;\n }\n\n $pid = (int) file_get_contents(self::PID_FILE);\n\n // Never seen this happen but just in case\n if ($pid <= 0) {\n echo \"PHP-FPM's PID file contained an invalid PID, assuming PHP-FPM isn't running.\\n\";\n unlink(self::SOCKET);\n unlink(self::PID_FILE);\n return;\n }\n\n // Check if the process is running\n if (posix_getpgid($pid) === false) {\n // PHP-FPM is not running anymore, we can cleanup\n unlink(self::SOCKET);\n unlink(self::PID_FILE);\n return;\n }\n\n // The PID could be reused by our new process: let's not kill ourselves\n // See https://github.com/brefphp/bref/pull/645\n if ($pid === posix_getpid()) {\n unlink(self::SOCKET);\n unlink(self::PID_FILE);\n return;\n }\n\n echo \"PHP-FPM seems to be running already. This might be because Lambda stopped the bootstrap process but didn't leave us an opportunity to stop PHP-FPM (did Lambda timeout?). Stopping PHP-FPM now to restart from a blank slate.\\n\";\n\n // The previous PHP-FPM process is running, let's try to kill it properly\n $result = posix_kill($pid, self::SIGTERM);\n if ($result === false) {\n echo \"PHP-FPM's PID file contained a PID that doesn't exist, assuming PHP-FPM isn't running.\\n\";\n unlink(self::SOCKET);\n unlink(self::PID_FILE);\n return;\n }\n $this->waitUntilStopped($pid);\n unlink(self::SOCKET);\n unlink(self::PID_FILE);\n }", "title": "" }, { "docid": "06de32ef5d8f17e417b3bf7b52ed86c3", "score": "0.54708856", "text": "public function removePIDFile()\n {\n $files = new Filesystem();\n\n $pidFile = TMP . '/' . sprintf('%u', crc32($this)) . '.pid';\n\n if ($files->exists($pidFile)) {\n $files->delete($pidFile);\n }\n\n }", "title": "" }, { "docid": "55179044435c2fe16b8fcf8b07a74197", "score": "0.5444646", "text": "function stop_dpinger($gwname = '') {\n\tglobal $g;\n\n\t$running_processes = running_dpinger_processes();\n\n\tforeach ($running_processes as $running_gwname => $process) {\n\t\tif ($gwname != '' && $running_gwname != $gwname) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (isvalidpid($process['pidfile'])) {\n\t\t\tkillbypid($process['pidfile']);\n\t\t} else {\n\t\t\t@unlink($process['pidfile']);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "1689f726cc751c90b0f3a1f0156f5247", "score": "0.5422622", "text": "public function kill(): void\n {\n $this->state = self::DEAD;\n }", "title": "" }, { "docid": "4d4dcdaead57d8a57efbce34c1ef6ade", "score": "0.54193103", "text": "private function stopInstances($filename)\n {\n if (file_exists($filename)) {\n $content = explode(PHP_EOL, file_get_contents($filename));\n\n if (count($content)) {\n foreach ($content as $pid) {\n $pid = (int) trim($pid);\n\n posix_kill($pid, 9);\n }\n }\n unlink($filename);\n }\n }", "title": "" }, { "docid": "e78c96e64bc0df2fceb5101f5914f0bc", "score": "0.5416705", "text": "public function hookCron() {\n FileSystem::instance()->deleteOld();\n }", "title": "" }, { "docid": "c7220d7cd5d9e0327ce5c1a245f73ea9", "score": "0.53894246", "text": "protected function sigint() {\n\t\tif (Daemon::$config->logsignals->value) {\n\t\t\t$this->log('caught SIGINT.');\n\t\t}\n\n\t\t$this->shutdown(TRUE);\n\t}", "title": "" }, { "docid": "792c106f816461fbc0c895534ce8810e", "score": "0.5387517", "text": "function killProcess(string $id) : void;", "title": "" }, { "docid": "4bf06e885e1dfb9349d4cddccea1a8b4", "score": "0.5372152", "text": "protected function handleSignalTerm() {\n\t\t//terminated\n\t\t$this->isRunning = false;\n\t}", "title": "" }, { "docid": "df6e17fd89e90c0760cb3e943640115c", "score": "0.535989", "text": "public function unlock();", "title": "" }, { "docid": "df6e17fd89e90c0760cb3e943640115c", "score": "0.53591", "text": "public function unlock();", "title": "" }, { "docid": "df6e17fd89e90c0760cb3e943640115c", "score": "0.53591", "text": "public function unlock();", "title": "" }, { "docid": "6c2fb756a0cca8e02edb66cbe5edb4f7", "score": "0.53511643", "text": "function kadm5_destroy($handle){}", "title": "" }, { "docid": "ce05c5545fd23ca35124f3e0df591fb8", "score": "0.53210115", "text": "public function OnSignalTerminate() {\n }", "title": "" }, { "docid": "c7132d97ab36729d177e9bcc09dbdd4f", "score": "0.5318134", "text": "protected static function destroyServer()\n {\n if (static::$server) {\n posix_kill(static::$server['pid'], 9);\n static::$server = null;\n static::$fingerprint = null;\n }\n }", "title": "" }, { "docid": "1c825e5bb0741ea4369056c6eccd8433", "score": "0.52846164", "text": "public static function del($fd){}", "title": "" }, { "docid": "426a59256430587c1203342c44653b31", "score": "0.5255507", "text": "public function kill(string $name): void;", "title": "" }, { "docid": "16d2948cd18bc907c6588d9054526c02", "score": "0.5238714", "text": "public static function signalHandler(int $signal)\n {\n if( $signal==SIGTERM )\n {\n self::$isTerminate = true;\n }\n else if($signal==SIGALRM)\n {\n static::_resetLogFile();\n pcntl_alarm(static::SIZE_CHECK_PERIOD);\n }\n }", "title": "" }, { "docid": "a33acb94e242c917bd3460200f2044ef", "score": "0.5236158", "text": "function unlock_process($fp)\n{\n\t@flock($fp, LOCK_UN);\n\t@fclose($fp);\n}", "title": "" }, { "docid": "d228077c70e11d35e567e16f3828c9c3", "score": "0.5220235", "text": "function softUnlock() {\n global $lockFilename;\n if (file_exists($lockFilename)) {\n unlink($lockFilename);\n }\n}", "title": "" }, { "docid": "2877c46cd40ba85b1e9fd84d8a79544a", "score": "0.51994395", "text": "protected function sigterm() {\n\t\tif (Daemon::$config->logsignals->value) {\n\t\t\t$this->log('caught SIGTERM.');\n\t\t}\n\n\t\t$this->shutdown();\n\t}", "title": "" }, { "docid": "0b6df3901fb9578f6c6fb435dbdb2d45", "score": "0.5198614", "text": "function KillSession() {\n $this->KillSessionFile();\n $this->KillSessionCookie();\n }", "title": "" }, { "docid": "98e89857f59fbf26c45f29968bf60b7f", "score": "0.51970613", "text": "public function handle()\n {\n $nb = Activity::purge();\n $this->info(\"$nb logs have been deleted\");\n }", "title": "" }, { "docid": "2bafb5a1cd7ef8bff605b48e0071b2ec", "score": "0.5190491", "text": "public function terminate();", "title": "" }, { "docid": "2bafb5a1cd7ef8bff605b48e0071b2ec", "score": "0.5190491", "text": "public function terminate();", "title": "" }, { "docid": "2bafb5a1cd7ef8bff605b48e0071b2ec", "score": "0.5190491", "text": "public function terminate();", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.51525867", "text": "public function purge();", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.51525867", "text": "public function purge();", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.51525867", "text": "public function purge();", "title": "" }, { "docid": "57e2c08157507dced86f581b4d485f48", "score": "0.51525867", "text": "public function purge();", "title": "" }, { "docid": "ed8dfc6092e2b922c4cc021459b4b406", "score": "0.51446134", "text": "public function cancelOperation() {\n printf(\"Cancelling...\\n\");\n $this->_cancelled = true;\n posix_kill($this->_pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "title": "" }, { "docid": "85f5514bec2a9000c455fe06e534b205", "score": "0.51230097", "text": "public final function delete() {\n unlink($this->_file);\n }", "title": "" }, { "docid": "4275da8e8ca01f92657ee1baaaacb51c", "score": "0.5106631", "text": "private static function _setSignalHandler()\n {\n pcntl_signal(SIGALRM, array(__CLASS__, \"signalHandler\"),false);\n pcntl_signal(SIGTERM, array(__CLASS__, \"signalHandler\"),false);\n\n pcntl_signal(SIGCHLD, SIG_IGN,false);\n pcntl_signal(SIGQUIT, SIG_IGN,false);\n }", "title": "" }, { "docid": "37983dbcc2fe1b6f01374c375ed66428", "score": "0.51036537", "text": "public function SCRIPT_KILL() {\n\t\treturn $this->_send ( array (\n\t\t\t\t'SCRIPT',\n\t\t\t\t'KILL' \n\t\t) );\n\t}", "title": "" }, { "docid": "eadb364878c8af47bb4b0b8378ae867a", "score": "0.509753", "text": "public function delete()\n {\n parent::delete();\n\n $this->job->delete();\n\n // $this->database->deleteReserved($this->queue, $this->getJobId());\n }", "title": "" }, { "docid": "7a6bd72adaa0c9c5b90937994adce962", "score": "0.5073366", "text": "public function __destruct() {\n\t\tif ($this->cleanup && file_exists($this->getLocalPath())) {\n\t\t\t$process = new Process(sprintf('rm -rf %s', escapeshellarg($this->getLocalPath())));\n\t\t\t$process->run();\n\t\t}\n\t}", "title": "" }, { "docid": "d1b5f56ae9d59dc7794fca71cbb8a728", "score": "0.5069656", "text": "public function clean_cron_cache()\n {\n $outputs = array();\n $clearfile = RUNTIME_PATH . 'cron.lock';\n $outputs[] = @unlink($clearfile);\n $clearfile = RUNTIME_PATH . '~crons.php';\n $outputs[] = @unlink($clearfile);\n $this->format_output($outputs);\n }", "title": "" }, { "docid": "da5141a1291f59093789ddf7e9f1b190", "score": "0.50681233", "text": "private function closeFile(): void\n {\n if ($this->handle && ! fclose($this->handle)) {\n throw new RuntimeException('Error closing lock file');\n }\n $this->handle = null;\n }", "title": "" }, { "docid": "de15f719a9b65e7300a35ce44da22fe7", "score": "0.50522524", "text": "public function destroy() {\n\n\t \t\t $this->clear();\n\t \t\t if(file_exists(self::getAppTempFile()))\n\t \t\t unlink(self::getAppTempFile());\n\t }", "title": "" }, { "docid": "80d750701578f94816e8d064e8b9b07e", "score": "0.50497484", "text": "public function instance_deleted() {\n $this->purge();\n $this->redis->close();\n unset($this->redis);\n }", "title": "" }, { "docid": "c2ae6409145cb9a524b3fa314591d699", "score": "0.50454956", "text": "public function release () {\n\n if ($this->_isFileHandleOpen()) {\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->_unlockFileHandle();\n\n // We must clear cache for isFileHandleLinked()\n clearstatcache();\n\n // Try to obtain write lock to unlink the file\n /** @noinspection PhpUnhandledExceptionInspection */\n if ( $this->_isFileHandleLinked() && $this->_internalLockFileHandle(LOCK_EX|LOCK_NB) ) {\n\n // We must clear cache for lockFileExists() and isFileHandleLinked()\n clearstatcache();\n\n // Check if another process managed to get a lock while we were locking and removed the lock file...\n // Check if another process managed to create a new different lock file with same name...\n /** @noinspection PhpUnhandledExceptionInspection */\n if ( $this->_lockFileExists() && $this->_isFileHandleLinked() ) {\n\n $this->_removeLinkFile();\n\n }\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->_unlockFileHandle();\n\n }\n\n }\n\n $this->_closeFileHandle();\n\n }", "title": "" }, { "docid": "db5cf1fecdd888e80bb2956a3230e065", "score": "0.5024973", "text": "protected function delete()\n\t{\n\t\t$this->apc->forget($this->session['id']);\n\t}", "title": "" }, { "docid": "d197d140cd79a9aeb8aee733c703a8e2", "score": "0.5011558", "text": "public function stop() {\n if ($this->isBusy()) {\n posix_kill($this->workPid, \\SIGKILL);\n $this->getWorkState(true);\n }\n }", "title": "" }, { "docid": "e6f460d2d90e53fcd2e452f23c9af00e", "score": "0.5007719", "text": "public function delete()\n\t{\n\t\t// Delete the instance\n\t\t_MyCache::delete($this->getServer(), $this->generateKey());\n\t}", "title": "" }, { "docid": "c9549b20ec427f10205215211741b98e", "score": "0.5007215", "text": "protected function cleanZombieProcesses() {\n\n /*\n * get array of started and running pids\n */\n $runningWorkersList = array();\n $startedWorkersList = array();\n\n $runningWorkers = $this->redis->keys(\"clickabilly:crawler:worker:running*\");\n $startedWorkers = $this->redis->keys(\"clickabilly:crawler:worker:started*\");\n\n foreach($runningWorkers as $item) { $runningWorkers = explode(\":\",$item); $runningWorkersList[] += $runningWorkers[4]; }\n foreach($startedWorkers as $item) { $startedWorkers = explode(\":\",$item); $startedWorkersList[] += $startedWorkers[4]; }\n\n /*\n * kill pids that are started but not running\n */\n foreach($startedWorkersList as $startedProcessId) {\n if (! in_array($startedProcessId,$runningWorkersList) && $startedProcessId > 0) {\n cb_log(\"CrawlerServer:cleanZombieProcesses(): shutting down pid \". $startedProcessId);\n posix_kill($startedProcessId, 9);\n $this->redis->del(\"clickabilly:crawler:worker:started:$startedProcessId\");\n }\n }\n }", "title": "" }, { "docid": "c7e5340c78c6c1cf0ce25bb200540a36", "score": "0.500013", "text": "public function kill_jobs() {\n\t\tas_unschedule_all_actions( 'rank_math/analytics/get_console_data' );\n\t}", "title": "" }, { "docid": "7f37afe67486165a3221e1617345b25f", "score": "0.49957338", "text": "public function handle()\n {\n $days = intval($this->argument('days'));\n $time = strtotime(Carbon::now()->subDays($days)->format('Y-m-d H:i:s'));\n $this->comment('Limpando as sessions com mais de ' . $days);\n\n if (config('session.driver') == 'file') {\n $files = File::allFiles(config('session.files'));\n foreach ($files as $file)\n {\n $filename = (string)$file;\n if(filemtime($filename) <= $time) {\n unlink($filename);\n }\n }\n }\n\n if (config('session.driver') == 'database') {\n DB::table('sessions')->where('last_activity', '<=', $time)->delete();\n }\n }", "title": "" }, { "docid": "c989dc3cee3afd6b26dcdb5c6022a257", "score": "0.49853188", "text": "public function cleanup()\n {\n $this->stop();\n if (null !== $this->workDir) {\n $this->sfk->cleanDir($this->workDir);\n rmdir($this->workDir);\n $this->workDir = null;\n }\n }", "title": "" }, { "docid": "2bfb0ea583b5053c029556d628db3199", "score": "0.4981524", "text": "protected function handleSignalInt() {\n\t\t//ctrl-c\n\t\t$this->isRunning = false;\n\t}", "title": "" }, { "docid": "1f6ee8a3f4799ff05375beb2e2f22cae", "score": "0.4969995", "text": "public function unlock()\n {\n if ($this->handle !== null)\n {\n // note: fclose() also releases the lock\n fclose($this->handle);\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "bb09446f483d6e2c93af0bbcbd35b484", "score": "0.4960687", "text": "private function release(): void\n {\n try {\n deleteFile($this->fileName);\n } catch (\\Throwable $exception) {\n throw new SyncException(\n 'Failed to unlock the mutex file: ' . $this->fileName,\n 0,\n $exception\n );\n }\n }", "title": "" }, { "docid": "2befb67ae0aa29e266559e77eeb521e9", "score": "0.495852", "text": "public function uninstall() {\n\n // Clear cron job\n $this->clear_cron_job();\n\n }", "title": "" }, { "docid": "2de241a3ab7390911d87ac6dd8d9d255", "score": "0.49529785", "text": "public function handle() {\n Task::inTrashBin()\n ->where(\"deleted_at\", \"<\", Carbon::now()->subDays(30))\n ->forceDelete();\n }", "title": "" }, { "docid": "9c7c1fb5119bcb0d1c93e8bf9244ee1e", "score": "0.49528185", "text": "public function kill($message)\n\t{\n\t\t$this->event->fire('line', '<fg=red>'.$message.'</fg=red>');\n\n\t\texit(1);\n\t}", "title": "" }, { "docid": "67b2ed33c417aec15bdaae754727176c", "score": "0.49453756", "text": "public function garbage_collect() {\n $this->_delete_file($this->_cache_dir, TRUE, FALSE, TRUE);\n return;\n }", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49358433", "text": "public function unlock(){}", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49358433", "text": "public function unlock(){}", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49358433", "text": "public function unlock(){}", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49358433", "text": "public function unlock(){}", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49337217", "text": "public function unlock(){}", "title": "" }, { "docid": "6f6d9c61b9456f002d12325dda52d7b5", "score": "0.49337217", "text": "public function unlock(){}", "title": "" }, { "docid": "f0604a31218627531281c6924b5b17fb", "score": "0.4933536", "text": "function __destruct()\n {\n if ($this->dh !== false) {\n closedir($this->dh);\n $this->dh = false;\n }\n }", "title": "" }, { "docid": "6c075f4bb455eba83c1f535a70757427", "score": "0.49326134", "text": "public static function deleteOrphanPidFiles() {\n $storedPids = self::getStoredPids();\n $runningPids = self::getRunningPids();\n\n foreach ($storedPids as $siteName => $storedPid) {\n if ( ! in_array($storedPid, $runningPids)) {\n unlink(APP_PATH . \"/run/{$siteName}.pid\");\n }\n }\n }", "title": "" }, { "docid": "c5a52f579290f24a494ada9ddf067a60", "score": "0.4929189", "text": "protected function terminate(){\n }", "title": "" }, { "docid": "551e28e83f76b83955643ec924c57a4d", "score": "0.49286473", "text": "public function handle()\n {\n $files = File::files(public_path(env('UPLOAD_TMP_PATH')));\n\n $file_paths = [];\n\n foreach ($files as $file) {\n if ($file->getMTime() + 1800 < time()) {\n $file_paths[] = $file->getRealPath();\n }\n }\n\n $file_paths && File::delete($file_paths);\n }", "title": "" }, { "docid": "f9b744f6aa0aa96e425191adc69eb871", "score": "0.4915642", "text": "public function handle()\n {\n $path = (public_path('storage\\zip\\temp\\\\'));\n $filelastmodified = filemtime($path);\n if ($handle = opendir($path)) {\n while (false !== ($file = readdir($handle))) {\n if($file == '.' or $file == '..')\n {\n continue;\n }\n $filelastmodified = filemtime($path . $file);\n if((time() - $filelastmodified) > 14400)\n {\n File::deleteDirectory($path . $file);\n }\n }\n closedir($handle);\n }\n\n $this->info('Hourly Update has been performed successfully');\n }", "title": "" }, { "docid": "bb126a6b3575ace5ee4ae93e288a398e", "score": "0.49145326", "text": "function proc_terminate($process, int $signal = 15): bool {}", "title": "" }, { "docid": "95ec5dfea60b4f3893eec58574190ea4", "score": "0.491342", "text": "private function deleteCache()\n {\n (new Filesystem())->remove($this->getCacheDir());\n }", "title": "" }, { "docid": "a3e86c9529b97591881f1f4840f9c2d8", "score": "0.49127328", "text": "public function sigquit() {\n\t\tif (Daemon::$config->logsignals->value) {\n\t\t\t$this->log('caught SIGQUIT.');\n\t\t}\n\n\t\tparent::sigquit();\n\t}", "title": "" }, { "docid": "279fd0a9597147c3ff992fa5f0374dac", "score": "0.49110648", "text": "protected function _deleteCook() {\n\t\tsetcookie(MVR_COOKIE_NAME,0);\n\t}", "title": "" } ]
670d35cd2357d9de1708c5f19cfb761c
You can call this operation to obtain a playback credential when you use ApsaraVideo Player SDK to play a media file based on PlayAuth. The credential is used to obtain the playback URL. You cannot obtain the playback URL of a video by using a credential that has expired. A new credential is required. QPS limit You can call this operation up to 360 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see [QPS limit on API operations](~~342790~~).
[ { "docid": "206c53235a0070877a129f7a06c2f9c6", "score": "0.5284718", "text": "public function getVideoPlayAuth($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->getVideoPlayAuthWithOptions($request, $runtime);\n }", "title": "" } ]
[ { "docid": "b3eba01eb2d9e85c20ecaa1adf0cf91e", "score": "0.5223624", "text": "public function getVideoPlayAuthWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->apiVersion)) {\n $query['ApiVersion'] = $request->apiVersion;\n }\n if (!Utils::isUnset($request->authInfoTimeout)) {\n $query['AuthInfoTimeout'] = $request->authInfoTimeout;\n }\n if (!Utils::isUnset($request->videoId)) {\n $query['VideoId'] = $request->videoId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'GetVideoPlayAuth',\n 'version' => '2017-03-21',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return GetVideoPlayAuthResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "07e9513c5917c412e2edebd9a71ca136", "score": "0.4678268", "text": "public function getPlayInfo()\n {\n return $this->callGet('getPlayInfo');\n }", "title": "" }, { "docid": "e8456933475dba17eabf301a0fe18463", "score": "0.46376643", "text": "public function getCredential();", "title": "" }, { "docid": "8591aaaeb785035e1b535e4608cf9252", "score": "0.46146268", "text": "public function getCredential()\n {\n return $this->credential;\n }", "title": "" }, { "docid": "8591aaaeb785035e1b535e4608cf9252", "score": "0.46146268", "text": "public function getCredential()\n {\n return $this->credential;\n }", "title": "" }, { "docid": "14b2c06cc1d8c3d2bc4b51dd4e82b181", "score": "0.44598007", "text": "private function setCredentials()\n\t{\n\t\t$this->credentials['api_key'] = $this->settings_repo->getSiteSetting('youtube', 'api_key');\n\t}", "title": "" }, { "docid": "8c0f80f15fecaa7acd48ff2e25239188", "score": "0.44129905", "text": "public function playlistAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info from url\n $id = $this->params('id');\n $module = $this->params('module');\n\n // Get config\n $config = Pi::service('registry')->config->read($module);\n\n // Check sale video active\n if ($config['sale_video'] != 'single') {\n $this->getResponse()->setStatusCode(403);\n $this->terminate(__('Sale video option not enable !'), '', 'error-denied');\n $this->view()->setLayout('layout-simple');\n return;\n }\n\n $playlist = Pi::api('playlist', 'video')->getPlaylist($id);\n\n // Check video\n if (!$playlist || $playlist['status'] != 1) {\n $this->jump(['', 'module' => $module, 'controller' => 'index'], __('The playlist not found.'), 'error');\n }\n\n // Set single product\n $service = [\n 'product' => $playlist['id'],\n 'product_price' => $playlist['sale_price'],\n 'discount_price' => 0,\n 'shipping_price' => 0,\n 'packing_price' => 0,\n 'vat_price' => 0,\n 'number' => 1,\n 'title' => $playlist['title'],\n 'extra' => json_encode(\n [\n 'type_payment' => 'onetime',\n 'video_id' => 0,\n 'list_id' => $playlist['id'],\n ]\n ),\n ];\n\n // Set order array\n $order = [\n 'module_name' => $module,\n 'module_table' => 'playlist',\n 'type_payment' => 'onetime',\n 'type_commodity' => 'service',\n 'total_discount' => 0,\n 'total_shipping' => 0,\n 'total_packing' => 0,\n 'total_setup' => 0,\n 'total_vat' => 0,\n 'can_pay' => 1,\n 'product' => [\n $playlist['id'] => $service,\n ],\n ];\n\n\n // Set and go to order\n $url = Pi::api('order', 'order')->setOrderInfo($order);\n Pi::service('url')->redirect($url);\n }", "title": "" }, { "docid": "d8bc83d8726a9d688c6d675c71340777", "score": "0.43778026", "text": "function pakplayer_embed_src($vdetails)\r\n\t{\t\r\n\t\t$config = urlencode(BASEURL.\"/player/pak_player/embed_player.php?vid=\".$vdetails['videoid'].\"&json=true&autoplay=\".config('autoplay_embed'));\r\n\t\tif(!config('pak_license'))\r\n\t\t\t$embed_src = BASEURL.'/player/pak_player/pakplayer.swf?config='.$config;\r\n\t\telse\r\n\t\t\t$embed_src = BASEURL.'/player/pak_player/pakplayer.unlimited.swf?config='.$config;\r\n\t\t\r\n\t\tif(function_exists('get_refer_url_from_embed_code'))\r\n\t\t{\r\n\t\t\t$ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code'])));\r\n\t\t\t$ytcode = $ref_details['ytcode'];\r\n\t\t}\r\n\t\t\r\n\t\tif(!$vdetails['embed_code'] || $vdetails['embed_code'] =='none'|| $ytcode)\r\n\t\t{\r\n\t\t\t$code = '<embed src=\"'.$embed_src.'\" type=\"application/x-shockwave-flash\"';\r\n\t\t\t$code .= 'allowscriptaccess=\"always\" allowfullscreen=\"true\" ';\r\n\t\t\t$code .= 'width=\"'.config(\"embed_player_width\").'\" height=\"'.config(\"embed_player_height\").'\"></embed>';\r\n\t\t\treturn $code;\r\n\t\t}else\r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "7a33463b43677bde9f4f1a8be4bc3621", "score": "0.43712807", "text": "public function testPlayVideoUser() {\n $user = factory(User::class)->create();\n\n $location = factory(Location::class)->create();\n\n $video = factory(Video::class)->create(['location_id' => $location->id]);\n\n $role = Role::where('name', 'video-player')->first();\n\n $user->roles()->attach($role);\n\n $this->actingAs($user)\n ->get('/video')\n ->assertStatus(200);\n\n // not accessible URL\n $this->actingAs($user)\n ->get('/video/create')\n ->assertStatus(403);\n\n // Edit video\n $this->actingAs($user)\n ->get('/video/' . $video->id . '/edit')\n ->assertStatus(403);\n\n // Show video\n $this->actingAs($user)\n ->get('/video/' . $video->id)\n ->assertStatus(200);\n\n // Delete Video\n $this->actingAs($user)\n ->get('/video/' . $video->id . '/confirm')\n ->assertStatus(403);\n $this->actingAs($user)\n ->delete('/video/' . $video->id)\n ->assertStatus(403);\n }", "title": "" }, { "docid": "75337bb6159d779205404b0f1082ee01", "score": "0.43661317", "text": "function pak_player($in)\r\n\t{\r\n\t\tglobal $pak_player;\r\n\t\t$pak_player = true;\r\n\t\t\r\n\t\t$vdetails = $in['vdetails'];\r\n\t\t$vid_file = get_video_file($vdetails,true,true);\r\n\t\t//Checking for YT Referal\r\n\t\r\n\r\n\t\tif(function_exists('get_refer_url_from_embed_code'))\r\n\t\t{\r\n\t\t\t$ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code'])));\r\n\t\t\t$ytcode = $ref_details['ytcode'];\r\n\t\t}\r\n\t\t\r\n\t\tif($vid_file || $ytcode)\r\n\t\t{\r\n\t\t\t$hd = $data['hq'];\r\n\t\t\t\r\n\t\t\tif($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_video_file($vdetails,true,true);\r\n\t\t\t$hd_file = get_hq_video_file($vdetails);\r\n\t\t\t\r\n\t\t\tif($ytcode)\r\n\t\t\t{\r\n\t\t\t\tassign('youtube',true);\r\n\t\t\t\tassign('ytcode',$ytcode);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!strstr($in['width'],\"\\%\"))\r\n\t\t\t\t$in['width'] = $in['width'].'px';\r\n\t\t\tif(!strstr($in['height'],\"\\%\"))\r\n\t\t\t\t$in['height'] = $in['height'].'px';\r\n\t\t\r\n\t\t\tif($in['autoplay'] =='yes' || $in['autoplay']===true || ($_COOKIE['auto_play_playlist'] && $_GET['playlist']))\r\n\t\t\t{\r\n\t\t\t\t$in['autoplay'] = true;\r\n\t\t\t}else{\r\n\t\t\t\t$in['autoplay'] = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Logo Placement\r\n\t\t\t$placement = config('logo_placement');\r\n\t\t\tswitch($placement)\r\n\t\t\t{\r\n\t\t\t\tcase \"tl\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','top:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"tr\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','top:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"br\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','bottom:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"bl\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','bottom:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tassign('player_data',$in);\r\n\t\t\tassign('player_logo',website_logo());\r\n\t\t\tassign('normal_vid_file',$vid_file);\r\n\t\t\tassign(\"hq_vid_file\",$hd_file);\t\t\t\r\n\t\t\tassign('vdata',$vdetails);\r\n\t\t\tassign('pakplayer','yes');\r\n\t\t\tassign('updateEmbedCode','updateEmbedCode');\r\n\t\t\tTemplate(PAK_PLAYER_DIR.'/player.html',false);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b18a2592fa03aabed548d985aa4cc202", "score": "0.43582594", "text": "public function playlist()\n {\n return $this->getPackage()->playlistOfPlayer($this->id);\n }", "title": "" }, { "docid": "97ab253aa2c83d95dd538cb8c447dbeb", "score": "0.43417904", "text": "public function getCredentials()\r\r\n {\r\r\n return $this->credentials;\r\r\n }", "title": "" }, { "docid": "c9813de57f8288975488dd1cb500046b", "score": "0.43099868", "text": "public function sp_get_sample_cloud_videosDetails( $media_id = null )\n {\n $result = array( );\n try {\n if ( !empty( $media_id ) ) {\n $res = $this->cloudkey->media->info( array(\n 'fields' => array(\n 'id',\n 'created',\n 'assets.jpeg_thumbnail_source.stream_url' \n ),\n 'id' => $media_id \n ) );\n \n $expires = time() + 3600 * 24 * 7;\n $embed_url = $this->cloudkey->media->get_embed_url( array(\n 'id' => $media_id,\n 'expires' => $expires \n ) );\n $metadata = $this->cloudkey->media->get_meta( array(\n 'id' => $media_id \n ) );\n \n $result['media_id'] = $media_id;\n $result['embed_url'] = !empty( $embed_url ) ? $embed_url : null;\n $result['stream_url'] = !empty( $res->assets->jpeg_thumbnail_source->stream_url ) ? $res->assets->jpeg_thumbnail_source->stream_url : null;\n \n if ( isset( $metadata ) && !empty( $metadata ) ) {\n foreach ( $metadata as $key => $val ) {\n if ( !in_array( $key, array(\n 'sharing_key',\n 'explicit',\n 'channel',\n 'author' \n ) ) ) {\n $result['meta'][$key] = $val;\n }\n }\n }\n return $result;\n } else {\n \n }\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.cloud.php function name sp_get_sample_cloud_videosDetails', 'phparray', $e->getLine(), $e->getFile() );\n }\n }", "title": "" }, { "docid": "a1f78c36dccec8e513fb1d937a7e3aee", "score": "0.43066144", "text": "public function getVideo_followed($limit = -1, $offset = 0, $authKey, $code, $returnTotal = false)\n {\n global $twitch_configuration;\n \n $requiredAuth = 'user_read';\n $functionName = 'GET_VIDEO-FOLLOWED';\n \n $this->generateOutput($functionName, 'Grabbing all video objects for the channels using the code: ' . $code, 1);\n \n // We were supplied an OAuth token. check it for validity and scopes\n if (($authKey != null || '') || ($code != null || false))\n {\n if ($authKey != null || '')\n {\n $check = $this->checkToken($authKey);\n \n if ($check[\"token\"] != false)\n {\n $auth = $check;\n } else { // attempt to generate one\n if ($code != null || '')\n {\n $auth = $this->generateToken($code); // Assume generation and check later for failure\n } else {\n $this->generateError(400, 'Existing token expired and no code available for generation.');\n }\n }\n } else { // Assume the code was given instead and generate if we can\n $auth = $this->generateToken($code); // Assume generation and check later for failure\n }\n \n // check to see if we recieved a token after all of that checking\n if ($auth['token'] == false) // check the token value\n {\n $this->generateError(400, 'Auth key not returned, exiting function: ' . $functionName);\n \n return; // return out after the error is passed\n }\n \n $authSuccessful = false;\n \n // Check the array of scopes\n foreach ($auth['scopes'] as $type)\n {\n if ($type == $requiredAuth)\n {\n // We found the scope, we are good then\n $authSuccessful = true;\n break;\n }\n }\n \n // Did we fail?\n if (!$authSuccessful)\n {\n $this->generateError(403, 'Authentication token failed to have permissions for ' . $functionName . '; required Auth: ' . $requiredAuth);\n return null;\n }\n \n // Assign our key\n $this->generateOutput($functionName, 'Required scope found in array', 3);\n $authKey = $auth['token'];\n }\n \n // Init some vars \n $videosObject = array(); \n $videos = array();\n $url = 'https://api.twitch.tv/kraken/videos/followed';\n $options = array();\n \n // Check if we are returning a total and if we are in a limitless return (We can just count at that point and we will always have the correct number)\n $returningTotal = (($limit != -1) || ($offset != 0)) ? $returnTotal : false;\n \n // Build our cURL query and store the array\n $videos = $this->get_iterated($functionName, $url, $options, $limit, $offset, 'videos', $authKey, null, null, null, null, null, null, null, null, $returningTotal);\n \n // Include the total if we were asked to return it (In limitless cases))\n if ($returnTotal && ($limit == -1) && ($offset == 0))\n {\n $this->generateOutput($functionName, 'Including _total as the count of all object', 3);\n $videosObject['_total'] = count($videos);\n }\n \n // Set our keys\n foreach ($videos as $k => $video)\n {\n if ($k == '_total')\n {\n $this->generateOutput($functionName, 'Setting key: ' . $k, 3);\n $videosObject[$k] = $video;\n continue;\n }\n \n $key = $video['_id'];\n $videosObject[$key] = $video;\n $this->generateOutput($functionName, 'Setting key: ' . $key, 3);\n }\n\n // Clean up quickly\n $this->generateOutput($functionName, 'Cleaning memory', 3);\n unset($limit, $offset, $authKey, $code, $requiredAuth, $functionName, $auth, $authSuccessful, $authKey, $type, $videos, $video, $url, $options, $key, $k, $returnTotal, $returningTotal);\n \n return $videosObject; \n }", "title": "" }, { "docid": "0440e2efe5dddb9e36eb6691667da203", "score": "0.42978314", "text": "public static function get_credential(){\n session_start();\n if(!isset($_SESSION[\"role\"])) return \"none\";\n else return $_SESSION[\"role\"];\n }", "title": "" }, { "docid": "5660085f54f360f6e966d588dc9e6c97", "score": "0.42756674", "text": "abstract public function getCredentials();", "title": "" }, { "docid": "c53dfbe512dd32442bc2a4e31c9aa01f", "score": "0.42566782", "text": "public function getCredentialsWrapper($access_token = null, $public_key = null)\n {\n $request = array(\n 'uri' => '/plugins-credentials-wrapper/credentials',\n );\n\n if (!empty($access_token) && empty($public_key)) {\n $request['headers'] = array('Authorization' => 'Bearer ' . $access_token);\n }\n\n if (empty($access_token) && !empty($public_key)) {\n $request['params'] = array('public_key' => $public_key);\n }\n\n $response = MPRestClientSplit::get($request);\n\n if ($response['status'] > 202) {\n $log = WC_WooMercadoPagoSplit_Log::init_mercado_pago_log('getCredentialsWrapper');\n $log->write_log('API GET Credentials Wrapper error:', $response['response']['message']);\n return false;\n }\n\n return $response['response'];\n }", "title": "" }, { "docid": "f7a987a684d2247c6a16e52372c186dd", "score": "0.42199656", "text": "public function upload_sample_cloud_video( $video_url = null, $file_name = null )\n {\n if ( !empty( $video_url ) && file_exists( $video_url ) && !empty( $file_name ) ) {\n $res = $this->cloudkey->file->upload_file( $video_url );\n $source_url = $res->url;\n $assets = array(\n 'mp4_h264_aac',\n 'mp4_h264_aac_hq',\n 'jpeg_thumbnail_medium',\n 'jpeg_thumbnail_source' \n );\n $meta = array(\n 'title' => $file_name \n );\n $media = $this->cloudkey->media->create( array(\n 'assets_names' => $assets,\n 'meta' => $meta,\n 'url' => $source_url \n ) );\n return $media;\n }\n }", "title": "" }, { "docid": "f1e0b7afbdeb0aa95f8ba465b3aa3fba", "score": "0.41993606", "text": "public function getCredentials()\n {\n return $this->credentials;\n }", "title": "" }, { "docid": "4ee9708db9b592121dba9b97a4125910", "score": "0.4193909", "text": "public function getYouTubeApiKey()\n {\n return $this->scopeConfig->getValue(\n 'catalog/product_video/youtube_api_key'\n );\n }", "title": "" }, { "docid": "cf68c64d0d6bebafa9b0d921cf8353ca", "score": "0.4192679", "text": "public function getPlaylist(string $playlist) : stdClass\n {\n $url = sprintf('%s/playlists/%s', self::API_BASE_URL, $playlist);\n\n $payload = [\n RequestOptions::HEADERS => [\n 'Authorization' => sprintf('Bearer %s', $this->getManager()->getAccessToken(Auth::CLIENT_ENTITY)),\n ]\n ];\n\n return $this->request->send(Http::GET, $url, $payload);\n }", "title": "" }, { "docid": "dcf1f914bfc9e4d77f0ed76b753a7b6b", "score": "0.41890982", "text": "protected function createRandomPlaylistObject() {\n $playlist = new Playlist();\n $playlist->setName(uniqid('brightcove_api_test_', TRUE));\n return $playlist;\n }", "title": "" }, { "docid": "eeb07678e83261599465c9c5d2a45baa", "score": "0.4183136", "text": "public function get($playlistName){\r\n return $this->$playlistName;\r\n }", "title": "" }, { "docid": "20df825665d741a84ab45eaaf5e93611", "score": "0.4169903", "text": "public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}", "title": "" }, { "docid": "794224efbe4d2d8e0ab24afd9ef635ea", "score": "0.41664535", "text": "public function getCredentials()\n {\n return $this->_credentials;\n }", "title": "" }, { "docid": "34e2bed2729ac369d14053ecdfe46a25", "score": "0.41649103", "text": "public function playlist($playlist)\n {\n $oldSource = $this->source;\n $this->source = $playlist;\n\n $parsedURL = parse_url($playlist);\n\n // 1 thing, assume playlist.\n if (count($parsedURL) === 1) {\n $this->type = static::TYPE_PLAYLIST;\n $this->id = $parsedURL['path'];\n\n return $this->cookies()->theme(static::THEME_LIGHT);\n }\n\n // both playlist types use list=\n\n $parsedQuery = explode('&', $parsedURL['query']);\n // Find list=\n foreach ($parsedQuery as $v) {\n if (substr(strtolower($v), 0, 5) == 'list=') {\n $this->type = static::TYPE_PLAYLIST;\n $this->id = substr($v, 5);\n\n return $this->cookies()->theme(static::THEME_LIGHT);\n }\n }\n\n // If we don't find list=, then its not a playlist.\n $this->source = $oldSource;\n throw new AudioPlayerException('Could not identify playlist');\n }", "title": "" }, { "docid": "795addb2e07a11245f9053349174fec5", "score": "0.41458943", "text": "public function getEmbed( $playlistUrl )\n {\n\n preg_match( '#^https?://open.spotify\\.com/user/([^/]+)/playlist/([0-9_A-Z_a-z]+)$#', (string)$playlistUrl, $matches );\n $this->url = 'https://api.spotify.com/v1/users/'.$matches[1].'/playlists/'.$matches[2];\n $header = array();\n $header[] = 'Content-type: application/json';\n $header[] = 'Authorization:'.$this->token;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch, CURLOPT_URL,$this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n $result = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($result);\n $playListImg = '';\n if($response->images) {\n $img = $response->images;\n $playListImg = $img[0]->url;\n }\n //PS: OBJECT ARE NOT ALLOWED TO BE SAVED IN THE DATABASE USING THE FIELDTYPE API !! TRANSFORM ALL DATA TO STRING OR ARRAY\n $data = [\n 'name' => $response->name ,\n 'followers' => $response->followers->total ? $response->followers->total:'',\n 'link' => $response->external_urls->spotify ? $response->external_urls->spotify : '',\n 'image' => $playListImg ? $playListImg:'' ,\n 'tracks' => $response->tracks->items ? json_decode(json_encode($response->tracks->items),true) : ''\n ];\n\n return $data;\n\n }", "title": "" }, { "docid": "7ebc78e0774268ff14b2162d1ce06362", "score": "0.41441312", "text": "public abstract function readCredentials();", "title": "" }, { "docid": "49d2cb0c72bd7e1c6c044b16472989f8", "score": "0.41166312", "text": "function wimtvpro_getPlayerFromVid($vid, $typeInline, $videoWidth = null, $videoHeight = null) {\n global $base_path;\n drupal_add_js(drupal_get_path('module', 'wimtvpro') . '/jquery/jwplayer/jwplayer.js');\n// $width = variable_get('widthPreview');\n// $height = variable_get('heightPreview');\n $width = ($videoWidth != null) ? $videoWidth : variable_get('widthPreview');\n $height = ($videoHeight != null) ? $videoHeight : variable_get('heightPreview');\n $output = \"\";\n\n if (variable_get('nameSkin') != \"\") {\n $directory = 'public://skinWim';\n }\n else\n $directory = drupal_get_path('module', 'wimtvpro');\n\n $dirJwPlayer = base_path() . drupal_get_path('module', 'wimtvpro') . \"/jquery/jwplayer/player.swf\";\n\n if ($typeInline != \"playlist\") {\n if ($typeInline == \"block\") {\n $dimensionsPlayer = \"width:\" . $width . \"px;height:\" . $height . \"px\";\n } else {\n $dimensionsPlayer = \"float:left;margin:1px;width:\" . $width . \"px;height:\" . $height . \"px\";\n }\n// $result = db_query(\"SELECT * FROM {wimtvpro_videos} WHERE vid='\" . $vid . \"'\"); \n// $video = $result->fetchAll();\n\n $video = dbGetVideosByVid($vid);\n if (sizeof($video) < 1 && !isset($video[0]->urlPlay)) {\n wimtvpro_smartSync::sync(\"pending\");\n// if ($vid==641){var_dump($video);exit;}\n// $videoUrl = wimtvproplus_updateVideoSync($video[0]->contentidentifier);\n }\n\n// $result = db_query(\"SELECT * FROM {wimtvpro_videos} WHERE vid='\" . $vid . \"'\");\n// $video = $result->fetchAll();\n $video = dbGetVideosByVid($vid);\n if (sizeof($video) < 1 && !isset($video[0]->urlPlay)) {\n $videoUrl = \"NOTEXIST\";\n } else {\n $videoUrl = $video[0]->urlPlay;\n }\n $thumbs = array();\n if ($videoUrl != \"\") {\n if ($videoUrl == \"NOTEXIST\") {\n $output = \"<div>The video no longer exists.</div>\";\n } else {\n if (!isset($video[0]->urlThumbs)) {\n $thumbs[1] = \"\";\n } else {\n $thumbs = explode('\"', $video[0]->urlThumbs);\n }\n\n if (!isset($thumbs[1])) {\n $thumbs[1] = \"\";\n }\n\n $dimensions = \"width:\" . $width . \",height:\" . $height;\n\n if (variable_get('nameSkin') != \"\") {\n $directory = file_create_url('public://skinWim');\n } else {\n $directory = base_path() . drupal_get_path('module', 'wimtvpro');\n }\n\n $output .= \"<div style='\" . $dimensionsPlayer . \"'><div id='container_\" . $vid . \"'></div></div>\";\n $output .= \"<script type='text/javascript'>jwplayer('container_\" . $vid . \"').setup({\";\n if (variable_get('nameSkin') != \"\") {\n $output .= \"skin: '\" . $directory . \"/\" . variable_get('nameSkin') . \".zip',\";\n } else {\n $output .= \"skin: '\" . $directory . \"/skin/default.zip',\";\n }\n\n $dimension = \" width='\" . (variable_get('widthPreview') + 50) . \"px' height='\" . (variable_get('heightPreview') + 50) . \"px'\";\n // NS: refactoring signature: contentID is not required!\n// $configFile = wimtvpro_viever_jwplayer($_SERVER['HTTP_USER_AGENT'], $vid, $video);\n $configFile = wimtvpro_viever_jwplayer($_SERVER['HTTP_USER_AGENT'], $video);\n /*\n $embedded = str_replace(\"+\", \" \", urlencode(\"<iframe src='\" . $GLOBALS['base_url'] . \"/wimtvproplus/viewEmbeddedPlayer/\" . $vid . \"'\" . $dimension . \"></iframe>\"));\n $output .= \" logo: {\n hide: 'false', position:'bottom-right',\n file: '\" . $GLOBALS['base_url'] . \"/\" . drupal_get_path('module', 'wimtvproplus') . \"/img/logo_player.png',\n link: '\" . $GLOBALS['base_url'] . \"'\n }, \"; */\n /*\n $output .= \"'plugins': {\n\n 'sharing-3': {\n 'link': '\" . $video[0]->urlPlay . \"',\n 'code': '\" . $embedded . \"'\n }},\";\n */\n\n\n if (!$configFile) {\n $output = \"The video is being processed.\";\n } else {\n// $thumbnail = $thumbs[1];\n $html_thumbnail = html_entity_decode($video[0]->urlThumbs);\n preg_match('/src=\"([^\"]+)\"/', $html_thumbnail, $images);\n $thumbnail = isset($images[1]) ? $images[1] : \"\";\n $output .= $dimensions . \",\" . $configFile . \" image: '\" . $thumbnail . \"',});</script>\";\n }\n }\n } else {\n $output = \"<div class='fieldWimTvNone' style='\" . $dimensionsPlayer . \"; text-align:center'>The video is being processed.</div>\";\n }\n } else {\n $playlist = \"\";\n $arrayVid = explode(\",\", $vid);\n $videosFilter = \"1=2 \";\n foreach ($arrayVid as $vids) {\n if (($vids >= 0) && ($vids != \"\")) {\n $videosFilter .= \" OR vid='\" . $vids . \"'\";\n }\n }\n\n $result = db_query(\"SELECT * FROM {wimtvpro_videos} WHERE \" . $videosFilter);\n $videos = $result->fetchAll();\n foreach ($videos as $video) {\n if (!isset($video->urlPlay))\n $video->urlPlay = \"\";\n else\n $urlPlay = explode(\"$$\", $video->urlPlay);\n if ($video->urlPlay == \"NULL\")\n $video->urlPlay = \"\";\n else\n $urlPlay = explode(\"$$\", $video->urlPlay);\n $thumbs = explode('\"', $video->urlThumbs);\n $playlist .= \"{'file':'\" . $urlPlay[1] . \"','streamer':'\" . $urlPlay[0] . \"','image':'\" . $thumbs[1] . \"','title':'\" . urlencode($video->title) . \"'},\";\n }\n if (variable_get('nameSkin') != \"\") {\n $directory = file_create_url('public://skinWim');\n } else {\n $directory = base_path() . drupal_get_path('module', 'wimtvpro');\n }\n\n $dimensions = \"width:100%,height:\" . $height;\n $dimensionsPlayer = \"float:left;margin:1px;width:\" . $width . \"px;height:\" . $height . \"px\";\n $output .= \"<div id='container_playlist'></div>\";\n $playlistSize = \"30%\";\n $dimensions = \"width: '100%',\";\n $dimension = \" width='\" . (variable_get('widthPreview') + 100) . \"px' height='\" . (variable_get('heightPreview') + 100) . \"px'\";\n $embedded = str_replace(\"+\", \" \", urlencode(\"<iframe src='\" . $GLOBALS['base_url'] . \"/wimtvproplus/viewEmbeddedPlaylist/\" . $vid . \"'\" . $dimension . \"></iframe>\"));\n\n $output .= \"<script type='text/javascript'>jwplayer('container_playlist').setup({\";\n\n /*\n $output .= \"\n 'plugins': {\n 'sharing-3': {\n\n 'code': '\" . $embedded . \"'\n }},\"; */\n /* $output .= \" logo: {\n hide: 'false', position:'bottom-right',\n file: '\" . $GLOBALS['base_url'] . \"/\" . drupal_get_path('module', 'wimtvproplus') . \"/img/logo_player.png',\n link: '\" . $GLOBALS['base_url'] . \"'\n }, \"; */\n\n if (variable_get('nameSkin') != \"\")\n $output .= \"skin: '\" . $directory . \"/\" . variable_get('nameSkin') . \".zip',\";\n else\n $output .= \"skin: '\" . $directory . \"/skin/default.zip',\";\n $output .= $dimensions . \"'flashplayer':'\" . $dirJwPlayer . \"','playlist': [\" . $playlist . \"],'playlist.position': 'right',\t'playlist.size': '\" . $playlistSize . \"'});</script>\";\n }\n return $output;\n}", "title": "" }, { "docid": "f7f59979fa063edf78e1e812c164a6cd", "score": "0.41056937", "text": "public function get_sample_cloud_player( )\n {\n try {\n $result = array( );\n $res = $this->cloudkey->player_preset->list();\n if ( isset( $res ) ) {\n foreach ( $res as $players ) {\n $result[$players->id] = $players->name;\n }\n return $result;\n }\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.cloud.php function name get_sample_cloud_player', 'phparray', $e->getLine(), $e->getFile() );\n }\n }", "title": "" }, { "docid": "5c8df83f936859c93ab5dd39aa49b6d0", "score": "0.41015953", "text": "function video_jsapi($video_id, $player_settings = array(), $player_variables = array(), $callback = null) {\n // Sets flash player settings if different than default\n\t $playerId = rand(9999,10000000); #preg_replace(\"/\\W/\", \"\", $video_id); # http_build_query encodes other chars... this is used internally only\n\t $player_settings['playerapiid'] = \"videoplayer$playerId\";\n $this->player_settings = am($this->player_settings, $player_settings);\n\n\n // Sets flash player variables if different than default\n $this->player_variables = am($this->player_variables, $player_variables);\n\n \n // Sets src variable for a valid object\n $src = $this->player_variables['src'] = sprintf($this->api_links['player'], $video_id, http_build_query($this->player_settings));\n\n\n // Returns embedded video\n\t ob_start(); ?>\n\t <div id=\"ytapiplayer_<?= $video_id ?>\">\n\t \tYou need Flash Player 8+ and JavaScript enabled to view this video.\n\t </div>\n\t <script>\n\t function onYouTubePlayerReady(playerId) // kept universal so ok overwritten several times...\n\t {\n\t \t// fucking id thing is NULL\n\t\tvar callbacks = j(window).data('callbacks');\n\t\tif(!callbacks[playerId]) { return; }\n\t\tvar callback = callbacks[playerId];\n\t\tcallback();\n\t }\n\t var params = <?= json_encode($this->player_variables); ?>;\n\t var attrs = { id: \"videoplayer<?= $playerId ?>\" };\n\t swfobject.embedSWF(\"<?= $src ?>\", 'ytapiplayer_<?= $video_id ?>',\n\t \t'<?= $this->player_variables['width'] ?>',\n\t \t'<?= $this->player_variables['height'] ?>',\n\t\t\"8\", null, null, params, attrs);\n\n\t var callbacks = j(window).data('callbacks');\n\t if(!callbacks) { callbacks = {}; }\n\t callbacks[\"videoplayer<?= $playerId ?>\"] = function() {\n\t \tvar video = j('#videoplayer<?= $playerId ?>').get(0);\n\t\t// 'video' variable for access to playVideo(), etc.\n\t \t<?= $callback ?>\n\t };\n\t j(window).data('callbacks', callbacks);\n\t </script>\n\t <? return ob_get_clean();\n }", "title": "" }, { "docid": "7b0fc1827802c76282e2899e370d058c", "score": "0.40986365", "text": "public function getCredentials () {\n return $this->_Credentials;\n }", "title": "" }, { "docid": "76acdfd37ead817bf9cc5c8d00d53643", "score": "0.4093568", "text": "public function listPlaylistInfo($file)\n {\n return $this->runCommand('listplaylistinfo', $file);\n }", "title": "" }, { "docid": "3dffd4f04d8f6025e51cd3e8076e11a7", "score": "0.4086344", "text": "public function youtube() {\n try {\n if(Social_group::hasSocialAccountByType($this->profile->id, 'youtube')) {\n $this->addFlash(lang('already_has_account_error', ['Youtube']), 'error');\n redirect('settings/socialmedia');\n }\n $this->load->library('Socializer/socializer');\n /* @var Socializer_Google $youtube_socializer */\n $youtube_socializer = Socializer::factory('Google', $this->c_user->id);\n $redirect_uri = $youtube_socializer->get_access_url();\n redirect($redirect_uri);\n } catch (Exception $e) {\n $this->addFlash($e->getMessage());\n redirect('settings/socialmedia');\n }\n }", "title": "" }, { "docid": "f811590b0f9144f62044dd68b674daa8", "score": "0.40795797", "text": "private function getPlaylistById()\n {\n $query = Queries::$getPlaylistById;\n\n try {\n $id = (int) $_GET['playlist_id'];\n $stmt = $this->db->prepare($query);\n $stmt->execute(array($id));\n\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->increasePlaylistViewCount($id);\n\n $this->successResponse($result);\n } catch (\\PDOException$e) {\n $this->errorResponse($e->getMessage());\n }\n }", "title": "" }, { "docid": "4f53fb20f43448102407e41df55bab6a", "score": "0.4061322", "text": "public function play($media_id) {\r\n\t\t$this->command = 'play';\r\n\t\t$this->params->media_id = $media_id;\r\n\t}", "title": "" }, { "docid": "f7a114be04954fa438e4f952e515120f", "score": "0.40543026", "text": "private static function getSpotifyToken(){\n $clientCredentials = self::getAuthToken();\n return $clientCredentials['access_token']; \n }", "title": "" }, { "docid": "e5f60c24c19ea7ab3fd840690b6499a8", "score": "0.40425822", "text": "public function play_record($media_file) {\r\n\t\t$this->command = 'play_record';\r\n\t\t$this->params->media_file = $media_file;\r\n\t}", "title": "" }, { "docid": "1785f35734a81adb67cf411b485a268a", "score": "0.4036657", "text": "public function createLivePlayToken($id){\r\n\t\tif (!isset($id)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$token = $this->_query_url.'/'.$id.'?deadline='.(time()+$this->_valid_time);\r\n\t\t\r\n\t\t$encoded_data = base64_encode($token);\r\n\t\t$sign = hash_hmac('sha1', $encoded_data, $this->_secret_key, true);\r\n\t\t$encoded_sign = base64_encode($sign);\r\n\t\t$token = $this->_access_key.':'.$encoded_sign.':'.$encoded_data;\r\n\r\n\t\treturn urlencode(stripslashes($token));\r\n\t}", "title": "" }, { "docid": "0b5cbc4f4759d8ceb05c780f9840ccea", "score": "0.40335512", "text": "public function getAccessCredentials($accessType)\n {\n if (!isset($this->options['credentials'][$accessType]))\n throw new RuntimeException(sprintf('Unknown access type \"%s\".', $accessType));\n\n // check if there exists a custom function to return the requested credentials\n try {\n $credential = $this->getInvoker()->{'get'.ucfirst($accessType).'AccessCredentials'}();\n } \n // if there is no such function, we got to use our default values\n catch (Exception $e) \n {\n $credential = $accessType;\n }\n \n // get parent credentials if any exist\n return $this->getInvoker()->formatCredentials(\n isset($this->options['credentials'][$credential])? \n array_unique(array_merge(\n array($credential), \n $this->options['credentials'][$credential]['implied_by']\n )) \n : array($credential));\n }", "title": "" }, { "docid": "dceb643c65cbd18f5f0a7fcea79bfd71", "score": "0.4031707", "text": "public function getCredentials()\n {\n $credentials = array(\n \"iss\" => \"http://example.org\",\n \"aud\" => $this->getApiKey(),\n \"sub\" => 'Authorization',\n \"username\" => 'username',\n \"iat\" => $this->getCurrentTime(),\n \"nbf\" => $this->setTokenExpiredTime()\n );\n $this->credentials = $credentials;\n return $this->credentials;\n }", "title": "" }, { "docid": "9e0073e30881b094c7a0f4e23c9b034b", "score": "0.4031686", "text": "public function getAccessToken(): string\n {\n $options[CURLOPT_URL] = CONFIG['routee_accesstokenurl'];\n $options[CURLOPT_CAINFO] = $this->curlCainfo;\n $options[CURLOPT_POSTFIELDS] = \"grant_type=client_credentials\";\n $options[CURLOPT_HTTPHEADER] = array(\n \"authorization: Basic \" . $this->encodeBase64(),\n \"content-type: application/x-www-form-urlencoded\"\n );\n \n $this->options +=$options;\n \n $decodedData = json_decode($this->processUrl());\n\n $this->checkResponse($decodedData);\n\n return $decodedData->access_token;\n }", "title": "" }, { "docid": "51ec26ffbe9603e17ff26c2803a347ed", "score": "0.40288925", "text": "public function getTransparentAuthenticationCredentials()\n\t{\n\t\t$return = null;\n\n\t\t// Always run onFOFGetTransparentAuthenticationCredentials. These methods take precedence over anything else.\n\t\t$this->container->platform->importPlugin('user');\n\t\t$this->container->platform->importPlugin('fof');\n\t\t$pluginResults = $this->container->platform->runPlugins('onFOFGetTransparentAuthenticationCredentials', [$this->container]);\n\n\t\tforeach ($pluginResults as $result)\n\t\t{\n\t\t\tif (empty($result))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_array($result))\n\t\t\t{\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\n\t\t// Make sure there are enabled transparent authentication methods\n\t\tif (empty($this->authenticationMethods))\n\t\t{\n\t\t\treturn $return;\n\t\t}\n\n\t\t$input = $this->container->input;\n\n\t\tforeach ($this->authenticationMethods as $method)\n\t\t{\n\t\t\tswitch ($method)\n\t\t\t{\n\t\t\t\tcase self::Auth_HTTPBasicAuth_TOTP:\n\t\t\t\t\tif (empty($this->totpKey))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (empty($this->basicAuthUsername))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isset($_SERVER['PHP_AUTH_USER']))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isset($_SERVER['PHP_AUTH_PW']))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($_SERVER['PHP_AUTH_USER'] != $this->basicAuthUsername)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$encryptedData = $_SERVER['PHP_AUTH_PW'];\n\n\t\t\t\t\treturn $this->decryptWithTOTP($encryptedData);\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::Auth_QueryString_TOTP:\n\t\t\t\t\tif (empty($this->queryParam))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$encryptedData = $input->get($this->queryParam, '', 'raw');\n\n\t\t\t\t\tif (empty($encryptedData))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$return = $this->decryptWithTOTP($encryptedData);\n\n\t\t\t\t\tif (!is_null($return))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $return;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::Auth_HTTPBasicAuth_Plaintext:\n\t\t\t\t\tif (!isset($_SERVER['PHP_AUTH_USER']))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isset($_SERVER['PHP_AUTH_PW']))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'username'\t => $_SERVER['PHP_AUTH_USER'],\n\t\t\t\t\t\t'password'\t => $_SERVER['PHP_AUTH_PW']\n\t\t\t\t\t);\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::Auth_QueryString_Plaintext:\n\t\t\t\t\tif (empty($this->queryParam))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$jsonEncoded = $input->get($this->queryParam, '', 'raw');\n\n\t\t\t\t\tif (empty($jsonEncoded))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$authInfo = json_decode($jsonEncoded, true);\n\n\t\t\t\t\tif (!is_array($authInfo))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!array_key_exists('username', $authInfo) || !array_key_exists('password', $authInfo))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $authInfo;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::Auth_SplitQueryString_Plaintext:\n\t\t\t\t\tif (empty($this->queryParamUsername))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (empty($this->queryParamPassword))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$username = $input->get($this->queryParamUsername, '', 'raw');\n\t\t\t\t\t$password = $input->get($this->queryParamPassword, '', 'raw');\n\n\t\t\t\t\tif (empty($username))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (empty($password))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'username'\t=> $username,\n\t\t\t\t\t\t'password'\t=> $password\n\t\t\t\t\t);\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "7bdccfe639992ab3b461d4b7d455356a", "score": "0.40214044", "text": "public static function connect($pmacoreURL = null, $pmacoreUsername = \"\", $pmacorePassword = \"\")\r\n\t{\r\n\t\tif ($pmacoreURL == null) {\r\n\t\t\t$pmacoreURL = self::$_pma_pmacoreliteURL;\r\n\t\t}\r\n\r\n\t\tif ($pmacoreURL == self::$_pma_pmacoreliteURL) {\r\n\t\t\tif (self::_pma_is_lite()) {\r\n\t\t\t\t// no point authenticating localhost / PMA.core.lite\r\n\t\t\t\treturn self::$_pma_pmacoreliteSessionID;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// purposefully DON'T use helper function _pma_api_url() here:\r\n\t\t// why? Because_pma_api_url() takes session information into account (which we don't have yet)\r\n\t\t$url = self::_pma_join($pmacoreURL, \"api/json/authenticate?caller=SDK.PHP\");\r\n\t\tif ($pmacoreUsername != \"\") {\r\n\t\t\t$url .= \"&username=\".PMA::_pma_q($pmacoreUsername);\r\n\t\t}\r\n\t\tif ($pmacorePassword != \"\") {\r\n\t\t\t$url .= \"&password=\".PMA::_pma_q($pmacorePassword);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t@$contents = file_get_contents($url);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t//\t Something went wrong; unable to communicate with specified endpoint\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (strlen($contents) < 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t$json = json_decode($contents, true);\r\n\t\tif (isset($json[\"d\"])) {\r\n\t\t\t$json = $json[\"d\"];\r\n\t\t}\r\n\r\n\t\tif ($json[\"Success\"] != 1) {\r\n\t\t\t$sessionID = null;\r\n\t\t} else {\r\n\t\t\t$sessionID = $json[\"SessionId\"];\r\n\t\t\tself::$_pma_sessions[$sessionID] = $pmacoreURL;\r\n\t\t\tself::$_pma_slideinfos[$sessionID] = [];\r\n\t\t\tself::$_pma_amount_of_data_downloaded[$sessionID] = strlen($contents);\r\n\t\t}\r\n\t\treturn $sessionID;\r\n\t}", "title": "" }, { "docid": "290d9aa6d3833d9050994f91b5bfb6e1", "score": "0.40083688", "text": "public function getPlaylists() {\n $sGetPlaylists = \"SELECT * FROM playlist WHERE user = :user\";\n\n $aBind = array( ':user' => $_SESSION['user']);\n\n $playlists = $this->oDb->GetQueryResults($sGetPlaylists, $aBind);\n\n return $playlists;\n }", "title": "" }, { "docid": "be7969b8e3d259033f359ad2ba97183a", "score": "0.40069088", "text": "public function getPlayerUrl()\n {\n return $this->player_url;\n }", "title": "" }, { "docid": "d28c77f0f6bde49f22bc0cb03c8f9b5d", "score": "0.40042114", "text": "public function getCredentials()\n {\n // TODO: Implement getCredentials() method.\n }", "title": "" }, { "docid": "f55d4414c6f2d1b10155359cd1376e59", "score": "0.40014753", "text": "private function request( $timeout, $connectTimeout ) {\n\t\t$clientName = __CLASS__ . \\uniqid( 'ak', true );\n\t\t$credential = $this->client->getCredential();\n\n\t\tAlibabaCloud::accessKeyClient(\n\t\t\t$credential->getAccessKeyId(),\n\t\t\t$credential->getAccessKeySecret()\n\t\t)->name( $clientName );\n\n\t\treturn ( new AssumeRole( $credential ) )\n\t\t\t->client( $clientName )\n\t\t\t->timeout( $timeout )\n\t\t\t->connectTimeout( $connectTimeout )\n\t\t\t->debug( $this->client->isDebug() )\n\t\t\t->request();\n\t}", "title": "" }, { "docid": "31ad07cc5b8887e9eb2979833341f59e", "score": "0.40011117", "text": "public function getEmbedableVideoLink()\n {\n $ventureInfo = $this->getVentureInfo();\n\n // Check if the video link is set and non-empty\n if ( !isset( $ventureInfo['ventureVideoLink'] ) or empty( $ventureInfo['ventureVideoLink'] ) )\n {\n return false;\n }\n\n $videoLink = $ventureInfo['ventureVideoLink'];\n\n // Check if the video link is well-formed and we can parse out the service name and video ID\n if ( !preg_match('/^.*(?<service>vimeo|youtube).*\\/(watch\\?v=)?(?<videoId>[a-zA-Z0-9_]+)/', $videoLink, $matches) )\n {\n return false;\n }\n\n $videoService = $matches['service'];\n $videoId = $matches['videoId'];\n\n if ( $videoService == \"youtube\" )\n {\n $secureVideoLink = \"https://www.youtube.com/embed/$videoId\";\n }\n elseif ( $videoService == \"vimeo\" )\n {\n $secureVideoLink = \"https://player.vimeo.com/video/$videoId\";\n }\n else\n {\n // We don't know how to handle any other service\n return false;\n }\n\n return $secureVideoLink;\n\n// $embedCode = '<iframe src=\"'\n// . $secureVideoLink\n// . '\" width=\"' . $width\n// . '\" height=\"' . $height\n// . '\" frameborder=\"0\"'\n// . ' webkitAllowFullScreen mozallowfullscreen allowFullScreen'\n// . '></iframe>'\n// ;\n\n return $embedCode;\n // Youtube\n // <iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/7kShJL5WzhQ\" frameborder=\"0\" allowfullscreen></iframe>\n\n // Vimeo iframe\n // <iframe src=\"http://player.vimeo.com/video/VIDEO_ID\" width=\"WIDTH\" height=\"HEIGHT\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>\n }", "title": "" }, { "docid": "3e2c8797ce46fa11891f0d9f3371130e", "score": "0.39869657", "text": "public function getCredentials()\n {\n return null;\n }", "title": "" }, { "docid": "a3ffebd6ec47e71a01e914eb1b903e98", "score": "0.398089", "text": "public function getCredentials(): ?object;", "title": "" }, { "docid": "43fb5157606adccb754090513bc7406a", "score": "0.39788163", "text": "public function getCred(): ?string;", "title": "" }, { "docid": "7a56a58e19251191fdc5120ab955c316", "score": "0.39636686", "text": "public function getGoogleCloudStorageCredentialsJson() {\n return $this->attributes['google_cloud_storage_credentials_json'];\n }", "title": "" }, { "docid": "8976fe0ab2adbe2882d7d67f19088412", "score": "0.39629167", "text": "public function getPlaylistUrlAttribute() {\n\t\treturn 'https://www.youtube.com/playlist?list=' . $this->uploads_playlist;\n\t}", "title": "" }, { "docid": "982e1390554bc2846e63a7e9dad8b993", "score": "0.3960528", "text": "public function testReadWithCredentials()\n {\n }", "title": "" }, { "docid": "d1defbfa43e0026442c8e74c9e2071d0", "score": "0.39604768", "text": "public function GetUserPlaylist($dbcon, $id){\n $sql = \"SELECT * FROM playlist where userid = :id\";\n $pdostm = $dbcon->prepare($sql);\n $pdostm->bindParam(':id',$id);\n $pdostm->execute();\n $playlist = $pdostm->fetchAll(PDO::FETCH_OBJ);\n return $playlist;\n }", "title": "" }, { "docid": "4a9b006f8402beaf8b574696d8638780", "score": "0.39601666", "text": "public function index(Request $request)\n {\n \n // // # Replace the identifier with a unqiue identifier for account or channel\n // $authUrl = $authObject->getLoginUrl('[email protected]','UCY47kwwJXNRYcen0zGORKsA'); \n // // dd($authUrl);\n // $code = $request->get('code');\n // $identifier = $request->get('state');\n\n // // dd($code);\n\n // if($code != null) {\n // $request->session()->forget('youtube_code');\n // // $_SESSION['youtube_code'] = $code;\n // session(['youtube_code' => $code]);\n\n // $authObject = new AuthenticateService;\n // $authResponse = $authObject->authChannelWithCode(session('youtube_code'));\n\n // // dd($_SESSION['youtube_code']);\n // // dd($authResponse);\n // }\n\n \n\n // dd($authResponse);\n\n $partVideo ='snippet,id';\n $paramsVideo =array('channelId' => 'UCY47kwwJXNRYcen0zGORKsA');\n $videoServiceObject = new VideoService;\n $response = $videoServiceObject->searchListByKeyword($partVideo, $paramsVideo);\n\n $videos = [];\n array_shift($response->items);\n // dd($response);\n foreach($response->items as $item) {\n $videos[] = array(\n 'videoUrl' => 'https://www.youtube.com/watch?v='.$item->id->videoId,\n 'thumbnail' => $item->snippet->thumbnails->high->url,\n 'title' => $item->snippet->title,\n 'publishedAt' => $item->snippet->publishedAt\n );\n }\n // dd($videos);\n\n $part = 'id,snippet,statistics,contentDetails';\n $params = array('id' => 'UCY47kwwJXNRYcen0zGORKsA');\n $channelServiceObject = new ChannelService;\n $channelDetails = $channelServiceObject->channelsListById($part, $params);\n // dd($channelDetails);\n\n $channelName = $channelDetails->items[0]->snippet->title;\n $thumbnail = $channelDetails->items[0]->snippet->thumbnails->medium->url;\n $subscribers = $channelDetails->items[0]->statistics->subscriberCount;\n $totalVideos = $channelDetails->items[0]->statistics->videoCount;\n $totalViews = $channelDetails->items[0]->statistics->viewCount;\n\n return view('welcome', compact(\n 'thumbnail', \n 'channelName', \n 'subscribers', \n 'totalVideos', \n 'totalViews',\n 'videos'\n ));\n }", "title": "" }, { "docid": "cf536dba76401479892620bf777d13a7", "score": "0.3959494", "text": "function embed_code_props($vdetails, $type = 'embed_object') {\n //Checking for video details\n if (!is_array($vdetails)) {\n $vdetails = $this->get_video($vdetails);\n }\n\n $embed_code = false;\n\n $funcs = $this->embed_func_list;\n\n if (is_array($funcs)) {\n foreach ($funcs as $func) {\n if (@function_exists($func))\n $embed_code = $func($vdetails);\n\n if ($embed_code)\n break;\n }\n }\n\n\n if ($type == 'iframe') {\n\n //Setting up an array in case we dont want an echo\n //we can give array-output to re-use code even with jS\n\n $code_props = array();\n $code_props['type'] = 'iframe';\n $code_props['configs']['width'] = config('embed_player_width');\n $code_props['configs']['height'] = config('embed_player_height');\n\n $code_props['src']['url'] = BASEURL . '/player/embed_player.php';\n $code_props['src']['params'] = array(\n 'vid' => $vdetails['videoid'],\n 'height' => config('embed_player_height'),\n 'width' => config('embed_player_width'),\n 'autoplay' => config('autoplay_embed')\n );\n $code_props['params'] = array(\n 'height' => config('embed_player_height'),\n 'width' => config('embed_player_width'),\n 'frameborder' => 0,\n 'allowfullscreen' => true\n );\n\n\n return $code_props;\n }\n\n //Default ClipBucket Embed Code\n if (function_exists('default_embed_code')) {\n $code_props = default_embed_code($vdetails);\n } else {\n //return new Embed Code\n $embed_code = $vdetails['embed_code'];\n if (!$embed_code || $embed_code == 'none') {\n $code_props = array();\n $code_props['type'] = 'embed_object';\n $code_props['src']['url'] = PLAYER_URL . '/embed_player.php';\n $code_props['src']['params'] = array(\n 'vid' => $vdetails['videoid'],\n );\n $code_props['params'] = array(\n 'width' => EMBED_VDO_WIDTH,\n 'height' => EMBED_VDO_HEIGHT,\n 'allowfullscreen' => true,\n 'allowscriptaccess' => 'always'\n );\n } else {\n $code_props['type'] = 'embeded';\n $code_props['src'] = embeded_code($vdetails);\n }\n }\n\n return $code_props;\n }", "title": "" }, { "docid": "5b4d0201677f87fd5fffdeb0989f9618", "score": "0.39299864", "text": "public function testListPlayTimes()\n {\n $accessToken = $this->initializeTest();\n $player = $this->getPlayer();\n\n $route = $this->buildGetRoute($player->getId(), $accessToken);\n $this->client->request(\n 'GET',\n $route,\n array('ACCEPT' => 'application/json')\n );\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), $this->client->getResponse()->getContent());\n\n $route = $this->getUrl('api_player_play_times', array(\n 'id'=>$player->getId(),\n 'access_token'=>$accessToken,\n '_format'=>'json'\n ));\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n\n $response = $this->client->getResponse();\n $content = $response->getContent();\n $result = json_decode($content, true);\n\n $this->assertJsonResponse($response, 200);\n $this->assertTrue(count($result[\"play_times\"])>0);\n foreach($result['play_times'] as $play_time)\n {\n $this->assertTrue(isset($play_time['duration']));\n $this->assertTrue(isset($play_time['game']));\n }\n }", "title": "" }, { "docid": "49659f730af9eab6334dd0ad14dd668d", "score": "0.3929484", "text": "function mediaQuicktime($file, $caption, $style, $link) {\n\n\t$status = false;\n\n\tif (!$style) $style = \"width: 320px; height: 255px;\";\n\tif (!$link) $link = $file;\n\n\t$media = \"<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' \";\n\t$media .= \"\\n\\tcodebase='http://www.apple.com/qtactivex/qtplugin.cab' \";\n\t$media .= \"\\n\\tstyle='$style' \";\n\t$media .= \"\\n\\tid='$link'>\";\n\t$media .= \"\\n\\t<param name='src' value='$file' />\";\n\t$media .= \"\\n\\t<param name='kioskmode' value='true' />\";\n\t$media .= \"\\n\\t<param name='controller' value='true' />\";\n\t$media .= \"\\n\\t<embed style='$style' \";\n\t$media .= \"\\n\\t\\tsrc='$file' \";\n\t$media .= \"\\n\\t\\tname='$link' \";\n\t$media .= \"\\n\\t\\tautoplay='true' \";\n\t$media .= \"\\n\\t\\tcontroller='true' \";\n\t$media .= \"\\n\\t\\tloop='true' \";\n\t//$media .= \"\\n\\t\\tkioskmode='true' \";\n\t$media .= \"\\n\\t\\tenablejavascript='true'>\";\n\t$media .= \"\\n\\t</embed>\";\n\t$media .= \"\\n</object>\";\n\t$status = $media;\n\n\treturn $status;\n}", "title": "" }, { "docid": "49f68bc042a888c6f945c5a45f4f9f02", "score": "0.39257795", "text": "public function getPlaylistVideoPagetData($playlistId = '', $maxVideoResult = 5, $pageNumber = 1, $order = self::ORDER_BY_DATE, $quality = self::QUALITY_DEFAULT) {\n if ($order === self::ORDER_BY_RANDOM) {\n $order = self::ORDER_BY_LIST;\n }\n $this->loadPlaylist($playlistId, $maxVideoResult, $order);\n $this->playlistPageNumber = 1;\n\n $video = [];\n $result = [];\n for ($i = 2; $i <= count($pageNumber) && trim($this->channelNextPage) !== ''; $i++) {\n $video = $this->getPlaylistVideoNextPageData();\n $this->playlistPageNumber = $i;\n }\n\n for ($i = 0; $i < count($video); $i++) {\n $videoKey = $video[$i]['snippet']['resourceId']['videoId'];\n $temp = $this->getVideoData($videoKey, $quality);\n if (trim($temp['title']) !== '' && (int) $temp['duration'] !== 0) {\n $result[] = $temp;\n } else {\n unlink($this->savePath . $videoKey . '.json');\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "bba4fc98853bb9070d3738d5d236482c", "score": "0.39078602", "text": "public function getCredentialsWithUsageSign()\n {\n if (array_key_exists(\"credentialsWithUsageSign\", $this->_propDict)) {\n return $this->_propDict[\"credentialsWithUsageSign\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "dbb9dc1a695897d91d1ff43775c263e8", "score": "0.3906327", "text": "private function loadPlaylistVideo($playlistId, $maxVideoResult = 5, $pageToken = '', $order = self::ORDER_BY_LIST) {\n if ((int) $maxVideoResult < 1) {\n $maxVideoResult = 1;\n } elseif ((int) $maxVideoResult > 50) {\n $maxVideoResult = 50;\n }\n if ($order === self::ORDER_BY_RANDOM) {\n $realMaxResult = 50;\n } else {\n $realMaxResult = (int) $maxVideoResult;\n }\n\n $data = $this->getSavedFile($playlistId . '_' . $realMaxResult . '_' . $pageToken, $this->videoUpdateTime);\n if ($data) {\n $items = $data['items'];\n } else {\n $arrContextOptions = array(\n \"ssl\" => array(\n \"verify_peer\" => false,\n \"verify_peer_name\" => false,\n ),\n );\n $resultOrder = 'list';\n if ($order !== self::ORDER_BY_RANDOM) {\n $order = self::ORDER_BY_LIST;\n }\n\n $url = \"https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=$playlistId&type=list&maxResults=$realMaxResult&order=$resultOrder&key=\" . $this->API_key;\n if (trim($pageToken) !== '') {\n $url .= \"&pageToken=$pageToken\";\n }\n\n $data = json_decode(file_get_contents($url, FALSE, stream_context_create($arrContextOptions)), true);\n\n $items = [];\n for ($i = 0; $i < count($data['items']); $i++) {\n if ($data['items'][$i]['snippet']['title'] !== 'Deleted video') {\n $items[] = $data['items'][$i];\n }\n }\n\n $this->saveJSON($data, $playlistId . '_' . $realMaxResult . '_' . $pageToken);\n }\n\n if (isset($data['nextPageToken'])) {\n $this->playlistNextPage = $data['nextPageToken'];\n } else {\n $this->playlistNextPage = '';\n }\n if (isset($data['previousPageToken'])) {\n $this->playlistPreviousPage = $data['previousPageToken'];\n } else {\n $this->playlistPreviousPage = '';\n }\n\n if ($order === self::ORDER_BY_RANDOM) {\n $videoCount = count($items);\n $new = $this->getRandomData($items, $maxVideoResult, $videoCount);\n\n $this->playlistInfo = $new;\n } else {\n $this->playlistInfo = $items;\n }\n\n return $this->playlistInfo;\n }", "title": "" }, { "docid": "5a33dd7483b5dacde1bf2474e49a84a1", "score": "0.39030847", "text": "public function showLocalPlayerAction(\\TYPO3\\YbVideoplayer\\Domain\\Model\\Video $video = NULL) {\n\t\t//fetch playlists from settings\n $playlistsFromSettings = explode(',', $this->settings['playlists']);\n\t\t$_extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['yb_videoplayer']);\n\t\t$seperator = $_extConfig['prefixSeperator'];\n $playlists = array();\n\n //cummulate all assigned playlists to one\n foreach($playlistsFromSettings as &$playlist)\n {\n array_push($playlists, $this->playlistRepository->findByUid($playlist));\n }\n\n\t\tif($video == NULL)\n\t\t{\n\t\t\tif($this->settings['useFirstFromPlaylist'] === '1')\n\t\t\t{\n\t\t\t\t$video = $playlists[0]->getVideos()->current();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//fetch video from settings\n\t\t\t\t$video = $this->videoRepository->findByUid($this->settings['localVideo']);\n\t\t\t}\n\t\t}\n\n $_extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['yb_videoplayer']);\n $flowplayerLicenseKey = $_extConfig['flowplayerLicenseKey'];\n\n\t\t$this->view->assign('resolutionSeperator', $seperator);\n\t\t$this->view->assign('flowplayerLicenseKey', $flowplayerLicenseKey);\n $this->view->assign('video', $video);\n $this->view->assign('playlists', $playlists);\n\t\t$this->view->assign('showInformation', $this->settings['showInformation']);\n }", "title": "" }, { "docid": "f4d92c010c81f5686bcea4a8421b9da9", "score": "0.39005023", "text": "function upload_playlist ($user_id, $profile) {\n global $sql;\n $id = $profile['playlist'];\n $res = $sql->sql_select_array_query(\"SELECT * FROM `playlist` WHERE id = '{$id}' AND user_id = '{$user_id}' LIMIT 1\");\n if (count($res) === 1) {\n $username = $res[0]['api_username'];\n $password = $res[0]['api_password'];\n } else {\n return \"\";\n }\n $ch = curl_init();\n\t\t$params = [\n \"mac\" => $profile['mac'],\n \"sel_countries\" => $profile['epg_country'],\n \"sel_logos\" => $profile['logos'],\n \"lang\" => \"en\",\n \"url1\" => \"http://tv.iptv-tools.com/get.php?username={$username}&password={$password}&type=m3u_plus\",\n \"epg1\" => \"http://tv.iptv-tools.com/xmltv.php?username={$username}&password={$password}\",\n \"pin\" => $profile['pin'],\n \"url_count\" => 1,\n \"file_selected\" => 0,\n \"plist_order\" => 0\n ];\n if (boolval($profile['save_online']) === true) {\n $params['keep'] = 'on';\n }\n if (boolval($profile['detect_epg']) === true) {\n $params['detect_epg'] = 'on';\n }\n if (boolval($profile['disable_groups']) === true) {\n $params['disable_groups'] = 'on';\n }\n curl_setopt($ch, CURLOPT_URL, \"https://siptv.app/scripts/up_url_only.php\");\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t\t\t\"cookie:origin=valid; captcha=1\",\n\t\t\t\"origin:https://siptv.eu\",\n\t\t\t\"referer:https://siptv.app/mylist/\",\n\t\t\t\"x-requested-with:XMLHttpRequest\",\n\t\t\t\"content-type:application/x-www-form-urlencoded; charset=UTF-8\"\n\t\t]);\n $html = curl_exec($ch);\n\t\tcurl_close($ch);\n return $html;\n }", "title": "" }, { "docid": "9d3975af9c745b6ca6e137e603539a34", "score": "0.3900213", "text": "function playlist($id,$pass) \n\t{\n $sql = \"SELECT `id`, `nombre` , `orden` FROM `video` , `Playlist` WHERE `id_video` = `id` AND `id_dispositivo` =$id\";\n\t\t$conn= mysqli_connect(\"mysql.hostinger.mx\", \"u373017502_admin\", \"moitania\", \"u373017502_video\"); \n \t\tif (!$conn){ \n \t//si no hay conexion lanzamos un error al servicio\n \t\tthrow new SOAPFault(\"Error\", \"Error de conexi&oacute;n: \".mysqli_connect_error());\n \t\t}else{\n \t\t$conn->set_charset(\"utf8\");\n \t\t}\n $consulta = mysqli_query($conn,$sql);\n\t\twhile ($fila= mysqli_fetch_array($consulta)){\n\t\t\t\t$resultado.=$fila['id'].\"@\".$fila['nombre'].\"@\".$fila['orden'].\"|\"; \n \t} \n\t\treturn $resultado; \n\t\t\n\t}", "title": "" }, { "docid": "6d944b1616fd3c0465fb038f949c4677", "score": "0.38965422", "text": "abstract protected function configureAcessCredentials(): void;", "title": "" }, { "docid": "27150faa62719eb477fc1453d42698ec", "score": "0.38911787", "text": "public function GetPlaylist($dbcon, $id){\n $sql = \"SELECT * FROM playlist where id = :id\";\n $pdostm = $dbcon->prepare($sql);\n $pdostm->bindParam(':id',$id);\n $pdostm->execute();\n $playlist = $pdostm->fetchAll(PDO::FETCH_OBJ);\n return $playlist;\n }", "title": "" }, { "docid": "a7b55fc18be6e4310a54add9e690bd9e", "score": "0.38822117", "text": "public function getSpecificProjectCredentialRequest($project_uuid, $service_name, $x_access_token = null, $x_secret_token = null, $authorization = null, $ehelply_active_participant = null, $ehelply_project = null, $ehelply_data = null)\n {\n // verify the required parameter 'project_uuid' is set\n if ($project_uuid === null || (is_array($project_uuid) && count($project_uuid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project_uuid when calling getSpecificProjectCredential'\n );\n }\n // verify the required parameter 'service_name' is set\n if ($service_name === null || (is_array($service_name) && count($service_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $service_name when calling getSpecificProjectCredential'\n );\n }\n\n $resourcePath = '/sam/projects/projects/{project_uuid}/credentials/{service_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // header params\n if ($x_access_token !== null) {\n $headerParams['x-access-token'] = ObjectSerializer::toHeaderValue($x_access_token);\n }\n // header params\n if ($x_secret_token !== null) {\n $headerParams['x-secret-token'] = ObjectSerializer::toHeaderValue($x_secret_token);\n }\n // header params\n if ($authorization !== null) {\n $headerParams['authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n // header params\n if ($ehelply_active_participant !== null) {\n $headerParams['ehelply-active-participant'] = ObjectSerializer::toHeaderValue($ehelply_active_participant);\n }\n // header params\n if ($ehelply_project !== null) {\n $headerParams['ehelply-project'] = ObjectSerializer::toHeaderValue($ehelply_project);\n }\n // header params\n if ($ehelply_data !== null) {\n $headerParams['ehelply-data'] = ObjectSerializer::toHeaderValue($ehelply_data);\n }\n\n // path params\n if ($project_uuid !== null) {\n $resourcePath = str_replace(\n '{' . 'project_uuid' . '}',\n ObjectSerializer::toPathValue($project_uuid),\n $resourcePath\n );\n }\n // path params\n if ($service_name !== null) {\n $resourcePath = str_replace(\n '{' . 'service_name' . '}',\n ObjectSerializer::toPathValue($service_name),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a114ed54ceb69f957d9279391cd572b1", "score": "0.38813284", "text": "public function getPlayInfoWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->additionType)) {\n $query['AdditionType'] = $request->additionType;\n }\n if (!Utils::isUnset($request->authTimeout)) {\n $query['AuthTimeout'] = $request->authTimeout;\n }\n if (!Utils::isUnset($request->definition)) {\n $query['Definition'] = $request->definition;\n }\n if (!Utils::isUnset($request->formats)) {\n $query['Formats'] = $request->formats;\n }\n if (!Utils::isUnset($request->outputType)) {\n $query['OutputType'] = $request->outputType;\n }\n if (!Utils::isUnset($request->playConfig)) {\n $query['PlayConfig'] = $request->playConfig;\n }\n if (!Utils::isUnset($request->reAuthInfo)) {\n $query['ReAuthInfo'] = $request->reAuthInfo;\n }\n if (!Utils::isUnset($request->resultType)) {\n $query['ResultType'] = $request->resultType;\n }\n if (!Utils::isUnset($request->streamType)) {\n $query['StreamType'] = $request->streamType;\n }\n if (!Utils::isUnset($request->videoId)) {\n $query['VideoId'] = $request->videoId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'GetPlayInfo',\n 'version' => '2017-03-21',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return GetPlayInfoResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "d7c11417428f7b55ab39ba07b04521b2", "score": "0.38684282", "text": "public function apiLogin()\n\t{\n\t\t$userid\t\t= $this->userid;\n\t\t$account \t= strtolower($this->account);\n\t\t$server\t\t= $this->server_index;\n\t\t$timestamp = time();\n\t\t$sign\t\t= md5($userid.$account.$server.$timestamp.$this->api_key);\n\t\t$data \t\t= array(\n\t\t\t'userid' \t=> $userid,\n\t\t\t'account'\t=> $account,\n\t\t\t'server'\t=> $server,\n\t\t\t'timestamp'\t=> $timestamp,\n\t\t\t'sign'\t\t=> $sign\n\t\t);\n\t\t\n\t\t//$full_api_url \t= $this->api_url.'/api/play-games?userid='.$userid.'&account='.$account.'&server='.$server.'&timestamp='.$timestamp.'&sign='.$sign;\n\t\t$result = $this->get_curl($this->api_url.'/api/play-games',$this->api_username,$this->api_password,$data);\n\t\t\n\t\treturn json_decode($result);\n\t}", "title": "" }, { "docid": "3a9fbc5a8f81e2f3eea186d1a546c377", "score": "0.38603786", "text": "function boxeePlay($filename) {\n global $config;\n\n $socket = fsockopen($config['boxeeHost'], $config['boxeePort']);\n if (!$socket) {\n throw new Exception(\"Couldn't connect to boxee on \".$config['boxeeHost'].':'.$config['boxeePort']);\n }\n\n $data = array(\n 'id' => 1,\n 'jsonrpc' => '2.0', \n 'method' => 'XBMC.Play', \n 'params' => array('file' => $filename)\n );\n\n $json = json_encode($data, JSON_FORCE_OBJECT);\n\n fputs($socket, $json);\n/*\n $response = '';\n while (!(feof($socket))) {\n $response .= fgets($socket);\n }\n*/\n // close socket\n $status = stream_get_meta_data($socket);\n fclose($socket);\n\n // check for timeout\n if (@$status['timed_out']) {\n $response['error'] = \"Connection timed out\";\n }\n\n return trim($response);\n}", "title": "" }, { "docid": "5c946bd7afe3aaa14b078e2e9c1c9cec", "score": "0.3858205", "text": "public function getCredential(string $type);", "title": "" }, { "docid": "9e71e7157f6025e8e6633ae8c459a29e", "score": "0.38523015", "text": "function wimtvpro_getIframeFromVid($vid) {\n //Recove url video for view it\n $width = \"200\";\n $height = \"150\";\n// $contentid = wimtvproplus_return($vid, \"contentItem\");\n $localVideoItem = dbGetVideosByVid($vid);\n if (!isset($localVideoItem[0]->showtimeIdentifier)) {\n return \"<div>\" . t(\"The video isn't into WimVod\") . \"</div>\";\n }\n $contentid = $localVideoItem[0]->contentidentifier;\n\n $ch = curl_init();\n\n if (variable_get('nameSkin') != \"\")\n $skin = \"public://skinWim/\" . variable_get('nameSkin') . \".zip\";\n else\n $skin = $base_url . drupal_get_path('module', 'wimtvpro') . \"/skin/skin/default.zip\";\n\n $url = cms_getWimtvApiUrl() . variable_get(\"urlVideosWimtv\") . \"/\" . $contentid . '/embeddedPlayers';\n $url .= \"?get=1&width=\" . $width . \"&height=\" . $height . \"&skin=\" . $skin;\n $credential = variable_get(\"userWimtv\") . \":\" . variable_get(\"passWimtv\");\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_VERBOSE, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $credential);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n $response = curl_exec($ch);\n\n return $response;\n}", "title": "" }, { "docid": "f17292768f69d489fb48a47106afbc2f", "score": "0.3849263", "text": "function SPOTIFYplaylistDetails($str_username = '', $str_playlistId = '', $str_targetElement = ''){\n\t//Return array\n\t$arr_return = [];\n\n\t//Base SPOTIFY url\n\t$str_spotifyURL = \"https://api.spotify.com/v1/users/\".$str_username.\"/playlists/\".$str_playlistId;\n\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $str_spotifyURL);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 4);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.x.x) Gecko/20041107 Firefox/x.x\");\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$_SESSION['ACCESS_TOKEN']));\n\t$arr_jsonReturn = curl_exec($ch);\n\t$int_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n\t$arr_return['curlResult'] = (array)json_decode($arr_jsonReturn, true);\n\t$arr_return['statusCode'] = $int_status_code;\n\n\tif($arr_return['statusCode'] === 200 && $arr_return['curlResult']){\n\t\tif($str_targetElement !== ''){\n\t\t\tswitch ($str_targetElement){\n\t\t\t\tcase \"image\":\n\t\t\t\t\tif(isset($arr_return['curlResult']['images'][0]['url'])) $arr_return['targetElement'] = $arr_return['curlResult']['images'][0]['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"followers\":\n\t\t\t\t\tif(isset($arr_return['curlResult']['followers']['total'])) $arr_return['targetElement'] = $arr_return['curlResult']['followers']['total'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $arr_return;\n}", "title": "" }, { "docid": "623e43f2e409595859efccea07299ffb", "score": "0.3835189", "text": "public function testGetSecret()\n {\n $secret = 'foo';\n \n $credential = new Credentials(1, 'foo');\n \n $this->setProperty('secret', $credential, $secret);\n \n $this->assertEquals($secret, $credential->getSecret());\n \n return;\n }", "title": "" }, { "docid": "8d8df9be39773ff9bf85bcba52f3db8c", "score": "0.38294858", "text": "public function getChannelObject_Authd($authKey, $code)\n {\n $functionName = 'GET_CHANNEL_AUTHED';\n $requiredAuth = 'channel_read';\n $this->generateOutput($functionName, 'Grabbing authenticated channel object', 1);\n \n // We were supplied an OAuth token. check it for validity and scopes\n if (($authKey != null || '') || ($code != null || false))\n {\n if ($authKey != null || '')\n {\n $check = $this->checkToken($authKey);\n \n if ($check[\"token\"] != false)\n {\n $auth = $check;\n } else { // attempt to generate one\n if ($code != null || '')\n {\n $auth = $this->generateToken($code); // Assume generation and check later for failure\n } else {\n $this->generateError(400, 'Existing token expired and no code available for generation.');\n return array();\n }\n }\n } else { // Assume the code was given instead and generate if we can\n $auth = $this->generateToken($code); // Assume generation and check later for failure\n }\n \n // check to see if we recieved a token after all of that checking\n if ($auth['token'] == false) // check the token value\n {\n $this->generateError(400, 'Auth key not returned, exiting function: ' . $functionName);\n \n return array(); // return out after the error is passed\n }\n \n $authSuccessful = false;\n \n // Check the array of scopes\n foreach ($auth['scopes'] as $type)\n {\n if ($type == $requiredAuth)\n {\n // We found the scope, we are good then\n $authSuccessful = true;\n break;\n }\n }\n \n // Did we fail?\n if (!$authSuccessful)\n {\n $this->generateError(403, 'Authentication token failed to have permissions for ' . $functionName . '; required Auth: ' . $requiredAuth);\n return array();\n }\n \n // Assign our key\n $this->generateOutput($functionName, 'Required scope found in array', 3);\n $authKey = $auth['token'];\n }\n \n $url = 'https://api.twitch.tv/kraken/channel';\n $get = array('oauth_token' => $authKey);\n $options = array();\n\n $object = json_decode($this->cURL_get($url, $get, $options, false), true);\n \n $this->generateOutput($functionName, 'Raw return: ' . json_encode($object), 4);\n \n // Clean up\n $this->generateOutput($functionName, 'Cleaning memory', 3);\n unset($authKey, $code, $auth, $authSuccessful, $type, $url, $get, $options);\n \n if (!is_array($object))\n {\n $object = array(); // Catch to make sure that an array is returned no matter what, technically our fail state\n }\n \n return $object;\n }", "title": "" }, { "docid": "c2e72336b3b4de280f9f8fb0d524ebc9", "score": "0.38204768", "text": "public function credentialsAction()\n\t\t{\n\t\t\t$this->getHelper( 'ViewRenderer' )->setNoRender( true );\n\t\t\t// Parameters.\n\t\t\t$pluginName = $this->_getParam( 'plugin' );\n\t\t\t$userId = $this->_getParam( 'user' );\n\t\t\t// Load credentials.\n\t\t\t$modelPayment = new Payment_Model_Payment();\n\t\t\t$plugin = $modelPayment->getPlugin( strtolower( $this->_platform ), $pluginName );\n\t\t\t$credentials = Table::_( 'credentials' )->getForPlugin( $plugin->id, $userId )->toArray();\n\t\t\techo json_encode( $credentials );\n\t\t}", "title": "" }, { "docid": "b9946d29b3453b97858751493d9409c7", "score": "0.38145196", "text": "public function show()\n {\n $key = $this->uri->segment(2);\n $type = $this->uri->segment(3);\n\n $this->_api('video')->get_video([\n 'key' => $key,\n 'type' => $type\n ]);\n }", "title": "" }, { "docid": "7d872bd65cd5de9545b852a2c5cbd18c", "score": "0.38140592", "text": "public function getAccessToken()\n {\n\n $consumer_key = \"iRZRiB8iKjHHVOk0bfQAJKWvmZSzP1GP\"; //Get these two from DARAJA Platform\n\n\n $consumer_secret = \"v6BpUkOBqrGcBZeJ\";\n\n $credentials = base64_encode($consumer_key . \":\" . $consumer_secret);\n\n $url = 'https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL, $url);\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials));\n\n curl_setopt($curl, CURLOPT_HEADER, false);//Make it not return headers...true retirns header\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);//MAGIC..\n\n $curl_response = curl_exec($curl);\n\n// dd($curl_response);\n\n $access_token = json_decode($curl_response);\n\n return $access_token->access_token;\n\n }", "title": "" }, { "docid": "ac6a88795690f9cfc092ac35fd6e4a63", "score": "0.38140392", "text": "public function listPlaylists($part, $optParams = array())\n {\n $params = array('part' => $part);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_YouTube_PlaylistListResponse\");\n }", "title": "" }, { "docid": "89360417b28557c44402f8a0727dff6f", "score": "0.38139957", "text": "public function testBotControllerWithNextPlayShouldReturnAPlay()\n {\n $this->json(\n 'POST',\n '/api/v1/bots/x/play',\n [\n 'previousPlays' => [\n [\n \"line\" => 1,\n \"column\" => 1\n ]\n ],\n \"nextPlay\"=> null\n ]\n )\n ->seeJson([\"column\" => 2, \"line\" => 1]);\n }", "title": "" }, { "docid": "ad6bd48876e7be8111ab9bf4a4ffaca7", "score": "0.38135687", "text": "public function getCredentials()\n {\n return '';\n }", "title": "" }, { "docid": "b8defdc72a9a1aa12cdfd7f48ca5dad5", "score": "0.38130218", "text": "protected function getVideoInfo() {\n if ($this->info) {\n return;\n }\n\n /** @var \\Phile\\ServiceLocator\\CacheInterface $cache */\n $cache = null;\n if (ServiceLocator::hasService('Phile_Cache')) {\n $cache = ServiceLocator::getService('Phile_Cache');\n }\n $cacheKey = 'plugin.phile.youtube.' . md5($this->id);\n if ($cache && $cache->has($cacheKey)) {\n return $cache->get($cacheKey);\n }\n\n $url = 'http://www.youtube.com/oembed';\n $parts = [\n 'url' => 'http://www.youtube.com/watch',\n 'v' => $this->id,\n 'format' => 'json'\n ];\n $url = $url . '?url=' . $parts['url'];\n unset($parts['url']);\n foreach ($parts as $key => $value) {\n $parts[$key] = \"$key=$value\";\n }\n $request = $url . '?' . implode('&amp;', $parts);\n // Use '@' to suppress errors.\n $video = @file_get_contents($request);\n $video = json_decode($video, true);\n\n if (!$video) {\n $video = [];\n }\n if ($cache) {\n $cache->set($cacheKey, $video);\n }\n $this->info = $video;\n return $this->info;\n }", "title": "" }, { "docid": "dd45df614993bba6c069a236115071b3", "score": "0.3809511", "text": "function auth_cloud_explicit_compute($projectId)\n{\n $gceCredentials = new GCECredentials();\n $config = [\n 'projectId' => $projectId,\n 'credentialsFetcher' => $gceCredentials,\n ];\n $storage = new StorageClient($config);\n\n # Make an authenticated API request (listing storage buckets)\n foreach ($storage->buckets() as $bucket) {\n printf('Bucket: %s' . PHP_EOL, $bucket->name());\n }\n}", "title": "" }, { "docid": "2e300f0de14552d3c3261558998ca288", "score": "0.3806115", "text": "public function getCacheCredentials()\n {\n if (array_key_exists(\"cacheCredentials\", $this->_propDict)) {\n return $this->_propDict[\"cacheCredentials\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3710b8a199825f182553d2f4be2e522b", "score": "0.3803392", "text": "function getVideoPlayUrl($filename, $userid, $auto=1)\r\n\t{\r\n\t\tif (empty($filename) || !is_numeric($this->_servicetype) || $this->_servicetype == 0){\r\n\t\t\treturn array(null, new Error(-1, 'param error'));;\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($userid) || !is_numeric($userid)){\r\n\t\t\treturn array(null, new Error(-1, 'userid can not be empty'));\r\n\t\t}\r\n\t\t\r\n\t\tlist($query_ret, $err) = $this->query($filename);\r\n\t\tif ($err != null)\t{\r\n\t\t\treturn array(null, $err);\r\n\t\t}\r\n\r\n\t\t$query_ret = json_decode($query_ret);\r\n\t\t$play_url = 'http://vod.baofengcloud.com/'.$userid.'/cloud.swf';\r\n\t\tif (isset($query_ret->{'status'}) && $query_ret->{'status'} == 0){\r\n\t\t\t$url = trim($query_ret->{'url'});\r\n\t\t\t\r\n\t\t\t$play_url .= '?'.$url;\r\n\t\t\tif ($query_ret->{'ifpublic'} != 1){\r\n\t\t\t\t$token = $this->createPlayToken(substr($url, -32));\r\n\r\n\t\t\t\t$play_url .= '&tk='.$token;\r\n\t\t\t}\r\n\t\t\t$play_url .= '&auto='.$auto;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn array($play_url,null);;\r\n\t}", "title": "" }, { "docid": "f921fc93aa119cbf686181631f6377e8", "score": "0.380298", "text": "function abc_sermon_player() {\n\twp_localize_script(\n\t\t 'wp-mediaelement', '_wpmejsSettings', array(\n\t\t\t 'features' => array( 'playpause', 'progress' ),\n\t\t )\n\t\t);\n}", "title": "" }, { "docid": "6188e96f7a51856e245735615882a304", "score": "0.38018778", "text": "function getRunningPlaylist() {\n\n\tglobal $sequenceDirectory;\n\t$playlistName = null;\n\t$i=0;\n\t//can we sleep here????\n\n\t//sleep(10);\n\t//FPPD is running and we shoud expect something back from it with the -s status query\n\t// #,#,#,Playlist name\n\t// #,1,# = running\n\n\t$currentFPP = file_get_contents(\"/tmp/FPP.playlist\");\n\tlogEntry(\"Reading /tmp/FPP.playlist : \".$currentFPP);\n\tif($currentFPP == \"false\") {\n\t\tlogEntry(\"We got a FALSE status from fpp -s status file.. we should not really get this, the daemon is locked??\");\n\t}\n\t$fppParts=\"\";\n\t$fppParts = explode(\",\",$currentFPP);\n//\tlogEntry(\"FPP Parts 1 = \".$fppParts[1]);\n\n\t//check to see the second variable is 1 - meaning playing\n\tif($fppParts[1] == 1 || $fppParts[1] == \"1\") {\n\t\t//we are playing\n\n\t\t$playlistParts = pathinfo($fppParts[3]);\n\t\t$playlistName = $playlistParts['basename'];\n\t\tlogEntry(\"We are playing a playlist...: \".$playlistName);\n\t\t\n\t} else {\n\n\t\tlogEntry(\"FPPD Daemon is starting up or no active playlist.. please try again\");\n\t}\n\t\n\t\n\t//now we should have had something\n\treturn $playlistName;\n}", "title": "" }, { "docid": "6a18133612285af8121bf6878e37e9b8", "score": "0.37961", "text": "function getVideoDetails($url)\n\t{\n\t $host = explode('.', str_replace('www.', '', strtolower(parse_url($url, PHP_URL_HOST))));\n\t $host = isset($host[0]) ? $host[0] : $host;\n\n $vimeo_api_key = get_settings('vimeo_api_key');\n $youtube_api_key = get_settings('youtube_api_key');\n\n\t\tif ($host == 'vimeo') {\n\t\t\t$video_id = substr(parse_url($url, PHP_URL_PATH), 1);\n\t\t\t$options = array('http' => array(\n\t\t\t\t'method' => 'GET',\n\t\t\t\t'header' => 'Authorization: Bearer '.$vimeo_api_key\n\t\t\t));\n\t\t\t$context = stream_context_create($options);\n\n\t\t\t$hash = json_decode(file_get_contents(\"https://api.vimeo.com/videos/{$video_id}\",false, $context));\n\n\t\t\t//header(\"Content-Type: text/plain\");\n\t\t\treturn array(\n\t\t\t\t'provider' => 'Vimeo',\n\t\t\t\t'video_id'\t\t\t=> $video_id,\n\t\t\t\t'title' => $hash->name,\n\t\t\t\t'description' => str_replace(array(\"<br>\", \"<br/>\", \"<br />\"), NULL, $hash->description),\n\t\t\t\t'description_nl2br' => str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\", \"\\n\\r\"), NULL, $hash->description),\n\t\t\t\t'thumbnail' => $hash->pictures->sizes[0]->link,\n\t\t\t\t'video' => $hash->link,\n\t\t\t\t'embed_video' => \"https://player.vimeo.com/video/\" . $video_id,\n\t\t\t\t'duration'\t\t\t=>\tgmdate(\"H:i:s\", $hash->duration)\n\t\t\t);\n\t\t}elseif ('youtube' || 'youtu') {\n\t\t\t$video_id = $this->get_youtube_video_id($url);\n\t\t\t$hash = json_decode(file_get_contents(\"https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&id=\".$video_id.\"&key=\".$youtube_api_key.\"\"));\n\t\t\t//header(\"Content-Type: text/plain\");\n\n\t\t\t$duration = new DateInterval($hash->items[0]->contentDetails->duration);\n\t\t\treturn array(\n\t\t\t\t'provider' => 'YouTube',\n\t\t\t\t'video_id'\t\t\t=> $video_id,\n\t\t\t\t'title' => $hash->items[0]->snippet->title,\n\t\t\t\t'description' => str_replace(array(\"\", \"<br/>\", \"<br />\"), NULL, $hash->items[0]->snippet->description),\n\t\t\t\t'description_nl2br' => str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\", \"\\n\\r\"), NULL, nl2br($hash->items[0]->snippet->description)),\n\t\t\t\t'thumbnail' => 'https://i.ytimg.com/vi/'.$hash->items[0]->id.'/default.jpg',\n\t\t\t\t'video' => \"http://www.youtube.com/watch?v=\" . $hash->items[0]->id,\n\t\t\t\t'embed_video' => \"http://www.youtube.com/embed/\" . $hash->items[0]->id,\n\t\t\t\t'duration' \t=> $duration->format('%H:%I:%S'),\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "8b40541e045d515f463e8edf0a846ec8", "score": "0.37774032", "text": "public function addToPlaylist($aFormData) {\n $sInsert = \"INSERT INTO playlist_media (playlist_id, media_id) VALUE (:playlist_id, :media_id)\";\n\n $aBind = array(\":playlist_id\" => $aFormData['playlist'], \":media_id\" => $aFormData['media_id']);\n\n $this->oDb->RunQuery( $sInsert, $aBind );\n\n return 0;\n }", "title": "" }, { "docid": "b9d72f7ffe3ec72973f3cb30798c5850", "score": "0.37714756", "text": "function getMediaByCurl($mediaUrl,$accessToken,$mediafile,$postmantoken,$listArr)\n {\n try\n {\n $queryStr = \"\";\n $queryStr = $this->genqueryString('ResourceRecordKey',$listArr);\n print \"QUERY STRING IS: \".$queryStr.\"\\n\";\n $mediaUrl = $this->addGetParamToUrl($mediaUrl,'$filter',$queryStr);\n $mediaUrl = $this->addGetParamToUrl($mediaUrl,'$select','MediaURL,Order,ResourceRecordKey');\n $mediaUrl = $this->addGetParamToUrl($mediaUrl,'$orderby','ResourceRecordKey');\n print \"SETTING DOWNLOAD: \".$mediaUrl.\"\\n\";\n $ch = curl_init($mediaUrl);\n //$fh = fopen($datafile,'w') or die($php_errormsg);\n\t\t\t\t\t\t\t curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);//Receive server response\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$accessToken,'Postman-Token: 82b1e9b1-5ab1-42b1-8fba-ff28bfbf3bcf','cache-control: no-cache'));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$accessToken,'Postman-Token: '.$postmantoken,'cache-control: no-cache'));\n //curl_setopt($ch, CURLOPT_FILE, $fh);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n\t\t\t\t\t\t\t }\n catch(Exception $e)\n {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "85fb7b9d30a39e64707df28ccf36f0ec", "score": "0.37673315", "text": "public function testSetAccessSecret()\n {\n $this->assertInstanceOf(AccountCredentialsContract::class, $this->instance()->setAccessSecret('A6S54651GF3A5SDFA6SG54312SADF5FW'));\n }", "title": "" }, { "docid": "7bd20e2a12980ed86e36a4434b383d8a", "score": "0.3765891", "text": "private function getValidCredentialSettings() {\n return [\n 'account_id' => 'AccountId1',\n 'site_id' => 'SiteId1',\n 'user_access' => 'user_access_1',\n 'assets_url' => 'AssetsUrl1',\n 'decision_api_url' => 'decision_api_url_1',\n 'oauth_url' => 'oauth_url_1',\n 'content_origin' => '08c93130-2e45-45f6-af6d-7c02de8cd90c',\n ];\n }", "title": "" }, { "docid": "4e36f1c6577b288c5c6e0fb2fb281429", "score": "0.3764106", "text": "public function getCredentials() : array;", "title": "" }, { "docid": "c4b941a38ed1c87badb5b5c39058197e", "score": "0.37618604", "text": "protected function getCredentialsWrapper()\n {\n return $this->credentialsWrapper;\n }", "title": "" }, { "docid": "a714f8507033d1fc0887f4a5cda500b8", "score": "0.37584957", "text": "public function deletePlaylistvideoAction() {\r\n\r\n //Get video/playlist\r\n $video = Engine_Api::_()->getItem('sesvideo_playlistvideo', $this->_getParam('playlistvideo_id'));\r\n\r\n $playlist = $video->getParent();\r\n\r\n //Check song/playlist\r\n if (!$video || !$playlist) {\r\n $this->view->success = false;\r\n $this->view->error = $this->view->translate('Invalid playlist');\r\n return;\r\n }\r\n\r\n //Get file\r\n $file = Engine_Api::_()->getItem('storage_file', $video->file_id);\r\n if (!$file) {\r\n $this->view->success = false;\r\n $this->view->error = $this->view->translate('Invalid playlist');\r\n return;\r\n }\r\n\r\n $db = $video->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n Engine_Api::_()->getDbtable('playlistvideos', 'sesvideo')->delete(array('playlistvideo_id =?' => $this->_getParam('playlistvideo_id')));\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollback();\r\n $this->view->success = false;\r\n $this->view->error = $this->view->translate('Unknown database error');\r\n throw $e;\r\n }\r\n\r\n $this->view->success = true;\r\n }", "title": "" }, { "docid": "f3b00f08d1b840ac2ca7c31fa83cd5be", "score": "0.37492713", "text": "private function setCredentials()\n\t{\n\t\t$this->credentials['client_id'] = $this->settings_repo->getSiteSetting('instagram', 'client_id');\n\t\t$this->credentials['client_secret'] = $this->settings_repo->getSiteSetting('instagram', 'client_secret');\n\t\t$this->credentials['auth_token'] = $this->settings_repo->getSiteSetting('instagram', 'auth_token');\n\t}", "title": "" }, { "docid": "16fb717812ef4606b9c0d0b782d0b5ec", "score": "0.37458465", "text": "private function printVideoplayer($videos, $showPlaylist = 'yes', $useYoutube = 'no'): void\n {\n // Für data-source der Playlist und zur Unterscheidung bei mehreren Playlists auf einer Seite\n $playerID = random_int(1, 1000);\n\n $this->printJS($playerID, $showPlaylist, $useYoutube);\n $this->printPlayerDiv($playerID);\n\n $playlist_start = '<ul id=\"playlists'. $playerID .'\" style=\"display:none;\">'. PHP_EOL;\n $playlist_inhalt = '<ul id=\"'. $playerID .'\" style=\"display:none;\">'. PHP_EOL;\n\n $videocounter = 0;\n foreach ($videos as $video) {\n // Videoobjekt initialisieren\n if (0 === $video->video_id || '' === $video->getVideoURL()) {\n continue;\n }\n\n // ycom/auth_media permissions\n $rex_video = false;\n if (('youtube' === $video->video_type_lang && '' !== $video->youtube_video_id_lang) || ('youtube' === $video->video_type && '' !== $video->youtube_video_id)) {\n $rex_video = false;\n } elseif ('' !== $video->redaxo_file_lang) {\n $rex_video = rex_media::get($video->redaxo_file_lang);\n } elseif ('' !== $video->redaxo_file) {\n $rex_video = rex_media::get($video->redaxo_file);\n }\n\n // Check media permissions\n if ($rex_video instanceof rex_media && rex_plugin::get('ycom', 'media_auth')->isAvailable() && !rex_ycom_media_auth::checkPerm(rex_media_manager::create('', $rex_video->getFileName()))) {\n continue;\n }\n\n // Standard URLs für Bilder\n $fallback_background = rex_url::addonAssets('d2u_videos', 'minimal_skin_dark/thumbnail-background.png');\n $picture_thumb = '' !== $video->picture ? 'index.php?rex_media_type='. $this->video_thumb_type .'&rex_media_file='. $video->picture : $fallback_background;\n $picture_preview = '' !== $video->picture ? 'index.php?rex_media_type='. $this->video_preview_type .'&rex_media_file='. $video->picture : $fallback_background;\n\n if (0 === $videocounter) {\n $playlist_start .= '<li data-source=\"'. $playerID .'\" data-playlist-name=\"'. $video->teaser .'\" data-thumbnail-path=\"'. $picture_preview .'\">';\n }\n $playlist_inhalt .= '<li data-thumb-source=\"'. $picture_thumb .'\" data-video-source=\"'. $video->getVideoURL() .'\" data-poster-source=\"'. $picture_preview .'\" data-downloadable=\"yes\">';\n\n // Rest der Ausgabe\n if (0 === $videocounter) {\n $playlist_start .= '<p class=\"minimalDarkCategoriesTitle\"><span class=\"minimalDarkBold\">'. $video->teaser .'</span></p>';\n $playlist_start .= '</li>'. PHP_EOL;\n }\n\n $playlist_inhalt .= '<div data-video-short-description=\"\">';\n $playlist_inhalt .= '<div>';\n $playlist_inhalt .= '<p class=\"minimalDarkThumbnailTitle\">'. $video->name .'</p>';\n $playlist_inhalt .= '<p class=\"minimalDarkThumbnailDesc\">'. $video->teaser .'</p>';\n $playlist_inhalt .= '</div>';\n $playlist_inhalt .= '</div>';\n $playlist_inhalt .= $video->getLDJSONScript();\n $playlist_inhalt .= '</li>'. PHP_EOL;\n ++$videocounter;\n }\n $playlist_start .= '</ul>'. PHP_EOL;\n $playlist_inhalt .= '</ul>'. PHP_EOL;\n\n echo $playlist_start . $playlist_inhalt;\n }", "title": "" }, { "docid": "958fe9d40ba1b2c53b4fe95ceb61a955", "score": "0.37442866", "text": "public function getAllProjectCredentialsRequest($project_uuid, $x_access_token = null, $x_secret_token = null, $authorization = null, $ehelply_active_participant = null, $ehelply_project = null, $ehelply_data = null)\n {\n // verify the required parameter 'project_uuid' is set\n if ($project_uuid === null || (is_array($project_uuid) && count($project_uuid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project_uuid when calling getAllProjectCredentials'\n );\n }\n\n $resourcePath = '/sam/projects/projects/{project_uuid}/credentials';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // header params\n if ($x_access_token !== null) {\n $headerParams['x-access-token'] = ObjectSerializer::toHeaderValue($x_access_token);\n }\n // header params\n if ($x_secret_token !== null) {\n $headerParams['x-secret-token'] = ObjectSerializer::toHeaderValue($x_secret_token);\n }\n // header params\n if ($authorization !== null) {\n $headerParams['authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n // header params\n if ($ehelply_active_participant !== null) {\n $headerParams['ehelply-active-participant'] = ObjectSerializer::toHeaderValue($ehelply_active_participant);\n }\n // header params\n if ($ehelply_project !== null) {\n $headerParams['ehelply-project'] = ObjectSerializer::toHeaderValue($ehelply_project);\n }\n // header params\n if ($ehelply_data !== null) {\n $headerParams['ehelply-data'] = ObjectSerializer::toHeaderValue($ehelply_data);\n }\n\n // path params\n if ($project_uuid !== null) {\n $resourcePath = str_replace(\n '{' . 'project_uuid' . '}',\n ObjectSerializer::toPathValue($project_uuid),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
82f977e082cec300f4fdc11805940647
Called before each save operation, after validation. Return a nontrue result to halt the save.
[ { "docid": "7901df89be2414d5c091ba502eeea18a", "score": "0.0", "text": "public function beforeSave($options = array()) {\n\t\t// グループIDの妥当性チェック\n\t\t$groupId = Hash::get($this->data, 'Group.id');\n\t\t$groupsUserGroupId = Hash::get($this->data, 'GroupsUser.group_id');\n\t\tif (empty($groupsUserGroupId) || $groupId != $groupsUserGroupId) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// グループユーザの妥当性チェック\n\t\t$this->loadModels([\n\t\t\t'User' => 'Users.User',\n\t\t]);\n\t\t$groupsUserIdArr = Hash::extract($this->data, 'GroupsUser.{n}.user_id');\n\t\tif (! $this->User->existsUser($groupsUserIdArr)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "a0a87f760067a1dbbfdbc588d507c672", "score": "0.76530325", "text": "protected function _beforeSave()\n {\n $this->validate();\n return parent::_beforeSave();\n }", "title": "" }, { "docid": "2a749074252da88286589c3c397ec98b", "score": "0.76459515", "text": "protected function performPreSaveCallback()\n {\n // echo 'performPreSaveCallback'; exit;\n // echo 'saving a record ...';\n // $this->validate();\n return true;\n }", "title": "" }, { "docid": "bb157d7413ac7f562e1bf6881c70e23c", "score": "0.74292135", "text": "protected function preSave() {}", "title": "" }, { "docid": "3f014c9cd16f4acc02da4f2cc330ec4f", "score": "0.74212855", "text": "protected function _beforeSave()\n {\n if (!$this->getRuleId() && $this->_rule instanceof ProxiBlue_GiftPromo_Model_Promo_Rule) {\n $this->setRuleId($this->_rule->getId());\n }\n\n return call_user_func(array(get_parent_class(get_parent_class($this)), '_beforeSave'));\n }", "title": "" }, { "docid": "1e3501ea94d4df55ba5c688e06db6491", "score": "0.7401002", "text": "protected function beforeSave() { return true; }", "title": "" }, { "docid": "a4a09eb1ad95ff58947a5dddbaf3c433", "score": "0.71512866", "text": "protected function beforeSave() {}", "title": "" }, { "docid": "4acb7bc91e9ef16b0fe53be2a15c9504", "score": "0.7117489", "text": "protected function BeforeSave()\n {\n return false;\n }", "title": "" }, { "docid": "5c5bcb6e0bc76d34fe3cd80280ede95e", "score": "0.7071001", "text": "public function beforeSave()\n\t{\n\t\tif(parent::beforeSave())\n\t\t{\n\t\t\t$event = new Event($this->savingData);\n\t\t\tEvent::trigger($this, self::EVENT_BEFORE_SAVE, $event);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "260159b0329b161f22e51f92e97242d5", "score": "0.70375025", "text": "public function preSave()\r\n {\r\n\r\n }", "title": "" }, { "docid": "61e3d8346f467ea69a2b8076ee363f83", "score": "0.7030655", "text": "public function processFieldsBeforeSave(): Result\n\t{\n\t\treturn new Result();\n\t}", "title": "" }, { "docid": "63d3e792226f6893d654514c08e9d469", "score": "0.7022789", "text": "public function beforeSave()\n {\n\t if (parent::beforeSave())\n\t {\n if ($this->isNewRecord) {\n \n } else {\n\n }\n \n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n }", "title": "" }, { "docid": "04ee804d377a0540fc41dfd77c051ce4", "score": "0.7018423", "text": "protected function _beforeSave()\n {\n \treturn parent::_beforeSave();\n }", "title": "" }, { "docid": "4f878a8cf3b8d894c0a40f2c1f6875db", "score": "0.70180345", "text": "protected function afterSave()\n {\n if (parent::beforeSave())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "765c872a22c5ef11aea6a28be18dfb5c", "score": "0.69778705", "text": "public function preSave()\n {\n\n }", "title": "" }, { "docid": "371f5f4723cd805e8698255c62afb268", "score": "0.6952315", "text": "protected function beforeSave()\n {\n return parent::beforeSave();\n }", "title": "" }, { "docid": "292112a1e58270db28e12ef85cba081c", "score": "0.6923397", "text": "public function beforeSave()\n {\n /**\n * @var $rule \\HiPay\\FullserviceMagento\\Model\\Rule\n */\n $rule = $this->ruleFactory->create();\n $rule->load($this->getValue());\n\n if ($errors = $rule->validateData(new DataObject($this->_getRuleData())) !== true) {\n $exception = new \\Magento\\Framework\\Validator\\Exception(\n new Phrase(implode(PHP_EOL, $errors))\n );\n foreach ($errors as $errorMessage) {\n $exception->addMessage(new \\Magento\\Framework\\Message\\Error($errorMessage));\n }\n throw $exception;\n }\n\n $rule->setMethodCode($this->_getMethodCode());\n $rule->setConfigPath($this->_getConfigPath());\n\n $rule->loadPost($this->_getRuleData());\n\n $rule->save();\n\n $this->setValue($rule->getId());\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "c1fc4e5668cbb737fb553ba115b6d77c", "score": "0.680692", "text": "public function doBeforeSaveToDb() {\n }", "title": "" }, { "docid": "08d12644acd8e96359777fd40594339c", "score": "0.68038654", "text": "protected function performPrePersistCallback()\n {\n // echo 'performPrePersistCallback'; exit;\n // echo 'inserting a record ...';\n // $this->validate();\n return true;\n }", "title": "" }, { "docid": "e2531c9f1812d8935649349d905f0347", "score": "0.67786735", "text": "public function beforeSave() {\n\t\tif (!$this->checkPermissions()) {\n\t\t\treturn $this->modx->lexicon('access_denied');\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fee65a66936f3c548a75ceff07a5ceb6", "score": "0.6727434", "text": "public function beforeValidate()\n {\n return true;\n }", "title": "" }, { "docid": "5e5a1ded64e28910d1aba208c3e87bac", "score": "0.6705413", "text": "public function beforeSave()\n {\n parent::beforeSave();\n if ($this->status == 'on') {\n $this->status = '1';\n }\n return true;\n }", "title": "" }, { "docid": "e69b44122bc1eb29431eb5fd99d729c5", "score": "0.66881317", "text": "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "title": "" }, { "docid": "b6159bbf26372438618caf1d693a4d41", "score": "0.6665088", "text": "public function forceSave()\n {\n $currentValidatingSetting = $this->getValidating();\n\n $this->setValidating(false);\n\n $result = $this->getModel()->save();\n\n $this->setValidating($currentValidatingSetting);\n\n return $result;\n }", "title": "" }, { "docid": "e544f7a7c7a24c829873451adc8c3039", "score": "0.66130817", "text": "public function preSave()\r\n {\r\n $this->setEventOnly(1);\r\n }", "title": "" }, { "docid": "ff6947e99cc576d49fb03af213dc92ce", "score": "0.65768456", "text": "protected function beforeSave()\n {\n $this->setDefaultAttributes();\n return parent::beforeSave();\n }", "title": "" }, { "docid": "19cb85573d7b52a01048acd227148ab5", "score": "0.65741587", "text": "protected function beforeSave()\n\t{\n\t\t$anaesthetistRequired = array(\n\t\t\t'LAC','LAS','GA'\n\t\t);\n\t\t$this->anaesthetist_required = in_array($this->anaesthetic_type->name, $anaesthetistRequired);\n\n\t\tif (!$this->status_id) {\n\t\t\t$this->status_id = 1;\n\t\t}\n\n\t\tif (!$this->stop_medication) $this->stop_medication_details = null;\n\t\tif (!$this->fast_track) $this->fast_track_discussed_with_patient = null;\n\t\tif (!$this->special_equipment) $this->special_equipment_details = null;\n\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "f9daa731b2e048d130669f0969d17e00", "score": "0.6500027", "text": "public function beforeSave(){\n\t\t$this->birthday = strtotime($this->birthday);\n\t\t$this->expiredDate = strtotime($this->expiredDate);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a804d8fd282dadd915dd38860a725b5c", "score": "0.64460325", "text": "protected function beforeSave()\n\t{\n\t\tif(parent::beforeSave()) {\n\t\t\tif($this->isNewRecord) {\n\t\t\t\t$this->created_at = $this->updated_at = time();\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->updated_at = time();\n } \n // End\n if ($this->counter > $this->limit_time) {\n $this->status = 'end';\n } \n $this->changeAttributes();\n \n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "16ecbbd6eaeed2fccdbb0b26c2b9e8fa", "score": "0.64426607", "text": "protected function afterSave() {}", "title": "" }, { "docid": "6d96bc37f07942068000b4420eea4755", "score": "0.6408588", "text": "public function beforeRestore(): bool\n {\n $this->prepareForDb();\n return true;\n }", "title": "" }, { "docid": "6fa2dee3fdb2a621866efd89e184b33c", "score": "0.639123", "text": "public function versionablePreSave()\n {\n if ($this->versionsEnabled()) {\n $this->versionableDirtyData = $this->getDirty();\n $this->updating = $this->exists;\n }\n }", "title": "" }, { "docid": "94711a77d7ac7b7fff0359a14d9a69d8", "score": "0.636764", "text": "protected function performPreUpdateCallback()\n {\n // echo 'performPreUpdateCallback'; exit;\n // echo 'updating a record ...';\n // $this->validate();\n return true;\n }", "title": "" }, { "docid": "6485a4f38b36328f7e9660a5d420b5f3", "score": "0.63464224", "text": "public function beforeSave()\n {\n\t if (parent::beforeSave())\n\t {\n if ($this->isNewRecord) {\n \t//Update Listing order\n \t$this->listing_order=$this->findLastListingNumber();\n } else {\n\n }\n \n $this->created = date('Y-m-d',strtotime($this->created));\n $this->updated = date('Y-m-d',strtotime($this->updated));\n \n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n }", "title": "" }, { "docid": "b827c87a3108a893a3577f78abb62538", "score": "0.63355505", "text": "public function beforeSave() {\n\t\t\t$result = parent::beforeSave();\n\t\t\tif (!$this->exists()) {\n\t\t\t\t$this->pageID = NULL;\n\t\t\t\t$this->setRaw('dateAdded', 'NOW()');\n\t\t\t\t$this->setRaw('lastModified', 'NOW()');\n\t\t\t} else {\n\t\t\t\t$this->setRaw('lastModified', 'NOW()');\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "52b2e9b0a7ec00f0009c279e984e46da", "score": "0.6321224", "text": "public function beforeSave(&$Model) {\n\t\t \n\t\treturn true;\n\t}", "title": "" }, { "docid": "e4874ba8e8fec17bfba85a7a5a49c3d6", "score": "0.6299417", "text": "public function beforeSave() {\n if ($this->isValidDistrictType($this->type))\n return parent::beforeSave();\n else {\n $this->addError('type', 'Invalid district type');\n return false;\n }\n }", "title": "" }, { "docid": "7e4b4938309f455bf90aa1e88f2279f8", "score": "0.6287708", "text": "function beforeSave() {\n\t\t// Use default values for a few specific fields\n\t\t$this->data['User']['languages_id'] = 'my';\n\t\t$this->data['User']['country_id'] = 'GB';\n\t\t\n\t\t// Hash password before saving\n\t\tif(isset($this->data['User']['password'])) {\n\t\t\t$this->data = $this->customHashPasswords($this->data);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3ff26c5178133b20505aa15b564eba44", "score": "0.62832415", "text": "public function beforeSave() {\r\n\t\tif (!empty($this->data['PreviousDate']['date_of_previous_protocol'])) {\r\n\t\t\t$this->data['PreviousDate']['date_of_previous_protocol'] = $this->dateFormatBeforeSave($this->data['PreviousDate']['date_of_previous_protocol']);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "ba97b8f582fd55361e88556e2449de06", "score": "0.62787646", "text": "protected function beforeSave(){\n\n\t\tif(parent::beforeSave()){\n\t\t\t\n\t\t\tif($this->isNewRecord){\n\t\t\t\t$this->create_date = date(\"U\");\n\t\t\t}else{\n\t\t\t\t$this->update_date = date(\"U\");\n\t\t\t}\n\n\t\t\treturn true;\n\t\t\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8b7d9324bb57158a5e4825bc07af1f1f", "score": "0.62606394", "text": "function apply()\n {\n $this->save(true);\n }", "title": "" }, { "docid": "7c3e34379430205dba89e43033a67bb4", "score": "0.62587684", "text": "public function preSave()\n {\n $this->saveTemplateOptions();\n\n return parent::preSave();\n }", "title": "" }, { "docid": "5cd42262f3525fd9a05dae16e9582500", "score": "0.62520695", "text": "public function triggerOnSaves()\n {\n return true;\n }", "title": "" }, { "docid": "bbb05a46795974c27d18a8c71b180c43", "score": "0.6250907", "text": "protected function beforeSave()\n\t{\n\t\tif (parent::beforeSave()) {\n\t\t\t\t\n\t\t\tif ($this->isNewRecord) {\n\t\t\t\t//save created or updated time\n\t\t\t\t$this->created = date('Y-m-d H:i:s');\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->updated = date('Y-m-d H:i:s');\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "f80c4be6387306eaa761b2e086065295", "score": "0.6244416", "text": "public function afterValidate()\n {\n\n }", "title": "" }, { "docid": "0c975c58c7d70b10ab65338de63e6852", "score": "0.6241576", "text": "protected function _beforeSave()\r\n {\r\n if($this->getValue() == 1) {\r\n $errors = array();\r\n $this->_validateAPIKey($errors);\r\n $this->_validateEncryptionKey($errors);\r\n $this->_validateCCTypes($errors);\r\n\r\n if($count = count($errors)) {\r\n for($i = 0; $i < $count - 1; $i++) {\r\n Mage::getSingleton('adminhtml/session')->addError($errors[$i]);\r\n }\r\n Mage::throwException($errors[$count - 1]);\r\n }\r\n }\r\n\r\n parent::_beforeSave();\r\n }", "title": "" }, { "docid": "ae00f8005876b6c721655ba8a8d7f8e6", "score": "0.62380743", "text": "function beforeSave(){\r\n\t\t$allowSave = true;\r\n\r\n // Ensure the name is not empty\r\n if (empty($this->data[$this->name]['username'])) {\r\n $this->errorMessage = \"Please enter a new name for this \" . $this->name . \".\";\r\n return false;\r\n }\r\n\r\n // generate a password hash if it was set\r\n if (!empty($this->data[$this->name]['password'])) {\r\n $this->data[$this->name]['password'] = md5($this->data[$this->name]['password']);\r\n }\r\n\r\n\t\tif (empty($this->data[$this->name]['id'])) {\r\n\t\t\t//check the duplicate username\r\n\t\t\t$allowSave = $this->__checkDuplicateUsername();\r\n\t\t}\r\n\t\treturn $allowSave;\r\n\t}", "title": "" }, { "docid": "25d9528a245eda6d5d966bd5ff0603e6", "score": "0.623534", "text": "public function beforeValidating()\n {\n }", "title": "" }, { "docid": "af9b7cef3e089695137edadd2e3f5335", "score": "0.6231021", "text": "public function saveWithoutException()\n {\n $currentThrowValidationExceptionsSetting = $this->getThrowValidationExceptions();\n\n $this->setThrowValidationExceptions(false);\n\n $result = $this->getModel()->save();\n\n $this->setThrowValidationExceptions($currentThrowValidationExceptionsSetting);\n\n return $result;\n }", "title": "" }, { "docid": "f4bff20711ec61425e2fc4838cf76f87", "score": "0.6225231", "text": "protected function requiresSave(){\r\n if($this->state === self::STATE_SAVE){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "275f8c68f1cff3921331cce32fc36c4d", "score": "0.62175524", "text": "function afterSave()\r\n {\r\n if ($this->_doVersion) {\r\n $this->saveRevision();\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "c1f0a47e5cbe1415f561c52b5b2ad39f", "score": "0.62046427", "text": "protected function beforeSave()\n\t{\n\t\tif (parent::beforeSave()) {\n\t\n\t\t\tif ($this->isNewRecord) {\n\t\t\t\t//save created or updated time\n\t\t\t\t$this->created = date('Y-m-d H:i:s');\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->updated = date('Y-m-d H:i:s');\n\t\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "77949fc7205745f7567a63409a1195b7", "score": "0.6200088", "text": "protected function beforeSave()\n\t{\n\t\tif (parent::beforeSave()) {\n\t\t\tif ($this->isNewRecord) {\n\t\t\t\t$this->created = date('Y-m-d H:i:s');\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->updated = date('Y-m-d H:i:s');\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "a666ed0320d004a85ed9e2fa8eaf5cfc", "score": "0.6186018", "text": "public function beforeSave(){\n\t\tif($this[\"nombre\"] == '') $this->app->js()->univ()->alert('Ingrese un nombre para el empleado.')->execute();\n\t\t\n\t\t// Revisa que el email ingresado no exista.\n\t\t$model = $this->add('Model_Empleado');\n\t\t$model->addCondition(\"email\", $this['email']);\n\t\t$model->tryLoadAny();\n\t\t\n\t\tif($model->loaded() && $model['id'] != $this['id']) $this->app->js()->univ()->alert('El email ingresado ya existe.')->execute();\n\t\t\n\t\t// Revisa que el email tenga un @.\n\t\tif(!strpos($this['email'], '@')) $this->app->js()->univ()->alert('El email ingresado debe contener un signo \"@\".')->execute();\n\t\t\n\t\t// Revisa que el sueldo bruto sea > 0\n\t\tif($this[\"sueldo_bruto\"] <= 0) $this->app->js()->univ()->alert('El sueldo bruto debe ser mayor a 0.')->execute();\n\t\t\n\t\t// Revisa que se haya ingresado un cargo válido.\n\t\tif($this['cargo'] != 'Desarrollador' && $this['cargo'] != 'Administrador' && $this['cargo'] != 'Gerente')\n\t\t\t$this->app->js()->univ()->alert('El cargo ingresado no es correcto.')->execute();\n\t}", "title": "" }, { "docid": "5b448f9e465beff8d5448dbf0922f823", "score": "0.6183055", "text": "function doOnValidModel() {\n }", "title": "" }, { "docid": "a91675ae5d3276be57bd2b61b0c67513", "score": "0.618164", "text": "public function beforeSet() {\n\t\t$this->object->set('uid', $this->modx->user->id);\n\t\t$this->object->set('status', 1);\n\t\t$this->object->set('createdon', date('Y-m-d H:i:s'));\n\t\t\n\t\treturn !$this->hasErrors();\n\t}", "title": "" }, { "docid": "90b39de7aa2977111cd7c1a214c2a91b", "score": "0.61766857", "text": "public function save() {\n\t\n\t\t$this->validate();\n\t}", "title": "" }, { "docid": "c53a7d8768a29ec2741f8beb1f18a763", "score": "0.61761", "text": "protected function _beforeSave()\n {\n if ($this->getValue()) {\n $account = $this->getFieldsetDataValue('account');\n if (!$account) {\n Mage::throwException(\n Mage::helper('emvcore')\n ->__('Could not enable \"%s\" process ! Please select an account in the list !', $this->_processName)\n );\n }\n }\n parent::_beforeSave();\n }", "title": "" }, { "docid": "4570e5ad15b3ab16c8c129f5469da76a", "score": "0.6161608", "text": "function beforeSave(){\t\t\r\n\t\t/** \r\n\t\t * Determine if $this->data originated from scvngr and parse $this->data if so \r\n\t\t */\r\n\t\t$is_scvngr_data = (array_key_exists('radius', $this->data['Location']) || array_key_exists('rewards_count', $this->data['Location']));\r\n\r\n\t\tif(!$is_scvngr_data){\r\n\t\t\t/**\r\n\t\t\t * Data does not need to be formatted, exit function and continue the \r\n\t\t\t * save operation.\r\n\t\t\t */\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tif(is_null($this->Promotion)) {\r\n\t\t\t$this->Promotion =& ClassRegistry::init('Promotion');\r\n\t\t}\r\n\t\t\t\r\n\t\t$start_date = $this->Promotion->getStartDate();\r\n\t\t$location = $this->data['Location'];\r\n\t\t\r\n\t\t/**\r\n\t\t * Clear the data array to prepare for it's reformat. All of the data that was \r\n\t\t * passed in is now stored in $location\r\n\t\t */\r\n\t\t$this->create();\r\n\t\t$this->id = $location['id'];\r\n\t\t$this->data['Location'] = array(\r\n\t\t\t'id'\t\t\t\t=> $location['id'],\r\n\t\t\t'modified' \t\t=> $location['modified'],\r\n\t\t\t'city' \t\t\t\t=> $location['city'],\r\n\t\t\t'state' \t\t\t=> $location['state'],\r\n\t\t\t'zip_code' \t\t\t=> $location['postal_code'],\r\n\t\t\t'street_address' \t=> $location['street_address'],\r\n\t\t\t'phone_number' \t\t=> $location['phone'],\r\n\t\t\t'latitude' \t\t\t=> $location['lat'],\r\n\t\t\t'longitude' \t\t=> $location['lng'],\r\n\t\t\t'total_points'\t\t=> 0\r\n\t\t);\r\n\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "418dd39cc1088da3206036d9e658be11", "score": "0.61569077", "text": "public function beforeSave() {\n\t\t$this->hashPasswords(null, true);\n\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "9570ce194363786bba57e39d6fa8023e", "score": "0.6152063", "text": "function save()\n {\n if( $this->has_changed() )\n {\n if( $this->prep_changes() )\n {\n if( $this->validate_changes($skip_prep = true) )\n {\n return $this->write_changes($skip_checks = true);\n }\n }\n\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "2a27b21accbe293d6e7244b57636868c", "score": "0.61463654", "text": "protected function beforeDataValidation(): void\n {\n }", "title": "" }, { "docid": "4080ec57104c98541bdbef0b6c30d34c", "score": "0.61268914", "text": "public function beforeValidationOnUpdate();", "title": "" }, { "docid": "0d477df19c465d0966b713f3f3475b19", "score": "0.6123448", "text": "public function beforeSave()\n {\n if (!isset($this->slug) || empty($this->slug)) {\n $this->slug = Str::slug($this->title);\n }\n\n if (!isset($this->user_id) || empty($this->user_id)) {\n $this->user_id = 0;\n }\n\n if ($this->status == 1 && empty($this->published_at)) {\n $this->published_at = Carbon::now();\n }\n }", "title": "" }, { "docid": "b2daf02ec8fabbe085ac0d21d13a504c", "score": "0.61222076", "text": "function beforeRestore() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f6282c04812718156012f04dbe441646", "score": "0.61195385", "text": "public function beforeSave()\n {\n if(!empty($this->sector))\n {\n if(!empty($this->sector->has_child) && $this->status == 2)\n throw new ValidationException(['sector' => 'Выбрана категория не последнего уровня!']);\n }\n\n }", "title": "" }, { "docid": "e602447318f7393a68142624786a6664", "score": "0.61013776", "text": "protected function beforeValidate()\n\t{\n\t\t$this->lastUpdatedBy=Yii::app()->user->id;\n\t\t\n\t\tif($this->isNewRecord)\n\t\t{\n\t\t\t$this->created=$this->lastModified=date('Y-m-d H:i:s');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->lastModified=date('Y-m-d H:i:s');\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "39fab2fbcc9f4852278f1013be11f10e", "score": "0.6096815", "text": "public function before_save() {\n\n // Filter fields into ActiveRecord\n $this->_filter_fields();\n }", "title": "" }, { "docid": "d97368ffe6e8d054cea4bf9a28f1152e", "score": "0.60933757", "text": "public function beforeValidationOnCreate()\n {\n //Status\n $this->status = 0;\n // Timestamp\n $this->createdAt = time();\n }", "title": "" }, { "docid": "32c40c5f37f32e3f3b60c32a97ca8262", "score": "0.6081252", "text": "function beforeValidate()\n\t{\n\t\t$date_end = $date_start = false;\n\t\tforeach (array('start', 'end') as $inp_type)\n\t\t{\n\t\t\tif (!empty($this->data[$this->alias][$inp_type]))\n\t\t\t{\n\t\t\t\t${\"date_$inp_type\"} = strtotime($this->data[$this->alias][$inp_type]);\n\t\t\t\tif (empty(${\"date_$inp_type\"}))\n\t\t\t\t{\n\t\t\t\t\t$this->invalidate($inp_type, 'Data inválida');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->data[$this->alias]['payment_date']))\n\t\t{\n\t\t\t$payment_date = strtotime($this->data[$this->alias]['payment_date']);\n\t\t\tif (!$payment_date || $payment_date < strtotime(date('d-m-Y')))\n\t\t\t{\n\t\t\t\t$this->invalidate('payment_date', __d('sui', 'A data limite não pode ter passado, ainda.', true));\n\t\t\t}\n\t\t\telseif ($date_end && $date_end > $payment_date)\n\t\t\t{\n\t\t\t\t$this->invalidate('payment_date', __d('sui', 'A data limite tem que ser posterior ou junto ao final do período', true));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->exists())\n\t\t{\n\t\t\tswitch ($this->field('status'))\n\t\t\t{\n\t\t\t\tcase 'past':\n\t\t\t\t\t$this->invalidate('title', 'Esse período já foi encerrado e não pode mais ser alterado.');\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak; // useless break, i know.\n\n\t\t\t\tcase 'current':\n\t\t\t\t\tif ($date_start)\n\t\t\t\t\t{\n\t\t\t\t\t\t$current_start = strtotime((string) $this->field('start'));\n\t\t\t\t\t\tif ($date_start != $current_start)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->invalidate('start', 'Esse período já está em vigor, portanto não é mais possível alterar a data de início.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($date_end)\n\t\t\t\t\t{\n\t\t\t\t\t\t$current_end = strtotime((string) $this->field('end'));\n\t\t\t\t\t\tif ($date_end > $current_end)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->invalidate('end', 'Para prorrogação, crie um novo período ao invés de alterar esse.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'waiting':\n\t\t\t\t\tif ($date_end && $date_end < time())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->invalidate('end', 'O final do período precisa ser uma data que não passou ainda.');\n\t\t\t\t\t}\n\t\t\t\t\telseif ($date_start && $date_end && $date_end < $date_start)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->invalidate('end', 'A data de término está antes da data de inicio.');\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6ef0447ba9dc86fb5dd011093408701c", "score": "0.6077779", "text": "public function afterSave()\n {\n $this->saveGroups();\n return true;\n }", "title": "" }, { "docid": "5ca59029aa25abbdae54c0c2afda1d9a", "score": "0.6070422", "text": "protected function beforeSave() {\n //if($this->id == Yii::app()->user->id)\n //Yii::app()->user->refreshModel();\n\n if(parent::beforeSave()) {\n $this->first_name = trim($this->first_name);\n $this->last_name = trim($this->last_name);\n $this->email = trim($this->email);\n\n if(ClientDetectorComponent::getInstance()->isUmg() && $this->attributeChanged('company_name')){\n $partnerId = $this->getUMGPartnerId();\n if($partnerId){\n PartnerProjectCompany::updateCompany($partnerId, $this->id, $this->company_name);\n }\n }\n\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "940a9340c581a7d8a95004c7dbfa9776", "score": "0.6049569", "text": "protected function shouldSave()\n {\n return $this->save;\n }", "title": "" }, { "docid": "631027464fa121c4e19909fe66644790", "score": "0.6025914", "text": "protected function postSave() {}", "title": "" }, { "docid": "d6edf488029b5e66e13e9e77ca283fb2", "score": "0.6025831", "text": "protected function _preSend(): bool\n {\n if ($this->fireEventCancel('beforeValidationOnSend') === false) {\n return false;\n }\n\n $validation = null;\n if (method_exists($this, 'validation')) {\n $validation = $this->validation();\n }\n\n if ($this->fireEventCancel('validation') === false) {\n return false;\n }\n\n if (is_object($validation) && $validation instanceof ValidationInterface) {\n $calledClass = get_called_class();\n $properties = (new \\ReflectionObject($this))\n ->getProperties();\n\n $data = [];\n\n foreach ($properties as $property) {\n if ($property->class !== $calledClass) {\n continue;\n }\n $property->setAccessible(true);\n $data[$property->getName()] = $property->getValue($this);\n }\n\n $messages = $validation->validate($data);\n if (count($messages)) {\n foreach ($messages as $message) {\n $this->appendMessage(\n new Message(\n $message->getMessage(),\n $message->getField(),\n $message->getType(),\n $this,\n $message->getCode()\n )\n );\n }\n $this->fireEvent('onValidationFails');\n $this->_cancelOperation();\n return false;\n }\n } elseif ($validation === false) {\n return false;\n }\n\n if ($this->fireEventCancel('afterValidationOnSend') === false) {\n return false;\n }\n\n if ($this->fireEventCancel('beforeSend') === false) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "eab3f9873497277b83ad74b531dacad7", "score": "0.6024861", "text": "public function beforeSave()\n {\n if($this->ccxg_ccgr_id == Yii::app()->params['ccgr_group_sys_company']\n && !Yii::app()->user->checkAccess(\"Administrator\"))\n {\n return false;\n }\n \n return parent::beforeSave();\n\n }", "title": "" }, { "docid": "e6c44fcc8df68a6cc3221ead4fb07a52", "score": "0.6020114", "text": "protected function beforeSave()\n\t{\n\t\tif(parent::beforeSave())\n\t\t{\n\t\t\tif($this->isNewRecord)\n\t\t\t{\n\t\t\t\t$this->project_id=Yii::app()->project->id;\n\t\t\t\t$this->profile_id=Yii::app()->profile->id;\n\t\t\t}\n\t\t\telse\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\t\n\t}", "title": "" }, { "docid": "8e985d40b185198b426957da36590734", "score": "0.60192704", "text": "public function afterSave()\n\t{\n\t\tif(parent::afterSave())\n\t\t{\n\t\t\t$event = new Event($this->savingData);\n\t\t\tEvent::trigger($this, self::EVENT_AFTER_SAVE, $event);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\tfalse;\n\t}", "title": "" }, { "docid": "15e4ead17dfc54f8c7f01af0a5b38aaf", "score": "0.6010561", "text": "protected function beforeValidate()\n {\n $this->setDefaultAttributes();\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "fcfbc03919ed725d6f73e826341b9d9f", "score": "0.60086447", "text": "public function save() {\r\n\t\t// check validity\r\n\t\tif (! $this->isValid()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->triggerEvent(self::EVENT_BEFORE_SAVE);\r\n\r\n\t\t// extract allowed fields and set auto values for certain fields\r\n\t\t// insert or update record to database\r\n\t\tif ($this->isNew()) {\r\n\t\t $values = $this->setAutoFields($this->getValues('all'));\t\r\n\t\t\t$this->saved = $this->insertRecord($values);\r\n\t\t\t$this->setExistence(true);\r\n\t\t}\r\n\t\telse {\r\n\t\t $values = $this->setAutoFields($this->getValues('modified'));\t\r\n\t\t $this->saved = $this->updateRecord($values);\r\n\t\t}\r\n\r\n\t\t// also update associated objects\r\n\t\tif ($this->saved && $this->relations) {\r\n\t\t\t$this->saved = $this->triggerAssociationStrategy('save');\r\n\t\t}\r\n\r\n\t\t// reset modification flag, clear cache and trigger event\t\t\r\n\t\tif ($this->saved) { \r\n\t\t if ($this->isCached()) {\r\n\t\t\t\ttx_auxo_cache::remove($this->cacheID);\r\n\t\t\t\t$this->cached = false; \r\n\t\t\t\t$this->cacheID = NULL;\r\n\t\t\t} \r\n\t\t\t$this->modified = false;\r\n\t\t\t$this->modifiedFields = array();\r\n\t\t\t$this->triggerEvent(self::EVENT_AFTER_SAVE);\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->saved;\r\n\t}", "title": "" }, { "docid": "80a4c46878174ede77aaed7145f0084f", "score": "0.6008131", "text": "public function afterSave() {\n\t\tif ($this->object->alias == 'empty-resource-alias') {\n\t\t\t$this->object->set('alias', $this->object->id);\n\t\t\t$this->object->save();\n\t\t}\n\n//\t\t$this->object->addLock();\n\t\t$this->setParentToContainer();\n\t\t$this->saveResourceGroups();\n $this->checkIfSiteStart();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "676008bd4f6c2912b02121d9ca7b979a", "score": "0.60015446", "text": "protected function beforeSave()\n \t{\n \t\tif (parent::beforeSave()) {\n \t\t\tif (!empty($this->date_open)) {\n \t\t\t\tif (!is_numeric($this->date_open)) {\n \t\t\t\t\t$this->date_open = strtotime($this->date_open);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!empty($this->date_close)) {\n \t\t\t\tif (!is_numeric($this->date_close)) {\n \t\t\t\t\t$this->date_close = strtotime($this->date_close);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!empty($this->date_submit)) {\n \t\t\t\tif (!is_numeric($this->date_submit)) {\n \t\t\t\t\t$this->date_submit = strtotime($this->date_submit);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!empty($this->date_process)) {\n \t\t\t\tif (!is_numeric($this->date_process)) {\n \t\t\t\t\t$this->date_process = strtotime($this->date_process);\n \t\t\t\t}\n \t\t\t}\n\n \t\t\t// auto deal with date added and date modified\n \t\t\tif ($this->isNewRecord) {\n \t\t\t\t$this->date_added = $this->date_modified = time();\n \t\t\t} else {\n \t\t\t\t$this->date_modified = time();\n \t\t\t}\n\n \t\t\t// json\n \t\t\t$this->json_extra = json_encode($this->jsonArray_extra);\n \t\t\tif ($this->json_extra == 'null') {\n \t\t\t\t$this->json_extra = null;\n \t\t\t}\n\n \t\t\t// save as null if empty\n \t\t\tif (empty($this->text_short_description)) {\n \t\t\t\t$this->text_short_description = null;\n \t\t\t}\n \t\t\tif (empty($this->html_content)) {\n \t\t\t\t$this->html_content = null;\n \t\t\t}\n \t\t\tif (empty($this->image_cover)) {\n \t\t\t\t$this->image_cover = null;\n \t\t\t}\n \t\t\tif (empty($this->image_header)) {\n \t\t\t\t$this->image_header = null;\n \t\t\t}\n \t\t\tif (empty($this->url_video)) {\n \t\t\t\t$this->url_video = null;\n \t\t\t}\n \t\t\tif (empty($this->url_application_form)) {\n \t\t\t\t$this->url_application_form = null;\n \t\t\t}\n \t\t\tif (empty($this->html_deliverable)) {\n \t\t\t\t$this->html_deliverable = null;\n \t\t\t}\n \t\t\tif (empty($this->html_criteria)) {\n \t\t\t\t$this->html_criteria = null;\n \t\t\t}\n \t\t\tif (empty($this->prize_title)) {\n \t\t\t\t$this->prize_title = null;\n \t\t\t}\n \t\t\tif (empty($this->html_prize_detail)) {\n \t\t\t\t$this->html_prize_detail = null;\n \t\t\t}\n \t\t\tif (empty($this->date_open) && $this->date_open !== 0) {\n \t\t\t\t$this->date_open = null;\n \t\t\t}\n \t\t\tif (empty($this->date_close) && $this->date_close !== 0) {\n \t\t\t\t$this->date_close = null;\n \t\t\t}\n \t\t\tif (empty($this->ordering) && $this->ordering !== 0) {\n \t\t\t\t$this->ordering = null;\n \t\t\t}\n \t\t\tif (empty($this->text_remark)) {\n \t\t\t\t$this->text_remark = null;\n \t\t\t}\n \t\t\tif (empty($this->json_extra)) {\n \t\t\t\t$this->json_extra = null;\n \t\t\t}\n \t\t\tif (empty($this->timezone)) {\n \t\t\t\t$this->timezone = null;\n \t\t\t}\n \t\t\tif (empty($this->process_by)) {\n \t\t\t\t$this->process_by = null;\n \t\t\t}\n \t\t\tif (empty($this->date_submit) && $this->date_submit !== 0) {\n \t\t\t\t$this->date_submit = null;\n \t\t\t}\n \t\t\tif (empty($this->date_process) && $this->date_process !== 0) {\n \t\t\t\t$this->date_process = null;\n \t\t\t}\n \t\t\tif (empty($this->date_added) && $this->date_added !== 0) {\n \t\t\t\t$this->date_added = null;\n \t\t\t}\n \t\t\tif (empty($this->date_modified) && $this->date_modified !== 0) {\n \t\t\t\t$this->date_modified = null;\n \t\t\t}\n\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t}", "title": "" }, { "docid": "f6dcb5f567b5eec2acb672d0eaab56fc", "score": "0.6001185", "text": "protected function finishSave()\n {\n $this->fireModelEvent('saved', false);\n\n $this->syncOriginal();\n }", "title": "" }, { "docid": "cf169224d8a4fd5c7cf1f5773a6783c3", "score": "0.5992453", "text": "public function beforeSave() {\n $this->newObject->set('disabled', true);\n return parent::beforeSave();\n }", "title": "" }, { "docid": "a3d1013ce7cb99ac3944cffdf3b3ae1b", "score": "0.5987148", "text": "protected function beforeSave()\n {\n\n //die(var_dump($this));\n if ($this->isNewRecord) {\n if (!empty($this->time_limit) && empty($this->date_start))\n $this->date_start = date(\"Y-m-d H:i:s\");\n $this->create_user_id = is_null(Yii::app()->user->id) ? 0 : Yii::app()->getUser()->getId();\n $this->create_datetime = date(\"Y-m-d H:i:s\");\n return true;\n } else {\n $this->date_start = ($this->date_start !== '') ? $this->date_start : NULL;\n $this->time_limit = ($this->time_limit !== 0 && !is_null($this->date_start)) ? $this->time_limit : 0;\n\n $this->restricted_date = ($this->restricted_date !== '') ? $this->restricted_date : NULL;\n\n $this->restricted_interval = ($this->restricted_interval !== '') ? $this->restricted_interval : NULL;\n $this->start_time = ($this->start_time !== '') ? $this->start_time : NULL;\n $this->end_time = ($this->end_time !== '') ? $this->end_time : NULL;\n\n if (!is_null($this->date_start))\n $this->restricted_id = self::RESTRICT_IN_TIME;\n\n if (!is_null($this->restricted_date))\n $this->restricted_id = self::RESTRICT_BY_DATE;\n\n if (!is_null($this->restricted_interval))\n $this->restricted_id = self::RESTRICT_BY_INTERVAL;\n\n\n $this->update_user_id = is_null(Yii::app()->user->id) ? 0 : Yii::app()->getUser()->getId();\n $this->update_datetime = date(\"Y-m-d H:i:s\");\n return true;\n }\n return parent::beforeSave();\n }", "title": "" }, { "docid": "b3c9bd644543b0b8ee9c6fc19cc82c8f", "score": "0.5972737", "text": "public function before_save(\\Orm\\Model $obj)\n\t{\n\t\treturn $this->validate($obj);\n\t}", "title": "" }, { "docid": "a9066287b209abde8c631bac7bca3d9a", "score": "0.595535", "text": "public function preSave() {\n if ($this->getConfiguration('request') == '') {\n throw new Exception(__('La requete ne peut etre vide',__FILE__));\n\t\t}\n\t\t\n\t\t\n }", "title": "" }, { "docid": "2aace4a6703a5dc868de6cee5fb81282", "score": "0.5953887", "text": "protected function afterSave() {\n \n parent::afterSave();\n \t\n \t\t\n }", "title": "" }, { "docid": "d3445801cd75de8beb2d48eb5aa302da", "score": "0.5951286", "text": "public function testSave_returnsFalse_ifSaveFails()\n\t{\n\t\t// hmmm, how do we test this?\n\t}", "title": "" }, { "docid": "881f9cda8db981027ee344b65eaf0fdd", "score": "0.59376234", "text": "function beforeSave()\r\n\t\t{\r\n\t\t\tif (!parent::beforeSave())\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (isset($this->data[$this->alias]['attachment_file']['tmp_name']))\r\n\t\t\t{\r\n\t\t\t\tif ($this->data[$this->alias]['attachment_file']['size'] > 0 && file_exists($this->data[$this->alias]['attachment_file']['tmp_name']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->data[$this->alias]['attachment'] = file_get_contents($this->data[$this->alias]['attachment_file']['tmp_name']);\r\n\t\t\t\t\t$this->data[$this->alias]['attachment_name'] = $this->data[$this->alias]['attachment_file']['name'];\r\n\t\t\t\t\t$this->data[$this->alias]['attachment_type'] = $this->data[$this->alias]['attachment_file']['type'];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->data[$this->alias]['attachment'] = null;\r\n\t\t\t\t\t$this->data[$this->alias]['attachment_name'] = null;\r\n\t\t\t\t\t$this->data[$this->alias]['attachment_type'] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "55c5d58d523ec1bff9541da88e3740b5", "score": "0.59265935", "text": "public function before_process()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "a64e7b30ac28b8cc8d1c30df7b3f433e", "score": "0.5923418", "text": "protected function afterSave()\n\t{\n\t\tparent::afterSave();\n\t}", "title": "" }, { "docid": "983268fc055f476d9d94643a3d4c9988", "score": "0.59139997", "text": "public function beforeSave() {\n\t\t\t$result = parent::beforeSave();\n\t\t\tif (!$this->exists()) {\n\t\t\t\t$this->siteTemplateID = NULL;\n\t\t\t\t$this->setRaw('dateAdded', 'NOW()');\n\t\t\t\t$this->setRaw('lastModified', 'NOW()');\n\t\t\t} else {\n\t\t\t\t$this->setRaw('lastModified', 'NOW()');\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "da6ce9c9ccaf40bbfb7d5b81083d279c", "score": "0.5911047", "text": "public function beforeSave($isUpdate) {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a9a8935207baed627c62dc4a12cadf5c", "score": "0.5907986", "text": "protected function beforeSave()\n\t{\n\t\tif(parent::beforeSave())\n\t\t{\n\t\t\tif($this->isNewRecord)\n\t\t\t\t$this->create_time=time();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "b93661f31835c8243d2ec5dbde6614c0", "score": "0.5905508", "text": "public function onBeforeValidate($event) \n {\n parent::onBeforeValidate($event);\n \n $success = true;\n $this->setTimeout();\n\n if(!$this->pieces) //happens on new BTransfer\n {\n $pieces = new BPieces ();\n $pieces->transfer_id = $this->id;\n $pieces->pieces = $pieces->createPieceString($this->piece_count);\n $success = $pieces->save();\n\n }\n\n return $success;\n }", "title": "" }, { "docid": "a172f0696e32d5d56837755573409b1a", "score": "0.59030867", "text": "protected function beforeSave()\n\t{\n\t\tif (parent::beforeSave()) {\n\t\t\tif ($this->isNewRecord)\n\t\t\t\t$this->publishedAt = time();\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "226a5345b3d44e4e55e25aa3465364ee", "score": "0.58940494", "text": "public function precheck();", "title": "" }, { "docid": "86914fc79d49ef79fa873480009b453f", "score": "0.5891994", "text": "function save() {\n \t\t$return = true;\n \t\tforeach ( $this as $oObject ) {\n \t\t\t$return = $oObject->save() && $return;\n \t\t}\n \t\t$this->setModified(false);\n \t\treturn $return;\n \t}", "title": "" }, { "docid": "2fba8e30e3c6c969b02b7830df9a846e", "score": "0.58892924", "text": "public function beforeSave()\n {\n if ($this->getOption('subjectId') > 0) {\n $this->getElement('cmsContactOptionId')->setValue($this->getOption('subjectId'));\n }\n return true;\n }", "title": "" }, { "docid": "2e658355d84bbd85b5d74d47985bf280", "score": "0.5888383", "text": "protected function beforeValidate() {\n\t\tif ($this->isNewRecord) {\n\t\t\t$this->created = new CDbExpression('NOW()');\n\t\t\t$this->priority = 1;\n\t\t}\n\t\t$this->modified = new CDbExpression('NOW()');\n\n\t\treturn parent::beforeValidate();\n\t}", "title": "" }, { "docid": "e6020b69b13ba760e2c143c776b04803", "score": "0.58876127", "text": "public function pre_save($model, $update) {}", "title": "" } ]
3f20a3b70bc30eb9ca9cf6fa13a09d82
Set properties (requires and identifying property of ID or email)
[ { "docid": "5f49b8207215c748813adbf62aa78dea", "score": "0.0", "text": "function identify($props = array()){\n $this->set_id($props);\n\n if (!isset($this->id)) {\n $this->GS->debug('Missing ID and email', E_USER_WARNING);\n return false;\n }\n\n return $this->exec('/identify', array(), array('properties' => $props));\n }", "title": "" } ]
[ { "docid": "76315a545895a2c7b2db965ae1dfb633", "score": "0.7556127", "text": "function set_properties($props){\n $this->set_id($props);\n\n if (!$this->verify_id()) return false;\n\n return $this->exec('/properties', array(), array('properties' => $props));\n }", "title": "" }, { "docid": "43fc95ab391d4b29dec3228e168ae860", "score": "0.71436137", "text": "function set_id($v){\n if (!$v) return;\n\n if (is_array($v)) {\n // try to grab the ID out of the object\n if (isset($v['id'])) {\n $this->id = $v['id'];\n\n // no id in props and none already set, try email\n } else if (!isset($this->id) && isset($v['email'])) {\n $this->id = 'email:' . $v['email'];\n }\n } else {\n $this->id = $v;\n }\n }", "title": "" }, { "docid": "44b26d5a0327f60246c12e7d2a5fa230", "score": "0.6659881", "text": "public function setId($id) { $this->onPropertySet('id',$id); }", "title": "" }, { "docid": "76bfaeb5898f3cc226b5476127c10d71", "score": "0.6643485", "text": "function set_email($email) {\n\n \tif ( ! empty($email) ) {\n\t\t\tif (is_object($email) ) {\n\t\t\t\t$this->id = $email->id;\n\t\t\t\t$this->subject = $email->subject;\n\t\t\t\t$this->body = $email->body;\n\t\t\t\t$this->timecreated = $email->timecreated;\n\t\t\t\t// Get writer\n\t\t\t\tif ( ! isset($email->writer) ) {\n\t\t\t\t\t$this->userid = $email->userid;\n\t\t\t\t} else {\n\t\t\t\t\t$this->userid = $email->writer;\n\t\t\t\t}\n\t\t\t\t$this->course = $email->course;\n\t\t\t} else if (is_int($email) ) {\n\t\t\t\tif ( $mail = get_record('email_mail', 'id', $email) ) {\n\t\t\t\t\t$this->id = $mail->id;\n\t\t\t\t\t$this->subject = $mail->subject;\n\t\t\t\t\t$this->body = $mail->body;\n\t\t\t\t\t$this->timecreated = $mail->timecreated;\n\t\t\t\t\t$this->userid = $mail->userid;\n\t\t\t\t\t$this->course = $mail->course;\n\t\t\t\t}\n\t\t\t}\n \t}\n\n }", "title": "" }, { "docid": "f4cd3b72872468e5d097f5f98eb73293", "score": "0.6538285", "text": "protected function setEmailId(){\n\t\t$this -> emailId = $this -> $name . ' <' . $this -> $emailAddress . '>';\n\t}", "title": "" }, { "docid": "69edc61fa4eaf2cf400df2c7b658cc79", "score": "0.6250621", "text": "public function setProperties($properties) {\n // unset($properties['HTTP_MODAUTH']);\n $this->properties = array_merge($this->properties,$properties);\n }", "title": "" }, { "docid": "c211494d64917d405b996a682af3379d", "score": "0.61566716", "text": "public function setEmail($email) {\n $this->userdetails['email'] = $email;\n // update into database\n }", "title": "" }, { "docid": "c211494d64917d405b996a682af3379d", "score": "0.61566716", "text": "public function setEmail($email) {\n $this->userdetails['email'] = $email;\n // update into database\n }", "title": "" }, { "docid": "b69dfc7a47b88d9a7680ccc70a2145cb", "score": "0.6151833", "text": "function _set_properties($props = array())\n\t{\n\t\tif (count($props) > 0)\n\t\t{\n\t\t\tforeach ($props as $key => $val)\n\t\t\t{\n\t\t\t\t$this->$key = $val;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a05f252bfd9a1a0ee5a659a93679d253", "score": "0.6136686", "text": "public function setProperties($properties)\n {\n \tif (!is_array($properties)) {\n \t\t$properties = array($properties);\n \t}\n while (list($name, $value) = each($properties)) {\n if (!is_valid_prop($name)) {\n error_log(\"'$name' is an invalid property name when building form.\");\n continue;\n } \n // ignore it if it was already set\n if (!isset($this->$name)) {\n $this->$name = $value;\n }\n }\n }", "title": "" }, { "docid": "141d1565906154fea49e269eb8f9a093", "score": "0.6100217", "text": "public function set($properties)\n {\n foreach (get_object_vars($this) as $var => $value) {\n switch ($var) {\n # convert true/false property values to boolean\n case 'enableErrorEmail':\n case 'enableSummaryEmail':\n case 'isActive':\n case 'dbSsl':\n case 'dbSslVerify':\n if (!array_key_exists($var, $properties)) {\n $this->$var = false;\n } else {\n if ($properties[$var]) {\n $this->$var = true;\n } else {\n $this->$var = false;\n }\n }\n break;\n default:\n if (array_key_exists($var, $properties)) {\n $this->$var = Filter::sanitizeString($properties[$var]);\n $this->$var = trim($this->$var);\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "ff6626fcbc57f894fced885f611dd461", "score": "0.6040457", "text": "public function updateProperties();", "title": "" }, { "docid": "5d80524cd6479fe828c50901d54b6081", "score": "0.6021828", "text": "public function setProperties($data){\r\n foreach($data as $key => $value){\r\n $this->_setProperty($key, $value);\r\n }\r\n }", "title": "" }, { "docid": "6473e587903eab5a63e77ffb53a8ccbc", "score": "0.5986349", "text": "function setEmail($email)\r\n {\r\n $this->email = $email;\r\n }", "title": "" }, { "docid": "234b699c09130b60aad863bc5cbcf867", "score": "0.59802735", "text": "public function set_properties($properties) {\n is_array($properties) or $properties = array($properties => null);\n foreach($properties as $name => $value) {\n $value or $value = false;\n $this->$name = $value;\n }\n }", "title": "" }, { "docid": "81c6769f2a112d555a4530ae19b62cba", "score": "0.5964277", "text": "public function put($id, Property $property);", "title": "" }, { "docid": "571e2ec71f825f208cd3aee25f1631c9", "score": "0.5938502", "text": "public function setProperties(array $properties): void;", "title": "" }, { "docid": "680a692105130169348204390abe4068", "score": "0.59329814", "text": "function setProperties( $properties )\r\r\n\t{\r\r\n\t\t$properties = (array) $properties; //cast to an array\r\r\n\r\r\n\t\tif (is_array($properties))\r\r\n\t\t{\r\r\n\t\t\tforeach ($properties as $k => $v) {\r\r\n\t\t\t\t$this->$k = $v;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\r\r\n\t\treturn false;\r\r\n\t}", "title": "" }, { "docid": "fd7af7efb4459e2e619fcaddab52de7f", "score": "0.5900342", "text": "function setProperties(&$properties) {\n\t\t// Remove the existing properties\n\t\t$this->_properties = array();\n\n\t\t// Insert the new properties\n\t\tforeach($properties as $property) {\n\t\t\t$this->addProperty($property);\n\t\t}\n\t}", "title": "" }, { "docid": "e5365a138c0f006174a1b081e6256bcc", "score": "0.58991313", "text": "public function setEmail( $email )\n {\n\t$this->email = $email;\n }", "title": "" }, { "docid": "5bfd114e7b3beca0a48f6f4ebc7bd0c9", "score": "0.58872193", "text": "private function setEmail() {\n $this->account_email = $this->getAccountInfoFromDB('email');\n }", "title": "" }, { "docid": "9397964ef7b3b32d3c7dc68e252706c8", "score": "0.58402866", "text": "function setEmail( &$value )\r\n {\r\n if ( is_a( $value, \"eZOnline\" ) )\r\n $this->OnlineID = $value->id();\r\n else\r\n $this->OnlineID = $value;\r\n }", "title": "" }, { "docid": "94f7596f18ff266bbf346aeccb42e8b1", "score": "0.5829344", "text": "public function _setEmail($email) {\n\t\t$this->_email = $email;\n\t}", "title": "" }, { "docid": "126af0aa462a6f9e8350f485215279cd", "score": "0.5824822", "text": "public function setProperties($properties) {\n\t\tforeach ($properties as $newpropertyk => $newpropertyv) {\n\t\t\t$cmd = \"zfs set \" . $newpropertyk . \"=\" . $newpropertyv . \" \\\"\" . $this->name . \"\\\" 2>&1\";\n\t\t\t$this->exec($cmd,$out,$res);\n\t\t\t$this->updateProperty($newpropertyk);\n\t\t}\n\t}", "title": "" }, { "docid": "246e699b298c936044d64750db5d5690", "score": "0.58180344", "text": "public function set_id($id)\n {\n $this->set_property(self::PROPERTY_ID, $id);\n }", "title": "" }, { "docid": "f7696098be9132c534ae14e67c64ac82", "score": "0.5811133", "text": "public function setMailId($mailid){\n $this->mailid=$mailid;\n }", "title": "" }, { "docid": "aee58a753e0c95092200710aba7dae66", "score": "0.5788128", "text": "public function keyPartySetPropertiesFromData($data);", "title": "" }, { "docid": "2ffdaf39622fe856b43224fed1bd3f21", "score": "0.577549", "text": "public function setAttributes($data){\n\n if(isset($data[\"id\"])){\n $this->setAttribute(\"id\", $data[\"id\"]);\n }\n\n if(isset($data[\"gen-password\"])){\n $this->setAttribute(\"password\", $data[\"gen-password\"]);\n }\n\n if(isset($data[\"name\"])){\n $this->setAttribute(\"name\", $data[\"name\"]);\n }\n\n if(isset($data[\"contact\"])){\n $this->setAttribute(\"contact\", $data[\"contact\"]);\n }\n\n if(isset($data[\"billing_name\"])){\n $this->setAttribute(\"billing_name\", $data[\"billing_name\"]);\n }\n\n if(isset($data[\"purchase_order\"])){\n $this->setAttribute(\"purchase_order\", $data[\"purchase_order\"]);\n }\n\n if(isset($data[\"school_email\"])){\n $this->setAttribute(\"school_email\", $data[\"school_email\"]);\n }\n\n if(isset($data[\"phone\"])){\n $this->setAttribute(\"phone\", $data[\"phone\"]);\n }\n if(isset($data[\"fax\"])){\n $this->setAttribute(\"fax\", $data[\"fax\"]);\n }\n if(isset($data[\"league_id\"])){\n $this->setAttribute(\"league_id\", $data[\"league_id\"]);\n }\n\n if(isset($data[\"email_2\"])){\n $this->setAttribute(\"email_2\", $data[\"email_2\"]);\n }\n\n if(isset($data[\"email_3\"])){\n $this->setAttribute(\"email_3\", $data[\"email_3\"]);\n }\n\n if(isset($data[\"email_4\"])){\n $this->setAttribute(\"email_4\", $data[\"email_4\"]);\n }\n\n\n \n }", "title": "" }, { "docid": "5b6c20b12b332a05240e6c1e0bca46e2", "score": "0.5746668", "text": "public function setProperty(string $property, string $value, string $scope, string $verified): IAccount;", "title": "" }, { "docid": "2967b536b0e4b643a02c851aa1867bc1", "score": "0.5732064", "text": "protected function setEmail($email) {\n $this->email = $email;\n }", "title": "" }, { "docid": "ff088437876f492e72cc3657e9bd8a6a", "score": "0.5729916", "text": "public function set_email($email){\n\t\t$this->email=$email;\n\t}", "title": "" }, { "docid": "ff088437876f492e72cc3657e9bd8a6a", "score": "0.5729916", "text": "public function set_email($email){\n\t\t$this->email=$email;\n\t}", "title": "" }, { "docid": "d092bff7fcfbe8708deb0a74fbb834c3", "score": "0.572057", "text": "function setProperties($properties = null) {\n\t\n\t\tif(!empty($properties)) {\n\t\t\t\n\t\t\tif (empty($this->properties)) {\n\t\t\t\t$this->properties = $properties;\n\t\t\t} else {\t\n\t\t\t\t$this->properties = array_merge($this->properties, $properties);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e47a6100c6b5b2d321a42aee1d961414", "score": "0.5718594", "text": "public function set_properties ()\n {\n do {\n display ( \"Enter a property ( name:access:value ) or enter n to continue...\\n\" );\n $prop = trim ( fgets ( STDIN ) );\n\n if ($prop != 'n') {\n $parts = explode ( ':', $prop );\n $this->_properties[] = array ( 'name' => $parts[0],\n 'access' => $parts[1],\n 'value' => $parts[2] );\n }\n } while ( $prop != 'n' );\n }", "title": "" }, { "docid": "e9190ac40aabd6850d2eabeb7395ffaf", "score": "0.57179976", "text": "function setNewProperties( $properties = array() ) {\n\t\n\t\t$this->properties = array_merge($properties, $this->properties);\n\t\n\t}", "title": "" }, { "docid": "62044206d2cb4abf3029660e8e53f4d6", "score": "0.5692658", "text": "public function setEmail($value);", "title": "" }, { "docid": "ba2f2ba233ac4ca77fa291ba2a2ff2d0", "score": "0.5692538", "text": "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "title": "" }, { "docid": "3f96a065c7d9f66f6210a6658523c7d3", "score": "0.56840813", "text": "function set_useremail($useremail){\n $this->useremail = $useremail;\n }", "title": "" }, { "docid": "d562d1d224364c946d2ba2317260909d", "score": "0.5681724", "text": "public function setEmail($email){\n parent::setEmail($email);\n $this->setUsername($email);\n }", "title": "" }, { "docid": "8cebebd444fec91194395ee83ac3cdcc", "score": "0.5680334", "text": "public function setEmailAddress($email)\n {\n $this->app->beginTransaction();\n try\n {\n $filters = array();\n $filters[] = new GcrDatabaseQueryFilter('owner', '=', $this->obj->id);\n $filters[] = new GcrDatabaseQueryFilter('title', '=', $this->obj->email);\n $filters[] = new GcrDatabaseQueryFilter('artefacttype', '=', 'email');\n $q = new GcrDatabaseQuery($this->app, 'artefact', 'select * from', $filters);\n $mhr_artefact = $q->executeQuery(true);\n if ($mhr_artefact)\n {\n $mhr_artefact_internal_profile_email = $this->app->selectFromMhrTable('artefact_internal_profile_email', \n 'artefact', $mhr_artefact->id, true);\n if ($mhr_artefact_internal_profile_email)\n {\n $this->app->updateMhrTable('artefact_internal_profile_email', array('email' => $email),\n array('artefact' => $mhr_artefact->id));\n }\n $this->app->updateMhrTable('artefact', array('title' => $email), array('id' => $mhr_artefact->id));\n }\n $eschools = $this->app->getMnetEschools();\n foreach($eschools as $eschool)\n {\n $mdl_user = $this->getUserOnEschool($eschool);\n if ($mdl_user)\n {\n $eschool->updateMdlTable('user', array('email' => $email), \n array('id' => $mdl_user->getObject()->id));\n }\n }\n $this->app->updateMhrTable('usr', array('email' => $email), array('id' => $this->obj->id));\n }\n catch (Doctrine_Exception $e)\n {\n $this->app->rollbackTransaction();\n $this->app->gcError($e->getMessage(), 'gcdatabaseerror');\n }\n $this->app->commitTransaction();\n }", "title": "" }, { "docid": "156ed8d86b5d27344b9fbc42ac7ae957", "score": "0.5665939", "text": "public function setEmail($email) { \n\t\t$this->checkDisposed();\n\t\t\t\n\t\t$email = trim($email);\n\t\t\t\n\t\t// Check if email address exists\n\t\tif ($email && !self::isEmailAvailable($email))\n\t\t\tthrow new ArgumentException('There is already a user using this email '.\n\t\t\t\t'address');\n\t\t\t\n\t\tDataBaseHelper::update('Premanager', 'Users',\n\t\t\tDataBaseHelper::UNTRANSLATED_NAME, $this->_id, null,\n\t\t\tarray('email' => $email),\n\t\t\tarray()\n\t\t); \n\t\t\n\t\t$this->_email = $email;\n\t}", "title": "" }, { "docid": "c46b6783da03a94928dbff5a57daa91a", "score": "0.5665335", "text": "function set_mailid($id) {\n\t\t// Forbidden negative id's and zeros\n\t\tif ( $id > 0 ) {\n\t\t\t$this->id = $id;\n\t\t}\n\t}", "title": "" }, { "docid": "d52829c6e3130dcdf3af69c833ece748", "score": "0.5663706", "text": "public function setValues ($properties) {\n\n\t\tif (is_array($properties)) {\n\t\t\tforeach ($properties as $key => $val) {\n\t\t\t\tif (isset($key)) {\n\t\t\t\t\t$this->$key = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "570289d6401c6320d3430bcbfe4af809", "score": "0.5632688", "text": "public function updateProperties(array $properties)\n {\n // Setting identifier and name to update values\n if (isset($properties['identifier'])) {\n $this->identifier = $properties['identifier'];\n }\n if (isset($properties['name'])) {\n $this->name = $properties['name'];\n }\n }", "title": "" }, { "docid": "fe69cafc13e14e89cf6932e1837282f4", "score": "0.5626921", "text": "public function setEmail($email);", "title": "" }, { "docid": "fe69cafc13e14e89cf6932e1837282f4", "score": "0.5626921", "text": "public function setEmail($email);", "title": "" }, { "docid": "fe69cafc13e14e89cf6932e1837282f4", "score": "0.5626921", "text": "public function setEmail($email);", "title": "" }, { "docid": "62e6b7fb34b9569f07de2700509ad5bb", "score": "0.56248677", "text": "public function setProperties(array $properties)\n {\n $this->_properties = $properties;\n }", "title": "" }, { "docid": "82afb97d09b9b1d4b74c0821fe3fbc50", "score": "0.55906856", "text": "function set_EMAILPERSONAL($emailpersonal) {\n $this->EMAILPERSONAL = $emailpersonal;\n }", "title": "" }, { "docid": "d5d9eb3e80297780f8ed5ed433c66b45", "score": "0.55860543", "text": "protected function setProperties(array $properties = [])\n {\n $properties = empty($properties) ? request()->all() : $properties;\n \n $properties = collect($properties)\n ->flatMap(function ($value, $key) {\n $key = Str::kebab(Str::camel($key));\n $value = $this->encodeValue($value);\n \n return [$key => $value];\n })\n ->toArray();\n \n $this->properties = $properties;\n }", "title": "" }, { "docid": "3e590faf271857451e65b787a12e36db", "score": "0.5578681", "text": "public function setEmail($email){\n $this->email=$email;\n }", "title": "" }, { "docid": "649f5185fb213261509394a5bb96cabb", "score": "0.55727834", "text": "public function setEmail($email) {\n\t\t$this->_email = $email;\n\t}", "title": "" }, { "docid": "bcdec5f3aceb5ab03077c00ed039a4d9", "score": "0.5572534", "text": "final public function setProperties($properties) {\n $properties = (array) $properties; //cast to an array\n\n if (is_array($properties)) {\n foreach ($properties as $k => $v) {\n $this->$k = $v;\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d299b7b6fb5d0676ef26b08f35088c33", "score": "0.5571871", "text": "public function setEmail($email){\n\t\t\t$this->email= $email;\n\t\t}", "title": "" }, { "docid": "d9c0b63b8359ecd56198c3de529998d5", "score": "0.55645293", "text": "public function setEmail($email){\n\t\t$this->email=$email;\n\t}", "title": "" }, { "docid": "56f9fdfa1ff644a46224643b8f161ed9", "score": "0.55578667", "text": "public function setEmail(string $email)\n\t{\n\t\t$this->addKeyValue('Email', $email); \n\n\t}", "title": "" }, { "docid": "fecbc9094386ad6272e88ce7f7ae5d62", "score": "0.5551409", "text": "function setValues($aEmailId)\n\t\t{\n\t\t\tif($aEmailId == \"\" || $aEmailId == null)\n\t\t\t\t$this->mStrEmailId = \"\";\n\t\t\telse\n\t\t\t\t$this->mStrEmailId = $aEmailId;\n\t\t}", "title": "" }, { "docid": "acbdc460a15723e86b0110827ab2a3dd", "score": "0.55426294", "text": "public function __construct($id,$name, $email)\n {\n $this->id=$id;\n $this->name=$name;\n $this->email=$email;\n }", "title": "" }, { "docid": "361debb1fb1f41df55a0719ee8fdb41a", "score": "0.5537494", "text": "private function set_fake_email($mail, $set_into_meta = true)\n\t{\n\t\tif($set_into_meta === true)\n\t\t{\n\t\t\t$this->set_meta(\"tmp_fake_email\", $mail);\n\t\t\t$this->set_meta(\"sim_fake_email\", 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($GLOBALS[\"object_loader\"]->cache->can(\"view\", $this->prop(\"email_id\")))\n\t\t\t{\n\t\t\t\t$eo = obj($this->prop(\"email_id\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$eo = $this->get_first_obj_by_reltype(\"RELTYPE_EMAIL\");\n\t\t\t\tif($eo === false)\n\t\t\t\t{\n\t\t\t\t\t$eo = obj();\n\t\t\t\t\t$eo->set_class_id(CL_ML_MEMBER);\n\t\t\t\t\t$eo->set_parent($this->id());\n\t\t\t\t\t$eo->set_prop(\"name\", $this->name());\n\t\t\t\t}\n\t\t\t}\n\t\t\t$conns = connection::find(array(\"from\" => $this->id(), \"to\" => $eo->id(), \"from.class_id\" => CL_CRM_COMPANY, \"reltype\" => \"RELTYPE_EMAIL\"));\n\t\t\tif(count($conns) > 0)\n\t\t\t{\n\t\t\t\t$conn_keys = array_keys($conns);\n\t\t\t\t$eo->conn_id = reset($conn_keys);\n\t\t\t}\n\n\t\t\t$eo->set_prop(\"mail\", $mail);\n\t\t\t$eo->save();\n\n\t\t\t$this->set_prop(\"email_id\", $eo->id());\n\t\t\t$this->save();\n\t\t\t$this->connect(array(\n\t\t\t\t\"type\" => \"RELTYPE_EMAIL\",\n\t\t\t\t\"to\" => $eo->id()\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "a9736e2e1c715aca6d6e4896e4253da9", "score": "0.55352557", "text": "public function setEmail($email)\n\t\t{\n\t\t\t$this->_email = $email;\n\t\t}", "title": "" }, { "docid": "a5b3452ff1e2eef123c1036237f4cc84", "score": "0.55195594", "text": "public function setData($data) {\n\t\t$this->setId($data['id']);\n\t\t$this->setUser($data['user']);\n\t\t$this->setPassword($data['password']);\t\n\t}", "title": "" }, { "docid": "b8c3c6f405d0900c78b6b4a0abbfd240", "score": "0.5514225", "text": "public function testIdCanBeSet()\n {\n\n $entity = $this->_getEntity(array(), $this->_encoder, $this->_cache);\n $entity->setId('foo@bar');\n $this->assertEqual('foo@bar', $entity->getId());\n }", "title": "" }, { "docid": "d87790e688600d823aaaba50fadc0858", "score": "0.5509602", "text": "function setUserProperty($userid,$name,$value){\n\t\t$sql = sprintf(\"SELECT * FROM userprops WHERE userid= %d AND propname='%s'\",$userid,$name);\n\t\t$result = $this->runSql($sql);\n\t\t\n\t\twhile($row = mysql_fetch_array($result, MYSQL_ASSOC)){\n\t \t\t$updateSql = sprintf(\"UPDATE userprops SET propvalue='%s' WHERE userid= %d AND propname='%s'\",$value,$userid,$name);\n\t \t\t$result = $this->runSql($updateSql);\n\t \t\treturn;\n\t\t}\n\t\t\n\t\t$insertSql = sprintf(\"INSERT INTO userprops (propvalue, userid,propname) VALUES ('%s',%d,'%s')\",$value,$userid,$name);\n\t \t$result = $this->runSql($insertSql);\n\t}", "title": "" }, { "docid": "6acf3175913926986b3452fa166a288b", "score": "0.5497486", "text": "function core_did_edit_properties($did_vars)\n{\n global $db;\n\n if (!is_array($did_vars)) {\n return false;\n }\n\n $extension = $db->escapeSimple(isset($did_vars['extension']) ? $did_vars['extension'] : '');\n $cidnum = $db->escapeSimple(isset($did_vars['cidnum']) ? $did_vars['cidnum'] : '');\n $sql = \"\";\n foreach ($did_vars as $key => $value) {\n switch ($key) {\n case 'privacyman':\n case 'pmmaxretries':\n case 'pmminlength':\n case 'alertinfo':\n case 'ringing':\n case 'mohclass':\n case 'description':\n case 'grppre':\n case 'delay_answer':\n case 'pricid':\n case 'destination':\n $sql_value = $db->escapeSimple($value);\n $sql .= \" `$key` = '$sql_value',\";\n break;\n default:\n }\n }\n if ($sql == '') {\n return false;\n }\n $sql = substr($sql, 0, (strlen($sql) - 1)); //strip off tailing ','\n $sql_update = \"UPDATE `incoming` SET\" . \"$sql WHERE `extension` = '$extension' AND `cidnum` = '$cidnum'\";\n return sql($sql_update);\n}", "title": "" }, { "docid": "1cee916620c893ac96dff0ea031e8c54", "score": "0.54938036", "text": "function set($values)\n {\n $mailing_address = new address(distributor::get_mailing_address_id($values['distributor_id']));\n $new_address_id = $mailing_address->clone_object(\"address\");\n \n\t$this->id = null;\n\t$this->distributor_accounting_id = null;\n\t$this->commission_period_id = null;\n\t$this->order_id = null;\n\t$this->note_id = null;\n\t$this->timestamp = null;\n\t$this->check_number = null;\n $this->address_id = $new_address_id;\n\t$this->rate = null;\n\t$this->country_id = distributor::get_member_country_id($values['distributor_id']);\n\n\tparent::set($values);\n\t$this->new_record = true;\n }", "title": "" }, { "docid": "674e1794e57185d207de6d2a444389af", "score": "0.5492769", "text": "function set_RegistrantEmailAddress($email)\r\n{\r\n\t$this->RegistrantEmailAddress = $email;\r\n}", "title": "" }, { "docid": "04120c0a50ba2adae99f027d32302cd4", "score": "0.5473409", "text": "public function setEmail($email){\n\n $this->email = $email;\n \n }", "title": "" }, { "docid": "75294080899333c3d15c023d2e3d34ea", "score": "0.54666317", "text": "public function set_survey_participant_properties() {\n\t\t// check the session and attributes in the post data\n\t\tif($this->_session_key_was_sent() && $this->_attributes_are_in_post_data_and_json()) {\n\t\t\t// get attributes as an array\n\t\t\t$attrs = json_decode($_POST['attrs'],true);\n\t\t\t// make sure survey_id is in the post data\n\t\t\tif($this->_post_attributes_contains(array('survey_id','token_id','setting'))) {\n\t\t\t\t// make sure survey_id and token_id are present\n\t\t\t\tif(isset($attrs['survey_id']) && isset($attrs['token_id'])) {\n\t\t\t\t\t// make sure the setting data is an array\n\t\t\t\t\tif(is_array($attrs['setting'])) {\n\t\t\t\t\t\t// check to see if the email is being set\n\t\t\t\t\t\t$survey_participant_is_unique = TRUE;\n\t\t\t\t\t\tif(isset($attrs['setting']['email'])) {\n\t\t\t\t\t\t\t// query the email against the other participant emails\n\t\t\t\t\t\t\t$_POST['attrs'] = '{\"survey_id\":\"' . $attrs['survey_id'] . '\"}';\n\t\t\t\t\t\t\t$survey_participants_returned_array = $this->_list_survey_participants_function();\n\t\t\t\t\t\t\t// re-set $json_outhput['status'] back to error\n\t\t\t\t\t\t\t// (because the previous function call if successful set it to 'success')\n\t\t\t\t\t\t\t$this->_set_status_error();\n\t\t\t\t\t\t\t// make sure we got the participants without a hitch\n\t\t\t\t\t\t\tif($survey_participants_returned_array['status'] == 'success' || strpos($survey_participants_returned_array['result'],'No Tokens found') !== FALSE) {\n\t\t\t\t\t\t\t\t// only test the emails if they were returned\n\t\t\t\t\t\t\t\tif(is_array($survey_participants_returned_array['result'])) {\n\t\t\t\t\t\t\t\t\t// check to see if there is a duplicate (and it's not the one we're changing. Doh!)\n\t\t\t\t\t\t\t\t\tforeach ($survey_participants_returned_array['result'] as $key => $value) {\n\t\t\t\t\t\t\t\t\t\tif($value['participant_info']['email'] == $attrs['setting']['email'] &&\n\t\t\t\t\t\t\t\t\t\t $value['tid'] !== $attrs['token_id']) {\n\t\t\t\t\t\t\t\t\t\t\t$survey_participant_is_unique = FALSE;\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// the lookup failed\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->_set_result('Could not check for duplicate email addresses (' . $survey_participants_returned_array['result'] . ')');\n\t\t\t\t\t\t\t\t$survey_participant_is_unique = FALSE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// don't proceed if there is a duplicate\n\t\t\t\t\t\tif($survey_participant_is_unique) {\n\t\t\t\t\t\t\t// make sure survey_id and the token id are both intergers\n\t\t\t\t\t\t\tif($this->_is_int($attrs['survey_id']) && $this->_is_int($attrs['token_id'])) {\n\t\t\t\t\t\t\t\t// build the array we're going to send to the RPC function\n\t\t\t\t\t\t\t\t$set_participant_properties_array = array(\n\t\t\t\t\t\t\t\t\t'sSessionKey' => $_POST['session_key'],\n\t\t\t\t\t\t\t\t\t'iSurveyID' => $attrs['survey_id'],\n\t\t\t\t\t\t\t\t\t'iTokenID' => $attrs['token_id'],\n\t\t\t\t\t\t\t\t\t'aTokenData' => $attrs['setting']\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// run the JSON-RPC call\n\t\t\t\t\t\t\t\t$this->json_input = $this->client->execute('set_participant_properties', $set_participant_properties_array);\n\t\t\t\t\t\t\t\t// check the json_input and update the json output\n\t\t\t\t\t\t\t\t$this->_build_json_output_success($this->json_input);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { $this->_set_result('A participant with this email address already exists'); }\n\t\t\t\t\t// setting is not an array of data to set\n\t\t\t\t\t} else { $this->_set_result('The setting data is not in the right format (' . $_POST['attrs'] . ')'); }\n\t\t\t\t// wrong values in post data\n\t\t\t\t} else { $this->_set_result('No survey ID or token ID sent (' . $_POST['attrs'] . ')'); }\n\t\t\t}\n\t\t}\n\t\t// send a json responce back to the page\n\t\techo json_encode($this->json_output);\n\t}", "title": "" }, { "docid": "bf24e6b7c25ec6f374c62860c44f4dc7", "score": "0.54664755", "text": "public function __set(string $id, $props): void\n {\n if (is_a($props, 'sgkirby\\Commentions\\Commention') === true) {\n $object = $props;\n } else {\n if (is_array($props) === false) {\n throw new InvalidArgumentException('Invalid commentions structure data');\n }\n\n if (!array_key_exists('uid', $props)) {\n throw new InvalidArgumentException('Commentions require a \"uid\" property.');\n };\n\n $object = new Commention([\n 'content' => $props,\n 'id' => $props['uid'] ?? $id,\n 'parent' => $this->parent,\n 'structure' => $this\n ]);\n }\n\n parent::__set($object->id(), $object);\n }", "title": "" }, { "docid": "ae08bd66f5b5923d6781157dd474b986", "score": "0.546543", "text": "public function setUserEmail($email) {\n $this->email = $email;\n }", "title": "" }, { "docid": "3ebb5cc8098454d21568661465fe7253", "score": "0.5463046", "text": "public function setEmail($email)\n{\n$this->email = $email;\n\nreturn $this;\n}", "title": "" }, { "docid": "d3ab809d388fdd5b8940d2a16e52630a", "score": "0.5461799", "text": "public function setUserProperties($userProperties)\n {\n $this->_userProperties = $userProperties;\n }", "title": "" }, { "docid": "bfba06434a412cd76f4fee4076699c75", "score": "0.5461489", "text": "public function SetScrapeProperty($id, $property)\n\t{\n\t\tif (empty($id) || $property == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sig =\t$this->encode($this->applicationSecret.\"|\".$id.\"|\".$property->GetTypeName());\n\t\t\n\t\t$qs = array();\n\t\t$qs[\"key\"] = $this->applicationKey;\n\t\t$qs[\"id\"] = $id;\n\t\t$qs[\"payload\"] = $property->ToXML();\n\t\t$qs[\"type\"] = $property->GetTypeName();\n\t\t$qs[\"sig\"] = $sig;\n\n\t\treturn $this->isSuccessful($this->Post(GrabzItScrapeClient::WebServicesBaseURL . \"setscrapeproperty\", $qs));\n\t}", "title": "" }, { "docid": "13316e17ba1c81867030b00c057d51a5", "score": "0.5458913", "text": "public function testSetEmail(){\n\t\t\n\t\t// new entity\n\t\t$school = new School();\n\t\t\n\t\t// Use the setEmail method \n\t\t$school->setEmail(\"[email protected]\");\n\t\t\n\t\t// Assert the result \n\t\t$this->assertEquals(\"[email protected]\", $school->getEmail());\n\t\t\n\t}", "title": "" }, { "docid": "b01ccb98b047ffbcb19d883205690f7c", "score": "0.5455122", "text": "public function populate($data = array()) {\n $this->id = $data['id'];\n $this->username = $data['email'];\n $this->displayName = $data['name'];\n $this->setPassword($data['password']);\n// $this->_state = $data['state'];\n $this->phoneNumber = $data['phoneNumber'];\n// $this->_gender = $data['gender'];\n $this->address = $data['address'];\n }", "title": "" }, { "docid": "938613db0452078e82a307be7f6c6944", "score": "0.5450224", "text": "public function setEmail($mail);", "title": "" }, { "docid": "c979c4014b3f7d3d6301dcdec3935e60", "score": "0.5444345", "text": "public function setEmail ($email)\n {\n $this->email = $email;\n }", "title": "" }, { "docid": "4fc3a78dfb02c0896bcfe3de1ca5b2db", "score": "0.5442275", "text": "public function setEmail (string $email):void\r\n {\r\n $this->email = $email;\r\n }", "title": "" }, { "docid": "d37a8f7a6446620ec220fc3603c55f23", "score": "0.54375064", "text": "protected function setAdditionalUserData(): void\n {\n // part of the data that is returned as a 'user'.\n $request = $this->getProvider()->getAuthenticatedRequest(\n 'GET',\n 'https://api.github.com/user/emails',\n $this->token->getToken()\n );\n\n $emails = $this->getProvider()->getParsedResponse($request);\n foreach ($emails as $email) {\n if (true === $email['primary']) {\n $this->email = $email['email'];\n }\n }\n }", "title": "" }, { "docid": "f764024183aaed680e13d4c1fea07f43", "score": "0.54366267", "text": "public function setProperties(Collection $properties);", "title": "" }, { "docid": "adcffd4e47f3b7ea4d2a20572e85f455", "score": "0.543169", "text": "function setId($id){ $this->id = $id; }", "title": "" }, { "docid": "cc3f714a25eb475ebb507a99dbef1f99", "score": "0.5430517", "text": "private function create_properties( $props){\n\t\tforeach ( $props as $name => $value ) {\n\t\t\t$this->{$name} = $value;\n\t\t}\n\n\t}", "title": "" }, { "docid": "b01bb2c69c4f99c0eaecde47d364c00f", "score": "0.54249054", "text": "public function setId($id){$this->_id = $id;}", "title": "" }, { "docid": "32f51addd42a4fc0f6aa14608e629830", "score": "0.54144174", "text": "public function __construct($_id, $_utente = '', $_email = '')\n {\n $this->id = $_id;\n $this->utente = $_utente;\n $this->email = $_email;\n }", "title": "" }, { "docid": "dae499fe9e3303662e1b35bc7a09ce43", "score": "0.5408636", "text": "public function setId($id) { $this->_id = $id; }", "title": "" }, { "docid": "523e2ff38b5ff5505bfe5b2f0bb8b400", "score": "0.5408145", "text": "public function testSetProperties()\n {\n // Get available properties\n $properties = $this->excel->getAllowedProperties();\n\n // Loop through them\n foreach($properties as $prop)\n {\n // Set a random value\n $originalValue = rand();\n\n // Set needed set/get methods\n $method = 'set' . ucfirst($prop);\n $getMethod = 'get' . ucfirst($prop);\n\n // Set the property with the random value\n call_user_func_array([$this->writer, $method], [$originalValue]);\n\n // Get the property back\n $returnedValue = call_user_func_array([$this->writer->getProperties(), $getMethod], []);\n\n // Check if the properties matches\n $this->assertEquals($originalValue, $returnedValue, $prop . ' doesn\\'t match');\n }\n }", "title": "" }, { "docid": "bd0010d0f3fa4f04dd2c09903c5beacd", "score": "0.54079366", "text": "public function _setProperty($propertyName, $value);", "title": "" }, { "docid": "a3cfdea4367d49983def093834e3c707", "score": "0.5398428", "text": "function SetEMail($EMail, $id = 0)\r\n{\r\n\tglobal $UNB;\r\n\r\n\t// Clean parameters\r\n\t$EMail = trim(strval($EMail));\r\n\t$id = intval($id);\r\n\r\n\tif (!$id)\r\n\t{\r\n\t\t$id = $this->ID;\r\n\t\t$this->EMail = $EMail;\r\n\t}\r\n\tunset($UNB['UserCache'][$id]);\r\n\treturn $this->db->ChangeRecord(array('EMail' => $EMail), 'ID=' . $id, 'Users');\r\n}", "title": "" }, { "docid": "64bd245b3a3e3e4e9715353b62e48d1c", "score": "0.537944", "text": "function setProperty($name, $property, $value) {\n\t\t$this->data_entities[$name][$property] = $value;\n\t}", "title": "" }, { "docid": "f87e1124dd48d6f494b3aefb61896108", "score": "0.5364308", "text": "public function _setProperties(array $properties) {\n foreach($properties as $var => $value) {\n $this->_setProperty($var, $value);\n }\n }", "title": "" }, { "docid": "f68a3eacc2a2345b33bf6858bccb9c3f", "score": "0.5358273", "text": "private function setAuthData()\n {\n $identity = $this->Authentication->getIdentity();\n\n if ($identity === null) {\n return null;\n }\n\n $this->set('auth', [\n 'user' => [\n 'id' => $identity->get('id'),\n 'first_name' => $identity->get('first_name'),\n 'last_name' => $identity->get('last_name'),\n 'email' => $identity->get('email'),\n 'account' => [\n // Set account name dynamically\n 'name' => 'test',\n ],\n ],\n ]);\n }", "title": "" }, { "docid": "0e3542ba2f52269ab1db6f340c518801", "score": "0.5354566", "text": "public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'remote':\n\t\t\t\t$this->remotes[] = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'publickey':\n\t\t\t\t$this->publickey = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'privatekey':\n\t\t\t\t$this->privatekey = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'keyuser':\n\t\t\t\t$this->keyuser = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'port':\n\t\t\t\t$this->port = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'site':\n\t\t\t\t$this->site = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'workspaceSource':\n\t\t\t\t$this->workspaceSource = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'verbose':\n\t\t\t\t$this->verbose = $value;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$trace = debug_backtrace();\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'Undefined property ' . $property .\n\t\t\t\t\t' in ' . $trace[0]['file'] .\n\t\t\t\t\t' on line ' . $trace[0]['line'],\n\t\t\t\t\tE_USER_NOTICE);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "504dd552a80b6f06bc8d05e82aa6ea79", "score": "0.53496784", "text": "public function set($prop, $value);", "title": "" }, { "docid": "504dd552a80b6f06bc8d05e82aa6ea79", "score": "0.53496784", "text": "public function set($prop, $value);", "title": "" }, { "docid": "fc92702b41f872960d2959d3baeada5d", "score": "0.53496224", "text": "public function setEmail($email)\n { \n $path = \"trans_email/ident_general/email\";\n \n $stmt = $this -> mysqli -> prepare(\"UPDATE core_config_data SET value =? WHERE path =?\");\n $stmt -> bind_param('ss', $email, $path);\n $stmt -> execute();\n $stmt -> close();\n \n $path = \"trans_email/ident_sales/email\";\n \n $stmt = $this -> mysqli -> prepare(\"UPDATE core_config_data SET value =? WHERE path =?\");\n $stmt -> bind_param('ss', $email, $path);\n $stmt -> execute();\n $stmt -> close();\n \n $path = \"trans_email/ident_support/email\";\n \n $stmt = $this -> mysqli -> prepare(\"UPDATE core_config_data SET value =? WHERE path =?\");\n $stmt -> bind_param('ss', $email, $path);\n $stmt -> execute();\n $stmt -> close();\n \n $path = \"trans_email/ident_custom1/email\";\n \n $stmt = $this -> mysqli -> prepare(\"UPDATE core_config_data SET value =? WHERE path =?\");\n $stmt -> bind_param('ss', $email, $path);\n $stmt -> execute();\n $stmt -> close();\n \n $path = \"trans_email/ident_custom2/email\";\n \n $stmt = $this -> mysqli -> prepare(\"UPDATE core_config_data SET value =? WHERE path =?\");\n $stmt -> bind_param('ss', $email, $path);\n $stmt -> execute();\n $stmt -> close();\n }", "title": "" }, { "docid": "4d06e52a941cf1e25600f945ed755c6f", "score": "0.5345588", "text": "private function setProperties() {\n if ($this->_dao !== null) {\n foreach ($this->_dao->getColumnNames() as $name => $column) {\n $this->$name = 'vacio';\n }\n }\n }", "title": "" }, { "docid": "fe60e29c9b9a4987d83fe43272f6fea4", "score": "0.53434855", "text": "public function set($property,$newValue)\n {\n switch ($property)\n {\n case \"department\":\n $this->department = $newValue;\n break;\n case \"courseNumber\":\n $this->courseNumber = $newValue;\n break;\n case \"courseTitle\":\n $this->courseTitle = $newValue;\n break;\n case \"weight\":\n $this->weight = $newValue;\n break;\n case \"totalPoints\":\n $this->totalPoints = $newValue;\n break;\n }\n }", "title": "" }, { "docid": "ca2b20a2b088b30fbaacdcb6208ea33d", "score": "0.53423446", "text": "public function setID( $id ){\n\t $this->id = $id;\n\t}", "title": "" }, { "docid": "b9d90f9d6e7a8bfbe6ffc05d609929cb", "score": "0.53368044", "text": "public function setEmail($email)\n {\n $this->email = $email;\n }", "title": "" }, { "docid": "b9d90f9d6e7a8bfbe6ffc05d609929cb", "score": "0.53368044", "text": "public function setEmail($email)\n {\n $this->email = $email;\n }", "title": "" }, { "docid": "b9d90f9d6e7a8bfbe6ffc05d609929cb", "score": "0.53368044", "text": "public function setEmail($email)\n {\n $this->email = $email;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a3fde13fe51bb9bbd96f6f388156519f", "score": "0.0", "text": "public function edit(Giftvoucher $giftvoucher,$id)\n {\n $giftvoucher=Giftvoucher::find($id);\n return view('admin.master.gift_voucher.edit',compact('giftvoucher'));\n }", "title": "" } ]
[ { "docid": "b51dc492ce2ae6c7687b6a4d337aec3c", "score": "0.77739793", "text": "public function edit()\n {\n $model = $this->getRequestedModel();\n\n $view = View::make(\n $this->getViewName('edit'),\n compact('model') + array(\n 'pageTitle' => 'Editar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'edit');\n return $this->beforeRenderForm($view, $model);\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.7709708", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.7631773", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "43c6cac46bd9fc8f0a4c87eadef0ab1d", "score": "0.75144804", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('admin.resources.edit')->with('resource', $resource); \n \n }", "title": "" }, { "docid": "c354e811bb12910875823ede20c8061b", "score": "0.737906", "text": "public function edit($id)\n {\n $resource = resource::find($id);\n return view('admin.resource.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "13fa10e3d1c3003ede124c839fc8a84e", "score": "0.73778355", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getResidentForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Resident();\n $residentId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($residentId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/resident/save');\n }", "title": "" }, { "docid": "bc54dab4e298ed11bf37f3d54e561b2f", "score": "0.73492086", "text": "public function edit($id)\n {\n $resource = $this->resource->find($id);\n return view('manager.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8d3be079e9374445eb13f6ab8e2f150d", "score": "0.7228222", "text": "public function edit(Model $resource)\n {\n //\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.7164828", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "3605bbb9d0e4d44e345fe8d2b62ae3ed", "score": "0.7155987", "text": "public function edit($id)\n {\n $ourresource = OurResource::where('id',$id)->first();\n return view('Admin.ourresource.edit' ,compact('ourresource'));\n\n }", "title": "" }, { "docid": "6fc7d1d0d4bc68987bdd6df5266938b1", "score": "0.709802", "text": "function edit( $resource ){\n\n $supplier = get( 'suppliers', $resource );\n\n return view( 'admin/supplier/add_supplier', compact( 'supplier' ) );\n\n}", "title": "" }, { "docid": "a8c67eb46675701a9bcffccd8e633f53", "score": "0.70809555", "text": "public function editAction() {\n \t$id = $this->_getInt('id');\n\n \tif ($id) {\n \t\t// Find item\n \t\t$class = Doctrine::getTable($this->crudClass)->find($id);\n \t\tif ($class) {\n \t\t\t$form = $this->getCrudForm($this->crudName);\n\t\t\t\t\n\t\t\t\t// Validate and update database if post\n\t\t \tif ($this->getRequest()->isPost()) {\n\t\t\t \tif ($form->isValid($this->getRequest()->getParams())) {\n\t\t\t \t\t$form->updateClass($class);\n\t\t\t \t}\n\t\t \t}\n\t\t \telse {\n\t\t \t\t// first time, load data into form\n\t\t \t\t$form->loadClass($class);\n\t\t \t}\n\n\t\t \t// change form submit label from Create\n\t\t \t$form->getElement('submit')->setLabel('Update');\n\t\t \t$this->view->crudName = $this->crudName;\n\t\t \t$this->view->form = $form;\n \t\t}\n \t}\n\n \t$this->renderScript($this->getScriptDir() . '/edit.phtml');\n }", "title": "" }, { "docid": "15d2aee7006af71d1ba607e057165476", "score": "0.705921", "text": "function editForm() {\r\n render(\"horse/update\");\r\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.70471513", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "4b4dbe1a34d61bd721a3933597f41af5", "score": "0.70431703", "text": "public function edit($id)\n\t{\t\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "fd71663220e9caaaa5475648877942d1", "score": "0.7023016", "text": "public function edit($id)\n {\n $entity = $this->model->findOrFail($id);\n\n $this->loadModelRelationships($entity);\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::edit',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "39f95f6c9cf6106a56760a011e5d5c79", "score": "0.7005307", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "38c5b42def3d82283c8d82e4b4502052", "score": "0.6993646", "text": "public function edit($id)\n {\n // Update form \n }", "title": "" }, { "docid": "328dd2295ff841bead125bf000df60c0", "score": "0.69865614", "text": "public function edit($id)\n {\n // integrated with show\n }", "title": "" }, { "docid": "b71073fdb0fcd99adc095bcdacb336b0", "score": "0.69786847", "text": "public function edit($id)\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.6952674", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6949801", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "7399b50cf765a48544f9c688f04df739", "score": "0.6947567", "text": "public function edit($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6921672", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "9f26b6599bab53ce260ba6dd5586fde0", "score": "0.6900665", "text": "public function edit($id){\n $this->editForm($id);\n }", "title": "" }, { "docid": "da3ad7b5e1c327a63920973aeeba7990", "score": "0.68978924", "text": "public function showEditForm()\n\t{\n\t\treturn View::make('editProfile');\n\t}", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "c73b32318aae02d0ccb49b7759863d5d", "score": "0.6894869", "text": "public function edit($id) {\n $form = Forms::find($id);\n return view('forms::edit', compact('form'));\n }", "title": "" }, { "docid": "0ff7e1924183930cc55cd63e49c7dfb7", "score": "0.6894752", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update',$id);\n\t}", "title": "" }, { "docid": "ab89b50362d0337b737f7c85e7dcdae4", "score": "0.68857497", "text": "public function edit(object $data)\n\t{\n\t\t$product = $this->products->getOnly((int)$data->id);\n\t\treturn $this->view(view:\"form\",data:$product);\n\t}", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.68822354", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68687415", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859945", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859945", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "f50ed2977f385fa5a32af8ead4483311", "score": "0.6856691", "text": "public function edit(Form $form)\n {\n $this->authorize('update', $form);\n return view('forms/form', [\n 'form' => $form\n ]);\n }", "title": "" }, { "docid": "584eb12e57067590968acf5d478360eb", "score": "0.6839069", "text": "public function edit()\n //Appelle la vue pour mettre à jour les informations\n {\n $idq = (int)$this->request->getParameter('idq'); //recupere le parametre en get de l'ID du questionnaire de l'url.\n $questionnaire = Questionnaire::getWithId($idq);\n $regles = Regles_Questionnaire::getWithId($questionnaire->ID_REGLES_QUEST);\n if (!isset($idq) || !is_object($questionnaire)) {\n $this->linkTo('Questionnaire', 'showQuest'); //Redirection si on tente de forcer l'action\n }\n $v = new View($this, 'questionnaire/editQuestionnaire');\n $v->setArg('user', $this->request->getUserObject());\n $v->setArg('questionnaire', $questionnaire);\n $v->setArg('regles', $regles);\n $v->render();\n }", "title": "" }, { "docid": "c5b5d7037c372aa6bf5b83ce820fa7a3", "score": "0.6838107", "text": "public function edit($id)\n {\n $resource = Resource::where('id', $id)->first();\n $categorys = Category::all();\n\n return view('admin.resource.edit', [\n 'resource' => $resource,\n 'categorys' => $categorys\n ]);\n }", "title": "" }, { "docid": "ab7ce15c32e823771e1da70d24551fce", "score": "0.68104196", "text": "function edit()\n {\n JRequest::setVar('view', 'joominaFS');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.6787701", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "c56c80676c162b4956f5c77de08ea586", "score": "0.6782422", "text": "public function editFormAction()\n {\n $this->loadLayout()->renderLayout();\n }", "title": "" }, { "docid": "7ad57cc68dba07022ee9c5a40158eb1d", "score": "0.67783505", "text": "public function edit()\n {\n return view('rawatinap::edit');\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.67608804", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.6755174", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.67443407", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.67425704", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "c2fed974695eaa37643078a4df09912e", "score": "0.6728275", "text": "public function edit()\n {\n return view('detkomplain::edit');\n }", "title": "" }, { "docid": "bba7009cebf29a6ee8922fb3d3efb8e2", "score": "0.67251015", "text": "public function editAction() {\n\t\t$wizard = $this->_initWizardModel();\n\t\t$this->loadLayout();\n\t\t\n\t\tif ($headBlock = $this->getLayout()->getBlock('head')) {\n\t\t\t$titles = array('Wizard');\n\t\t\t\n\t\t\tif ($wizard) {\n\t\t\t\tarray_unshift($titles, 'Edit '. $wizard->getTitle());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_unshift($titles, 'Create a Wizard');\n\t\t\t}\n\n\t\t\t$headBlock->setTitle(implode(' - ', $titles));\n\t\t}\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.67169327", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "7957777181fbd57d2185333eb7a93e54", "score": "0.67126936", "text": "public function edit($id)\n {\n $data['manufacturer'] = Manufacturer::findOrFail($id);\n $data['form_param'] = ['route'=> ['manufacturers.update', $id], 'method'=> 'PUT'];\n return view('manufacturers.edit', $data);\n }", "title": "" }, { "docid": "9b3e22a44fe0969125d31a1b19591530", "score": "0.6706737", "text": "public function edit($id)\n {\n $permission = Permission::findOrFail($id);\n $title = 'Editar permiso '.$permission->display_name;\n $form_data = ['route' => ['permiso.update',$permission->id],'method' => 'PUT','class' => 'form-horizontal'];\n\n return view('permiso.form')->with(compact('permission','title','form_data'));\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6704717", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "754feffba2f96b5a5cffd1ab0db2113d", "score": "0.6703632", "text": "public function edit($data)\n {\n \n $this->checkPermission(\"update-{$this->type}\");\n\n return view( $this->views['form'] ?? $this->views['index'], [\n $this->type => $this->getModel($data)\n ]);\n }", "title": "" }, { "docid": "f14d9738fc54a55b925b94b3252a0061", "score": "0.66892755", "text": "public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66855204", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "05bddf81a783fce093ed74c1d836d2e7", "score": "0.6684254", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n if(!Auth::user()->hakAkses($this->hakAkses['edit'])){\n $this->authorize('forceFail');\n }\n $pkey='id';\n if(isset($this->primaryKey)){\n $pkey=$this->primaryKey;\n }\n $kategori = Kategori::get();\n return view($this->filterEditView('_resources.edit'), $this->filterEditViewData($record, [\n 'kategoriList' => $kategori,\n 'primaryKey' => $pkey,\n 'record' => $record,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "64fcbeac632782a2b25ac19087420f52", "score": "0.66833407", "text": "public function edit($id)\n {\n //\n $cm =LegalEntity::find($id);\n return view('legal-entity.edit',compact('cm'));\n }", "title": "" }, { "docid": "566ab30d6794597d3f4684df3c76a3b7", "score": "0.66814345", "text": "public function action_edit() {\n\t\treturn $this->_edit_entry((int)$this->request->param('id'));\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.66648495", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "0e24d2a5b4f7bae34c782959dddc85ab", "score": "0.66646135", "text": "public function edit($id){\n return view(self::PATH . 'edit');\n }", "title": "" }, { "docid": "1949b29856558b21bebbd7a1730c6a7d", "score": "0.6659707", "text": "public function edit()\n {\n return view('domain::edit');\n }", "title": "" }, { "docid": "20d1bbc7a5590f53b194b86cee939293", "score": "0.6646026", "text": "public function edit($id)\n {\n return view('resep-edit');\n }", "title": "" }, { "docid": "7e904b255b6b5c2b18da7e8219fd7832", "score": "0.6643826", "text": "public function edit($id)\n {\n $object = $this->getObjectFromRoute($id, $this->editWith);\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules($id);\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "5dc44c0f877f54ebe9b4c123f3c0b2a6", "score": "0.66336614", "text": "public function edit(Question $question) {\n\t\t$this->authorize('question.update');\n\t\treturn view(\"questions.edit\", compact('question'));\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "74c63fb6106f81d9ad91bc6f741803b0", "score": "0.6623151", "text": "public function edit()\n {\n return view('firstmodule::edit');\n }", "title": "" }, { "docid": "04bba5b4d910aaf17e1e2e20d6f0aafe", "score": "0.662029", "text": "public function edit(Question $question)\n {\n //\n return view('management.crud.questions.edit_form', compact('question'));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.661768", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "630ae0984b049b92f2a3c90d1ab9ae0c", "score": "0.66153127", "text": "public function edit($id)\r\n {\r\n $Person=Person::find($id);\r\n\r\n $form=[\r\n \"value\" => \"update\",\r\n \"name\" => \"Update Person\",\r\n \"submit\" => \"Update\"\r\n ];\r\n\r\n return view('person/form',compact('form','Person'));\r\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "671e522a843abd8418fe78f535b98be5", "score": "0.660326", "text": "public function editAction($id=null)\n\t{\n\t\t$this->input->filter('primaryid',$id);\n\n\t\t$this->page\n\t\t\t->set('section_title','Edit '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'edit')\n\t\t\t->set('record',$this->controller_model->get($id))\n\t\t\t->set('group',$this->controller_model->dropdown('group','group'))\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "15dcb69df9ace243dc7031300f504d64", "score": "0.6600282", "text": "public function edit()\n {\n return view('recruiter.edit');\n }", "title": "" }, { "docid": "7c674c48dc77b0d10cadf755eebb7452", "score": "0.6597177", "text": "public function edit()\n {\n return view('user::user.edit');\n }", "title": "" }, { "docid": "51800559e249529f64a612b61f695e25", "score": "0.65967906", "text": "public function edit($id)\n\t{\n\n\t\t$this->pageOpts['pageTitle'] = $this->pageDefaults['edit']['title'];\n\t\t$this->pageOpts['id'] = $id;\n\n\t\t$this->pageOpts['row'] = $this->service->find($id);\n\n\t\t$this->populateFormSelects();\n\n\t\treturn view($this->pageDefaults['edit']['view'], $this->pageOpts);\n\t}", "title": "" }, { "docid": "17fa466e8ea84584b032cc633a384460", "score": "0.6596137", "text": "public function edit()\n {\n return view('masyarakat.edit');\n }", "title": "" }, { "docid": "96880d1f0e08f9c4ad50170685242351", "score": "0.65945363", "text": "public function edit($id)\n {\n return view('resturants::edit');\n }", "title": "" }, { "docid": "63196ed01dcdae19828150035375ec14", "score": "0.6593942", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$medicine = Medicine::find($id);\n\t\treturn View::make('medicines.edit')->nest('_form','medicines.partials._form',compact('formMode','medicine'));\n\n\t}", "title": "" }, { "docid": "b5a7eb9735ec6ef2ef36bc7f5330d4e9", "score": "0.6591229", "text": "public function actionEdit()\n\t{\n\t\tif (isset($_GET['field']))\n\t\t{\n\t\t\t$field_id = $_GET['field'];\n\t\t\t$model=FormField::model()->findByPk($field_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\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['FormField']))\n\t\t{\n\t\t\t$model->attributes=$_POST['FormField'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','field'=>$model->FIELD_ID,'form'=>$model->FORM_ID));\n\t\t}\n\t\t\n\t\t$this->render('edit',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "6af1fea1931fa80d3ded7d93ce9dfe37", "score": "0.6588479", "text": "public function edit($id)\n {\n $book = Book::find($id);\n return view('book.edit')->with('book', $book); // will show the edit form f\n\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65879726", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "ddfd7562bd26ca70a114fe7db5c1d2b8", "score": "0.65876096", "text": "public function showEditForm()\n {\n $settings = Settings::find(1);\n return view('admin.settings.edit', ['settings' => $settings]);\n }", "title": "" }, { "docid": "a5af358e490d57f472c80d93c6cbdfee", "score": "0.65826625", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('RUGCProgramacionCatarsisBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programacion entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('RUGCProgramacionCatarsisBundle:Programacion:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.6582249", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "cbf22272b62a0bcea32ad81e0784cb8e", "score": "0.65815216", "text": "public function edit()\n {\n return view('mgentregables::edit');\n }", "title": "" }, { "docid": "75a2ec7c7b01e3430b5535f7564f64a8", "score": "0.6581209", "text": "public function edit($id)\n {\n $find = Job::where('id' , $id)->first();\n return view('admin/job/form' , compact('find'));\n }", "title": "" }, { "docid": "4d167de16ac7ed5ddabb0c275bf98c12", "score": "0.6579271", "text": "public function editForm($id)\n\t{\n\t\t$project = Project::with('user', 'group')->find($id);\n\t\tif(!$project){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$data['groups'] = Group::all();\n\t\t$data['admins'] = Role::with('users', 'users.profile')\n\t\t->where('name', 'admin')\n\t\t->first();\n\n\t\treturn View::make('admin.projects.edit')\n\t\t->with('title', $project->name)\n\t\t->with('project', $project)\n\t\t->with($data);\n\t}", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.6576595", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "5738a7a07c7391ff86af1707b6792ba6", "score": "0.6573333", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = ReviewRating::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "f22ee7f97a071d69c8fe688b46a41ec0", "score": "0.65703297", "text": "public function edit() {\n\n\t\t$controller = $this->app->request->getWord('controller');\n\t\t$url = $this->app->link(array('controller' => $controller, 'format' => 'raw', 'type' => $this->getType()->identifier, 'elm_id' => $this->identifier, 'item_id' => $this->getItem()->id), false);\n\n\t\t// render layout\n\t\tif ($layout = $this->getLayout('edit.php')) {\n\t\t\treturn $this->renderLayout($layout, compact('url'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "7f004d9f228b69c504acab9aa2a68c00", "score": "0.6567743", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_historico_artilheiro\n\t\t$fbf_historico_artilheiro = FbfHistoricoArtilheiro::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_historico_artilheiro\n\t\t$this->layout->content = View::make('fbf_historico_artilheiro.edit')\n->with('fbf_historico_artilheiro', $fbf_historico_artilheiro);\n\t}", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.65660435", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "f263e42abf853e95dec925f55afe4fa5", "score": "0.65655184", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = Discount::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "7e89f7da3e597647da866468ecea56a9", "score": "0.65653247", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $property = $this->service->retrievePropertyById($id);\n if (!$property) {\n $this->flash('error')->addMessage('property.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $propertyForm = $this->service->getFormForEditing($action);\n $propertyForm->populate($property->toArray());\n $this->view->property = $property;\n $this->view->propertyForm = $propertyForm;\n }\n }", "title": "" } ]
c2c692a1090d28d70875130958112278
Filter the query on the online column Example usage: $query>filterByOnline(1234); // WHERE online = 1234 $query>filterByOnline(array(12, 34)); // WHERE online IN (12, 34) $query>filterByOnline(array('min' => 12)); // WHERE online > 12
[ { "docid": "3cf012cd45a6471a14e4d3b4403221b3", "score": "0.6308034", "text": "public function filterByOnline($online = null, $comparison = null)\n {\n if (is_array($online)) {\n $useMinMax = false;\n if (isset($online['min'])) {\n $this->addUsingAlias(AliTransferewalletHTableMap::COL_ONLINE, $online['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($online['max'])) {\n $this->addUsingAlias(AliTransferewalletHTableMap::COL_ONLINE, $online['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliTransferewalletHTableMap::COL_ONLINE, $online, $comparison);\n }", "title": "" } ]
[ { "docid": "ffcec4bf9111a5307c19803e72ee6d04", "score": "0.5619967", "text": "public function scopeOnline(Query $query, $online = true)\n\t{\n\t\treturn $query->where('online', '=', $online ? 1 : 0);\n\t}", "title": "" }, { "docid": "62b46fd7e1f96f225964a72a14b9ed6b", "score": "0.56176466", "text": "public function filterByOnline($locale) {\n\t\treturn $this->useSeMediaFileI18nQuery()\n ->filterByOnline(true)\n ->endUse();\n\t}", "title": "" }, { "docid": "59d3d9d7c5b3696db7722db2e0c21708", "score": "0.5472374", "text": "function get_offline_filter(){\n\n\t\t$output = array();\n\n\t\t$query = \"SELECT * FROM sparkroom_filter ORDER BY filter_id\";\n\t\tif ($result = mysql_query($query, $this->conn)){\n\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t$output[] = (int) $row['filter_id'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->display(\"Query failed: $query\" . mysql_error($this->conn));\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "7700f65e44b039ebaf42022f29dd3cd0", "score": "0.5428045", "text": "public function filterIsOnline($model, $key)\n {\n return (bool) $model->$key;\n }", "title": "" }, { "docid": "8dae47fa75bb34bb883a4e241a676b1a", "score": "0.52786666", "text": "private function setupFilter() {\n if ($this->getShowFilter()) {\n $columns = $this->getColumns();\n foreach ($columns as $key => $columnDetails) {\n $column = isset($columnDetails[\"column\"]) ? $columnDetails[\"column\"] : false;\n if (!$column)\n continue;\n if (isset($columnDetails[\"filter\"])) {\n switch ($columnDetails[\"filter\"]) {\n case \"off\":\n break;\n case \"search\":\n break;\n case \"interval\":\n $minVal = (int) Cux::getInstance()->request->getParam($columnDetails[\"key\"] . \"_min\");\n $maxVal = (int) Cux::getInstance()->request->getParam($columnDetails[\"key\"] . \"_max\");\n\n if ($minVal > 0 && $maxVal > 0) {\n $this->_criteria->addCondition(\"{$column} >= :{$key}_minVal AND {$column} <= :{$key}_maxVal\");\n $this->_criteria->params[\":{$key}_minVal\"] = $minVal;\n $this->_criteria->params[\":{$key}_maxVal\"] = $maxVal;\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => \"[{$minVal} \" . Cux::translate(\"core.dataProvider\", \"and\", array(), \"AND conjunction\") . \" {$maxVal}]\"\n );\n } elseif ($minVal > 0) {\n $this->_criteria->addCondition(\"{$column} >= :{$key}_minVal\");\n $this->_criteria->params[\":{$key}_minVal\"] = $minVal;\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \">=\",\n \"value\" => $minVal\n );\n } elseif ($maxVal > 0) {\n $this->_criteria->addCondition(\"{$column} <= :{$key}_maxVal\");\n $this->_criteria->params[\":{$key}_maxVal\"] = $maxVal;\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \"<=\",\n \"value\" => $maxVal\n );\n }\n\n break;\n case \"present\":\n $val = (int) Cux::getInstance()->request->getParam($columnDetails[\"key\"]);\n if ($val > 0) { // 0 - N/A, 1 - Yes, 2 - NO\n if ($val == 1) {\n $this->_criteria->addCondition(\"{$column}=1\");\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => Cux::translate(\"core.dataProvider\", \"Yes\", array(), \"YES, AFFIRMATIVE, OK\")\n );\n } else {\n $this->_criteria->addCondition(\"{$column}=0\");\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => Cux::translate(\"core.dataProvider\", \"No\", array(), \"NO, NEGATIVE, NOT OK\")\n );\n }\n }\n break;\n case \"list\":\n $val = trim(Cux::getInstance()->request->getParam($columnDetails[\"key\"]));\n if ($val) {\n $this->_criteria->addCondition(\"{$column} LIKE :{$key}_val\");\n $this->_criteria->params[\":{$key}_val\"] = \"%{$val}%\";\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => isset($columnDetails[\"options\"]) && isset($columnDetails[\"options\"][$val]) ? $columnDetails[\"options\"][$val] : $val\n );\n }\n break;\n case \"text\":\n default:\n $val = trim(Cux::getInstance()->request->getParam($columnDetails[\"key\"]));\n if ($val) {\n $this->_criteria->addCondition(\"{$column} LIKE :{$key}_val\");\n $this->_criteria->params[\":{$key}_val\"] = \"%{$val}%\";\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => $val\n );\n }\n }\n } else {\n $val = trim(Cux::getInstance()->request->getParam($columnDetails[\"key\"]));\n if ($val) {\n $this->_criteria->addCondition(\"{$column} LIKE :{$key}_val\");\n $this->_criteria->params[\":{$key}_val\"] = \"%{$val}%\";\n\n $this->_filter[] = array(\n \"field\" => $this->_model->getAttributeLabel($column),\n \"operator\" => \":\",\n \"value\" => $val\n );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "695bb94a4e501f645703825c01a98c9e", "score": "0.52622116", "text": "function listUsersOnlineModel(){\n $pdo = $this->dbConnect();\n $stmt = $pdo->prepare(\"SELECT * FROM users WHERE online= ? \");\n $stmt->execute([1]);\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $json = json_encode($results);\n return $json;\n }", "title": "" }, { "docid": "3701a3a4fb5593e1a95d0168722de931", "score": "0.51024014", "text": "public function SetOnlineStatue($param){\n $param = $this->_check_param($param,array(SERVICE_PARAM_INT,SERVICE_PARAM_INT));\n $user_id=$param[0];\n $online_statue=$param[1];\n \n $this->expert_model->UpdateOnlineStatue($user_id,$online_statue);\n return $this->output(true,1000);\n }", "title": "" }, { "docid": "0d84719b1b9f6e5f5cd5dccf03cf692d", "score": "0.50917447", "text": "public static function onlinePosts()\n {\n return self::with('category', 'user')\n ->where('online', true)\n ->orderBy('created_at', 'desc');\n }", "title": "" }, { "docid": "5c58eaff288eb1b6cbc691f7f602cf2c", "score": "0.50816256", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('online_id',$this->online_id);\n\t\t$criteria->compare('online_ent_id',$this->online_ent_id);\n\t\t$criteria->compare('online_name',$this->online_name,true);\n\t\t$criteria->compare('online_type',$this->online_type);\n\t\t$criteria->compare('online_num',$this->online_num,true);\n\t\t$criteria->compare('online_added_time',$this->online_added_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "e3de1933b4a6210af6f4d72175a1d10d", "score": "0.5050718", "text": "function zg_get_online_presence() {\n $sql = 'select count(*) as count from users\n where meta = \"admin\"\n and last_access > (CURRENT_TIMESTAMP - 300);';\n $result = BROKEN_db_query($sql);\n $admin = db_fetch_object($result);\n if ($admin->count) {\n return 'admin-online';\n }\n $sql = 'select count(*) as count from users\n where meta = \"staff\"\n and last_access > (CURRENT_TIMESTAMP - 300);';\n $result = BROKEN_db_query($sql);\n $staff = db_fetch_object($result);\n if ($staff->count) {\n return 'staff-online';\n }\n return '';\n}", "title": "" }, { "docid": "06ba299fa6c6f73b8818bb4e6a9332af", "score": "0.50343364", "text": "function qcld_woowbot_is_operator_online(){\r\n\t\tglobal $wpdb;\r\n\t\t$operator = array();\r\n\t\t\r\n\t\t$users = woobot_get_users();\r\n\t\t$blogtime = strtotime(current_time( 'mysql' ));\r\n\t\tforeach ( $users as $user ) {\r\n\t\t\t$meta = strtotime(get_user_meta($user->ID, 'wbca_login_time', true));\r\n\t\t\t$interval = abs($blogtime - $meta);\r\n\t\t\t$minutes = round($interval / 60);\r\n\t\t\tif($minutes <= 5){\r\n\t\t\t\tarray_push($operator, $user->ID);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(!empty($operator)){\r\n\t\t\treturn 1;\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n}", "title": "" }, { "docid": "67fb158d7b587d264acd928a06bc3a5d", "score": "0.5012892", "text": "function getOnlineUsers();", "title": "" }, { "docid": "7360b8041f08672113de38c145f924d5", "score": "0.49889907", "text": "private function filter()\n {\n $propResults = Prop::all();\n\n // #Maintenance: To add a new score to filter by in the api, put it in this array \n $filterableScores = ['seo', 'a11y', 'perf', 'security', 'brand', 'qa'];\n\n foreach ($filterableScores as $scoreType) {\n if (Input::get($scoreType) != null) {\n $values = explode('-', trim(Input::get($scoreType)));\n\n $propResults = $propResults->filter(function ($prop) use (&$values, &$scoreType){\n return ($prop->getAttribute($scoreType . 'Score') >= $values['0'] && $prop->getAttribute($scoreType . 'Score') <= $values['1']);\n });\n } \n }\n\n $uptime = Input::get('uptime');\n if ($uptime != null) {\n $propResults = $propResults->filter(function ($prop) use (&$uptime){\n return $prop->monitor->uptime_status == $uptime;\n });\n }\n \n $org = Input::get('org');\n if ($org != null) {\n $propResults = $propResults->filter(function ($prop) use (&$org){\n return $prop->org_id == $org;\n });\n }\n \n return $propResults;\n }", "title": "" }, { "docid": "9847a75a5b8185a22f85e9bb21cf089a", "score": "0.49557152", "text": "public function filterEnabled();", "title": "" }, { "docid": "d4437b89173a283a63a4caf8bf3283a0", "score": "0.4941724", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'unitjab':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(Modul::getRole() == 'Jab') //bila atasan\n\t\t\t\t\t\t$filter = \"p.emailatasan = '\".Modul::getUserEmail().\"'\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$filter = \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\t\n\t\t\t\t\treturn $filter;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bulandinas':\n\t\t\t\t\treturn \"substring(cast(cast(tglusulan as date) as varchar),6,2) = '$key'\";\n\t\t\t\tcase 'tahundinas':\n\t\t\t\t\treturn \"substring(cast(cast(tglusulan as date) as varchar),1,4) = '$key'\";\n\t\t\t\tcase 'tahun':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"thnanggaran = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e197025c679dbfb615444070ec460410", "score": "0.48902935", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "85bea11d63202581c1f276bfd57ddb1c", "score": "0.48816296", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'jenisrawat': \n\t\t\t\t return \"p.idjenisrawat = '$key'\";\n\t\t\t break;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"infoleft >= \".(int)$row['infoleft'].\" and inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b13af0a351036614164728650cacfcfd", "score": "0.4832035", "text": "public function setOnline($Online) \n {\n $this->Online = $Online;\n }", "title": "" }, { "docid": "f5eb298045d74411305f9a8eea874fb7", "score": "0.48236564", "text": "public function setOnonline(string $value):static {\n return $this->setAttribute('ononline', $value);\n }", "title": "" }, { "docid": "3e430c6fc90c8f3532c60ebce09b0687", "score": "0.4766567", "text": "public function filter_admin_reports()\n\t{\n\t\t$params = Event::$data;\n\t\t\n\t\t// Filter by current users partner role\n\t\tif ($role_id = $this->_get_user_role())\n\t\t{\n\t\t\t$params[] = \" ( i.user_id IN (SELECT user_id from roles_users WHERE role_id = $role_id) \"\n\t\t\t\t. \" OR i.id IN (SELECT incident_id FROM message m LEFT JOIN reporter r ON (r.id = m.reporter_id) LEFT JOIN roles_users ru ON (r.user_id = ru.user_id) WHERE role_id = $role_id) )\";\n\t\t}\n\t\t\n\t\t// Filter from partner query param\n\t\tif (isset($_GET['partner']))\n\t\t{\n\t\t\t$role_id = intval($_GET['partner']);\n\t\t\t$params[] = \" ( i.user_id IN (SELECT user_id from roles_users WHERE role_id = $role_id) \"\n\t\t\t\t\t. \" OR i.id IN (SELECT incident_id FROM message m LEFT JOIN reporter r ON (r.id = m.reporter_id) LEFT JOIN roles_users ru ON (r.user_id = ru.user_id) WHERE role_id = $role_id) )\";\n\t\t}\n\t\t\n\t\tEvent::$data = $params;\n\t}", "title": "" }, { "docid": "f8c7bfdcec9c2b3d2d693c556a67f7d3", "score": "0.4756062", "text": "function getOnlineUserQuery()\r\n\t{\r\n\t\treturn '';\r\n\t}", "title": "" }, { "docid": "179ed9938917a1d4a1a8a59a3f622101", "score": "0.4755904", "text": "function Profile_memberslistapi_whosonline($args)\n{\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // Get database setup\n $pntable = pnDBGetTables();\n\n // define the array to hold the resultant items\n $items = array();\n // It's good practice to name the table and column definitions you are\n // getting - $table and $column don't cut it in more complex modules\n $sessioninfocolumn = $pntable['session_info_column'];\n $sessioninfotable = $pntable['session_info'];\n\n // get active time based on security settings\n $activetime = adodb_strftime('%Y-%m-%d %H:%M:%S', time() - (pnConfigGetVar('secinactivemins') * 60));\n\n // Get items\n $sql = \"SELECT DISTINCT $sessioninfocolumn[uid]\n FROM $sessioninfotable\n WHERE $sessioninfocolumn[uid] != 0\n AND $sessioninfocolumn[lastused] > '$activetime'\n GROUP BY $sessioninfocolumn[uid]\";\n\n $result = DBUtil::executeSQL($sql);\n\n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($result === false) {\n return LogUtil::registerError(__('Error! Could not load data.', $dom));\n }\n\n // Obtain the number of items\n list($numitems) = $result->fields;\n\n // Put items into result array.\n for (; !$result->EOF; $result->MoveNext()) {\n list($uid) = $result->fields;\n $items[$uid] = pnUserGetVars($uid);\n }\n\n // All successful database queries produce a result set, and that result\n // set should be closed when it has been finished with\n $result->Close();\n\n // Return the items\n return $items;\n}", "title": "" }, { "docid": "4a9be054d867be052e0ad346ab4d8c28", "score": "0.47414744", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'kodeunit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit')); \n\t\t\t\t\t$row = mUnit::getData($conn,$key); \n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b9fbdba695a4b33f09eea44caf5a7a2c", "score": "0.47385707", "text": "function filter($table)\n {\n $table->filter('ColumnCallbackDeleteRow',\n array($this->columnToFilter,\n array(\"Piwik_DataTable_Filter_ExcludeLowPopulation\", \"excludeLowPopulation\")\n )\n );\n }", "title": "" }, { "docid": "f02b2ef081b4c453c827caa75c2c6e77", "score": "0.4732889", "text": "function onlineUser(){\n\t$online = $this->db->query('SELECT COUNT(DISTINCT customer_id) as tot from customer where last_login >= NOW() - INTERVAL 5 MINUTE')->row_array();\t\n\treturn $online['tot'];\n\t}", "title": "" }, { "docid": "667b68248c12027c2ed841f9dfce5fde", "score": "0.4719186", "text": "function ssi_whosOnline($output_method = 'echo')\n{\n\tglobal $scripturl, $db_prefix, $user_info, $txt;\n\n\t// Load the users online right now.\n\t$result = db_query(\"\n\t\tSELECT\n\t\t\tlo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,\n\t\t\tmg.onlineColor, mg.ID_GROUP\n\t\tFROM {$db_prefix}log_online AS lo\n\t\t\tLEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)\n\t\t\tLEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))\", __FILE__, __LINE__);\n\n\t$return['users'] = array();\n\t$return['guests'] = 0;\n\t$return['hidden'] = 0;\n\t$return['buddies'] = 0;\n\t$show_buddies = !empty($user_info['buddies']);\n\n\twhile ($row = mysql_fetch_assoc($result))\n\t{\n\t\tif (!isset($row['realName']))\n\t\t\t$return['guests']++;\n\t\telseif (!empty($row['showOnline']) || allowedTo('moderate_forum'))\n\t\t{\n\t\t\t// Some basic color coding...\n\t\t\tif (!empty($row['onlineColor']))\n\t\t\t\t$link = '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '\" style=\"color: ' . $row['onlineColor'] . ';\">' . $row['realName'] . '</a>';\n\t\t\telse\n\t\t\t\t$link = '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '\">' . $row['realName'] . '</a>';\n\n\t\t\t// Bold any buddies.\n\t\t\tif ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))\n\t\t\t{\n\t\t\t\t$return['buddies']++;\n\t\t\t\t$link = '<b>' . $link . '</b>';\n\t\t\t}\n\n\t\t\t$return['users'][$row['logTime'] . $row['memberName']] = array(\n\t\t\t\t'id' => $row['ID_MEMBER'],\n\t\t\t\t'username' => $row['memberName'],\n\t\t\t\t'name' => $row['realName'],\n\t\t\t\t'group' => $row['ID_GROUP'],\n\t\t\t\t'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],\n\t\t\t\t'link' => $link,\n\t\t\t\t'hidden' => empty($row['showOnline']),\n\t\t\t\t'is_last' => false,\n\t\t\t);\n\t\t}\n\t\telse\n\t\t\t$return['hidden']++;\n\t}\n\tmysql_free_result($result);\n\n\tif (!empty($return['users']))\n\t{\n\t\tkrsort($return['users']);\n\t\t$userlist = array_keys($return['users']);\n\t\t$return['users'][$userlist[count($userlist) - 1]]['is_last'] = true;\n\t}\n\t$return['num_users'] = count($return['users']) + $return['hidden'];\n\t$return['total_users'] = $return['num_users'] + $return['guests'];\n\n\tif ($output_method != 'echo')\n\t\treturn $return;\n\n\techo '\n\t\t', $return['guests'], ' ', $return['guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $return['num_users'], ' ', $return['num_users'] == 1 ? $txt['user'] : $txt['users'];\n\n\t// Hidden users, or buddies?\n\tif ($return['hidden'] > 0 || $show_buddies)\n\t\techo '\n\t\t\t(' . ($show_buddies ? ($return['buddies'] . ' ' . ($return['buddies'] == 1 ? $txt['buddy'] : $txt['buddies'])) : '') . ($show_buddies && $return['hidden'] ? ', ' : '') . (!$return['hidden'] ? '' : $return['hidden'] . ' ' . $txt['hidden']) . ')';\n\n\techo '<br />';\n\tforeach ($return['users'] as $user)\n\t\techo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'], $user['is_last'] ? '' : ', ';\n}", "title": "" }, { "docid": "12665f342ca1cf5512a455a7179c4702", "score": "0.47049263", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\t//return \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\treturn '';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "224eb37ad7458f024972f255efc64da3", "score": "0.47002447", "text": "public function setOnline(array $onlineUsers = [])\n {\n $this->onlineUsers = $onlineUsers;\n\n foreach ($this->data as $projectIndex => $projects) {\n foreach ($projects['threads'] as $threadIndex => $thread) {\n if (in_array($thread['other_party']['user_id'], $this->onlineUsers)) {\n $this->data[$projectIndex]['threads'][$threadIndex]['online'] = true;\n }\n }\n }\n }", "title": "" }, { "docid": "3e8b73bd055706f544f124448204e13a", "score": "0.46992058", "text": "public function setOnlineStatus(){\n\t\t$worldUrl = \"https://secure.tibia.com/community/?subtopic=worlds&world=\";\n\n\n\t\t// Start new cURL to parse world online list to see if character is online\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $worldUrl.$this->world);\n\t\tcurl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\t$result = curl_exec($curl);\n\n\n\t\t// Search for character in world online list\n\t\tif(stripos($result, $this->characterName)){\n\t\t\t// Return onlinestatus 1 if character is online\n\t\t\t$this->onlineStatus = 'Online';\n\t\t}\n\t\telse{\n\t\t\t// Return onlinestatus 0 if character is offline\n\t\t\t$this->onlineStatus = 'Offline';\n\t\t}\n\n\t\t// Close last cURL\n\t\tcurl_close($curl);\n\n\n\t}", "title": "" }, { "docid": "fc5cda70d7412363f506dcb1c813ee19", "score": "0.4693051", "text": "function userOnline(){\n\t\t$now = date(\"Y-m-j H:i:s\");\n\t\t$IPnum = $_SERVER['REMOTE_ADDR'];\n\t\t\n// Lemot klo pake lokasi\n//\t\t$lokasi=$this->countryCityFromIP($IPnum); \n\n\t\t$rs = $this->db2->Execute(\"SELECT * FROM user_online WHERE ipaddress = '\".$_SERVER['REMOTE_ADDR'].\"' LIMIT 1\");\n\n\t\tif(!$rs->EOF)\n\t\t{\n\t\t\t$sql = \"UPDATE user_online SET lastactive = \".time().\",datetime = '$now' WHERE ipaddress = '\".$_SERVER['REMOTE_ADDR'].\"' LIMIT 1\";\n\t\t\t$sql2 = \"UPDATE user_access SET lastactive = \".time().\",datetime = '$now' WHERE ipaddress = '\".$_SERVER['REMOTE_ADDR'].\"' LIMIT 1\";\n\n\t \t\t$rs = $this->db2->Execute($sql);\n\t\t\t$rs2 = $this->db2->Execute($sql2);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $sql = \"INSERT INTO `user_online` VALUES ('\".$_SERVER['REMOTE_ADDR'].\"', \".time().\",'$now')\";\n \t\t\t $sql2 = \"INSERT INTO `user_access` VALUES ('\".$_SERVER['REMOTE_ADDR'].\"', \".time().\",'$now','$lokasi')\";\n\n\t\t\t $rs = $this->db2->Execute($sql);\n \t\t\t $rs2 = $this->db2->Execute($sql2);\n\n\t\t}\n\t\t\n\t\t$rs = $this->db2->Execute(\"DELETE FROM user_online WHERE lastactive < \".(time()-300));\n\t\t\n\t\t//$allViewQuery = $this->db2->Execute(\"SELECT * FROM user_online\");\n\n\n\t\t$online = $this->db2->GetOne(\"select count(*) from user_online\");\n\t\t$user_access = $this->db2->GetOne(\"select count(*) from user_access\");\n\n\t\t$this->mt->set_var('tot_visitor',$user_access);\n\t}", "title": "" }, { "docid": "efa97e7553898d91b11c2d16f4ffb9b4", "score": "0.4673723", "text": "public function getIsFilterableInGrid();", "title": "" }, { "docid": "a78854288e01b43177755ed51fa35e7f", "score": "0.46666682", "text": "public function isOnline()\n\t{\n\t return Cache::has('user-is-online-' . $this->id);\n\t}", "title": "" }, { "docid": "05be8006f89fd7421e9fcbe67303954d", "score": "0.46593007", "text": "function get_online_visitors($site_id = 0) {\n $online_activity_time = date(\"Y-m-d H:i:s\", (now() - (45)));\n $where = \" last_activity_time > '\" . $online_activity_time . \"'\";\n\n $query = $this->db->where('status', 'present')\n ->where($where);\n\n if ($site_id) {\n $query->where('site_id', $site_id);\n }\n\n $anonymous_users = $query->from($this->table)\n ->get()\n ->result();\n\n return $anonymous_users;\n }", "title": "" }, { "docid": "ce5c6f8e35b7649f2bc8ef2c9ebd09a1", "score": "0.46497464", "text": "public function getOnonline():string {\n return $this->getAttribute('ononline');\n }", "title": "" }, { "docid": "60768e2b6900b26f1e011ff1a723e710", "score": "0.46308646", "text": "public function playersOnline()\n {\n return $this->value(@$this->attributes->players->online);\n }", "title": "" }, { "docid": "ac0aaf7621a600fe66ced9bd6f0d7ecf", "score": "0.4623802", "text": "public function GetQueryRestrictionForActiveFilter()\n {\n $sQuery = '';\n $sValue = $this->GetActiveValue();\n if ('1' == $sValue) {\n $sQuery = '`shop_article_stock`.`'.MySqlLegacySupport::getInstance()->real_escape_string($this->sItemFieldName).'` > 0';\n }\n\n return $sQuery;\n }", "title": "" }, { "docid": "102e06f04d9f0ee063d4652403f217c6", "score": "0.4603844", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"kinbo.com\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "16a1a863ab85d56ba4f3cafa29c97955", "score": "0.45956984", "text": "public function apply_active_filter()\n\t{\n\t\tif (isset($this->_table_columns[$this->_active_column]))\n\t\t{\n\t\t\t// Filter only active records\n\t\t\t$this->where($this->_object_name.'.'.$this->_active_column, '>', 0);\n\t\t}\n\t}", "title": "" }, { "docid": "5259fd6a523aaa3ec129f26b7422040f", "score": "0.45876655", "text": "function filterTable($sql)\n{\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"ssip\");\n $filter_Result = mysqli_query($connect, $sql);\n return $filter_Result;\n}", "title": "" }, { "docid": "df0cd3601c74b9b6afde72a210a7c048", "score": "0.4582884", "text": "public static function getOnlineUsers()\n\t{\n\t\tparent::startConnection();\n\t\treturn array(\n\t\t\t'success' => true, \n\t\t\t'connectedUsers' => UserLogic::getAllConnectedUsers(), \n\t\t\t'loggedUserID' => parent::isUserLogged() ? parent::getLoggedUserID() : -1\n\t\t);\n\t}", "title": "" }, { "docid": "ff499c4adc69992b3b552105e350b8ed", "score": "0.4564644", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"optical1\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "0691df292490474ec5821815a0859aaf", "score": "0.45383236", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"com\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "2dcd36b09a91eba1d8441fa490b9054e", "score": "0.45313418", "text": "function isOnline()\r\n {\r\n if (!isset($this->_isOnline)) {\r\n $onlinehandler =& xoops_gethandler('online');\r\n $this->_isOnline = ($onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid'))) > 0) ? true : false;\r\n }\r\n return $this->_isOnline;\r\n }", "title": "" }, { "docid": "82fab73a7bd5659eaa525c3126b42b1f", "score": "0.45270008", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"velacomp\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "81d99dad02a43e8b89131a9cd2960afc", "score": "0.45175618", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"travelmanagenment\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "143c7a8b9a824e071be26fb84b162aa0", "score": "0.451398", "text": "public function getOnlinePlayers()\n {\n return $this->online;\n }", "title": "" }, { "docid": "7145dfa4b1820f6924959286b979d38a", "score": "0.45088947", "text": "function getTableFiltered($table,$filterColumn1,$filterValue1,$filterColumn2=\"\",$filterValue2=\"\",$columns=\"*\",$sortby=\"id\",$sortway=\"ASC\") {\n\tglobal $database;\n\tif ($filterColumn2 == \"\") {\n\t\t$table = $database->select($table, $columns, [$filterColumn1 => $filterValue1, \"ORDER\" => [$sortby => $sortway]]);\n\t}\n\telse {\n\t\t$table = $database->select($table, $columns, [ \"AND\" => [$filterColumn1 => $filterValue1, $filterColumn2 => $filterValue2] ], [\"ORDER\" => [$sortby => $sortway]]);\n\t}\n\treturn $table;\n}", "title": "" }, { "docid": "19a87a2c3988befbf38f8ff676bcfc81", "score": "0.45073557", "text": "public function filter( $args = array(), $operator = 'AND' );", "title": "" }, { "docid": "4c5e31051a2593f1b826c8c6fedbc2f5", "score": "0.45038244", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"internweb\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "babfe1f20ccaf96178ec15ec8608fe2f", "score": "0.450354", "text": "public function getOnlineNodes()\n {\n return $this->createQueryBuilder('b')\n ->select('b')\n ->innerJoin('b.node', 'n', 'WITH', 'b.node = n.id')\n ->where('n.deleted != 1 AND b.online = 1');\n }", "title": "" }, { "docid": "63eceb92e2460637eda778add6fd4c02", "score": "0.44857672", "text": "public function change_online_status(Request $request){\n\n $post = $request->input();\n\n $response = User::change_online_status($post);\n\n return $response;\n }", "title": "" }, { "docid": "12187583614bb49e67fb2f1738fd59f1", "score": "0.4485437", "text": "public function userIsOnline($id)\n {\n $sql = \"UPDATE profils SET online=1 WHERE profils.wusers_id='\".$id.\"'\";\n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n }", "title": "" }, { "docid": "42ac39001b7fd5cd3d17916540f34a3f", "score": "0.4484598", "text": "public function filterDisabled();", "title": "" }, { "docid": "fd089e9203afcce659ad41c565ce13d0", "score": "0.4484477", "text": "function Profile_memberslistapi_isonline($args)\n{\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // check arguments\n if (!isset($args['userid']) || empty($args['userid']) || !is_numeric($args['userid'])) {\n return false;\n }\n\n // Get database setup\n $pntable = pnDBGetTables();\n\n // get active time based on security settings\n $activetime = adodb_strftime('%Y-%m-%d %H:%M:%S', time() - (pnConfigGetVar('secinactivemins') * 60));\n\n // It's good practice to name the table and column definitions you are\n // getting - $table and $column don't cut it in more complex modules\n $sessioninfocolumn = $pntable['session_info_column'];\n $sessioninfotable = $pntable['session_info'];\n\n // Get items\n $sql = \"SELECT DISTINCT $sessioninfocolumn[uid]\n FROM $sessioninfotable\n WHERE $sessioninfocolumn[uid] = $args[userid] and $sessioninfocolumn[lastused] > '$activetime'\";\n\n $result = DBUtil::executeSQL($sql);\n\n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($result === false) {\n return LogUtil::registerError(__('Error! Could not load data.', $dom));\n }\n\n // Obtain the item\n list($online) = $result->fields;\n\n // All successful database queries produce a result set, and that result\n // set should be closed when it has been finished with\n $result->Close();\n\n // Return if the user is online\n if ($online > 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "51f5ca6d9a368eed6ff9c60e39dac2b6", "score": "0.44710606", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"192.185.4.123\", \"cynthia_khan\", \"P@ssw0rd!\", \"cynthia_DB_School_Records\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "6361bdb769a34a6284a27fb1e551612a", "score": "0.4465391", "text": "public function isOnline(){\n\n return Cache::has('user-online' . $this->id);// is the current login user id okay.\n\n}", "title": "" }, { "docid": "6ca620ed0d1b65c2d56204103c986917", "score": "0.44590333", "text": "function groups_online($campus_id, $type = NULL , $limit = 25, $page = 1)\n\t{\n\t\t\n\t\t$this->db->join('groups_users', 'groups_users.group_id = groups.id');\n\t\t$this->db->join('users', 'groups_users.user_id = users.id')->where('groups_users.approved', 1);\n\t\t$this->db->join('roles', 'roles.user_id = users.id AND roles.type = \\'apprentice\\' OR roles.type = \\'facilitator\\'');\n\t\t\n\t\t// Last 15 minutes\n\t\t$this->db->where('users.last_on > ', time() - 900);\n\t\t$this->db->where('groups.type = \"small group\"');\n\t\t$this->db->group_by('groups.id');\n\t\n\t\treturn $this->items($campus_id, $type, $limit, $page);\n\t}", "title": "" }, { "docid": "c2f99ca2de1c3b5405880ce35db00e04", "score": "0.44577503", "text": "function isUserOnline(User $user);", "title": "" }, { "docid": "1d51cf20ec68c255e898794e825bb007", "score": "0.4428024", "text": "function getListFilter($col,$key) {\n\t\t\tif($col == 'fromtanggal')\n\t\t\t\treturn 'p.tglprestasi >= '.Query::escape(CStr::formatDate($key));\n\t\t\telse if($col == 'sdtanggal')\n\t\t\t\treturn 'p.tglprestasi <= '.Query::escape(CStr::formatDate($key));\n\t\t\telse\n\t\t\t\treturn parent::getListFilter($col,$key);\n\t\t}", "title": "" }, { "docid": "4493800e5f40a589270a91ab5052f9ca", "score": "0.44277024", "text": "public function getOnline() \n {\n return $this->Online;\n }", "title": "" }, { "docid": "d025e31bfdd1e8d38c3124f404a827f1", "score": "0.4426107", "text": "public function allFiltered();", "title": "" }, { "docid": "6998145e0892eb05b8968a961db396d0", "score": "0.44219398", "text": "public function getOnlineAttribute() \n\t{\n\t\treturn ((Carbon::now()->subSeconds(30)->lt(Carbon::parse($this->updated_at))) ? \"<span class='spot-status spot-status-online'>Online</span>\" : \"<span class='spot-status spot-status-offline'>Offline</span>\");\n\t}", "title": "" }, { "docid": "2a07f7161a4027a21bc098aace49982c", "score": "0.4421539", "text": "function within($min,$max)\n\t{\t\n\t\t// perf. optimization (nothing here to filter further)\n\t\tif (empty($this->filter->objects))\n\t\t\treturn $this->filter;\n\t\t\n\t\t\n $results = array();\n \n foreach($this->filter->objects as $object)\n {\n $set_value = $object[$this->field->name]; \n\n if ($set_value <= $max && $set_value >= $min)\n $results[] = $object;\n }\n\n return new MemoryFilter($results, $this->model, $this->class);\n\t}", "title": "" }, { "docid": "02e50709fdbe2fa3941d7d07793d5971", "score": "0.4419902", "text": "public function filterCallbackIsLessThan($field, $filterValue, $row)\n {\n return $row[$field] < $filterValue;\n }", "title": "" }, { "docid": "ed9da2aba264feb1c56e17717d068b6c", "score": "0.44175786", "text": "public function whereFilter()\n {\n\n }", "title": "" }, { "docid": "be4bc4777085cdc65eb656417de7a019", "score": "0.44155332", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"\", \"\", \"\", \"\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "94b73f13cc4269464d4904ad13d948c8", "score": "0.4414966", "text": "function GetFilterList() {\r\n\t\tglobal $UserProfile;\r\n\r\n\t\t// Load server side filters\r\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\") {\r\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fdatosestablecimientolistsrch\");\r\n\t\t} else {\r\n\t\t\t$sSavedFilterList = \"\";\r\n\t\t}\r\n\r\n\t\t// Initialize\r\n\t\t$sFilterList = \"\";\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->CUE->AdvancedSearch->ToJSON(), \",\"); // Field CUE\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Sigla->AdvancedSearch->ToJSON(), \",\"); // Field Sigla\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Establecimiento->AdvancedSearch->ToJSON(), \",\"); // Field Establecimiento\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Departamento->AdvancedSearch->ToJSON(), \",\"); // Field Id_Departamento\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Localidad->AdvancedSearch->ToJSON(), \",\"); // Field Id_Localidad\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Domicilio->AdvancedSearch->ToJSON(), \",\"); // Field Domicilio\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Telefono->AdvancedSearch->ToJSON(), \",\"); // Field Telefono\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Mail->AdvancedSearch->ToJSON(), \",\"); // Field Mail\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Nro_Matricula->AdvancedSearch->ToJSON(), \",\"); // Field Nro Matricula\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Cantidad_Aulas->AdvancedSearch->ToJSON(), \",\"); // Field Cantidad Aulas\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Comparte_Edificio->AdvancedSearch->ToJSON(), \",\"); // Field Comparte Edificio\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Cantidad_Turnos->AdvancedSearch->ToJSON(), \",\"); // Field Cantidad_Turnos\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Geolocalizacion->AdvancedSearch->ToJSON(), \",\"); // Field Geolocalizacion\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Tipo_Esc->AdvancedSearch->ToJSON(), \",\"); // Field Id_Tipo_Esc\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Universo->AdvancedSearch->ToJSON(), \",\"); // Field Universo\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Tiene_Programa->AdvancedSearch->ToJSON(), \",\"); // Field Tiene_Programa\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Sector->AdvancedSearch->ToJSON(), \",\"); // Field Sector\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Cantidad_Netbook_Conig->AdvancedSearch->ToJSON(), \",\"); // Field Cantidad_Netbook_Conig\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Nro_Cuise->AdvancedSearch->ToJSON(), \",\"); // Field Nro_Cuise\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Nivel->AdvancedSearch->ToJSON(), \",\"); // Field Id_Nivel\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Jornada->AdvancedSearch->ToJSON(), \",\"); // Field Id_Jornada\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Tipo_Zona->AdvancedSearch->ToJSON(), \",\"); // Field Tipo_Zona\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Estado_Esc->AdvancedSearch->ToJSON(), \",\"); // Field Id_Estado_Esc\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Id_Zona->AdvancedSearch->ToJSON(), \",\"); // Field Id_Zona\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Cantidad_Netbook_Actuales->AdvancedSearch->ToJSON(), \",\"); // Field Cantidad_Netbook_Actuales\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Fecha_Actualizacion->AdvancedSearch->ToJSON(), \",\"); // Field Fecha_Actualizacion\r\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Usuario->AdvancedSearch->ToJSON(), \",\"); // Field Usuario\r\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\r\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\r\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\r\n\t\t}\r\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\r\n\r\n\t\t// Return filter list in json\r\n\t\tif ($sFilterList <> \"\")\r\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\r\n\t\tif ($sSavedFilterList <> \"\") {\r\n\t\t\tif ($sFilterList <> \"\")\r\n\t\t\t\t$sFilterList .= \",\";\r\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\r\n\t\t}\r\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\r\n\t}", "title": "" }, { "docid": "50750595c4e3957a576a5f397b6f7c50", "score": "0.44049752", "text": "public function isOnline() {\n\t\tif ($this->lastActivityTime && $this->lastActivityTime > (TIME_NOW - USER_ONLINE_TIMEOUT) && (WCF::getUser()->userID == $this->userID || !$this->invisible || WCF::getUser()->getPermission('admin.general.canViewInvisible') || ($this->invisible == 2 && WCF::getUserProfileHandler()->isFollower($this->userID)))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "af11b3c3bbd0b749eae5556c1e845971", "score": "0.4404631", "text": "private function set_filter2sql($sql) {\n try {\n ($this->debug_on_file) ? error_log(logTime() . basename(__FILE__) . \" \" . __FUNCTION__ . PHP_EOL, 3, 'logs/fn.log') : false;\n\n $model = $this->table_model;\n $str_filter = \"\";\n $var_filter = \"\";\n $var_filter_assign = \"\";\n foreach ($model as $value) {\n if ($this->is_array_gii($value, \"CK_FILTER\", 1, 0) == \"1\") {\n //if ((isset($value[\"CK_FILTER\"])) && ($value[\"CK_FILTER\"] == 1)) {\n $col = $value[\"COL\"];\n $str_condition = \"\\\"\\\"\";\n\n $var_filter .= \"\\$str_filter_$col\" . PHP_EOL;\n //assign parameter\n $multiple = false;\n ($value[\"CK\"] == \"1\") ? $multiple = true : false;\n ($value[\"TYPE\"] == \"combogrid\") ? $multiple = true : false;\n ($value[\"TYPE\"] == \"combobox\") ? $multiple = true : false;\n\n\n //((isset($filter)) && $filter[\"CAMPO1\"])\n if (!$multiple) {\n $var_filter_assign .= \"\\$filter_$col = (isset(\\$filter[\\\"$col\\\"])) ? \\$filter[\\\"$col\\\"] : \\\"\\\";\" . PHP_EOL; // assign parameter\n $var_filter_assign .= ($this->is_array_gii($value, \"CK_FILTER_BETWEEN\", 1, 0) == \"1\") ? \"\\$filter_$col\" . \"__TO = ((isset(\\$filter)) && isset(\\$filter[\\\"$col\" . \"__TO\\\"])) ? \\$filter[\\\"$col\" . \"__TO\\\"] : \\\"\\\";\" . PHP_EOL : \"\"; // assign 2° for date between\n } else {\n //$filter_COMBO\n $var_filter_assign .= \"\\$filter_$col = (isset(\\$filter[\\\"$col\\\"])) ? \\$filter[\\\"$col\\\"] : \\\"\\\";\" . PHP_EOL; // assign parameter\n $var_filter_assign .= \"\\$filter_$col = (is_array(\\$filter_$col)) ? implode(\\\",\\\", \\$filter_$col) : \\$filter_$col;\" . PHP_EOL;\n }\n if (($value[\"TYPE\"] == \"textbox\") || ($value[\"TYPE\"] == \"textarea\")) {\n if ($value[\"CK_FILTER_LIKE\"] == 1) {\n $str_condition = \"\\\"AND $col LIKE '%\\$filter_$col%'\\\"\";\n } else {\n $str_condition = \"\\\"AND $col = '\\$filter_$col'\\\"\";\n }\n }\n // for number box\n if (($value[\"TYPE\"] == \"numberbox\") && ($value[\"CK\"] == \"0\")) {\n $str_condition = \"\\\"AND $col = \\$filter_$col\\\"\";\n }\n // for field yes/no\n if (($value[\"TYPE\"] == \"numberbox\") && ($value[\"CK\"] == \"1\")) {\n $str_condition = \"\\\"AND $col in (\\$filter_$col)\\\"\";\n }\n\n if (($value[\"TYPE\"] == \"combobox\") || ($value[\"TYPE\"] == \"combogrid\")) {\n $str_condition = \"\\\"AND $col in (\\$filter_$col)\\\"\";\n // for id cpmbobox in text\n $quote = \"\";\n if (isset($value[\"CK_FILTER_IDTEXT\"])) {\n $var_filter_assign .= \"// for quote on combo\" . PHP_EOL;\n $var_filter_assign .= \"\\$filter_$col = (\\$filter_$col != \\\"\\\") ? \\\"'\\\" . str_replace(\\\",\\\", \\\"','\\\", \\$filter_$col) . \\\"'\\\" : \\\"\\\";\" . PHP_EOL . PHP_EOL;\n }\n }\n\n if ($value[\"TYPE\"] == \"datebox\") {\n if ($this->is_array_gii($value, \"CK_FILTER_BETWEEN\", 1, 0) == \"1\") {\n $dt = $this->format_dt2todate($col);\n $dt_from = $this->format_dt2todate(\"'\\$filter_\" . $col . \"'\");\n $dt_to = $this->format_dt2todate(\"'\\$filter_\" . $col . \"__TO'\");\n $str_condition = \"\\\"AND $dt BETWEEN $dt_from and $dt_to\\\"\";\n } else {\n $str_condition = \"\\\"AND $col = '\\$filter_$col'\\\"\";\n }\n }\n\n // es.. $str_filter_CAMPO1 = ($filter_CAMPO1 != \"\") ? \"AND CAMPO1 = '$filter_CAMPO1'\" : \"\";\n $str_filter .= \"\\$str_filter_$col = (\\$filter_$col != \\\"\\\") ? $str_condition : \\\"\\\";\" . PHP_EOL;\n }\n }\n $str_after_filter = ($this->ck_custom_sql2 == 0) ? \"SELECT * FROM QRY\" : $this->custom_sql2;\n $sql_filter = \"\n WITH QRY AS ( \n SELECT * FROM (\n $sql\n ) WHERE 1= 1\n $var_filter\n )\n $str_after_filter\n \";\n\n $param_all = \"\n \\$filter = \\$app->request->params('filter'); // Param from Post user\n $var_filter_assign\n $str_filter\n \";\n\n $this->str_filter_dg = $param_all;\n\n return $sql_filter;\n } catch (Exception $e) {\n error_log(LogTime() . \" \" . message_err($e), 3, 'logs/error.log');\n throw new Exception(message_err($e));\n }\n }", "title": "" }, { "docid": "17dad8f6d4e38b08743191c42b1b07df", "score": "0.4391192", "text": "public function check_offline() {\n db::pdo()->query('DELETE FROM `online` WHERE TIMESTAMPDIFF(MINUTE, time, now()) > 5');\n db::pdo()->execute();\n }", "title": "" }, { "docid": "99eadec6f9d40a427efc06a0c37a926a", "score": "0.4387516", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"login\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "f8b2334819149b16c20e85ca4688389d", "score": "0.4378735", "text": "function getArrayListFilterCol() {\n\t\t\treturn array('poin' => \"(case when isvalid='-1' then coalesce(pp.poin,0) end)\");\n\t\t}", "title": "" }, { "docid": "4f2d6fa7d1df56d29223c2427fa87170", "score": "0.43750933", "text": "private function restrict_query()\n\t{\n\t\t$settings = Settings::Get();\n\t\t$access = Session::Get()->getAccess();\n\n\t\tif ($settings->getFilterPattern())\n\t\t\tdie('you cannot combine filter-pattern and local history');\n\t\tif (count($settings->getQuarantineFilter()) > 0)\n\t\t\tdie('you cannot combine quarantine-filter and local history');\n\t\tif (count($settings->getArchiveFilter()) > 0)\n\t\t\tdie('you cannot combine archive-filter and local history');\n\n\t\t$filter = array();\n\t\t$params = array();\n\t\t$i = 0;\n\t\t$access = Session::Get()->getAccess();\n\t\tif (isset($access['userid'])) {\n\t\t\t$i++;\n\t\t\t$filter[] = 'userid = :restrict'.$i;\n\t\t\t$params[':restrict'.$i] = $access['userid'];\n\t\t}\n\t\tif (is_array($access['domain'])) {\n\t\t\tforeach ($access['domain'] as $domain) {\n\t\t\t\t$i++;\n\t\t\t\t$filter[] = 'owner_domain = :restrict'.$i;\n\t\t\t\t$params[':restrict'.$i] = $domain;\n\t\t\t}\n\t\t}\n\t\tif (is_array($access['mail'])) {\n\t\t\tforeach ($access['mail'] as $mail) {\n\t\t\t\t$i++;\n\t\t\t\t$filter[] = 'owner = :restrict'.$i;\n\t\t\t\t$params[':restrict'.$i] = $mail;\n\t\t\t}\n\t\t}\n\t\treturn array('filter' => implode(' or ', $filter), 'params' => $params);\n\t}", "title": "" }, { "docid": "424baa1abe5d829f5a942d3557b72177", "score": "0.43651888", "text": "public function query() {\n\t\t// First, let's get a list containing all the columns with all the filters.\n\t\t// If there are missing columns, let's create a DB_SumFilter on those automatically.\n\t\t\n\t\t$columns = $this->dbStats->getFilterColumns();\n\t\t\n\t\t$filtersByColumn = array();\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filtersByColumn[$filter->columnName] = $filter;\n\t\t}\n\t\t\n\t\tforeach ($columns as $column) {\n\t\t\tif (!isset($filtersByColumn[$column->columnName])) {\n\t\t\t\t$columnSumFilter = new DB_SumFilter();\n\t\t\t\t$columnSumFilter->columnName = $column->columnName;\n\t\t\t\t$filtersByColumn[$column->columnName] = $columnSumFilter; \n\t\t\t}\n\t\t}\n\t\t\n\t\t// Now, $filtersByColumn contains the name of all the columns as a key, and a filter as the value.\n\t\t\n\t\t$sql = \"SELECT * FROM `\".$this->dbStats->statsTable.\"` WHERE \";\n\t\t\n\t\t$filterArr = array();\n\t\tforeach ($filtersByColumn as $columnName=>$filter) {\n\t\t\t$filterArr[] = $filter->getSqlFilter($this->dbStats->dbConnection);\n\t\t}\n\t\t\n\t\t$sql .= implode(\" AND \", $filterArr);\n\t\t//echo $sql.\"\\n\";\n\t\treturn $this->dbStats->dbConnection->getAll($sql);\n\t}", "title": "" }, { "docid": "1f51d6b17ed981e8371040c8aeebeef2", "score": "0.43570065", "text": "function filterTable($query)\r\n{\r\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"testing\");\r\n $filter_Result = mysqli_query($connect, $query);\r\n return $filter_Result;\r\n}", "title": "" }, { "docid": "accb4d7883e5e16d0f367c0ce608c8ca", "score": "0.4356526", "text": "function usersOnline(){\n\t\tglobal $database;\n\t\t$time = time();\n\t\t$timech=$time-300;\n\t\t\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t\n\t\t//$result = mysqli_query(\"SELECT * FROM Users_online WHERE sessionid='\".$this->sessionid.\"'\");\n\t\t$result = mysqli_query($database->connection, \"SELECT * FROM Users_online WHERE sessionid='\".$ip.\"'\");\n\t\t$num = mysqli_num_rows($result);\n\t\t\n\t\tif($num == \"0\"){\n\t\t\t//$result1 = mysqli_query(\"INSERT INTO Users_online (sessionid, time)VALUES('\".$this->sessionid.\"', '$time')\");\n\t\t\tif($this->user) {\n\t\t\t\t$result1 = mysqli_query($database->connection, \"INSERT INTO Users_online (sessionid, time, userid)VALUES('\".$ip.\"', '$time', \".$this->user.\")\");\n\t\t\t} else {\n\t\t\t\t$result1 = mysqli_query($database->connection, \"INSERT INTO Users_online (sessionid, time, userid)VALUES('\".$ip.\"', '$time')\");\n\t\t\t}\n\t\t}else{\n\t\t\t//$result2 = mysqli_query(\"UPDATE Users_online SET time='$time' WHERE session = '\".$this->sessionid.\"'\");\n\t\t\t$result2 = mysqli_query($database->connection, \"UPDATE Users_online SET time='$time' WHERE sessionid = '\".$ip.\"'\");\n\t\t}\n\t\t\n\t\tmysqli_query($database->connection, \"DELETE FROM Users_online WHERE time<$timech\");\n\t\t\n\t\t$result3 = mysqli_query($database->connection, \"SELECT * FROM Users_online\"); \n\t\t\n\t\t$usersonline = mysqli_num_rows($result3);\n\t\t$this->usersOnline = $usersonline; \n\t}", "title": "" }, { "docid": "00e0b57df0ebb34a7e346ec0dde0c988", "score": "0.4352396", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"music\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "88ebbbcc7b58254559805126a1a7da6a", "score": "0.43522602", "text": "public static function getFilterCriteria($onOnePage,$currentPage, $c = null)\n {\n /* @var $criteria CDbCriteria */\n\n //if criteria not set - create new empty criteria\n !empty($c) ? $criteria = $c : $criteria = new CDbCriteria();\n\n //update criteria with params\n $criteria -> limit = $onOnePage;\n $criteria -> offset = self::calcOffset($onOnePage,$currentPage);\n\n //return updated\n return $criteria;\n }", "title": "" }, { "docid": "22cbf55a9ec1b9ce0166f07349af6a78", "score": "0.43478155", "text": "public function online(){\n\t\t$activities = Activity::users(10)->get();// 10 minutes\n\n\t\t//Al users\n\t\t$users = Perfil::where('active',true)->paginate(20);\n\n\t\t//Friends\n\t\t$id = Auth::user()->id;\n\t\t//Stack users\n\t\t$user_contents = [];\n\t\t//ID all my friends\n\t\t$friends = DB::select('SELECT * FROM friends WHERE (user1 = '.$id.' OR user2 = '.$id.') AND status = 1');\n\t\t// dd($friends);\n\t\t//If i had more than one friends\n\t\tif (count($friends) > 0) {\n\t\t\t// I get each users\n\t\t\tforeach ($friends as $friend) {\n\t\t\t\t//declare a variable ID user\n\t\t\t\t$user_id = \"\";\n\n\t\t\t\t//If this user is equal to ID\n\t\t\t\tif ($friend->user1 == $id)\n\t\t\t\t\t//Add value to user_id of another user\n\t\t\t\t\t$user_id = $friend->user2;\n\t\t\t\telse\n\t\t\t\t\t//If not add value user_id this user\n\t\t\t\t\t$user_id = $friend->user1;\n\n\t\t\t\t//let's search a user active\n\t\t\t\t$user = Perfil::select('id')->where('id',$user_id)\n\t\t\t\t\t\t\t\t->where('active',true)\n\t\t\t\t\t\t\t\t->first();\n\t\t\t\t//If return user is more than one and less than two\n\t\t\t\tif (count($user)>0 && count($user) < 2) {\n\t\t\t\t\tarray_push($user_contents, $user);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$friends_online = [];\n foreach ($activities as $activity) {\n foreach ($user_contents as $key => $friend) {\n \tif ($activity->user->id == $friend->id) {\n \t\tarray_push($friends_online,$activity);\n \t}\n }\n }\n\n if (count($friends_online) > 0) {\n \tforeach ($friends_online as $onlie) {\n \t\t$html = '<div class=\"online-detail-user\" data-user=\"'.$onlie->user->id.'\" tabindex=\"0\" role=\"button\" data-toggle=\"popover\" data-trigger=\"focus\"><div class=\"row chat-content-view\" style=\"cursor:pointer;\">'.'<div style=\"color:#000;\">'.'<div class=\"clearfix\"></div>'.'<div class=\"col-xs-4\" style=\"position:relative;\">'.'<img style=\"width:100%;border-radius:5px;\" src=\"/'.$onlie->user->img_profile.'\" alt=\"shymow\">'.'<span style=\"position:absolute;background:#00A02F;bottom:5px;right: 20px;padding:5px;border-radius: 50%;border: 1px solid #fff;\"></span>'.'</div>'.'<div class=\"col-xs-6\">'.'<div style=\"font-weight: bold;\">'.'<div style=\"font-size:1.1em;float:left;margin-top:10px;color:#676665;\">'.$onlie->user->name.'</div>'.'</div>'.'<div class=\"clearfix\"></div>'.'</div>'.'</div>'.'</div>'.'</div>'.'<div class=\"clearfix\"></div>'.'<hr>';\n \t\techo $html;\n \t}\n }else{\n \t\techo '<span style=\"color:#000; font-size:1.2em; font-family:gothamTwo;\">Online 0</span>';\n \t}\n\t}", "title": "" }, { "docid": "5da7be12aadc1c18d5d45d47c4d6e647", "score": "0.43477824", "text": "public function rules(): array\n {\n return ['is_online' => 'required|in:0,1'];\n }", "title": "" }, { "docid": "ed62e70d928376027bade17265f33974", "score": "0.43476295", "text": "protected function _filterStatus($collection, $column) {\n if (!$value = $column->getFilter()->getValue())\n return;\n if (isset($value))\n $collection->getSelect()\n ->where('main_table.category_status = ' . mysql_escape_string($value));\n }", "title": "" }, { "docid": "d35714812a08f9c1fe05259d50f9f70a", "score": "0.43473464", "text": "private function filterBy($column, $args)\r\n\t{\r\n\t\t// to conditionally allow a condition to be specified before a value\r\n\t\tif(isset($args[1]))\r\n\t\t{\r\n\t\t\t$value = $args[1];\r\n\t\t\t$condition = $args[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$value = $args[0];\r\n\t\t\t$condition = '=';\r\n\t\t}\r\n\t\t\r\n\t\tif(!is_numeric($value))\r\n\t\t\t$value = \"'\".$this->db->escape($value).\"'\";\r\n\t\t\r\n\t\t$this->conditions[] = $column.' '.$condition.' '.$value;\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "c5773cd9c5a457c1f125044ab94a4816", "score": "0.43464574", "text": "function filterTable($query)\n{\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"arifpharmacy\");\n $filter_Result = mysqli_query($connect, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "1c23f6515aaae1c0b0f1886c80619081", "score": "0.43446702", "text": "public function filter($args = array(), $operator = 'AND')\n {\n }", "title": "" }, { "docid": "661411b760b90cf348e1e25869bbe472", "score": "0.43441013", "text": "public function where_lte($column_name, $value = null)\n {\n }", "title": "" }, { "docid": "9a89e4f62c2c535b834ff1488dde926e", "score": "0.43423012", "text": "public function filterDataTable($query,$request)\n {\n if (isset($request['req']['from']) && $request['req']['from'] != '')\n $query->whereDate('created_at' , '>=' , $request['req']['from']);\n\n if (isset($request['req']['to']) && $request['req']['to'] != '')\n $query->whereDate('created_at' , '<=' , $request['req']['to']);\n\n if (isset($request['req']['deleted']) && $request['req']['deleted'] == 'only')\n $query->onlyDeleted();\n\n if (isset($request['req']['deleted']) && $request['req']['deleted'] == 'with')\n $query->withDeleted();\n\n if (isset($request['req']['status']) && $request['req']['status'] == '1')\n $query->active();\n\n if (isset($request['req']['status']) && $request['req']['status'] == '0')\n $query->unactive();\n\n return $query;\n }", "title": "" }, { "docid": "4fbe52f7874434777a184b10de51f9f3", "score": "0.43404853", "text": "function Profile_memberslistapi_getregisteredonline($args)\n{\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // Get database setup\n $pntable = pnDBGetTables();\n\n // It's good practice to name the table and column definitions you are\n // getting - $table and $column don't cut it in more complex modules\n $sessioninfocolumn = $pntable['session_info_column'];\n $sessioninfotable = $pntable['session_info'];\n\n $activetime = adodb_strftime('%Y-%m-%d %H:%M:%S', time() - (pnConfigGetVar('secinactivemins') * 60));\n\n // Get items\n $sql = \"SELECT DISTINCT $sessioninfocolumn[uid] FROM $sessioninfotable\n WHERE $sessioninfocolumn[uid] != 0 AND $sessioninfocolumn[lastused] > '$activetime'\n GROUP BY $sessioninfocolumn[uid]\";\n\n $result = DBUtil::executeSQL($sql);\n\n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($result === false) {\n return LogUtil::registerError(__('Error! Could not load data.', $dom));\n }\n\n // Obtain the number of items\n $numusers = $result->RecordCount();\n\n // All successful database queries produce a result set, and that result\n // set should be closed when it has been finished with\n $result->Close();\n\n // Return the number of items\n return $numusers;\n}", "title": "" }, { "docid": "ce5e1b9cab7c523af8f0c6e600288c14", "score": "0.4339541", "text": "public function getOnlineAcctServices()\n\t{\n\t\t$where = \"nBrokerID = $this->m_BrokerID\";\n\t\t$cols = \"bEXEBasedTrading,\tbBrowserBasedTrading,bMobileBasedTrading,bCallNTrade\";\n\t\t$result = $this->db->select('tbl_onlineacctservices',$where,$cols);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d67278a62b0e43af5773092db1228af5", "score": "0.43354478", "text": "function filterTable($query)\r\n\t{\r\n \t\t$connect = mysqli_connect(\"localhost\", \"root\", \"\", \"cwd\");\r\n \t$filter_Result = mysqli_query($connect, $query);\r\n \treturn $filter_Result;\r\n\t}", "title": "" }, { "docid": "9cac9b8b28c082a6cf181c3efa8245ad", "score": "0.43198887", "text": "public function sql_where()\n {\n $where = '';\n $filter = $this->filter;\n \n $sWSt = '';\n \n switch($filter['status'])\n {\n case 'Hours today':\n $sWSt = \"AND H_HoursDate = CONVERT(varchar,dateadd(day,0,getdate()),101) \";\n break;\n case 'Hours yesterday':\n $sWSt = \"AND H_HoursDate = CONVERT(varchar,dateadd(day,-1,getdate()),101) \";\n break;\n case 'Hours over last 7 days':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(day,-7,getdate()),101) \";\n break;\n case 'Hours this month':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(day,-datepart(day,getdate())+1,getdate()),101) \";\n break;\n case 'Hours over last 3 months':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(month,-3,getdate()),101) \";\n break;\n case 'Hours over last 6 months':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(month,-6,getdate()),101) \";\n break;\n case 'Hours over last 12 months':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(month,-12,getdate()),101) \";\n break;\n case 'Hours this year':\n $sWSt = \"AND DATEPART(month, H_HoursDate) >= DATEPART(month, GETDATE()) \";\n break;\n case 'Hours over last 12 months':\n $sWSt = \"AND H_HoursDate >= CONVERT(varchar,dateadd(month,-12,getdate()),101) \";\n break;\n }\n \n $where .= isset($filter['section']) && !empty($filter['section']) ? \"AND WDB_S_Name = '{$filter['section']}' \" : null;\n $where .= isset($filter['branch']) && !empty($filter['branch']) ? \"AND WDB_B_Name = '{$filter['branch']}' \" : null;\n $where .= isset($filter['project']) && !empty($filter['project']) ? \"AND WDB_P_Name = '{$filter['project']}' \" : null;\n $where .= isset($filter['area']) && !empty($filter['area']) ? \"AND WDB_A_Name = '{$filter['area']}' \" : null;\n $where .= isset($filter['officer']) && !empty($filter['officer']) ? \"AND H_EmployeeID = '{$filter['officer']}' \" : null;\n \n return \"WHERE H_HoursInDec > 0 {$sWSt} {$where}\";\n }", "title": "" }, { "docid": "c97603a1f23d43d488eec7261872e49c", "score": "0.43197477", "text": "public function where(callable $callable): FilterableInterface;", "title": "" }, { "docid": "ddd102b678ea9bd54c54260efd44bf6e", "score": "0.43179107", "text": "function filterTable($query)\n\t{\n \t\t$connect = mysqli_connect(\"localhost\", \"root\", \"\", \"cwd\");\n \t$filter_Result = mysqli_query($connect, $query);\n \treturn $filter_Result;\n}", "title": "" }, { "docid": "514df7c746364f633f43611cc5de4d6f", "score": "0.43078423", "text": "function Profile_memberslistapi_getallonline($args)\n{\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // Get database setup\n $pntable = pnDBGetTables();\n\n // define the array to hold the resultant items\n $items = array();\n\n $sessioninfotable = $pntable['session_info'];\n $sessioninfocolumn = &$pntable['session_info_column'];\n $usertbl = $pntable['users'];\n $usercol = &$pntable['users_column'];\n\n // get active time based on security settings\n $activetime = adodb_strftime('%Y-%m-%d %H:%M:%S', time() - (pnConfigGetVar('secinactivemins') * 60));\n\n // Check if anonymous session are on\n if (pnConfigGetVar('anonymoussessions')) {\n $anonwhere = \"AND $sessioninfotable.$sessioninfocolumn[uid] >= '0' \";\n } else {\n $anonwhere = \"AND $sessioninfotable.$sessioninfocolumn[uid] > '0'\";\n }\n\n // Get items\n $sql = \"SELECT $sessioninfotable.$sessioninfocolumn[uid],\n $usertbl.$usercol[uname]\n FROM $sessioninfotable, $usertbl\n WHERE $sessioninfocolumn[lastused] > '$activetime'\n $anonwhere\n AND IF($sessioninfotable.$sessioninfocolumn[uid]='0','1',\n $sessioninfotable.$sessioninfocolumn[uid]) = $usertbl.$usercol[uid]\n GROUP BY $sessioninfocolumn[ipaddr], $sessioninfotable.$sessioninfocolumn[uid]\n ORDER BY $usercol[uname]\";\n\n $result = DBUtil::executeSQL($sql);\n\n // Check for an error with the database code, and if so set an appropriate\n // error message and return\n if ($result === false) {\n return LogUtil::registerError(__('Error! Could not load data.', $dom));\n }\n\n $numusers = 0;\n $numguests = 0;\n $unames = array();\n for (; !$result->EOF; $result->MoveNext()) {\n list($uid, $uname) = $result->fields;\n\n if ($uid != 0) {\n $unames[] = array('uid' => $uid,\n 'uname' => $uname);\n $numusers++;\n } else {\n $numguests++;\n }\n }\n\n $items = array('unames' => $unames,\n 'numusers' => $numusers,\n 'numguests' => $numguests,\n 'total' => $numguests + $numusers);\n\n $result->Close();\n\n // Return the items\n return $items;\n}", "title": "" }, { "docid": "305352851bb0c69a68adc1a9aed77641", "score": "0.4306148", "text": "function filterTable($query)\n{\n $hostname = \"academic-mysql.cc.gatech.edu\"; /*This is your hostname */\n $username = \"cs4400_group53\"; /*The user id you use to log in phpmyadmin */\n $password =\"Efhjn754\"; /* the password for phpmyadmin */\n $database = \"cs4400_group53\"; /* the name of the database that you wish to fetch data from */\n $ntwk = mysqli_connect($hostname, $username, $password, $database);\n $filter_Result = mysqli_query($ntwk, $query);\n return $filter_Result;\n}", "title": "" }, { "docid": "01ac316ff0280d5c1f6a1db72559fe8e", "score": "0.42993915", "text": "public function isOnline()\n {\n return \\Cache::has(self::onlineKey($this->id));\n }", "title": "" }, { "docid": "7a372651ef69edc8d4593bd8bc15f757", "score": "0.4296861", "text": "public function filterByEnabledBeforeAndOn(DateTime $oDate)\n {\n $oGateway = $this->getGateway();\n $sAlias = $this->getDefaultAlias();\n if(false === empty($sAlias)) {\n $sAlias = $sAlias .'.';\n }\n \n $paramType = $oGateway->getMetaData()->getColumn('enabled_from')->getType();\n \n \n return $this->andWhere($this->expr()->lte($sAlias.\"enabled_from\",$this->createNamedParameter($oDate,$paramType)));\n }", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.42936832", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.42936832", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.42936832", "text": "public function filter($value);", "title": "" }, { "docid": "85870623600695259c9e658567e15175", "score": "0.4286053", "text": "public function getCurrentMinPriceFilter()\r\n {\r\n list($from, $to) = $this->_filter->getInterval();\r\n \r\n $from = floor((float) $from);\r\n\r\n if ($from < $this->getMinPriceFloat()) {\r\n return $this->getMinPriceFloat();\r\n }\r\n\r\n return $from;\r\n }", "title": "" } ]
bf871348e272155ede272d49471ec6ad
1 calculation formula (normal) 2 resulting formula (range type) 3 resulting formula (graph type) 4 parent holder element
[ { "docid": "3079729c246cc18c9e7b92bbee7710c0", "score": "0.5543817", "text": "public function actionCreateResultFormula() {\n $parent_id=Yii::app()->request->getPost('parent_id');\n $model=new Formula('formulaResult');\n $model->type_id=Yii::app()->request->getPost('type_id');\n \n if(!is_null($parent_id))\n $model->parent=$parent_id; \n \n $formulaType=Yii::app()->request->getPost('type');\n $ch_array=(is_null(Yii::app()->request->getPost('ch_array'))) ? array() : Yii::app()->request->getPost('ch_array');\n\n switch ($formulaType) {\n case 'range_f':\n $model->type=2;\n break;\n case 'graph_f':\n $model->type=3;\n break;\n case 'parent':\n $model->type=4;\n break;\n }\n\n $model->save();\n $model->title=Yii::t('formula', 'Новая цепочка-'.$model->id);\n $model->weight=$model->id;\n $model->save('weight');\n \n if($model->type==4)\n $this->bindFormulaToParent($ch_array, $model->id);\n \n $item_id=Yii::app()->request->getPost('item_id');\n $item=Item::model()->findByPk($item_id); \n \n $html=$this->renderPartial('_formula',array('models'=>array($model), 'sizeList'=>($item) ? $item->sizeList : null), true, false);\n $data=array(\n 'html'=>$html,\n 'type'=>$model->type,\n 'ch_array'=>$ch_array,\n );\n echo json_encode($data);\n Yii::app()->end();\n }", "title": "" } ]
[ { "docid": "1bd3075e0dd18d4148e42a3f00ea817b", "score": "0.5380033", "text": "abstract protected function calculate();", "title": "" }, { "docid": "123c88a0e61af1a2f851b5dc2943ad3f", "score": "0.53312075", "text": "function generate_oper_expense_ratio($from_date,$to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n//OPERATING INCOME\n //INCOME FROM LOANS\n $int_res = mysql_query(\"select sum(int_amt) as amount from payment where date <='\".$apparent_date.\"'\");\n $int = mysql_fetch_array($int_res);\n $int_amt = ($int['amount'] != NULL) ? $int['amount'] : 0;\n\n //PENALITIES\n $pen_res = mysql_query(\"select sum(amount) as amount from penalty where date <='\".$apparent_date.\"'\");\n $pen = mysql_fetch_array($pen_res);\n $pen_amt = ($pen['amount'] != NULL) ? $pen['amount'] : 0;\n\n //OTHER INCOME\n $other_res = mysql_query(\"select sum(amount) as amount from other_income where date <= '\".$apparent_date.\"'\");\n $other = mysql_fetch_array($other_res);\n $other_amt = ($other['amount'] != NULL);\n \n //TRANSACTIONAL CHARGES\n $dep_res = mysql_query(\"select sum(flat_value + percent_value) as charge from deposit where date <='\".$apparent_date.\"'\");\n $dep = mysql_fetch_array($dep_res);\n $dep_charge = ($dep['charge'] != NULL) ? $dep['charge'] : 0;\n $with_res = mysql_query(\"select sum(flat_value + percent_value) as charge from withdrawal where date <='\".$apparent_date.\"'\");\n $with = mysql_fetch_array($with_res);\n $with_charge = ($with['charge'] != NULL) ? $with['charge'] : 0;\n\n $charge_res = mysql_query(\"select sum(amount) as amount from monthly_charge where date <='\".$last_date.\"'\");\n $charge = mysql_fetch_array($charge_res);\n $charge_amt = ($charge['amount'] != NULL) ? $charge['amount'] : 0;\n\n $income = $int_amt + $pen_amt + $other_amt + $dep_charge + $with_charge + $charge_amt;\n $income_amt = ($income != 0) ? $income : 1;\n \n//OPERATING EXPENSES\n $expense_res = mysql_query(\"select sum(e.amount) as amount from expense e join accounts a on e.account_id=a.id where date <= '\".$apparent_date.\"'\");\n $expense = mysql_fetch_array($expense_res);\n $expense_amt = ($expense['amount'] != NULL) ? $expense['amount'] : 0;\n \n $percent = ($expense_amt / $income_amt) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(90,80,40,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Operating Expense Ratio (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"OPERATING EXPENSE RATIO PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Operating Expense Ratio (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"expense_ratio.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "55cb2218f41674dcac67eb82a68c976f", "score": "0.52572197", "text": "abstract public function calculate();", "title": "" }, { "docid": "6b1f726ddc6beff90eafa5197349c6fc", "score": "0.51954305", "text": "abstract protected function _buildCalcRows();", "title": "" }, { "docid": "393cb8b97afa2902f1131a09ad386659", "score": "0.510489", "text": "public function formula(): string\n {\n switch ($this->relation) {\n case '<=':\n return \"`t(\\alpha, {$this->degreeFormula}) = t({$this->alpha}, {$this->degree}) = {$this->criticalValue()}`\";\n case '>=':\n return \"`-t(\\alpha, {$this->degreeFormula}) = -t({$this->alpha}, {$this->degree}) = {$this->criticalValue()}`\";\n case '=':\n $alpha = $this->alpha * 2;\n return \"`t(\\alpha / 2, {$this->degreeFormula}) = t({$alpha} / 2, {$this->degree}) = t({$this->alpha}, {$this->degree}) = {$this->criticalValue()}`\";\n }\n }", "title": "" }, { "docid": "0be3dede1be5020893e88d2284445980", "score": "0.5040876", "text": "function generate_oper_sufficiency($from_date, $to_date){\nlist($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n//OPERATING INCOME\n //INCOME FROM LOANS\n $int_res = mysql_query(\"select sum(int_amt) as amount from payment where date <='\".$apparent_date.\"'\");\n $int = mysql_fetch_array($int_res);\n $int_amt = ($int['amount'] != NULL) ? $int['amount'] : 0;\n\n //PENALITIES\n $pen_res = mysql_query(\"select sum(amount) as amount from penalty where date <='\".$apparent_date.\"'\");\n $pen = mysql_fetch_array($pen_res);\n $pen_amt = ($pen['amount'] != NULL) ? $pen['amount'] : 0;\n\n //OTHER INCOME\n $other_res = mysql_query(\"select sum(amount) as amount from other_income where date <= '\".$apparent_date.\"'\");\n $other = mysql_fetch_array($other_res);\n $other_amt = ($other['amount'] != NULL);\n \n //TRANSACTIONAL CHARGES\n $dep_res = mysql_query(\"select sum(flat_value + percent_value) as charge from deposit where date <='\".$apparent_date.\"'\");\n $dep = mysql_fetch_array($dep_res);\n $dep_charge = ($dep['charge'] != NULL) ? $dep['charge'] : 0;\n $with_res = mysql_query(\"select sum(flat_value + percent_value) as charge from withdrawal where date <='\".$apparent_date.\"'\");\n $with = mysql_fetch_array($with_res);\n $with_charge = ($with['charge'] != NULL) ? $with['charge'] : 0;\n\n $charge_res = mysql_query(\"select sum(amount) as amount from monthly_charge where date <='\".$last_date.\"'\");\n $charge = mysql_fetch_array($charge_res);\n $charge_amt = ($charge['amount'] != NULL) ? $charge['amount'] : 0;\n\n $income = $int_amt + $pen_amt + $other_amt + $dep_charge + $with_charge + $charge_amt;\n \n//OPERATING EXPENSES\n $expense_res = mysql_query(\"select sum(e.amount) as amount from expense e join accounts a on e.account_id=a.id where date <= '\".$apparent_date.\"'\");\n $expense = mysql_fetch_array($expense_res);\n $expense_amt = ($expense['amount'] != NULL) ? $expense['amount'] : 1;\n\n\n $percent = ($income / $expense_amt) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(90,80,80,40);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Operational Self Sufficiency (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"OPERATIONAL SELF SUFFICIENCY PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Operational Self-Sufficiency (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"oper_sufficiency.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "ce52447ae9a292fdb8744129a5798afe", "score": "0.5037108", "text": "function generate_liquidity_ratio($from_date,$to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //CASH\n //DEPOSITS\n $dep_res = mysql_query(\"select sum(amount) as amount from deposit where date <='\".$apparent_date.\"' and bank_account >0\");\n $dep = mysql_fetch_array($dep_res);\n //WITHDRAWALS\n $with_res = mysql_query(\"select sum(amount) as amount from withdrawal where date <='\".$apparent_date.\"'\");\n $with = mysql_fetch_array($with_res);\n //OTHER INCOME\n $other_res = mysql_query(\"select sum(amount) as amount from other_income where date <='\".$apparent_date.\"'\");\n $other = mysql_fetch_array($other_res);\n //EXPENSES\n $expense_res = mysql_query(\"select sum(amount) as amount from expense where date <='\".$apparent_date.\"'\");\n $expense = mysql_fetch_array($expense_res);\n //PAYABLE PAID\n $payable_paid_res = mysql_query(\"select sum(amount) as amount from payable_paid where date <='\".$apparent_date.\"'\"); \n $payable_paid = mysql_fetch_array($payable_paid_res);\n //RECEIVALE COLLECTED\n $collected_res = mysql_query(\"select sum(amount) as amount from collected where date <='\".$apparent_date.\"'\");\n $collected = mysql_fetch_array($collected_res);\n //DISBURSED LOANS\n $disb_res = mysql_query(\"select sum(amount) as amount from disbursed where date <= '\".$apparent_date.\"'\");\n $disb = mysql_fetch_array($disb_res);\n //PAYMENTS\n $pay_res = mysql_query(\"select sum(p.princ_amt + p.int_amt) as amount from payment p join disbursed d on p.loan_id=d.id where p.date <= '\".$apparent_date.\"'\");\n $pay = mysql_fetch_array($pay_res);\n //PENALTIES\n $pen_res = mysql_query(\"select sum(p.amount) as amount from penalty p join disbursed d on p.loan_id=d.id where p.status='paid' and p.date <= '\".$apparent_date.\"'\");\n $pen = mysql_fetch_array($pen_res);\n \n //SHARES\n $shares_res = mysql_query(\"select sum(value) as amount from shares where date <'\".$apparent_date.\"'\");\n $shares = mysql_fetch_array($shares_res); \n //RECOVERED\n $rec_res = mysql_query(\"select sum(r.amount) as amount from recovered r join written_off w on r.written_off_id=w.id join disbursed d on w.loan_id=d.id where r.date <= '\".$apparent_date.\"'\");\n $rec = mysql_fetch_array($rec_res); \n //INVESTMENTS \n $invest_res = mysql_query(\"select sum(quantity * amount) as amount from investments where date <= '\".$apparent_date.\"'\");\n $invest = mysql_fetch_array($invest_res);\n $invest_amt = ($invest['amount'] != NULL) ? $invest['amount'] : 0;\n $soldinvest_res = mysql_query(\"select sum(quantity * amount) as amount from sold_invest where date <='\".$apparent_date.\"'\");\n $soldinvest = mysql_fetch_array($soldinvest_res);\n\n //FIXED ASSETS \n $fixed_res = mysql_query(\"select sum(initial_value) as amount from fixed_asset where date <='\".$apparent_date.\"'\");\n $fixed = mysql_fetch_array($fixed_res);\n $soldasset_res = mysql_query(\"select sum(amount) as amount from sold_asset where date <='\".$apparent_date.\"'\");\n $soldasset = mysql_fetch_array($soldasset_res);\n \n $cash_amt = $collected['amount'] + $dep['amount'] + $other['amount'] - $with['amount'] - $expense['amount'] -$payable_paid['amount'] - $disb['amount'] + $pay['amount'] + $shares['amount'] + $pen['amount'] + $rec['amount'] + $soldasset['amount'] + $soldinvest['amount'] - $invest_amt - $fixed['amount']; \n\n //LIQUID INVESTMENTS\n $invest_res = mysql_query(\"select sum(i.amount) as amount from investments i join accounts a on i.account_id=a.id where i.date < '\".$apparent_date.\"' and i.id not in (select investment_id from sold_invest) and a.account_no like '113%'\");\n $invest = mysql_fetch_array($invest_res);\n $invest_amt = ($invest['amount'] != NULL) ? $invest['amount'] : 0;\n $liquid_amt = $cash_amt + $invest_amt;\n \n\n //CURRENT LIABILITIES\n //SAVINGS\n $dep_res = mysql_query(\"select sum(amount - flat_value - percent_value) as amount from deposit where date <='\".$apparent_date.\"' and bank_account >0\");\n $dep = mysql_fetch_array($dep_res);\n $dep_amt = ($dep['amount'] != NULL) ? $dep['amount'] : 0;\n $with_res = mysql_query(\"select sum(amount + flat_value + percent_value) as amount from withdrawal where date <='\".$apparent_date.\"'\");\n $with = mysql_fetch_array($with_res);\n $with_amt = ($with['amount'] != NULL) ? $with['amount'] : 0;\n $savings = $dep_amt - $with_amt;\n //INTEREST PAYABLE ON SAVINGS\n $int_res = mysql_query(\"select sum(amount) as amount from save_interest where date <= '\".$apparent_date.\"'\");\n $int = mysql_fetch_array($int_res);\n $int_amt = ($int['amount'] != NULL) ? $int['amount'] : 0;\n //OTHER SHORT-TERM LIABILITIES\n $payable_res = mysql_query(\"select sum(p.amount) as amount from payable p join accounts a on p.account_id=a.id where a.account_no like '2%' and a.account_no not like '2122%' and p.maturity_date='\".$apparent_date.\"'\");\n $payable = mysql_fetch_array($pay_res);\n $payable_amt = ($payable['amount'] != NULL) ? $payable['amount'] : 0;\n\n $paid_res = mysql_query(\"select sum(paid.amount) as amount from payable_paid paid join payable p on paid.payable_id=p.id join accounts a on p.account_id=a.id where a.account_no like '2%' and a.account_no not like '2122%' and p.maturity_date='\".$apparent_date.\"' and paid.date <='\".$apparent_date.\"'\");\n \n $paid = @mysql_fetch_array($paid_res);\n $paid_amt = ($paid['amount'] != NULL) ? $paid['amount'] : 0;\n $payable_amt = $payable_amt - $paid_amt;\n $liabilities = $payable_amt + $savings + $int_amt;\n $liabilities = ($liabilities > 0) ? $liabilities : 1;\n\n $percent = ($liquid_amt / $liabilities) * 100.00;\n $percent = floor($percent);\n\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Liquidity Ratio (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"LIQUIDITY RATIO PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Liquidity Ratio (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"liquidity_ratio.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "83fc12c15d0fc39cf69b8406177e29ec", "score": "0.5029417", "text": "function generate_debtto_equity_ratio($from_date,$to_date){\n\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //LONG-TERM LOANS PAYABLE\n $payable_res = mysql_query(\"select sum(p.amount) as amount from payable p join accounts a on p.account_id=a.id where a.account_no like '2122%' and p.maturity_date='\".$apparent_date.\"'\");\n $payable = @mysql_fetch_array($pay_res);\n $payable_amt = ($payable['amount'] != NULL) ? $payable['amount'] : 0;\n\n $paid_res = mysql_query(\"select sum(paid.amount) as amount from payable_paid paid join payable p on paid.payable_id=p.id join accounts a on p.account_id=a.id where a.account_no like '2%' and a.account_no not like '2122%' and p.maturity_date='\".$apparent_date.\"' and paid.date <='\".$apparent_date.\"'\");\n $paid = @mysql_fetch_array($paid_res);\n $paid_amt = ($paid['amount'] != NULL) ? $paid['amount'] : 0;\n $debt_amt = $payable_amt - $paid_amt;\n \n //CAPITAL\n $shares_res = mysql_query(\"select sum(value) as amount from shares where date <='\".$apparent_date.\"'\");\n $shares = mysql_fetch_array($shares_res);\n $shares_amt = ($shares['amount'] != NULL) ? $shares['amount'] : 0;\n\n $don_res = mysql_query(\"select sum(i.amount) as amount from other_income i join accounts a on i.account_id=a.id where a.account_no like '3313%' and i.date <= '\".$apparent_date.\"'\");\n $don = mysql_fetch_array($don_res);\n $don_amt = ($don['amount'] != NULL) ? $don['amount'] : 0;\n\n $equity_amt = $don_amt + $shares_amt;\n $equity_amt = ($equity_amt > 1) ? $equity_amt : 1;\n $percent = ($debt_amt / $equity_amt) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n \n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n \n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Debt To Equity Ratio (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"DEBT TO EQUITY RATIO PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Debt To Equity Ratio (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"debtto_equity_ratio.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "387ff8650a4fd09d8bdb223ea6060a53", "score": "0.4955176", "text": "public function compute_items() {\r\n $startlr = $this->g->starting_lr1_item();\r\n $closure = new block_formal_langs_grammar_closure($this->g);\r\n $goto = new block_formal_langs_grammar_goto();\r\n $this->lr1items = array( $closure->closure(array( $startlr ) ) );\r\n $this->lr1goto = array();\r\n $symbols = $this->g->symbols();\r\n for($setindex = 0; $setindex < count($this->lr1items); $setindex++) {\r\n $currentset = $this->lr1items[$setindex];\r\n for($symindex = 0; $symindex < count($symbols); $symindex++ ) {\r\n /** @var block_formal_langs_grammar_production_symbol $currentsym */\r\n $currentsym = $symbols[$symindex];\r\n $mygoto = $goto->run($this->g, $currentset , $currentsym);\r\n //print_r($mygoto);\r\n if (count($mygoto)!=0) {\r\n $supersetindex = $this->get_lr1_subset_index($mygoto, $this->lr1items);\r\n if ($supersetindex == -1) {\r\n $gotoindex = count($this->lr1items);\r\n $this->lr1items[] = $mygoto;\r\n if (array_key_exists($setindex, $this->lr1goto) == false) {\r\n $this->lr1goto[$setindex] = array();\r\n }\r\n $this->lr1goto[$setindex][] = array('symbol' => $currentsym, 'goto' => $gotoindex);\r\n } else {\r\n if (array_key_exists($setindex, $this->lr1goto) == false) {\r\n $this->lr1goto[$setindex] = array();\r\n }\r\n $this->lr1goto[$setindex][] = array('symbol' => $currentsym, 'goto' => $supersetindex);\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "328585a0ab16d9004473b764488a6547", "score": "0.49161193", "text": "protected abstract function mathFunction();", "title": "" }, { "docid": "08cce085638dcea1cd734d517653d56a", "score": "0.48878366", "text": "public abstract function getFormulaire();", "title": "" }, { "docid": "f03d596a28c149390e6f69376f874e50", "score": "0.48627347", "text": "abstract protected function ensureCalculated();", "title": "" }, { "docid": "701b680c3894f9aa46ebd742ba3c6c9e", "score": "0.4857038", "text": "public function calcularNivelesRiesgo()\n\t{\n\t\t$this->calcularNivelProbablidad();\n\t\t$this->calcularInterpretacionNivelProbabilidad();\n\t\t$this->calcularNivelRiesgo();\n\t\t$this->calularEvaluacionInterpretacionNivelRiesgo();\n\t\t$this->toStringNivelRiesgo();\n\t\t$this->calcularValoracionRiesgo();\t\t\n\t}", "title": "" }, { "docid": "7ac589bec14a9d4b6e04fcd1bbe9d361", "score": "0.48455954", "text": "function generate_coverage_ratio($from_date, $to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $provission = 0;\n $y_list ='';\n $x_list='';\n $prov_res = mysql_query(\"select * from provissions order by range\");\n while($row = mysql_fetch_array($prov_res)){ //SET PROVISSION PERCENTAGES\n ${$row['range']} = $row['percent'];\n }\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //echo($arr[1]. \"<br>\");\n $sth = mysql_query(\"select d.id as loan_id, d.last_pay_date as last_pay_date, d.amount as amount, d.balance as balance, d.period as loan_period from disbursed d where d.date <= '\".$apparent_date.\"'\");\n while($row = mysql_fetch_array($sth)){\n $paid_amt = $row['amount'] - $row['balance'];\n $sched_res = mysql_query(\"select sum(princ_amt) as princ_amt from schedule where loan_id='\".$row['loan_id'].\"' and date <= '\".$apparent_date.\"'\");\n $sched = mysql_fetch_array($sched_res);\n $sched_amt =($sched['princ_amt'] != NULL) ? $sched['princ_amt'] : 0;\n $arrears_amt = $sched_amt - $paid_amt; \n $arrears_amt = ($arrears_amt >= 0) ? $arrears_amt : 0;\n $range1 = 0;\n $range2 = 0;\n $range3 = 0; \n $range4 = 0;\n $range5 = 0;\n $range6 = 0;\n $offset=0;\n \n if($arrears_amt >0){\n $lastdue_res = mysql_query(\"select date, date_format(date, '%Y') as year, date_format(date, '%m') as month, date_format(date, '%d') as mday from schedule order by date desc limit 1\");\n $lastdue = mysql_fetch_array($lastdue_res);\n $offset = strtotime($apparent_date) - strtotime($lastdue['date']);\n \n \n $offset = ($offset >0) ? $offset : 0;\n $offset = floor($offset /(3600 * 24 * 30));\n $instalment = ceil($row['amount'] / ($row['loan_period']/ 30));\n $no = ceil($arrears_amt / $instalment);\n $remainder = $arrears_amt % $instalment;\n }\n \n if($offset >= 6) //THE WHOLE SCHEDULE IS MORE THAN 6 MONTHS OVERDUE\n $range6 = $arrears_amt * ($range180_over /100);\n elseif($offset == 5){ //THE WHOLE SCHEDULE IS 5 MONTHS OVERDUE\n if($no == 1)\n $range5 = $arrears_amt * $range120_180/100; \n elseif($no == 2){\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - $instalment) * $range120_180/100;\n }elseif($no == 3){\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 2*$instalment) * $range120_180/100;\n }elseif($no == 4){\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 3*$instalment) * $range120_180/100;\n }elseif($no == 5){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 4*$instalment) * $range120_180/100;\n }elseif($no >= 6){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = $instalment * $range120_180/100;\n $range6 = ($arrears_amt - 5*$instalment) * $range180_over/100;\n }\n }elseif($offset == 4){ //THE WHOLE SCHEDULE IS 4 MONTHS OVERDUE\n if($no == 1)\n $range4 = $arrears_amt * $range90_120/100; \n elseif($no == 2){\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - $instalment) * $range90_120/100;\n }elseif($no == 3){\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - 2*$instalment) * $range90_120/100;\n }elseif($no == 4){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - 3*$instalment) * $range90_120/100;\n }elseif($no == 5){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 4*$instalment) * $range120_180/100;\n }elseif($no >= 6){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = $instalment * $range120_180/100;\n $range6 = ($arrears_amt - 5*$instalment) * $range180_over/100;\n }\n }elseif($offset == 3){ //THE WHOLE SCHEDULE IS 3 MONTHS OVERDUE\n if($no == 1)\n $range3 = $arrears_amt * $range60_90/100; \n elseif($no == 2){\n $range2 = $instalment * $range30_60/100;\n $range3 = ($arrears_amt - $instalment) * $range60_90/100;\n }elseif($no == 3){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = ($arrears_amt - 2*$instalment) * $range60_90/100;\n }elseif($no == 4){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - 3*$instalment) * $range90_120/100;\n }elseif($no == 5){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 4*$instalment) * $range120_180/100;\n }elseif($no >= 6){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = $instalment * $range120_180/100;\n $range6 = ($arrears_amt - 5*$instalment) * $range180_over/100;\n }\n }elseif($offset == 2){ //THE WHOLE SCHEDULE IS 2 MONTHS OVERDUE\n if($no == 1)\n $range2 = $arrears_amt * $range30_60/100; \n elseif($no == 2){\n $range1 = $instalment * $range1_30/100;\n $range2 = ($arrears_amt - $instalment) * $range30_60/100;\n }elseif($no == 3){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = ($arrears_amt - 2*$instalment) * $range60_90/100;\n }elseif($no == 4){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - 3*$instalment) * $range90_120/100;\n }elseif($no == 5){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 4*$instalment) * $range120_180/100;\n }elseif($no >= 6){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = $instalment * $range120_180/100;\n $range6 = ($arrears_amt - 5*$instalment) * $range180_over/100;\n }\n }elseif($offset <= 1){ //THE WHOLE SCHEDULE IS 1 MONTHS OVERDUE\n if($no == 1)\n $range1 = $arrears_amt * $range1_30/100; \n elseif($no == 2){\n $range1 = $instalment * $range1_30/100;\n $range2 = ($arrears_amt - $instalment) * $range30_60/100;\n }elseif($no == 3){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = ($arrears_amt - 2*$instalment) * $range60_90/100;\n }elseif($no == 4){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = ($arrears_amt - 3*$instalment) * $range90_120/100;\n }elseif($no == 5){\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range30_60/100;\n $range3 = $instalment * $range60_90/100;\n $range4 = $instalment * $range90_120/100;\n $range5 = ($arrears_amt - 4*$instalment) * $range120_180/100;\n }elseif($no >= 6){\n \n //echo(\"Arrears=\".$arrears_amt.\"<br>\");\n $range1 = $instalment * $range1_30/100;\n $range2 = $instalment * $range31_60/100;\n $range3 = $instalment * $range61_90/100;\n $range4 = $instalment * $range91_120/100;\n $range5 = $instalment * $range121_180/100;\n $range6 = ($arrears_amt - 5*$instalment) * $range180_over/100;\n //echo(\"2nd Arears=\".$arrears_amt.\"<br>\");\n }\n }\n $provission = $provission + $range1 + $range2 + $range3 + $range4 + $range5 + $range6;\n \n }\n \n $out_res = mysql_query(\"select sum(d.amount) as amount from disbursed d where d.date <= '\".$apparent_date.\"'\");\n $out = mysql_fetch_array($out_res);\n $out_amt = ($out['amount'] != NULL) ? $out['amount'] : 0;\n $in_res = mysql_query(\"select sum(princ_amt) as amount from payment where date <= '\".$apparent_date.\"'\");\n $in = mysql_fetch_array($in_res);\n $in_amt = ($in['amount'] != NULL) ? $in['amount'] : 0;\n \n if($in_amt >= $out_amt)\n $percent =0;\n else{\n $div = $out_amt - $in_amt;\n $percent = ($provission / ($div)) * 100;\n $percent = sprintf(\"%.02f\", $percent);\n }\n \n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $provission = 0;\n $next = $next + 30;\n\n }\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set('Months');\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set('Coverage Risk Ratio (%)');\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set('RISK COVERAGE RATIO PLOTTED AGAINST TIME');\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Risk Coverage Ratio\");\n $graph->Add($p1);\n $graph->Stroke(\"coverage.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "602c79f85cf196a5605c189672ed86e4", "score": "0.47589123", "text": "function trilat_calc($p){\r\n\t$S = (\r\n\t\t pow($p[2]->getX() , 2) - pow($p[1]->getX() , 2 )\r\n\t\t+ pow($p[2]->getY() , 2) - pow($p[1]->getY() ,2 )\r\n\t\t+ pow($p[1]->getDFC() , 2) - pow($p[2]->getDFC() , 2)\r\n\t\t) / 2;\r\n\r\n\t$T = (\r\n\t\t pow($p[0]->getX() , 2) - pow($p[1]->getX() , 2) \r\n\t\t + pow($p[0]->getY() , 2) - pow($p[1]->getY() , 2) \r\n\t\t + pow($p[1]->getDFC() , 2) - pow($p[0]->getDFC() ,2)\r\n\t\t) / 2;\r\n\r\n\r\n\t$s = new dfcCoordinate(0,0,0); // solution\r\n\r\n\t$div = (\r\n\t\t\t\t (($p[0]->getY() - $p[1]->getY()) * ($p[1]->getX() - $p[2]->getX()))\r\n\t\t\t\t- (($p[2]->getY() - $p[1]->getY()) * ($p[1]->getX() - $p[0]->getX()))\r\n\t\t\t);\r\n\r\n\tif($div == 0){ // divison by 0\r\n\t\t$div = 1;\r\n/*\t\t\r\n \t\techo \"<B>Math error; divison by 0: resetting solution coordinates to (0,0).</B><BR/>\\n\";\r\n\t\t$s->setX(0);\r\n\t\t$s->setY(0);\r\n\t\treturn $s;\r\n */\r\n\t}\r\n\r\n\t$s->setY(\r\n\t\t\t(\r\n\t\t\t\t ($T * ($p[1]->getX() - $p[2]->getX()))\r\n\t\t\t\t- ($S * ($p[1]->getX() - $p[0]->getX()))\r\n\t\t\t)\r\n\t\t\t/\r\n\t\t\t$div\r\n\t\t);\r\n\r\n\t$div = (\r\n\t\t\t\t $p[1]->getX()\r\n\t\t\t\t- $p[0]->getX()\r\n\t\t\t);\r\n\r\n\tif($div == 0){ // divison by 0\r\n\t\t$div = 1;\r\n\t\t/*\r\n\t\techo \"<B>Math error; divison by 0: resetting solution coordinates to (0,0).</B><BR/>\\n\";\r\n\t\t$s->setX(0);\r\n\t\t$s->setY(0);\r\n\t\treturn $s;\r\n\t\t */\r\n\t}\r\n\r\n\t$s->setX(\r\n\t\t\t(\r\n\t\t\t\t ($s->getY() * ($p[0]->getY() - $p[1]->getY())) - $T\r\n\t\t\t)\r\n\t\t\t/\r\n\t\t\t$div\r\n\t\t);\r\n\t\r\n\r\n\treturn $s;\r\n}", "title": "" }, { "docid": "5d592d0b8ad5977635272ec2db09b4f3", "score": "0.4736331", "text": "abstract public function calculateCost();", "title": "" }, { "docid": "8afb41950fa34737d7bf3d7c211fc604", "score": "0.47307876", "text": "function multiplyGeneral($con,$church_i,$filter_graph,$period_fil3){\n\n // obtain overall multiply global\n\n // total cells\n $pre_gen_cell = $con->prepare(\"SELECT count(id) as total_cells FROM groups_cells WHERE active = 1 AND church_id = :church_id $filter_graph\", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n\n $values_gen_cell = array(':church_id' => $church_i);\n $pre_gen_cell->execute($values_gen_cell);\n $result_gen_cell = $pre_gen_cell->fetch();\n\n $total_gen = $result_gen_cell['total_cells'];\n\n // actual quarter\n $pre_acc = $con->prepare(\"SELECT count(id) as total_cells FROM groups_cells WHERE active = 1 AND church_id = :church_id AND parent_id IS NOT NULL $filter_graph\", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n\n $values_acc = array(':church_id' => $church_i);\n $pre_acc->execute($values_acc);\n $result_acc = $pre_acc->fetch();\n\n $total_acc = $result_acc['total_cells'];\n\n\n // last quarter\n\n // verifiy: AND parent_id IS NOT NULL\n $pre_last_cell = $con->prepare(\"SELECT count(id) as total_cells FROM groups_cells WHERE active = 1 $period_fil3 AND church_id = :church_id AND parent_id IS NOT NULL $filter_graph\", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n\n $pre_last_cell->execute($values_gen_cell);\n $result_last_cell = $pre_last_cell->fetch();\n\n $total_last_cell = $result_last_cell['total_cells'];\n\n // obtain advance\n $overall_advance = $total_acc - $total_last_cell;\n\n // obtain percentage and goal in church_goals\n $pre_percen = $con->prepare(\"SELECT * FROM `church_goals` WHERE goal = 1 AND church_id = :church_id\", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n\n $pre_percen->execute($values_gen_cell);\n $result_percen = $pre_percen->fetch();\n\n $percentage_gen = $result_percen['percentage'];\n $goal_gen = $result_percen['value'];\n $freq = $result_percen['frequency'];\n\n if ($total_gen == '0') {\n $goal_f = $goal_gen;\n }else{\n $goal_f = $goal_gen * $total_gen;\n }\n \n\n // whole percentage\n $w_percentage = $percentage_gen * 100;\n\n // obtain overall of multiply\n $overall_multiply = $overall_advance * $w_percentage / $goal_f;\n\n return array('overall_multiply' => $overall_multiply, 'total_gen' => $total_gen, 'w_percentage' => $w_percentage, 'goal_f' => $goal_f, 'value_cell' => $goal_gen, 'frequency_cell' => $freq, 'percentage_cell' => $w_percentage, 'value_multi' => $goal_f);\n\n}", "title": "" }, { "docid": "51a38c7436e4159eb15e927fa7942a1b", "score": "0.47176495", "text": "abstract public function __equationToString();", "title": "" }, { "docid": "3b37c5eefa23b9b6921ba3e1d4403aa5", "score": "0.47110653", "text": "public function recalc(): self;", "title": "" }, { "docid": "a17b7489c6a5c94b3c0049703bb7d359", "score": "0.47094876", "text": "function generate_par_ratio($from_date, $to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //CALCULATE ARREARS\n $sched_res = mysql_query(\"select s.loan_id as loan_id, sum(s.princ_amt) as princ_amt from schedule s join disbursed d on s.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and s.date <= date_sub('\".$apparent_date.\"', INTERVAL d.arrears_period DAY) group by s.loan_id\");\n $risky_amt =0;\n while($sched = mysql_fetch_array($sched_res)){\n $paid_res = mysql_query(\"select sum(p.princ_amt) as princ_amt from payment p join disbursed d on p.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and p.date <= '\".$apparent_date.\"' and p.loan_id='\".$sched['loan_id'].\"'\");\n $paid = mysql_fetch_array($paid_res);\n $paid_amt = ($paid['princ_amt'] != NULL) ? $paid['princ_amt'] : 0;\n if($sched['princ_amt'] > $paid_amt){\n //OUTSTANDING PORTIFOLIO THEN\n $disbursed_res = mysql_query(\"select sum(d.amount) as amount from disbursed d left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and d.date <= '\".$apparent_date.\"' and d.id='\".$sched['loan_id'].\"'\");\n $disbursed = mysql_fetch_array($disbursed_res);\n $disbursed_amt = ($disbursed['amount'] != NULL) ? $disbursed['amount'] : 0;\n $outstanding = $disbursed_amt - $paid_amt;\n $risky_amt = $risky_amt + $outstanding;\n \n }\n }\n //TOTAL DISBURSED\n $disbursed_res = mysql_query(\"select sum(d.amount) as amount from disbursed d left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and d.date <= '\".$apparent_date.\"'\");\n $disbursed = mysql_fetch_array($disbursed_res);\n $disbursed_amt = ($disbursed['amount'] != NULL) ? $disbursed['amount'] : 0;\n \n //TOTAL PAID\n $paid_res = mysql_query(\"select sum(p.princ_amt) as princ_amt from payment p join disbursed d on p.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and p.date <= '\".$apparent_date.\"'\");\n $paid = mysql_fetch_array($paid_res);\n $paid_amt = ($paid['princ_amt'] != NULL) ? $paid['princ_amt'] : 0;\n //TOTAL OUTSTANDING\n $outstanding = $disbursed_amt - $paid_amt;\n $outstanding = ($outstanding > 0) ? $outstanding : 1;\n $percent = ($risky_amt / $outstanding) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Portfolio At Risk Ratio (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"PORTFOLIO AT RISK RATIO PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Portfolio At Risk Ratio (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"par_ratio.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "eddedc24cbb3edd7fbcc6aca7a27d321", "score": "0.4674916", "text": "public function getQuantityCalculation();", "title": "" }, { "docid": "24033f3b60d75fd2137dcaff7a5bbc5e", "score": "0.466303", "text": "function fr_dataset_field_filter_value_range_number_element($default_value = NULL) {\n return array(\n '#type' => 'item',\n '#tree' => true,\n 'value1' => array(\n '#title' => t('Min'),\n '#type' => 'numberfield',\n '#size' => 20,\n '#default_value' => $default_value['value1'],\n ),\n 'value2' => array(\n '#title' => t('Max'),\n '#type' => 'numberfield',\n '#size' => 20,\n '#default_value' => $default_value['value2'],\n ),\n\n );\n}", "title": "" }, { "docid": "6294d42e22fec9179a7bbe9b8596862b", "score": "0.46494326", "text": "function fit_meniscus()\n{\necho<<<HTML\n <fieldset class='option_value'>\n <legend>Fit Meniscus</legend>\n <input type=\"radio\" name=\"meniscus_option\" value=\"1\" onclick=\"show_ctl(1);\"/> On<br/>\n <input type=\"radio\" name=\"meniscus_option\" value=\"0\" onclick=\"hide(1);\" \n checked='checked'/> Off<br/>\n <div style=\"display:none\" id=\"mag1\">\n <br/>\n <input type=\"text\" name=\"meniscus_range\" value=\"0.03\"/>Meniscus Fit Range (cm)<br/>\n <br/>\n <fieldset>\n <legend>Meniscus Grid Points</legend>\n <div class='newslider' id='meniscus-slider'></div>\n <br />\n Value: <input name='meniscus_points' \n id='meniscus_points'\n size='12'\n value='10' />\n Minimum: <input id=\"meniscus-min\" \n size='12'\n disabled=\"disabled\" />\n Maximum: <input id=\"meniscus-max\" \n size='12'\n disabled=\"disabled\" />\n </fieldset>\n </div>\n </fieldset>\nHTML;\n}", "title": "" }, { "docid": "a36fd4b56a9490ca73d53934e0ef0077", "score": "0.4638058", "text": "public function autoCalculateAwardFromConversionChart(){\n \n $userAwardID = false;\n $allScored = true;\n \n // Must all the criteria be scored in order to calculate an award?\n if ($this->parentCritID){\n $parent = $this->getUnit()->getCriterion($this->parentCritID);\n $mustBeScored = ($parent->getAttribute('reqallscored') == 1);\n $children = $parent->getChildOfSubCritType(\"Criterion\");\n } else {\n $mustBeScored = ($this->getAttribute('reqallscored') == 1);\n $children = $this->getChildOfSubCritType(\"Criterion\");\n }\n \n // First check if we actually have a conversion chart with valid scores, if not, no point continuing\n $conversionChart = $this->getConversionChart();\n if (!$conversionChart) return null;\n \n\n if ($children)\n {\n\n // If this is a range\n if ($this->subCritType == \"Range\")\n {\n\n // First check if they are all scored (if they need to be)\n if ($mustBeScored)\n {\n\n foreach($children as $child)\n {\n\n $child->loadStudent($this->student);\n $maxPoints = $parent->getAttribute(\"maxpoints_{$child->getID()}_{$this->getID()}\");\n\n // If this one has not been given a points score, stop as we can go no further\n if ($maxPoints > 0 && $child->getCriterionPoints($this) <= 0)\n {\n $allScored = false;\n }\n\n }\n\n }\n\n }\n else\n {\n\n // First check if they are all scored (if they need to be)\n if ($mustBeScored)\n {\n\n foreach($children as $child)\n {\n\n $maxPoints = $child->getAttribute('maxpoints');\n\n // If this one has not been given a points score, stop as we can go no further\n if ($maxPoints > 0 && $child->getCriterionPoints() <= 0)\n {\n $allScored = false;\n }\n\n }\n\n }\n\n }\n\n // All is well so far, we let's get our total points and see where we sit in the chart\n if ($allScored)\n {\n $totalPoints = $this->getTotalPoints();\n\n foreach($conversionChart as $awardID => $chartPoints)\n {\n if ($totalPoints >= $chartPoints)\n {\n $userAwardID = $awardID;\n break;\n }\n }\n }\n\n }\n \n \n // If we have a new award ID to set, do it now\n if ($allScored && $userAwardID){\n $this->setUserAwardID($userAwardID);\n $this->saveUser();\n return $userAwardID;\n } elseif (!$allScored || ($allScored && !$userAwardID)){\n $this->setUserAwardID(null);\n $this->saveUser();\n return false;\n }\n \n return null;\n \n }", "title": "" }, { "docid": "0d21c60d2c0734c47be19fa298648f4d", "score": "0.46368763", "text": "protected function HTMLformat($formulaArray){\n\n foreach ($formulaArray as $index=>$element) {\n\n switch($element){\n\n case $this->test_if_blank_space_to_be_removed_between_characters($index, $element, $formulaArray):\n $formulaArray[$index] = '';\n break;\n\n case $this->test_if_charge_number_greater_than_one_that_should_be_superscript($index, $element, $formulaArray):\n \n $formulaArray[$index] = '<sup>'.$element.$formulaArray[$index+1].'</sup>';\n $formulaArray[$index+1]='';\n break;\n\n case $this->test_if_a_single_charge_that_should_be_superscript($index, $element, $formulaArray):\n\n $formulaArray[$index] = '<sup>'.$element.'</sup>';\n break;\n \n // subscript numbers H2 and H2O or (H20)2\n\n case $this->test_if_double_digit_number_or_n_next_to_element_should_be_subscript($index, $element, $formulaArray):\n\n $formulaArray[$index] = '<sub>'.$element.$formulaArray[$index+1].'</sub>';\n $formulaArray[$index+1] = '';\n break;\n\n case $this->test_if_single_digit_number_or_n_should_be_subscript($index, $element, $formulaArray):\n $formulaArray[$index] = '<sub>'.$element.'</sub>';\n\n break;\n \n // (aq),(g),(l) ..\n case $this->check_if_bracket_is_present($element): \n \n $number_to_null=0;\n\n if ($str = $this->bracketFormulaCheck($formulaArray, $index)){\n $formulaArray[$index] = $str[0];\n $number_to_null=$str[1];\n };\n\n \n if ($this->check_if_this_is_a_state_bracket($formulaArray, $index)) {\n\n $formulaArray[$index]=\"<sub>(\".$formulaArray[$index+1].\")</sub>\";\n $number_to_null = 2;\n }\n\n if ($this->check_if_this_is_a_aq_state_bracket($formulaArray, $index)) {\n\n $formulaArray[$index]=\"<sub>(aq)</sub>\";\n $number_to_null=3;\n }\n\n $formulaArray = \n $this->set_obsolete_array_items_to_null($index, $formulaArray, $number_to_null);\n\n break;\n\n \n case $this->check_if_equilibrium_arrow($index, $element, $formulaArray):\n \n $formulaArray[$index-1]=\"\"; \n $formulaArray[$index]=\"&#8652;\";\n $formulaArray[$index+1]=\"\";\n break;\n\n case $this->check_if_forward_arrow($index, $element, $formulaArray):\n \n $formulaArray[$index]=\"&#8594;\";\n $formulaArray[$index+1]=\"\";\n break;\n\n case $this->check_if_backwards_arrow($index, $element, $formulaArray):\n \n $formulaArray[$index]=\"&#8592;\";\n $formulaArray[$index-1]=\"\";\n break;\n \n default: \n break;\n\n }\n }\n return $this->cleanUp($formulaArray);\n }", "title": "" }, { "docid": "ccc170519f98539351e59929fddc1106", "score": "0.46288282", "text": "public function buildNotationElement(): void;", "title": "" }, { "docid": "5d46df18b6715ea487a308eeda9b4cb0", "score": "0.46110088", "text": "function generate_fin_sufficiency($from_date,$to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n//OPERATING INCOME\n //INCOME FROM LOANS\n $int_res = mysql_query(\"select sum(int_amt) as amount from payment where date <='\".$apparent_date.\"'\");\n $int = mysql_fetch_array($int_res);\n $int_amt = ($int['amount'] != NULL) ? $int['amount'] : 0;\n // $resp->alert($int_amt);\n //PENALITIES\n $pen_res = mysql_query(\"select sum(amount) as amount from penalty where date <='\".$apparent_date.\"'\");\n $pen = mysql_fetch_array($pen_res);\n $pen_amt = ($pen['amount'] != NULL) ? $pen['amount'] : 0;\n\n //OTHER INCOME\n $other_res = mysql_query(\"select sum(i.amount) as amount from other_income i join accounts a on i.account_id=a.id where i.date <= '\".$apparent_date.\"'\");\n $other = mysql_fetch_array($other_res);\n $other_amt = ($other['amount'] != NULL) ? $other['amount'] : 0;\n\n //COLLECTED\n $col_res = mysql_query(\"select sum(amount) as amount from collected where date <='\".$apparent_date.\"'\");\n $col = mysql_fetch_array($col_res);\n $col_amt = ($col['amount'] != NULL) ? $col['amount'] : 0;\n \n //RECOVERED\n $recovered_res = mysql_query(\"select sum(amount) as amount from recovered where date <= '\".$apparent_date.\"'\");\n $recovered = mysql_fetch_array($recovered_res);\n $recovered_amt = ($recovered['amount'] != NULL) ? $recovered['amount'] : 0;\n\n //TRANSACTIONAL CHARGES\n $dep_res = mysql_query(\"select sum(flat_value + percent_value) as charge from deposit where date <='\".$apparent_date.\"'\");\n $dep = mysql_fetch_array($dep_res);\n $dep_charge = ($dep['charge'] != NULL) ? $dep['charge'] : 0;\n $with_res = mysql_query(\"select sum(flat_value + percent_value) as charge from withdrawal where date <='\".$apparent_date.\"'\");\n $with = mysql_fetch_array($with_res);\n $with_charge = ($with['charge'] != NULL) ? $with['charge'] : 0;\n\n //GAIN ON SALE OF FIXED ASSETS\n $fixed_res = mysql_query(\"select sum(s.amount - f.initial_value) as amount from fixed_asset f join sold_asset s on f.id=s.asset_id where f.date <='\".$apparent_date.\"' and s.id in (select asset_id from sold_asset where date <='\".$apparent_date.\"')\");\n $fixed = mysql_fetch_array($fixed_res);\n $fixed_amt =($fixed['amount'] != NULL) ? $fixed['amount'] : 0;\n \n //GAIN ON SALE OF INVESTMENTS\n $loss = mysql_fetch_array(mysql_query(\"select sum(quantity * amount) as amount from investments where date <= '\".$apparent_date.\"'\"));\n $loss_amt = ($loss['amount'] == NULL) ? 0 : $loss['amount'];\n\n $gain = mysql_fetch_array(mysql_query(\"select sum(quantity * amount) as amount from sold_invest where date <= '\".$apparent_date.\"'\"));\n $gain_amt = ($gain['amount'] == NULL) ? 0 : $gain['amount'];\n $invest_amt = $gain_amt - $loss_amt;\n \n //$invest_res = mysql_query(\"select sum(s.amount - i.amount) as amount from investments i join sold_invest s on i.id=s.investment_id where i.date <='\".$apparent_date.\"' and i.id in (select investment_id from sold_invest where date <='\".$apparent_date.\"')\");\n //$invest = mysql_fetch_array($invest_res);\n //$invest_amt =($invest['amount'] != NULL) ? $invest['amount'] : 0;\n\n $charge_res = mysql_query(\"select sum(amount) as amount from monthly_charge where date <='\".$apparent_date.\"'\");\n $charge = mysql_fetch_array($charge_res);\n $charge_amt = ($charge['amount'] != NULL) ? $charge['amount'] : 0;\n \n $income = $int_amt + $pen_amt + $other_amt + $recovered_amt + $col_amt + $fixed_amt + $invest_amt + $dep_charge + $with_charge + $charge_amt;\n \n \n//OPERATING EXPENSES\n $expense_res = mysql_query(\"select sum(e.amount) as amount from expense e join accounts a on e.account_id=a.id where date <= '\".$apparent_date.\"'\");\n $expense = mysql_fetch_array($expense_res);\n $expense_amt = ($expense['amount'] != NULL) ? $expense['amount'] : 1;\n\n $payable_res = mysql_query(\"select sum(amount) as amount from payable_paid where date <'\".$apparent_date.\"'\");\n $payable = mysql_fetch_array($payable_res);\n $payable_amt = ($payable['amount'] != NULL) ? $payable['amount'] : 0;\n\n $shared_res = mysql_query(\"select sum(total_amount) as amount from share_dividends where date <='\".$apparent_date.\"'\");\n $shared = mysql_fetch_array($shared_res);\n $shared_amt = ($shared['amount'] != NULL) ? $shared['amount'] : 0;\n\n $written_res = mysql_query(\"select sum(amount) as amount from written_off where date <='\".$apparent_date.\"'\");\n $written = mysql_fetch_array($written_res);\n $written_amt = ($written['amount'] != NULL) ? $written['amount'] : 0;\n $expense = $expense_amt + $payable_amt + $shared_amt + $written_amt;\n $expense = ($expense != 0) ? $expense : 1;\n\n $percent = ($income / $expense) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(80,30,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Financial Self Sufficiency (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"FINANCIAL SELF SUFFICIENCY PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Financial Self-Sufficiency (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"fin_sufficiency.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "ba263f7d8029e0dea2b4d93030b4738c", "score": "0.45999342", "text": "public function arborescenceBornes() {\n // Insertion de chaque Fils de chaque niveau\n $monTableauDeDomaine = array();\n\n //recherche des elements classe par parents, libelles\n $elements = $this->arborescence();\n\n // Initialisation\n $codeParentPrecedent = \"root\";\n $niveau = 1;\n $borne_inf = 1;\n $borne_sup = 0;\n $departBorneInfSuivant = array();\n\n // Pour chaque element du niveau courant\n foreach ($elements as $elementTableau) {\n $codeParent = ( $elementTableau['PARENT'] == 0 ) ? \"root\" : mb_substr($elementTableau['CODE'], 0, -mb_strlen(strrchr($elementTableau['CODE'], '.')));\n $niveauCourant = mb_substr_count($elementTableau['CODE'], \".\") + 1;\n if ($codeParent != $codeParentPrecedent) {\n if (array_key_exists($elementTableau['PARENT'], $monTableauDeDomaine)) {\n // je descends d'un niveau\n $borne_inf ++;\n } else {\n $borne_inf = ($niveauCourant > $niveau) ? $borne_sup + 1 : $departBorneInfSuivant[$niveauCourant];\n }\n $codeParentPrecedent = $codeParent;\n $departBorneInfSuivant[$niveau] = $borne_sup + 1;\n } else {\n // Je suis toujours sur le même niveau on prévoit le tri sur les libelles\n $borne_inf = ($borne_sup == 0 ) ? 2 : $borne_sup + 1;\n }\n $borne_sup = $borne_inf + $this->nbFils($elementTableau['CODE']) * 2 + 1;\n $niveau = $niveauCourant;\n $enreg = array(\n 'ID' => $elementTableau['ID'],\n 'CODE' => $elementTableau['CODE'],\n 'CODE_PARENT' => $elementTableau['PARENT'],\n 'LIBELLE' => Zend_Registry::get(\"Zend_Translate\")->translate(\"domain_\" . $elementTableau['CODE'], $this->locale),\n 'NIVEAU' => mb_substr_count($elementTableau['CODE'], \".\") + 1,\n 'BORNE_INF' => $borne_inf,\n 'BORNE_SUP' => $borne_sup\n );\n $monTableauDeDomaine[$elementTableau['ID']] = $enreg;\n }\n return $monTableauDeDomaine;\n }", "title": "" }, { "docid": "ffdc500b80840a89fa5324d263084a8f", "score": "0.45946547", "text": "function calculate_rpn($rpnexp) {\n\t\t$stack = array();\n\t\tforeach($rpnexp as $item) {\n\t\t\tif (is_operator($item)) {\n\t\t\t\tif ($item == '+') {\n\t\t\t\t\t$j = array_pop($stack);\n\t\t\t\t\t$i = array_pop($stack);\n\t\t\t\t\tarray_push($stack, $i + $j);\n\t\t\t\t}\n\t\t\t\tif ($item == '-') {\n\t\t\t\t\t$j = array_pop($stack);\n\t\t\t\t\t$i = array_pop($stack);\n\t\t\t\t\tarray_push($stack, $i - $j);\n\t\t\t\t}\n\t\t\t\tif ($item == '*') {\n\t\t\t\t\t$j = array_pop($stack);\n\t\t\t\t\t$i = array_pop($stack);\n\t\t\t\t\tarray_push($stack, $i * $j);\n\t\t\t\t}\n\t\t\t\tif ($item == '/') {\n\t\t\t\t\t$j = array_pop($stack);\n\t\t\t\t\t$i = array_pop($stack);\n\t\t\t\t\tarray_push($stack, $i / $j);\n\t\t\t\t}\n\t\t\t\tif ($item == '%') {\n\t\t\t\t\t$j = array_pop($stack);\n\t\t\t\t\t$i = array_pop($stack);\n\t\t\t\t\tarray_push($stack, $i % $j);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tarray_push($stack, $item);\n\t\t\t}\n\t\t}\n\t\treturn $stack[0];\n\t}", "title": "" }, { "docid": "6933090cd423d159074ef8606be43226", "score": "0.45839295", "text": "public function calculate(): string\n {\n try {\n // Get provided expression and clear from spaces\n $expr = $this->expr;\n $expr = trim(str_replace(' ', '', $expr));\n\n if (!self::isValid($expr)) {\n $this->logger->error(sprintf('Invalid expression provided: %s', $expr));\n\n return self::ERROR;\n }\n\n // Initiate stack objects for digits and operators\n $numStack = new SplStack();\n $operStack = new SplStack();\n\n $length = strlen($expr);\n\n // Iterate each symbol in the expression\n for ($i = 0; $i < $length; $i++) {\n $prevOperator = !$operStack->isEmpty() ? $operStack->top() : null;\n $currElement = $expr[$i];\n\n if (self::isDigit($currElement)) {\n $result = '';\n\n while (isset($expr[$i]) && self::isDigit($expr[$i])) {\n $result .= $expr[$i];\n $i++;\n }\n\n // We have to reset index after last iteration\n // because it served checking purposes and may break the algorithm logic\n $i--;\n\n $numStack->push((float)$result);\n } elseif (self::isOperator($currElement)) {\n if (!isset($prevOperator)) {\n $operStack->push($currElement);\n\n continue;\n }\n\n if (self::PRIORITIES[$currElement] > self::PRIORITIES[$prevOperator]) {\n if (!self::isOpening(self::PRIORITIES[$prevOperator])) {\n $operStack->push($currElement);\n\n continue;\n }\n }\n\n $currNum = $numStack->pop();\n $prevNum = $numStack->pop();\n\n $resultNum = self::evaluate($prevNum, $currNum, $prevOperator);\n\n $numStack->push((float)$resultNum);\n $operStack->pop();\n\n // We have to reset index after last operation\n $i--;\n } elseif (self::isChar($currElement)) {\n $result = '';\n\n while (isset($expr[$i]) && self::isChar($expr[$i])) {\n $result .= $expr[$i];\n $i++;\n }\n\n // We have to reset index after last iteration\n // because it was for checking purposes and may break the algorithm logic\n $i--;\n\n $converted = self::MATH_CONSTANTS[$result] ?? $this->memory[$result] ?? null;\n\n if (empty($converted)) {\n $this->logger->error(sprintf('Expression contains unsupported variables: %s', $result));\n\n return self::ERROR;\n }\n\n $numStack->push((float)$converted);\n } elseif (self::isOpening($currElement)) {\n // Add opening parenthesis in stack without additional conditions\n $operStack->push($currElement);\n } elseif (self::isClosing($currElement)) {\n // If previous operator is opening parenthesis, remove them and move forward\n if (self::isOpening($prevOperator)) {\n $operStack->pop();\n\n continue;\n }\n\n $i--;\n\n // Calculate local expression\n $currNum = $numStack->pop();\n $prevNum = $numStack->pop();\n\n $resultNum = self::evaluate($prevNum, $currNum, $prevOperator);\n\n $numStack->push($resultNum);\n $operStack->pop();\n } else {\n $this->logger->error(sprintf('Expression contains unsupported symbols: %s', $expr));\n\n return self::ERROR;\n }\n }\n\n while ($numStack->count() !== 1) {\n $currNum = $numStack->pop();\n $prevNum = $numStack->pop();\n $prevOperator = $operStack->pop();\n\n $resultNum = self::evaluate($prevNum, $currNum, $prevOperator);\n $numStack->push($resultNum);\n }\n\n $response = (string)round($numStack->pop(), 5);\n\n $this->logger->info(\n sprintf('Provided expression \"%s\" successfully calculated with result: %s', $expr, $response)\n );\n\n return $response;\n } catch (Throwable $e) {\n $this->logger->error(sprintf('Unexpected error occurred: %s', $e->getMessage()));\n\n return self::ERROR;\n }\n }", "title": "" }, { "docid": "2de0d237990f228233c3d0a18d47c05e", "score": "0.45814803", "text": "abstract public function getSolution();", "title": "" }, { "docid": "dcb2ce7c5730de0582661c537464a146", "score": "0.45753026", "text": "function splitTax($title, $value)\r\n{\r\n// print $title . ' ' . $value;\r\n if (strpos($title, '+')>0) {\r\n \r\n \t$splitLineTitle = array();\r\n\t$splitLineTitle = explode('+', $title);\r\n\t\r\n\t$spliteLineValue = array();\r\n\t\r\n\t$TotalTax = 0;\r\n\t$n = sizeof($splitLineTitle);\r\n for ( $i = 0; $i < $n; $i++) {\r\n\t\t$t = trim($splitLineTitle[$i]);\r\n \tif (substr_count($t,'%')<>1) \r\n\t\t{\r\n\t\t\t$splitLineValue[$i] = 0;\r\n\t\t}\r\n\t\telse {\t\t\t\t\r\n\t\t\t$t = substr($t, 0, strpos($t, '%'));\r\n\t\t\t$spliteLineValue[$i]= $t;\r\n\t\t\t$TotalTax +=$t;\r\n\t\t}\t\r\n\t}\r\n\t\r\n for ( $i = 0; $i < $n; $i++) {\r\n\t\t$spliteLineValue[$i]= $value * $spliteLineValue[$i] / $TotalTax ;\r\n//\t\tprint $spliteLineValue[$i] . 'b+++';\r\n\t}\r\n\t$splitTax = array_combine($splitLineTitle, $spliteLineValue);\t\r\n }\r\n else {\r\n\t$splitTax = array($title => $value);\r\n }\t\t\r\n//print $splitLineTitle[0] . ' ' . $splitLineValue[0];\r\n return $splitTax;\r\n}", "title": "" }, { "docid": "5439689fe021deea19ab63efd4bec6a4", "score": "0.4556737", "text": "public function calcul(){\n\t\t//return 15; c'est la redéfinition. c'est pas ce qu'on veut!\n\t\t//return $this-> calcul() +5; $this fait appel à la fonction dans laquelle nous sommes. ====> récursivité\n\t\t//return self::calcul()+5; self:: fait appel à des éléments static... ce n'est pas le cas ici.\n\t\t//$a =new A;return $a-> calcul() +5; Cela fonctionne, mais conceptuellement nous sommes héritié de A, alors pourquoi créer un objet A?? 0_o \n\t\t\n\t\t//return A::calcul() +5;\n\t\treturn parent::calcul()+5;\n\t}", "title": "" }, { "docid": "6f30aa41a9559f29d035d323c4e713d9", "score": "0.45507747", "text": "function RacinBasic($P_formule)\n{\n$index_root=0;\n$Bool_sou_frml=0;\n$parentheses=0;\n$Int_len = strlen($P_formule);\n$Tab_op= array('+','-','*','/');\n //Parcour de la droit vers la gauche de la formule pour construire l'arbre\n\tfor( $Int_i = $Int_len-1; $Int_i >=0; $Int_i--)\n{\n\t\tif(in_array($P_formule{$Int_i}, $Tab_op) )\n\t\t{\n\t\t\t$index_root = $Int_i;\n\t\t\tbreak;\n\t\t}\n}\n\treturn $index_root;\n}", "title": "" }, { "docid": "d9b11840c3c66a37209e61488c6ac791", "score": "0.454784", "text": "function interpolation($upperLimitObj,$lowerLimitObj,$newRange){\n\n $lowerValue = $lowerLimitObj->value;\n $lowerRange = $lowerLimitObj->range;\n \n $upperValue = $upperLimitObj->value;\n $upperRange = $upperLimitObj->range;\n\n $value = ((($newRange - $lowerRange)*($upperValue - $lowerValue) / ($upperRange - $lowerRange)) + $lowerValue);\n #echo \"((($newRange - $lowerRange)*($upperValue - $lowerValue) / ($upperRange - $lowerRange)) + $lowerValue)\";\n #echo \"\\n\";\n #echo $value;\n #echo \"\\n\";\n return $value;\n}", "title": "" }, { "docid": "8618be0805255a2bb7580a100dfd7a2a", "score": "0.45367402", "text": "public function getEntityFieldSolver();", "title": "" }, { "docid": "8eeb24609ef5c3f9931da849f395721b", "score": "0.45234033", "text": "public function hitungBiaya(){\n //\n if(null === $this->currentGCost){\n $this->currentGCost = 0;\n }\n\n //counting fValue\n foreach($this->nextNodeID as $next){\n echo 'calc f of ' . $next . PHP_EOL;\n $dest = \\App\\Models\\kota::find($next);\n $gcost = \\App\\Models\\real::where('idKotaTujuan',$next)->where('idKotaAsal',$this->currentEval)->pluck('gCost');\n $hcost = $dest->hCost->hCost;\n $this->fValue[$next] = ($this->currentGCost + $gcost) + $hcost;\n }\n }", "title": "" }, { "docid": "f598ee27303c9dfb8b6903fde5072882", "score": "0.45167303", "text": "function mbo_sumsubtable_src_histogram($postList, $allFields, $type, $keyField, $parentTable = null){ // $keyField not used\n $ks = array('needsolution_cost' => 'עלות כוללת', \n 'needsolution_yahav' => 'יהב',\n //'needsolution_off' => 'לא מתוקצב',\n 'needsolution_total' => 'מתוקצב',\n 'needsolution_self' => 'עצמי',\n 'needsolution_revaha' => 'רווחה',\n 'needsolution_youth' => 'צעירים',\n 'needsolution_Zedaka' => 'קרן צדקה',\n 'needsolution_government' => 'ממשלה',\n 'needsolution_supplier_reduction' => 'הנחת ספק');\n //[needsolution_year_budget] => 2019\n // $histogram['needsolution_total'] = 20000;\n $histogram = array();\n foreach ($ks as $ksk => $ksv)\n $histogram[$ksv] = 0; // initialization\n\n $i = 0;\n foreach ( $postList as $cpt ){\n //$x = get_fields($cpt->ID);\n $x = $allFields[$cpt->ID];\n if (isset($parentTable)){\n $t = $x[$parentTable]; // the table\n foreach ($t as $ti){ // all lines add sources sums to histogram\n foreach ($ks as $ksk => $ksv)\n $histogram[$ksv] += intval($ti[$ksk]); // field value in line of family table\n }\n } // else - ignored\n $i++;\n }\n // calc budget vs non budget\n /*$total_in_budget = 0;\n foreach ($ks as $ksk => $ksv){\n if ($ksk == 'needsolution_cost') continue;\n $total_in_budget += $histogram[$ksv];\n }\n $histogram['needsolution_off'] = $histogram['needsolution_cost'] - $total_in_budget;*/\n\n arsort($histogram, SORT_NUMERIC); \n\n $arg = array ('type' => $type, 'total' => $i, 'table' => $histogram\t);\n return $arg;\n}", "title": "" }, { "docid": "e4eef38e795c54136b60a5c848cec855", "score": "0.45057082", "text": "public function getcalculatePlusMinusQuantity($quantity,$product_id,$height,$width,$gusset,$type){\n\t\t//$sql = \"SELECT profit FROM \" . DB_PREFIX . \"product_profit WHERE from_quantity <= '\".$quantity.\"' AND \tto_quantity >= '\".$quantity.\"' AND product_id= '\".$product_id.\"'\";\t\t\n\t\t$product = $this->getProduct($product_id);\n\t\t$productGusset = explode(',',$product['gusset']);\n\t\t$size = 0;\n\t\tif(!empty($productGusset)){\n\t\t\tif(in_array('no_gusset_height',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('side_gusset',$productGusset) && !in_array('bottom_gusset',$productGusset))\n\t\t\t{\n\t\t\t\t$size = ($height * $width);\t\t\n\t\t\t}\n\t\t\t\n\t\t\telseif(in_array('no_gusset_width',$productGusset) && !in_array('no_gusset_height',$productGusset) && !in_array('side_gusset',$productGusset) && !in_array('bottom_gusset',$productGusset))\n\t\t\t{\n\t\t\t\t$size = ($height * $width);\n\t\t\t}\n\t\t\telseif(in_array('side_gusset',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('bottom_gusset',$productGusset))\n\t\t\t{\n\t\t\t\t$size = ((($gusset*2) + $height)* $width); \n\t\t\t}\n\t\t\telseif(in_array('bottom_gusset',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('side_gusset',$productGusset))\n\t\t\t{\n\t\t\t\t$size = ((($gusset*1)+$height)*$width);\n\t\t\t}\n\t\t\telseif(in_array('bottom_gusset',$productGusset) && !in_array('no_gusset_width',$productGusset) && !in_array('no_gusset_width',$productGusset) && in_array('side_gusset',$productGusset))\n\t\t\t{\n\t\t\t\t$size = ((($gusset*3) + $height) * $width);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qunatityRow = $this->query(\"SELECT product_quantity_id FROM \" . DB_PREFIX . \"product_quantity WHERE quantity = '\".$quantity.\"'\");\n\t\t$quantity_id = $qunatityRow->row['product_quantity_id'];\n\t\t\n\t\t$data = $this->query(\"SELECT plus_minus_quantity\tFROM \" . DB_PREFIX . \"product_profit WHERE product_id ='\".$product_id.\"' AND \tquantity_id = '\".$quantity_id.\"' AND size_from <= '\".$size.\"' AND \tsize_to >= '\".$size.\"'\");\n\t\tif($data->num_rows){\n\t\t\treturn $data->row['plus_minus_quantity'];\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "920e790b297306684ba3bc3e8bd8402d", "score": "0.45052654", "text": "public function calculate_estimations()\n\t\t{\n\t\t\t$cases = array(\n\t\t\t\t'1000m-5d',\n\t\t\t\t'1000m-30d',\n\t\t\t\t'1000m-1y',\n\t\t\t\t'10000m-5d',\n\t\t\t\t'10000m-30d',\n\t\t\t\t'10000m-1y',\n\t\t\t\t'100000m-5d',\n\t\t\t\t'100000m-30d',\n\t\t\t\t'100000m-1y'\n\t\t\t);\n\n\t\t\t$higher_risk_companies = array();\n\t\t\t$lower_risk_companies = array();\n\t\t\tfor ($i = 0; $i < 3 && $i < count($this->sorted_data_by_beta); $i++)\n\t\t\t{\n\t\t\t\t$lower_risk_companies[] = $this->sorted_data_by_beta[$i];\n\t\t\t\t$higher_risk_companies[] = $this->sorted_data_by_beta[count($this->sorted_data_by_beta) - $i - 1];\n\t\t\t}\n\n\t\t\tforeach ($cases as $case)\n\t\t\t{\n\t\t\t\t$investment = 0;\n\t\t\t\t$days = 0;\n\t\t\t\tswitch ($case)\n\t\t\t\t{\n\t\t\t\t\tcase '1000m-5d':\n\t\t\t\t\t\t$investment = 1000;\n\t\t\t\t\t\t$days = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '1000m-30d':\n\t\t\t\t\t\t$investment = 1000;\n\t\t\t\t\t\t$days = 30;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '1000m-1y';\n\t\t\t\t\t\t$investment = 1000;\n\t\t\t\t\t\t$days = 365;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '10000m-5d';\n\t\t\t\t\t\t$investment = 10000;\n\t\t\t\t\t\t$days = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '10000m-30d':\n\t\t\t\t\t\t$investment = 10000;\n\t\t\t\t\t\t$days = 30;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '10000m-1y':\n\t\t\t\t\t\t$investment = 10000;\n\t\t\t\t\t\t$days = 365;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '100000m-5d':\n\t\t\t\t\t\t$investment = 100000;\n\t\t\t\t\t\t$days = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '100000m-30d':\n\t\t\t\t\t\t$investment = 100000;\n\t\t\t\t\t\t$days = 30;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '100000m-1y':\n\t\t\t\t\t\t$investment = 100000;\n\t\t\t\t\t\t$days = 365;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// we calculate the gain for each market value, by investment and by time\n\n\t\t\t\tforeach ($higher_risk_companies as $c)\n\t\t\t\t{\n\t\t\t\t\t$result = $investment * (floatval($c['interest']) / 100) * ($days / 365);\n\t\t\t\t\t$this->higher_risk_companies_data_estimation[$c['comany_name']][$case] = $result;\n\t\t\t\t\t$this->higher_risk_companies_data_estimation[$c['comany_name']]['interest'] = $c['interest'];\n\t\t\t\t}\n\n\t\t\t\tforeach ($lower_risk_companies as $c)\n\t\t\t\t{\n\t\t\t\t\t$result = $investment * (floatval($c['interest']) / 100) * ($days / 365);\n\t\t\t\t\t$this->lower_risk_companies_data_estimation[$c['comany_name']][$case] = $result;\n\t\t\t\t\t$this->lower_risk_companies_data_estimation[$c['comany_name']]['interest'] = $c['interest'];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "38a3765facd06d3dbdb94202968201e1", "score": "0.4505068", "text": "public function handleCommonCalculations(): void\n {\n $this->amount = $this->symbol->last_price->multiply($this->lot);\n $this->gain = $this->amount->subtract($this->average_amount);\n $this->gain_with_dividend = $this->amount->subtract($this->average_amount_with_dividend);\n $this->instant_gain = $this->gain->add($this->total_gain);\n $this->update();\n }", "title": "" }, { "docid": "b8b47f31d8479fa1ec9c1bb54021d626", "score": "0.45002782", "text": "private function build() {\n if (ActivityDealerStaticticStatusTable::getInstance()\n ->createQuery()\n ->where('dealer_id = ? and activity_id = ?', array($this->_dealer, $this->_activity->getId()))\n ->andWhere('ignore_statistic = ?', 0)\n ->count() > 0 )\n {\n $formulas = ActivityEfficiencyFormulasTable::getInstance()->createQuery()->where('activity_id = ?', $this->_activity->getId())->orderBy('id ASC')->execute();\n\n foreach ($formulas as $formula) {\n $this->_result[$formula->getId()] = array('formula' => $formula, 'value' => $formula->getParamsCalculateResult($this->_dealer));\n }\n\n }\n }", "title": "" }, { "docid": "aef7abe6e2fce37d8858c621998b905f", "score": "0.4496173", "text": "public function getRangePopUpContent(){\n \n $qualification = $this->getQualification();\n $unit = $this->getUnit();\n $parent = $unit->getCriterion( $this->getParentID() );\n $parent->loadStudent($this->student);\n $parent->setQualID($this->qualID);\n \n $totalMaxPoints = 0;\n $totalPoints = 0;\n \n $output = \"\";\n \n $children = $parent->getChildOfSubCritType(\"Criterion\");\n if ($children)\n {\n\n $output .= \"<table class='gt_popup_table'>\";\n $output .= \"<tr class='gt_lightblue'><th>\".get_string('name').\"</th><th>\".get_string('comments', 'block_gradetracker').\"</th><th>\".get_string('value', 'block_gradetracker').\"</th></tr>\";\n\n foreach($children as $child)\n {\n\n $child->loadStudent( $this->student );\n\n $output .= \"<tr class='gt_criterion_wrapper' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$child->getID()}'>\";\n $output .= \"<td>{$child->getName()}</td>\";\n $output .= \"<td class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$child->getID()}'><textarea type='comments' class='gt_update_comments gt_comments_sub_large'>\".\\gt_html($child->getUserComments(), true).\"</textarea></td>\";\n $output .= \"<td class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$child->getID()}' cName='\".\\gt_html($child->getName()).\"'>\";\n\n $maxPoints = $parent->getAttribute(\"maxpoints_{$child->getID()}_{$this->getID()}\");\n $points = $this->getRangeCriterionValue($this->getID(), $child->getID());\n $totalPoints += $points;\n \n if ($maxPoints > 0)\n {\n $totalMaxPoints += $maxPoints;\n \n \n $output .= \"<table class='gt_numeric_values_table'>\";\n $output .= \"<tr>\";\n\n for ($p = 0; $p <= $maxPoints; $p++)\n {\n $output .= \"<th>{$p}</th>\";\n }\n\n $output .= \"</tr>\";\n $output .= \"<tr>\";\n\n for ($p = 0; $p <= $maxPoints; $p++)\n {\n $chk = ($points == $p) ? 'checked' : '';\n $output .= \"<td>\";\n $output .= \"<input type='radio' name='R{$this->getID()}C{$child->getID()}' class='gt_update_numeric_point' value='{$p}' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$child->getID()}' rID='{$this->getID()}' {$chk} />\";\n $output .= \"</td>\";\n }\n\n $output .= \"</tr>\";\n $output .= \"</table>\";\n \n }\n\n $output .= \"</td>\";\n $output .= \"</tr>\";\n\n }\n\n $output .= \"</table>\";\n\n }\n\n\n // This is the Range overall\n $output .= \"<table class='gt_detail_criterion_overall_table gt_criterion_wrapper' style='background-color:#fff;margin-bottom:1px;' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$this->getID()}'>\";\n\n $output .= \"<tr><th colspan='2'>{$this->getName()}</th></tr>\";\n\n $output .= \"<tr class=''>\";\n $output .= \"<th>\".get_string('totalpoints', 'block_gradetracker').\"</th>\";\n $output .= \"<td colspan='2' class='gt_grid_cell' ><span id='gt_total_points'>{$this->getTotalPoints()}</span> / {$totalMaxPoints}</td>\";\n $output .= \"</tr>\";\n\n $output .= \"<tr class=''>\";\n $output .= \"<th>\".get_string('comments', 'block_gradetracker').\"</th>\";\n $output .= \"<td colspan='2' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$this->getID()}'><textarea type='comments' class='gt_update_comments'>\".\\gt_html($this->getUserComments(), true).\"</textarea></td>\";\n $output .= \"</tr>\";\n\n $output .= \"<tr class=''>\";\n $output .= \"<th>\".get_string('value', 'block_gradetracker').\"</th>\";\n $output .= \"<td colspan='2' id='gt_criterion_value_{$this->getID()}' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$this->getID()}'>{$this->getCellEdit(true, true)}</td>\";\n $output .= \"</tr>\";\n\n $output .= \"<tr class=''>\";\n $date = ($this->getUserAwardDate() > 0) ? $this->getUserAwardDate('d-m-Y') : '';\n $output .= \"<th>\".get_string('date').\"</th>\";\n $output .= \"<td colspan='2' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$this->getID()}'><input type='text' class='gt_datepicker gt_criterion_award_date' value='{$date}' /></td>\";\n $output .= \"</tr>\";\n\n $output .= \"</table>\";\n\n\n\n // This is the overall criterion\n $output .= \"<table class='gt_detail_criterion_overall_table gt_detail_criterion_overall_table_2 gt_criterion_wrapper' style='background-color:#fff;' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$parent->getID()}'>\";\n\n $output .= \"<tr><th colspan='2'>{$parent->getName()}</th></tr>\";\n\n $output .= \"<tr class=''>\";\n $output .= \"<th>\".get_string('comments', 'block_gradetracker').\"</th>\";\n $output .= \"<td colspan='2' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$parent->getID()}'><textarea type='comments' class='gt_update_comments'>\".\\gt_html($parent->getUserComments(), true).\"</textarea></td>\";\n $output .= \"</tr>\";\n\n $output .= \"<tr class=''>\";\n $output .= \"<th>\".get_string('value', 'block_gradetracker').\"</th>\";\n $output .= \"<td colspan='2' id='gt_criterion_value_{$parent->getID()}' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$parent->getID()}'>{$parent->getCellEdit(true, true)}</td>\";\n $output .= \"</tr>\";\n\n $output .= \"<tr class=''>\";\n $date = ($parent->getUserAwardDate() > 0) ? $parent->getUserAwardDate('d-m-Y') : '';\n $output .= \"<th>\".get_string('date').\"</th>\";\n $output .= \"<td colspan='2' class='gt_grid_cell' sID='{$this->student->id}' qID='{$qualification->getID()}' uID='{$unit->getID()}' cID='{$parent->getID()}'><input type='text' class='gt_datepicker gt_criterion_award_date' value='{$date}' /></td>\";\n $output .= \"</tr>\";\n\n $output .= \"</table>\";\n\n return $output;\n \n }", "title": "" }, { "docid": "e4913f0fbac5a4777a3f84fd68f2d65a", "score": "0.44919986", "text": "public function getBaseCalcul() {\n return $this->baseCalcul;\n }", "title": "" }, { "docid": "04e9cc6c05052c3b8c107a393662cb16", "score": "0.44888356", "text": "function getCellAggregationFunction(array $type)\n{\n\n switch ($type[0]) {\n case OPTION_AGGREGATE_SUM:\n return function ($x, $y) {\n return $x + $y;\n };\n case OPTION_AGGREGATE_PRODUCT:\n return function ($x, $y) {\n return $x * $y;\n };\n case OPTION_AGGREGATE_LIST:\n return function ($x, $y) use ($type) {\n return $x === '' ? $y : $x . $type[1] . $y;\n };\n }\n}", "title": "" }, { "docid": "a46b9e7a1ecf1c946044ea858146594e", "score": "0.44848782", "text": "function s_grid_points()\n{\necho<<<HTML\n <fieldset class='option_value'>\n <legend>S-Value Resolution</legend>\n <input type=\"text\" value=\"1\" name=\"s_value_min\"/> S-Value Minimum<br/>\n <input type=\"text\" value=\"10\" name=\"s_value_max\"/> S-Value Maximum<br/>\n <input type=\"text\" value=\"64\" name=\"s_grid_points\"/> S-Value Resolution (total grid points)<br/>\n </fieldset>\nHTML;\n}", "title": "" }, { "docid": "79637a8048b832673a3de1f700211286", "score": "0.4481335", "text": "public function AllowedRangeType()\n{\n$com['seq'][0]=[];\n$com['seq'][0]['ele'][0]=['minOccurs'=>'0','ref'=>'Documentation'];\n$com['seq'][0]['ele'][1]=['minOccurs'=>'0','ref'=>'Min'];\n$com['seq'][0]['ele'][2]=['minOccurs'=>'0','ref'=>'Max'];\n// Label of Unit that applies to this allowed range of values.\n$com['att'][0]=['name'=>'unit','type'=>'ShortTokenType','use'=>'optional'];\nreturn $com;\n}", "title": "" }, { "docid": "014a0b7e60b94ee59f8ba8e0d07067ac", "score": "0.44780886", "text": "public function term()\n {\n $node = null;\n $prev_node = null;\n $leftnode = $this->factor();\n while ($this->lookahead->type == CalculationFunctionLexer::MULTIPLY || $this->lookahead->type == CalculationFunctionLexer::DIVIDE) {\n $node = new CalculationFunctionParseTree($this->lookahead->type, $this->lookahead->text);\n if(!is_null($prev_node)) {\n $leftnode = $prev_node;\n }\n if ($this->lookahead->type == CalculationFunctionLexer::MULTIPLY) {\n $this->match(CalculationFunctionLexer::MULTIPLY);\n } elseif ($this->lookahead->type == CalculationFunctionLexer::DIVIDE) {\n $this->match(CalculationFunctionLexer::DIVIDE);\n }\n if ($leftnode == null) {\n throw new \\Exception(\"Синтаксическая ошибка. Слева от оператора '*' или '/' должно быть число или арифметическое выражение. Узел: \" . $node );\n }\n $node->addLeft($leftnode);\n if (is_null($rightnode = $this->factor()) && !is_null($node)) {\n throw new \\Exception(\"Синтаксическая ошибка. Справа от оператора '*' или '/' должно быть число или арифметическое выражение. Узел: \" . $node );\n }\n $node->addRight($rightnode);\n $prev_node = $node;\n }\n if (is_null($node)) {\n return $leftnode;\n } elseif(!is_null($node)) {\n return $node;\n } else {\n throw new \\Exception(\"Синтаксическая ошибка\");\n }\n }", "title": "" }, { "docid": "bbc87093f484d36c261cae3f33338de6", "score": "0.44778815", "text": "function rangequery($k, $v, $objectlist, $speclist, $photolist) {\n \n // Add the appropriate prefix for each table\n // object is t1, spectra is t2, photometry is t3\n if (in_array ($k, $objectlist)) {\n $name = \"t1.\" . $k;}\n elseif (in_array($k, $speclist)) {\n $name = \"t2.\" . $k;}\n elseif (in_array($k, $photolist)) {\n if ($k=='DaysRelMaxLC') $k = 'DaysRelMax';\n $name = \"t3.\" . $k;}\n\n //grabs the low and high inputs entered into html form\n $low= $v[0];\n $high= $v[1];\n //takes off any blank spaces in input\n $low=trim($low);\n $high=trim($high); \n //check for blanks\n if (($low == '')&&($high == '')) {\n $segment = $name . \" IS NULL AND \";\n }\n else {\n list($yy,$mm,$dd)= explode(\"-\", $low);\n list($yy2,$mm2,$dd2)= explode(\"-\", $high);\n\n //Checks if input is a number or a UT date, if not uses 0 as value\n if (is_numeric($low))\n {\n\t//Check if it's a JD or a UT with no '-'\n\tif ($low < 2400000)\n\t { $low = $low*0.9999;} // stupid MySQL float rounding issue\n }\n elseif (checkdate($mm,$dd,$yy))\n $low = \"'\".$low.\"'\";\n else\n $low = 0;\n \n if (is_numeric($high))\n {\n\t//Check if it's a JD or a UT with no '-'\n\tif ($high < 2400000)\n\t { $high = $high*1.0001;} // stupid MySQL float rounding issue\n }\n elseif (checkdate($mm2,$dd2,$yy2))\n $high = \"'\".$high.\"'\";\n else \n $high = 0;\n\n //returns the mysql statement\n $segment = \"(\" . $name . \" >= \" . $low . \" AND \" . $name . \" <= \" . $high . \") AND \";\n }\n\n return ($segment);\n}", "title": "" }, { "docid": "d990909ec9fb04de00eb00333cbd0b57", "score": "0.44682175", "text": "private function diagram() {\n $diagram_data = array();\n\n $data = array(\n\t\t\t'filter_category_id' => $this->category_id,\n 'filter_params' => $this->params\n\t\t);\n\n if ($this->min_price_get && $this->max_price_get && count($this->matches) == 1) {\n unset($data['filter_params']);\n }\n\n $product_prices_result = $this->model_catalog_filter->getProductPrices($data);\n\n if ($product_prices_result && count($product_prices_result['products']) > 1) {\n $diagram_width = 158; # diagram box width (px)\n $diagram_height = 30; # diagram box height (px)\n\n $min_price = $product_prices_result['min'];\n $max_price = $product_prices_result['max'];\n $price_diff = $max_price-$min_price;\n\n if ($price_diff > $diagram_width) {\n $price_range = $price_diff/$diagram_width;\n $diagram_item_width = 1;\n } else {\n $price_range = 1;\n $diagram_item_width = $diagram_width/$price_diff;\n }\n\n $diagram_items = round($diagram_width/$diagram_item_width);\n\n $max_count = 0;\n $diagram = array();\n\n for ($i = 0; $i < $diagram_items; $i++) {\n $from = $i*$price_range+$min_price;\n $to = ($i+1)*$price_range+$min_price;\n\n $count = 0;\n\n foreach ($product_prices_result['products'] as $product_id => $price) {\n if ($price >= $from && $price <= $to) {\n $count++;\n }\n }\n\n if ($count > $max_count) {\n $max_count = $count;\n }\n\n $diagram[] = array(\n 'from' => floor($from),\n 'to' => ceil($to),\n 'count' => $count\n );\n }\n\n foreach ($diagram as $item) {\n\n # Items height scale\n\n if ($max_count > $diagram_height) {\n $height = floor($item['count']/($max_count/$diagram_height));\n } elseif ($max_count) {\n $height = floor($item['count']*($diagram_height/$max_count));\n } else {\n $height = $item['count'];\n }\n\n $diagram_data[] = array(\n 'from' => $item['from'],\n 'to' => $item['to'],\n 'count' => $item['count'],\n 'width' => $diagram_item_width . 'px',\n 'height' => $height . 'px'\n );\n }\n }\n # end\n return $diagram_data;\n }", "title": "" }, { "docid": "f9c3da05d4b055288ef2116390fcce65", "score": "0.44439048", "text": "abstract protected function createExpression();", "title": "" }, { "docid": "1055adb57bfda0a3a3c3e0790779fb71", "score": "0.44424194", "text": "public function calculator1 () {\n\n\tif ($this->operator1=='plus') {\n\n\t$answer1=$this->value1+$this->value2;\n\n\t}\n\n\tif ($this->operator1=='minus') {\n\t$answer1=$this->value1-$this->value2;\t\t\n\t}\n\n\tif ($this->operator1=='multiply') {\n\t\t$answer1=$this->value1*$this->value2;\n\t\t\n\t}\n\n\tif ($this->operator1=='divide') {\n\n\t\t$answer1=$this->value1/$this->value2;\n\t\t\n\t}\n\t\n\treturn $answer1;\n\n\t}", "title": "" }, { "docid": "d9aa2347d670ef25612c4e63f00dfa10", "score": "0.4435119", "text": "private function evalComplexResFunction($formuleEvaluated,RecordFormule $formule){\n $use = \"use Limostr\\EvalLib\\\\MethodEval;\";\n $res=null;\n\t $ResComplexFormule=\"\";\n\t $resultatChoix=\"\";\n echo \"<b style='color:blue'>Complex $use;<br>\\$res=$formuleEvaluated; </b><br>\";\n\t echo \"<pre style='color:#FF10FA'>\";print_r($formule);echo \"</pre>\";\n\t \n eval(\"$use;\\$res=($formuleEvaluated);\");\n if($res){\n $resultat = $formule->getScore();\n if(is_array($resultat)){\n $res=$resultat['true'];\n\t\t\t if(isset($resultat['typeTrue']) && $resultat['typeTrue']=='arithmetique'){\n\t\t\t\t echo \"----------------->\".$resultat['true'];\n\t\t\t\t$ResComplexFormule=$this->ComplexResultCondition($resultat['true']);\n\t\t\t\techo $ResComplexFormule;\n\t\t\t\teval(\"$use;\\$resComplex=$ResComplexFormule;\"); \n\t\t\t\t$res=$resComplex; \n\t\t\t }else{\n\t\t\t\t$res=$resultat['true']; \n\t\t\t }\n\t\t\t $resultatChoix=$resultat['true']; \n }else{\n $res=$resultat;\n }\n }else{\n $resultat = $formule->getScore();\n if(is_array($resultat)){\n\t\t\t if(isset($resultat['false']) && isset($resultat['typeFalse']) && $resultat['typeFalse']=='arithmetique'){\n\t\t\t\t$ResComplexFormule=$this->ComplexResultCondition($resultat['false']);\n\t\t\t\techo \"<b style='color:#FF10FA'>$use;\\$resComplex=$ResComplexFormule;</b>\";\n\n\t\t\t\teval(\"$use;\\$resComplex=$ResComplexFormule;\"); \n\t\t\t\t$res=$resComplex; \n\t\t\t\t$resultatChoix=$resultat['false']; \n\t\t\t }elseif(isset($resultat['false'])){\n\t\t\t\t$res=$resultat['false']; \n\t\t\t\t$resultatChoix=$resultat['false']; \n\t\t\t }elseif(!isset($resultat['false'])){\n\t\t\t\t $res=\"RAF\";\n\t\t\t\t $resultatChoix=\"RAF\"; \n\t\t\t }\n\t\t\t \n }else{\n $res=$resultat['default'];\n\t\t\t $resultatChoix=$resultat['default']; \n }\n }\n\n //trace de programme\n $this->CompEval->_Trace[]=array(\n \"Formule\"=>$formuleEvaluated\n ,\"Evaluation\"=>$resultatChoix\n\t\t ,\"ResultatScore\"=>$ResComplexFormule\n , \"Resultat\"=>$res\n );\n\t //echo \"<pre class='bg-red'>\";print_r($this->CompEval->_Trace);echo \"</pre>\";\n return $res;\n }", "title": "" }, { "docid": "6be9f53af3d3a7bc6fa28c03c4a01b18", "score": "0.442183", "text": "public function blockFormula() {\n $blockExport = new BlockCycloBranch($this);\n $blockExport->export();\n }", "title": "" }, { "docid": "0d41fa7c5af98e8f9761adb3cea17a38", "score": "0.44215053", "text": "public function getFillRule () {}", "title": "" }, { "docid": "892ccf7eb36508685e08b00cff9e028c", "score": "0.44158474", "text": "function calc_Taxes($taxableIncome,$single){\n if($single==1){\n if($taxableIncome <= 9325){\n $taxRate=$taxableIncome*.10;\n }elseif($taxableIncome<= 37950){\n $taxRate= ($taxableIncome-9325)*.15 + 932.50;\n }elseif($taxableIncome<= 91900){\n $taxRate= ($taxableIncome-37950)*.25 +5226.25;\n }elseif($taxableIncome<= 191650){\n $taxRate= ($taxableIncome-91900)*.28 + 18713.75;\n }elseif($taxableIncome<= 416700){\n $taxRate= ($taxableIncome-191650)*.33 + 46643.75;\n }elseif($taxableIncome<= 418400){\n $taxRate= ($taxableIncome-416700)*.35 + 120910.25;\n }else{\n $taxRate=($taxableIncome-418400)*.396 + 121505.25;\n }\n }else{\n if($taxableIncome <= 18650){\n $taxRate=$taxableIncome*.10;\n }elseif($taxableIncome<= 75900){\n $taxRate= ($taxableIncome-9325)*.15 + 18650;\n }elseif($taxableIncome<= 153100){\n $taxRate= ($taxableIncome-75900)*.25 +10452.20;\n }elseif($taxableIncome<= 233350){\n $taxRate= ($taxableIncome-153100)*.28 + 29752.50;\n }elseif($taxableIncome<= 416700){\n $taxRate= ($taxableIncome-233350)*.33 + 52222.50;\n }elseif($taxableIncome<= 470700){\n $taxRate= ($taxableIncome-416700)*.35 + 112728;\n }else{\n $taxRate= ($taxableIncome-470700)*.396 + 131628;\n }\n return $taxRate;\n }\n }", "title": "" }, { "docid": "2214bb18a4d02f4a4c8813cf50553d30", "score": "0.44127947", "text": "function EvalIncome($board){\n\t$colorOptions = $board['reference']['upgrade'];\n\t$colorCheck = $board['reference']['check'];\n\tforeach($board['civs'] as $civ){// clear previous posessions to be redefined by owners of each ter\n\t\t$board['civs'][$civ['name']]['ters'] = array();\n\t\t$board['civs'][$civ['name']]['income'] = 0;\n\t}\n\tforeach($board['ters'] as $ter){ // build up income by ter\n\t\tif($ter['income']<0){$points=0;} // temporarily raise all income to 1\n\t\telse{$points = $ter['income'];}\n\t\t//echo $ter['name'],$points,$ter['owner'],'>> ';\n\t\t$owner = $ter['owner'];\n\t\tif($owner!='none'){\n\t\t\t$board['civs'][$owner]['income'] = $board['civs'][$owner]['income'] + $points;\n\t\t\t//echo $ter['name'],$points,$owner,$board['civs'][$owner]['income'],'*** ';\n\t\t\tarray_push($board['civs'][$owner]['ters'],$ter['name']);\n\t\t}\n\t}\n\tforeach($board['civs'] as $civ){\n\t\t$civname = $civ['name'];\n\t\t//if($civname=='united_states'){echo ' USA';echo $civ['wealth'];echo ' ';echo $civ['overflow'];echo ' ';echo $civ['income'];}\n\t\t//echo $civname;echo $civ['income'];echo ' ^ ';\n\t\t$civ['wealth'] = $civ['overflow'] + $civ['income'];\n\t\t$civ['overflow'] = 0;\n\t\t$civ['score'] = $civ['score'] + $civ['income'];\n\t\t$board['civs'][$civname] = $civ;\n\t\t//if($civ['income']>0){echo $civ['name'],$civ['income'],' ';}\n\t}\n\treturn $board;\n}", "title": "" }, { "docid": "ea72dce55854a7fde5e36bac037520fa", "score": "0.44106394", "text": "public function NumericValueType()\n{\n$com['con'][0]=[];\n$com['con'][0]['res'][0]=['base'=>'ParameterValueType'];\n$com['con'][0]['res'][0]['seq'][0]=[];\n$com['con'][0]['res'][0]['seq'][0]['ele'][0]=['minOccurs'=>'0','ref'=>'Documentation'];\n$com['con'][0]['res'][0]['seq'][0]['cho'][0]=[];\n$com['con'][0]['res'][0]['seq'][0]['cho'][0]['ele'][0]=['ref'=>'I'];\n$com['con'][0]['res'][0]['seq'][0]['cho'][0]['ele'][1]=['ref'=>'L'];\n$com['con'][0]['res'][0]['seq'][0]['cho'][0]['ele'][2]=['ref'=>'F'];\n$com['con'][0]['res'][0]['seq'][0]['cho'][0]['ele'][3]=['ref'=>'D'];\nreturn $com;\n}", "title": "" }, { "docid": "e6c77ea17f1d36f5329868d2073b4391", "score": "0.4407641", "text": "function Elements(){\n\n// recuperation des variables\nglobal $FormVars, $Calcul, $Definition, $Script , $Config;\n\n// Initialisation du buffer de sortie\n$Donnees = \"\" ;\n$CurPage = \"Nouveau\";\n$TypeCalcul = \"Defaut\";\n$ThemeTemp = \"\";\n\n// Recherche du script special pour le type de calcul appele\nforeach ($Script[$CurPage] as $IndexScript=>$ValScript){\nif ($Script[$CurPage][$IndexScript][\"calcul\"] == $FormVars['type']):\n$TypeCalcul = $FormVars['type'];\nbreak;\nendif;\n}\n\n// Script normal code pour les differentes portions de formulaire\nforeach ($Script[$CurPage] as $IndexScript=>$ValScript){\nif ($Script[$CurPage][$IndexScript][\"calcul\"] == $TypeCalcul){\nif (ereg ($Config['TagDebut'], $Script[$CurPage][$IndexScript][\"valeur\"]) and !ereg($Config['TagDebut'].$Config['FormVars'], $Script[$CurPage][$IndexScript][\"valeur\"])){\nforeach (${$Script[$CurPage][$IndexScript][\"type\"]}[$FormVars['type']] as $Type=>$value):\nif ($ThemeTemp != ${$Script[$CurPage][$IndexScript][\"type\"]}[$FormVars['type']][$Type]['theme'] && $TypeCalcul!=$FormVars['type']){\n$Donnees .= '<tr><th colspan=\"2\" class=\"Theme\">'.${$Script[$CurPage][$IndexScript][\"type\"]}[$FormVars['type']][$Type]['theme'].'</th></tr>';\n\t$ThemeTemp = ${$Script[$CurPage][$IndexScript][\"type\"]}[$FormVars['type']][$Type]['theme'] ; \n\t}\n$Donnees .= DecodeVars ($Script[$CurPage][$IndexScript][\"valeur\"], ${$Script[$CurPage][$IndexScript][\"type\"]}[$FormVars['type']][$Type]) ;\nendforeach ;\n}\nelse\n$Donnees .= $Script[$CurPage][$IndexScript][\"valeur\"];\n}\n}\n\n\t\n// Renvoi des resultats\nreturn $Donnees ;\n}", "title": "" }, { "docid": "20cb0e4329536a56b06a509dba1705d2", "score": "0.4401282", "text": "function generateRuleAwal($idparent, $spasi)\n{\n $sqlGetIdParent = mysql_query(\"select * from pohon_keputusan where id_parent='$idparent'\");\n while($rowGetIdParent = mysql_fetch_array($sqlGetIdParent)){\n if (!empty($rowGetIdParent)) {\n // ambil data pohon keputusan dimana id = idparent\n $sqlGetId = mysql_query(\"select * from pohon_keputusan where id='$rowGetIdParent[id_parent]'\");\n $rowGetId = mysql_fetch_array($sqlGetId);\n // jika variabel dan nilai variabel masih kosong\n if (empty($rowGetId['variabel']) AND empty($rowGetId['nilai_variabel'])){\n // insert pada db rule_c45\n mysql_query(\"insert into rule_c45 values ('', '$rowGetIdParent[id_parent]', '$rowGetIdParent[variabel] == $rowGetIdParent[nilai_variabel]', '$rowGetIdParent[kelayakan]')\");\n } else {\n // insert pada db rule_c45\n mysql_query(\"insert into rule_c45 values ('', '$rowGetIdParent[id_parent]', '$rowGetId[variabel] == $rowGetId[nilai_variabel] AND $rowGetIdParent[variabel] == $rowGetIdParent[nilai_variabel]', '$rowGetIdParent[kelayakan]')\");\n }\n // looping dirinya sendiri\n generateRuleAwal($rowGetIdParent['id'], $spasi + 1);\n }\n }\n}", "title": "" }, { "docid": "660ad6ff5442cbf59675a105ce7197a2", "score": "0.43987426", "text": "function tag_ChangeFormula(&$Txt, &$Loc, &$Value, $First)\n\t{\n\t\tif (isset($Loc->xlExend)) {\n\t\t\tif (!$Loc->xlExend) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$Loc->xlExend = false;\n\t\t\t// So we first search for the begining of the TBS expression. Going backward.\n\t\t\t$p = $Loc->PosBeg - 1;\n\t\t\t$cont = true;\n\t\t\t$exp_n = false; // true if N is met\n\t\t\t$exp_beg = false; //\n\t\t\tdo {\n\t\t\t\t$x = $Txt[$p];\n\t\t\t\tif ($p < 2) {\n\t\t\t\t\t$cont = false;\n\t\t\t\t} elseif ($x === '\"') {\n\t\t\t\t\t$cont = false; // end of the formula\n\t\t\t\t} elseif ($x === '(') { // begining of the function's arguments\n\t\t\t\t\t$exp_n = true;\n\t\t\t\t} elseif (($x === '+') or ($x === '&')) { // The expression can be added with + or & (wich is saved as &amp;)\n\t\t\t\t\tif ($exp_n) {\n\t\t\t\t\t\t$exp_beg = $p;\n\t\t\t\t\t\t$cont = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($cont) {\n\t\t\t\t\t$p--;\n\t\t\t\t}\n\t\t\t} while ($cont);\n\t\t\tif ($exp_beg === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Search for the end of the TBS expression.\n\t\t\t$frm_end = strpos($Txt, '\"', $Loc->PosEnd + 1);\n\t\t\tif ($frm_end === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$exp_end = strpos($Txt, ')', $Loc->PosEnd + 1);\n\t\t\tif ($exp_end === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($exp_end > $frm_end) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Now we searching backard, the relative cell\n\t\t\t$cont = true;\n\t\t\t$br_o = false; // position of [\n\t\t\t$br_c = false; // position of ]\n\t\t\t$p = $exp_beg - 1;\n\t\t\tdo {\n\t\t\t\t$x = $Txt[$p];\n\t\t\t\tif ($p < 2) {\n\t\t\t\t\t$cont = false;\n\t\t\t\t} elseif ($x === ']') {\n\t\t\t\t\tif ($br_o === false) {\n\t\t\t\t\t\t$br_c = $p;\n\t\t\t\t\t}\n\t\t\t\t} elseif ($x === '[') {\n\t\t\t\t\tif ($br_c !== false) {\n\t\t\t\t\t\t$br_o = $p;\n\t\t\t\t\t}\n\t\t\t\t\t$cont = false;\n\t\t\t\t} elseif ($x === '\"') {\n\t\t\t\t\t$cont = false;\n\t\t\t\t}\n\t\t\t\tif ($cont) {\n\t\t\t\t\t$p--;\n\t\t\t\t}\n\t\t\t} while ($cont);\n\t\t\tif ($br_o === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Calculate the relative index\n\t\t\t$x = intval(substr($Txt, $br_o + 1, $br_c - $br_o - 1));\n\t\t\tif ($x == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Save information in the locator, useful for cached locators\n\t\t\t$Loc->xlVal = $x;\n\t\t\t$Loc->xlExtraStr = substr($Txt, $br_c, $exp_beg - $br_c);\n\t\t\t$Loc->xlExend = true;\n\t\t\t$Loc->PosBeg = $br_o + 1;\n\t\t\t$Loc->PosEnd = $exp_end;\n\t\t\t$Loc->ConvMode = -1; // No contents conversion\n\t\t}\n\t\t// Calculate the new index\n\t\t$v = intval($Value);\n\t\t$x = $Loc->xlVal;\n\t\tif ($x != 0) {\n\t\t\t$x = $x + $v - 1;\n\t\t}\n\t\t// Replace the index value\n\t\t$Value = strval($x) . $Loc->xlExtraStr;\n\t}", "title": "" }, { "docid": "4ae477799669e2320d83d9acee4a693b", "score": "0.43973383", "text": "function Expr($broOrCellDatWithTagB=false) {\n global $Line, $C, $P, $InFuncB, $RowNamesA, $LastNoErrorErrorS;\n $expr = $yExpr = ''; # with $g used for expr segment\n $eType = $prevType = $lbs = $rbs = 0;\n $pStart = $P;\n while ($C !== false) {\n if ($C == ']' || MatchStep('then')) { # at the end\n if ($lbs != $rbs)\n return RGError(\"Brackets missmatch. There are $lbs (s but $rbs )s in the expression\", $pStart);\n # Remove some unnecessary string concatenation\n # H(2,\"Alternative text Profit and Loss Test\".'<br/>'.\"for the Period Ended \".DateStrWithTag(5731),'c');\n # H(2,\"Contents of the \".$DraftS.$HeadingsA['AccountsShortH'].'<br/>'.\"for the Period Ended \".DateStrWithTag(5731),'c');\n # H(2,$HeadingsA['CompanyRegistrationNumberH'].':'.'<br/>'.DataWithTag(5634).\" (\".$IncorporationCountryS.\")\",'c');\n # \".'<br/>'.\" => <br/>\n # .'<br/>'.\" => .\"<br/>\n # '.' => ''\n # \".\" => ''\n $expr = str_replace(['\".\\'<br/>\\'.\"', '.\\'<br/>\\'.\"', '\\'.\\'', '\".\"'], ['<br/>', '.\"<br/>', ''], $expr);\n return [$eType, $expr];\n }\n $p = $P;\n if ($C == DQ or $C == SQ) {\n # expect string\n if (($g = GetString()) === false) return false; # closing quote not found\n $gType = ExT_String; # got string\n }else if ($C == '[') { # [nl], [date ...], [page#, [span, [xref are legal\n if (MatchStep('[nl]')) {\n /*if ($prevType === ExT_String && (($prevEndCh=substr($expr,-1)) === SQ || $prevEndCh === DQ)) {\n $expr = substr($expr, 0, -1) . '<br/>' . $prevEndCh;\n continue;\n } */\n $g = '\\'<br/>\\'';\n $gType = ExT_String;\n }else if (substr($Line, $P, 6) == '[date ') {\n # looks like start of a [date ...] statement\n Step(); # over the [\n if (($dCodeA = ParseDateStatement()) === false) return false; # returns [type | code] where type can be ExT_String or ExT_Integer, or false\n $gType = $dCodeA[0];\n $g = $dCodeA[1];\n Step(); # over the closing ]\n }else if (MatchStep('[page#')) { # [page# {c:css}]\n if (($css = CssAtribute(false)) === false) return false; # error in css attribute. false in CssAtribute() call to avoid leading , to css\n $g = \"PageStr($css)\";\n $gType = ExT_String;\n Step(); # over the closing ]\n }else if (MatchStep('[span')) {\n if (($g = Span()) === false) return false;\n $gType = ExT_String;\n Step(); # over the closing ]\n }else if (substr($Line, $P, 5) == '[xref') {\n # looks like start of an [xref ...] statement\n Step(); # over the [\n if (($xCodeA = ParseXrefStatement()) === false) return false; # returns [type | code] where type is XrefB_Target etc\n if (!$xCodeA[0]) RGError('Target Xref cannot be used within an expression', $p);\n $g = $xCodeA[1];\n $gType = ExT_String;\n Step(); # over the closing ]\n }else\n return RGError('Invalid [ statement in expression. [nl], [date ...], [page# ...], [span ...], [xref ...] are valid', $p);\n }else{\n # Expr: Not a string or [. y:# or descr or Token?\n if (MatchStep('y:')) {\n # y: expect a year intExpr\n if (($yExpr = IntExpr(' ', true)) === false) return false; # with leading comma\n continue;\n }\n if (MatchStep('descr')) {\n # expect a BroRef\n if (($tok = GetToken(' \"\\'[](),')) === false) return RGError(\"Bro reference expected after descr but not found\", $p);\n if (($broRef = BroRef($tok)) === false) return false;\n # if (is_string($broRef)) return RGError(\"$tok is a Bro reference with dimensions but after descr a BroName without any dimensions is expected\", $p);\n $g = \"Descr($broRef)\";\n $gType = ExT_String;\n }else\n if (($tok = GetToken(' \"\\'[]()+-*/%!<>=&|')) !== false) { # djh?? 25.12.12 removed , from end re change to use of , as segment sep in BroRefs from : But is this ok re other things?\n # got a tok.\n # Expect\n # and, or, number, constant, heading, RG built in variable, format variable, Bro, function or para call\n # ? Allow for built in PHP functions? And PHP variables?\n if ($tok == 'and' || $tok == 'or') {\n $expr .= \" $tok \"; # code works wo the spaces but it doesn't look nice\n $prevType = '&';\n continue;\n }\n # number, constant, heading, RG built in variable, Bro, RowName{, format variable, function or para call}\n $c = $tok[0];\n if (ctype_digit($c) || $c=='.') {\n # digit or '.' so expect a number\n $g = $tok; # in anticipation\n if (ctype_digit($tok))\n $gType = ExT_Integer;\n else if (is_numeric($tok))\n $gType = ExT_Numeric;\n else {\n if ($c == '.')\n return RGError(\"$tok starts with a '.' but is not a number as expected\", $p);\n return RGError(\"$tok starts with a digit but is not a number as expected\", $p);\n }\n $gType = ExT_Numeric;\n }else\n # Expr: Not a number so try a BroRef\n if (($broRef = BroRef($tok, true)) !== false) { # true = no BroRef error\n BroRefToBroIdAndParamForm($broRef, $broId, $pBroRef);\n $g = $broOrCellDatWithTagB ? \"DataWithTag($pBroRef$yExpr)\" : \"Data($pBroRef$yExpr)\";\n $gType = BroExprType($broId);\n }else\n # Expr: Not a BroRef so try a CellRef\n if (($cellRefA = CellRef($tok)) !== false) { # Returns false or [RowNum, Col, Expr type, 0|1 re colSum] with RowNum = 0 for this\n list($rowNum, $col, $gType, $colSum) = $cellRefA;\n $colSum = $colSum ? ',1' : '';\n if ($broOrCellDatWithTagB) {\n if (!$rowNum) return RGError(\"$tok is a cell reference using 'this' but 'this' can only be used with a col statement in a table\", $p);\n $g = \"CellDatWithTag($rowNum,$col$colSum)\";\n }else\n # col expr\n $g = $rowNum ? \"CellDat($rowNum,$col$colSum)\" : \"CellThis(\\$rowA,$col$colSum)\";\n }else\n # Expr: not a CellRef so try the symbol table\n if (($symbolA = STlookup($tok)) !== false) { # match\n switch ($symbolA[STI_SType]) {\n case ST_Constant: $g = $symbolA[STI_Val]; break; # Or could use name i.e. $tok\n case ST_Heading: $g = '$' . ($InFuncB ? \"GLOBALS['HeadingsA']['$tok']\" : \"HeadingsA['$tok']\"); break;\n case ST_Function: $g = \"$tok()\"; break; # djh?? + parameters.... djh?? Add type\n case ST_Para: $g = \"$tok()\"; break;\n case ST_Xref: $g = \"Xref('$tok',ExT_String)\"; break; # using the ExT_String value\n case ST_Var: $g = '$' . ($InFuncB ? \"GLOBALS['$tok']\" : $tok); break;\n default: return RGError(\"$tok is a \" . SymbolTypeToStr($symbolA[STI_SType]) . \" which cannot be used in an expression\", $p);\n }\n $gType = $symbolA[STI_EType];\n }else if (defined($tok)) {\n # not in the symbol table but is a PHP constant\n $g = constant($tok);\n $gType = VarType($g);\n }else\n # nothing so rather than call BroRef() again with errors enabled just give a general no go error\n return RGError(\"Expression expected but found <i>$tok</i> which is not a valid expression as $LastNoErrorErrorS\", $p);\n }else{\n # Expr: not a tok, expect ( ) + - * / % ! < > = & | but not ] or , as they should be in $termChs when valid\n if (InStr($C, '()+-*/%!<>=&|')) {\n # put straight in\n $expr .= $C;\n $prevType = $C;\n Step();\n switch ($prevType) { # C before the Step\n case '(': $lbs++; break;\n case ')': $rbs++; break;\n case '!': # could be ! or != or !==\n for ($i=0; $i<2 && $C == '='; $i++) {\n $expr .= $C;\n Step();\n }\n break;\n case '<': # could be < <> or <=\n if ($C == '>' || $C == '=') {\n $expr .= $C;\n Step();\n }\n break;\n case '>': # could be > or >=\n if ($C == '=') {\n $expr .= $C;\n Step();\n }\n break;\n case '=': # Expect == or ===\n if ($C != '=')\n return RGError('Assignment operator = within expression. Equals comparison operator == intended?', $p);\n for ($i=0; $i<2 && $C == '='; $i++) {\n $expr .= $C;\n Step();\n }\n break;\n case '&': # Expect &&\n if ($C != '&')\n return RGError('Unexpected single &. And operator && intended?', $p);\n $expr .= $C;\n Step();\n break;\n case '|': # Expect ||\n if ($C != '|')\n return RGError('Unexpected single |. Or operator || intended?', $p);\n $expr .= $C;\n Step();\n break;\n }\n continue;\n }\n return RGError(\"Unexpected character $C in expression\", $p);\n }\n }\n # Expr: Got expr segment in $g with expression type in $eType: 0 ExT_String ExT_Numeric\n # this segment type in $gType: ExT_String ExT_Integer+\n # and previous segment type in $prevType: 0 ExT_String ExT_Numeric ( ) + - * / % ! < > = & |\n # echo \"expr=$expr, eType=$eType, gType=$gType, prevType=$prevType<br>\";\n if ($gType == ExT_String) {\n if ($eType && $eType != ExT_String)\n return RGError(\"Invalid mixture of types - string $g found in \" . ExprTypeToStr($eType) . ' expression', $p);\n $eType = ExT_String;\n if ($prevType == ExT_String || $prevType == ExT_Numeric || $prevType === ')') # ExT_String ExT_Numeric )\n $expr .= '.' . $g; # concatenate\n else if (!$prevType || $prevType === '(') # 0 (\n $expr .= $g; # straight in\n else # + - * / % ! < > = & |\n return RGError(\"Expression syntax error: a $prevType operator is followed by a string\",$p);\n $prevType = ExT_String;\n }else{ # expect ExT_Integer+\n if (!$gType)\n return RGError(\"No type for segement $g\", $p);\n # ExT_Numeric with $prevType: 0 ExT_String ExT_Numeric ( ) + - * / % ! < > = & |\n if (!$eType)\n $eType = ExT_Numeric;\n if ($prevType == ExT_Numeric || $prevType === ')') # ExT_Numeric )\n return RGError('An operator is missing before the numerical expression', $p);\n if ($prevType == ExT_String) # ExT_String\n $expr .= '.' . $g; # concatenate\n else # 0 ( + - * / % ! < > = & |\n $expr .= $g; # straight in\n $prevType = ExT_Numeric;\n }\n #echo \"$expr<br>\";\n }\n # return false;\n return RGError('Expression not terminated by ] or then', $pStart);\n}", "title": "" }, { "docid": "2f053cd95d3fcfaa1fea721e00a158c5", "score": "0.43961087", "text": "public function div(): array\n {\n // (a1 + b1) / (a2 + b2)\n // (a1 - b1) / (a2 + b2)...\n\n /**\n * Согласно доке:\n * При делении комплексных чисел в алгебраической форме необходимо избавиться\n * от мнимой составляющей в знаменателе.\n * Для этого числитель и знаменатель домножают на число,\n * сопряженное знаменателю.\n *\n * Поэтому получим числитель и знаменатель, а затем получим результат деления\n * преобразованных числителя и знаменателя\n */\n\n /**\n * В целом, стоит использовать собственные методы с передачей параметров,\n * вида: $this->mul($this->a1, $this->b1)...\n * Здесь отображается момент, с поздним связыванием, когда можно получить экземпляр класса,\n * который тут же и описывается.\n */\n\n $part1Ex = new $this->selfClassName();\n $part1Ex->setNumberOne($this->a1, $this->b1);\n $part1Ex->setNumberTwo($this->conDenomA2, $this->conDenomB2);\n $part1 = $part1Ex->mul();\n\n $part2Ex = new $this->selfClassName();\n $part2Ex->setNumberOne($this->a2, $this->b2);\n $part2Ex->setNumberTwo($this->conDenomA2, $this->conDenomB2);\n $part2 = $part2Ex->mul();\n\n $divA = $part1[0] / $part2[0];\n $divB = $part1[1] / $part2[0];\n\n return [$divA, $divB];\n }", "title": "" }, { "docid": "53835f47de302a1b84832ea90ebdd4ba", "score": "0.43802693", "text": "private function adjust_2913056($hierarchies_of_taxon_values) //If the common root of the dataset is anything else, you can leave it. Only remove it if it is 2913056 \n {\n \n /* Jennifer Hammock added a comment - 06/Aug/19 10:59 PM\n Ah, thanks, Eli- I left this task for so long I've forgotten important pieces of it. Hang in there. I think the following would make sense to try:\n 1. select all values which are taxa known to the Dynamic Hierarchy\n 2. retrieve DH ancestry for all values, using landmarks taxa (including Family taxa) only\n 3. construct a hierarchy of all values and nearest shared ancestors (not all shared ancestors, only those necessary to connect the values)\n 4. remove the magic 5 wherever they appear. (this may leave you with multiple roots; that's OK)\n 5. if multiple roots, label all roots as REP, and the one that appears in the most hierarchies PRM\n 6. if single root, label all immediate children REP, and the one that appears in the most hierarchies PRM\n\n I'm not sure how much that differs from what you have now. I think it might simplify the magic 5 rules, if nothing else. Let's try it on the regular taxon summary process \n (not yet on parents taxon summary) and see how it goes.\n I suppose this one was inevitably going to be iterative/experimental, but I think we're getting close!\n */\n $root_nodes_to_remove = $this->magic8;\n $cont_for_more = false;\n $final = array();\n foreach($hierarchies_of_taxon_values as $page_id => $anc) {\n if(!is_array($anc)) {\n $final[$page_id] = $anc;\n continue;\n }\n $orig_anc = $anc;\n $last = array_pop($anc);\n if(in_array($last, $root_nodes_to_remove)) {\n $final[$page_id] = $anc;\n $cont_for_more = true;\n }\n else $final[$page_id] = $orig_anc;\n }\n if($cont_for_more) {\n while(true) {\n $cont_for_more = false;\n foreach($final as $page_id => $anc) {\n $orig_anc = $anc;\n $last = array_pop($anc);\n if(in_array($last, $root_nodes_to_remove)) {\n $final2[$page_id] = $anc;\n $cont_for_more = true;\n }\n else $final2[$page_id] = $orig_anc;\n }\n if($cont_for_more) {\n $final = $final2;\n $final2 = array();\n }\n else break; //break from while true\n }\n return self::last_round_2del_magic5($final2, $root_nodes_to_remove);\n }\n else return self::last_round_2del_magic5($final, $root_nodes_to_remove);\n \n /* version 1 obsolete\n $life = 2913056;\n $remove_last_rec = true;\n foreach($hierarchies_of_taxon_values as $page_id => $anc) {\n $last = array_pop($anc);\n if($last != $life) {\n $remove_last_rec = false; //if only if one is not $life then don't remove last rec.\n break; //end loop\n }\n }\n if($remove_last_rec) {\n echo \"\\nNOTE: Common root of hierarchies of taxon values (n=\".count($hierarchies_of_taxon_values).\") is 'Life:2913056'. Will remove this common root.\\n\";\n $final = array();\n foreach($hierarchies_of_taxon_values as $page_id => $anc) {\n array_pop($anc);\n $final[$page_id] = $anc;\n }\n return $final;\n }\n else return $hierarchies_of_taxon_values;\n */\n }", "title": "" }, { "docid": "2f76826fcd7ea9754bc8827e4899e13e", "score": "0.43785247", "text": "function ff0_grid_points()\n{\necho<<<HTML\n <fieldset class='option_value'>\n <legend>f/f0 Resolution</legend>\n <input type=\"text\" value=\"1\" name=\"ff0_min\"/> f/f0 Minimum<br/>\n <input type=\"text\" value=\"4\" name=\"ff0_max\"/> f/f0 Maximum<br/>\n <input type=\"text\" value=\"64\" name=\"ff0_grid_points\"/> f/f0 Resolution (total grid points)<br/>\n </fieldset>\nHTML;\n}", "title": "" }, { "docid": "ff001f854adb0234560bb65453c17b51", "score": "0.43675756", "text": "function getRangeRarity($range_min, $range_max, $boost) {\n // $weights_base = [];\n // $sum_base = 0;\n // //generate base weights (1 for each)\n // for($i = $range_min;$i < $range_max; $i++) {\n // $weights_base[$i] = 1;\n // $sum_base += 1;\n // }\n // $weights_alt = [];\n // for($i = 0;$i < $sum_base;$i++) {\n // $weights_alt[$range_min + $i] = $sum_base - (($range_min + $i) - $sum_base) * $sum_base * ($boost / 100);\n // //$weights_alt[$i] = floor(1 + $weights_base[$range_min + $i] / 100 * $boost);\n // }\n // // foreach($weights_base as $weight_int => $weight) {\n // // $weights_alt[$weight_int] = floor($weight_int / 100 * $boost);\n // // //$weights_alt[$weight_int] = floor($weights_base[$weight_int] + (($sum_base - ($sum_base - $weight_int)) / 100 * $boost));\n // // }\n // dd($weights_alt);\n // $sum_alt = 0;\n // foreach($weights_alt as $weight) {\n // $sum_alt += $weight;\n // }\n // $result_num = rand(0, $sum_alt);\n // $num_current = 0;\n // $result = '';\n // foreach($weights_alt as $weight_name => $weight) {\n // $num_current += $weight;\n // if($result_num <= $num_current) {\n // $result = $weight_name;\n // break;\n // }\n // }\n // // floor(250 - (250 - int))\n // dd($weights_alt);\n // return $result;\n }", "title": "" }, { "docid": "f2e17e1d3c772bc885073ef350535474", "score": "0.4354615", "text": "public function expression() {\n //term : factor ((MUL | DIV) factor)*\n //factor : INTEGER | LPAREN expr RPAREN | COLUMNADRESS\n $node = null;\n $prev_node = null;\n $leftnode = $this->term();\n while ($this->lookahead->type == CalculationFunctionLexer::PLUS || $this->lookahead->type == CalculationFunctionLexer::MINUS) {\n $node = new CalculationFunctionParseTree($this->lookahead->type, $this->lookahead->text);\n if(!is_null($prev_node)) {\n $leftnode = $prev_node;\n }\n if ($this->lookahead->type == CalculationFunctionLexer::PLUS) {\n $this->match(CalculationFunctionLexer::PLUS);\n } elseif ($this->lookahead->type == CalculationFunctionLexer::MINUS) {\n $this->match(CalculationFunctionLexer::MINUS);\n }\n if ($leftnode == null) {\n throw new \\Exception(\"Синтаксическая ошибка. Слева от оператора '+' или '-' должно быть число или арифметическое выражение. Узел: \" . $node );\n }\n $node->addLeft($leftnode);\n if (is_null($rightnode = $this->term()) && !is_null($node)) {\n throw new \\Exception(\"Синтаксическая ошибка. Справа от оператора '+' или '-' должно быть число или арифметическое выражение. Узел: \" . $node );\n }\n $node->addRight($rightnode);\n $prev_node = $node;\n }\n if (is_null($node)) {\n return $leftnode;\n } else {\n return $node;\n }\n }", "title": "" }, { "docid": "800270a81791c7911db516372e63fd31", "score": "0.4352395", "text": "public function cierre_evaluado($nacional,$a,$ano){\n \n\techo \"<br>\".$sql=\"SELECT id_plantilla,id_bloque FROM evados.eva_plantilla WHERE id_nacional=\".$nacional.\" AND id_plantilla=\".$a.\" ORDER BY id_bloque ASC \";\n\t$rs_plantilla = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 2\" );\n\t$plantilla = pg_result($rs_plantilla,0);\n\t$cargo_evaluado = pg_result($rs_plantilla,1);\n\t\n\techo \"<br>\".$sql=\"SELECT id_cierre FROM evados.eva_cierre WHERE id_nacional=\".$nacional.\" AND estado=1\";\n\t$rs_cierre = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 3\" );\n\t$cierre = pg_result($rs_cierre,0);\n\t\n\techo \"<br>\".$sql=\"SELECT id_periodo FROM evados.eva_periodo WHERE id_ano=\".$ano.\" AND (cerrado=0 or cerrado is null) \";\n\t$rs_periodo = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 4\" );\n\t$periodo = pg_result($rs_periodo,0);\n\n\n\techo \"<br>\".$sql=\"SELECT id_concepto,peso FROM evados.eva_concepto WHERE estado=1 and id_nacional=\".$nacional.\" ORDER BY orden\";\n\t$rs_concepto = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 5\" );\n\n\t\tif($cargo_evaluado==102){\n\t\t\t$bloq=$cargo_evaluado;\n\t\t}else{\n\t\t\t$bloq=$cargo_evaluado;\n\t\t}\n\n\t\t//---------------- CANTIDAD DE INDICADORES POR AREA Y BLOQUE\n\t \t$sql=\"SELECT count(eib.*) as cant_area, eb.id_bloque,eib.id_area,epa.nombre\n\t\t\t\tFROM evados.eva_item_bloque eib\n\t\t\t\tINNER JOIN evados.eva_bloque eb ON eib.id_bloque=eb.id_bloque AND eb.estado=1\n\t\t\t\tINNER JOIN evados.eva_plantilla_area epa ON epa.id_area=eib.id_area\n\t\t\t\tWHERE id_plantilla=\".$plantilla.\" and id_nacional=\".$nacional.\"\n\t\t\t\tGROUP BY 2,3,4\n\t\t\t\tORDER BY 3,2\";\n\t\t$rs_indicadores_bloque = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 6\".$sql );\n\n\n\t\t//---------------- CANTIDAD DE EVALUADOS POR PAUTA\n\t\t/*$sql=\"SELECT DISTINCT rut_evaluado\n\t\t\t FROM evados.eva_relacion_evaluacion ere\n\t\t\t WHERE ere.id_ano=\".$ano.\" and ere.id_periodo=\".$periodo.\" and ere.rut_evaluado=13508692 AND ere.cargo_evaluado=\".$bloq;*/\n\t\t $sql=\"SELECT DISTINCT ere.rut_evaluado\n\t\t\t FROM evados.eva_relacion_evaluacion ere\n\t\t\t INNER JOIN evados.eva_plantilla_evaluacion epe ON epe.rut_evaluado=ere.rut_evaluado AND epe.ip_periodo=ere.id_periodo\n\t\t\t WHERE ere.id_ano=\".$ano.\" and ere.id_periodo=\".$periodo.\" AND epe.id_plantilla=\".$plantilla.\"\n\t\t\t AND epe.id_cargo_evaluado=\".$bloq;\n\n\t\t$rs_evaluado = pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 7\" );\n\n\t\n\t//------------- INICIO CARGA TABLA EVA_CIERRE_CONCEPTO_DIMENSION-------------------\n\t\tfor($i=0;$i<pg_numrows($rs_evaluado);$i++){\n\t\t\t$fila_evaluado = pg_fetch_array($rs_evaluado,$i);\n\t\t\n\t\t\t//------ CANTIDAD DE INDICADORES POR BLOQUE DE UNA PAUTA EN PARTICULAR\n\t\t\t\n\n\t\t\tfor($j=0;$j<pg_numrows($rs_indicadores_bloque);$j++){\n\t\t\t\t$fila_ind = pg_fetch_array($rs_indicadores_bloque,$j);\n\n\t\t\t\t//if($cargo_evaluado==102) $cargo_evaluado=5;\n\t\t\t\t\t\n\t\t\t\t\t /*echo \"<br>\".$sql=\"SELECT count(*) as cant_bloque, ebe.id_bloque\n\t\t\t\t\t FROM evados.eva_relacion_evaluacion ere\n\t\t\t\t\t INNER JOIN evados.eva_bloque_evaluador ebe ON ere.rut_evaluador=ebe.rut_evaluador AND ere.id_cargo=ebe.id_cargo\n\t\t\t\t\t WHERE ere.id_ano=\".$ano.\" and ere.id_periodo=\".$periodo.\" and ere.cargo_evaluado=\".$cargo_evaluado.\" \n\t\t\t\t\t and ere.rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" AND ebe.id_bloque=\".$fila_ind['id_bloque'].\" \n\t\t\t\t\t GROUP BY 2\";*/\n\t\t\t\t\t $sql=\"SELECT count(distinct ere.rut_evaluador) as cant_bloque, ebe.id_bloque\n\t\t\t\t\t\t\tFROM evados.eva_plantilla_evaluacion ere\n\t\t\t\t\t\t\tINNER JOIN evados.eva_bloque_evaluador ebe ON ere.rut_evaluador=ebe.rut_evaluador \n\t\t\t\t\t\t\tAND ere.id_cargo_evaluador=ebe.id_cargo\n\t\t\t\t\t\t\tWHERE ere.id_ano=\".$ano.\" and ere.ip_periodo=\".$periodo.\" and ere.id_cargo_evaluado=\".$cargo_evaluado.\"\n\t\t\t\t\t\t\tand ere.rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" AND ebe.id_bloque=\".$fila_ind['id_bloque'].\" \n\t\t\t\t\t\t\tGROUP BY 2\";\n\t\t\t\t\t \n\t\t\t\t\t $rs_cantidad =pg_exec($this->Conec->conectar(),$sql) or die( \"Error bd SQL 8\" );\n\n\t\t\t\tfor($x=0;$x<pg_numrows($rs_concepto);$x++){\n\t\t\t\t\t$fila_concepto = pg_fetch_array($rs_concepto,$x);\n\t\t\t\t\t\n\t\t\t\t\tfor($n=0;$n<pg_numrows($rs_cantidad);$n++){\n\t\t\t\t\t\t$fila_cantidad = pg_fetch_array($rs_cantidad,$n);\n\t\t\t\t\t\t$peso = $fila_concepto['peso'];\n\t\t\t\t\t\t//echo \" \".$fila_concepto['peso'].\" \".$fila_ind['cant_area'].\" \".$fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$valor = $fila_concepto['peso'] * $fila_ind['cant_area'] * $fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$fila_concepto['peso'].\" \".$fila_ind['cant_area'].\" \".$fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$sql=\"INSERT INTO evados.eva_cierre_concepto_dimension (id_cierre,id_plantilla,id_area,id_ano,\n\t\t\t\t\t\t\t id_periodo,id_concepto,rut_evaluado,id_bloque,peso,valor) \n\t\t\t\t\t\t\t VALUES (\".$cierre.\",\".$plantilla.\",\".$fila_ind['id_area'].\",\".$ano.\",\".$periodo.\",\".$fila_concepto['id_concepto'].\",\n\t\t\t\t\t\t\t \".$fila_evaluado['rut_evaluado'].\",\".$fila_cantidad['id_bloque'].\",\".$peso.\",\".$valor.\")\";\n\t\t\t\t\t\t$rs_insert = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tfor($x=0;$x<pg_numrows($rs_concepto);$x++){\n\t\t\t\t\t$fila_concepto = pg_fetch_array($rs_concepto,$x);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t$peso = $fila_concepto['peso'];\n\t\t\t\t\t\t//echo \" \".$fila_concepto['peso'].\" \".$fila_ind['cant_area'].\" \".$fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$valor = $fila_concepto['peso'] * 1 * $fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$fila_concepto['peso'].\" \".$fila_ind['cant_area'].\" \".$fila_cantidad['cant_bloque'];\n\t\t\t\t\t\t$sql=\"INSERT INTO evados.eva_cierre_concepto_dimension (id_cierre,id_plantilla,id_area,id_ano,\n\t\t\t\t\t\t\t id_periodo,id_concepto,rut_evaluado,id_bloque,peso,valor) \n\t\t\t\t\t\t\t VALUES (\".$cierre.\",\".$plantilla.\",\".$fila_ind['id_area'].\",\".$ano.\",\".$periodo.\",\".$fila_concepto['id_concepto'].\",\n\t\t\t\t\t\t\t \".$fila_evaluado['rut_evaluado'].\",4,\".$peso.\",\".$valor.\")\";\n\t\t\t\t\t\t$rs_insert = pg_exec($this->Conec->conectar(),$sql);\n\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}\n\n\t\t}\n\t\t\n\t//------------------ FIN CARGA TABLA EVA_CIERRE_CONCEPTO_DIMENSION -------------------\n\n\t//------------------- INICIO CARGA TABLA EVA_CIERRE_DIMENSION_CARGO------------------\n\n\t $sql=\"select DISTINCT id_area,id_bloque from evados.eva_item_bloque eib where eib.id_plantilla=\".$plantilla.\" ORDER BY id_area,id_bloque\";\t\n\t$rs_area = pg_exec($this->Conec->conectar(),$sql);\n\n\t\n\tfor($j=0;$j<pg_numrows($rs_evaluado);$j++){\n\t\t$fila_evaluado = pg_fetch_array($rs_evaluado,$j);\n\n\t\tfor($i=0;$i<pg_numrows($rs_area);$i++){\n\t\t\t$fila_area = pg_fetch_array($rs_area,$i);\n\n\t\t\t $sql=\"SELECT count(*) * ec.peso as valor\n\t\t\t FROM evados.eva_plantilla_evaluacion epe \n\t\t\t INNER JOIN evados.eva_bloque_evaluador ebe ON epe.id_cargo_evaluador=ebe.id_cargo AND \n\t\t\t epe.rut_evaluador=ebe.rut_evaluador AND ebe.id_periodo=\".$periodo.\"\n\t\t\t INNER JOIN evados.eva_concepto ec ON ec.id_concepto=epe.id_concepto \n\t\t\t WHERE epe.id_ano=\".$ano.\" and epe.ip_periodo=\".$periodo.\" AND epe.rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" AND ec.id_nacional=\".$nacional.\"\n\t\t\t AND ebe.id_bloque=\".$fila_area['id_bloque'].\" and epe.id_area=\".$fila_area['id_area'].\"\n\t\t\t AND epe.id_plantilla=\".$plantilla.\"\n\t\t\t GROUP BY ec.peso\";\n\t\t\t \n\t\t\t if($fila_area['id_bloque']==4){\n\t\t\t\t $sql=\"SELECT count(*) * ec.peso as valor\n\t\t\t FROM evados.eva_plantilla_evaluacion epe \n\t\t\t INNER JOIN evados.eva_bloque_evaluador ebe ON epe.id_cargo_evaluador=ebe.id_cargo AND \n\t\t\t epe.rut_evaluador=ebe.rut_evaluador AND ebe.id_periodo=\".$periodo.\"\n\t\t\t INNER JOIN evados.eva_concepto ec ON ec.id_concepto=epe.id_concepto \n\t\t\t WHERE epe.id_ano=\".$ano.\" and epe.ip_periodo=\".$periodo.\" AND epe.rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" AND ec.id_nacional=\".$nacional.\"\n\t\t\t AND epe.rut_evaluador=\".$fila_evaluado['rut_evaluado'].\" and epe.id_area=\".$fila_area['id_area'].\"\n\t\t\t AND epe.id_plantilla=\".$plantilla.\"\n\t\t\t GROUP BY ec.peso\"; \n\t\t\t }\n\t\t\t$rs_total =pg_exec($this->Conec->conectar(),$sql);\n\n\t\t\t$total = 0;\n\t\t\tfor($x=0;$x<pg_numrows($rs_total);$x++){\n\t\t\t\t$fila_total = pg_fetch_array($rs_total,$x);\n\n\t\t\t\t$total = $total + $fila_total['valor'];\n\t\t\t}\n\n\t\t\t $sql =\"INSERT INTO evados.eva_cierre_dimension_bloque (id_cierre,id_plantilla,id_area,id_ano,id_periodo, id_bloque, rut_evaluado, valor ) VALUES (\".$cierre.\",\".$plantilla.\",\".$fila_area['id_area'].\", \".$ano.\", \".$periodo.\", \".$fila_area['id_bloque'].\", \".$fila_evaluado['rut_evaluado'].\", \".$total.\")\";\n\t\t\t$rs_insert = pg_exec($this->Conec->conectar(),$sql);\n\n\t\t}\n\t}\n\t\n\n\t//------------------ INICIO CARGA DE TABLA CIERRE DIMENSION FINAL ---------------------------\n\techo \"<br>\".$sql=\"SELECT DISTINCT id_area FROM evados.eva_item_bloque WHERE id_plantilla=\".$plantilla.\" ORDER BY id_area ASC\";\n\t$rs_area = pg_exec($this->Conec->conectar(),$sql);\n\n\tfor($i=0;$i<pg_numrows($rs_area);$i++){\n\t\t$fila_area = pg_fetch_array($rs_area,$i);\n\n\t\tfor($j=0;$j<pg_numrows($rs_evaluado);$j++){\n\t\t\t$fila_evaluado = pg_fetch_array($rs_evaluado,$j);\n\t\t\t$obtenido=0;\n\t\t\t$optimo=0;\n\t\t\techo \"<br>\".$sql=\"SELECT sum(valor) FROM evados.eva_cierre_dimension_bloque WHERE id_ano=\".$ano.\" and id_periodo=\".$periodo.\" AND id_area=\".$fila_area['id_area'].\" AND rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" and id_cierre=\".$cierre;\n\t\t\t$rs_total =pg_exec($this->Conec->conectar(),$sql);\n\t\t\t$obtenido = pg_result($rs_total,0);\n\n\t\t\techo \"<br>\".$sql=\"SELECT sum(valor) FROM evados.eva_cierre_concepto_dimension eccd WHERE id_ano=\".$ano.\" and id_periodo=\".$periodo.\" AND id_area=\".$fila_area['id_area'].\" AND rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" AND eccd.id_concepto in (select id_concepto from evados.eva_concepto where id_nacional=\".$nacional.\" and optimo=1) AND id_cierre=\".$cierre;\n\t\t\t$rs_sumatoria = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t$optimo = pg_result($rs_sumatoria,0);\n\t\t\t\n\t\t\t$resultado_obtenido = round(($obtenido * 100) / $optimo);\n\t\t\t\n\t\t\t\n\n\t\t\techo \"<br>\".$sql=\"SELECT * FROM evados.eva_escala ee WHERE ee.desde<=\".$resultado_obtenido.\" AND ee.hasta>=\".$resultado_obtenido;\n\t\t\t$rs_escala = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t$concepto = pg_result($rs_escala,1);\n\n\t\t\techo \"<br>\".$sql=\"INSERT INTO evados.eva_cierre_dimension_final (id_cierre,id_plantilla, id_area,id_ano,id_periodo,rut_evaluado, sumatoria,total_concepto,valor_final, evaluacion_final, porcentaje) VALUES (\".$cierre.\",\".$plantilla.\",\".$fila_area['id_area'].\",\".$ano.\",\".$periodo.\",\".$fila_evaluado['rut_evaluado'].\", \".$optimo.\", \".$obtenido.\", \".$resultado_obtenido.\", '\".$concepto.\"', 100)\";\n\t\t\t$rs_cierre_dimension = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t\n\t\t\t/******** PARCHE DE CIERRE 2015****/\n\t\t\t\n\t\t\t$sql=\"SELECT * FROM evados.eva_cierre_evaluado_final WHERE id_cierre=\".$cierre.\" AND id_plantilla=\".$plantilla.\" AND rut_evaluado=\".$fila_evaluado['rut_evaluado'].\"\";\n\t\t\t$rs_final = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t$fila_final = pg_fetch_array($rs_final,0);\n\t\t\t\n\t\t\t$sql=\"select sum(valor) from evados.eva_cierre_concepto_dimension where id_cierre=\".$cierre.\" and rut_evaluado=\".$fila_evaluado['rut_evaluado'].\" and peso=4 and id_plantilla=\".$plantilla.\"\";\n\t\t\t$rs_nuevo_optimo = pg_exec($this->Conec->conectar(),$sql);\n\t\t\t$nuevo_optimo=pg_result($rs_nuevo_optimo,0);\n\t\t\t\n\t\t\t$new_final = round(($fila_final['sumatoria'] * 100) / $nuevo_optimo);\n\t\t\t\n\t\t\t$sql=\"SELECT concepto FROM evados.eva_escala WHERE desde<=\".$new_final.\" AND hasta>=\".$new_final;\n\t\t\t$rs_escala = pg_exec($this->Conec->conectar(),$sql) or die (\"ERROR 8 \".$sql);\n\t\t\t$concepto = pg_Result($rs_escala,0);\n\t\t\t\n\t\t\t$sql=\"UPDATE evados.eva_cierre_evaluado_final SET total_concepto=\".$nuevo_optimo.\", evaluacion_final='\".$concepto.\"', valor_final=\".$new_final.\" WHERE id_cierre=\".$cierre.\" AND id_plantilla=\".$plantilla.\" AND rut_evaluado=\".$fila_evaluado['rut_evaluado'];\n\t\t\t$rs_modificacion = pg_exec($this->Conec->conectar(),$sql);\n\n\n\t\t\t\n\n\t\t}\n\t}\n\t//-------------------- FIN CARGA DE TABLA CIERRE DIMENSION FINAL-------------------------------\n\tif($rs_evaluado){\n\t\treturn $rs_evaluado;\n\t}else{\n\t\treturn false;\t\n\t}\n}", "title": "" }, { "docid": "0ab150ceeea1f2b224f68ce3ecff1d31", "score": "0.43413594", "text": "public static function evaluate($e) {\n\t\t\t// (if value of ({$ds-value}) is (one))\n\t\t\t// (if value of ({$ds-value}) is not ())\n\t\t\t// (if any of ({$ds-value}) is in (one,two,three))\n\t\t\t// (if all of ({$ds-value}) are in (one,two,three))\n\t\t\t// (if any of ((if value of ({$ds-value}) is (one)), {$ds-is-true}) is (no))\n\n\t\t\tif (is_array($e)) $r = $e; // Recursive call for sub expression, $e is already parsed\n\t\t\telse $r = self::parse($e);\n\n\t\t\tif (empty($r)) return false;\n\n\t\t\t$r[2] = substr($r[2], 1, -1); // Remove first level parenthesis\n\t\t\t$r[4] = substr($r[4], 1, -1); // Same here\n\n\t\t\t// Parse sub expressions\n\t\t\tfor ($i = 2; $i <= 4; $i+=2) {\n\t\t\t\t$max = 10;\n\t\t\t\twhile ($max--) {\n\t\t\t\t\t$s = self::parse($r[$i]);\n\t\t\t\t\tif (empty($s)) break;\n\n\t\t\t\t\t$r[$i] = str_replace($s[0], (self::evaluate($s) ? 'yes' : 'no'), $r[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$r[2] = trim($r[2]);\n\t\t\t$r[4] = trim($r[4]);\n\t\t\tswitch ($r[3]) {\n\t\t\t\tcase 'is in':\n\t\t\t\tcase 'are in':\n\t\t\t\t\tif ((!$r[2] || !$r[4]) && $r[2] != $r[4]) return false;\n\n\t\t\t\t\t$r[2] = preg_split('/\\s*,\\s*/', $r[2]);\n\t\t\t\t\t$r[4] = preg_split('/\\s*,\\s*/', $r[4]);\n\t\t\t\t\t$found = array_intersect($r[2], $r[4]);\n\t\t\t\t\tif ($r[1] == 'value of' || $r[1] == 'all of') {\n\t\t\t\t\t\treturn (!empty($found) && count($r[2]) >= count($found) && count($r[2]) <= count($r[4]));\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'any of') {\n\t\t\t\t\t\treturn (!empty($found));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'is not in':\n\t\t\t\tcase 'are not in':\n\t\t\t\t\tif ((!$r[2] || !$r[4]) && $r[2] != $r[4]) return true;\n\n\t\t\t\t\t$r[2] = preg_split('/\\s*,\\s*/', $r[2]);\n\t\t\t\t\t$r[4] = preg_split('/\\s*,\\s*/', $r[4]);\n\t\t\t\t\t$found = array_intersect($r[2], $r[4]);\n\t\t\t\t\tif ($r[1] == 'value of' || $r[1] == 'all of') {\n\t\t\t\t\t\treturn (empty($found));\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'any of') {\n\t\t\t\t\t\treturn (empty($r[4]) || count($found) < count($r[2]));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'is not':\n\t\t\t\t\tif ($r[1] == 'value of') {\n\t\t\t\t\t\treturn ($r[2] != $r[4]);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'any of') {\n\t\t\t\t\t\tforeach (preg_split('/\\s*,\\s*/', $r[2]) as $v) {\n\t\t\t\t\t\t\tif ($v != $r[4]) return true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'all of') {\n\t\t\t\t\t\tforeach (preg_split('/\\s*,\\s*/', $r[2]) as $v) {\n\t\t\t\t\t\t\tif ($v == $r[4]) return false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'is':\n\t\t\t\t\tif ($r[1] == 'value of') {\n\t\t\t\t\t\treturn ($r[2] == $r[4]);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'any of') {\n\t\t\t\t\t\tforeach (preg_split('/\\s*,\\s*/', $r[2]) as $v) {\n\t\t\t\t\t\t\tif ($v == $r[4]) return true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'all of') {\n\t\t\t\t\t\tforeach (preg_split('/\\s*,\\s*/', $r[2]) as $v) {\n\t\t\t\t\t\t\tif ($v != $r[4]) return false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'matches':\n\t\t\t\tcase 'matches not':\n\t\t\t\t\t$regexp = \"/{$r[4]}/\";\n\t\t\t\t\t$yes = ($r[3] == 'matches' ? true : false);\n\t\t\t\t\t$no = !$yes;\n\t\t\t\t\tif ($r[1] == 'value of') {\n\t\t\t\t\t\treturn (preg_match($regexp, $r[2]) ? $yes : $no);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'any of') {\n\t\t\t\t\t\tforeach (preg_split('/\\s*,\\s*/', $r[2]) as $v) {\n\t\t\t\t\t\t\tif (preg_match($regexp, $v)) return $yes;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $no;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($r[1] == 'all of') {\n\t\t\t\t\t\t$v = preg_split('/\\s*,\\s*/', $r[2]);\n\t\t\t\t\t\treturn (count(preg_grep($regexp, $v)) == count($v) ? $yes : $no);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "508a50c9107b46ccb089e7e1d43295d5", "score": "0.43357372", "text": "function _fourD_analysis_goal_form_parts( $values=array() ) {\n // fourD_analysis_debug('_fourD_analysis_goal_form_parts; $form_id: ' .$form_id .', #id: '.$form['#id']. '; #type: ' . $form['type']['#value'] .'; FORM: '. print_r($form, TRUE) );\n \n $form = array();\n \n // fieldset\n $form['analysis'] = array(\n '#title' => t('Goal Analysis'),\n '#type' => 'fieldset',\n '#description' => t('Enter values for the various parameters. Explore the impact of ' .\n 'different values. Play around a get a feel for it.'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n \n $form['analysis']['goal_weight'] = array( // piggy back off the goal_weight from Ratings schema\n '#title' => t('Weight'),\n '#type' => 'textfield',\n '#field_suffix' => t('[0.0,1.0]'),\n '#size' => 4,\n // '#default_value'=> isset($values['goal_weight']) ? number_format($values['goal_weight'], 10) : '0.0',\n '#default_value' => _fourD_analysis_trim_decimal( $values['goal_weight'] ),\n '#weight' => 1,\n );\n \n return $form;\n}", "title": "" }, { "docid": "4109abd5b40d55fa273bcbf76813967f", "score": "0.433465", "text": "abstract protected function rules();", "title": "" }, { "docid": "e972f56c2caf8ed7c82c7730df2ef3db", "score": "0.43276608", "text": "function generate_repay_ratio($from_date,$to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //CALCULATE CUMMULATED REPAYMENT RATE\n $sched_res = mysql_query(\"select sum(s.princ_amt) as princ_amt from schedule s join disbursed d on s.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and s.date <= '\".$apparent_date.\"'\");\n $sched = mysql_fetch_array($sched_res);\n $sched_amt = ($sched['princ_amt']!= NULL) ? $sched['princ_amt'] : 1;\n $paid_res = mysql_query(\"select sum(p.princ_amt) as princ_amt from payment p join disbursed d on p.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and p.date <= '\".$apparent_date.\"'\");\n $paid = mysql_fetch_array($paid_res);\n $paid_amt = ($paid['princ_amt'] != NULL) ? $paid['princ_amt'] : 0;\n \n //CALCULATE REPAYMENT RATE FOR THIS MONTH\n $nowsched_res = mysql_query(\"select sum(s.princ_amt) as princ_amt from schedule s join disbursed d on s.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and s.date like '\".$arr[1].\"-\".$arr[2].\"-%' \");\n $nowsched = mysql_fetch_array($nowsched_res);\n $nowsched_amt = ($sched['princ_amt']!= NULL) ? $nowsched['princ_amt'] : 1;\n $nowpaid_res = mysql_query(\"select sum(p.princ_amt) as princ_amt from payment p join disbursed d on p.loan_id=d.id left join written_off w on d.id=w.loan_id where (w.date >='\".$apparent_date.\"' or w.date is null) and p.date like '\".$arr[1].\"-\".$arr[2].\"-%'\");\n $nowpaid = mysql_fetch_array($nowpaid_res);\n $nowpaid_amt = ($nowpaid['princ_amt'] != NULL) ? $nowpaid['princ_amt'] : 0;\n \n\n $percent = ($paid_amt / $sched_amt) * 100.00;\n $nowpercent = ($nowpaid_amt / $nowsched_amt) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n $nowpercent = sprintf(\"%.02f\", $nowpercent);\n if($y_list == ''){\n $y_list = $percent;\n $nowy_list = $nowpercent;\n }else{\n $y_list = $y_list .\",\".$percent;\n $nowy_list = $nowy_list .\",\".$nowpercent;\n }\n $month_year = date('M', strtotime($apparent_date)) .\" \". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n $nowy_array = split(',', $nowy_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Repayment Rate (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"REPAYMENT RATE PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"red\");\n $p1->SetCenter();\n $p1->SetLegend(\"Cummulated Repayment Rate (%)\");\n $graph->Add($p1);\n\n // Create the second line\n $p2 = new LinePlot($nowy_array);\n $p2->mark->SetType(MARK_FILLEDCIRCLE);\n $p2->mark->SetFillColor(\"darkblue\");\n $p2->mark->SetWidth(4);\n $p2->SetColor(\"blue\");\n $p2->SetCenter();\n $p2->SetLegend(\"Repayment Rate (%)\");\n $graph->Add($p2);\n $graph->Stroke(\"repay_ratio.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "8285457488ede1f1c249d12254d343e6", "score": "0.43264285", "text": "function generate_port_yield($from_date, $to_date){\n list($from_year,$from_month,$from_mday) = explode('-', $from_date);\n list($to_year,$to_month,$to_mday) = explode('-', $to_date);\n $resp = new xajaxResponse();\n $calc = new Date_Calc();\n $to_date = $to_year .\"-\".$to_month.\"-31 23:59:59\";\n //LOAN LOSS PROVISSIONS\n $next=0;\n $y_list ='';\n $x_list='';\n $from_days = $calc->dateToDays(28, $from_month, $from_year);\n $to_days = $calc->dateToDays(28, $to_month, $to_year);\n $diff = $to_days - $from_days;\n while($next <= $diff){\n $apparent_date = $calc->daysToDate($calc->dateToDays(28, $from_month, $from_year) + $next, '%Y-%m-28');\n preg_match(\"/(\\d+)-(\\d+)-28/\", $apparent_date, $arr);\n $apparent_date = $calc->endOfMonthBySpan(0, $arr[2], $arr[1], '%Y-%m-%d');\n //DISBURSED LOANS\n $disbursed_res = mysql_query(\"select sum(amount) as amount from disbursed where date <='\".$apparent_date.\"'\");\n $disbursed = mysql_fetch_array($disbursed_res);\n $disbursed_amt = ($disbursed['amount'] != NULL) ? $disbursed['amount'] : 0;\n //INTEREST PAID\n $paid_res = mysql_query(\"select sum(int_amt) as int_amt, sum(princ_amt) as princ_amt from payment where date <='\".$apparent_date.\"'\");\n $paid = mysql_fetch_array($paid_res);\n $paid_int = ($paid['int_amt'] != NULL) ? $paid['int_amt'] : 0;\n $paid_princ = ($paid['princ_amt'] != NULL) ? $paid['princ_amt'] : 0;\n //WRITTEN OFF \n $write_res = mysql_query(\"select sum(amount) as amount from written_off where date <='\".$apparent_date.\"'\");\n $write = mysql_fetch_array($write_res);\n $written_amt = ($write['amount'] != NULL) ? $write['amount'] : 0;\n //OUTSTANDING\n $balance = $disbursed_amt - $paid_princ - $written_amt;\n $percent = ($paid_int / $balance) * 100.00;\n $percent = sprintf(\"%.02f\", $percent);\n if($y_list == '')\n $y_list = $percent;\n else\n $y_list = $y_list .\",\".$percent;\n $month_year = date('M', strtotime($apparent_date)) .\"-\". date('Y', strtotime($apparent_date));\n if($x_list == '')\n $x_list = $month_year;\n else\n $x_list = $x_list .\",\".$month_year; \n $next = $next + 30;\n }\n\n // Create the basic graph\n $x_array = split(',', $x_list);\n $y_array = split(',', $y_list);\n //print_r($x_array.\"<br>\".$y_array);\n //exit();\n//CREATE GRAPH\n $graph = new Graph(900,600,'auto');\n $graph->SetScale(\"textlin\");\n $graph->SetMarginColor(\"lightblue\");\n $graph->SetShadow();\n $graph->img->SetMargin(40,80,30,80);\n $graph->img->SetImgFormat(\"jpeg\");\n\n // Adjust the position of the legend box\n $graph->legend->Pos(0.02,0.15, \"right\", \"center\");\n\n // Adjust the color for theshadow of the legend\n $graph->legend->SetShadow('[email protected]');\n $graph->legend->SetFillColor('[email protected]');\n\n // Get localised version of the month names\n $graph->xaxis->SetTickLabels($x_array);\n\n // Set a nice summer (in Stockholm) image\n //$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);\n\n // Set axis titles and fonts\n $graph->xaxis->title->Set(\"Months\");\n //$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);\n //$graph->xaxis->title->SetColor('white');\n $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);\n $graph->title->SetColor(\"darkred\");\n\n\n $graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,7);\n $graph->xaxis->SetColor('darkblue');\n $graph->xaxis->SetLabelAngle(70);\n\n $graph->yaxis->title->Set(\"Portfolio Yield Ratio (%)\");\n $graph->yaxis->SetFont(FF_FONT1,FS_BOLD);\n $graph->yaxis->SetColor('white');\n\n //$graph->ygrid->Show(false);\n $graph->ygrid->SetColor('[email protected]');\n\n // Setup graph title\n $graph->title->Set(\"PORTFOLIO YIELD RATIO PLOTTED AGAINST TIME\");\n // Some extra margin (from the top)\n $graph->title->SetMargin(3);\n $graph->title->SetFont(FF_COMIC,FS_NORMAL,12);\n\n \n // Create the first line\n $p1 = new LinePlot($y_array);\n $p1->mark->SetType(MARK_FILLEDCIRCLE);\n $p1->mark->SetFillColor(\"red\");\n $p1->mark->SetWidth(4);\n $p1->SetColor(\"blue\");\n $p1->SetCenter();\n $p1->SetLegend(\"Portfolio Yield Ratio (%)\");\n $graph->Add($p1);\n $graph->Stroke(\"port_yield.jpg\");\n return $resp;\n}", "title": "" }, { "docid": "2e8f196dafecf0a9fd204b934f7f76e6", "score": "0.43247026", "text": "private function main_basal_values($page_id, $predicate, $type = 'basal values', $recs = array()) //for basal values\n {\n $this->original_nodes = array(); //IMPORTANT to initialize especially for multiple calls of this function main_basal_values()\n if($type == 'basal values') {\n $this->parent_basal_values_YesNo = false;\n self::per_line('basal values', $page_id, $predicate);\n $recs = self::assemble_recs_for_page_id_from_text_file($page_id, $predicate, array('value_uri')); //3rd param array is required_fields\n if(!$recs) {\n debug(\"\\nNo records for [$page_id] [$predicate].\\n\");\n return false;\n }\n }\n elseif($type == 'parent basal values') { //for parent basal values\n $this->parent_basal_values_YesNo = true;\n \n /* version 1 - didn't use\n $this->original_nodes = $original_nodes;\n $ISVAT = $param_isvat;\n */\n $this->basal_values_parent_recs = $recs;\n $this->original_nodes = $this->original_nodes_parent;\n if(!$recs) {\n debug(\"\\n01. No records for [$page_id] [$predicate].\\n\");\n return false;\n }\n }\n else exit(\"\\nShould not go here...\\n\");\n debug(\"\\n A1 recs: \".count($recs));\n $recs = self::check_inferred_file($recs, $page_id, $predicate);\n debug(\"\\n A2 recs: \".count($recs).\"\\n\");\n // exit;\n $uris = self::get_valueUris_from_recs($recs);\n debug(\"\\n B uris: \".count($uris));\n \n self::set_ancestor_ranking_from_set_of_uris($uris);\n // print_r($this->ancestor_ranking_preferred); exit;\n $ISVAT = self::get_initial_shared_values_ancestry_tree($recs); //initial \"shared values ancestry tree\" ---> parent left, term right\n // print_r($ISVAT); exit;\n $ISVAT = self::sort_ISVAT($ISVAT, 1);\n if(!$ISVAT) return false;\n $info = self::add_new_nodes_for_NotRootParents($ISVAT);\n $new_nodes = $info['new_nodes'];\n if($GLOBALS['ENV_DEBUG']) {\n echo \"\\n\\nnew nodes 0:\\n\"; foreach($new_nodes as $a) echo \"\\n\".$a[0].\"\\t\".$a[1];\n }\n // print_r($new_nodes); exit;\n \n $info['new_nodes'] = self::sort_ISVAT($new_nodes, 2);\n $new_nodes = $info['new_nodes'];\n $roots = $info['roots'];\n /* good debug\n echo \"\\n\\nnew nodes 1:\\n\"; foreach($new_nodes as $a) echo \"\\n\".$a[0].\"\\t\".$a[1];\n echo \"\\n\\nRoots 1: \".count($roots).\"\\n\"; print_r($roots);\n */\n \n // /* merge\n $info = self::merge_nodes($info, $ISVAT);\n $ISVAT = $info['new_isvat'];\n $roots = $info['new_roots'];\n $new_nodes = array();\n // */\n \n // /* for jen:\n if($GLOBALS['ENV_DEBUG']) {\n echo \"\\n================================================================\\npage_id: $page_id | predicate: [$predicate]\\n\";\n echo \"\\n\\ninitial shared values ancestry tree: \".count($ISVAT).\"\\n\";\n foreach($ISVAT as $a) echo \"\\n\".$a[0].\"\\t\".$a[1];\n }\n $this->ISVAT = $ISVAT;\n if($GLOBALS['ENV_DEBUG']) {\n // echo \"\\n\\nnew nodes: \".count($new_nodes).\"\\n\"; foreach($new_nodes as $a) echo \"\\n\".$a[0].\"\\t\".$a[1]; //good debug\n echo \"\\n\\nInitial roots: \".count($roots).\"\\n\"; print_r($roots);\n }\n // */\n \n //for step 1: So, first you must identify the tips- any values that don't appear in the left column. The parents, for step one, will be the values to the left of the tip values.\n $tips = self::get_tips($ISVAT);\n if($GLOBALS['ENV_DEBUG']) {\n echo \"\\n tips: \".count($tips);\n foreach($tips as $tip) echo \"\\n$tip\";\n echo \"\\n-end tips-\\n\"; //exit;\n }\n \n if($this->parent_basal_values_YesNo) { //parent mode\n $lessthanORequal5 = 15;\n $lessthanORequal4 = 15;\n // $lessthanORequal5 = 5;\n // $lessthanORequal4 = 4;\n }\n else { //non-parent mode\n $lessthanORequal5 = 5;\n $lessthanORequal4 = 4;\n }\n \n if(count($tips) <= $lessthanORequal5 ) $selected = $tips;\n else { // > 5\n // /* Two new steps from Jen & Katja UNCOMMENT IN REAL OPERATION...\n $ret_from_2new_steps = self::two_new_steps($ISVAT, $roots, $tips);\n $roots = $ret_from_2new_steps['roots'];\n $tips = $ret_from_2new_steps['tips'];\n $ISVAT = $ret_from_2new_steps['ISVAT'];\n if($GLOBALS['ENV_DEBUG']) {\n echo \"\\nnew tips: \".count($tips); foreach($tips as $tip) echo \"\\n\".$tip;\n echo \"\\n\";\n }\n // */\n if($GLOBALS['ENV_DEBUG']) {\n echo \"\\n\\nroots after deletion-steps: \".count($roots).\"\\n\"; print_r($roots);\n }\n \n $step_1 = self::get_step_1($ISVAT, $roots, $tips, 1);\n if(count($step_1) <= $lessthanORequal4) $selected = $step_1; //select set 1\n else {\n $step_2 = self::get_step_1($ISVAT, $roots, $step_1, 2);\n if(count($step_2) <= $lessthanORequal4) $selected = $step_2; //select set 2\n else {\n $step_3 = self::get_step_1($ISVAT, $roots, $step_2, 3);\n if($step_2 == $step_3) {\n debug(\"\\nSteps 2 and 3 are identical.\\n\");\n if(count($step_3) <= $lessthanORequal4) $selected = $step_3; //select set 3\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n else {\n debug(\"\\nStep 2 and Step 3 are different. Proceed with Step 4\\n\");\n $step_4 = self::get_step_1($ISVAT, $roots, $step_3, 4);\n if($step_3 == $step_4) {\n debug(\"\\nSteps 3 and 4 are identical.\\n\");\n if(count($step_4) <= $lessthanORequal4) $selected = $step_4; //select set 4\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n else {\n debug(\"\\nStep 3 and Step 4 are different. Proceed with Step 5\\n\");\n // exit(\"\\nConstruct Step 5\\n\");\n $step_5 = self::get_step_1($ISVAT, $roots, $step_4, 5);\n if($step_4 == $step_5) {\n debug(\"\\nSteps 4 and 5 are identical.\\n\");\n if(count($step_5) <= $lessthanORequal4) $selected = $step_5; //select set 5\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n else {\n debug(\"\\nStep 4 and Step 5 are different. Proceed with Step 6\\n\");\n // exit(\"\\nConstruct Step 6\\n\");\n $step_6 = self::get_step_1($ISVAT, $roots, $step_5, 6);\n if($step_5 == $step_6) {\n debug(\"\\nSteps 5 and 6 are identical.\\n\");\n if(count($step_6) <= $lessthanORequal4) $selected = $step_6; //select set 6\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n else {\n debug(\"\\nStep 5 and Step 6 are different. Proceed with Step 7\\n\");\n // exit(\"\\nConstruct Step 7\\n\");\n $step_7 = self::get_step_1($ISVAT, $roots, $step_6, 7);\n if($step_6 == $step_7) {\n debug(\"\\nSteps 6 and 7 are identical.\\n\");\n if(count($step_7) <= $lessthanORequal4) $selected = $step_7; //select set 7\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n elseif($step_5 == $step_7 && $step_4 == $step_6) {\n debug(\"\\nSteps 5 and 7 are identical; Steps 4 and 6 are identical.\\n\");\n if(count($step_7) <= $lessthanORequal4) $selected = $step_7; //select set 7\n else {\n debug(\"\\nSelect root ancestors\\n\");\n $selected = $roots;\n }\n }\n else {\n debug(\"\\nStep 6 and Step 7 are different. Proceed with Step 8\\n\");\n exit(\"\\nConstruct Step 8\\n\");\n }\n }\n }\n }\n }\n }\n }\n }\n //label PRM and REP if one record, REP if > 1\n $label = '';\n if (count($selected) == 1) $label = 'PRM and REP';\n elseif(count($selected) > 1) $label = 'REP';\n debug(\"\\n----- label as: [$label] [\".count($selected).\"]\\n\");\n $selected = array_values($selected); //reindex array\n \n $ret = array('Selected' => $selected, 'label' => $label);\n // if($type == 'basal values') $ret['recs'] = $recs; //if you want add 'recs' to the return value\n return $ret;\n /*\n if tips <= 5 SELECT ALL TIPS \n else\n GET SET_1\n if SET_1 <= 4 SELECT SET_1\n else \n GET SET_2\n if SET_2 <= 4 SELECT SET_2\n else\n GET SET_3\n if SET_2 == SET_3\n if SET_3 <= 4 SELECT SET_3\n else SELECT ROOT_ANCESTORS\n else CONTINUE PROCESS UNTIL all parents of the values in the set are roots, THEN IF <= 4 SELECT THAT SET else SELECT ROOT_ANCESTORS.\n\n if(WHAT IS SELECTED == 1) label as: 'PRM and REP'\n elseif(WHAT IS SELECTED > 1) label as: 'REP'\n\n So in our case: page_id: 7662 | predicate: [http://eol.org/schema/terms/Habitat]\n I will be creating new rocords based on 'ROOT_ANCESTORS'.\n */\n }", "title": "" }, { "docid": "f27f35705d2031da8f5a508356613cd5", "score": "0.431724", "text": "public function testExpression(){\n $helper = new ExpressionHelper(10004);\n $profitLossExpressionsMap = $helper->calculateRatios();\n echo $profitLossExpressionsMap;\n }", "title": "" }, { "docid": "22e8101c74963b801c4d8898437b0cd4", "score": "0.43157354", "text": "public function evaluate();", "title": "" }, { "docid": "7eec777df62f6b37c0960361df16fddf", "score": "0.4313665", "text": "function mutation_percent()\n{\necho<<<HTML\n <fieldset>\n <legend>Mutation Percent</legend>\n <div class='newslider' id='mutation-slider'></div>\n <br />\n Value: <input name='mutation-value' \n id='mutation-value'\n size='12'\n value='50' />\n Minimum: <input id=\"mutation-min\" \n size='12'\n disabled=\"disabled\" />\n Maximum: <input id=\"mutation-max\" \n size='12'\n disabled=\"disabled\" />\n </fieldset>\nHTML;\n}", "title": "" }, { "docid": "eae2da2c483cc1d0c84b272ae2275e9d", "score": "0.431334", "text": "private function defineVariables_est(){\n\n $this->hookVisit();\n if ($this->visit->getValue('v_type',1) == VISIT_TYPE_RENT){\n self::$pay_items['exp_living']['d'] = 'To be invoiced ';\n }\n \n foreach (self::$pay_items as $i=>$d){\n $descr = array($d['d'].' '.x('em','- paid'));\n $descr_est = array($d['d'].' '.x('em','- estimation'));\n $formula = $this->defaultPay($i,$returnFormula=True);\n\t\t\t \n $isRO = array($i.'_est');\n switch($i){\n case 'exp_travel':\n case 'exp_perdiem':\n\tif (!empty($formula)) $descr_est[] = x('em',$formula);\n\tbreak;\n case 'exp_living':\n\tif (strlen($formula) > 25) $formula = str_replace(') (',')<br/>(',$formula);\n\t$descr = array($d['d'].' '.x('em',$formula));\n\tbreak;\n case '_exp_totalExpenses':\n\t$isRO[] = $i;\n\t$this->colorCode[$i] = 'bold-text';\n\t$this->colorCode[\"${i}_est\"]= 'bold-text';\n\tbreak;\n default:\n }\n $this->defineVariable(array($i =>join('<br/>',$descr),\n\t\t\t\t $i.'_est'=>join('<br/>',$descr_est)),True);\n $this->defineTypes(array('isVITAL_ifADMIN' =>array($i),\n\t\t\t 'isRO' => $isRO,\n\t\t\t 'isMBE' => array($i,\n\t\t\t\t\t\t $i.'_est'),\n\t\t\t 'isMONEY'=> array($i,\n\t\t\t\t\t\t $i.'_est'),\t\t\t \n\t\t\t ));\n }\n }", "title": "" }, { "docid": "afc546889f9397468923d85d2b08958d", "score": "0.43114647", "text": "protected function calc_derived() {\n\t\t\n\t\t//iterate datapoints\n\t\tforeach ($this->datapoints as $label=> $datapoint) {\n\t\t\t\n\t\t\tif ($datapoint->type<>'derived') continue;\n\n\t\t\t//get derived value(s) via the specified method\n\t\t\t$data= $this->{$datapoint->method}($datapoint->argument); \n\t\t\t\n\t\t\t//store\n\t\t\tif (is_array($data)) $datapoint->set('periodic',$data);\n\t\t\telse $datapoint->set('day',$data);\n\t\t}\t\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e8dc55d36196afcec3ad03fd63c12591", "score": "0.43112108", "text": "function calc($operand1, $operand2, $operator)\n{\n $result=0;\n if($operator == '+'){\n $result = $operand1 + $operand2;\n }\n elseif($operator == '-'){\n $result = $operand1 - $operand2;\n }\n elseif($operator == '*'){\n $result = $operand1 * $operand2;\n }\n elseif($operator == '/'){\n $result = $operand1 / $operand2;\n }\n\n return $result;\n \n}", "title": "" }, { "docid": "224d3282956a5d57460574973f597099", "score": "0.43093193", "text": "function evenForest(int $t_nodes, int $t_edges,array $t_from, array $t_to) : int ///????\n{\n //\n\n}", "title": "" }, { "docid": "0fc84687db64438d908df246e0c8d23f", "score": "0.4302159", "text": "public function calculateArea()\n {\n //Implement calculateArea() method.\n }", "title": "" }, { "docid": "0fc84687db64438d908df246e0c8d23f", "score": "0.4302159", "text": "public function calculateArea()\n {\n //Implement calculateArea() method.\n }", "title": "" }, { "docid": "1693f2971d161b8bc1c30c08fd81d8f3", "score": "0.42960668", "text": "function crossover_percent()\n{\necho<<<HTML\n <fieldset>\n <legend>Crossover Percent</legend>\n <div class='newslider' id='crossover-slider'></div>\n <br />\n Value: <input name='crossover-value' \n id='crossover-value'\n size='12'\n value='50' />\n Minimum: <input id=\"crossover-min\" \n size='12'\n disabled=\"disabled\" />\n Maximum: <input id=\"crossover-max\" \n size='12'\n disabled=\"disabled\" />\n </fieldset>\nHTML;\n}", "title": "" }, { "docid": "9e99483f6ace73f11149540b48cbaf13", "score": "0.42868918", "text": "public function calculatePricePT()\n {\n//\t\tvar_dump($this->Price_pT_Base_override).\"<br>\";\n\t\tif(isset($this->Price_pT_Base_override) && $this->Price_pT_Base_override != \"\")\n\t\t\t{\n//\t\t\techo \"Price over ride<br>\";\n\t\t\t$this->Price_Sub_Total = $this->Price_pT_Base_override + $this->Price_production_pT + $this->Price_transport_pT;\t\n\t\t\t}\n\t\telse{\n\t\t\t//First calculate the price per ton, which is the sum of the ingedients->product price per tom\n\t \t\t$sum = 0;\n\t\t\tforeach($this->ingredients as $ingredientItem)\n\t\t\t\t{\n\t\t\t\t$sum += $ingredientItem->weightedCost;\n\t\t\t\t}\n\t\t\t$this->Price_pT_Base = $sum;\n\t\t\t$this->Price_Sub_Total = $this->Price_pT_Base + $this->Price_production_pT + $this->Price_transport_pT;\n\t\t}\n\t\t\n\n\t\t\n }", "title": "" }, { "docid": "8086b111fd0f5bde2cb649746c1abe9d", "score": "0.42831016", "text": "function calcul($params){\n\t\t$this->code .= $params['calcul'].'->'.$params['var'].\"\\n\";\n\t}", "title": "" }, { "docid": "6f532af694853846ca90d05ebb0f938e", "score": "0.42800993", "text": "protected function _create()\n\t{\n\t\t/* range */\n\n\t\t$min = $this->_range['min'];\n\t\t$max = $this->_range['max'];\n\n\t\t/* random numbers */\n\n\t\t$a = mt_rand($min + 1, $max);\n\t\t$b = mt_rand($min, $a - 1);\n\n\t\t/* operator */\n\n\t\t$c = $this->_getOperator();\n\t\t$operator = $this->_operators[$c];\n\n\t\t/* solution and task */\n\n\t\t$this->_solution = $a + $b * $c;\n\t\t$this->_task = l($a) . ' ' . l($operator) . ' ' . l($b);\n\t}", "title": "" }, { "docid": "bf664c8c70aad803dacd546a6bd9c3bc", "score": "0.42794895", "text": "public function cleanupCalculate() {\n\t\tif ( $this->attr_data->type == 'dollar'\n\t\t\t&& ! empty( $this->workArea()->largest_line_id ) \n\t\t\t) { \n\t\t\t$order = $this->engine->getOrderDiscount($this->discount_id);\n\t\t\t$us = \\Models\\DiscountEngine::price_round($this->__getEndSumShouldEqualAmount());\n\t\t\tif ( $order != $us ) {\n\t\t\t\t$this->engine->setLineDiscount(\n\t\t\t\t\t$this->workArea()->largest_line_id,\n\t\t\t\t\t$this->discount_id,\n\t\t\t\t\t\\Models\\DiscountEngine::price_round(\n\t\t\t\t\t\t$this->engine->getLineDiscount($this->workArea()->largest_line_id,$this->discount_id)\n\t\t\t\t\t\t+ ($us - $order)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f7811dba629bdcef58904adf05148787", "score": "0.42783716", "text": "public function getCalculation(): array\n {\n return $this->calculation;\n }", "title": "" }, { "docid": "8735e69f5c558452404d18f4ce9f1fa4", "score": "0.42768934", "text": "function _fourD_analysis_goal_nodeview(&$node){\n $node->analysis = _fourD_analysis_goal_analysis_summary($node);\n //$node->user_analysis = _fourD_analysis_add_user_analysis($node);\n $node->user_analysis = drupal_get_form('fourD_analysis_goal_analysis_inline_form', $node);\n}", "title": "" }, { "docid": "3b538fdddc286d4ba1f486d248acaf7a", "score": "0.42759567", "text": "function test_parent_basal_values($dbase, $debugModeYN = false)\n {\n /* this was manually done for now: Jun 9, 2019 - for ALL TRAIT EXPORT - readmeli.txt for more details\n INSERT INTO page_ids_Present SELECT DISTINCT t.page_id from SDR.traits_BV t WHERE t.predicate = 'http://eol.org/schema/terms/Present'\n INSERT INTO page_ids_Habitat SELECT DISTINCT t.page_id from SDR.traits_BV t WHERE t.predicate = 'http://eol.org/schema/terms/Habitat';\n INSERT INTO page_ids_FLOPO_0900032 SELECT DISTINCT t.page_id from SDR.traits_BV t WHERE t.predicate = 'http://purl.obolibrary.org/obo/FLOPO_0900032';\n */\n $this->dbname = 'traits_'.$dbase;\n // { folder test case is [2018 10 02 basal values parent]} ============================================================================================================\n self::initialize_basal_values(); \n /* this generates: $this->CSV_children_of --- Not needed here anymore since children comes form cache txt file.\n self::generate_children_of_taxa_using_parentsCSV();\n */\n // self::parse_DH(); //seems not needed here...?\n \n $input[] = array('page_id' => 7662, 'predicate' => \"http://eol.org/schema/terms/Habitat\"); //habitat includes -> orig test case\n $input[] = array('page_id' => 7673, 'predicate' => \"http://eol.org/schema/terms/Habitat\"); //habitat includes -> questioned by Jen, missing ref under biblio field\n $input[] = array('page_id' => 7665, 'predicate' => \"http://eol.org/schema/terms/Habitat\"); //habitat includes -> questioned by Jen, missing ref under biblio field\n $input[] = array('page_id' => 7666, 'predicate' => \"http://eol.org/schema/terms/Habitat\"); //habitat includes\n $input[] = array('page_id' => 7662, 'predicate' => \"http://eol.org/schema/terms/Present\"); //infinite loop\n $input[] = array('page_id' => 164, 'predicate' => \"http://eol.org/schema/terms/Present\"); //e.g. reached level 16. May need to extend more. LONG process.\n\n $input[] = array('page_id' => 46575784, 'predicate' => \"http://eol.org/schema/terms/Present\");\n\n\n $resource_id = 'test_parent_BV'; $WRITE = self::start_write2DwCA($resource_id, 'BV');\n $resource_id_consolid8 = 'test_parent_BV_consolid8'; self::start_write2DwCA_consolid8($resource_id_consolid8, 'BV');\n \n foreach($input as $i) {\n $page_id = $i['page_id']; $predicate = $i['predicate'];\n $this->original_nodes_parent = array(); //initialize for every 'parent basal values' process\n if($ret = self::main_parents_basal_values($page_id, $predicate, $debugModeYN)) {\n if($GLOBALS['ENV_DEBUG']) {echo \"\\nFinal (parent basal values): \"; print_r($ret);}\n $ret['page_id'] = $page_id; $ret['predicate'] = $predicate;\n self::write_resource_file_BasalValues($ret, $WRITE, 'parent');\n }\n }\n fclose($WRITE); self::end_write2DwCA();\n self::end_write2DwCA_consolid8();\n if($this->debug) {\n if($GLOBALS['ENV_DEBUG']) print_r($this->debug);\n }\n echo(\"\\n-- end method: parents: basal values --\\n\");\n // print_r($this->report_SampleSize);\n // print_r($this->report_SampleSize['http://www.wikidata.org/entity/Q106447']);\n // print_r($this->report_SampleSize['http://www.geonames.org/10861432']); exit;\n }", "title": "" }, { "docid": "3662565f7ee28d3a67e0085aeda1c5cb", "score": "0.42746544", "text": "public function calcResult() {\n\n $kq = 0;\n\n if ($this->myModel->getPheptinh() == '+') {\n $kq = $this->myModel->getSo1() + $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '-') {\n $kq = $this->myModel->getSo1() - $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '*') {\n $kq = $this->myModel->getSo1() * $this->myModel->getSo2();\n }\n\n if ($this->myModel->getPheptinh() == '/') {\n $kq = $this->myModel->getSo1() / $this->myModel->getSo2();\n }\n\n // Cập nhật lại vào Model\n $this->myModel->setKetqua($kq);\n\n }", "title": "" }, { "docid": "ab3f1c4e873734b47fbc2419e7cefb03", "score": "0.42724964", "text": "function euclides($tipoTurista, $precio, $tipoVisitas, $TipoTurismo){\n $resultado1 = 10000;\n $resultado2 = 10000;\n $resultado3 = 10000;\n $resultado4 = 10000;\n $resultado5 = 10000;\n\n // se realizan 5 variables para asignar los 5 destinos encontrados\n $destino1 = 0;\n $destino2 = 0;\n $destino3 = 0;\n $destino4 = 0;\n $destino5 = 0;\n\n $data['destinos'] = $this->lista_destinos();\n\n foreach ($data['destinos'] as $datosR) {\n $sumatoria = 0;\n\n //***************Algoritmo de Euclides******************\n $sumatoria= (pow($datosR['TN_tipo_turista'] - $tipoTurista, 2)) + (pow($datosR['TF_precio'] - $precio , 2)) + (pow($datosR['TN_tipo_visitas'] - $tipoVisitas, 2)) + (pow($datosR['TN_tipo_turismo'] - $TipoTurismo, 2));\n $distanciaAux=sqrt($sumatoria);\n //*******************************************************\n //if para comparar cual registro contiene una distancia menor de acuerdo a los datos ingresados y se ordena de mas a menos parecidas\n if ($distanciaAux < $resultado1) {\n $resultado5 = $resultado4;\n $resultado4 = $resultado3;\n $resultado3 = $resultado2;\n $resultado2 = $resultado1;\n $resultado1 = $distanciaAux;\n\n $destino5 = $destino4;\n $destino4 = $destino3;\n $destino3 = $destino2;\n $destino2 = $destino1;\n $destino1 = $datosR['TN_id_DT'];\n } else if ($distanciaAux < $resultado2) {\n $resultado5 = $resultado4;\n $resultado4 = $resultado3;\n $resultado3 = $resultado2;\n $resultado2 = $distanciaAux;\n\n $destino5 = $destino4;\n $destino4 = $destino3;\n $destino3 = $destino2;\n $destino2 = $datosR['TN_id_DT'];\n } else if ($distanciaAux < $resultado3) {\n $resultado5 = $resultado4;\n $resultado4 = $resultado3;\n $resultado3 = $distanciaAux;\n\n $destino5 = $destino4;\n $destino4 = $destino3;\n $destino3 = $datosR['TN_id_DT'];\n } else if ($distanciaAux < $resultado4) {\n $resultado5 = $resultado4;\n $resultado4 = $distanciaAux;\n\n $destino5 = $destino4;\n $destino4 = $datosR['TN_id_DT'];\n } else if ($distanciaAux < $resultado5) {\n $resultado5 = $distanciaAux;\n\n $destino5 = $datosR['TN_id_DT'];\n }\n }\n\n $rutasFiltradas = array(); //Array para cargar las 5 rutas mas parecidas a lo que el usuario ingresó\n\n $rutasFiltradas[0] = $destino1;\n $rutasFiltradas[1] = $destino2;\n $rutasFiltradas[2] = $destino3;\n $rutasFiltradas[3] = $destino4;\n $rutasFiltradas[4] = $destino5;\n\n return $rutasFiltradas;\n }", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.42720383", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.42720383", "text": "abstract public function rules();", "title": "" }, { "docid": "3d6a39f9c05aeb0da36433704514b039", "score": "0.4271009", "text": "private function Calculate()\n\t{\n\t\t$iPercentage = 0;\n\t\t\n\t\t//About ME\n\t\t$iPercentage+= $this->Calc_AboutMe_Section();\n\t\t\n\t\t//Career\n\t\t$iPercentage+= $this->Calc_Career_Section();\n\t\t\n\t\t//Religion\n\t\t$iPercentage+= $this->Calc_Religion_Section();\n\t\t\n\t\t//Family\n\t\t$iPercentage+= $this->Calc_Family_Section();\n\t\t\n\t\t//LifeStyle\n\t\t$iPercentage+= $this->Calc_LifeStyle_Section();\n\t\t\n\t\t//Hobbies \n\t\t$iPercentage+= $this->Calc_Hobbies_Section();\n\t\t\n //Basic \n $iPercentage+= $this->Calc_BasicDetails_Section();\n \n\t\t//Photo\n\t\t$iPercentage+= $this->Calc_Photo_Section();\n \n \n\t\t$this->m_iPercentage\t\t\t= $iPercentage;\n\t\t$this->m_bIsScoreCalculated\t\t= true;\n \n\t}", "title": "" }, { "docid": "092fdbd89307fbfea6da1c33699a0a3d", "score": "0.42646852", "text": "public function resElmJs()\n\t{\n\t\t$elements = '[';\n\t\t\n\t\t//loop through points\n\t\t$iter1 = 0;\n\t\tforeach ($this->xml->elements->element as $element) {\n\t\t\t$elements .= '{\"forces\":[';\n\t\t\t//loop through reaction dofs\n\t\t\t$iter2 = 0;\n\t\t\tforeach ($element->forces->dof as $dofId => $dof) {\n\t\t\t\t$elements .= '{\"id\":'.$dof['id'].', \"value\":'.$dof.'}';\n\t\t\t\t$elements .= ($iter2 != count($element->forces->dof)-1) ? ',' : '';\n\t\t\t\t$iter2++;\n\t\t\t}\n\t\t\t$elements .= '], \"disp\":[';\n\t\t\t//loop through displacement dofs\n\t\t\t$iter3 = 0;\n\t\t\tforeach ($element->displacements->dof as $dofId => $dof) {\n\t\t\t\t$elements .= '{\"id\":'.$dof['id'].', \"value\":'.$dof.'}';\n\t\t\t\t$elements .= ($iter3 != count($element->displacements->dof)-1) ? ',' : '';\n\t\t\t\t$iter3++;\n\t\t\t}\n\t\t\t$elements .= ']}';\n\t\t\t$elements .= ($iter1 != count($this->xml->elements->element)-1) ? ',' : '';\n\t\t\t$iter1++;\n\t\t}\n\t\t\t\n\t\t$elements .= ']';\n\t\t\n\t\treturn $elements;\n\t}", "title": "" }, { "docid": "0ce38072c30439739414b7f0ffcdf037", "score": "0.42626324", "text": "abstract protected function CalcularDatos();", "title": "" }, { "docid": "b8841c6d42458421460ced9a84fb3675", "score": "0.42616707", "text": "public function save() {\r\n// ADD BY TABARY Marc - 2017-06-06 - USE OR NOT ORGANIZATION BUDGETELEMENT\r\n if (Parameter::getGlobalParameter('useOrganizationBudgetElement')!=\"YES\") {\r\n return;\r\n } \r\n// END ADD BY TABARY Marc - 2017-06-06 - USE OR NOT ORGANIZATION BUDGETELEMENT \r\n // Update total budget\r\n $this->totalBudgetCost = $this->budgetCost + $this->expenseBudgetAmount;\r\n\r\n //$result=parent::save(); \r\n //return $result;\r\n \r\n // Get old element (stored in database) : must be fetched before saving\r\n $old=$this->getOld();\r\n\r\n // Update budget of parent organizations, if budget change\r\n if ($this->budgetWork !== $old->budgetWork or \r\n $this->budgetCost != $old->budgetCost or \r\n $this->expenseBudgetAmount !== $old->expenseBudgetAmount) {\r\n\r\n // Get Parent organization of BudgetElement\r\n $parentOrga = $this->getOrganizationParent();\r\n // If exists\r\n if ($parentOrga != null and $parentOrga->id) {\r\n // Calculate new budgets for parent organization\r\n $diffBudgetWork = $this->budgetWork - $old->budgetWork;\r\n $diffBudgetCost = $this->budgetCost - $old->budgetCost;\r\n $diffBudgetExpenseAmount = $this->expenseBudgetAmount - $old->expenseBudgetAmount;\r\n $diffTotalBudgetCost = $diffBudgetCost + $diffBudgetExpenseAmount;\r\n \r\n $bec=$parentOrga->OrganizationBudgetElementCurrent;\r\n// $old=$bec;\r\n \r\n $bec->budgetWork+=$diffBudgetWork;\r\n $bec->budgetCost+=$diffBudgetCost;\r\n $bec->expenseBudgetAmount+=$diffBudgetExpenseAmount;\r\n $bec->totalBudgetCost+=$diffTotalBudgetCost;\r\n \r\n $bec->save();\r\n // Get Parent of parent\r\n $parentOrga = $bec->getOrganizationParent();\r\n}\r\n }\r\n \r\n $result=parent::save(); \r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "19e08aed3e23aa1cab3d5daaeb942607", "score": "0.42599788", "text": "public function calculate(Valuable $value);", "title": "" } ]
de830d1ec5f0031beb8dfbf806eae874
/ embedDataSet($tab, $name, $dataSet, $size, $isfirst, $islast) Embeds a dataset as a javascript array. Works with both associative normal php arrays containing associative arrays. Multiple datasets can be merged into a single javascript var list by manipulating the $isfirst, $islast parameters. Otherwise datasets that embedded as standalone objects must be accompanied by TRUE for both parameters. Params: $tab Tab whitespace; prepended to all echoes $name The (variable) name of the javascript array $dataSet The data to embed; can be normal or associative array $size The size of the dataset $isfirst Boolean; indicates whether the dataset will be the first variable in a var list. $islast Boolean; indicates whether the dataset will be the last variable in a var list.
[ { "docid": "c5566d70bd30e0208218f01f2e7daddd", "score": "0.76576775", "text": "protected function embedDataSet($tab, $name, $dataSet, $isfirst, $islast) {\n\t\t// Test if dataset is associative array, if not then assume list of associative\n\t\t// Get size of dataset\n\t\t$isAssoc = $this->isAssociative($dataSet);\n\t\t$size = count($dataSet);\n\t\n\t\t// Define variable\n\t\tif ($isfirst)\n\t\t\techo $tab . \"var \"; // If first in list then start var list\n\t\telse\n\t\t\techo $tab . ' '; // Otherwise indent to keep aligned with rest of variable list\n\t\techo \"$name = \";\n\t\tif ($isAssoc)\n\t\t\techo \"{\\n\";\n\t\telse\n\t\t\techo \"[\\n\";\n\t\n\t\tif ($isAssoc) {\n\t\t\t// Embed data as associative list\n\t\t\t$count = 1;\n\t\t\tforeach ($dataSet as $field => $value) {\n\t\t\t\t$out = \"'$field': \";\n\t\t\n\t\t\t\t// Weed out missing values, replace with javascript null object\n\t\t\t\tif ($value !== NULL)\n\t\t\t\t\t$out .= \"'$value'\";\n\t\t\t\telse\n\t\t\t\t\t$out .= 'null';\n\t\n\t\t\t\t$out .= ($count++ < $size) ? \",\\n\" : \"\\n\";\n\t\n\t\t\t\t// Output array object string\n\t\t\t\techo $tab;\n\t\t\t\tif ($isfirst && $islast) { // If single entry then indent for single-entry list\n\t\t\t\t\techo ' ';\n\t\t\t\t} else // Otherwise indent normally\n\t\t\t\t\techo ' ';\n\t\t\t\techo $out;\n\t\t\t}\n\t\t} else {\n\t\t\t// Embed data as list of associative sub-arrays\n\t\t\tfor ($i = 1; $i <= $size; $i++) {\n\t\t\t\t$subSet = $dataSet[$i - 1];\n\t\t\t\t$subSize = count($subSet);\n\n\t\t\t\t// Build associative sub-array\n\t\t\t\t$out = '{ ';\n\t\t\t\t$colCount = 1;\n\t\t\t\tforeach ($subSet as $field => $value) {\n\t\t\t\t\t$out .= \"'$field': \";\n\t\n\t\t\t\t\t// Weed out missing values, replace with javascript null object\n\t\t\t\t\tif ($value !== NULL)\n\t\t\t\t\t\t$out .= \"'$value'\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$out .= 'null';\n\t\t\t\t\t$out .= ($colCount++ < $subSize) ? ', ' : '';\n\t\t\t\t}\n\t\t\t\t$out .= ' }';\n\t\t\t\t$out .= ($i < $size) ? \",\\n\" : \"\\n\";\n\t\n\t\t\t\t// Output array object string\n\t\t\t\techo $tab;\n\t\t\t\tif ($isfirst && $islast)\n\t\t\t\t\techo ' ';\n\t\t\t\telse\n\t\t\t\t\techo ' ';\n\t\t\t\techo $out;\n\t\t\t}\n\t\t}\n\t\n\t\t// Close out variable definition\n\t\tif ($isfirst && $islast) {\n\t\t\techo $tab;\n\t\t\tif ($isAssoc)\n\t\t\t\techo \"};\\n\";\n\t\t\telse\n\t\t\t\techo \"];\\n\";\n\t\t} else {\n\t\t\techo $tab . \" \";\n\t\t\tif ($isAssoc)\n\t\t\t\techo \"}\";\n\t\t\telse\n\t\t\t\techo \"]\";\n\n\t\t\tif ($islast) {\n\t\t\t\techo \";\\n\";\n\t\t\t} else {\n\t\t\t\techo \",\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "322cb84a31485d544df4326eae5d4c53", "score": "0.50302726", "text": "function jsTableData($data, $id) {\n\t\t\n\t\t//Add in the dataurl.\n\t\t$data['dataUrl'] = $this->Html->url('', true) . '/';\n\n\t\t$prefix = 'YAHOO.namespace(\"Plank.bb.datatable\").'.$id.' = ';\n\t\t$postfix = ' ;';\n\t\t$out = $this->Javascript->object($data, \n\t\t\tarray('block'=>true, 'prefix'=>$prefix, 'postfix'=>$postfix)\n\t\t);\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "ceb6e276f2b361cb26147e628e63f705", "score": "0.5015045", "text": "public static function json_js($data)\n {\n// https://datatables.net/examples/data_sources/js_array.html\n\n $titles = [];\n $dataSets = [];\n foreach ($data as $rom) {\n $title = [];\n $dataSet = [];\n foreach ($rom as $t => $d) {\n $title[] = [\"title\" => $t];\n $dataSet[] = $d;\n }\n $titles = $title;\n $dataSets[] = $dataSet;\n }\n\n /// datatable js setdatapar (titles ... and dataset ....)\n return self::json([\"titles\" => $titles, \"dataSet\" => $dataSets]);\n }", "title": "" }, { "docid": "79a7c02d9e1c14d9754bf332906d9e45", "score": "0.4935945", "text": "function plot_it ($atts) {\n foreach ($atts as $key => $value) {\n if ($key== 'id') {\n $post = get_post($value);\n return \"<div class='ZingChart' id='chartDiv\".$value.\"'></div>\n <script type='text/javascript'>\n var chartData\".$value.\"= \".(get_post_meta($value,'zing_javascript_content',true) != ''?get_post_meta($value,'zing_javascript_content',true) : 0).\";\n window.addEventListener('load',draw_chart\".$value.\" () ,false);\n function draw_chart\".$value.\" () {\n zingchart.render({\n id:'chartDiv\".$value.\"',\n height:400,\n width:600,\n data:chartData\".$value.\"\n });\n }\n </script> \";\n \n }\n }\n}", "title": "" }, { "docid": "59df6be4d3521e589f4ca55ed0880b03", "score": "0.48830843", "text": "function InsertChart($type, $data_url, $override=null, $transparent=true, $base_url='') {\n\t$base_url = preg_replace('~^https{0,1}:\\/\\/.*?/~', '/', $base_url);\n\n\t$settings = \"escape(\\\"{$base_url}functions/amcharts/{$type}_defaults.php\";\n\tif ($override != null) {\n\t\tif (is_array($override)) {\n\t\t\t$parameters = array();\n\t\t\t$settings .= '?';\n\t\t\tforeach ($override as $key => $val) {\n\t\t\t\t$parameters[] = urlencode($key) . \"=\" . urlencode($val);\n\t\t\t}\n\t\t\t$settings .= implode('&',$parameters);\n\t\t} else {\n\t\t\t$settings .= \"$override\";\n\t\t}\n\t}\n\t$settings .= '\")';\n\n\t$id = md5(uniqid('_'));\n\n\t$data_url .= \"&\" . rand(100000,999999);\n\n\t$return = <<<EOF\n\t<span class=\"statistics_chart\">\n\t<script type=\"text/javascript\" src=\"{$base_url}functions/amcharts/am{$type}/swfobject.js\"></script>\n\t\t<div id=\"flashcontent{$id}\">\n\t\t\t<p class=\"Text\">You need to upgrade your Flash Player to view charts. <a href=\"http://www.adobe.com/go/getflash/\">Click here to upgrade</a>.</p>\n\t\t</div>\n\n\t\t<script type=\"text/javascript\">\n\t\t\t// <![CDATA[\n\t\t\tvar so = new SWFObject(\"{$base_url}functions/amcharts/am{$type}/am{$type}.swf\", \"am{$type}{$id}\", \"100%\", \"300\", \"8\", \"#FFFFFF\");\n\t\t\tso.addVariable('chart_id','{$id}');\n\t\t\tso.addParam(\"wmode\", \"transparent\");\n\t\t\tso.addVariable(\"path\", \"{$base_url}functions/amcharts/\");\n\t\t\tso.addVariable(\"settings_file\", $settings );\n\t\t\tso.addVariable(\"data_file\", escape(\"$data_url\"));\n\t\t\tso.addVariable(\"preloader_color\", \"#999999\");\n\t\t\tso.write(\"flashcontent{$id}\");\n\t\t\t// ]]>\n\t\t</script>\n\t</span>\nEOF;\n\n\treturn $return;\n}", "title": "" }, { "docid": "4486e7f979f96fd2be7caa5a481fc006", "score": "0.48636955", "text": "public function setDataSet($value)\n {\n return $this->setParameter('dataSet', $value);\n }", "title": "" }, { "docid": "3b430c82beb5482a4c7c00ccb255537c", "score": "0.4781205", "text": "public function runLoad($tabSize = 'medium' )\n {\n\n $user = $this->getUser();\n $view = $this->getView();\n $httpRequest = $this->getRequest();\n\n $tabId = $httpRequest->param( 'target',Validator::CKEY );\n $size = $httpRequest->data( 'size',Validator::CNAME );\n\n $chartType = $httpRequest->data( 'graph',Validator::CNAME );\n $entityKey = $httpRequest->data( 'entity',Validator::CNAME );\n $startDate = $httpRequest->data( 'start',Validator::DATE );\n\n $width = $httpRequest->param( 'width',Validator::INT );\n $height = $httpRequest->param( 'height',Validator::INT );\n\n $json = $this->load($entityKey, $startDate);\n\n\n if (!$width || !$height) {\n $width = $this->width;\n $height = $this->height;\n }\n\n $boxWidth = $width - 122;\n\n $code = <<<HTML\n <div class=\"wcm wcm_chart_{$chartType}\" id=\"{$tabId}_graph\" style=\"width:{$width}px;height:{$height}px;\" >\n <var class=\"data\" >{$json}</var>\n <div style=\"width:120px;float:left;\" >\n <ul class=\"legend\" id=\"{$tabId}_menu\" ></ul>\n </div>\n <div class=\"content inline\" id=\"{$tabId}_container\" style=\"width:{$boxWidth}px;height:{$height}px;\" >\n </div>\n </div>\nHTML;\n\n $view->newArea(\n '#'.$tabId.'_graph',\n array(\n 'replace',\n $code\n )\n );\n\n }", "title": "" }, { "docid": "293f6ee084bf6b74e29ac41e0ede9b1b", "score": "0.46801648", "text": "function data_for_js($var_name, $var_data) {\n global $CFG;\n\n // remove break lines\n $var_data = str_replace(\"\\r\", \"\", $var_data);\n $var_data = str_replace(\"\\n\", \"\", $var_data);\n $var_data = str_replace(\"\\t\", \"\", $var_data);\n\n // add slashes were needed\n $var_data = str_replace(\"'\", \"\\'\", $var_data);\n echo \"<script type='text/javascript'>\\n//<![CDATA[\\n\";\n\n if (!strpos($var_name, '.')) {\n echo 'var ';\n }\n echo $var_name.\" = \".json_encode($var_data).\"; \\n//]]>\\n</script>\";\n\n }", "title": "" }, { "docid": "995fe843c9e7ca3462da9196dc2de2b1", "score": "0.46504357", "text": "public function dataSet($dataSet) {\n $this->dataSet = $dataSet;\n return $this;\n }", "title": "" }, { "docid": "97fe0a7fb68202a716cf100b26cc2df5", "score": "0.464573", "text": "public function add_data_sets( $chart_args ) {\n\t\t// When Chart.js encounters an empty data value it stops so we set them to NULL\n\t\t$data_array = array_map( array( $this, 'fix_null_values' ), m_chart()->parse()->set_data );\n\n\t\tif (\n\t\t\t 'pie' == $this->post_meta['type']\n\t\t\t|| 'doughnut' == $chart_args['type']\n\t\t\t|| 'polar' == $this->post_meta['type']\n\t\t\t|| 'both' != m_chart()->parse()->value_labels_position\n \t\t\t&& (\n \t\t\t\t 'scatter' != $this->post_meta['type']\n \t\t\t\t&& 'bubble' != $this->post_meta['type']\n\t\t\t\t&& 'radar' != $this->post_meta['type']\n\t\t\t\t&& 'radar-area' != $this->post_meta['type']\n \t\t\t)\n\t\t) {\n\t\t\tforeach ( $chart_args['data']['labels'] as $key => $label ) {\n\t\t\t\tif ( isset( $data_array[ $key ] ) ) {\n\t\t\t\t\t$chart_args['data']['datasets'][0]['data'][] = $data_array[ $key ];\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (\n\t\t\t 'radar' == $this->post_meta['type']\n\t\t\t|| 'radar-area' == $this->post_meta['type']\n\t\t) {\n\t\t\t$set_names = $this->post_meta['set_names'];\n\n\t\t\tforeach ( $this->post_meta['data']['sets'] as $key => $data ) {\n\t\t\t\t$parse = m_chart()->parse()->parse_data( $data, $this->post_meta['parse_in'] );\n\n\t\t\t\t$data_array = array_map( array( $this, 'fix_null_values' ), $parse->set_data );\n\n\t\t\t\t$chart_args['data']['datasets'][ $key ] = array(\n\t\t\t\t\t'label' => isset( $set_names[ $key ] ) ? $set_names[ $key ] : 'Sheet 1',\n\t\t\t\t\t'data' => $data_array,\n\t\t\t\t);\n\t\t\t}\n\t\t} elseif ( 'scatter' == $this->post_meta['type'] ) {\n\t\t\t$set_names = $this->post_meta['set_names'];\n\n\t\t\tforeach ( $this->post_meta['data']['sets'] as $key => $data ) {\n\t\t\t\t$parse = m_chart()->parse()->parse_data( $data, $this->post_meta['parse_in'] );\n\n\t\t\t\t$data_array = array_map( array( $this, 'fix_null_values' ), $parse->set_data );\n\n\t\t\t\t$new_data_array = array();\n\n\t\t\t\t$label_key = ( $this->post_meta['parse_in'] == 'rows' ) ? 'first_column' : 'first_row';\n\n\t\t\t\tif ( 'both' == $parse->value_labels_position ) {\n\t\t\t\t\tforeach ( $data_array as $data_key => $data ) {\n\t\t\t\t\t\t$new_data_array[] = array(\n\t\t\t\t\t\t\t'x' => $data[0],\n\t\t\t\t\t\t\t'y' => $data[1],\n\t\t\t\t\t\t\t'label' => $parse->value_labels[ $label_key ][ $data_key ],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tforeach ( $data_array as $data_key => $data ) {\n\t\t\t\t\t\tif ( $data_key % 2 ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$new_data_array[] = array(\n\t\t\t\t\t\t\t'x' => $data,\n\t\t\t\t\t\t\t'y' => $data_array[ $data_key + 1 ],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$chart_args['data']['datasets'][ $key ] = array(\n\t\t\t\t\t'label' => isset( $set_names[ $key ] ) ? $set_names[ $key ] : 'Sheet 1',\n\t\t\t\t\t'data' => $new_data_array,\n\t\t\t\t);\n\t\t\t}\n\t\t} elseif ( 'bubble' == $this->post_meta['type'] ) {\n\t\t\t$set_names = $this->post_meta['set_names'];\n\n\t\t\tforeach ( $this->post_meta['data']['sets'] as $key => $data ) {\n\t\t\t\t$parse = m_chart()->parse()->parse_data( $data, $this->post_meta['parse_in'] );\n\n\t\t\t\t$data_array = array_map( array( $this, 'fix_null_values' ), $parse->set_data );\n\n\t\t\t\t$new_data_array = array();\n\n\t\t\t\t$label_key = ( $this->post_meta['parse_in'] == 'rows' ) ? 'first_column' : 'first_row';\n\n\t\t\t\tif ( 'both' == $parse->value_labels_position ) {\n\t\t\t\t\tforeach ( $data_array as $data_key => $data ) {\n\t\t\t\t\t\t$new_data_array[] = array(\n\t\t\t\t\t\t\t'x' => $data[0],\n\t\t\t\t\t\t\t'y' => $data[1],\n\t\t\t\t\t\t\t'r' => $data[2],\n\t\t\t\t\t\t\t'label' => $parse->value_labels[ $label_key ][ $data_key ],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tforeach ( $data_array as $data_key => $data ) {\n\t\t\t\t\t\tif ( $data_key % 2 ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$new_data_array[] = array(\n\t\t\t\t\t\t\t'x' => $data,\n\t\t\t\t\t\t\t'y' => $data_array[ $data_key + 1 ],\n\t\t\t\t\t\t\t'r' => $data_array[ $data_key + 2 ],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$chart_args['data']['datasets'][ $key ] = array(\n\t\t\t\t\t'label' => isset( $set_names[ $key ] ) ? $set_names[ $key ] : 'Sheet 1',\n\t\t\t\t\t'data' => $new_data_array,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t$set_data = array();\n\n\t\t\t$label_key = ( $this->post_meta['parse_in'] == 'rows' ) ? 'first_column' : 'first_row';\n\n\t\t\tforeach ( $data_array as $key => $data_chunk ) {\n\t\t\t\t$set_data[ $key ] = array(\n\t\t\t\t\t'label' => m_chart()->parse()->value_labels[ $label_key ][ $key ],\n\t\t\t\t\t'data' => array(),\n\t\t\t\t);\n\n\t\t\t\tif ( is_array( $data_chunk ) ) {\n\t\t\t\t\tforeach ( $data_chunk as $data ) {\n\t\t\t\t\t\t$set_data[ $key ]['data'][] = $data;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$set_data[ $key ]['data'] = [];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$chart_args['data']['datasets'] = $set_data;\n\t\t}\n\n\t\treturn $chart_args;\n\t}", "title": "" }, { "docid": "99c8846cd14df86a7239188d29e11126", "score": "0.46455684", "text": "public function dataTableAction(){\n\t\n // Zend_Debug::dump($q_1);\n\t\t\n\t\t/* foreach($sessions as $session){\n\t\t\t$row[] = \"test\";\n\t\t\n\t\t\t$row[] = \"test2\";\n\t\t\t$row[] = \"test3\";\n\t\t\t$output['aaData'][] = $row;\n\t\t\t$row = array();\n\t\t}\n\t\techo json_encode( $output ); */\n\t\t\n\t}", "title": "" }, { "docid": "cb71ca04c0213d15a00f01ebcce90ef6", "score": "0.4607927", "text": "function xp_dataset_add_datasets_on_load() {\n\n\t$countries = get_page_by_title( 'Countries With Abbreviation', 'OBJECT', 'xp_dataset_dataset');\n\n\tif (! $countries ) {\n\n\t\t$args = array('post_title' => 'Countries With Abbreviation', 'post_type' => 'xp_dataset_dataset', 'post_status' => 'publish');\n\n\t\t$post_id = wp_insert_post( $args );\n\n\t\t\n\t\t$countries = array(\n\n\t\t\tarray( 'value' => 'AF', 'text' => 'Afghanistan'),\n\t\t\tarray( 'value' => 'AX', 'text' => 'Aland Islands'),\n\t\t\tarray( 'value' => 'AL', 'text' => 'Albania'),\n\t\t\tarray( 'value' => 'DZ', 'text' => 'Algeria'),\n\t\t\tarray( 'value' => 'AS', 'text' => 'American Samoa'),\n\t\t\tarray( 'value' => 'AD', 'text' => 'Andorra'),\n\t\t\tarray( 'value' => 'AO', 'text' => 'Angola'),\n\t\t\tarray( 'value' => 'AI', 'text' => 'Anguilla'),\n\t\t\tarray( 'value' => 'AQ', 'text' => 'Antarctica'),\n\t\t\tarray( 'value' => 'AG', 'text' => 'Antigua And Barbuda'),\n\t\t\tarray( 'value' => 'AR', 'text' => 'Argentina'),\n\t\t\tarray( 'value' => 'AM', 'text' => 'Armenia'),\n\t\t\tarray( 'value' => 'AW', 'text' => 'Aruba'),\n\t\t\tarray( 'value' => 'AU', 'text' => 'Australia'),\n\t\t\tarray( 'value' => 'AT', 'text' => 'Austria'),\n\t\t\tarray( 'value' => 'AZ', 'text' => 'Azerbaijan'),\n\t\t\tarray( 'value' => 'BS', 'text' => 'Bahamas'),\n\t\t\tarray( 'value' => 'BH', 'text' => 'Bahrain'),\n\t\t\tarray( 'value' => 'BD', 'text' => 'Bangladesh'),\n\t\t\tarray( 'value' => 'BB', 'text' => 'Barbados'),\n\t\t\tarray( 'value' => 'BY', 'text' => 'Belarus'),\n\t\t\tarray( 'value' => 'BE', 'text' => 'Belgium'),\n\t\t\tarray( 'value' => 'BZ', 'text' => 'Belize'),\n\t\t\tarray( 'value' => 'BJ', 'text' => 'Benin'),\n\t\t\tarray( 'value' => 'BM', 'text' => 'Bermuda'),\n\t\t\tarray( 'value' => 'BT', 'text' => 'Bhutan'),\n\t\t\tarray( 'value' => 'BO', 'text' => 'Bolivia'),\n\t\t\tarray( 'value' => 'BA', 'text' => 'Bosnia And Herzegovina'),\n\t\t\tarray( 'value' => 'BW', 'text' => 'Botswana'),\n\t\t\tarray( 'value' => 'BV', 'text' => 'Bouvet Island'),\n\t\t\tarray( 'value' => 'BR', 'text' => 'Brazil'),\n\t\t\tarray( 'value' => 'IO', 'text' => 'British Indian Ocean Territory'),\n\t\t\tarray( 'value' => 'BN', 'text' => 'Brunei Darussalam'),\n\t\t\tarray( 'value' => 'BG', 'text' => 'Bulgaria'),\n\t\t\tarray( 'value' => 'BF', 'text' => 'Burkina Faso'),\n\t\t\tarray( 'value' => 'BI', 'text' => 'Burundi'),\n\t\t\tarray( 'value' => 'KH', 'text' => 'Cambodia'),\n\t\t\tarray( 'value' => 'CM', 'text' => 'Cameroon'),\n\t\t\tarray( 'value' => 'CA', 'text' => 'Canada'),\n\t\t\tarray( 'value' => 'CV', 'text' => 'Cape Verde'),\n\t\t\tarray( 'value' => 'KY', 'text' => 'Cayman Islands'),\n\t\t\tarray( 'value' => 'CF', 'text' => 'Central African Republic'),\n\t\t\tarray( 'value' => 'TD', 'text' => 'Chad'),\n\t\t\tarray( 'value' => 'CL', 'text' => 'Chile'),\n\t\t\tarray( 'value' => 'CN', 'text' => 'China'),\n\t\t\tarray( 'value' => 'CX', 'text' => 'Christmas Island'),\n\t\t\tarray( 'value' => 'CC', 'text' => 'Cocos (Keeling) Islands'),\n\t\t\tarray( 'value' => 'CO', 'text' => 'Colombia'),\n\t\t\tarray( 'value' => 'KM', 'text' => 'Comoros'),\n\t\t\tarray( 'value' => 'CG', 'text' => 'Congo'),\n\t\t\tarray( 'value' => 'CD', 'text' => 'Congo, Democratic Republic'),\n\t\t\tarray( 'value' => 'CK', 'text' => 'Cook Islands'),\n\t\t\tarray( 'value' => 'CR', 'text' => 'Costa Rica'),\n\t\t\tarray( 'value' => 'CI', 'text' => 'Cote D\\'Ivoire'),\n\t\t\tarray( 'value' => 'HR', 'text' => 'Croatia'),\n\t\t\tarray( 'value' => 'CU', 'text' => 'Cuba'),\n\t\t\tarray( 'value' => 'CY', 'text' => 'Cyprus'),\n\t\t\tarray( 'value' => 'CZ', 'text' => 'Czech Republic'),\n\t\t\tarray( 'value' => 'DK', 'text' => 'Denmark'),\n\t\t\tarray( 'value' => 'DJ', 'text' => 'Djibouti'),\n\t\t\tarray( 'value' => 'DM', 'text' => 'Dominica'),\n\t\t\tarray( 'value' => 'DO', 'text' => 'Dominican Republic'),\n\t\t\tarray( 'value' => 'EC', 'text' => 'Ecuador'),\n\t\t\tarray( 'value' => 'EG', 'text' => 'Egypt'),\n\t\t\tarray( 'value' => 'SV', 'text' => 'El Salvador'),\n\t\t\tarray( 'value' => 'GQ', 'text' => 'Equatorial Guinea'),\n\t\t\tarray( 'value' => 'ER', 'text' => 'Eritrea'),\n\t\t\tarray( 'value' => 'EE', 'text' => 'Estonia'),\n\t\t\tarray( 'value' => 'ET', 'text' => 'Ethiopia'),\n\t\t\tarray( 'value' => 'FK', 'text' => 'Falkland Islands (Malvinas)'),\n\t\t\tarray( 'value' => 'FO', 'text' => 'Faroe Islands'),\n\t\t\tarray( 'value' => 'FJ', 'text' => 'Fiji'),\n\t\t\tarray( 'value' => 'FI', 'text' => 'Finland'),\n\t\t\tarray( 'value' => 'FR', 'text' => 'France'),\n\t\t\tarray( 'value' => 'GF', 'text' => 'French Guiana'),\n\t\t\tarray( 'value' => 'PF', 'text' => 'French Polynesia'),\n\t\t\tarray( 'value' => 'TF', 'text' => 'French Southern Territories'),\n\t\t\tarray( 'value' => 'GA', 'text' => 'Gabon'),\n\t\t\tarray( 'value' => 'GM', 'text' => 'Gambia'),\n\t\t\tarray( 'value' => 'GE', 'text' => 'Georgia'),\n\t\t\tarray( 'value' => 'DE', 'text' => 'Germany'),\n\t\t\tarray( 'value' => 'GH', 'text' => 'Ghana'),\n\t\t\tarray( 'value' => 'GI', 'text' => 'Gibraltar'),\n\t\t\tarray( 'value' => 'GR', 'text' => 'Greece'),\n\t\t\tarray( 'value' => 'GL', 'text' => 'Greenland'),\n\t\t\tarray( 'value' => 'GD', 'text' => 'Grenada'),\n\t\t\tarray( 'value' => 'GP', 'text' => 'Guadeloupe'),\n\t\t\tarray( 'value' => 'GU', 'text' => 'Guam'),\n\t\t\tarray( 'value' => 'GT', 'text' => 'Guatemala'),\n\t\t\tarray( 'value' => 'GG', 'text' => 'Guernsey'),\n\t\t\tarray( 'value' => 'GN', 'text' => 'Guinea'),\n\t\t\tarray( 'value' => 'GW', 'text' => 'Guinea-Bissau'),\n\t\t\tarray( 'value' => 'GY', 'text' => 'Guyana'),\n\t\t\tarray( 'value' => 'HT', 'text' => 'Haiti'),\n\t\t\tarray( 'value' => 'HM', 'text' => 'Heard Island & Mcdonald Islands'),\n\t\t\tarray( 'value' => 'VA', 'text' => 'Holy See (Vatican City State)'),\n\t\t\tarray( 'value' => 'HN', 'text' => 'Honduras'),\n\t\t\tarray( 'value' => 'HK', 'text' => 'Hong Kong'),\n\t\t\tarray( 'value' => 'HU', 'text' => 'Hungary'),\n\t\t\tarray( 'value' => 'IS', 'text' => 'Iceland'),\n\t\t\tarray( 'value' => 'IN', 'text' => 'India'),\n\t\t\tarray( 'value' => 'ID', 'text' => 'Indonesia'),\n\t\t\tarray( 'value' => 'IR', 'text' => 'Iran, Islamic Republic Of'),\n\t\t\tarray( 'value' => 'IQ', 'text' => 'Iraq'),\n\t\t\tarray( 'value' => 'IE', 'text' => 'Ireland'),\n\t\t\tarray( 'value' => 'IM', 'text' => 'Isle Of Man'),\n\t\t\tarray( 'value' => 'IL', 'text' => 'Israel'),\n\t\t\tarray( 'value' => 'IT', 'text' => 'Italy'),\n\t\t\tarray( 'value' => 'JM', 'text' => 'Jamaica'),\n\t\t\tarray( 'value' => 'JP', 'text' => 'Japan'),\n\t\t\tarray( 'value' => 'JE', 'text' => 'Jersey'),\n\t\t\tarray( 'value' => 'JO', 'text' => 'Jordan'),\n\t\t\tarray( 'value' => 'KZ', 'text' => 'Kazakhstan'),\n\t\t\tarray( 'value' => 'KE', 'text' => 'Kenya'),\n\t\t\tarray( 'value' => 'KI', 'text' => 'Kiribati'),\n\t\t\tarray( 'value' => 'KR', 'text' => 'Korea'),\n\t\t\tarray( 'value' => 'KW', 'text' => 'Kuwait'),\n\t\t\tarray( 'value' => 'KG', 'text' => 'Kyrgyzstan'),\n\t\t\tarray( 'value' => 'LA', 'text' => 'Lao People\\'s Democratic Republic'),\n\t\t\tarray( 'value' => 'LV', 'text' => 'Latvia'),\n\t\t\tarray( 'value' => 'LB', 'text' => 'Lebanon'),\n\t\t\tarray( 'value' => 'LS', 'text' => 'Lesotho'),\n\t\t\tarray( 'value' => 'LR', 'text' => 'Liberia'),\n\t\t\tarray( 'value' => 'LY', 'text' => 'Libyan Arab Jamahiriya'),\n\t\t\tarray( 'value' => 'LI', 'text' => 'Liechtenstein'),\n\t\t\tarray( 'value' => 'LT', 'text' => 'Lithuania'),\n\t\t\tarray( 'value' => 'LU', 'text' => 'Luxembourg'),\n\t\t\tarray( 'value' => 'MO', 'text' => 'Macao'),\n\t\t\tarray( 'value' => 'MK', 'text' => 'Macedonia'),\n\t\t\tarray( 'value' => 'MG', 'text' => 'Madagascar'),\n\t\t\tarray( 'value' => 'MW', 'text' => 'Malawi'),\n\t\t\tarray( 'value' => 'MY', 'text' => 'Malaysia'),\n\t\t\tarray( 'value' => 'MV', 'text' => 'Maldives'),\n\t\t\tarray( 'value' => 'ML', 'text' => 'Mali'),\n\t\t\tarray( 'value' => 'MT', 'text' => 'Malta'),\n\t\t\tarray( 'value' => 'MH', 'text' => 'Marshall Islands'),\n\t\t\tarray( 'value' => 'MQ', 'text' => 'Martinique'),\n\t\t\tarray( 'value' => 'MR', 'text' => 'Mauritania'),\n\t\t\tarray( 'value' => 'MU', 'text' => 'Mauritius'),\n\t\t\tarray( 'value' => 'YT', 'text' => 'Mayotte'),\n\t\t\tarray( 'value' => 'MX', 'text' => 'Mexico'),\n\t\t\tarray( 'value' => 'FM', 'text' => 'Micronesia, Federated States Of'),\n\t\t\tarray( 'value' => 'MD', 'text' => 'Moldova'),\n\t\t\tarray( 'value' => 'MC', 'text' => 'Monaco'),\n\t\t\tarray( 'value' => 'MN', 'text' => 'Mongolia'),\n\t\t\tarray( 'value' => 'ME', 'text' => 'Montenegro'),\n\t\t\tarray( 'value' => 'MS', 'text' => 'Montserrat'),\n\t\t\tarray( 'value' => 'MA', 'text' => 'Morocco'),\n\t\t\tarray( 'value' => 'MZ', 'text' => 'Mozambique'),\n\t\t\tarray( 'value' => 'MM', 'text' => 'Myanmar'),\n\t\t\tarray( 'value' => 'NA', 'text' => 'Namibia'),\n\t\t\tarray( 'value' => 'NR', 'text' => 'Nauru'),\n\t\t\tarray( 'value' => 'NP', 'text' => 'Nepal'),\n\t\t\tarray( 'value' => 'NL', 'text' => 'Netherlands'),\n\t\t\tarray( 'value' => 'AN', 'text' => 'Netherlands Antilles'),\n\t\t\tarray( 'value' => 'NC', 'text' => 'New Caledonia'),\n\t\t\tarray( 'value' => 'NZ', 'text' => 'New Zealand'),\n\t\t\tarray( 'value' => 'NI', 'text' => 'Nicaragua'),\n\t\t\tarray( 'value' => 'NE', 'text' => 'Niger'),\n\t\t\tarray( 'value' => 'NG', 'text' => 'Nigeria'),\n\t\t\tarray( 'value' => 'NU', 'text' => 'Niue'),\n\t\t\tarray( 'value' => 'NF', 'text' => 'Norfolk Island'),\n\t\t\tarray( 'value' => 'MP', 'text' => 'Northern Mariana Islands'),\n\t\t\tarray( 'value' => 'NO', 'text' => 'Norway'),\n\t\t\tarray( 'value' => 'OM', 'text' => 'Oman'),\n\t\t\tarray( 'value' => 'PK', 'text' => 'Pakistan'),\n\t\t\tarray( 'value' => 'PW', 'text' => 'Palau'),\n\t\t\tarray( 'value' => 'PS', 'text' => 'Palestinian Territory, Occupied'),\n\t\t\tarray( 'value' => 'PA', 'text' => 'Panama'),\n\t\t\tarray( 'value' => 'PG', 'text' => 'Papua New Guinea'),\n\t\t\tarray( 'value' => 'PY', 'text' => 'Paraguay'),\n\t\t\tarray( 'value' => 'PE', 'text' => 'Peru'),\n\t\t\tarray( 'value' => 'PH', 'text' => 'Philippines'),\n\t\t\tarray( 'value' => 'PN', 'text' => 'Pitcairn'),\n\t\t\tarray( 'value' => 'PL', 'text' => 'Poland'),\n\t\t\tarray( 'value' => 'PT', 'text' => 'Portugal'),\n\t\t\tarray( 'value' => 'PR', 'text' => 'Puerto Rico'),\n\t\t\tarray( 'value' => 'QA', 'text' => 'Qatar'),\n\t\t\tarray( 'value' => 'RE', 'text' => 'Reunion'),\n\t\t\tarray( 'value' => 'RO', 'text' => 'Romania'),\n\t\t\tarray( 'value' => 'RU', 'text' => 'Russian Federation'),\n\t\t\tarray( 'value' => 'RW', 'text' => 'Rwanda'),\n\t\t\tarray( 'value' => 'BL', 'text' => 'Saint Barthelemy'),\n\t\t\tarray( 'value' => 'SH', 'text' => 'Saint Helena'),\n\t\t\tarray( 'value' => 'KN', 'text' => 'Saint Kitts And Nevis'),\n\t\t\tarray( 'value' => 'LC', 'text' => 'Saint Lucia'),\n\t\t\tarray( 'value' => 'MF', 'text' => 'Saint Martin'),\n\t\t\tarray( 'value' => 'PM', 'text' => 'Saint Pierre And Miquelon'),\n\t\t\tarray( 'value' => 'VC', 'text' => 'Saint Vincent And Grenadines'),\n\t\t\tarray( 'value' => 'WS', 'text' => 'Samoa'),\n\t\t\tarray( 'value' => 'SM', 'text' => 'San Marino'),\n\t\t\tarray( 'value' => 'ST', 'text' => 'Sao Tome And Principe'),\n\t\t\tarray( 'value' => 'SA', 'text' => 'Saudi Arabia'),\n\t\t\tarray( 'value' => 'SN', 'text' => 'Senegal'),\n\t\t\tarray( 'value' => 'RS', 'text' => 'Serbia'),\n\t\t\tarray( 'value' => 'SC', 'text' => 'Seychelles'),\n\t\t\tarray( 'value' => 'SL', 'text' => 'Sierra Leone'),\n\t\t\tarray( 'value' => 'SG', 'text' => 'Singapore'),\n\t\t\tarray( 'value' => 'SK', 'text' => 'Slovakia'),\n\t\t\tarray( 'value' => 'SI', 'text' => 'Slovenia'),\n\t\t\tarray( 'value' => 'SB', 'text' => 'Solomon Islands'),\n\t\t\tarray( 'value' => 'SO', 'text' => 'Somalia'),\n\t\t\tarray( 'value' => 'ZA', 'text' => 'South Africa'),\n\t\t\tarray( 'value' => 'GS', 'text' => 'South Georgia And Sandwich Isl.'),\n\t\t\tarray( 'value' => 'ES', 'text' => 'Spain'),\n\t\t\tarray( 'value' => 'LK', 'text' => 'Sri Lanka'),\n\t\t\tarray( 'value' => 'SD', 'text' => 'Sudan'),\n\t\t\tarray( 'value' => 'SR', 'text' => 'Suriname'),\n\t\t\tarray( 'value' => 'SJ', 'text' => 'Svalbard And Jan Mayen'),\n\t\t\tarray( 'value' => 'SZ', 'text' => 'Swaziland'),\n\t\t\tarray( 'value' => 'SE', 'text' => 'Sweden'),\n\t\t\tarray( 'value' => 'CH', 'text' => 'Switzerland'),\n\t\t\tarray( 'value' => 'SY', 'text' => 'Syrian Arab Republic'),\n\t\t\tarray( 'value' => 'TW', 'text' => 'Taiwan'),\n\t\t\tarray( 'value' => 'TJ', 'text' => 'Tajikistan'),\n\t\t\tarray( 'value' => 'TZ', 'text' => 'Tanzania'),\n\t\t\tarray( 'value' => 'TH', 'text' => 'Thailand'),\n\t\t\tarray( 'value' => 'TL', 'text' => 'Timor-Leste'),\n\t\t\tarray( 'value' => 'TG', 'text' => 'Togo'),\n\t\t\tarray( 'value' => 'TK', 'text' => 'Tokelau'),\n\t\t\tarray( 'value' => 'TO', 'text' => 'Tonga'),\n\t\t\tarray( 'value' => 'TT', 'text' => 'Trinidad And Tobago'),\n\t\t\tarray( 'value' => 'TN', 'text' => 'Tunisia'),\n\t\t\tarray( 'value' => 'TR', 'text' => 'Turkey'),\n\t\t\tarray( 'value' => 'TM', 'text' => 'Turkmenistan'),\n\t\t\tarray( 'value' => 'TC', 'text' => 'Turks And Caicos Islands'),\n\t\t\tarray( 'value' => 'TV', 'text' => 'Tuvalu'),\n\t\t\tarray( 'value' => 'UG', 'text' => 'Uganda'),\n\t\t\tarray( 'value' => 'UA', 'text' => 'Ukraine'),\n\t\t\tarray( 'value' => 'AE', 'text' => 'United Arab Emirates'),\n\t\t\tarray( 'value' => 'GB', 'text' => 'United Kingdom'),\n\t\t\tarray( 'value' => 'US', 'text' => 'United States'),\n\t\t\tarray( 'value' => 'UM', 'text' => 'United States Outlying Islands'),\n\t\t\tarray( 'value' => 'UY', 'text' => 'Uruguay'),\n\t\t\tarray( 'value' => 'UZ', 'text' => 'Uzbekistan'),\n\t\t\tarray( 'value' => 'VU', 'text' => 'Vanuatu'),\n\t\t\tarray( 'value' => 'VE', 'text' => 'Venezuela'),\n\t\t\tarray( 'value' => 'VN', 'text' => 'Viet Nam'),\n\t\t\tarray( 'value' => 'VG', 'text' => 'Virgin Islands, British'),\n\t\t\tarray( 'value' => 'VI', 'text' => 'Virgin Islands, U.S.'),\n\t\t\tarray( 'value' => 'WF', 'text' => 'Wallis And Futuna'),\n\t\t\tarray( 'value' => 'EH', 'text' => 'Western Sahara'),\n\t\t\tarray( 'value' => 'YE', 'text' => 'Yemen'),\n\t\t\tarray( 'value' => 'ZM', 'text' => 'Zambia'),\n\t\t\tarray( 'value' => 'ZW', 'text' => 'Zimbabwe')\n\n\t\t);\n\n\t}\n\n\tupdate_post_meta( $post_id, 'xp_dataset', $countries );\n\n\t//us states\n\n\t$us_states = get_page_by_title( 'US States With Abbreviation', 'OBJECT', 'xp_dataset_dataset');\n\n\t\n\tif (! $us_states ) {\n\n\t\t$args = array('post_title' => 'US States With Abbreviation', 'post_type' => 'xp_dataset_dataset', 'post_status' => 'publish');\n\n\t\t$post_id = wp_insert_post( $args );\n\n\n\n\t\t$us_states = array(\n\n\t\t array( 'value' => 'AL', 'text' => 'Alabama'),\n\t\t array( 'value' => 'AK', 'text' => 'Alaska'),\n\t\t array( 'value' => 'AZ', 'text' => 'Arizona'),\n\t\t array( 'value' => 'AR', 'text' => 'Arkansas'),\n\t\t array( 'value' => 'CA', 'text' => 'California'),\n\t\t array( 'value' => 'CO', 'text' => 'Colorado'),\n\t\t array( 'value' => 'CT', 'text' => 'Connecticut'),\n\t\t array( 'value' => 'DE', 'text' => 'Delaware'),\n\t\t array( 'value' => 'FL', 'text' => 'Florida'),\n\t\t array( 'value' => 'GA', 'text' => 'Georgia'),\n\t\t array( 'value' => 'HI', 'text' => 'Hawaii'),\n\t\t array( 'value' => 'ID', 'text' => 'Idaho'),\n\t\t array( 'value' => 'IL', 'text' => 'Illinois'),\n\t\t array( 'value' => 'IN', 'text' => 'Indiana'),\n\t\t array( 'value' => 'IA', 'text' => 'Iowa'),\n\t\t array( 'value' => 'KS', 'text' => 'Kansas'),\n\t\t array( 'value' => 'KY', 'text' => 'Kentucky'),\n\t\t array( 'value' => 'LA', 'text' => 'Louisiana'),\n\t\t array( 'value' => 'ME', 'text' => 'Maine'),\n\t\t array( 'value' => 'MD', 'text' => 'Maryland'),\n\t\t array( 'value' => 'MA', 'text' => 'Massachusetts'),\n\t\t array( 'value' => 'MI', 'text' => 'Michigan'),\n\t\t array( 'value' => 'MN', 'text' => 'Minnesota'),\n\t\t array( 'value' => 'MS', 'text' => 'Mississippi'),\n\t\t array( 'value' => 'MO', 'text' => 'Missouri'),\n\t\t array( 'value' => 'MT', 'text' => 'Montana'),\n\t\t array( 'value' => 'NE', 'text' => 'Nebraska'),\n\t\t array( 'value' => 'NV', 'text' => 'Nevada'),\n\t\t array( 'value' => 'NH', 'text' => 'New Hampshire'),\n\t\t array( 'value' => 'NJ', 'text' => 'New Jersey'),\n\t\t array( 'value' => 'NM', 'text' => 'New Mexico'),\n\t\t array( 'value' => 'NY', 'text' => 'New York'),\n\t\t array( 'value' => 'NC', 'text' => 'North Carolina'),\n\t\t array( 'value' => 'ND', 'text' => 'North Dakota'),\n\t\t array( 'value' => 'OH', 'text' => 'Ohio'),\n\t\t array( 'value' => 'OK', 'text' => 'Oklahoma'),\n\t\t array( 'value' => 'OR', 'text' => 'Oregon'),\n\t\t array( 'value' => 'PA', 'text' => 'Pennsylvania'),\n\t\t array( 'value' => 'RI', 'text' => 'Rhode Island'),\n\t\t array( 'value' => 'SC', 'text' => 'South Carolina'),\n\t\t array( 'value' => 'SD', 'text' => 'South Dakota'),\n\t\t array( 'value' => 'TN', 'text' => 'Tennessee'),\n\t\t array( 'value' => 'TX', 'text' => 'Texas'),\n\t\t array( 'value' => 'UT', 'text' => 'Utah'),\n\t\t array( 'value' => 'VT', 'text' => 'Vermont'),\n\t\t array( 'value' => 'VA', 'text' => 'Virginia'),\n\t\t array( 'value' => 'WA', 'text' => 'Washington'),\n\t\t array( 'value' => 'WV', 'text' => 'West Virginia'),\n\t\t array( 'value' => 'WI', 'text' => 'Wisconsin'),\n\t\t array( 'value' => 'WY', 'text' => 'Wyomin')\n\t \n\t );\n\n\t\tupdate_post_meta( $post_id, 'xp_dataset', $us_states );\n\n}\n\n\t/**\n\t * Fires after checking if Countries and States datasets have been loaded.\n\t *\n\t */\n\n\tdo_action('xp_dataset_add_datasets_on_load');\n\n}", "title": "" }, { "docid": "1f831631815bd3f4007601e82c5331e1", "score": "0.45974818", "text": "function create_tab_data_file()\n\t{\n\t\t$quickcreate_fields = XN_Query::create('Content')\n\t\t\t\t\t\t\t\t\t\t ->tag('Fields')\n\t\t\t\t\t\t\t\t\t\t ->filter('type', 'eic', 'fields')\n\t\t\t\t\t\t\t\t\t\t ->filter('my.quickcreate', 'eic', '0')->execute();\n\t\t$quickcreate_tabid_array = Array ();\n\t\tforeach ($quickcreate_fields as $quickcreate_field)\n\t\t{\n\t\t\t$quickcreate_tabid_array[] = $quickcreate_field->my->tabid;\n\t\t}\n\t\t$all_tabs = XN_Query::create('Content')\n\t\t\t\t\t\t\t\t\t\t ->tag('Tabs')\n\t\t\t\t\t\t\t\t\t\t ->filter('type', 'eic', 'tabs')\n\t\t\t//->order ( 'my.tabsequence', XN_Order::ASC_NUMBER )\n\t\t\t\t\t\t\t\t\t\t ->end(-1)\n\t\t\t\t\t\t\t\t\t\t ->execute();\n\t\t$all_tabs_array = Array ();\n\t\t$all_tablabels_array = Array ();\n\t\t$all_entity_tabs_array = Array ();\n\t\t$tab_info_array = array ();\n\t\tforeach ($all_tabs as $all_tab_info)\n\t\t{\n\t\t\t$all_tablabels_array[$all_tab_info->my->tabid] = $all_tab_info->my->tablabel;\n\t\t\t$all_tabs_array[$all_tab_info->my->tabid] = $all_tab_info->my->tabname;\n\t\t\t$tab_info_array[$all_tab_info->my->tabname] = $all_tab_info->my->tabid;\n\t\t\tif ($all_tab_info->my->isentitytype == '1')\n\t\t\t{\n\t\t\t\t$all_entity_tabs_array[$all_tab_info->my->tabid] = $all_tab_info->my->tabname;\n\t\t\t}\n\t\t}\n\t\t$tabs_info = XN_Query::create('Content')\n\t\t\t\t\t\t\t\t\t ->tag('Tabs')\n\t\t\t\t\t\t\t\t\t ->filter('type', 'eic', 'tabs')\n\t\t\t\t\t\t\t\t\t ->filter('my.presence', 'in', array ('0', '2'))\n\t\t\t\t\t\t\t\t\t ->order('my.tabsequence', XN_Order::ASC_NUMBER)\n\t\t\t\t\t\t\t\t\t ->end(-1)\n\t\t\t\t\t\t\t\t\t ->execute();\n\t\t$result_array = Array ();\n\t\t$seq_array = Array ();\n\t\t$ownedby_array = Array ();\n\t\t$tablabel_array = Array ();\n\t\t$quickcreate_array = Array ();\n\t\tforeach ($tabs_info as $tab_info) //for($i=0;$i<$num_rows;$i++)\n\t\t{\n\t\t\t$tabid = $tab_info->my->tabid;\n\t\t\t$tabname = $tab_info->my->tabname;\n\t\t\t$presence = $tab_info->my->presence;\n\t\t\t$ownedby = $tab_info->my->ownedby;\n\t\t\t$tablabel = $tab_info->my->tablabel;\n\t\t\t$result_array [$tabname] = $tabid;\n\t\t\t$seq_array [$tabid] = $presence;\n\t\t\t$ownedby_array [$tabid] = $ownedby;\n\t\t\t$tablabel_array[$tabid] = $tablabel;\n\t\t\tif (in_array($tabid, $quickcreate_tabid_array))\n\t\t\t\t$quickcreate_array[] = $tabid;\n\t\t}\n\t\t$approvalflows = XN_Query::create('Content')\n\t\t\t\t\t\t\t\t\t ->tag('approvalflows')\n\t\t\t\t\t\t\t\t\t ->filter('type', 'eic', 'approvalflows')\n\t\t\t\t\t\t\t\t\t ->filter('my.approvalflowsstatus', '=', '1')\n\t\t\t\t\t\t\t\t\t ->filter('my.deleted', '=', '0')\n\t\t\t\t\t\t\t\t\t ->execute();\n\t\t$approvaltabs = Array ();\n\t\t$optionalapprovals = array ();\n\t\t$detailapprovals = array ();\n\t\tforeach ($approvalflows as $approvalflow_info) //for($i=0;$i<$num_rows;$i++)\n\t\t{\n\t\t\t$tabid = $approvalflow_info->my->tabid;\n\t\t\t$approvaltabs[] = $tabid;\n\t\t\t$approvaldetails = $approvalflow_info->my->approvaldetails;\n\t\t\tif ($approvaldetails == '1')\n\t\t\t{\n\t\t\t\t$detailapprovals[] = $tabid;\n\t\t\t} \n\t\t}\n\t\t$def_org_share = getAllDefaultSharingAction();\n\t\trequire_once('modules/Users/CreateUserPrivilegeFile.php');\n\t\t$app = XN_Application::load(XN_Application::$CURRENT_URL);\n\t\t$datas = array (\n\t\t\t\"applicationname\" => $app->name,\n\t\t\t\"tab_info_array\" => $result_array,\n\t\t\t\"approvaltabs\" => $approvaltabs, \n\t\t\t\"detailapprovals\" => $detailapprovals,\n\t\t\t\"all_tabs_array\" => $all_tabs_array,\n\t\t\t\"tab_info_array\" => $tab_info_array,\n\t\t\t\"all_entity_tabs_array\" => $all_entity_tabs_array,\n\t\t\t\"all_tablabels_array\" => $all_tablabels_array,\n\t\t\t\"tab_label_array\" => $tablabel_array,\n\t\t\t\"tab_quickcreate_array\" => $quickcreate_array,\n\t\t\t\"tab_seq_array\" => $seq_array,\n\t\t\t\"tab_ownedby_array\" => $ownedby_array,\n\t\t\t\"defaultOrgSharingPermission\" => $def_org_share,\n\t\t); \n\t\ttry\n\t\t{\n\t\t\t$session = XN_MemCache::get(\"session_\".XN_Application::$CURRENT_URL);\n\t\t\t$session['tabdata'] = $datas;\n\t\t\tXN_MemCache::put($session, \"session_\".XN_Application::$CURRENT_URL);\n\t\t}\n\t\tcatch (XN_Exception $e)\n\t\t{\n\t\t\t$session = array();\n\t\t\t$session['tabdata'] = $datas;\n\t\t\tXN_MemCache::put($session, \"session_\".XN_Application::$CURRENT_URL);\n\t\t}\n\t\treturn $datas;\n\t}", "title": "" }, { "docid": "e679ff53e6782a6dd0ccbff2caf9a7b8", "score": "0.4593492", "text": "function ew_ShowChart($id, $parms, $data, $width, $height, $align) {\n\tglobal $PHP_SESSION;\n\n\t$url = \"ewchart.php*id=\" . $id;\n\t$PHP_SESSION[$id . \"_parms\"] = $parms; // Save parms to session\n\t$PHP_SESSION[$id . \"_data\"] = $data; // Save chart data to session\n\tif (is_numeric($width) && is_numeric($height)) {\n\t\t$wrkwidth = $width;\n\t\t$wrkheight = $height;\n\t} else {\n\t\t$wrkwidth = 550;\n\t\t$wrkheight = 450; // default\n\t}\n\tif (strtolower($align) == \"left\" || strtolower($align) == \"right\") {\n\t\t$wrkalign = strtolower($align);\n\t} else {\n\t\t$wrkalign = \"middle\"; // default\n\t}\n\t$wrk = \"<div id=\\\"$id\\\"></div>\\n\";\n\t$wrk .= \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">\\n\";\n\t$wrk .= \"<!--\\n\";\n\t$wrk .= \"var so = new SWFObject(\\\"ewchart.swf\\\", \\\"ewchart_$id\\\", \\\"$wrkwidth\\\", \\\"$wrkheight\\\", \\\"8\\\", \\\"#FFFFFF\\\");\\n\";\n\t$wrk .= \"so.setAttribute(\\\"align\\\", \\\"$wrkalign\\\");\\n\";\n\t$wrk .= \"so.addVariable(\\\"dataurl\\\", \\\"$url\\\");\\n\";\n\t$wrk .= \"so.write(\\\"$id\\\");\\n\";\n\t$wrk .= \"//-->\\n\";\n\t$wrk .= \"</script>\\n\";\n\n// ew_Trace($wrk); // uncomment to debug\n\treturn $wrk;\n}", "title": "" }, { "docid": "763f5e44aa5da2aad3e627a13f9748d3", "score": "0.45718077", "text": "function build_dataset($data){\n\t\n\tforeach($data as $d){\n\t\t\n\t}\n\t\n\t}", "title": "" }, { "docid": "90d974ec7625bf21209ecdac39993e32", "score": "0.45216003", "text": "function print_yui_table($tablename) {\n $this->build_table();\n?>\n\n<script type=\"text/javascript\">\nYAHOO.util.Event.addListener(window, \"load\", function() {\n YAHOO.example.Basic = function() {\n var myColumnDefs = <?php echo $this->get_yui_columns(); ?>;\n\n var myData = <?php echo $this->get_json(); ?>;\n\n var myDataSource = new YAHOO.util.DataSource(myData);\n myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;\n myDataSource.responseSchema = <?php echo $this->get_json_schema(); ?>;\n\n var myDataTable = new YAHOO.widget.DataTable(\"<?php echo $tablename; ?>\",\n myColumnDefs, myDataSource);\n\n return {\n oDS: myDataSource,\n oDT: myDataTable\n };\n }();\n});\n</script>\n\n<?php\n }", "title": "" }, { "docid": "717bff83f07976fe7ea247de525aad4f", "score": "0.45165345", "text": "function BuildDataSet(&$fvData, &$rvData)\r\n{\r\n global $tests;\r\n global $runs;\r\n global $labels;\r\n\r\n $type = $_REQUEST['type'];\r\n \r\n // load the page data for the tests of interest\r\n $fv = array();\r\n $rv = array();\r\n foreach( $tests as $index => $test )\r\n {\r\n $testPath = GetTestPath($test);\r\n $run = 1;\r\n if( $runs[$index] )\r\n $run = $runs[$index];\r\n \r\n $fv[$index] = loadPageRunData($testPath, $run, 0);\r\n $rv[$index] = loadPageRunData($testPath, $run, 1);\r\n }\r\n \r\n // generate the data set for the graph\r\n $fvData = array();\r\n $rvData = array();\r\n if( $type == 'times' )\r\n {\r\n // TTFB\r\n $fdata = array( 'label' => 'First Byte', 'color' => 'red' );\r\n $rdata = array( 'label' => 'First Byte', 'color' => 'red' );\r\n\r\n $fdata['values'] = array();\r\n $rdata['values'] = array();\r\n foreach( $tests as $index => $test)\r\n {\r\n $value = 0;\r\n if( $fv[$index] )\r\n $value = $fv[$index]['TTFB'] / 1000.0;\r\n $fdata['values'][] = $value;\r\n\r\n $value = 0;\r\n if( $rv[$index] )\r\n $value = $rv[$index]['TTFB'] / 1000.0;\r\n $rdata['values'][] = $value;\r\n }\r\n $fvData[] = $fdata;\r\n $rvData[] = $rdata;\r\n\r\n // Render Start\r\n $fdata = array( 'label' => 'Render Start', 'color' => 'green' );\r\n $rdata = array( 'label' => 'Render Start', 'color' => 'green' );\r\n\r\n $fdata['values'] = array();\r\n $rdata['values'] = array();\r\n foreach( $tests as $index => $test)\r\n {\r\n $value = 0;\r\n if( $fv[$index] )\r\n {\r\n $ttfb = $fv[$index]['TTFB'];\r\n $render = $fv[$index]['render'];\r\n if( $render > $ttfb )\r\n $value = ($render - $ttfb) / 1000.0;\r\n }\r\n $fdata['values'][] = $value;\r\n\r\n $value = 0;\r\n if( $rv[$index] )\r\n {\r\n $ttfb = $rv[$index]['TTFB'];\r\n $render = $rv[$index]['render'];\r\n if( $render > $ttfb )\r\n $value = ($render - $ttfb) / 1000.0;\r\n }\r\n $rdata['values'][] = $value;\r\n }\r\n $fvData[] = $fdata;\r\n $rvData[] = $rdata;\r\n \r\n // Document Complete\r\n $fdata = array( 'label' => 'Document Complete', 'color' => 'blue' );\r\n $rdata = array( 'label' => 'Document Complete', 'color' => 'blue' );\r\n\r\n $fdata['values'] = array();\r\n $rdata['values'] = array();\r\n foreach( $tests as $index => $test)\r\n {\r\n $value = 0;\r\n if( $fv[$index] )\r\n {\r\n $ttfb = $fv[$index]['TTFB'];\r\n $render = $fv[$index]['render'];\r\n $doc = $fv[$index]['docTime'];\r\n if( $doc > max($render, $ttfb) )\r\n $value = ($doc - max($render, $ttfb)) / 1000.0;\r\n }\r\n $fdata['values'][] = $value;\r\n\r\n $value = 0;\r\n if( $rv[$index] )\r\n {\r\n $ttfb = $rv[$index]['TTFB'];\r\n $render = $rv[$index]['render'];\r\n $doc = $rv[$index]['docTime'];\r\n if( $doc > max($render, $ttfb) )\r\n $value = ($doc - max($render, $ttfb)) / 1000.0;\r\n }\r\n $rdata['values'][] = $value;\r\n }\r\n $fvData[] = $fdata;\r\n $rvData[] = $rdata;\r\n\r\n // Fully Loaded\r\n $fdata = array( 'label' => 'Fully Loaded', 'color' => 'orange' );\r\n $rdata = array( 'label' => 'Fully Loaded', 'color' => 'orange' );\r\n\r\n $fdata['values'] = array();\r\n $rdata['values'] = array();\r\n foreach( $tests as $index => $test)\r\n {\r\n $value = 0;\r\n if( $fv[$index] )\r\n {\r\n $ttfb = $fv[$index]['TTFB'];\r\n $render = $fv[$index]['render'];\r\n $doc = $fv[$index]['docTime'];\r\n $full = $fv[$index]['fullyLoaded'];\r\n if( $full > max($render, $ttfb, $doc) )\r\n $value = ($full - max($render, $ttfb, $doc)) / 1000.0;\r\n }\r\n $fdata['values'][] = $value;\r\n\r\n $value = 0;\r\n if( $rv[$index] )\r\n {\r\n $ttfb = $rv[$index]['TTFB'];\r\n $render = $rv[$index]['render'];\r\n $doc = $rv[$index]['docTime'];\r\n $full = $rv[$index]['fullyLoaded'];\r\n if( $full > max($render, $ttfb, $doc) )\r\n $value = ($full - max($render, $ttfb, $doc)) / 1000.0;\r\n }\r\n $rdata['values'][] = $value;\r\n }\r\n $fvData[] = $fdata;\r\n $rvData[] = $rdata;\r\n }\r\n}", "title": "" }, { "docid": "f212c26fe8ab076d035b6d6848d3c4f4", "score": "0.4479591", "text": "private function getJsDataTable()\n {\n // render the google data table\n ob_start();\n $this->dataTableName = $this->renderDataTable();\n $js = ob_get_clean();\n\n return $js;\n }", "title": "" }, { "docid": "afb15d1ac6d69592f2eb1b98427a9db2", "score": "0.4436482", "text": "public function createEmbeddedXmlChart()\n {\n $this->_xmlChart = '';\n $args = func_get_args();\n $this->generateCHARTSPACE();\n $this->generateDATE1904(1);\n $this->generateLANG();\n $color = 2;\n if ($this->_color) {\n $color = $this->_color;\n }\n $this->generateSTYLE($color);\n $this->generateCHART();\n if ($this->_title != '') {\n $this->generateTITLE();\n $this->generateTITLETX();\n $this->generateRICH();\n $this->generateBODYPR();\n $this->generateLSTSTYLE();\n $this->generateTITLEP();\n $this->generateTITLEPPR();\n $this->generateDEFRPR();\n $this->generateTITLER();\n $this->generateTITLERPR();\n $this->generateTITLET($this->_title);\n $this->generateTITLELAYOUT();\n $this->cleanTemplateFonts();\n } else {\n $this->generateAUTOTITLEDELETED();\n $title = '';\n }\n if (strpos($this->_type, '3D') !== false) {\n $this->generateVIEW3D();\n $rotX = 30;\n $rotY = 30;\n $perspective = 30;\n if ($this->_rotX != '') {\n $rotX = $this->_rotX;\n }\n if ($this->_rotY != '') {\n $rotY = $this->_rotY;\n }\n if ($this->_perspective != '') {\n $perspective = $this->_perspective;\n }\n $this->generateROTX($rotX);\n $this->generateROTY($rotY);\n $this->generateRANGAX($this->_rAngAx);\n $this->generatePERSPECTIVE($perspective);\n }\n if ($this->values == '') {\n exit('You haven`t added data');\n }\n $this->generatePLOTAREA();\n $this->generateLAYOUT();\n\n if (strpos($this->_type, '3D') !== false) {\n $this->generateLINE3DCHART();\n } else {\n $this->generateLINECHART();\n }\n $groupBar = 'standard';\n if (!empty($this->_groupBar) && in_array($this->_groupBar, ['stacked', 'standard', 'percentStacked'])) {\n $groupBar = $this->_groupBar;\n }\n $this->generateGROUPING($groupBar);\n if (isset($this->values['legend'])) {\n $legends = $this->values['legend'];\n } else {\n echo('You haven`t added legends');\n return false;\n }\n $numValues = count($this->values) - 1;\n $this->generateVARYCOLORS($this->_varyColors);\n $letter = 'A';\n for ($i = 0; $i < count($legends); $i++) {\n $this->generateSER();\n $this->generateIDX($i);\n $this->generateORDER($i);\n $letter++;\n\n $this->generateTX();\n $this->generateSTRREF();\n $this->generateF('Sheet1!$' . $letter . '$1');\n $this->generateSTRCACHE();\n $this->generatePTCOUNT();\n $this->generatePT();\n $this->generateV($legends[$i]);\n\n if (!empty($this->_symbol)) {\n $sizeSimbol = NULL;\n if (is_numeric($this->_symbolSize)) {\n $sizeSimbol = $this->_symbolSize;\n }\n if (is_array($this->_symbol)) {\n $this->generateMARKER($this->_symbol[$i], $sizeSimbol);\n } else {\n $this->generateMARKER($this->_symbol, $sizeSimbol);\n }\n }\n $this->cleanTemplate2();\n\n $this->generateCAT();\n $this->generateSTRREF();\n $this->generateF('Sheet1!$A$2:$A$' . ($numValues + 1));\n $this->generateSTRCACHE();\n $this->generatePTCOUNT($numValues);\n\n $num = 0;\n foreach ($this->values as $legend => $value) {\n if ($legend == 'legend') {\n continue;\n }\n $this->generatePT($num);\n $this->generateV($legend);\n $num++;\n }\n $this->cleanTemplate2();\n if ($this->_type == 'radar' && $style == 'marker' && $marker == false) {\n $this->generateMARKER();\n }\n $this->generateVAL();\n $this->generateNUMREF();\n $this->generateF('Sheet1!$' . $letter . '$2:$' . $letter . '$' . ($numValues + 1));\n $this->generateNUMCACHE();\n $this->generateFORMATCODE();\n $this->generatePTCOUNT($numValues);\n $num = 0;\n foreach ($this->values as $legend => $value) {\n if ($legend == 'legend') {\n continue;\n }\n $this->generatePT($num);\n $this->generateV($value[$i]);\n $num++;\n }\n\n\n $this->cleanTemplate3();\n }\n\n //Generate labels\n $this->generateSERDLBLS();\n $this->generateSHOWLEGENDKEY($this->_showLegendKey);\n $this->generateSHOWVAL($this->_showValue);\n $this->generateSHOWCATNAME($this->_showCategory);\n $this->generateSHOWSERNAME($this->_showSeries);\n $this->generateSHOWPERCENT($this->_showPercent);\n $this->generateSHOWBUBBLESIZE($this->_showBubbleSize);\n\n if (isset($args[0][1]['groupBar']) && ($args[0][1]['groupBar'] == 'stacked' ||\n $args[0][1]['groupBar'] == 'percentStacked')\n ) {\n $this->generateOVERLAP();\n }\n $this->generateAXID();\n $this->generateAXID(59040512);\n if (strpos($this->_type, '3D') !== false) {\n $this->generateAXID(83319040);\n }\n $this->generateVALAX();\n $this->generateAXAXID(59040512);\n $this->generateSCALING(true);\n $this->generateDELETE($this->_delete);\n $this->generateORIENTATION();\n $this->generateAXPOS('l');\n\n switch ($this->_hgrid) {\n case 1:\n $this->generateMAJORGRIDLINES();\n break;\n case 2:\n $this->generateMINORGRIDLINES();\n break;\n case 3:\n $this->generateMAJORGRIDLINES();\n $this->generateMINORGRIDLINES();\n break;\n default:\n break;\n }\n\n if (!empty($this->_vaxLabel)) {\n $this->generateAXLABEL($this->_vaxLabel);\n $vert = 'horz';\n $rot = 0;\n if ($this->_vaxLabelDisplay == 'vertical') {\n $vert = 'wordArtVert';\n }\n if ($this->_vaxLabelDisplay == 'rotated') {\n $rot = '-5400000';\n }\n $this->generateAXLABELDISP($vert, $rot);\n }\n $this->generateNUMFMT();\n $this->generateTICKLBLPOS($this->_tickLblPos, true);\n $this->generateMAJORUNIT($this->_majorUnit);\n $this->generateMINORUNIT($this->_minorUnit);\n $this->generateCROSSAX(59034624);\n $this->generateCROSSES();\n $this->generateCROSSBETWEEN();\n $this->generateCATAX();\n $this->generateAXAXID(59034624);\n $this->generateSCALING();\n $this->generateDELETE($this->_delete);\n $this->generateORIENTATION();\n $this->generateAXPOS();\n\n\n if (!empty($this->_haxLabel)) {\n $this->generateAXLABEL($this->_haxLabel);\n $vert = 'horz';\n $rot = 0;\n if ($this->_haxLabelDisplay == 'vertical') {\n $vert = 'wordArtVert';\n }\n if ($this->_haxLabelDisplay == 'rotated') {\n $rot = '-5400000';\n }\n $this->generateAXLABELDISP($vert, $rot);\n }\n switch ($this->_vgrid) {\n case 1:\n $this->generateMAJORGRIDLINES();\n break;\n case 2:\n $this->generateMINORGRIDLINES();\n break;\n case 3:\n $this->generateMAJORGRIDLINES();\n $this->generateMINORGRIDLINES();\n break;\n default:\n break;\n }\n\n if (strpos($this->_type, 'surface') !== false) {\n $this->generateMAJORTICKMARK();\n }\n $this->generateTICKLBLPOS();\n $this->generateCROSSAX();\n $this->generateCROSSES();\n $this->generateAUTO();\n $this->generateLBLALGN();\n $this->generateLBLOFFSET();\n if (!empty($this->_showtable)) {\n $this->generateDATATABLE();\n }\n\n $this->generateLEGEND();\n $this->generateLEGENDPOS($this->_legendPos);\n $this->generateLEGENDOVERLAY($this->_legendOverlay);\n\n $this->generatePLOTVISONLY();\n\n if ((!isset($this->_border) || $this->_border == 0 || !is_numeric($this->_border))\n ) {\n $this->generateSPPR();\n $this->generateLN();\n $this->generateNOFILL();\n } else {\n $this->generateSPPR();\n $this->generateLN($this->_border);\n }\n\n if ($this->_font != '') {\n $this->generateTXPR();\n $this->generateLEGENDBODYPR();\n $this->generateLSTSTYLE();\n $this->generateAP();\n $this->generateAPPR();\n $this->generateDEFRPR();\n $this->generateRFONTS($this->_font);\n $this->generateENDPARARPR();\n }\n\n\n $this->generateEXTERNALDATA();\n $this->cleanTemplateDocument();\n return $this->_xmlChart;\n }", "title": "" }, { "docid": "07a0e8eaebeb0edc796e39af97e51781", "score": "0.4427171", "text": "public static function addData($tabName = 'default', $data) {\n\t\t$tabName = URL::title($tabName);\n\t\tself::$_CUSTOM[$tabName][] = $data;\n\t}", "title": "" }, { "docid": "6bd5a9baf579cfff15853ee31168d6d8", "score": "0.44078332", "text": "public function append(Dataset $dataset) : Dataset;", "title": "" }, { "docid": "75b6a93e44b3ccfd1272f9f7fb73ee6f", "score": "0.4397086", "text": "public function createEmbeddedXmlChart();", "title": "" }, { "docid": "e331836114ede08183c4f6c9ad249fbe", "score": "0.43696496", "text": "public function setDatasetsForBiomarker($id,$datasetIds = array()) {\n\t\t$q = \"DELETE FROM `biomarker_datasets` WHERE `biomarker_id`='{$id}'\";\n\t\t$this->query($q);\n\t\t\n\t\t// Add the provided entries\n\t\t$q = \"INSERT INTO `biomarker_datasets` (`biomarker_id`,`dataset_id`) VALUES \";\n\t\t$values = array();\n\t\tforeach ($datasetIds as $ds) {\n\t\t\t$values[] = \" ('{$id}','\".mysql_real_escape_string($ds).\"') \";\n\t\t}\n\t\t$q .= implode(' , ',$values);\n\t\tif (count($values) > 0) {\n\t\t\t$this->query($q);\n\t\t}\n\t}", "title": "" }, { "docid": "b800476ed406f4322bd3e193f8c6a643", "score": "0.435388", "text": "public function addUserData($datasets)\n\t{\n\t\tforeach($datasets AS $df_name => $data):\n\t\t\t$this->user_data .= $df_name . ' = as.data.frame(jsonlite::fromJSON(\"'.addslashes(json_encode($data, JSON_UNESCAPED_UNICODE + JSON_NUMERIC_CHECK)).'\"), stringsAsFactors=F)\n'; ### loop through the given datasets and import them to R via JSON\n\t\tendforeach;\n\t}", "title": "" }, { "docid": "2c4aa64abae1946cf6e6f1f7589fbbff", "score": "0.43430468", "text": "public function getDataSetter();", "title": "" }, { "docid": "e15a256c021dccb9f04c677311239580", "score": "0.42938918", "text": "protected abstract function getDataSet();", "title": "" }, { "docid": "9eaf616a35e98b1364cc9ec0526370d0", "score": "0.4277138", "text": "function xp_dataset_enqueue_scripts() {\n\tglobal $post;\n\n\t//Get the post. After running xp_dataset_build dataset dropdown, global variable $post will incorrect.\n\t$current_post = $post;\n\twp_register_script( 'xp_dataset_admin', plugin_dir_url( __FILE__ ) . '/assets/js/xp_dataset_admin.js' );\n\t$datasets_dropdown = xp_dataset_build_dataset_dropdown();\n\n\t//reset global post variable to was it was before running query in xp_dataset_build_dataset_dropdown.\n\t$post = $current_post;\n\n\t$field_id = $_GET['field_id'];\n\t$dataset = get_xp_dataset( $field_id );\n\n\t$field = xprofile_get_field( $field_id );\n\n\t$field_type = $field->type;\n\twp_localize_script('xp_dataset_admin', 'xp_datasets', array( 'xp_dataset_dropdown' => $datasets_dropdown, 'dataset' => $dataset, 'field_type' => $field_type )); \n wp_enqueue_script( 'xp_dataset_admin' );\n\n}", "title": "" }, { "docid": "daf3ae2a9a37a098eeb1ef480c3e3f19", "score": "0.427613", "text": "public function SetData (array $data = [], $environmentName = NULL);", "title": "" }, { "docid": "acea29f819c2f306acd3776ccb6f5395", "score": "0.42676482", "text": "function array_to_chart($data,$args=false) {\n if (!is_array($args)) { $args = array(); }\n $fields = array('axis_color','background_color','bar_group_width','border_color','border_width','capitalize_headers','category_filter','chart','chart_div','colors','custom_headers','div_style','first_column_numeric','format_strings','height','hide_legend','legend_position','margins','region','resolution','responsive','smooth','style_column','text_style','title','tooltips_column','tooltips_html','width');\n $axis_fields = array('baseline','color','gridlines','max','min','text_position','text_style','title');\n foreach ($axis_fields as $key) {\n $fields[] = 'x_axis_'.$key;\n $fields[] = 'y_axis_'.$key;\n }\n foreach ($fields as $key) {\n if (array_key_exists($key,$args)) { $$key = $args[$key]; } else { $$key = false; }\n }\n if (!$chart) { $chart = 'LineChart'; }\n if (!$width) { $width = 1000; } //pixels\n if (!$height) { $height = 600; } //pixels\n if (!$chart_div) { $chart_div = 'chart_div'; }\n\n foreach (array('text_style','x_axis_text_style','y_axis_text_style') as $key) {\n if (!is_array($$key)) {\n if ($$key) { custom_die('Chart function requires '.$key.' to be an array.'); }\n $$key = array();\n }\n }\n\n\n //more might be added to this later, but for now, categoryFilter is the only type of dashboard-requiring control that this function supports\n if ($category_filter) { $dashboard = true; } else { $dashboard = false; }\n\n $eol = \"\\n\";\n\n //get rid of headers row, if it exists (headers should exist as keys)\n if (array_key_exists('headers',$data)) { unset($data['headers']); }\n\n //the JavaScript starts here\n if ((!array_key_exists('jsapi_called',$GLOBALS)) || (!$GLOBALS['jsapi_called'])) { \n $script = '<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>'.$eol;\n } else {\n $script = ''; //we only need to call it once\n }\n $script .= '<script type=\"text/javascript\">'.$eol;\n \n //if repsonsive is set to true, make the width/height dependent on screen size\n if ($responsive) {\n $script .= ' if (screen.width < '.$width.') { window.'.$chart_div.'_width = screen.width; } else { window.'.$chart_div.'_width = '.$width.'};'.$eol;\n $script .= ' window.'.$chart_div.'_height = Math.round((window.'.$chart_div.'_width / '.$width.') * '.$height.');'.$eol;\n }\n\n if ($dashboard) { $script .= 'google.load(\\'visualization\\', \\'1.0\\', {\\'packages\\':[\\'controls\\']});'.$eol; }\n else { $script .= 'google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});'.$eol; }\n $script .= 'google.setOnLoadCallback(drawChart);'.$eol;\n $script .= 'function drawChart() {'.$eol;\n\n if ($responsive) {\n $script .= ' var chart_width = window.'.$chart_div.'_width;'.$eol;\n $script .= ' var chart_height = window.'.$chart_div.'_height;'.$eol;\n }\n\n $script .= ' var data = new google.visualization.DataTable();'.$eol;\n\n //SET UP COLUMNS\n $column_numbers = array(); //we use this later, for formatting\n foreach ($data as $row) {\n $j = 0;\n foreach ($row as $key => $value) {\n $column_numbers[$key] = $j;\n $j++;\n if (is_array($custom_headers) && array_key_exists($key,$custom_headers) && ($custom_headers[$key])) { $header = $custom_headers[$key]; }\n elseif ($capitalize_headers) { $header = ucwords($key); }\n else { $header = $key; }\n $label = '\\''.addslashes($header).'\\'';\n if ($j == 1) {\n if ($first_column_numeric) { $type = '\\'number\\''; }\n else { $type = '\\'string\\''; }\n } elseif ($j == $tooltips_column) {\n $type = '{type:\\'string\\',role:\\'tooltip\\'';\n if ($tooltips_html) { $type .= ', p:{html:true}'; }\n $type .= '}';\n } elseif ($j == $style_column) {\n $type = '{type:\\'string\\',role:\\'style\\'}';\n } else { $type = '\\'number\\''; }\n $script .= ' data.addColumn('.$type.','.$label.');'.$eol;\n }\n break;\n }\n \n $script .= ' data.addRows(['.$eol;\n\n //SET UP DATA\n $i = 0;\n foreach ($data as $row) {\n $i++;\n\n //data\n $c = '';\n $j = 0;\n $script .= ' [';\n foreach ($row as $key => $value) {\n $j++;\n if (is_numeric($value)) { $script .= $c.preg_replace('/[^0-9.-]/','',$value); } //remove commas\n else { $script .= $c.'\\''.addslashes($value).'\\''; } //add quotes\n $c = ',';\n }\n $script .= '],'.$eol;\n }\n $script = substr($script,0,(strlen(','.$eol)*-1)); //get rid of that last comma\n $script .= $eol.' ]);'.$eol;\n \n //generate dashboard\n if ($dashboard) {\n $script .= ' var dashboard = new google.visualization.Dashboard(document.getElementById(\\''.$chart_div.'_dashboard\\'));'.$eol;\n }\n\n if ($category_filter) {\n if (!is_array($category_filter)) { return false; } //$category_filter must be an array with filterRowIndex and label set\n $script .= ' var categoryPicker = new google.visualization.ControlWrapper({'.$eol;\n $script .= ' \\'controlType\\': \\'CategoryFilter\\','.$eol;\n $script .= ' \\'containerId\\': \\''.$chart_div.'_filter\\','.$eol;\n $script .= ' \\'options\\': {'.$eol;\n $script .= ' \\'filterRowIndex\\': '.$category_filter['filterRowIndex'].','.$eol;\n $script .= ' \\'ui\\': {'.$eol;\n $script .= ' \\'labelStacking\\': \\'vertical\\','.$eol;\n $script .= ' \\'label\\': \\''.$category_filter['label'].'\\','.$eol;\n $script .= ' \\'allowTyping\\': false,'.$eol;\n $script .= ' \\'allowMultiple\\': true'.$eol;\n $script .= ' }'.$eol;\n $script .= ' }'.$eol;\n $script .= ' });'.$eol;\n }\n\n if (is_array($format_strings)) {\n $unique_formats = array(); //first, find all unique format patterns, and which columns they are associated with\n foreach ($format_strings as $column => $format) {\n if (array_key_exists($column,$column_numbers)) { //if data column itself exists\n $cn = $column_numbers[$column];\n if (!array_key_exists($format,$unique_formats)) { $unique_formats[$format] = array($cn); }\n else { $unique_formats[$format][] = $cn; }\n }\n }\n $i = 0;\n foreach ($unique_formats as $format => $columns) { \n $i++;\n $script .= ' var formatter_'.$i.' = new google.visualization.NumberFormat({'.$format.'}); '.$eol; //define the format pattern\n foreach ($columns as $cn) { $script .= ' formatter_'.$i.'.format(data, '.$cn.');'.$eol; } //apply the pattern to all relevant columns\n } \n }\n\n //SET UP OPTIONS\n $options = array();\n if ($responsive) { $options[] = 'width:chart_width'; }\n elseif ($width) { $options[] = 'width:'.$width; }\n if ($responsive) { $options[] = 'height:chart_height'; }\n elseif ($height) { $options[] = 'height:'.$height; }\n if ($title) { $options[] = 'title: \\''.addslashes($title).'\\''; }\n if (array_key_exists('fontName',$text_style) && ($text_style['fontName'])) { $options[] = 'fontName: \\''.$text_style['fontName'].'\\''; }\n if (array_key_exists('fontSize',$text_style) && ($text_style['fontSize'])) { $options[] = 'fontSize: '.$text_style['fontSize']; } //this should be numeric (pixels)\n\n $axes = array('x_axis'=>'hAxis','y_axis'=>'vAxis');\n foreach ($axes as $incoming => $outgoing) {\n $axis_options = array();\n if (${$incoming.'_title'}) { $axis_options[] = 'title: \\''.addslashes(${$incoming.'_title'}).'\\', titleTextStyle: {fontSize:12,italic:\\'false\\'}'; }\n if (${$incoming.'_baseline'} !== false) { $axis_options[] = 'baseline: '.${$incoming.'_baseline'}; }\n if (${$incoming.'_text_position'}) {\n $allowed = array('out','in','none');\n if (!in_array(${$incoming.'_text_position'},$allowed)) { custom_die('Invalid '.$incoming.'_text_position selected.'); }\n $axis_options[] = 'textPosition: \\''.${$incoming.'_text_position'}.'\\'';\n }\n $sub_options = array();\n if (array_key_exists('fontName',${$incoming.'_text_style'}) && (${$incoming.'_text_style'}['fontName'])) { $sub_options[] = 'fontName: \\''.${$incoming.'_text_style'}['fontName'].'\\''; }\n if (array_key_exists('fontSize',${$incoming.'_text_style'}) && (${$incoming.'_text_style'}['fontSize'])) { $sub_options[] = 'fontSize: '.${$incoming.'_text_style'}['fontSize']; } //this should be numeric (pixels)\n if (array_key_exists('color',${$incoming.'_text_style'}) && (${$incoming.'_text_style'}['color'])) { $sub_options[] = 'color: \\''.${$incoming.'_text_style'}['color'].'\\''; }\n if (array_key_exists('bold',${$incoming.'_text_style'}) && (${$incoming.'_text_style'}['bold'])) { $sub_options[] = 'bold: \\'true\\''; } elseif (array_key_exists('bold',${$incoming.'_text_style'})) { $sub_options[] = 'bold: \\'false\\''; } \n if (array_key_exists('italic',${$incoming.'_text_style'}) && (${$incoming.'_text_style'}['italic'])) { $sub_options[] = 'italic: \\'true\\''; } elseif (array_key_exists('italic',${$incoming.'_text_style'})) { $sub_options[] = 'italic: \\'false\\''; } \n if (count($sub_options) > 0) { $axis_options[] = 'textStyle: {'.implode(', ',$sub_options).'}'; }\n $sub_options = array();\n if (${$incoming.'_min'} !== false) { $sub_options[] = 'min: '.${$incoming.'_min'}; }\n if (${$incoming.'_max'} !== false) { $sub_options[] = 'max: '.${$incoming.'_max'}; }\n if (count($sub_options) > 0) { $axis_options[] = 'viewWindow: {'.implode(', ',$sub_options).'}'; }\n if (${$incoming.'_color'}) { $axis_options[] = 'baselineColor: \\''.${$incoming.'_color'}.'\\''; } //x_axis_color and y_axis_color\n $sub_options = array();\n if (${$incoming.'_gridlines'} !== false) { $sub_options[] = 'count: '.round(${$incoming.'_gridlines'}); }\n if (${$incoming.'_color'}) { $sub_options[] = 'color: \\''.${$incoming.'_color'}.'\\''; } //use axis color for gridlines too\n if (count($sub_options) > 0) { $axis_options[] = 'gridlines: {'.implode(', ',$sub_options).'}'; }\n if (count($axis_options) > 0) { $options[] = $outgoing.': {'.implode(', ',$axis_options).'}'; }\n } \n\n $bc_options = array();\n if ($y_axis_title) { $bc_options[] = 'title: \\''.addslashes($y_axis_title).'\\', titleTextStyle: {fontSize:12,italic:\\'false\\'}'; }\n if ($background_color) { $bc_options[] = 'fill: \\''.$background_color.'\\''; }\n if ($border_color) { $bc_options[] = 'stroke: \\''.$border_color.'\\''; }\n if ($border_width) { $bc_options[] = 'strokeWidth: \\''.$border_width.'\\''; }\n if (count($bc_options) > 0) { $options[] = 'backgroundColor: {'.implode(', ',$bc_options).'}'; }\n\n if ($region) { $options[] = 'region: \\''.$region.'\\''; } //only works on geo charts\n if ($resolution) { $options[] = 'resolution: \\''.$resolution.'\\''; } //only works on geo charts\n if ($smooth) { $options[] = 'curveType: \\'function\\''; } //only works on line charts\n if ($bar_group_width) { $options[] = 'bar: {groupWidth: \\''.$bar_group_width.'\\'}'; }\n if (is_array($colors)) {\n $color_option = 'colors:[';\n $c = ''; foreach ($colors as $color) { $color_option .= $c.'\\''.$color.'\\''; $c = ','; }\n $color_option .= ']';\n if ($chart == 'GeoChart') { $color_option = 'colorAxis: {'.$color_option.'}'; }\n\n $options[] = $color_option;\n }\n\n if ($hide_legend) { $options[] = 'legend:\\'none\\''; }\n else {\n $legend_options = array();\n if ($legend_position) { $legend_options[] = 'position:\\''.$legend_position.'\\''; }\n if (count($legend_options) > 0) { $options[] = 'legend: {'.implode(', ',$legend_options).'}'; }\n }\n\n if (is_numeric($margins)) { $margins = array($margins,$margins,$margins,$margins); } //if a single value, set it for all 4 sides\n if ((is_array($margins)) && (count($margins) == 4)) {\n list($top,$right,$bottom,$left) = $margins;\n $chartarea = array();\n $chartarea['top'] = $top;\n $chartarea['left'] = $left;\n $chartarea['width'] = $width - $left - $right;\n $chartarea['height'] = $height - $top - $bottom;\n foreach ($chartarea as $key => $value) { $chartarea[$key] = $key.':'.$value; }\n $options[] = 'chartArea: {'.implode(',',$chartarea).'}';\n }\n \n if ($tooltips_html) { $options[] = 'tooltip:{isHtml:true}'; }\n\n $script .= ' var options = {'.implode(',',$options).'};'.$eol;\n \n if ($dashboard) {\n $script .= ' var chart = new google.visualization.ChartWrapper({'.$eol;\n $script .= ' \\'chartType\\': \\''.$chart.'\\','.$eol;\n $script .= ' \\'containerId\\': \\''.$chart_div.'\\','.$eol;\n $script .= ' \\'options\\': options'.$eol;\n $script .= ' });'.$eol;\n if ($category_filter) { $script .= ' dashboard.bind(categoryPicker, chart);'.$eol; }\n $script .= ' dashboard.draw(data);'.$eol;\n } else {\n $script .= ' var chart = new google.visualization.'.$chart.'(document.getElementById(\\''.$chart_div.'\\'));'.$eol;\n $script .= ' chart.draw(data, options);'.$eol;\n }\n $script .= '}'.$eol;\n $script .= '</script>'.$eol;\n\n $div = ''.$eol;\n if ($dashboard) { $div .= '<div id=\"'.$chart_div.'_dashboard\">'.$eol; }\n if ($responsive) { $div_width = 300; } //this will get overwritten by JavaScript and is just here to prevent zooming on page load\n else { $div_width = $width; }\n $div .= '<div id=\"'.$chart_div.'\" style=\"width:'.$div_width.'px;height:'.$height.'px;'.$div_style.'\"></div> '.$eol;\n if ($category_filter) { $div .= '<div id=\"'.$chart_div.'_filter\"></div>'.$eol; }\n if ($dashboard) { $div .= '</div>'.$eol; }\n if ($responsive) { //resize the div itself (with JavaScript)\n $div .= '<script type=\"text/javascript\">'.$eol;\n $div .= ' var new_width = window.'.$chart_div.'_width + \\'px\\';'.$eol;\n $div .= ' var new_height = window.'.$chart_div.'_height + \\'px\\';'.$eol;\n $div .= ' document.getElementById(\\''.$chart_div.'\\').style.width = new_width;'.$eol;\n $div .= ' document.getElementById(\\''.$chart_div.'\\').style.height = new_height;'.$eol;\n $div .= '</script>'.$eol;\n }\n\n $html = '<html>'.$eol;\n $html .= '<head>'.$eol;\n $html .= $script;\n $html .= '</head>'.$eol;\n $html .= '<body>'.$eol;\n $html .= $div;\n $html .= '</body>'.$eol;\n $html .= '</html>'.$eol;\n return array('script'=>$script,'div'=>$div,'html'=>$html);\n}", "title": "" }, { "docid": "b950e0133beada1bada387593ad04fff", "score": "0.42566377", "text": "public function getDataSet()\n {\n return $this->getParameter('dataSet');\n }", "title": "" }, { "docid": "eb3a134b48448eb49808e3ca035137d3", "score": "0.4249988", "text": "public function getJsData(){\r\n\t\t\t$count = ( count($this->weights) == count($this->heights) )? count($this->weights) : NULL;\r\n\r\n\t\t\t$data = '';\r\n\t\t\tfor ($i=0; $i < $count; $i++) {\r\n\t\t\t\t$data .= '['.$this->weights[$i].','.$this->heights[$i].'],';\r\n\t\t\t}\r\n\t\t\treturn $data;\r\n\t\t}", "title": "" }, { "docid": "fdd4eafb5ed6ec912eab0f4c636fa5ec", "score": "0.42448232", "text": "function register_embed_for_js( $service_key, $embed_id, $src ) {\n global $air_cookie_embeds;\n\n // Get the language for strings\n $lang = \\Air_Cookie\\get_current_language();\n\n // Build embed base\n $service = [\n 'embedUrl' => $src,\n 'cookie' => [\n 'name' => 'air_cookie_embeds', // By default, use same cookie for all embeds\n ],\n 'languages' => [\n $lang => [\n 'notice' => \\Air_Cookie\\maybe_get_polylang_translation( 'embeds_description' ),\n 'loadBtn' => \\Air_Cookie\\maybe_get_polylang_translation( 'embeds_load_button' ),\n ]\n ],\n ];\n\n // Try to get thumbnail, add if one exists\n $thumbnail_url = apply_filters( 'air_cookie\\embeds\\thumbnail', null, $src );\n if ( ! empty( $thumbnail_url ) ) {\n $service['thumbnailUrl'] = $thumbnail_url;\n }\n\n // Add embed to our services array for javascript\n $air_cookie_embeds[ $service_key ] = $service;\n}", "title": "" }, { "docid": "4033fde3213bae3647dd0109fef66461", "score": "0.42212418", "text": "function xp_dataset_data_callback_func() {\n\n\twp_nonce_field( 'xp_dataset_metabox', 'xp_dataset_nonce' );\n\t$meta_box = '<div id = \"xp_dataset_wrapper\">';\n\n\t$xp_dataset = get_post_meta( get_the_ID(), 'xp_dataset', true);\n\n\tif ($xp_dataset) {\n\n\t\tforeach( $xp_dataset as $key => $dataset ) {\n\n\t\t\t$meta_box .= xp_dataset_admin_values_html( $dataset['value'], $dataset['text'] );\n\t\t}\t\n\n\t} else {\n\t\t\n\t\t$meta_box .= xp_dataset_admin_values_html();\n\n\t}\n\n\t$meta_box .= '</div><div id = \"xp_dataset_add_item\"><a href = \"#\">Add Item</a></div>';\n\n\techo $meta_box;\n\n}", "title": "" }, { "docid": "7236882e5db226c0a00f29db4cdf304a", "score": "0.42154145", "text": "function create_parenttab_data_file()\n\t{\n\t\t$parenttabs = XN_Query::create('Content')->tag('Parenttabs')\n\t\t\t\t\t\t\t\t->filter('type', 'eic', 'parenttabs')\n\t\t\t\t\t\t\t\t->filter('my.presence', '=', '0')\n\t\t\t\t\t\t\t\t->order('my.sequence', XN_Order::ASC_NUMBER)\n\t\t\t\t\t\t\t\t->execute();\n\t\t$result_array = Array ();\n\t\tforeach ($parenttabs as $parenttab_info)\n\t\t{\n\t\t\t$parenttabname = $parenttab_info->my->parenttabname;\n\t\t\t$result_array [] = $parenttabname;\n\t\t}\n\t\t$all_parenttabs = XN_Query::create('Content')->tag('Parenttabs')\n\t\t\t\t\t\t\t\t\t\t->filter('type', 'eic', 'parenttabs')\n\t\t\t\t\t\t\t\t\t\t->order('published', XN_Order::ASC)\n\t\t\t\t\t\t\t\t\t\t->execute();\n\t\t$all_parenttabs_array = Array ();\n\t\tforeach ($all_parenttabs as $parenttab_info)\n\t\t{\n\t\t\t$parenttabname = $parenttab_info->my->parenttabname;\n\t\t\t$all_parenttabs_array [] = $parenttabname;\n\t\t}\n\t\t$parent_tabdata = array ();\n\t\t$parent_tabdata['parent_tab_info_array'] = $result_array;\n\t\t$parent_tabdata['all_parent_tab_info_array'] = $all_parenttabs_array;\n\t\t$parChildTabRelArray = Array ();\n\t\tforeach ($parenttabs as $parenttab_info)\n\t\t{\n\t\t\t$parenttabname = $parenttab_info->my->parenttabname;\n\t\t\t$tabname = $parenttab_info->my->tabname;\n\t\t\t$all_tabs = XN_Query::create('Content')\n\t\t\t\t\t\t\t\t\t ->tag('Tabs')\n\t\t\t\t\t\t\t\t\t ->filter('type', 'eic', 'tabs')\n\t\t\t\t\t\t\t\t\t ->filter('my.presence', '=', '0')\n\t\t\t\t\t\t\t\t\t ->filter('my.tabname', 'in', (array)$tabname)\n\t\t\t\t\t\t\t\t\t ->order('my.tabsequence', XN_Order::ASC_NUMBER)\n\t\t\t\t\t\t\t\t\t ->end(-1)\n\t\t\t\t\t\t\t\t\t ->execute();\n\t\t\t$alltabs = array ();\n\t\t\tforeach ($all_tabs as $tab_info)\n\t\t\t{\n\t\t\t\t$alltabs[] = $tab_info->my->tabname;\n\t\t\t}\n\t\t\t$parChildTabRelArray [$parenttabname] = $alltabs;\n\t\t}\n\t\t$parent_tabdata['parent_child_tab_rel_array'] = $parChildTabRelArray;\n\t\t$all_parChildTabRelArray = Array ();\n\t\tforeach ($all_parenttabs as $parenttab_info)\n\t\t{\n\t\t\t$parenttabname = $parenttab_info->my->parenttabname;\n\t\t\t$all_parChildTabRelArray [$parenttabname] = $parenttab_info->my->tabname;\n\t\t}\n\t\t$parent_tabdata['all_parent_child_tab_rel_array'] = $all_parChildTabRelArray; \n\t\ttry\n\t\t{\n\t\t\t$session = XN_MemCache::get(\"session_\".XN_Application::$CURRENT_URL);\n\t\t\t$session['parent_tabdata'] = $parent_tabdata;\n\t\t\tXN_MemCache::put($session, \"session_\".XN_Application::$CURRENT_URL);\n\t\t}\n\t\tcatch (XN_Exception $e)\n\t\t{\n\t\t\t$session = array();\n\t\t\t$session['parent_tabdata'] = $parent_tabdata;\n\t\t\tXN_MemCache::put($session, \"session_\".XN_Application::$CURRENT_URL);\n\t\t}\n\t\treturn $parent_tabdata;\n\t}", "title": "" }, { "docid": "0688f38ac8303b8ceebc01910539b08d", "score": "0.42065316", "text": "static function out( $dt, $ids ) \n\t\t{\n\t\t\t$jsa = array();\n\t\t\t$jsa[] = '\"show_datatype\":\"'.$dt.'\"';\n\t\t\t$jsa[] = '\"show_id\":['.implode(\",\", $ids).\"]\";\n\t\t\t$jsa[] = '\"logged_as\":'.State::getUID();\n\n\t\t\t$data = array();\n\t\t\t$data[] = Character::globalJSon();\n\t\t\t$data[] = Fit::globalJSon();\n\t\t\t$data[] = Item::globalJSon();\n\n\t\t\t$jsa[] = \"\\\"data\\\":{\\n\".implode(\",\",$data).\"\\n}\";\n\t\t\techo makeArray($jsa);\n\t\t}", "title": "" }, { "docid": "4c31b177ebfaca21c7e908852b142c64", "score": "0.41961998", "text": "public function appendData($dataset_name, Array $rows, $delete_by = null)\n {\n return $this->postData($dataset_name, $rows, $delete_by);\n }", "title": "" }, { "docid": "59c32fc4ce69a74f8e59f4d3fbefa5a3", "score": "0.41825956", "text": "public function setDataSetter(DataSetterInterface $dataSetter);", "title": "" }, { "docid": "c27c1c848da3a56f825b5c5540498498", "score": "0.41796052", "text": "function loadData() \n{\n global $seriesArray;\n global $editLink;\n\n\n // Get a list of all the series entries in the table\n $seriesArray = array();\n $seriesManager = new RowManager_SeriesManager();\n \n // get all the rows in this table\n $list = $seriesManager->getListIterator();\n \n // for each row\n $list->setFirst();\n while( $series = $list->getNext() ) {\n \n $seriesArray[ $series->getID() ] = $series->getTitle();\n \n } // next row\n \n \n // Define the Edit link:\n // NOTE: how it ends with \"seriesID=\"\n // it is intened for this link to be concatened with the series_id value in the \n // above array\n $editLink = 'ex_SeriesEdit.php?seriesID=';\n\n\n}", "title": "" }, { "docid": "ceb4ebcee0100b36745d6cb6ffd69034", "score": "0.4173516", "text": "function echo_played_daily_matches_for_period_add_datarows($period) {\n $result = get_number_of_daily_matches_for_period($period);\n $rows = mysql_num_rows($result);\n $i = 1;\n while ($row = mysql_fetch_assoc($result)) {\n $day = $row['day'];\n $matches = $row['matches'];\n echo \"var row = data.addRow([\\\"$day\\\", $matches]);\\n\";\n $i++;\n\n }\n}", "title": "" }, { "docid": "3e0d2c8e47e2933676873012d36f22d2", "score": "0.41706592", "text": "public function getDataSetValues($username,$password,$webLink,$dataset,$period){\n\tinclude 'org-unit.php'; \n\tinclude 'elements.php';\n\tforeach($org as $orgUnitName=$orgId){\n// DHIS2 Web API setting \t\n\t<strong>$url =$webLink.\"/api/dataValueSets?dataSet=$dataset&amp;period=$period&amp;orgUnit=$orgId\";</strong>\n// cURL Initialization and execution \n\t\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\tcurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\t$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code\n\t$result=curl_exec ($ch);\n\tcurl_close ($ch);\n\t$data['resultData']= json_decode($result, true);\t\t\t\n\t$i=0;\n\tglobal $element_value;\n\t$dataset_id=1001;\n\tif($i&lt;=7){\t\n\t\t\tforeach($data as $val){\n\t\t\tforeach($resultDataElements as $element_idArray=>;$element_name){\t\t\t\t\n\t\t\t$orgUnitServer =$data['resultData'][\"dataValues\"][$i][\"orgUnit\"];\t\t\t\t \n\t\t $element_idServer=$data['resultData'][\"dataValues\"][$i][\"dataElement\"];\n\t\t\t\t\t\t\n\t\t// if($element_idArray==$element_idServer &amp;&amp; $orgId=$orgUnitServer){\t\t\t\n\t\t// Exported Elements value storing \t\t \n\t\t $element_value =$data['resultData'][\"dataValues\"][$i][\"value\"];\n\t\t\tif(isset($element_value) &amp;&amp; $element_value!=0){\t\t\t\t\t\n\t\t\t$storedBy=$data['resultData'][\"dataValues\"][$i][\"storedBy\"];\n\t\t\t$created=$data['resultData'][\"dataValues\"][$i][\"created\"];\t\t\t\t\t \n\t\t $lastUpdated=$data['resultData'][\"dataValues\"][$i][\"lastUpdated\"];\n\t\t// Insert exported Data in Local Database\n\t\t\t$query=\"INSERT INTO dataset_values SET dataset_id='$dataset_id',period='$period',orgunit='$orgId',orgname='$orgUnitName',element_id='$element_idServer',element_value='$element_value',stored_by='$storedBy',created_date='$created',last_update='$lastUpdated'\";\n\t\t\t$result= $this->;mysqli->;query($query) or die(mysqli_connect_errno().\"Data cannot inserted.DB Installation data already existed. \");\t\t\n\t\t\tif($result){\n\t\t\t\t//echo 'Data Successfully Inserted.';\n\t\t\t\t} \n\t\t\t//}x\n\t\t\t}\n\t\t\t$dataset_id++; $i++;\n\t\t }\n\t\t }\n\t}else{\n\t\tdie();\n }\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "1f58f994ade59058b756b2c2d6796977", "score": "0.41679493", "text": "function createChart($data){\n $i = 0;\n $html = '<script type=\"text/javascript\">'.\n 'google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});'.\n 'google.setOnLoadCallback(drawChart);'.\n 'function drawChart() {'.\n 'var data = google.visualization.arrayToDataTable(['.\n '[\"Tag\", \"Count\"],';\n foreach($data as $tag){\n $html .= '[\"'.$tag['tag'].'\", '.$tag['count'].'],';\n }\n $html .= ']);var options = {'.\n 'title: \"Importance of tag\",'.\n 'legend: { position: \"none\" },'.\n 'histogram: {bucketSize: 1},'.\n 'chartArea: {height: 400},'.\n 'height: 500,'.\n 'width: 1200,'.\n '};'.\n 'var chart = new google.visualization.Histogram(document.getElementById(\"chart_div\"));'.\n 'chart.draw(data, options);'.\n '}'.\n '</script>';\n return $html;\n }", "title": "" }, { "docid": "28f5988678e3e807277216669ce7ef9f", "score": "0.416611", "text": "function export()\n\t{\n\t\t$js = '';\n\t\t$html = '<tr><td colspan=\"2\"><table width=\"100%\">';\n\t\t$type = $this->getQuestionType();\n\t\t$jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = new Array();';\n\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.'][0] = 0;';\n\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.'] = new Array();';\n\n\t\t//not sure if we are going to export also the MULTIPLE_ANSWER_COMBINATION to SCORM\n\t\t//if ($type == MCMA || $type == MULTIPLE_ANSWER_COMBINATION ) {\n\t\tif ($type == MCMA) {\n $id = 1;\n\t\t\t$jstmp = '';\n\t\t\t$jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n\t\t\t\t$identifier = 'question_'.$this->questionJSId.'_multiple_'.$i;\n\t\t\t\t$html .=\n\t\t\t\t\t'<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\n\t\t\t\t$jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i.',';\n }\n\t\t\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].';';\n\t\t\t\t$id++;\n\t\t\t}\n\t\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');'.\"\\n\";\n $js .= 'questions_types['.$this->questionJSId.'] = \\'mcma\\';'.\"\\n\";\n\t\t\t$js .= $jstmpw;\n\t\t} elseif ($type == MULTIPLE_ANSWER_COMBINATION) {\n\t \t$js = '';\n $id = 1;\n $jstmp = '';\n $jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n $identifier = 'question_'.$this->questionJSId.'_exact_'.$i;\n $html .=\n '<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\n $jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i.',';\n }\n $jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].\";\";\n $id++;\n }\n $js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');';\n $js .= 'questions_types['.$this->questionJSId.'] = \"exact\";';\n $js .= $jstmpw;\n\t\t} else {\n\t\t\t$id = 1;\n\t\t\t$jstmp = '';\n\t\t\t$jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n $identifier = 'question_'.$this->questionJSId.'_unique_'.$i;\n\t\t\t\t$identifier_name = 'question_'.$this->questionJSId.'_unique_answer';\n\t\t\t\t$html .=\n\t\t\t\t\t'<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier_name.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\"/>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t$jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i;\n }\n\t\t\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].';';\n\t\t\t\t$id++;\n\t\t\t}\n\t\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');';\n\t\t\t$js .= 'questions_types['.$this->questionJSId.'] = \\'mcua\\';';\n\t\t\t$js .= $jstmpw;\n\t\t}\n\t\t$html .= '</table></td></tr>';\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "66fb69e936659f51d59fbd365e8cb390", "score": "0.41584504", "text": "public function run()\n {\n $dataSets =\n [\n [1, 'INTEL MUA SAFFRON, CÔNG TY DÙNG TRÍ TUỆ NHÂN TẠO ĐỂ DỰ ĐOÁN HƯ HỎNG MÁY BAY', 'ce07459e575717e935be6b84ec32aef7.jpeg', '<p>Intel mới đ&acirc;y đ&atilde; mua lại một c&ocirc;ng ty khởi nghiệp t&ecirc;n Saffron. Họ đ&atilde; ph&aacute;t triển n&ecirc;n c&ocirc;ng nghệ tr&iacute; tuệ nh&acirc;n tạo c&oacute; thể gi&uacute;p &quot;ti&ecirc;u h&oacute;a&quot; dữ liệu từ nhiều nguồn ri&ecirc;ng biệt, kết nối ch&uacute;ng với nhau v&agrave; đưa ra những b&aacute;o c&aacute;o hỗ trợ việc ra quyết định của c&aacute;c doanh nghiệp. Nghe qua th&igrave; c&oacute; vẻ giống với c&aacute;c c&ocirc;ng cụ ph&acirc;n t&iacute;ch dữ liệu hiện nay, tuy nhi&ecirc;n Saffron n&oacute;i rằng &quot;nền tảng tr&iacute; tuệ tự nhi&ecirc;n&quot; của họ c&oacute; thể l&agrave;m điều đ&oacute; một c&aacute;ch hiệu quả hơn bằng việc tự học hỏi v&agrave; nhận biết, kh&ocirc;ng cần phải được lập tr&igrave;nh sẵn c&aacute;c m&ocirc; h&igrave;nh hay quy tắc t&igrave;m kiếm. C&ocirc;ng nghệ của Saffron c&oacute; thể được d&ugrave;ng để dự đo&aacute;n hư hỏng m&aacute;y m&oacute;c trong m&aacute;y bay, dự b&aacute;o t&agrave;i ch&iacute;nh, ph&aacute;t hiện những vụ lừa đảo bảo hiểm v&agrave; hơn thế nữa. Gi&aacute; trị của thương vụ kh&ocirc;ng được tiết lộ.</p>\\r\\n\\r\\n<p><img src=\"//bizweb.dktcdn.net/100/024/820/files/3526824-cv.jpg?v=1445939406474\" style=\"border:0px; box-sizing:border-box; font-family:#e90000,sans-serif !important; max-width:100%; vertical-align:middle\" /></p>\\r\\n\\r\\n<p>Intel n&oacute;i th&ecirc;m: &quot;Ch&uacute;ng t&ocirc;i thấy cơ hội để &aacute;p dụng điện to&aacute;n th&ocirc;ng minh kh&ocirc;ng chỉ trong những cỗ m&aacute;y server to lớn của c&aacute;c doanh nghiệp m&agrave; c&ograve;n trong những thiết bị ti&ecirc;u d&ugrave;ng, vốn đang c&oacute; nhu cầu thấy, cảm nhận v&agrave; hiểu th&ocirc;ng tin phức tạp theo thời gian thực. Saffron sẽ tiếp tục ph&aacute;t triển trong lĩnh vực của họ, cũng như cống hiến cho nỗ lực của Intel về những thiết bị mới, big data, an to&agrave;n th&ocirc;ng tin, sức khỏe v&agrave; Internet of Things&quot;. IBM hiện cũng đang x&agrave;i si&ecirc;u m&aacute;y t&iacute;nh Watson của m&igrave;nh để phục vụ cho việc ph&acirc;n t&iacute;ch dữ liệu bằng tr&iacute; tuệ nh&acirc;n tạo v&agrave; machine learning.</p>\\r\\n', '2017-01-30 14:59:58', '2017-01-30 14:59:58'],\n [7, 'Tạo hiệu ứng chúc mừng năm mới trên iPhone', 'b93f2955926c92ee2333babb2f3e49fc.png', '<div class=\"short_intro txt_666\" style=\"margin: 0px; padding: 0px 0px 10px; color: rgb(68, 68, 68); font-weight: 700; font-stretch: normal; font-size: 14px; line-height: 18px; font-family: arial; width: 480.016px; float: left; text-rendering: geometricPrecision;\">Ứng dụng Tin nhắn tr&ecirc;n iPhone, iPad được bổ sung hiệu ứng đẹp mắt khi người d&ugrave;ng tr&ograve; chuyện dịp Tết.</div>\\n\\n<div id=\"left_calculator\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 0); font-family: arial; font-size: 12px;\">\\n<div class=\"fck_detail width_common block_ads_connect\" style=\"margin: 0px; padding: 0px 9.59375px 0px 0px; width: 470.406px; float: left; overflow: hidden; font-stretch: normal; font-size: 14px; line-height: normal; color: rgb(51, 51, 51);\">\\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"tplCaption\" style=\"margin:0px auto 10px; max-width:100%; padding:0px; width:300px\">\\n <tbody>\\n <tr>\\n <td><img alt=\"tao-hieu-ung-chuc-mung-nam-moi-tren-iphone\" src=\"http://img.f5.sohoa.vnecdn.net/2017/01/25/IMG-0248-PNG-6345-1485328654.png\" style=\"border:0px; font-size:0px; line-height:0; margin:0px; max-width:100%; padding:0px\" /></td>\\n </tr>\\n <tr>\\n <td>\\n <p>Hiệu ứng ph&aacute;o hoa khi nhắn tin &quot;Ch&uacute;c mừng năm mới&quot; tr&ecirc;n iPhone chạy iOS 10.</p>\\n </td>\\n </tr>\\n </tbody>\\n</table>\\n\\n<p>Khi g&otilde; d&ograve;ng chữ &quot;Ch&uacute;c mừng năm mới&quot; tr&ecirc;n iPhone rồi gửi cho bạn b&egrave;, ứng dụng Tin nhắn sẽ xuất hiện hiệu ứng ph&aacute;o hoa tr&ecirc;n m&agrave;n h&igrave;nh. Đ&acirc;y l&agrave; t&iacute;nh năng được Apple bổ sung nh&acirc;n dịp Tết v&agrave; hỗ trợ tr&ecirc;n những thiết bị chạy iOS 10.</p>\\n\\n<p>Hiệu ứng sẽ xuất hiện cho cả người gửi v&agrave; người nhận, bao gồm SMS v&agrave; iMessage. Đầu ti&ecirc;n, m&agrave;n h&igrave;nh Tin nhắn chuyển sang t&ocirc;ng m&agrave;u tối. H&igrave;nh ảnh ph&aacute;o hoa xuất hiện, c&aacute;c đoạn tr&ograve; chuyện được thay bằng m&agrave;u đỏ k&egrave;m chữ m&agrave;u v&agrave;ng. Tuy nhi&ecirc;n, thử nghiệm tr&ecirc;n iPhone 5C c&agrave;i iOS 9 th&igrave; kh&ocirc;ng c&oacute; hiệu ứng.</p>\\n\\n<p>Tương tự, khi g&otilde; &quot;Ch&uacute;c mừng sinh nhật&quot; th&igrave; ứng dụng Tin nhắn tr&ecirc;n iPhone cũng xuất hiện hiệu ứng b&oacute;ng bay. Cả hai c&uacute; ph&aacute;p &aacute;p dụng với cả tin nhắn tiếng Việt kh&ocirc;ng dấu, như &quot;Chuc mung sinh nhat&quot; hay &quot;Chuc mung nam moi&quot;.</p>\\n</div>\\n</div>\\n', '2017-01-27 14:42:56', '2017-01-27 14:42:12'],\n [8, 'TV cháy hàng trước Tết Đinh Dậu', '6d55e29b3e3503d7f9e1b876f555ea45.jpeg', '<div class=\"short_intro txt_666\" style=\"margin: 0px; padding: 0px 0px 10px; color: rgb(68, 68, 68); font-weight: 700; font-stretch: normal; font-size: 14px; line-height: 18px; font-family: arial; width: 480.016px; float: left; text-rendering: geometricPrecision;\">Lượng kh&aacute;ch h&agrave;ng quan t&acirc;m đến TV tăng đột biến khiến một số si&ecirc;u thị điện m&aacute;y kh&ocirc;ng c&ograve;n một số mẫu TV để b&aacute;n trước Tết cả tuần.&nbsp;</div>\\r\\n\\r\\n<div id=\"left_calculator\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 0); font-family: arial; font-size: 12px;\">\\r\\n<div class=\"fck_detail width_common block_ads_connect\" style=\"margin: 0px; padding: 0px 9.59375px 0px 0px; width: 470.406px; float: left; overflow: hidden; font-stretch: normal; font-size: 14px; line-height: normal; color: rgb(51, 51, 51);\">\\r\\n<p>Tại nhiều si&ecirc;u thị điện m&aacute;y lớn ở H&agrave; Nội v&agrave; TP HCM, một số d&ograve;ng TV đ&atilde; được th&ocirc;ng b&aacute;o hết h&agrave;ng d&ugrave; v&agrave;i ng&agrave;y nữa mới đến Tết, hoặc phải đặt trước rồi chờ tới giữa th&aacute;ng 2, tức qua Tết, mới nhận được.&nbsp;</p>\\r\\n\\r\\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"tplCaption\" style=\"margin:0px auto 10px; max-width:100%; padding:0px; width:470px\">\\r\\n <tbody>\\r\\n <tr>\\r\\n <td><img alt=\"Nhiều mẫu TV của Sony đã được các siêu thị điện máy thông báo hết hàng.\" src=\"http://img.f5.sohoa.vnecdn.net/2017/01/25/Screen-Shot-2017-01-25-at-10-1-5968-9142-1485318870.png\" style=\"border:0px; font-size:0px; line-height:0; margin:0px; max-width:100%; padding:0px; width:470px\" /></td>\\r\\n </tr>\\r\\n <tr>\\r\\n <td>\\r\\n <p>Nhiều mẫu TV của Sony đ&atilde; được c&aacute;c si&ecirc;u thị điện m&aacute;y th&ocirc;ng b&aacute;o hết h&agrave;ng trong dịp Tết.</p>\\r\\n </td>\\r\\n </tr>\\r\\n </tbody>\\r\\n</table>\\r\\n\\r\\n<p>Sau nhiều năm, hiện tượng &quot;ch&aacute;y h&agrave;ng&quot; đ&atilde; quay trở lại thị trường TV Tết năm nay. Theo &ocirc;ng Tuấn Anh, Gi&aacute;m đốc ng&agrave;nh h&agrave;ng điện tử hệ thống Media Mart (H&agrave; Nội), năm nay đ&atilde; c&oacute; nhiều TV hết h&agrave;ng nhanh tr&ecirc;n diện rộng, tức kh&ocirc;ng chỉ kh&ocirc;ng c&ograve;n h&agrave;ng b&aacute;n ở c&aacute;c nơi m&agrave; c&ograve;n tới cả tuần trước khi Tết đến. Trong đ&oacute;, đa phần l&agrave; sản phẩm của Sony.&nbsp;</p>\\r\\n\\r\\n<p>B&agrave; Nguyễn Thị Ngọc Thương, Gi&aacute;m đốc ng&agrave;nh h&agrave;ng TV hệ thống Điện M&aacute;y Xanh cũng cho biết to&agrave;n bộ dải sản phẩm của Sony đều đang trong t&igrave;nh trạng khan h&agrave;ng dịp cuối năm, thậm ch&iacute; một số model 43 inch của thương hiệu n&agrave;y đ&atilde; hết sạch h&agrave;ng để b&aacute;n.&nbsp;</p>\\r\\n\\r\\n<p>Tại một số cửa h&agrave;ng nhỏ ở Hai B&agrave; Trưng hay Nguyễn Tr&atilde;i (H&agrave; Nội), khi hỏi mua những model như Sony 43X8000D hay 43X8000E, kh&aacute;ch h&agrave;ng cũng sẽ nhận được c&acirc;u trả lời kh&ocirc;ng c&oacute; h&agrave;ng. Tuy nhi&ecirc;n, những nơi c&ograve;n mẫu b&aacute;n th&igrave; kh&ocirc;ng thấy hiện tượng đội gi&aacute;.</p>\\r\\n\\r\\n<p>Nguy&ecirc;n nh&acirc;n khiến cho t&igrave;nh trạng &quot;ch&aacute;y h&agrave;ng&quot; t&aacute;i xuất ở thị trường TV Tết năm nay l&agrave; sức mua TV cuối năm v&agrave; trước Tết bất ngờ tăng đột biến. Theo hệ thống Media Mart, doanh số b&aacute;n TV trong dịp Tết n&agrave;y đ&atilde; tăng tới 170% so với năm ngo&aacute;i. Trong khi đ&oacute;, đại diện hệ thống Điện M&aacute;y Xanh cho biết, số lượng TV b&aacute;n ra trong th&aacute;ng cận Tết đ&atilde; tăng gấp đ&ocirc;i so với 2 th&aacute;ng trước đ&oacute;.&nbsp;</p>\\r\\n\\r\\n<p>Theo &ocirc;ng Tuấn Anh, TV l&agrave; mặt h&agrave;ng kinh doanh theo m&ugrave;a vụ, doanh số th&aacute;ng cuối năm c&oacute; thể bằng cả năm cộng lại v&igrave; thế c&aacute;c h&atilde;ng đều phải đưa ra dự b&aacute;o trước khi tung h&agrave;ng ra thị trường.&nbsp;Năm nay, việc dự b&aacute;o của Sony chưa tốt n&ecirc;n mới dẫn đến t&igrave;nh trạng ch&aacute;y h&agrave;ng. Giờ cửa h&agrave;ng muốn nhập th&ecirc;m về b&aacute;n cũng kh&ocirc;ng c&ograve;n.&nbsp;</p>\\r\\n\\r\\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"tplCaption\" style=\"margin:0px auto 10px; max-width:100%; padding:0px; width:470px\">\\r\\n <tbody>\\r\\n <tr>\\r\\n <td><img alt=\"Sức tiêu thụ TV dịp Tết năm nay đang tăng đột biến, tại một số hệ thống doanh số bán đã cao gấp đôi năm ngoái.\" src=\"http://img.f5.sohoa.vnecdn.net/2017/01/25/IMG-4310-JPG-1167-1485318870.jpg\" style=\"border:0px; font-size:0px; line-height:0; margin:0px; max-width:100%; padding:0px; width:470px\" /></td>\\r\\n </tr>\\r\\n <tr>\\r\\n <td>\\r\\n <p>Sức ti&ecirc;u thụ TV dịp Tết năm nay đang tăng đột biến, tại một số hệ thống doanh số b&aacute;n đ&atilde; cao gấp đ&ocirc;i năm ngo&aacute;i.</p>\\r\\n </td>\\r\\n </tr>\\r\\n </tbody>\\r\\n</table>\\r\\n\\r\\n<p>Trong khi đ&oacute;, đại diện hệ thống Điện M&aacute;y Xanh cũng cho biết, d&ugrave; ch&aacute;y h&agrave;ng, Sony chưa phải l&agrave; h&atilde;ng c&oacute; số lượng ti&ecirc;u thụ tốt nhất dịp n&agrave;y. Samsung, LG v&agrave; c&aacute;c thương hiệu kh&aacute;c đều cung cấp lượng h&agrave;ng kh&aacute; dồi d&agrave;o n&ecirc;n kh&ocirc;ng gặp cảnh &quot;ch&aacute;y h&agrave;ng&quot; như Sony.</p>\\r\\n\\r\\n<p>TV b&aacute;n chạy trong dịp Tết năm nay tập trung v&agrave;o ph&acirc;n kh&uacute;c tầm trung k&iacute;ch thước 43, 49 v&agrave; 55 inch, với cả TV thường v&agrave; TV 4K. Trong đ&oacute;, trội hơn cả l&agrave; c&aacute;c model 43 inch.&nbsp;</p>\\r\\n\\r\\n<p>Theo những người d&ugrave;ng c&oacute; kinh nghiệm, TV l&agrave; sản phẩm &iacute;t thay đổi v&agrave; n&acirc;ng cấp qua c&aacute;c đời. V&igrave; thế, nếu gặp t&igrave;nh trạng sản phẩm muốn mua kh&ocirc;ng c&ograve;n h&agrave;ng, người d&ugrave;ng vẫn c&ograve;n nhiều lựa chọn kh&aacute;c để c&acirc;n nhắc. Thiết kế, chất lượng h&igrave;nh ảnh v&agrave; gi&aacute; b&aacute;n l&agrave; c&aacute;c yếu tố cần quan t&acirc;m nhất khi mua TV trong dịp Tết.</p>\\r\\n</div>\\r\\n</div>\\r\\n', '2017-01-27 14:48:36', '2017-01-27 14:48:36'],\n [9, 'iOS 10.3 sẽ có tính năng tìm tai nghe', '62db088b841b1002a0a6a5d07e6e7d5f.jpeg', '<div class=\"short_intro txt_666\" style=\"margin: 0px; padding: 0px 0px 10px; color: rgb(68, 68, 68); font-weight: 700; font-stretch: normal; font-size: 14px; line-height: 18px; font-family: arial; width: 480.016px; float: left; text-rendering: geometricPrecision;\">&quot;Find My AirPods&quot; (T&igrave;m AirPods) xuất hiện trong bản thử nghiệm iOS mới, cho ph&eacute;p người d&ugrave;ng x&aacute;c định vị tr&iacute; của tai nghe kh&ocirc;ng d&acirc;y.</div>\\r\\n\\r\\n<div class=\"relative_new\" style=\"margin: 0px; padding: 0px 0px 5px; width: 480.016px; float: left; color: rgb(0, 0, 0); font-family: arial; font-size: 12px;\">\\r\\n<ul style=\"list-style-type:none\">\\r\\n <li><a href=\"http://sohoa.vnexpress.net/tin-tuc/doi-song-so/cach-deo-tai-nghe-airpods-de-khong-bi-roi-3517329.html\" style=\"margin: 0px; padding: 0px; color: rgb(102, 102, 102); text-decoration: none; outline: 1px; font-weight: 700; font-stretch: normal; line-height: 16px;\">C&aacute;ch đeo tai nghe AirPods để kh&ocirc;ng bị rơi</a>&nbsp;/&nbsp;<a href=\"http://sohoa.vnexpress.net/tin-tuc/san-pham/apple-bat-dau-ban-tai-nghe-khong-day-airpods-gia-159-usd-3513110.html\" style=\"margin: 0px; padding: 0px; color: rgb(102, 102, 102); text-decoration: none; outline: 1px; font-weight: 700; font-stretch: normal; line-height: 16px;\">Apple bắt đầu b&aacute;n tai nghe kh&ocirc;ng d&acirc;y AirPods, gi&aacute; 159 USD</a></li>\\r\\n</ul>\\r\\n</div>\\r\\n\\r\\n<div id=\"left_calculator\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 0); font-family: arial; font-size: 12px;\">\\r\\n<div class=\"fck_detail width_common block_ads_connect\" style=\"margin: 0px; padding: 0px 9.59375px 0px 0px; width: 470.406px; float: left; overflow: hidden; font-stretch: normal; font-size: 14px; line-height: normal; color: rgb(51, 51, 51);\">\\r\\n<p>Với thiết kế kh&ocirc;ng d&acirc;y ho&agrave;n to&agrave;n, AirPods của Apple mang đến nhiều thuận tiện khi sử dụng. Nhưng kiểu d&aacute;ng đ&oacute; cũng khiến mẫu tai nghe c&oacute; gi&aacute; 159 USD n&agrave;y dễ bị rơi hoặc bỏ qu&ecirc;n. Trong iOS 10.3 beta, Apple đ&atilde; &quot;xoa dịu&quot; nỗi lo của người d&ugrave;ng bằng việc th&ecirc;m t&iacute;nh năng t&igrave;m AirPods.</p>\\r\\n\\r\\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"tplCaption\" style=\"margin:0px auto 10px; max-width:100%; padding:0px; width:400px\">\\r\\n <tbody>\\r\\n <tr>\\r\\n <td><img alt=\"ios-103-se-co-tinh-nang-tim-tai-nghe\" src=\"http://img.f5.sohoa.vnecdn.net/2017/01/25/find-my-airpods-3018-1485311318.jpg\" style=\"border:0px; font-size:0px; line-height:0; margin:0px; max-width:100%; padding:0px\" /></td>\\r\\n </tr>\\r\\n <tr>\\r\\n <td>\\r\\n <p>Giao diện Find My AirPods tr&ecirc;n iOS 10.3 beta.</p>\\r\\n </td>\\r\\n </tr>\\r\\n </tbody>\\r\\n</table>\\r\\n\\r\\n<p>Find My AirPods xuất hiện trong menu của ứng dụng Find My iPhone. Khi mở t&ugrave;y chọn n&agrave;y, tai nghe sẽ ph&aacute;t ra &acirc;m thanh to dần gi&uacute;p người d&ugrave;ng x&aacute;c định vị tr&iacute;. Bạn cũng c&oacute; thể t&ugrave;y chọn &acirc;m th&ocirc;ng b&aacute;o ph&aacute;t tr&ecirc;n tai tr&aacute;i hoặc phải, nếu một trong hai b&ecirc;n AirPods bị mất.</p>\\r\\n\\r\\n<p>Vị tr&iacute; của tai nghe cũng được x&aacute;c định th&ocirc;ng qua GPS của iPhone hoặc những thiết bị iOS kh&aacute;c m&agrave; n&oacute; kết nối tới. Th&ocirc;ng qua dữ liệu n&agrave;y, người d&ugrave;ng c&oacute; thể x&aacute;c định vị tr&iacute; AirPods bị rơi, ở khoảng c&aacute;ch tương đối.</p>\\r\\n\\r\\n<p>Theo&nbsp;<em>MacRumors</em>, Find My AirPods kh&ocirc;ng phải l&agrave; giải ph&aacute;p ho&agrave;n hảo, những phần n&agrave;o gi&uacute;p khoanh v&ugrave;ng vị tr&iacute; thiết bị bị rơi. Tr&ecirc;n iOS 10.3 beta, t&iacute;nh năng n&agrave;y được tự động k&iacute;ch hoạt v&agrave; hứa hẹn sẽ c&oacute; tr&ecirc;n phi&ecirc;n bản ch&iacute;nh thức.</p>\\r\\n</div>\\r\\n</div>\\r\\n', '2017-01-27 14:52:48', '2017-01-27 14:52:48'],\n [10, 'Không thể ra khỏi nhà vì dị ứng với Wi-Fi', 'db8da2480a624690438f3cfd3ece8441.jpeg', '<div class=\"short_intro txt_666\" style=\"margin: 0px; padding: 0px 0px 10px; color: rgb(68, 68, 68); font-weight: 700; font-stretch: normal; font-size: 14px; line-height: 18px; font-family: arial; width: 480.016px; float: left; text-rendering: geometricPrecision;\">Kim De&#39;Atta bị chứng nhạy cảm điện từ n&ecirc;n kh&ocirc;ng thể ở gần nơi n&agrave;o c&oacute; s&oacute;ng điện thoại hoặc Wi-Fi v&agrave; gần như phải ở trong nh&agrave; vĩnh viễn.</div>\\r\\n\\r\\n<div id=\"left_calculator\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 0); font-family: arial; font-size: 12px;\">\\r\\n<div class=\"fck_detail width_common block_ads_connect\" style=\"margin: 0px; padding: 0px 9.59375px 0px 0px; width: 470.406px; float: left; overflow: hidden; font-stretch: normal; font-size: 14px; line-height: normal; color: rgb(51, 51, 51);\">\\r\\n<p>Kim De&#39;Atta (ở&nbsp;Somerset, một hạt nhỏ ở t&acirc;y nam nước Anh)&nbsp;mắc một căn bệnh hiếm gặp khi cơ thể nhạy cảm qu&aacute; mức với s&oacute;ng điện từ. Tiếp x&uacute;c với c&aacute;c t&iacute;n hiệu từ điện thoại di động, ở l&acirc;u trong khu vực c&oacute; s&oacute;ng Wi-Fi hay trường điện từ mạnh c&ocirc; đều bị đau nửa đầu, mệt mỏi hay thậm ch&iacute; nhiễm tr&ugrave;ng nghi&ecirc;m trọng.</p>\\r\\n\\r\\n<p>Điều n&agrave;y khiến cho Kim hiếm khi rời khỏi nh&agrave; để đi du lịch. Căn nh&agrave; c&ocirc; ở cũng phải sửa lại để ngăn c&aacute;c loại s&oacute;ng điện từ từ b&ecirc;n ngo&agrave;i.&nbsp;Khi buộc phải ra ngo&agrave;i, c&ocirc; phải đội chiếc mũ đặc biệt để che chắn c&aacute;c t&iacute;n hiệu s&oacute;ng v&agrave; chỉ được đến những nơi c&oacute; &iacute;t nguồn s&oacute;ng di động.</p>\\r\\n\\r\\n<p><img alt=\"khong-the-ra-khoi-nha-vi-di-ung-voi-wi-fi\" src=\"http://img.f5.sohoa.vnecdn.net/2017/01/24/kim1-3258-1485245193.jpg\" style=\"border:0px; font-size:0px; line-height:0; margin:0px; max-width:100%; padding:0px\" /></p>\\r\\n\\r\\n<p>&quot;Hầu hết mọi người nghĩ t&ocirc;i đi&ecirc;n. Rất kh&oacute; khăn giải th&iacute;ch bởi mọi người kh&ocirc;ng cảm thấy n&oacute; (s&oacute;ng điện từ)&quot;, Kim cho biết. &quot;T&ocirc;i đ&atilde; l&acirc;u kh&ocirc;ng nh&igrave;n thấy bạn b&egrave; v&agrave; gia đ&igrave;nh. Mỗi năm, t&ocirc;i chỉ đ&oacute;n hai vị kh&aacute;ch v&agrave; họ chỉ lưu lại đ&acirc;y nửa ng&agrave;y. Người gần gũi nhất đ&atilde; 10 năm t&ocirc;i kh&ocirc;ng gặp mặt v&agrave; mới đ&acirc;y t&ocirc;i đ&atilde; bất chấp tất cả để đến gặp. Nếu kh&ocirc;ng đến khi mất, c&ocirc; ấy cũng kh&ocirc;ng biết tại sao ch&aacute;u m&igrave;nh m&atilde;i kh&ocirc;ng đến thăm. T&ocirc;i sẽ kh&ocirc;ng bao giờ tha thứ cho bản th&acirc;n v&igrave; điều đ&oacute;&quot;.</p>\\r\\n\\r\\n<p>Theo&nbsp;<em>Metro</em>, vấn đề của Kim bắt đầu khi c&ocirc; 16 tuổi v&agrave; đang sống ở ph&iacute;a nam London. Căn bệnh xuất hiện khi c&ocirc; đến gần TV. Mọi chuyện tồi tệ hơn một v&agrave;i năm sau đ&oacute; khi c&ocirc; l&agrave;m y t&aacute;, phụ tr&aacute;ch việc chăm s&oacute;c c&aacute;c bệnh nh&acirc;n đặc biệt v&agrave; phải mua một chiếc điện thoại di động để c&oacute; thể li&ecirc;n lạc trong trường hợp khẩn cấp.</p>\\r\\n\\r\\n<p>&quot;Lần đầu ti&ecirc;n t&ocirc;i đặt điện thoại l&ecirc;n nghe, giống như c&oacute; một tia laser đi thẳng v&agrave;o n&atilde;o. Mỗi lần t&ocirc;i đưa điện thoại gần đầu, cảm gi&aacute;c v&ocirc; c&ugrave;ng đau đớn&quot;, C&ocirc; cho biết.</p>\\r\\n\\r\\n<p>Sau đ&oacute;, Kim ng&agrave;y c&agrave;ng c&oacute; cảm gi&aacute;c mệt mỏi v&agrave; hệ thống miễn dịch của cơ thể bị tổn thương nghi&ecirc;m trọng. Cơ thể c&ocirc; bị nhiễm tr&ugrave;ng một c&aacute;ch bất thường. Đ&acirc;y cũng l&agrave; l&uacute;c c&ocirc; ph&aacute;t hiện về căn bệnh c&oacute; t&ecirc;n &quot;nhạy cảm điện từ&quot; (electrosensitivity) v&agrave; nhận ra vấn đề của m&igrave;nh bị g&acirc;y ra bởi c&aacute;c thiết bị ph&aacute;t s&oacute;ng như điện thoại di động, TV, mạng Wi-Fi v&agrave; c&aacute;c thiết bị điện tử.</p>\\r\\n\\r\\n<p>Kim đ&atilde; chuyển đến thị trấn Glastonbury ở Somerset để tho&aacute;t khỏi những con s&oacute;ng v&ocirc; h&igrave;nh v&agrave; cảm thấy sức khỏe tốt trở lại. Tuy nhi&ecirc;n, v&agrave;i năm sau, một cột ph&aacute;t s&oacute;ng lớn được x&acirc;y dựng ở trung t&acirc;m thị trấn. Ngay lập tức, Kim nhận ra sức khỏe của m&igrave;nh lại xấu đi. Chứng đau nửa đầu, mệt mỏi v&agrave; t&igrave;nh trạng nhiễm tr&ugrave;ng t&aacute;i ph&aacute;t.</p>\\r\\n\\r\\n<p>Khi thị trấn bắt đầu c&oacute; t&iacute;n hiệu 3G, cũng l&agrave; l&uacute;c c&ocirc; trải nghiệm cảm gi&aacute;c kh&oacute; thở v&agrave; tim đập nhanh, đau lưng. Tiếp đ&oacute; l&agrave; t&igrave;nh trạng đau tai nghi&ecirc;m trọng v&agrave; cơ thể c&ocirc; trở n&ecirc;n nhạy cảm với &aacute;nh s&aacute;ng. Kim sau đ&oacute; phải chuyển nh&agrave; thị trấn kh&aacute;c.</p>\\r\\n\\r\\n<p>&quot;T&ocirc;i đ&atilde; phải nhờ một người bạn đến đ&oacute;n t&ocirc;i v&igrave; qu&aacute; đau n&ecirc;n kh&ocirc;ng thể di chuyển được nữa. C&aacute;c anh em họ đ&atilde; cho t&ocirc;i một số tiền v&agrave; t&ocirc;i đ&atilde; thử đi du lịch tới những nơi hẻo l&aacute;nh. Nhưng ở khắp mọi nơi, họ đều dựng l&ecirc;n những cột thu ph&aacute;t s&oacute;ng điện thoại&quot;.</p>\\r\\n</div>\\r\\n</div>\\r\\n', '2017-01-27 14:53:23', '2017-01-27 14:53:23'],\n [11, 'HÃNG BÁN LẺ WALMART MUỐN DÙNG DRONE ĐỂ VẬN CHUYỂN HÀNG', '16829dc2c943c9919b5d0481119215b8.jpeg', '<p>Kh&ocirc;ng chỉ c&oacute; Amazon m&agrave; h&ocirc;m nay tập đo&agrave;n b&aacute;n lẻ Walmart cũng tuy&ecirc;n bố kế hoạch d&ugrave;ng m&aacute;y bay drone để chuyển h&agrave;ng v&agrave; phục vụ hoạt động kinh doanh.</p>\\r\\n\\r\\n<p>Cụ thể, họ đ&atilde; đệ tr&igrave;nh văn bản xin ph&eacute;p vận h&agrave;nh thương mại hệ thống m&aacute;y bay kh&ocirc;ng người l&aacute;i ( UAS) trong một số trường hợp nhất định l&ecirc;n cho Cục h&agrave;ng kh&ocirc;ng li&ecirc;n bang Hoa Kỳ để ph&ecirc; duyệt. Nếu được th&ocirc;ng qua, Walmart sẽ t&igrave;m c&aacute;ch sử dụng drone (c&oacute; thể l&ecirc;n tới 25kg) để phục vụ hoạt động kinh doanh của họ.</p>\\r\\n\\r\\n<p><img src=\"//bizweb.dktcdn.net/100/024/820/files/3526847-cv-drone-tinhte.jpg?v=1445939188847\" style=\"border:0px; box-sizing:border-box; font-family:#e90000,sans-serif !important; max-width:100%; vertical-align:middle\" /></p>\\r\\n\\r\\n<p>Trước giờ, ch&uacute;ng ta đ&atilde; nghe n&oacute;i nhiều về những c&ocirc;ng nghệ m&agrave; Google hoặc Amazon,... đang ph&aacute;t triển nhằm phục vụ cho ng&agrave;nh c&ocirc;ng nghiệp vận tải bằng drone vốn vẫn c&ograve;n kh&aacute; non trẻ. Ngược lại, Techcrunch cho biết rằng Walmart đang l&agrave;m việc với h&atilde;ng sản xuất drone DJI v&agrave; trong c&aacute;c thử nghiệm bay để xin cấp ph&eacute;p, họ đ&atilde; sử dụng mẫu DJI Phantom 3 Professional v&agrave; DJI S900 với gi&aacute; lần lượt từ 1224 v&agrave; 1400 đ&ocirc; la.</p>\\r\\n\\r\\n<p>Ngo&agrave;i việc chuyển h&agrave;ng, văn bản xin ph&eacute;p m&agrave; Walmart nộp c&ograve;n đề cập tới c&aacute;c tiềm năng sử dụng drone kh&aacute;c, bao gồm &quot;thu thập dữ liệu từ tr&ecirc;n kh&ocirc;ng để hỗ trợ ph&acirc;n t&iacute;ch kinh doanh&quot;, từ đ&oacute; vận h&agrave;nh qu&aacute; tr&igrave;nh chuyển h&agrave;ng tại c&aacute;c khu d&acirc;n cư nhỏ, hỗ trợ bốc dỡ h&agrave;ng h&oacute;a, ph&acirc;n bổ hoạt động trung t&acirc;m v&agrave; hoạt động tại c&aacute;c khu vực n&ocirc;ng th&ocirc;n.</p>\\r\\n\\r\\n<p>Mặc d&ugrave; hiện tại ở Mỹ chưa c&oacute; nhiều quy phạm ph&aacute;p luật &aacute;p dụng cho việc quản l&yacute; drone nhưng được biết hồi tuần rồi, cục h&agrave;ng kh&ocirc;ng li&ecirc;n bang đ&atilde; ban h&agrave;nh đạo luật y&ecirc;u cầu tất cả những chiếc drone phải đăng k&yacute; cho ch&iacute;nh phủ mới hoạt động được. Cho tới nay, FAA đ&atilde; cấp giấy ph&eacute;p hoạt động cho hơn 2020 trường hợp.</p>\\r\\n', '2017-01-30 15:07:49', '2017-01-30 15:07:49'],\n ];\n\n foreach ($dataSets as $safety) {\n $dataSet[] = [\n 'id' => $safety[0],\n 'title' => $safety[1],\n 'images' => $safety[2],\n 'content' => $safety[3],\n 'user_id' => 1,\n 'created_at' => $safety[4],\n 'updated_at' => $safety[5],\n ];\n }\n\n DB::table('news')->insert($dataSet);\n }", "title": "" }, { "docid": "bc1edc9e3370426224ceb82a481d98a2", "score": "0.4153776", "text": "private function generateAreaChart($questionData, $number, $firstYear)\n {\n $content = \"\";\n $content .= <<<HTML\n <script type=\"text/javascript\">\n\n google.setOnLoadCallback(drawColumnChart);\n\n function drawColumnChart() {\n var data = new google.visualization.DataTable();\nHTML;\n\n $content .= \"data.addColumn('date', 'Year');\";\n\n //Build the JSON Data for the graph\n $graphData = array();\n $finalData = array();\n\n $onFirstYear = true;\n foreach ($questionData as $currentYearData) {\n\n $currentYear = $currentYearData['year'];\n\n $i = !is_null($questionData[$currentYear]['0']['0']['A0']) ? 0 : 1;\n\n $graphData[$currentYear] = array();\n $jsDateString = $currentYear;\n array_push($graphData[$currentYear], $jsDateString);\n\n foreach ($currentYearData['0'] as $answerValue) {\n if ($onFirstYear) {\n $content .= \"data.addColumn('number', 'A\" . $i . \"');\";\n }\n array_push($graphData[$currentYear], $answerValue['A' . $i]);\n $i++;\n }\n array_push($finalData, $graphData[$currentYear]);\n $onFirstYear = false;\n }\n $content .= \"data.addRows(\";\n\n //Replace year strings with javascript date time constructors\n $value_arr = array();\n $replace_keys = array();\n $i = 0;\n foreach ($finalData as $key => &$value) {\n // Store JS Date creation string.\n array_push($value_arr, 'new Date(' . $value['0'] . ', 0, 0)');\n // Replace year string with a 'unique' special key.\n $value['0'] = '%YEAR' . $i . '%';\n // Later on, we'll look for the value, and replace it.\n array_push($replace_keys, '\"' . $value['0'] . '\"');\n $i++;\n }\n\n //Encode array\n $json = json_encode($finalData);\n\n //Replace special place holder values with constructor\n $json = str_replace($replace_keys, $value_arr, $json);\n\n //Actually add formatted graph data to return string\n $content .= $json;\n\n $content .= <<<HTML\n );\n\n var options = {\n height: 400,\n width: 1000,\n hAxis: {title: 'Year', titleTextStyle: {color: '#333'}, format: 'MMM y'},\n vAxis: {minValue: 0}\n };\n\n var chart = new google.visualization.LineChart(document.getElementById('dual_y_div_$number'));\n chart.draw(data, options);\n };\n </script>\n <div class=\"dual_y_div\" id=\"dual_y_div_$number\"></div>\nHTML;\n return $content;\n }", "title": "" }, { "docid": "ade159d20cb1a5ffbcbe0adfe611fe1d", "score": "0.4150567", "text": "function acquirePostedData( $dataset_id, $num_datasets )\n {\n // From config.php\n global $dbname, $dbhost;\n global $udpport, $ipaddr;\n\n // A lot of this only gets posted the first time through\n if ( $dataset_id == 0 )\n {\n $this->add( 'method', $this->analysisType() );\n\n $udp = array();\n $udp['udpport'] = $udpport;\n $udp['ip'] = $ipaddr;\n $this->add( 'server', $udp );\n\n $this->add( 'directory', $_SESSION['request'][$dataset_id]['path'] );\n $this->add( 'datasetCount', $num_datasets );\n\n $database = array();\n $database['name'] = $dbname;\n $database['host'] = $dbhost;\n $database['user_email'] = $_SESSION['email'];\n $database['submitter_email'] = $_SESSION['submitter_email'];\n $this->add( 'database', $database );\n\n $job_parameters = array();\n $job_parameters['s_min'] = $_POST['s_value_min'];\n $job_parameters['s_max'] = $_POST['s_value_max'];\n $job_parameters['ff0_min'] = $_POST['ff0_min'];\n $job_parameters['ff0_max'] = $_POST['ff0_max'];\n\n // Compute 'uniform_grid' (grid repetitions)\n $gpoints_s = $_POST['s_grid_points'];\n $gpoints_k = $_POST['ff0_grid_points'];\n if ( $gpoints_s < 10 )\n $gpoints_s = 10;\n if ( $gpoints_s > 200 )\n $gpoints_s = 200;\n if ( $gpoints_k < 10 )\n $gpoints_k = 10;\n if ( $gpoints_k > 200 )\n $gpoints_k = 200;\n $gpoints = $gpoints_s * $gpoints_k;\n $repsgrid = pow( $gpoints, 0.25 );\n $gridreps = (int)( $repsgrid + 0.5 );\n $grround = $gridreps - 1;\n $subpts_s = (int)( ( $gpoints_s + $grround ) / $gridreps );\n $subpts_k = (int)( ( $gpoints_k + $grround ) / $gridreps );\n $subpts = $subpts_s * $subpts_k;\n while( $subpts > 200 && $gridreps < 40 )\n {\n $gridreps++;\n $grround = $gridreps - 1;\n $subpts_s = (int)( ( $gpoints_s + $grround ) / $gridreps );\n $subpts_k = (int)( ( $gpoints_k + $grround ) / $gridreps );\n $subpts = $subpts_s * $subpts_k;\n }\n while( $subpts < 40 && $gridreps > 1 )\n {\n $gridreps--;\n $grround = $gridreps - 1;\n $subpts_s = (int)( ( $gpoints_s + $grround ) / $gridreps );\n $subpts_k = (int)( ( $gpoints_k + $grround ) / $gridreps );\n $subpts = $subpts_s * $subpts_k;\n }\n $gpoints_s = $subpts_s * $gridreps;\n $gpoints_k = $subpts_k * $gridreps;\n $job_parameters['s_grid_points'] = $gpoints_s;\n $job_parameters['ff0_grid_points'] = $gpoints_k;\n $job_parameters['uniform_grid'] = $gridreps;\n\n $job_parameters['mc_iterations'] = $_POST['mc_iterations'];\n\n if ( isset( $_POST['req_mgroupcount'] ) )\n {\n if ( $job_parameters['mc_iterations'] > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else if ( $num_datasets > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else\n $job_parameters['req_mgroupcount'] = 1;\n }\n\n else\n $job_parameters['req_mgroupcount'] = 1;\n\n $job_parameters['tinoise_option'] = $_POST['tinoise_option'];\n $job_parameters['meniscus_range'] = ( $_POST['meniscus_option'] == 1 )\n ? $_POST['meniscus_range'] : 0.0;\n $job_parameters['meniscus_points'] = ( $_POST['meniscus_option'] == 1 )\n ? $_POST['meniscus_points'] : 1;\n $job_parameters['max_iterations'] = ( $_POST['iterations_option'] == 1 )\n ? $_POST['max_iterations'] : 1;\n $job_parameters['rinoise_option'] = $_POST['rinoise_option'];\n $job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&\n $_POST['debug_timings'] == 'on' )\n ? 1 : 0;\n $job_parameters['debug_level'] = $_POST['debug_level-value'];\n $job_parameters['debug_text'] = $_POST['debug_text-value'];\n $job_parameters['experimentID'] = $_SESSION['experimentID'];\n $this->add( 'job_parameters', $job_parameters );\n\n $dataset = array();\n $dataset[ 0 ]['files'] = array(); // This will be done later\n $dataset[ 0 ]['parameters'] = array();\n }\n\n // These will be done every time\n $parameters = array();\n $this->getDBParams( $dataset_id, $parameters ); // DB parameters\n $centerpiece_shape = $parameters['centerpiece_shape'];\n\n // Create new elements for this dataset\n //?? $parameters = $dataset['parameters'];\n $parameters['rawDataID'] = $_SESSION['request'][$dataset_id]['rawDataID'];\n $parameters['auc'] = $_SESSION['request'][$dataset_id]['filename'];\n $parameters['editedDataID'] = $_SESSION['request'][$dataset_id]['editedDataID'];\n $parameters['edit'] = $_SESSION['request'][$dataset_id]['editFilename'];\n // $parameters['modelID'] = $_SESSION['request'][$dataset_id]['modelID'];\n $parameters['noiseIDs'] = array();\n $parameters['noiseIDs'] = $_SESSION['request'][$dataset_id]['noiseIDs'];\n \n $parameters['simpoints'] = $_POST['simpoints-value'];\n $parameters['band_volume'] = ( $centerpiece_shape == 'band forming' )\n ? $_POST['band_volume-value']\n : 0.0;\n $parameters['radial_grid'] = $_POST['radial_grid'];\n $parameters['time_grid'] = $_POST['time_grid'];\n\n // Get arrays with multiple dataset data\n $dataset = $this->get('dataset');\n // Add new datasets\n $dataset[$dataset_id] = $parameters;\n $this->add( 'dataset', $dataset );\n\n$this->show( 0, \"Payload manager 2DSA\\n\" );\n }", "title": "" }, { "docid": "3d21902c5ff1ec9e4ac7b4eef365248e", "score": "0.41471884", "text": "function uciseventeen_oembed_dataparse( $html, $data, $url ) {\n\t$data->thumbnail_width = \"100%\";\n\n\treturn $html;\n}", "title": "" }, { "docid": "a2e28a3b9d1cbe1d2a86675a4a72d8f2", "score": "0.41466668", "text": "public function generatetoptenalbdetailReport($data){\n $temp1 = MIS_albdetail.'?startdate=' . $data['startdate'] . '&enddate=' . $data['enddate'] . '&group1=' . $data['group1'] .'';\n echo $temp1;\n echo\"<iframe style='border:none' src=\\\"\" . $temp1 . \"\\\"width='900px' height=600>\";\n \n // echo \"hello\";\n \n \n \n }", "title": "" }, { "docid": "04512bf0b4154e3d970a6a8673025a5e", "score": "0.41304776", "text": "private function saveDatasets() {\n $current = [];\n $loopId = 'datasets_dataset_id_';\n $datasetModel = new \\npdc\\model\\Dataset();\n \n foreach (array_keys($_SESSION[$this->formId]['data']) as $key) {\n if (substr($key, 0, strlen($loopId)) === $loopId) {\n $current[] = $this->getFormData($key);\n if (strpos($key, '_new_') !== false) {\n $data = [\n 'project_id' => $this->id, \n 'dataset_id' => $this->getFormData($key),\n 'dataset_version_min' =>\n $datasetModel->getVersions(\n $this->getFormData($key)\n )[0]['dataset_version'],\n 'project_version_min' => $this->version\n ];\n $this->model->insertDataset($data);\n }\n }\n }\n $v = $this->version-1;\n $this->model->deleteDataset($this->id, $v, $current);\n }", "title": "" }, { "docid": "e5f276e5c01b0d1eeabd34ffa7b471a1", "score": "0.41165632", "text": "public function chartDataAction() \n {\n $this -> _helper -> layout -> disableLayout();\n $this -> _helper -> viewRenderer -> setNoRender(true);\n\n // Get params\n $start = $this -> _getParam('start');\n $offset = $this -> _getParam('offset', 0);\n $type = $this -> _getParam('type', 'all');\n $mode = $this -> _getParam('mode');\n $chunk = $this -> _getParam('chunk');\n $period = $this -> _getParam('period');\n $periodCount = $this -> _getParam('periodCount', 1);\n \n $ad_ids = $this -> _getParam('ad_ids', '');\n\n // Validate chunk/period\n if (!$chunk || !in_array($chunk, $this -> _periods)) {\n $chunk = Zend_Date::DAY;\n }\n if (!$period || !in_array($period, $this -> _periods)) {\n $period = Zend_Date::MONTH;\n }\n if (array_search($chunk, $this -> _periods) >= array_search($period, $this -> _periods)) {\n die('whoops');\n return;\n }\n\n // Validate start\n if ($start && !is_numeric($start)) {\n $start = strtotime($start);\n }\n if (!$start) {\n $start = time();\n }\n\n // Fixes issues with month view\n Zend_Date::setOptions(array('extend_month' => true, ));\n\n // Get timezone\n $timezone = Engine_Api::_() -> getApi('settings', 'core') -> getSetting('core_locale_timezone', 'GMT');\n $viewer = Engine_Api::_() -> user() -> getViewer();\n if ($viewer && $viewer -> getIdentity() && !empty($viewer -> timezone)) {\n $timezone = $viewer -> timezone;\n }\n\n // Make start fit to period?\n $startObject = new Zend_Date($start);\n $startObject -> setTimezone($timezone);\n\n $partMaps = $this -> _periodMap[$period];\n foreach ($partMaps as $partType => $partValue) {\n $startObject -> set($partValue, $partType);\n }\n\n // Do offset\n if ($offset != 0) {\n $startObject -> add($offset, $period);\n }\n\n // Get end time\n $endObject = new Zend_Date($startObject -> getTimestamp());\n $endObject -> setTimezone($timezone);\n $endObject -> add($periodCount, $period);\n $endObject -> sub(1, Zend_Date::SECOND);\n // Subtract one second\n $staTable = Engine_Api::_() -> getDbtable('statistics', 'ynsocialads');\n $staName = $staTable -> info('name');\n $arr_ads = array();\n if($ad_ids)\n {\n $arr_ads = explode(',', $ad_ids);\n }\n else {\n }\n if ($type != \"all\")\n {\n // Get data\n $select = $staTable -> select();\n $select -> where('timestamp >= ?', gmdate('Y-m-d H:i:s', $startObject -> getTimestamp())) -> where('timestamp < ?', gmdate('Y-m-d H:i:s', $endObject -> getTimestamp())) -> order('timestamp ASC');\n $select -> where('type = ?', $type) -> where('ad_id IN (?)', $arr_ads);\n $rawData = $staTable -> fetchAll($select);\n\n // Now create data structure\n $currentObject = clone $startObject;\n $nextObject = clone $startObject;\n $data = array();\n $dataLabels = array();\n $cumulative = 0;\n $previous = 0;\n \n do {\n $nextObject -> add(1, $chunk);\n $currentObjectTimestamp = $currentObject -> getTimestamp();\n $nextObjectTimestamp = $nextObject -> getTimestamp();\n $data[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulative;\n \n // Get everything that matches\n $currentPeriodCount = 0;\n foreach ($rawData as $rawDatum) {\n $rawDatumDate = strtotime($rawDatum -> timestamp);\n if ($rawDatumDate >= $currentObjectTimestamp && $rawDatumDate < $nextObjectTimestamp) {\n $currentPeriodCount += 1;\n }\n }\n \n // Now do stuff with it\n switch( $mode ) {\n default :\n case 'normal' :\n $data[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCount;\n break;\n case 'cumulative' :\n $cumulative += $currentPeriodCount;\n $data[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulative;\n break;\n case 'delta' :\n $data[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCount - $previous;\n $previous = $currentPeriodCount;\n break;\n }\n \n $currentObject -> add(1, $chunk);\n } while( $currentObject->getTimestamp() < $endObject->getTimestamp() );\n \n // Remove some grid lines if there are too many\n $xsteps = 1;\n if (count($data) > 100) {\n $xsteps = ceil(count($data) / 100);\n }\n $title = $this -> view -> locale() -> toDate($startObject) . ' to ' . $this -> view -> locale() -> toDate($endObject);\n echo Zend_Json::encode(array('json' => $data, 'title' => $title));\n }\n else\n {\n // Get data\n $selectClick = $staTable -> select();\n $selectClick -> where('timestamp >= ?', gmdate('Y-m-d H:i:s', $startObject -> getTimestamp())) -> where('timestamp < ?', gmdate('Y-m-d H:i:s', $endObject -> getTimestamp())) -> order('timestamp ASC');\n $selectClick -> where(\"type = 'click'\");\n $selectClick -> where('ad_id IN (?)', $arr_ads);\n $clickData = $staTable -> fetchAll($selectClick);\n \n $selectImpression = $staTable -> select();\n $selectImpression -> where('timestamp >= ?', gmdate('Y-m-d H:i:s', $startObject -> getTimestamp())) -> where('timestamp < ?', gmdate('Y-m-d H:i:s', $endObject -> getTimestamp())) -> order('timestamp ASC');\n $selectImpression -> where(\"type = 'impression'\");\n $selectImpression -> where('ad_id IN (?)', $arr_ads);\n $impressionData = $staTable -> fetchAll($selectImpression);\n\n // Now create data structure\n $currentObject = clone $startObject;\n $nextObject = clone $startObject;\n $dataClick = array();\n $dataImpression = array();\n $dataLabels = array();\n $cumulativeClick = 0;\n $cumulativeIm = 0;\n $previousClick = 0;\n $previousIm = 0;\n \n do {\n $nextObject -> add(1, $chunk);\n $currentObjectTimestamp = $currentObject -> getTimestamp();\n $nextObjectTimestamp = $nextObject -> getTimestamp();\n \n $dataClick[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulativeClick;\n $dataImpression[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulativeIm;\n \n // Get everything that matches\n $currentPeriodCountClick = 0;\n foreach ($clickData as $rawDatum) \n {\n $rawDatumDate = strtotime($rawDatum -> timestamp);\n if ($rawDatumDate >= $currentObjectTimestamp && $rawDatumDate < $nextObjectTimestamp) \n {\n $currentPeriodCountClick += 1;\n }\n }\n \n $currentPeriodCountIm = 0;\n foreach ($impressionData as $rawDatum) \n {\n $rawDatumDate = strtotime($rawDatum -> timestamp);\n if ($rawDatumDate >= $currentObjectTimestamp && $rawDatumDate < $nextObjectTimestamp) \n {\n $currentPeriodCountIm += 1;\n }\n }\n \n // Now do stuff with it\n switch( $mode ) {\n default :\n case 'normal' :\n $dataClick[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCountClick;\n $dataImpression[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCountIm;\n break;\n case 'cumulative' :\n $cumulativeClick += $currentPeriodCountClick;\n $cumulativeIm += $currentPeriodCountIm;\n $dataClick[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulativeClick;\n $dataImpression[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $cumulativeIm;\n break;\n case 'delta' :\n $dataClick[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCountClick - $previousClick;\n $dataImpression[$this -> view -> locale() -> toDate($currentObjectTimestamp)] = $currentPeriodCountIm - $previousIm;\n $previousClick = $currentPeriodCountClick;\n $previousIm = $currentPeriodCountIm;\n break;\n }\n \n $currentObject -> add(1, $chunk);\n } while( $currentObject->getTimestamp() < $endObject->getTimestamp() );\n \n // Remove some grid lines if there are too many\n $xsteps = 1;\n if (count($dataClick) > 100) \n {\n $xsteps = ceil(count($dataClick) / 100);\n }\n $title = $this -> view -> locale() -> toDate($startObject) . ' to ' . $this -> view -> locale() -> toDate($endObject);\n echo Zend_Json::encode(array('json' => $dataClick, 'title' => $title, 'json2' => $dataImpression));\n }\n return true;\n }", "title": "" }, { "docid": "13fe75acb5ef6ebb1756cd630e89f3b3", "score": "0.41138002", "text": "public function createSimpleArrayDataSet($tableName, array $rows = [])\n {\n return $this->createArrayDataSet([$tableName => $rows]);\n }", "title": "" }, { "docid": "ee51f1ae8bf7ca6281f8a16e5a56bc00", "score": "0.41085315", "text": "function acquirePostedData( $dataset_id, $num_datasets )\n {\n // From config.php\n global $dbname, $dbhost;\n global $udpport, $ipaddr;\n\n // A lot of this only gets posted the first time through\n if ( $dataset_id == 0 )\n {\n $this->add( 'method', $this->analysisType() );\n\n $udp = array();\n $udp['udpport'] = $udpport;\n $udp['ip'] = $ipaddr;\n $this->add( 'server', $udp );\n\n $this->add( 'directory', $_SESSION['request'][$dataset_id]['path'] );\n $this->add( 'datasetCount', $num_datasets );\n\n $database = array();\n $database['name'] = $dbname;\n $database['host'] = $dbhost;\n $database['user_email'] = $_SESSION['email'];\n $database['submitter_email'] = $_SESSION['submitter_email'];\n $this->add( 'database', $database );\n\n $job_parameters = array();\n $job_parameters['curve_type'] = $_POST['curve_type'];\n $job_parameters['solute_type'] = $_POST['solute_type'];\n $job_parameters['x_min'] = $_POST['x_min'];\n $job_parameters['x_max'] = $_POST['x_max'];\n $job_parameters['y_min'] = $_POST['y_min'];\n $job_parameters['y_max'] = $_POST['y_max'];\n $job_parameters['z_value'] = $_POST['z_value'];\n\n if ( $job_parameters['curve_type'] != 'HL' )\n $job_parameters['vars_count'] = $_POST['vars_count'];\n else\n $job_parameters['vars_count'] = $_POST['hl_vars_count'];\n\n $job_parameters['gfit_iterations'] = $_POST['gfit_iterations'];\n $job_parameters['thr_deltr_ratio'] = $_POST['thr_deltr_ratio'];\n $job_parameters['curves_points'] = $_POST['curves_points'];\n $job_parameters['tikreg_option'] = $_POST['tikreg_option'];\n $job_parameters['tikreg_alpha'] = $_POST['tikreg_alpha'];\n\n $job_parameters['mc_iterations'] = $_POST['mc_iterations'];\n\n if ( isset( $_POST['req_mgroupcount'] ) )\n {\n if ( $job_parameters['mc_iterations'] > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else if ( $num_datasets > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else\n $job_parameters['req_mgroupcount'] = 1;\n }\n\n else\n $job_parameters['req_mgroupcount'] = 1;\n\n $job_parameters['tinoise_option'] = $_POST['tinoise_option'];\n $job_parameters['rinoise_option'] = $_POST['rinoise_option'];\n $job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&\n $_POST['debug_timings'] == 'on' )\n ? 1 : 0;\n $job_parameters['debug_level'] = $_POST['debug_level-value'];\n $job_parameters['debug_text'] = $_POST['debug_text-value'];\n $job_parameters['experimentID'] = $_SESSION['experimentID'];\n $this->add( 'job_parameters', $job_parameters );\n\n $dataset = array();\n $dataset[ 0 ]['files'] = array(); // This will be done later\n $dataset[ 0 ]['parameters'] = array();\n }\n\n // These will be done every time\n $parameters = array();\n $this->getDBParams( $dataset_id, $parameters ); // DB parameters\n $centerpiece_shape = $parameters['centerpiece_shape'];\n\n // Create new elements for this dataset\n //?? $parameters = $dataset['parameters'];\n $parameters['rawDataID'] = $_SESSION['request'][$dataset_id]['rawDataID'];\n $parameters['auc'] = $_SESSION['request'][$dataset_id]['filename'];\n $parameters['editedDataID'] = $_SESSION['request'][$dataset_id]['editedDataID'];\n $parameters['edit'] = $_SESSION['request'][$dataset_id]['editFilename'];\n // $parameters['modelID'] = $_SESSION['request'][$dataset_id]['modelID'];\n $parameters['noiseIDs'] = array();\n $parameters['noiseIDs'] = $_SESSION['request'][$dataset_id]['noiseIDs'];\n \n $parameters['simpoints'] = $_POST['simpoints-value'];\n $parameters['band_volume'] = ( $centerpiece_shape == 'band forming' )\n ? $_POST['band_volume-value']\n : 0.0;\n $parameters['radial_grid'] = $_POST['radial_grid'];\n $parameters['time_grid'] = $_POST['time_grid'];\n\n // Get arrays with multiple dataset data\n $dataset = $this->get('dataset');\n // Add new datasets\n $dataset[$dataset_id] = $parameters;\n $this->add( 'dataset', $dataset );\n\n$this->show( 0, \"Payload manager PCSA\\n\" );\n }", "title": "" }, { "docid": "c48aef0d685b347e2ff7af912a59cb30", "score": "0.4107912", "text": "public function outputJsData($jsData)\n {\n if (!isset(\\Yii::$app->controller)) {\n // Don't run if there isn't a controller, e.g inside a unit test\n return false;\n }\n $view = \\Yii::$app->controller->getView();\n $view->registerJs(\" m.widgets['\" . $this->id . \"'] = \" . \\yii\\helpers\\Json::encode($jsData) . \"; \", WebView::POS_HEAD);\n }", "title": "" }, { "docid": "53b5ff028c955027162dc7da7b0ac434", "score": "0.40962088", "text": "public static function build_jquery_datatable($aDBInfo=null,$table_id=\"datatable1\",$modal_datasource=null,$ajax_source_url=null,$datatable_properties=null)\n {\n $js=null; //Holds the javascript string\n $dba=array(\"a\",\"b\");\n\n global $plexWatch;\n\n $dateFormat = $plexWatch['dateFormat'];\n $timeFormat = $plexWatch['timeFormat'];\n\n $ajax_source_url = is_null($ajax_source_url)? basename(__FILE__) : $ajax_source_url;\n\n if (isset($aDBInfo))\n $serializd_db=base64_encode(serialize($aDBInfo));\n\n /* Edit Jqeury Here */\n $js= <<<EOT\n<!-- Start generated Jquery from $ajax_source_url --->\n<script type=\"text/JavaScript\" charset=\"utf-8\">\n $(document).ready(function() {\n var $table_id=$('#$table_id').dataTable( {\n \"fnServerData\": function ( sSource, aoData, fnCallback ) {\n $.getJSON( sSource, aoData, function (json) {\n fnCallback(json)\n })\n },\n \"iDisplayLength\": 25,\n \"bLengthChange\": true,\n \"bProcessing\": true,\n \"bServerSide\": true,\n \"sPaginationType\": 'bootstrap',\n \"sAjaxSource\": \"$ajax_source_url?oDb='$serializd_db'\",\n \"bStateSave\": false,$datatable_properties \n \"bDeferRender\": true,\n \"aaSorting\": [[0,'desc']],\n \"bAutoWidth\": false,\n \"aoColumnDefs\": [\n { \n \"sName\": 'id',\n \"aTargets\": [ 0 ],\n \"bVisible\": false,\n \"bSearchable\": false\n },\n { \n // \"sName\": 'date',\n \"aTargets\": [ 1 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(oData[8] === null) {\n $(nTd).addClass('currentlyWatching');\n $(nTd).html('Currently watching...');\n } else {\n $(nTd).html(moment(sData,\"X\").format('$dateFormat'));\n }\n },\n \"bSearchable\": false,\n \"sWidth\": '10%'\n },\n { \n \"sName\": 'title',\n \"aTargets\": [ 5 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData !== '') {\n var xmlDoc=loadXMLString(oData[9]);\n var mediaId = xmlDoc.getElementsByTagName(\"opt\")[0].getAttribute(\"ratingKey\");\n $(nTd).html('<a href=\"info.php?id='+mediaId+'\">'+sData+'</a>');\n } \n },\n \"sWidth\": '35%'\n },\n { \n \"sName\": 'user',\n \"aTargets\": [ 2 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData !== '') {\n $(nTd).html('<a href=\"user.php?user='+sData+'\">'+sData+'</a>');\n } \n },\n \"sWidth\": '10%'\n },\n { \n \"sName\": 'platform',\n \"aTargets\": [ 3 ],\n \"sWidth\": '10%',\n \"sClass\": 'modal-control',\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData !== '') {\n $(nTd).html('<a href=\"#info-modal\" data-toggle=\"modal\"><span data-toggle=\"tooltip\" data-placement=\"left\" title=\"Stream Info\" id=\"stream-info\" class=\"badge badge-inverse\"><i class=\"icon-info icon-white\"></i></span></a>&nbsp'+sData);\n } \n }\n },\n { \n // \"sName\": 'time',\n \"aTargets\": [ 6 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n $(nTd).html(moment(sData,\"X\").format('$timeFormat'));\n },\n \"bSearchable\": false,\n \"sWidth\": '5%'\n },\n { \n \"sName\": 'stopped',\n \"aTargets\": [ 8 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData !== '') {\n $(nTd).html(moment(sData,\"X\").format('$timeFormat'));\n } else {\n $(nTd).html('n/a');\n }\n },\n \"bSearchable\": false,\n \"sWidth\": '5%'\n },\n { \n \"sName\": 'ip_address',\n \"aTargets\": [ 4 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if((sData === '0') || (sData === '')) {\n $(nTd).html('n/a');\n } else {\n $(nTd).html(sData);\n } \n },\n \"sWidth\": '10%'\n },\n { \n \"sName\": 'paused_counter',\n \"aTargets\": [ 7 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData === '') {\n $(nTd).html('0 min');\n } else {\n $(nTd).html(Math.round((sData/60),1)+' min');\n } \n },\n \"bSearchable\": false,\n \"sWidth\": '5%'\n },\n { \n \"sName\": 'xml',\n \"aTargets\": [ 9 ],\n \"bVisible\": false,\n \"bSearchable\": false\n },\n {\n \"aTargets\": [ 10 ],\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n if(sData === '') {\n $(nTd).html('0 min');\n } else {\n $(nTd).html(Math.round((sData/60),1)+' min');\n } \n },\n \"bSearchable\": false,\n \"sWidth\": '5%'\n },\n {\n \"aTargets\": [ 11 ],\n \"sDefaultContent\": '',\n \"fnCreatedCell\": function (nTd, sData, oData, iRow, iCol) {\n var xmlDoc=loadXMLString(oData[9]);\n var mediaDuration = xmlDoc.getElementsByTagName(\"opt\")[0].getAttribute(\"duration\");\n var mediaOffset = xmlDoc.getElementsByTagName(\"opt\")[0].getAttribute(\"viewOffset\");\n if((mediaDuration !== 0) && (mediaOffset !== null)) {\n var percentComplete = Math.round(((mediaOffset / mediaDuration) * 100));\n if (percentComplete >= 90) percentComplete = 100;\n } else {\n var percentComplete = 0;\n }\n $(nTd).html('<span class=\"badge badge-warning\">'+percentComplete+'%</span>');\n },\n \"bSearchable\": false,\n \"bSortable\": false,\n \"sWidth\": '5%'\n }\n ]\n } );\n \n $('#$table_id').on('mouseenter', 'td.modal-control span', function () {\n $(this).tooltip();\n } );\n \n $('#$table_id').on('click', 'td.modal-control', function () {\n \n var tr = $(this).parents('tr');\n var id = tr.attr('id');\n var rowData = $table_id.fnGetData(id);\n\n $.post(\"$modal_datasource\", { id: rowData[0] },\n function(data) {\n if(data)\n {\n $(\"#modal-text\").html(data);\n $(\"#modal-stream-info\").html(rowData[5]+' ('+rowData[2]+')');\n }\n else\n {\n $(\"#modal-text\").html(\"Ietsie is verkeerd!\");\n }\n }\n );\n } );\n } );\n</script>\n<!-- End generated Jquery from $ajax_source_url ---> \nEOT;\n\n return $js; //returns the completed jquery string\n }", "title": "" }, { "docid": "f88ac55700bab1296b66684dcd01f9af", "score": "0.4093003", "text": "public function widgetDataForJs()\n {\n return [\n 'list_actions' => $this->graphActions(),\n 'colors' => $this->colors(),\n 'graph_options' => [\n 'xAxis' => (empty($this->categories()) ? null : [\n [\n 'type' => 'category',\n 'data' => $this->categories(),\n ],\n ]),\n 'yAxis' => (empty($this->categories()) ? null : [\n [\n 'type' => 'value',\n 'splitArea' => [\n 'show' => true,\n ],\n ],\n ]),\n 'series' => $this->series(),\n ],\n ];\n }", "title": "" }, { "docid": "0bc8997db3f7cfc3011366ea5cd406ff", "score": "0.40902063", "text": "public function embedData($data, $name, $contentType = null)\n {\n return '';\n }", "title": "" }, { "docid": "544d080bd1d48c3fc3dd0333f2156e2e", "score": "0.4089847", "text": "public final function renderJs()\n {\n // render a javascript header\n $js = $this->getJsHeader();\n\n // render the data table\n $js .= $this->getJsDataTable();\n\n // Instantiate our object.\n $js .= $this->getJsObjectInstantiation($this->getId());\n\n // draw the treemap\n $js .= $this->objectVariableName.\".draw(\" . $this->dataTableName . \",\\n\";\n\n $js .= \"\\t\" . json_encode($this->getMergedOptions()) . \"\\n\";\n\n $js .= \");\\n\";\n\n // render a javascript footer\n $js .= $this->getJsFooter();\n\n echo $js;\n }", "title": "" }, { "docid": "b96f4a4b18e7999f68a78b2f5c9d9b35", "score": "0.40769917", "text": "function mxhr_assemble_javascript_payload($js_data, $id=null) {\n\t\treturn array(\n\t\t\t'data' => $js_data,\n\t\t\t'content_type' => 'text/javascript',\n\t\t\t'id' => $id\n\t\t);\n \t}", "title": "" }, { "docid": "a26c3dd1d761a238b6828b9b695f58fe", "score": "0.40686807", "text": "function acquirePostedData( $dataset_id, $num_datasets )\n {\n // From config.php\n global $dbname, $dbhost;\n global $udpport, $ipaddr;\n\n // These items only get posted the first time\n if ( $dataset_id == 0 )\n {\n $this->add( 'method', $this->analysisType() );\n\n $udp = array();\n $udp['udpport'] = $udpport;\n $udp['ip'] = $ipaddr;\n $this->add( 'server', $udp );\n\n $this->add( 'directory', $_SESSION['request'][$dataset_id]['path'] );\n $this->add( 'datasetCount', $num_datasets );\n\n $database = array();\n $database['name'] = $dbname;\n $database['host'] = $dbhost;\n $database['user_email'] = $_SESSION['email'];\n $database['submitter_email'] = $_SESSION['submitter_email'];\n $this->add( 'database', $database );\n\n $job_parameters = array();\n $job_parameters['mc_iterations'] = $_POST['mc_iterations'];\n $job_parameters['demes'] = $_POST['demes-value'];\n if ( $job_parameters['mc_iterations'] > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else if ( $num_datasets > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else\n $job_parameters['req_mgroupcount'] = 1;\n $job_parameters['population'] = $_POST['genes-value'];\n $job_parameters['generations'] = $_POST['generations-value'];\n $job_parameters['crossover'] = $_POST['crossover-value'];\n $job_parameters['mutation'] = $_POST['mutation-value'];\n $job_parameters['plague'] = $_POST['plague-value'];\n $job_parameters['elitism'] = $_POST['elitism-value'];\n $job_parameters['migration'] = $_POST['migration-value'];\n\n // This one is in %, so it needs to be divided by 100\n $job_parameters['regularization'] = $_POST['regularization-value'] / 100.0;\n\n $job_parameters['seed'] = $_POST['seed-value'];\n $job_parameters['conc_threshold'] = $_POST['conc_threshold-value'];\n $job_parameters['s_grid'] = $_POST['s_grid-value'];\n $job_parameters['k_grid'] = $_POST['k_grid-value'];\n $job_parameters['mutate_sigma'] = $_POST['mutate_sigma-value'];\n $job_parameters['p_mutate_s'] = $_POST['mutate_s-value'];\n $job_parameters['p_mutate_k'] = $_POST['mutate_k-value'];\n $job_parameters['p_mutate_sk'] = $_POST['mutate_sk-value'];\n $job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&\n $_POST['debug_timings'] == 'on' )\n ? 1 : 0;\n $job_parameters['debug_level'] = $_POST['debug_level-value'];\n $job_parameters['debug_text'] = $_POST['debug_text-value'];\n $job_parameters['bucket_fixed'] = $_POST['z-fixed'];\n $job_parameters['x-type'] = $_POST['x-type'];\n $job_parameters['y-type'] = $_POST['y-type'];\n $job_parameters['z-type'] = $_POST['z-type'];\n $job_parameters['experimentID'] = $_SESSION['experimentID'];\n // buckets\n $this->add( 'job_parameters', $job_parameters );\n\n $dataset = array();\n $dataset[ 0 ]['files'] = array(); // This will be done later\n $dataset[ 0 ]['parameters'] = array();\n }\n\n // These will be done every time\n $parameters = array();\n $this->getDBParams( $dataset_id, $parameters ); // DB parameters\n $centerpiece_shape = $parameters['centerpiece_shape'];\n\n // Create new elements for this dataset\n //?? $parameters = $dataset['parameters'];\n $parameters['rawDataID'] = $_SESSION['request'][$dataset_id]['rawDataID'];\n $parameters['auc'] = $_SESSION['request'][$dataset_id]['filename'];\n $parameters['editedDataID'] = $_SESSION['request'][$dataset_id]['editedDataID'];\n $parameters['edit'] = $_SESSION['request'][$dataset_id]['editFilename'];\n // $parameters['modelID'] = $_SESSION['request'][$dataset_id]['modelID'];\n $parameters['noiseIDs'] = array();\n $parameters['noiseIDs'] = $_SESSION['request'][$dataset_id]['noiseIDs'];\n \n $parameters['simpoints'] = $_POST['simpoints-value'];\n $parameters['band_volume'] = ( $centerpiece_shape == 'band forming' )\n ? $_POST['band_volume-value']\n : 0.0;\n $parameters['radial_grid'] = $_POST['radial_grid'];\n $parameters['time_grid'] = $_POST['time_grid'];\n\n // Get arrays with multiple dataset data\n $dataset = $this->get('dataset');\n // Add new datasets\n $dataset[$dataset_id] = $parameters;\n $this->add( 'dataset', $dataset );\n\n }", "title": "" }, { "docid": "fa8581b89b5b7381e8b82e62126da3d6", "score": "0.40614644", "text": "function ew_GetJsData($name, &$ar, $ft) {\n\t$bAllSelected = ew_IsSelectedAll($name);\n\t$jsdata = \"\";\n\tif (is_array($ar)) {\n\t\tforeach ($ar as $key => $value) {\n\t\t\t$bSelected = ($bAllSelected) ? TRUE : ew_IsSelectedValue($name, $key, $ft);\n\t\t\t$jsselect = ($bSelected) ? \"true\" : \"false\";\n\t\t\tif ($jsdata <> \"\") $jsdata .= \",\";\n\t\t\t$jsdata .= \"new Array(\\\"\" . ew_EscapeJs($key) . \"\\\",\\\"\" . ew_EscapeJs($value) . \"\\\",\" . $jsselect . \")\";\n\t\t}\n\t}\n\treturn $jsdata;\n}", "title": "" }, { "docid": "510b694375238001eeae9a296328e8e5", "score": "0.40538588", "text": "public function getDataAsJS(){\n return json_encode($this->getData());\n }", "title": "" }, { "docid": "6d27383a5a2594b0f3861d7c9de8cbb5", "score": "0.40471947", "text": "public function getWidgetEmbed($widget_name, $params = array(), $options = array())\n\t{\n\t\t$id = isset($options['id']) ? $options['id'] : 'oneElementPlaceholder';\n\t\t$node_dom = Mage::getStoreConfig('sso/options/node_domain');\n\t\t$widgetkey = Mage::helper('sso/api')->getWidgetkey();\n\t\t$partner_id = Mage::getStoreConfig('sso/options/partner_id');\n\t\t\n\t\t$custom_url = Mage::getStoreConfig('sso/options/widget_url');\n\t\t$base_url = !empty($custom_url) ? $custom_url : \"http://widgets.onesite.com\";\n\t\t$config_id = isset($options['config_id']) ? $options['config_id'] : '';\n\t\t$callback_url = Mage::getUrl('onesite/integration/connection');\n\t\t\n\t\t$jsWidgetOptions = '';\n\n\t\tif (is_array($params) && !empty($params)) {\n\t\t\t$i = 1;\n\t\t\tforeach ($params as $name => $value) {\n\t\t\t\t$jsWidgetOptions .= \"var $name = '$value';\\n\";\n\t\t\t\t$i = $i + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$urlAppendParams = http_build_query($params);\n\t\t\n\t\t$html = <<<EOT\n<script type='text/javascript'>\n // CHANGE THESE DYNAMICALLY ON EVERY PAGE.\n{$jsWidgetOptions}\n\n // DO NOT CHANGE BELOW THIS LINE.\n var widgetURL = \"{$base_url}/js/{$widget_name}?one_widget_node={$node_dom}&devkey={$widgetkey}&partner={$partner_id}&config_id={$config_id}&{$urlAppendParams}&callback_url={$callback_url}\";\n // Load the widget.\n document.write('<script type=\"text/javascript\" src=\"', widgetURL, '\"><\\/script>');\n</script>\nEOT;\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "10b39c1fbc2c08f5fc1424320c1b6abb", "score": "0.40469044", "text": "function f_convertirArrayJS($aDatos) {\n $sDatos = \"var coeficienteJS = new Array();\";\n foreach ($aDatos as $iApar => $aCoef) {\n $sCoef = implode(\",\", $aCoef);\n $sDatos .= \"coeficienteJS[$iApar] = [$sCoef];\";\n }\n return $sDatos;\n}", "title": "" }, { "docid": "26912509d44c1d8e368afdd2e457a75a", "score": "0.40383062", "text": "function encode_two_opposing_slices($chart_data, $sql1, $label1, $sql2, $label2) {\n $res = _pg_query($sql1);\n $row = pg_fetch_row($res);\n array_push($chart_data['rows'], array($label1,floatval($row[0])));\n\n $res = _pg_query($sql2);\n $row = pg_fetch_row($res);\n array_push($chart_data['rows'], array($label2,floatval($row[0])));\n\n return json_encode($chart_data);\n}", "title": "" }, { "docid": "863676569ee2f39827d5da99aa461d8a", "score": "0.40284586", "text": "public function populateLines() {\n $datasets = $this->Datasets();\n $json = [];\n\n foreach($datasets as $dataset) {\n $json[] = [\n 'label' => $dataset->Title,\n 'borderColor' => $dataset->BorderColor,\n 'backgroundColor' => $dataset->BackgroundColor,\n 'pointBorderColor' => $dataset->PointBorderColor,\n 'pointBackgroundColor' => $dataset->PointBackgroundColor,\n 'borderWidth' => $this->BorderWidth,\n 'fill' => ($this->DisplayFill ? true : false),\n 'data' => explode(',', $dataset->Data)\n ];\n }\n\n //die(json_encode($json));\n $datasets = json_encode($json);\n $labels = json_encode(explode(',', $this->Labels));\n\n Requirements::customScript(<<<JS\n var ctx = document.getElementById('chart-element__chart-$this->ID');\n var myChart = new Chart(ctx, {\n type: 'line',\n data: {\n labels: $labels,\n datasets: $datasets\n },\n options: {\n responsive: true,\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: false\n }\n }]\n },\n legend: {\n display: false\n }\n }\n });\nJS\n );\n }", "title": "" }, { "docid": "b8aa729ae61eb54ad732a79040cc448a", "score": "0.40261486", "text": "function set_data($name, $data){\n\tglobal $twig_data;\n\t$twig_data = array();\n\t$twig_data[$name] = $data;\t\n}", "title": "" }, { "docid": "79a7eb64110de956fbc026a99f66effb", "score": "0.40239707", "text": "public static function add_data_attribute( $html, $id, $alt, $title, $align, $url, $size ) {\n\t\t$axisJS_config = get_post_meta( $id, '_axisWP', true );\n\t\tif ( ! empty( $axisJS_config ) ) {\n\t\t\treturn '<div class=\"mceNonEditable\"><img src=\"' . $url . '\" data-axisjs=\\'' . base64_encode( $axisJS_config ) . '\\' class=\"mceItem axisChart\" /></div><br />';\n\t\t} else {\n\t\t\treturn $html;\n\t\t}\n\t}", "title": "" }, { "docid": "206b3a6fa44fef9a43e73138cb55b9e5", "score": "0.4015816", "text": "function encode_default($chart_data, $sql)\n{\n $res = _pg_query($sql);\n while($row = pg_fetch_row($res)) {\n $tmp = array($row[0],\n floatval($row[1])\n );\n array_push($chart_data['rows'], $tmp);\n }\n\n return json_encode($chart_data);\n}", "title": "" }, { "docid": "efbdea1861c4f45147533df865e5f603", "score": "0.40042704", "text": "function table($data, $options = array()) {\n\n\t\t$id = uniqid('datatable');\n\t\t//Was basing it on data[myColumnDefs] but that caused issues when generating table for non-js people.\n\t\t//This is more straightforward, generated from data passed in.\n\t\t//Append Actions\n\t\tif(isset($data['actions'])) {\n//\t\t\tSet::insert()\n\t\t}\n\n\t\t$heads = $this->tableHeaders($data['myColumnDefs']);\n\t\t$rows = $this->tableCells($data);\n\t\t$output = sprintf('<div class=\"plank-datatable\"><table id=\"%3$s\">%1$s%2$s</table></div>', $heads,$rows,$id);\n\n\t\t$output .= $this->jsTableData($data, $id);\n\t\t\n\t\treturn $this->output($output);\n\n\t}", "title": "" }, { "docid": "3522268c763d92a1a2d437ca2c3323a9", "score": "0.39916533", "text": "function buildMatrix($dataSet, &$args, $options = array(), $platforms,$customFieldColumns=null)\r\n{\r\n $default_options = array('bugInterfaceOn' => false,'show_platforms' => false,\r\n 'status_not_run' => false,'format' => FORMAT_HTML);\r\n $options = array_merge($default_options, $options);\r\n\r\n $l18n = init_labels(array('assigned_to' => null,'platform' => null, 'th_date' => null,\r\n 'th_build' => null));\r\n\r\n\r\n\r\n $columns = array();\r\n $columns[] = array('title_key' => 'title_test_suite_name', 'width' => 80, 'type' => 'text');\r\n $columns[] = array('title_key' => 'title_test_case_title', 'width' => 80, 'type' => 'text');\r\n $columns[] = array('title_key' => 'version', 'width' => 30);\r\n if ($options['show_platforms'])\r\n {\r\n $columns[] = array('title_key' => 'platform', 'width' => 60, 'filter' => 'list', 'filterOptions' => $platforms);\r\n }\r\n if( $options['status_not_run'] )\r\n {\r\n $columns[] = array('title_key' => 'th_build', 'width' => 35);\r\n $columns[] = array('title_key' => 'assigned_to', 'width' => 60);\r\n $columns[] = array('title_key' => 'summary', 'width' => 150, 'type' => 'text');\r\n }\r\n else\r\n {\r\n $columns[] = array('title_key' => 'th_build', 'width' => 35);\r\n $columns[] = array('title_key' => 'th_run_by', 'width' => 60);\r\n $columns[] = array('title_key' => 'th_date', 'width' => 60);\r\n $columns[] = array('title_key' => 'title_execution_notes', 'width' => 150, 'type' => 'text');\r\n\r\n // 20130325\r\n if(!is_null($customFieldColumns))\r\n {\r\n foreach($customFieldColumns as $id => $def)\r\n {\r\n $columns[] = array('title' => $def['label'], 'width' => 60);\r\n } \r\n } \r\n\r\n if ($options['bugInterfaceOn'])\r\n {\r\n $columns[] = array('title_key' => 'th_bugs_id_summary', 'type' => 'text');\r\n }\r\n }\r\n\r\n\r\n if ($options['format'] == FORMAT_HTML)\r\n {\r\n\r\n // IMPORTANT DEVELOPMENT NOTICE\r\n // columns and dataSet are deeply related this means that inside\r\n // dataSet order has to be identical that on columns or table will be a disaster\r\n //\r\n $matrix = new tlExtTable($columns, $dataSet, 'tl_table_results_by_status');\r\n \r\n //if not run report: sort by test suite\r\n //blocked, failed report: sort by platform (if enabled) else sort by date\r\n $sort_name = 0;\r\n if ($options['status_not_run']) \r\n {\r\n $sort_name = $l18n['assigned_to'];\r\n } \r\n else \r\n {\r\n $sort_name = $options['show_platforms'] ? $l18n['platform'] : $l18n['th_date'];\r\n }\r\n \r\n $matrix->setSortByColumnName($sort_name);\r\n $matrix->setGroupByColumnName($l18n['th_build']);\r\n\r\n $matrix->addCustomBehaviour('text', array('render' => 'columnWrap'));\r\n \r\n //define table toolbar\r\n $matrix->showToolbar = true;\r\n $matrix->toolbarExpandCollapseGroupsButton = true;\r\n $matrix->toolbarShowAllColumnsButton = true;\r\n }\r\n else\r\n {\r\n $matrix = new tlHTMLTable($columns, $dataSet, 'tl_table_results_by_status');\r\n }\r\n return $matrix;\r\n}", "title": "" }, { "docid": "40a564b952be0c8cac0b27bc62b0562a", "score": "0.39821473", "text": "public function dataSet() {\n $data = parent::dataSet();\n $data[0]['age'] = 0;\n $data[3]['age'] = 0;\n return $data;\n }", "title": "" }, { "docid": "8a86979a77bd36b72e194b51c89b9503", "score": "0.3974522", "text": "function SetRow($tab1=null, $tab2=null, $tab3=null, $tab4=null, $tab5=null, $tab6=null){\n\t\n\tfor ($i=0; $i <count($tab1) ; $i++) {\n\techo \"<tr class=''>\".\"<td>\".($tab1[$i]).\"</td>\".\"<td>\".($tab2[$i]).\"</td>\".\"<td width='12%'>\".($tab3[$i]).\"</td>\".\"<td>\".($tab4[$i]).\"</td>\".\"<td width='15%'>\".($tab5[$i]).\"</td>\".\"<td>\".($tab6[$i]).\"</td></tr>\";\n\t}\n\t\n /////////////////// FONCTION BIGSETROW /////////////////////\n \n function BigSetRows(array $tab1){\n\t\n\tfor ($i=0; $i <count($tab1) ; $i++) {\n\techo \"<tr class=''>\".\"<td>\".($tab1[$i][0]).\"</td>\".\"<td>\".($tab1[$i][1]).\"</td>\".\"<td width='12%'>\".($tab1[$i][2]).\"</td>\".\"<td>\".($tab1[$i][3]).\"</td>\".\"<td width='15%'>\".($tab1[$i][4]).\"</td>\".\"<td>\".($tab1[$i][5]).\"</td>\".\"<td>\".($tab1[$i][6]).\"</td></tr>\";\n\t}\n\t\t\n\t}\n}", "title": "" }, { "docid": "088b176c50c0ad0993ff54683527d7e0", "score": "0.39742807", "text": "public function loadDataSet($dataSet)\n {\n $this->getDatabaseTester()->setDataSet($dataSet);\n // call setUp whateverhich adds the rows\n $this->getDatabaseTester()->onSetUp();\n }", "title": "" }, { "docid": "48642335f2866f59809f867f1e6fca0e", "score": "0.39688691", "text": "private function _inlineScript($data = null) {\n // no data?\n if(is_null($data))\n return false;\n\n // compress\n $data = Algorithms::js($data, $this->_config['config']['js']);\n\n // keep a reference to avoid duplicates\n $hash = md5($data);\n if(in_array($hash, $this->inline['js']))\n return false;\n else $this->inline['js'][] = $hash;\n\n // output\n return \"<script>{$data}</script>\";\n }", "title": "" }, { "docid": "0a1510dbac4782ddc261bc975cda0dcf", "score": "0.39644438", "text": "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "title": "" }, { "docid": "b182a50d1f69f18a458c31bce683771b", "score": "0.39613998", "text": "public function addjs($destfunc,$snippet,$args=array()) {\n\t$snipdata=array($destfunc,$snippet,$args);\n\t$this->dynamic[]=$snipdata;\t\t\t\t\n}", "title": "" }, { "docid": "982c3b812a7e57d90d7e1d001c0b6d90", "score": "0.3957926", "text": "public function m_chart_iframe_scripts( $scripts, $post_id ) {\n\t\t$library = m_chart()->get_post_meta( $post_id, 'library' );\n\n\t\t// If Chart.js isn't the library type we'll stop here\n\t\tif ( $library != $this->library ) {\n\t\t\treturn $scripts;\n\t\t}\n\n\t\t$type = m_chart()->get_post_meta( $post_id, 'type' );\n\n\t\t$scripts[] = 'chartjs-datalabels';\n\n\t\t// Return the scripts\n\t\treturn $scripts;\n\t}", "title": "" }, { "docid": "767fba7f56208c49429f5c4536afcc77", "score": "0.39435822", "text": "function acquirePostedData( $dataset_id, $num_datasets )\n {\n // From config.php\n global $dbname, $dbhost;\n global $udpport, $ipaddr;\n\n // These items only get posted the first time\n if ( $dataset_id == 0 )\n {\n $this->add( 'method', $this->analysisType() );\n\n $udp = array();\n $udp['udpport'] = $udpport;\n $udp['ip'] = $ipaddr;\n $this->add( 'server', $udp );\n\n $this->add( 'directory', $_SESSION['request'][$dataset_id]['path'] );\n $this->add( 'datasetCount', $num_datasets );\n\n $database = array();\n $database['name'] = $dbname;\n $database['host'] = $dbhost;\n $database['user_email'] = $_SESSION['email'];\n $database['submitter_email'] = $_SESSION['submitter_email'];\n $this->add( 'database', $database );\n\n $job_parameters = array();\n $job_parameters['DC_modelID'] = $_POST['DC_modelID'];\n $job_parameters['mc_iterations'] = $_POST['mc_iterations'];\n $job_parameters['demes'] = $_POST['demes-value'];\n if ( $job_parameters['mc_iterations'] > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else if ( $num_datasets > 1 )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n else\n $job_parameters['req_mgroupcount'] = 1;\n $job_parameters['population'] = $_POST['genes-value'];\n $job_parameters['generations'] = $_POST['generations-value'];\n $job_parameters['crossover'] = $_POST['crossover-value'];\n $job_parameters['mutation'] = $_POST['mutation-value'];\n $job_parameters['plague'] = $_POST['plague-value'];\n $job_parameters['elitism'] = $_POST['elitism-value'];\n $job_parameters['migration'] = $_POST['migration-value'];\n\n // This one is in %, so it needs to be divided by 100\n $job_parameters['regularization'] = $_POST['regularization-value'] / 100.0;\n\n $job_parameters['seed'] = $_POST['seed-value'];\n $job_parameters['conc_threshold'] = $_POST['conc_threshold-value'];\n $job_parameters['p_grid'] = $_POST['p_grid-value'];\n $job_parameters['mutate_sigma'] = $_POST['mutate_sigma-value'];\n $job_parameters['minimize_opt'] = $_POST['minimize_opt-value'];\n $job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&\n $_POST['debug_timings'] == 'on' )\n ? 1 : 0;\n $job_parameters['debug_level'] = $_POST['debug_level-value'];\n $job_parameters['debug_text'] = $_POST['debug_text-value'];\n $job_parameters['experimentID'] = $_SESSION['experimentID'];\n $this->add( 'job_parameters', $job_parameters );\n\n $dataset = array();\n $dataset[ 0 ]['files'] = array(); // This will be done later\n $dataset[ 0 ]['parameters'] = array();\n }\n\n // These will be done every time\n $parameters = array();\n $this->getDBParams( $dataset_id, $parameters ); // DB parameters\n $centerpiece_shape = $parameters['centerpiece_shape'];\n\n // Create new elements for this dataset\n //?? $parameters = $dataset['parameters'];\n $parameters['rawDataID'] = $_SESSION['request'][$dataset_id]['rawDataID'];\n $parameters['auc'] = $_SESSION['request'][$dataset_id]['filename'];\n $parameters['editedDataID'] = $_SESSION['request'][$dataset_id]['editedDataID'];\n $parameters['edit'] = $_SESSION['request'][$dataset_id]['editFilename'];\n // $parameters['modelID'] = $_SESSION['request'][$dataset_id]['modelID'];\n $parameters['noiseIDs'] = array();\n $parameters['noiseIDs'] = $_SESSION['request'][$dataset_id]['noiseIDs'];\n \n $parameters['simpoints'] = $_POST['simpoints-value'];\n $parameters['band_volume'] = ( $centerpiece_shape == 'band forming' )\n ? $_POST['band_volume-value']\n : 0.0;\n $parameters['radial_grid'] = $_POST['radial_grid'];\n $parameters['time_grid'] = $_POST['time_grid'];\n\n // Get arrays with multiple dataset data\n $dataset = $this->get('dataset');\n // Add new datasets\n $dataset[$dataset_id] = $parameters;\n $this->add( 'dataset', $dataset );\n\n }", "title": "" }, { "docid": "a8ff610fa7c9638b20e9de1e4d5d1511", "score": "0.39400318", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$bodyscript = '\n<script type=\"text/javascript\">\n$(function() {\n\t$( \"input:submit, a, button\", \".otros\" ).button();\n});\n\njQuery(\"#a1\").click( function(){\n\tvar id = jQuery(\"#newapi'. $param['grids'][0]['gridname'].'\").jqGrid(\\'getGridParam\\',\\'selrow\\');\n\tif (id)\t{\n\t\tvar ret = jQuery(\"#newapi'. $param['grids'][0]['gridname'].'\").jqGrid(\\'getRowData\\',id);\n\t\twindow.open(\\''.site_url('formatos/ver/CARG/').'/\\'+id, \\'_blank\\', \\'width=900,height=800,scrollbars=yes,status=yes,resizable=yes,screenx=((screen.availHeight/2)-450), screeny=((screen.availWidth/2)-400)\\');\n\t} else { $.prompt(\"<h1>Por favor Seleccione un Movimiento</h1>\");}\n});\n</script>\n';\n\n\t\t#Set url\n\t\t$grid->setUrlput(site_url($this->url.'setdata/'));\n\n\t\t$WestPanel = '\n<div id=\"LeftPane\" class=\"ui-layout-west ui-widget ui-widget-content\">\n<div class=\"anexos\">\n\n<table id=\"west-grid\" align=\"center\">\n\t<tr>\n\t\t<td><div class=\"tema1\"><table id=\"listados\"></table></div></td>\n\t</tr>\n\t<tr>\n\t\t<td><div class=\"tema1\"><table id=\"otros\"></table></div></td>\n\t</tr>\n</table>\n\n<table id=\"west-grid\" align=\"center\">\n\t<tr>\n\t\t<td></td>\n\t</tr>\n</table>\n</div>\n'.\n//\t\t<td><a style=\"width:190px\" href=\"#\" id=\"a1\">Imprimir Copia</a></td>\n'</div> <!-- #LeftPane -->\n';\n\n\t\t$SouthPanel = '\n<div id=\"BottomPane\" class=\"ui-layout-south ui-widget ui-widget-content\">\n<p>'.$this->datasis->traevalor('TITULO1').'</p>\n</div> <!-- #BottomPanel -->\n';\n\t\t//$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('CARG', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('CARG', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['anexos'] = 'anexos1';\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "c1222ad1e9a5ff0c7ff25601d6ebe103", "score": "0.39367896", "text": "function toHTML() {\n\t\t$ts=date(\"Y-m-d H:i:s\");\n\n\t\t// Third parm is HTML, at this point we have none\n\t\t$this->reportLog(4, $ts, '');\n\n\t\tforeach ( $this->queries as $index => $query ) {\n\t\t\t$results=$query->run();\n\n\t\t\tforeach ( $results as $index => $result ) {\n if ( $result ) {\n\t\t\t\t\t// See if we have a chart that users this query\n\t\t\t\t\tif ( isset($this->charts) ) { \n\t\t\t\t\t\tforeach ( $this->charts as $index => $chart ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $chart->query == $query->name ) {\n\t\t\t\t\t\t\t\t// We have a chart that uses this query\n\t\t\t\t\t\t\t\t$this->charts[$chart->name]->setData($result);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->tables[$query->name]->setData($result);\n }\n\t\t\t\t//Note, some queries do not produce results so do not have an error\n\t\t\t\t//catch at this point....\n }\n\t\t}\n\n\t\t// Turn on output buffering\n\t\tob_start();\n\t\n\t\t// Now set all of the HTML\n\t\t$this->setHeader();\n\n\t\t// Chart stuff has to appear in the HEAD sectioin\n\t\tif ( isset($this->charts) ) {\n \t\t\t$this->HTML.=\"\n<!-- GOOGLE CHART DATA START -->\n<script type='text/javascript'>\ngoogle.load('visualization', '1', {packages:['corechart']});\\n\";\n\t\t\tforeach ( $this->charts as $name => $chart ) {\n\t\t\t\t$this->HTML.=$chart->HTML;\n\t\t\t}\n\t\t}\n\n\t\t$this->HTML.=\"</script>\\n\";\n\t\t$this->HTML.=\"<!-- GOOGLE CHART DATA END -->\\n\";\n\t\t$this->HTML.=\"</head>\\n\";\n\n\t\t// Main body - Report info\n\t $this->HTML.=\"<body>\\n\";\n\n\t\t// In case we have any parms in the title\n\t foreach ( $this->passedParms as $key => $value ) {\n\t \t$this->title=str_replace(\"$\".$key.\"$\", $value, $this->title);\n\t }\n\n\t\tif ( $this->batch == FALSE ) { \n\t \t$this->HTML.=\"<div class='parms_passed'>\\n<h1>$this->title</h1>\\n\";\n\t \t$this->HTML.=\"<p>\".str_replace(\"\\n\",\"<br>\",$this->description).\"</p>\\n\";\n\t \t$this->HTML.=\"<h2>Report Title: $this->reportTitle</h2>\\n\";\n\t \t\t$this->HTML.=\"<p>Parameters Passed:\\n\";\n\t \t$this->HTML.=\"<table>\\n\";\n\t \tforeach ( $this->passedParms as $key => $value ) {\n\t \t$this->HTML.=\"<tr><td>$key:&nbsp;</td><td>$value</td></tr>\\n\";\n\t \t}\n\t \t$this->HTML.=\"</table>\\n\";\n\t \t$this->HTML.=\"</p>\\n\";\n\t \t$this->HTML.=\"<form method='post' action='report_download.php'>\\n\";\n\t \t$this->HTML.=\"<input name='report' type='hidden' value='\" . $this->csv . \"'>\\n\";\n\t \t$this->HTML.=\"<input type='submit' value='Download CSV'>\\n\";\n\t \t$this->HTML.=\"</form>\\n</div>\\n\";\n\t\t}\n\t\telse {\n\t\t\t$this->HTML.=\"<h1>$this->title</h1>\\n\";\n\t \t$this->HTML.=\"<br>\\n\";\n\t \t$this->HTML.=\"<form method='post' action='report_download.php'>\\n\";\n\t \t$this->HTML.=\"<input name='report' type='hidden' value='\" . $this->csv . \"'>\\n\";\n\t \t$this->HTML.=\"<input type='submit' value='Download CSV'>\\n\";\n\t \t$this->HTML.=\"</form>\\n\";\n\t\t}\n\n\t\t// Results\n\n\t\t$c_found = FALSE;\n\n\t\t// Do we want our charts at the top?\n\t\tif ( isset($this->charts) ) {\n\t\t\tforeach ( $this->charts as $name => $chart ) {\n\t\t\t\tif ( $chart->position == \"top\") {\n\t\t\t\t\tif ( !$c_found ) {\n\t\t\t\t\t\t$this->HTML.=\"<table id='charts'>\\n<tr>\\n\";\n\t\t\t\t\t\t$c_found = TRUE;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $chart->break ) {\n\t\t\t\t\t\t$this->HTML.=\"</tr>\\n<tr>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($chart->width) ) {\n\t\t\t\t\t\t$this->HTML.=\"<td class='chart' width='\".$chart->width.\"%'><div id='chart_div\".$chart->name.\"'></div></td>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->HTML.=\"<td class='chart'><div id='chart_div\".$chart->name.\"'></div></td>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $c_found ) {\n\t\t\t\t// Finish off table\n\t\t\t\t$this->HTML.=\"</tr></table>\\n\";\n\t\t\t}\n\t\t}\n\n\t\t$t_found = FALSE;\n\t\t$c_found = FALSE;\n\n\t\tforeach ( $this->tables as $name => $table ) {\n\t\t\tif ( !$table->isHidden ) {\n\t\t\t\tif ( !$t_found ) {\n\t\t\t\t\t$this->HTML.=\"<br>\\n<h1>\".$table->title.\"</h1><br>\\n\";\n\t\t\t\t\t$this->HTML.=\"<table>\\n\";\n\t\t\t\t\t$this->HTML.=\"<tr><td>\\n\";\n\t\t\t\t\t$this->HTML.=$table->HTML;\n\t\t\t\t\t$this->HTML.=\"</td><td>&nbsp;</td>\";\n\t\t\t\t\t$t_found = TRUE;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->HTML.=\"<tr><td>\\n<br>\";\n\t\t\t\t\t$this->HTML.=\"<h1>\".$table->title.\"</h1>\\n<br>\\n\";\n\t\t\t\t\t$this->HTML.=$table->HTML;\n\t\t\t\t\t$this->HTML.=\"</td><td>&nbsp;</td>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$c_found = FALSE;\n\n\t\t\tif ( isset($this->charts) ) {\n\t\t\t\tforeach ( $this->charts as $index => $chart ) {\n\t\t\t\t\tif ( $chart->query == $name && $chart->position == \"below\") {\n\t\t\t\t\t\tif ( !$c_found ) {\n\t\t\t\t\t\t\tif ( $t_found) { \n\t\t\t\t\t\t\t\t$this->HTML.=\"</tr>\\n<tr><td>&nbsp;</td><td>&nbsp;</td></tr>\\n<tr><td><table id='charts'>\\n<tr>\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$this->HTML.=\"<table id='charts'>\\n<tr>\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$c_found = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $chart->break ) {\n\t\t\t\t\t\t\t$this->HTML.=\"</tr>\\n<tr>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( isset($chart->width) ) {\n\t\t\t\t\t\t\t$this->HTML.=\"<td class='chart' width='\".$chart->width.\"%'><div id='chart_div\".$chart->name.\"'></div></td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->HTML.=\"<td class='chart'><div id='chart_div\".$chart->name.\"'></div></td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ( $chart->query == $name && $chart->position != \"top\") {\n\t\t\t\t\t\t$this->HTML.=\"<td class='chart'><div id='chart_div\".$chart->name.\"'></div></td></tr>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $c_found && $t_found ) {\n\t\t\t\t\t// Finish off table\n\t\t\t\t\t$this->HTML.=\"<td>&nbsp;</td></tr></table>\\n\";\n\t\t\t\t}\n\t\t\t\telse if ( $c_found ) {\n\t\t\t\t\t$this->HTML.=\"</tr></table>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $t_found ) {\n\t\t\t$this->HTML.=\"</table>\\n\";\n\t\t}\n\t\techo $this->HTML;\n\t\t$this->setFooter();\n\n\t\t//Store output buffer\n\t\t$ob = ob_get_contents();\n\t\t$this->reportLog(0,$ts, $ob);\n\n\t\tob_end_flush();\n\t}", "title": "" }, { "docid": "a75daf5b22c03b21f100aeb9cea67c60", "score": "0.3935605", "text": "public function insertMany ($database, $table, $dataSet, $chunking = false, $onDuplicateKeyUpdate = false, $emptyToNull = true, $safe = false, $showErrors = false, $statement = 'INSERT')\n\t{\n\t\t# Ensure the data is an array and that there is data\n\t\tif (!is_array ($dataSet) || !$dataSet) {return false;}\n\t\t\n\t\t# Determine the number of fields in the data by checking against the first item in the dataset\n\t\trequire_once ('application.php');\n\t\tif (!$fields = application::arrayFieldsConsistent ($dataSet)) {\n\t\t\t#!# This needs to set an error so that a subsequent ->error() call shows useful information\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t# Assemble the field names\n\t\t$fields = '`' . implode ('`,`', $fields) . '`';\n\t\t\n\t\t# Chunk the records if required; if not, the entire set will be put into a single container\n\t\t$dataSetChunked = array_chunk ($dataSet, ($chunking ? $chunking : count ($dataSet)), true);\n\t\t\n\t\t# Loop through each chunk (which may be a single chunk containing the whole dataset if chunking is disabled)\n\t\tforeach ($dataSetChunked as $dataSet) {\n\t\t\t\n\t\t\t# Loop through each set of data\n\t\t\t$valuesPreparedSet = array ();\n\t\t\t$preparedStatementValues = array ();\n\t\t\tforeach ($dataSet as $index => $data) {\n\t\t\t\t\n\t\t\t\t# Ensure the data is an array and that there is data\n\t\t\t\tif (!is_array ($data) || !$data) {return false;}\n\t\t\t\t\n\t\t\t\t# Assemble the values\n\t\t\t\t$preparedValuePlaceholders = array ();\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif ($emptyToNull && ($data[$key] === '')) {$data[$key] = NULL;}\t// Convert empty to NULL if required\n\t\t\t\t\tif ($this->valueIsFunctionCall ($data[$key])) {\t// Special handling for keywords, which are not quoted\n\t\t\t\t\t\t$preparedValuePlaceholders[] = $data[$key];\t// State the value directly rather than use a placeholder\n\t\t\t\t\t\tunset ($data[$key]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$placeholder = \":{$index}_{$key}\";\n\t\t\t\t\t$preparedValuePlaceholders[] = ' ' . $placeholder;\n\t\t\t\t\t$preparedStatementValues[$placeholder] = $data[$key];\n\t\t\t\t}\n\t\t\t\t$valuesPreparedSet[$index] = implode (',', $preparedValuePlaceholders);\n\t\t\t}\n\t\t\t\n\t\t\t# Handle ON DUPLICATE KEY UPDATE support\n\t\t\t$dataSetValues = array_values ($dataSet);\t// This temp has to be used to avoid \"Strict Standards: Only variables should be passed by reference\"\n\t\t\t$firstData = array_shift ($dataSetValues);\n\t\t\t$onDuplicateKeyUpdateThisChunk = $this->onDuplicateKeyUpdate ($onDuplicateKeyUpdate, $firstData);\n\t\t\t\n\t\t\t# Assemble the query\n\t\t\t$query = \"{$statement} INTO `{$database}`.`{$table}` ({$fields}) VALUES (\" . implode ('),(', $valuesPreparedSet) . \"){$onDuplicateKeyUpdateThisChunk};\\n\";\n\t\t\t\n\t\t\t# Prevent submission of over-long queries\n\t\t\tif ($maxLength = $this->getVariable ('max_allowed_packet')) {\n\t\t\t\tif (strlen ($query) > (int) $maxLength) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t# In safe mode, only show the query\n\t\t\tif ($safe) {\n\t\t\t\techo $query . \"<br />\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t# Execute the query\n\t\t\t$rows = $this->_execute ($query, $preparedStatementValues, $showErrors);\n\t\t\t\n\t\t\t#!# Needs to report failure if one execution in a chunk failed; detect using $this->error () perhaps\n\t\t\t// application::dumpData ($this->error ());\n\t\t\t\n\t\t\t# Determine the result\n\t\t\t$result = ($rows !== false);\n\t\t\t\n\t\t\t# Log the change\n\t\t\t$this->logChange ($result, true);\n\t\t}\n\t\t\n\t\t# Return the (last) result\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "aa1dc96d8bde7115e01a851c9c055222", "score": "0.39297923", "text": "function get_all_datasets() {\n global $dataset;\n $dbh = pdo_connect();\n $rec = $dbh->prepare(\"SELECT id, querybin, type, active, comments FROM tcat_query_bins WHERE access = \" . TCAT_QUERYBIN_ACCESS_OK . \" OR access = \" . TCAT_QUERYBIN_ACCESS_READONLY . \" ORDER BY LOWER(querybin)\");\n $datasets = array();\n try {\n if ($rec->execute() && $rec->rowCount() > 0) {\n while ($res = $rec->fetch()) {\n $row = array();\n $row['bin'] = $res['querybin'];\n $row['type'] = $res['type'];\n $row['active'] = $res['active'];\n $row['comments'] = $res['comments'];\n $rec2 = $dbh->prepare(\"SELECT count(t.id) AS notweets, MAX(t.created_at) AS max FROM \" . $res['querybin'] . \"_tweets t \");\n if ($rec2->execute() && $rec2->rowCount() > 0) {\n $res2 = $rec2->fetch();\n $row['notweets'] = $res2['notweets'];\n $row['maxtime'] = $res2['max'];\n }\n $rec3 = $dbh->prepare(\"SELECT count(h.id) AS nohashtags FROM \" . $res['querybin'] . \"_hashtags h \");\n if ($rec3->execute() && $rec3->rowCount() > 0) {\n $res3 = $rec3->fetch();\n $row['nohashtags'] = $res3['nohashtags'];\n }\n $rec3 = $dbh->prepare(\"SELECT count(u.id) AS nourls FROM \" . $res['querybin'] . \"_urls u \");\n if ($rec3->execute() && $rec3->rowCount() > 0) {\n $res3 = $rec3->fetch();\n $row['nourls'] = $res3['nourls'];\n }\n $rec3 = $dbh->prepare(\"SELECT count(m.id) AS nomentions FROM \" . $res['querybin'] . \"_mentions m \");\n if ($rec3->execute() && $rec3->rowCount() > 0) {\n $res3 = $rec3->fetch();\n $row['nomentions'] = $res3['nomentions'];\n }\n $rec3 = $dbh->prepare(\"SELECT starttime AS min FROM tcat_query_bins b, tcat_query_bins_periods bp WHERE b.querybin = '\" . $res['querybin'] . \"' AND b.id = bp.querybin_id\");\n if ($rec3->execute() && $rec3->rowCount() > 0) {\n $res3 = $rec3->fetch();\n $row['mintime'] = $res3['min'];\n }\n $row['keywords'] = \"\";\n if ($row['type'] == \"track\") {\n $rec2 = $dbh->prepare(\"SELECT distinct(p.phrase) FROM tcat_query_bins_phrases bp, tcat_query_phrases p WHERE bp.querybin_id = \" . $res['id'] . \" AND bp.phrase_id = p.id ORDER BY LOWER(p.phrase)\");\n if ($rec2->execute() && $rec2->rowCount() > 0) {\n $res2 = $rec2->fetchAll(PDO::FETCH_COLUMN);\n $row['keywords'] = implode(\", \", $res2);\n }\n } elseif (in_array($row['type'], array(\"follow\", \"timeline\"))) {\n $rec2 = $dbh->prepare(\"SELECT u.user_name FROM tcat_query_users u, tcat_query_bins_users bu WHERE bu.querybin_id = \" . $res['id'] . \" AND bu.user_id = u.id AND u.user_name is not null\");\n if ($rec2->execute() && $rec2->rowCount() > 0) {\n $res2 = $rec2->fetchAll(PDO::FETCH_COLUMN);\n $row['keywords'] = implode(\", \", $res2);\n }\n }\n $datasets[$row['bin']] = $row;\n }\n }\n } catch (PDOException $e) {\n if ($e->errorInfo[0] == '42S02') {\n // Base table or view not found\n // Tables not yet created: just return empty $datasets\n } else {\n throw $e;\n }\n }\n\n return $datasets;\n}", "title": "" }, { "docid": "407c3f8c6cfaa806785bb992eeb2bd16", "score": "0.39288545", "text": "function acquirePostedData( $dataset_id, $num_datasets )\n {\n // From config.php\n global $dbname, $dbhost;\n global $udpport, $ipaddr;\n\n // A lot of this only gets posted the first time through\n if ( $dataset_id == 0 )\n {\n $this->add( 'method', $this->analysisType() );\n\n $udp = array();\n $udp['udpport'] = $udpport;\n $udp['ip'] = $ipaddr;\n $this->add( 'server', $udp );\n\n $this->add( 'directory', $_SESSION['request'][$dataset_id]['path'] );\n $this->add( 'datasetCount', $num_datasets );\n\n $database = array();\n $database['name'] = $dbname;\n $database['host'] = $dbhost;\n $database['user_email'] = $_SESSION['email'];\n $database['submitter_email'] = $_SESSION['submitter_email'];\n $this->add( 'database', $database );\n\n $job_parameters = array();\n $job_parameters['CG_modelID'] = $_POST['CG_modelID'];\n $job_parameters['uniform_grid'] = $_POST['uniform_grid'];\n $job_parameters['mc_iterations'] = $_POST['mc_iterations'];\n\n if ( isset( $_POST['req_mgroupcount'] ) )\n $job_parameters['req_mgroupcount'] = $_POST['req_mgroupcount'];\n\n else\n $job_parameters['req_mgroupcount'] = 1;\n\n $job_parameters['tinoise_option'] = $_POST['tinoise_option'];\n $job_parameters['meniscus_range'] = ( $_POST['meniscus_option'] == 1 )\n ? $_POST['meniscus_range'] : 0.0;\n $job_parameters['meniscus_points'] = ( $_POST['meniscus_option'] == 1 )\n ? $_POST['meniscus_points'] : 1;\n $job_parameters['max_iterations'] = ( $_POST['iterations_option'] == 1 )\n ? $_POST['max_iterations'] : 1;\n $job_parameters['rinoise_option'] = $_POST['rinoise_option'];\n $job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&\n $_POST['debug_timings'] == 'on' )\n ? 1 : 0;\n $job_parameters['debug_level'] = $_POST['debug_level-value'];\n $job_parameters['debug_text'] = $_POST['debug_text-value'];\n $job_parameters['experimentID'] = $_SESSION['experimentID'];\n $this->add( 'job_parameters', $job_parameters );\n\n $dataset = array();\n $dataset[ 0 ]['files'] = array(); // This will be done later\n $dataset[ 0 ]['parameters'] = array();\n }\n\n // These will be done every time\n $parameters = array();\n $this->getDBParams( $dataset_id, $parameters ); // DB parameters\n $centerpiece_shape = $parameters['centerpiece_shape'];\n\n // Create new elements for this dataset\n //?? $parameters = $dataset['parameters'];\n $parameters['rawDataID'] = $_SESSION['request'][$dataset_id]['rawDataID'];\n $parameters['auc'] = $_SESSION['request'][$dataset_id]['filename'];\n $parameters['editedDataID'] = $_SESSION['request'][$dataset_id]['editedDataID'];\n $parameters['edit'] = $_SESSION['request'][$dataset_id]['editFilename'];\n // $parameters['modelID'] = $_SESSION['request'][$dataset_id]['modelID'];\n $parameters['noiseIDs'] = array();\n $parameters['noiseIDs'] = $_SESSION['request'][$dataset_id]['noiseIDs'];\n \n $parameters['simpoints'] = $_POST['simpoints-value'];\n $parameters['band_volume'] = ( $centerpiece_shape == 'band forming' )\n ? $_POST['band_volume-value']\n : 0.0;\n $parameters['radial_grid'] = $_POST['radial_grid'];\n $parameters['time_grid'] = $_POST['time_grid'];\n\n // Get arrays with multiple dataset data\n $dataset = $this->get('dataset');\n // Add new datasets\n $dataset[$dataset_id] = $parameters;\n $this->add( 'dataset', $dataset );\n\n$this->show( 0, \"Payload manager 2DSA-CG\\n\" );\n }", "title": "" }, { "docid": "e6fe01120303467701aaeda7789eb365", "score": "0.39243418", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t#Set url\n\t\t$grid->setUrlput(site_url($this->url.'setdata/'));\n\n\t\t//Botones Panel Izq\n\t\t//$grid->wbotonadd(array(\"id\"=>\"edocta\", \"img\"=>\"images/pdf_logo.gif\", \"alt\" => \"Formato PDF\", \"label\"=>\"Ejemplo\"));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('MGAS', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('MGAS', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "5250c19b6c085332930461b595e4f9ad", "score": "0.39197946", "text": "public function addDataSet(IDataSet $dataSet): void\n {\n foreach ($dataSet->getTableNames() as $tableName) {\n if (!\\in_array($tableName, $this->getTableNames())) {\n $this->motherDataSet->addTable($dataSet->getTable($tableName));\n } else {\n $other = $dataSet->getTable($tableName);\n $table = $this->getTable($tableName);\n\n if (!$table->getTableMetaData()->matches($other->getTableMetaData())) {\n throw new InvalidArgumentException(\"There is already a table named $tableName with different table definition\");\n }\n\n $table->addTableRows($dataSet->getTable($tableName));\n }\n }\n }", "title": "" }, { "docid": "45c7700b264bb1c594007c6de8e66950", "score": "0.39173397", "text": "function createFirstChart(&$viewer) {\n # Initialize the Javascript ChartViewer\n $viewer->setScrollDirection(DirectionHorizontalVertical);\n $viewer->setZoomDirection(DirectionHorizontalVertical);\n $viewer->setMouseUsage(MouseUsageScroll);\n\n # Draw the chart\n drawChart($viewer);\n}", "title": "" }, { "docid": "8e1c21e026bfcaf2a7b600f8743e3d27", "score": "0.3913015", "text": "function renderEmbedTabs(&$renderer,$tabs,$init_page_idx,$class='') {\r\n global $ID;\r\n // Selected page defined ?\r\n if(isset($_GET['tabpage_idx'])) $init_page_idx = $_GET['tabpage_idx'];\r\n\r\n // render all tabs !\r\n if($class) $class=' class=\"'.$class.'\"';\r\n $html.= '<div id=\"dwpl-ti-container\"'.$class.'>'.NL;\r\n $html.='<ul class=\"dwpl-ti\">'.NL;\r\n $sz = count($tabs);\r\n for($i=0;$i<$sz;$i++){\r\n if(empty($tabs[$i]['error'])){\r\n $selected_class=($init_page_idx==$i)?' selected':'';\r\n $html.='<li class=\"dwpl-ti-tab\">';\r\n $html.='<div class=\"dwpl-ti-tab-embd-title'.$selected_class.'\">'.$tabs[$i]['title'].'</div></li>'.NL;\r\n $html.='</li>'.NL;\r\n }else{\r\n $html.='<li class=\"dwpl-ti-tab\">';\r\n $html.='<div class=\"dwpl-ti-tab-title error\">'.$tabs[$i]['error'].'</div>';\r\n $html.='</li>'.NL;\r\n }\r\n }\r\n $html.= '</ul>'.NL;\r\n $html.='<div class=\"dwpl-ti-content-box\">';\r\n\r\n for($i=0;$i<$sz;$i++){\r\n $html.='<div id=\"dwpl-ti-content\" class=\"dwpl-ti-content\">';\r\n if($i==$init_page_idx)\r\n $html.='<div class=\"dwpl-ti-tab-embd\">';\r\n else\r\n $html.='<div class=\"dwpl-ti-tab-embd hidden\">';\r\n $goto = $this->getLang('gotohere');\r\n $pagelink = tpl_link(wl($tabs[$i]['page']),$goto,'',true);\r\n if($this->getConf('goto_link_header')!=0)\r\n $html.= '<div class=\"dwpl-ti-permalink-header\">'.$pagelink.'</div>'.NL;\r\n $html.=tpl_include_page($tabs[$i]['page'],false);\r\n if($this->getConf('goto_link_footer')!=0)\r\n $html.= '<div class=\"dwpl-ti-permalink-footer\">'.$pagelink.'</div>'.NL;\r\n $html.= '</div></div>'.NL;\r\n }\r\n $html.='</div>'.NL;\r\n $html.='</div>'.NL;\r\n\r\n $renderer->doc.=$html;\r\n\r\n global $conf;\r\n if($conf['allowdebug']==1){\r\n $renderer->doc.=\"<!-- \\n\".print_r(array($tabs,$init_page_idx,$class),true).\"\\n -->\";\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3119cf42d6141fb508d8f4a412b09520", "score": "0.39093512", "text": "public function generatetoptenringtonedetailReport($data){\n $temp1 = MIS_rintonedetail.'?startdate=' . $data['startdate'] . '&enddate=' . $data['enddate'] . '&group1=' . $data['group1'] .'';\n \n \n echo $temp1;\n echo\"<iframe style='border:none' src=\\\"\" . $temp1 . \"\\\"width='900px' height=600>\";\n \n echo \"hello\";\n \n \n \n }", "title": "" }, { "docid": "776130204fd4be170e87196ae89c61b1", "score": "0.39065576", "text": "function sendWithIFRAME($url, $data, $quotes)\n{\n $iframe = \"<style>#y{display:none;}</style>\"; // We want a invisible iframe, aren't we? \n $iframe .= \"<script>document.write(\";\n \n $tmpI = \"<iframe id=y src=\";\n if(isset($quotes))\n {\n $tmpI = toCharArray($tmpI);\n $tmpI .= \"+\" . generateURL($url, $data, $quotes) . \"+\";\n $tmpI .= toCharArray(\"></iframe>\");\n $iframe .= $tmpI;\n }\n else\n {\n $iframe .= \"'\";\n $tmpI .= \"\\\"\" . generateURL($url, $data, $quotes) . \"+'\\\"></iframe>\";;\n $iframe .= $tmpI . \"'\";\n }\n \n $iframe .= \");\"; \n $iframe .= \"</script>\"; \n return $iframe;\n}", "title": "" }, { "docid": "d933b9071afcd8c531a2addf4a787d5e", "score": "0.39061263", "text": "public function createXmlDataSet($filename) {\n\t\treturn parent::createXmlDataSet($filename);\n\t}", "title": "" }, { "docid": "523d75d5fdf89fa6afd9755ded891e1b", "score": "0.39059505", "text": "public function getDataTableAdapter($schema, $tableName);", "title": "" }, { "docid": "dccff8b10d579773eb2a01428f2aadf9", "score": "0.39028186", "text": "public final function getDataSet() : QueryDataSet {\n\t\t$dataset = new QueryDataSet($this->getConnection());\n\t\t// add all the tables for the project here\n\t\t// THESE TABLES *MUST* BE LISTED IN THE SAME ORDER THEY WERE CREATED!!!!\n\t\t$dataset->addTable(\"profile\");\n\t\t$dataset->addTable(\"category\");\n\t\t$dataset->addTable(\"report\");\n\t\t$dataset->addTable(\"image\");\n\t\t// the second parameter is required because comment is also a SQL keyword and is the only way PHPUnit can query the comment table\n\t\t$dataset->addTable(\"comment\", \"SELECT commentId, commentProfileId, commentReportId, commentContent, commentDateTime FROM `comment`\");\n\t\treturn($dataset);\n\t}", "title": "" }, { "docid": "2c8758e7190b5504cb25652a23522bd2", "score": "0.38895726", "text": "function load($id,$name,&$sql){\r\n\t\t$this->samples = array();\r\n\r\n\t\t$query = \"SELECT id, name, description, first_time_point, last_time_point, num_time_points, hidden, \r\n\t\tsize_unprocessed_captured_images,size_processed_captured_images,size_unprocessed_region_images,size_processed_region_images,size_metadata, size_video, size_calculation_time FROM experiments \";\r\n\t\tif ($name != '')\r\n\t\t\t$query .=\"WHERE name = '$name'\";\r\n\t\telse {\r\n\t\t\tif ($id != '' && $id >0)\r\n\t\t\t\t$query .= \"WHERE id = '$id'\";\r\n\t\t\telse throw new ns_ex(\"ns_experiment::Not enough information specified to load experiment info!\");\r\n\t\t}\r\n\t\t$sql->get_row($query,$res);\r\n\t\tif (sizeof($res) == 0)\r\n\t\t\treturn false;\r\n\t\t$this->id_p = $res[0][0];\r\n\t\t$this->name = $res[0][1];\r\n\t\t$this->description = $res[0][2];\r\n\t\t$this->first_time_point = $res[0][3];\r\n\t\t$this->last_time_point = $res[0][4];\r\n\t\t$this->num_time_points = $res[0][5];\r\n\t\t$this->hidden = $res[0][6];\r\n\t\t$this->size_unprocessed_captured_images = $res[0][7];\r\n\t \t$this->size_processed_captured_images= $res[0][8];\r\n\t \t$this->size_unprocessed_region_images= $res[0][9];\r\n\t \t$this->size_processed_region_images= $res[0][10];\r\n\t\t$this->size_metadata= $res[0][11];\r\n\t\t$this->size_video= $res[0][12];\r\n\t\t$this->size_calculation_time = $res[0][13];\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "499cf68ab658ad2fbe7e099d87f54295", "score": "0.3883228", "text": "public function createChart(\n string $chartid,\n array $labels,\n array $dataSets,\n string $width,\n string $height,\n string $chartType = 'line',\n bool $selfTriggerChart = true,\n array $customConfig = []\n ): string {\n $this->jsonPacked = [\n \"chartID\" => $chartid,\n 'type' => $chartType,\n 'data' => [\n 'labels' => $labels,\n ],\n ];\n $this->customize = $customConfig;\n $this->crateChartDataset($chartType, $dataSets);\n $this->createChartOptions($chartType, $customConfig);\n\n if ($selfTriggerChart == true) {\n $this->html_js_onready .= \"var \" . $chartid . \"options = JSON.parse('\" .\n json_encode($this->jsonPacked) . \"');\\n\";\n $this->html_js_onready .= \"var \" . $chartid . \"object = document . getElementById('Chart\"\n . $chartid . \"') . getContext('2d');\\n\";\n $this->html_js_onready .= \"new Chart(\" . $chartid . \"object, \" . $chartid . \"options);\\n\";\n } else {\n $this->chartNames[] = \"Chart\" . $chartid;\n $this->chartDataSets[\"Chart\" . $chartid] = $this->jsonPacked;\n }\n return '<br/><canvas id=\"Chart'\n . $chartid . '\" style=\"max-width: ' . $width . 'px; max-height: ' . $height . 'px;\"></canvas>';\n }", "title": "" }, { "docid": "a45f9f67c7266841b74f8fca29990d15", "score": "0.3883035", "text": "public function mapear($dataSet)\n {\n }", "title": "" }, { "docid": "a45f9f67c7266841b74f8fca29990d15", "score": "0.3883035", "text": "public function mapear($dataSet)\n {\n }", "title": "" }, { "docid": "b6025da14295620a996e37f6a76215e5", "score": "0.387917", "text": "public function generatetoptencategorydetailReport($data){\n// echo $temp1;\n// echo\"<iframe style='border:none' src=\\\"\" . $temp1 . \"\\\"width='900px' height=600>\";\n \n // $temp1 = 'http://192.168.4.41:8081/IVRReport1/CategoryDetailReport?startdate=' . $data['startdate'] . '&enddate=' . $data['enddate'] . '&group1=' . $data['group1'] .'';\n \n $temp1 = MIS_categorydetail.'?startdate=' . $data['startdate'] . '&enddate=' . $data['enddate'] . '&group1=' . $data['group1'] .'';\n \n echo $temp1;\n echo\"<iframe style='border:none' src=\\\"\" . $temp1 . \"\\\"width='900px' height=600>\"; \n \n echo \"hello\";\n \n \n \n }", "title": "" }, { "docid": "f55a8f187bea56077e63e5c8d81e28a1", "score": "0.38767973", "text": "public function setStepData(string $name, array $data, string $type = null): FlowDataInterface;", "title": "" }, { "docid": "4444cb404d7ae499405a7b7a82448b90", "score": "0.38764292", "text": "function build_timetables_json($timetables, &$parts) {\n foreach ($timetables as $timetableKey => $timetableVal) {\n $part = $parts[$timetableKey];\n foreach ($timetableVal as $partKey => $partVal) {\n foreach ($partVal as $moduleKey => $moduleVal) {\n $moduleId = \"${timetableKey}-{$partKey}-${moduleKey}\";\n $module = new Module($moduleId, $moduleKey, null, null, null);\n $part->add_child($module);\n foreach ($moduleVal as $seriesKey => $seriesVal) {\n\t\t // original code for seriesID which uses the id field from mrbs_entry\n //$seriesId = \"${timetableKey}-{$partKey}-${moduleKey}-${seriesKey}\";\n\t\t // code from Simon which uses the ical_uid instead. this id doesn't change on edit, which id does. -jlp\n\t\t $seriesId = \"${timetableKey}-{$partKey}-${moduleKey}-${seriesKey}\";\n $series = new Series($seriesId, $seriesVal[0]['name'], null);\n $module->add_series($series);\n\t\t $i=0;\n foreach ($seriesVal as $eventVal) {\n\t\t\t// again this uses 'id' and that changes on edit. I wrote a replacement which uses series_id + ical_uid + an\n\t\t\t// incremented number to make a unique, REPEATABLE, number for each individual event. This means the API can\n\t\t\t// UPDATE existing extries instead of creating new ones. Not sure of the implications if the no of items changes, though... -JLP\n //$eventExternalId = \"${seriesId}-\" . $eventVal['id'];\n\t\t\t$eventExternalId = $i . \"-\" . str_replace(' ', '_', $seriesId);\n\t\t\t//echo $eventExternalId . \"\\r\\n\";\n $location = get_event_location($eventVal);\n $start = date(DATE_ISO8601, $eventVal['start_time']);\n $end = date(DATE_ISO8601, $eventVal['end_time']);\n $type = get_event_type_from_name($eventVal['name']);\n $event = new Event($eventExternalId, $eventVal['name'], $eventVal['description'], null, $location, $start, $end, $type);\n $event->add_organiser(new Organiser($eventVal['requestor'], null));\n $series->add_event($event);\n\t\t\t$i++;\n }\n }\n }\n }\n }\n return $parts;\n}", "title": "" }, { "docid": "13e4b4977cf1b2722e4119b824dc6626", "score": "0.3875171", "text": "function process($matches){\r\n\t\t\r\n\t\t$params = explode(\",\", $matches[2]); \r\n\t\t\r\n\t\t$data_id = $params[0];\r\n\t\t$settings_id = $params[1];\r\n\t\t$cht_type = $params[2];\r\n\t\t\r\n\t\tif ($params[3] == null) { \r\n\t\t\t\t$width = \"100%\"; \r\n\t\t\t} else {\r\n\t\t\t\t$width = $params[3];\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif ($params[4] == null) { \r\n\t\t\t\t$hratio = 3/4; \r\n\t\t\t} else {\r\n\t\t\t\t$hratio = $params[4];\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\r\n\t\t/* ASSIGN A RANDOM ID TO THE CHART DIV */\r\n\t\t\r\n\t\t$randomDivID = rand();\r\n\t\t\t\t\r\n\t\t/* SEND CHART CODE TO BROWSER */\r\n\t\r\n\t\treturn '<div id=\"chartdiv'.$randomDivID.'\" style=\"width: '.$width.'; position:relative;\"></div>\r\n\t\t\t<script> \r\n\t\t\t$.ajax({type: \"GET\", url: \"http://xcheque/amcharts/charts/'.$cht_type.'.php?div_id='.$randomDivID.'&data_id='.$data_id.'&set_id='.$settings_id.'\", dataType: \"script\",success: function(){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar a = document.getElementById(\"chartdiv'.$randomDivID.'\"); \t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar w = a.offsetWidth;\t\r\n\t\t\t\t\t\t\tvar h = w *'.$hratio.';\r\n\t\t\t\t\t\t\ta.style.height = h+\"px\";\r\n\t\t\t\t\t\t\tchart.write(\"chartdiv'.$randomDivID.'\");\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</script>';\r\n\t}", "title": "" }, { "docid": "21112a662070dbf56ee0d4f01f61e92e", "score": "0.38740173", "text": "function setup($data, $type = 'line', $month = true, $options, $specific = null) {\r\n $this->font['family'] = WWW_ROOT . DS . 'files' . DS . 'fonts' . DS . 'tahoma.ttf';\r\n \r\n // init data\r\n $this->data = new pData;\r\n $this->specific = $specific;\r\n \r\n if ( !array_key_exists($type, $this->validType) ) {\r\n $type = 'line';\r\n }\r\n \r\n // validate data\r\n $data = $this->__checkData($data, $type, $month, $options);\r\n if ( !$data ) {\r\n return $this->error();\r\n }\r\n \r\n // init chart\r\n if ( $type !== 'pie' ) {\r\n $this->chart = new pChart($this->imageSize['width'], $this->imageSize['height']);\r\n \r\n // set font\r\n $this->chart->setFontProperties( $this->font['family'], $this->font['size'] );\r\n // set graph area of the chart\r\n $this->chart->setGraphArea(\r\n $this->graphArea['x1'], $this->graphArea['y1'], $this->graphArea['x2'], $this->graphArea['y2']\r\n );\r\n \r\n // draw outer / border rounded rectangle\r\n $this->chart->drawRoundedRectangle(\r\n $this->roundedBorder['x1'], $this->roundedBorder['y1'], \r\n $this->roundedBorder['x2'], $this->roundedBorder['y2'],\r\n $this->roundedBorder['radius'],\r\n $this->roundedBorder['r'], $this->roundedBorder['g'], $this->roundedBorder['b']\r\n );\r\n \r\n // draw inner rounded rectangle\r\n $this->chart->drawFilledRoundedRectangle(\r\n $this->rounded['x1'], $this->rounded['y1'], $this->rounded['x2'], $this->rounded['y2'],\r\n $this->rounded['radius'],\r\n $this->rounded['r'], $this->rounded['g'], $this->rounded['b']\r\n );\r\n // draw graph area\r\n $this->chart->drawGraphArea(\r\n $this->graphArea['r'], $this->graphArea['g'], $this->graphArea['b'],\r\n $this->graphArea['strip']\r\n );\r\n // draw scale or X axe\r\n $this->chart->drawScale(\r\n $this->data->GetData(), $this->data->GetDataDescription(), SCALE_NORMAL,\r\n $this->scale['r'], $this->scale['g'], $this->scale['b'], $this->scale['thick'],\r\n $this->scale['angle'], $this->scale['decimal'], $this->scale['rightScale']\r\n );\r\n // draw grid\r\n $this->chart->drawGrid(\r\n $this->grid['dashed'], $this->grid['mosaic'],\r\n $this->grid['r'], $this->grid['g'], $this->grid['b'],\r\n $this->grid['alpha']\r\n );\r\n \r\n } else {\r\n $this->chart = new pChart(420, 250);\r\n $this->chart->drawFilledRoundedRectangle(7,7,413,243,5,240,240,240);\r\n $this->chart->drawRoundedRectangle(5,5,415,245,5,230,230,230);\r\n $this->chart->createColorGradientPalette(195,204,56,223,110,41,5);\r\n $this->chart->AntialiasQuality = 0;\r\n }\r\n \r\n // Draw the 0 line\r\n // adding treshold can be called from $this->addTreshold()\r\n $this->chart->setFontProperties( $this->font['family'], $this->font['size'] );\r\n if ( !array_key_exists('title', $options) ) {\r\n $options['title'] = 'Chart';\r\n }\r\n // Draw the graph, depend on the $type\r\n if ( $type === 'pie' ) {\r\n $this->chart->drawPieGraph($this->data->GetData(), $this->data->GetDataDescription(),180,130,110,PIE_PERCENTAGE_LABEL,FALSE,50,20,5);\r\n $this->chart->drawPieLegend(330,15,$this->data->GetData(),$this->data->GetDataDescription(),250,250,250);\r\n // draw chart's title\r\n $this->chart->setFontProperties( $this->font['family'], 10);\r\n $this->chart->drawTitle(10, 20, $options['title'], 100, 100, 100);\r\n } else if ( $type === 'bar' ) {\r\n if ( array_key_exists('shadow', $options) ) {\r\n $shadow = $options['shadow'];\r\n }\r\n $this->chart->drawBarGraph( $this->data->GetData(), $this->data->GetDataDescription(), $shadow);\r\n $this->chart->drawLegend(1020,30,$this->data->GetDataDescription(), 255, 255, 255);\r\n \r\n // draw chart's title\r\n $this->chart->setFontProperties( $this->font['family'], 8);\r\n //$this->chart->drawTitle(70, 22, $options['title'], 50, 50, 50, 585);\r\n } else { // default to line\r\n $this->chart->drawLineGraph($this->data->GetData(), $this->data->GetDataDescription());\r\n $this->chart->drawLegend(620,30,$this->data->GetDataDescription(), 255, 255, 255);\r\n \r\n // draw chart's title\r\n $this->chart->setFontProperties( $this->font['family'], 10);\r\n $this->chart->drawTitle(60, 22, $options['title'], 50, 50, 50, 585);\r\n }\r\n \r\n // draw plot can be called from $this->addPlot(), make sure called after setup(),\r\n // also see $this->plot property\r\n //$this->chart->drawPlotGraph($this->data->GetData(),$this->data->GetDataDescription(),3,2,255,255,255);\r\n \r\n \r\n // draw labels\r\n foreach ( $data as $content ) {\r\n foreach ( $content['values'] as $key => $val ) {\r\n /*\r\n if ($content['name'] == 'Anggaran' ) {\r\n $this->chart->setLabel($this->data->GetData(), $this->data->GetDataDescription(), $content['name'], $key, number_format($val,2,'.',','), $this->labels['max']['r'], $this->labels['max']['g'], $this->labels['max']['b']);\r\n } else {\r\n $this->chart->setLabel($this->data->GetData(), $this->data->GetDataDescription(), $content['name'], $key, number_format($val,2,'.',','), $this->labels['min']['r'], $this->labels['min']['g'], $this->labels['min']['b']);\r\n }\r\n */\r\n \r\n // Write values on Serie1 & Serie2\r\n $this->chart->setFontProperties( $this->font['family'], 10);\r\n $this->chart->writeValues($this->data->GetData(),$this->data->GetDataDescription(), $content['name'], $this->specific);\r\n }\r\n }\r\n \r\n \r\n // Optionally you can call setLabel() before calling $this->setup() to\r\n // set label property (see $this->labels) and their visibility (see $this->label)\r\n if ( ($this->label['max'] || $this->label['min']) && $type !== 'pie' ) {\r\n // labeling max. and min. order for each data\r\n $this->chart->setFontProperties( $this->font['family'], $this->font['size'] );\r\n foreach ( $data as $content ) {\r\n if ( $this->label['max'] ) {\r\n $this->chart->setLabel($this->data->GetData(), $this->data->GetDataDescription(), $content['name'], $content['max'], \"Max. \" . $content['name'] , $this->labels['max']['r'], $this->labels['max']['g'], $this->labels['max']['b']);\r\n }\r\n \r\n if ( $this->label['min'] ) {\r\n $this->chart->setLabel($this->data->GetData(), $this->data->GetDataDescription(), $content['name'], $content['min'],\"Min. \" . $content['name'], $this->labels['min']['r'], $this->labels['min']['g'], $this->labels['min']['b']);\r\n }\r\n }\r\n }\r\n \r\n }", "title": "" }, { "docid": "4d3bd009757590da54b679e0393a2520", "score": "0.3870648", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grid'] = $grid->deploy();\n\n\t\t$bodyscript = '\n<script type=\"text/javascript\">\n$(function() {\n\t$( \"input:submit, a, button\", \".otros\" ).button();\n});\n\njQuery(\"#a1\").click( function(){\n\tvar id = jQuery(\"#newapi'. $param['grid']['gridname'].'\").jqGrid(\\'getGridParam\\',\\'selrow\\');\n\tif (id)\t{\n\t\tvar ret = jQuery(\"#newapi'. $param['grid']['gridname'].'\").jqGrid(\\'getRowData\\',id);\n\t\twindow.open(\\''.site_url('formatos/ver/CIVA/').'/\\'+id, \\'_blank\\', \\'width=900,height=800,scrollbars=yes,status=yes,resizable=yes,screenx=((screen.availHeight/2)-450), screeny=((screen.availWidth/2)-400)\\');\n\t} else { $.prompt(\"<h1>Por favor Seleccione un Movimiento</h1>\");}\n});\n</script>\n';\n\n\t\t#Set url\n\t\t$grid->setUrlput(site_url($this->url.'setdata/'));\n\n\t\t$WestPanel = '\n<div id=\"LeftPane\" class=\"ui-layout-west ui-widget ui-widget-content\">\n<div class=\"anexos\">\n\n<table id=\"west-grid\" align=\"center\">\n\t<tr>\n\t\t<td><div class=\"tema1\"><table id=\"listados\"></table></div></td>\n\t</tr>\n\t<tr>\n\t\t<td><div class=\"tema1\"><table id=\"otros\"></table></div></td>\n\t</tr>\n</table>\n\n<table id=\"west-grid\" align=\"center\">\n\t<tr>\n\t\t<td></td>\n\t</tr>\n</table>\n</div>\n'.\n//\t\t<td><a style=\"width:190px\" href=\"#\" id=\"a1\">Imprimir Copia</a></td>\n'</div> <!-- #LeftPane -->\n';\n\n\t\t$SouthPanel = '\n<div id=\"BottomPane\" class=\"ui-layout-south ui-widget ui-widget-content\">\n<p>'.$this->datasis->traevalor('TITULO1').'</p>\n</div> <!-- #BottomPanel -->\n';\n\t\t//$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t//$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('CIVA', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('CIVA', 'JQ');\n\t\t$param['tema1'] = 'darkness';\n\t\t$param['anexos'] = 'anexos1';\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$this->load->view('jqgrid/crud',$param);\n\t}", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "292dce0fb25f89abb8c64bf979c1cafd", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "d9326c5cccbc2dd88181065b59b8d16d", "score": "0.7718656", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "8e7ef76dcdf92f45620df5e3bb3c0e7b", "score": "0.76893777", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(MakeModuleController::class, array_filter([\n 'name' => \"{$controller}Controller\",\n 'module' => $this->argument('module'),\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n ]));\n }", "title": "" }, { "docid": "f565f431a22e82abe87e5c68eb584e12", "score": "0.7595201", "text": "private function makeController()\n {\n\n new MakeController($this, $this->files);\n }", "title": "" }, { "docid": "7522b4e75e8022f9b4896d6adb036aec", "score": "0.7408162", "text": "protected function createController($controllerName) {\n require_once PATH_CONTROLLERS_DIR.$controllerName.'.php';\n return new $controllerName;\n }", "title": "" }, { "docid": "14fafcd88b131b2eaa5f30e438b6d974", "score": "0.73584074", "text": "public function createController()\n {\n // Derive the correct namespace\n $name = $this->qualifyClass(\"Http/Controllers/{$this->singular()}Controller\");\n\n // Determine the file path\n $path = $this->getPath($name);\n\n // Ensure this controller doesn't already exist\n if ($this->alreadyExists($path)) {\n $this->error('Controller already exists!');\n return false;\n }\n\n // Ensure the path is reachable\n $this->makeDirectory($path);\n\n // Fetch out stubbed file template\n $stub = $this->files->get($this->stubPath('controller'));\n\n // Replace stubbed placeholders with real values\n $controller = $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n $replacements = [\n 'DummyFullModelClass' => $this->singular(),\n 'DummyModelClass' => class_basename($this->singular()),\n 'DummyModelVariablePlural' => lcfirst($this->plural()),\n 'DummyModelVariable' => lcfirst($this->singular()),\n ];\n\n $controller = str_replace(array_keys($replacements), array_values($replacements), $controller);\n\n // Write the file to disk\n $this->files->put($path, $controller);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "6f4b3e1f2d4642658323f5ca5d89ff15", "score": "0.7145347", "text": "public function createController(){\n\t\t// Check Class\n\t\tif(class_exists($this->controller)){\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)){\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t} else {\n\t\t\t\t\t// Method Does Not Exist\n\t\t\t\t\techo '<h1>Method does not exist</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not found</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exist\n\t\t\techo '<h1>Controller class does not exist</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "18e976b5fe04d773fbcc524bd8e07d39", "score": "0.6996465", "text": "public static function init(): Controller\n {\n return new CompanyController();\n }", "title": "" }, { "docid": "c30b5e0cdc833f02671bd56ba0818419", "score": "0.6947697", "text": "function create_controller () {\n\t\t$file_content = file_get_contents('generator/GeneratedObjectController.php');\n\n\t\t// replace names\n\t\t$file_content = $this->replace_names($file_content);\n\n\t\t// replace datatable display & search columns\n\t\t$content = [];\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\t$content[] = \"'$name'\";\n\t\t}\n\t\t$file_content = str_replace('// generator display columns', '$this->datatable->display_columns = ['.implode(', ', $content).'];', $file_content);\n\t\t$file_content = str_replace('// generator search columns', '$this->datatable->search_columns = ['.implode(', ', $content).'];', $file_content);\n\n\t\t// replace validator rules\n\t\t$content = '';\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tif ($type != 'ai') {\n\t\t\t\t$content .= '\t\t$validator->rules[] = [\\''.ucfirst(str_replace('_', ' ', $name)).'\\', \\''.$name.'\\', \\'required\\'];'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$file_content = str_replace('\t\t// generator rules', rtrim($content, PHP_EOL), $file_content);\n\n\t\t// create new class file with content\n\t\tfile_put_contents('app/controllers/'.$this->name['class'].'Controller.php', $file_content);\n\t}", "title": "" }, { "docid": "3e36ab8b17f0acf1f70a5f948e8e68f9", "score": "0.694347", "text": "public function setController()\n {\n if (isset($this->url[0])) {\n if (file_exists(__DIR__.'/../controllers/'.$this->url[0].'Controller.php')) {\n $this->controller = '\\App\\\\Controllers\\\\'.ucfirst($this->url[0]).'Controller';\n }\n unset($this->url[0]);\n }\n return new $this->controller;\n }", "title": "" }, { "docid": "5e49e15057f2dc0fc7a292ca0315aed4", "score": "0.6919487", "text": "public static function build(): Controller;", "title": "" }, { "docid": "7c22a989693f747de29e4a8acfe67cd7", "score": "0.6913309", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n\n // check extends\n if(in_array('Controller', $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Method does not exist</h3></center>\";\n }\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Base controller does not exist</h3></center>\";\n }\n\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Class does not exist</h3></center>\";\n }\n }", "title": "" }, { "docid": "14112aaf6855b202948ff99a111500e5", "score": "0.68924665", "text": "private function createController(Request $request)\n {\n $controller = \"Post\"; // Default controller\n if ($request->existParameter('controller'))\n {\n $controller = $request->getParameter('controller');\n $controller = ucfirst (strtolower($controller)); // First letter in upper case\n }\n\n // Create the controller file name\n $classController = $controller . \"Controller\";\n $fileController = \"controller/\" . $classController . \".php\"; // concatenation for build the name of the controller file\n if (file_exists($fileController)) \n {\n // Instantiation of the controller adapted to the query\n require($fileController);\n $controller = new $classController();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"Fichier '$fileController' introuvable\");\n }", "title": "" }, { "docid": "93d7df3a09cc014864daa234c8723abb", "score": "0.68385243", "text": "public function makeApiController()\n {\n $controllerClass = \"{$this->module}/{$this->module}Controller\";\n\n $this->call('make:controller', [\n 'name' => $controllerClass,\n '--api' => true,\n ]);\n }", "title": "" }, { "docid": "bb4542d12133680bee2ccc4ff64862ac", "score": "0.6778695", "text": "public function createController(string $controller, array $services) {\n return new $controller($this->getServices($services));\n }", "title": "" }, { "docid": "741d17127e5bffbe3e123e20f5163cec", "score": "0.6766812", "text": "public function CreateController()\n {\n if(class_exists($this->controller))\n {\n $parents = class_parents($this->controller);\n\n //does the class extend the controller class\n //if not error to bad url\n if(in_array('BaseController', $parents))\n {\n //does the class contain the requested method\n //if not error to bad url\n if(method_exists($this->controller, $this->action))\n {\n return new $this->controller($this->action, $this->urlParams);\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }", "title": "" }, { "docid": "1da6b6bfbe1b17981fb3006484b5611d", "score": "0.6766166", "text": "public function createController(){\n // check for class User in the url\n if(class_exists($this->controller)){\n //class_parents — Return parent classes of the given class as array\n //eg.User class in index.php/User/register\n //if User extends class Controller, then result is an array of parent class Controller\n $parents = class_parents($this->controller);\n \n //check Extend\n //in_array(needle, haystack)\n //checks for class Controller in the returned array\n if(in_array('Controller', $parents)){\n //does the class User have a method register?\n //bool method_exists ( mixed $object , string $method_name )\n if(method_exists($this->controller, $this->action)){\n //creates an instance object of the User class\n //this class is extends base Controller class\n //its passed a method (register) and the url (index.php/Users/register)\n return new $this->controller($this->action, $this->request);\n }else{\n //Method does not exist\n echo 'Method does not exist';\n return;\n }\n }else {\n //Base controller not found\n echo \"Base controller not found\";\n }\n }else{\n //Controller class does not exist\n echo \"Controller class does not exist\";\n }\n }", "title": "" }, { "docid": "cfcabc72a757dd305cc1e08a6bd5f845", "score": "0.6720695", "text": "private function makeApiController()\n {\n\n new MakeApiController($this, $this->files);\n }", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.6703522", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "e5e0c55c4714900fb5374b54efede745", "score": "0.6685761", "text": "public function createControllerFile()\n {\n $controller_path = app_path('Http/Controllers/' . $this->replaces['{role_class}']);\n if (!$this->files->exists($controller_path)) {\n $this->files->makeDirectory($controller_path, 0755, true);\n }\n\n // create controller file\n $controller_file = $controller_path . '/' . $this->replaces['{model_class}'] . 'Controller.php';\n\n // make sure controller file does not exist\n if ($this->files->exists($controller_file)) {\n $this->warn('Controller file exists: <info>' . $controller_file . '</info>');\n return;\n }\n\n $controller_stub = $this->files->get($this->stubs_path . '/controller.stub');\n $this->files->put($controller_file, $this->replace($controller_stub));\n $this->line('Controller file created: <info>' . $controller_file . '</info>');\n }", "title": "" }, { "docid": "521cf4eb14600a330fed817dc21b0a7f", "score": "0.668207", "text": "private function instanceController()\n\t\t{\n\t\t\tglobal $error;\n\t\t\tif ( count($this->url) > 3 ) {\n\t\t\t\t$file = 'app/controller/'.$this->controller.'Controller.php';\n\t\t\t} else {\n\t\t\t\t$file = 'app/controller/'.URL_CONTROLLER.'Controller.php';\n\t\t\t}\n\t\t\t\n\t\t\tif ( empty($this->folder) )\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->folder.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$file = 'app/controller/'.$this->folder.'/'.$this->controller.'Controller.php';\n\t\t\t\t}\n\t\t\t$accionController = $this->action;\n\t\t\t\n\t\t\t// ejecucion de un bloque try and catch para poder gestionar el error\n\t\t\tif ( file_exists($file) ) \n\t\t\t{\n\t\t\t\t$object = new $class();\n\t\t\t\t$object->$accionController();\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$error = new ManagerError\\ManagerError('Archivo no encontrado','404','User');\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "232b6405b2d7c8a893f9c323036a432d", "score": "0.6564576", "text": "public function createActionController();", "title": "" }, { "docid": "d4769cc643f23b8ae5ddf8d17915f6c8", "score": "0.6559158", "text": "function factory($type, $router = null) {\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tControllerFactory::import($type);\n\t\t\n\t\t$class_name = Inflector::camelize(basename($type)).'Controller';\n\t\t\n\t\tif (!class_exists($class_name)) {\n\t\t\ttrigger_error(\"Controller file for '$type' exists, but doesn't contain controller class '$class_name'\", E_USER_ERROR);\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller = new $class_name;\n\t\t\n\t\tif (!is_a($controller, 'Controller')) {\n\t\t\ttrigger_error(\"Class '$class_name' doesn't extend Controller\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller->full_type = $type;\n\t\t$controller->router = $router;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "10fd6cfcfb90d057fcdf8ec6193fa1d4", "score": "0.6557814", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\t\t$this->Controller = new Controller();\n\t\t$this->Controller->uses = array();\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "901fccfeeeff48ee3d2a996f0035f62f", "score": "0.64692736", "text": "protected function buildController(): void\n {\n $path = $this->namespace.$this->controllerPath.$this->argument('controller');\n // Controller namespace\n $this->controller = str_replace('/', '\\\\', $path);\n if ($this->laravel->runningInConsole()) {\n // Controller does not exists\n if (!class_exists($this->controller.$this->controllerExtension)) { // Append the 'Controller' suffix for path checking\n $response = $this->ask(\"Controller [{$this->controller}] does not exist. Would you like to create it?\", 'Yes');\n if ($this->rateResponse($response)) {\n // Build the controller by mocking the Artisan::call()\n $this->mock('controller', $this->controller.$this->controllerExtension);\n $this->line(\"Controller [{$this->controller}] has been successfully created.\");\n } else {\n $this->line(\"Controller [{$this->controller}] does not get created.\");\n }\n }\n }\n\n $controllerParts = explode('\\\\', $this->controller);\n $this->controllerName = array_pop($controllerParts);\n }", "title": "" }, { "docid": "2f8252c499ee07c46b4ca37b039a7869", "score": "0.6456961", "text": "public static function factory($controller)\n {\n $className = \"app\\\\controllers\\\\{$controller}\";\n return class_exists($className) ? new $className() : null;\n }", "title": "" }, { "docid": "a6e6b0d124f20a1cb2d58a70d077ff7a", "score": "0.643471", "text": "public function createAccount()\n {\n return new CreateAccountController($this->dataRecord, $this);\n }", "title": "" }, { "docid": "22c5802794fb4a7741267b3d008c88ce", "score": "0.6424693", "text": "public function create()\n\t{\n\t\t//\n\t\treturn 'CobrosController.create()';\n\t}", "title": "" }, { "docid": "5e48ebea1216127ead2d9806b65182f8", "score": "0.6418414", "text": "public static function getController()\n {\n if (is_null(self::$instance))\n self::$instance = new Controller();\n return self::$instance;\n }", "title": "" }, { "docid": "55f605d4165a52b1b46b8eb8c5ef254a", "score": "0.6402445", "text": "public function __invoke(): Controller\\Customer\n {\n // Since we don't have a database, we're going to insert data manually and pretend the database exists.\n $data = new Vo\\Customer('Joe Schmoe', $this->getRentals());\n\n $model = new Model\\Customer($data);\n $view = new View\\Customer($model);\n\n $controller = new Controller\\Customer($model, $view);\n\n return $controller;\n }", "title": "" }, { "docid": "ccd5cc4e8c9e85da6eb3064d6e02d0c5", "score": "0.64017534", "text": "private function load_controller() {\n\t\tif ( empty( $this->url[0] ) ) {\n\n\t\t\t// Default controller\n\t\t\t$this->controller = new Index_Controller;\n\n\t\t} else {\n\n\t\t\t// Construct the controller name\n\t\t\t$controller = ucfirst( strtolower( $this->url[0] ) ) . '_Controller';\n\n\t\t\t// Check if the requested controller exists\n\t\t\tif ( class_exists( $controller ) ) {\n\n\t\t\t\t$this->controller = new $controller;\n\n\t\t\t} else {\n\n\t\t\t\ttrigger_error( 'Error loading controller.', E_USER_NOTICE );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "52f7bec32720f6b40740a4ff365a324c", "score": "0.6340978", "text": "private static function toController($controller, Request $req, Response $resp){\n $c = think_controller_analyze($controller);// Analyze controller reference name\n $appNameSpace = $c->appNameSpace;\n $controllerNameSpace = $c->controllerNameSpace;\n if(in_array($appNameSpace, self::$deny_app_list)){// Deny app list works\n throw new ControllerNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace);\n }\n $methodName = $c->methodName;\n $classFullName = $c->classFullName;\n try{\n global $TW_ENV_REQUEST, $TW_ENV_LANG;\n $req->controllerInfo = $c; // Inject Controller environment info\n $TW_ENV_REQUEST = $req;\n $TW_ENV_LANG = $req->getLang();\n $controller = new $classFullName($req, $resp); // Get a Controller instance\n }catch (\\Error $e){\n /* Locate the Controller PHP file */\n $phpFile = Loader::classToAppFilePathPsr0($classFullName);\n if(!is_file($phpFile)){\n $phpFile = Loader::classToAppFilePath($classFullName);\n }\n if(is_file($phpFile)){\n $errorMsg = \"\";\n $result = Debug::checkPHPSyntax($phpFile, $errorMsg);// Check syntax error\n if(!$result){\n throw new SyntaxParseException($phpFile, $errorMsg);\n }\n }\n /* File not found */\n throw new ControllerNotFoundException($e, $appNameSpace.\"/\".$controllerNameSpace);\n }\n if(!is_callable(array($controller, $methodName))){\n /* Method not found */\n throw new MethodNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n try{\n /* Call _init method of Controller */\n if(is_callable(array($controller, \"_init\"))){\n $controller->_init();\n }\n /* Call _beforeAction method of Controller */\n if(is_callable(array($controller, \"_beforeAction\"))){\n $controller->_beforeAction($methodName);\n }\n /* Call the big guy */\n $controllerRet = $controller->$methodName($req, $resp);\n return $controllerRet;\n }catch (\\Error $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\PDOException $e){\n throw new DbException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\Exception $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n }", "title": "" }, { "docid": "988f987743f5492b0a78cc3b0af7f840", "score": "0.6334975", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results[\"brand_id\"] != null) {\n # Success if there's an envelope Id and the brand name isn't a duplicate\n $this->clientService->showDoneTemplate(\n \"New Brand sent\",\n \"New Brand sent\",\n \"The Brand has been created!<br/> Brand ID {$results[\"brand_id\"]}.\"\n );\n }\n # If the brand name is null the brand name is a duplicate.\n else {\n $GLOBALS['twig']->display('error_eg028.html', [\n 'title' => 'Duplicate Brand Name'\n ]);\n }\n } \n else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "2f618722b4ae193a0cf549a8283c2862", "score": "0.63231343", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = CreateAnEnvelopeService::worker($this->args, $this::DEMO_DOCS_PATH, $this->clientService);\n\n if ($results) {\n # Redirect the user to the embedded signing\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl (see the make recipient_view_request method)\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "fff7ef09f4829cc8af5393dca2558e2c", "score": "0.627688", "text": "function loadControler() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = root . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $name . '.php';\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "9224437f2f27e230e9e4591310df8791", "score": "0.6235137", "text": "public function initController()\n\t{\n\t\t// already created\n\t\t// already created\n\t\tif ($this->controller instanceof Controller) {\n\t\t\treturn;\n\t\t}\n\t\t$slug = $this->request->getControllerString();\n//\t\tllog($slug);\n\t\tif (!$slug) {\n\t\t\tthrow new Exception404($slug);\n\t\t}\n\t\tif ($_REQUEST['d']) {\n\t\t\t$this->log(__METHOD__, $slug);\n\t\t}\n\t\t$this->loadController($slug);\n\t\t$this->bodyClasses[] = is_object($this->controller) ? get_class($this->controller) : '';\n\t\tTaylorProfiler::stop(__METHOD__);\n\t}", "title": "" }, { "docid": "b8c392744b1df1c8c46abef0029cc784", "score": "0.62313515", "text": "public function getController() {}", "title": "" }, { "docid": "e88f1c4982abeadc16518a9506523df4", "score": "0.62152797", "text": "public function loadController() {\n $non_camel_case_name = tableize($this->request->controller).'_controller';\n // Get class name\n $name = classify($non_camel_case_name);\n // Get file name to load it at runtime\n $file = APPLICATION_ROOT.'controllers/'.$non_camel_case_name.'.php';\n // Load controller file\n require($file);\n // Load controller $name\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "5cd05100b345a60dfcbf429aea50a3c8", "score": "0.6206137", "text": "public function createAction()\n {\n $class = $this->getClass();\n $action = new $class;\n\n return $action;\n }", "title": "" }, { "docid": "645c0458cd626c6744636bf2c08ea107", "score": "0.6196702", "text": "public function createController(): void\n {\n $this->checkDsToken();\n\n // Call the worker method\n $results = $this->bulkImportUserData();\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Add users via bulk import\",\n \"Add users via bulk import\",\n \"Results from UserImport:addBulkUserImport method:\",\n json_encode(json_encode($results))\n );\n }\n }", "title": "" }, { "docid": "4aeb0b94f9be731f783ab7bf0b5508c5", "score": "0.61859673", "text": "function createController()\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Create a form group\",\n \"Create a form group\",\n \"Results of FormGroups::createFormGroup\",\n json_encode(json_encode($results))\n );\n }\n\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "08bea968232eea8d3853a40ab4236c6d", "score": "0.6182294", "text": "public function __construct(){\n\n $url = $this->getUrlParams();\n \n // Checking for controller\n if(isset($url[0]) && file_exists(APPROOT . \"/controllers/\" . ucfirst($url[0]) . \".php\")){\n $this->controller = ucfirst($url[0]);\n unset($url[0]);\n }else{\n return handleResponse(404,\"Controller not found. It may occurs if you haven't passed the controller or the controller does not exist.\");\n }\n\n // Requring the controller\n require_once APPROOT . \"/controllers/\" . $this->controller . \".php\";\n // Initializing the controller\n $this->controller = new $this->controller();\n\n // Checking for method\n if(isset($url[1]) && method_exists($this->controller, $url[1])){\n // If method is passed and exists\n $this->method = $url[1];\n unset($url[1]);\n } else if(isset($url[1])){\n // If method is passed but doesn't exist\n return handleResponse(404, \"Method $url[1] does not exist.\");\n }\n\n // Checking for parameters\n $this->parameters = $url ? array_values($url) : [];\n\n // Call the method inside the controller with the array of parameters\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n\n }", "title": "" }, { "docid": "25d306fadf279fa880b398b6ca58c7ad", "score": "0.61748606", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $controller->helloMessage();\n $controller->helloMessageView();\n $controller->hello();\n $controller->helloWithArgument(\"hello\");\n $this->assertInstanceOf(\"\\App\\Controller\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "15785cee110b7a5fa7884ea2196c96d8", "score": "0.6138628", "text": "protected function createController($controller) {\n \n // Make sure controller can be found\n if (false === strpos($controller, '::')) {\n throw new \\InvalidArgumentException(sprintf('Unable to find controller \"%s\".', $controller));\n }\n\n list($class, $method) = explode('::', $controller, 2);\n\n // Make sure the controller exists\n if (!class_exists($class)) {\n throw new \\InvalidArgumentException(sprintf('Class \"%s\" does not exist.', $class));\n }\n \n // Create the callable\n return array(new $class($this->request), $method);\n \n }", "title": "" }, { "docid": "c4fc392f3d931f8fb044e6beda4500da", "score": "0.61253107", "text": "public function createAction()\n {\n $clazz = $this->params['class'];\n \n $loadedClasses = get_declared_classes(); //YuppLoader::getLoadedModelClasses(); // FIXME: Tengo clases cargadas en YuppLoader pero no estan incluidas (debe ser por persistencia del singleton en session)\n if (!in_array($clazz, $loadedClasses))\n YuppLoader::loadModel();\n \n \n $obj = new $clazz (); // Crea instancia para mostrar en la web los valores por defecto para los atributos que los tengan.\n $appName = $this->params['app'];\n \n // Para que cargue la configuracion correcta de la base de datos.\n // Si no trata de ejecutar usando la configuracion de la base por defecto. \n $ctx = YuppContext::getInstance();\n $ctx->setRealApp( $appName );\n \n // View create, que es como edit pero la accion de salvar vuelve aqui.\n\n if (isset($this->params['doit'])) // create\n {\n $obj->setProperties($this->params);\n if (!$obj->save()) // Con validacion de datos!\n {\n // create\n $this->params['object'] = $obj;\n return $this->render(\"create\");\n }\n\n // show\n $this->params['object'] = $obj;\n return $this->render(\"show\");\n }\n\n // create\n $this->params['object'] = $obj;\n return $this->render(\"create\");\n }", "title": "" }, { "docid": "0b34426a487f3d5feb0fe456c48c735b", "score": "0.6088194", "text": "protected function getControllerObject($className)\n {\n if (!class_exists($className)) {\n throw new \\Exception('Controller class \"' . $className . '\" does not exist');\n }\n\n return new $className();\n }", "title": "" }, { "docid": "5289d69f9bdc993d46a5b5a133a834ce", "score": "0.6077799", "text": "public function __construct(){\n \n //Setup sessions\n Session::start();\n \n //Get controller, action & params from user\n $this->splitUrl();\n \n // check for the controller.. Does it exist?\n $controllerFile = './application/controllers/' . (($this->area) ? $this->area . '/' : '') . $this->controller . '.php';\n \n if(file_exists($controllerFile)){\n //if so, load the controller and create a new object\n require($controllerFile);\n $this->controller = new $this->controller();\n \n //Now check for an action\n if(method_exists($this->controller, $this->action)){\n call_user_func_array(array($this->controller, $this->action), $this->params);\n } else {\n //Fallback to the default index action\n //$this->controller->index();\n //die(\"Invalid URL (1)\");\n Redirect::to(404);\n }\n } else {\n //Invalid URL.. Show 404? \n //die(\"Invalid URL (2)\");\n Redirect::to(404);\n }\n \n }", "title": "" }, { "docid": "88e6fe4b47b1961beb9915fcb7442d94", "score": "0.60420215", "text": "private static function _create()\n\t{\n\t\t// Create the controllers\n\t\tforeach (self::$_controllers as $controller => $actions)\n\t\t{\n\t\t\t$fire = new MVC('controller', $controller);\n\t\t\tif (!empty($actions))\n\t\t\t{\n\t\t\t\t// Create the actions\n\t\t\t\tforeach ($actions as $action)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_action($action);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the models\n\t\tforeach (self::$_models as $model => $methods)\n\t\t{\n\t\t\t$fire = new MVC('model', $model);\n\t\t\tif (!empty($methods))\n\t\t\t{\n\t\t\t\tforeach ($methods as $method)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_method($method);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the views\n\t\tforeach (self::$_views as $views_folder => $views)\n\t\t{\n\t\t\t$fire = new MVC('view', $views_folder, $views);\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "0f55d264929f691b94f7038e53696e53", "score": "0.6038518", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $envelope_id = $this->args['envelope_id'];\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = ApplyBrandToEnvelopeService::worker($this->args, $this::DEMO_DOCS_PATH, $this->clientService);\n\n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Brand applying to envelope\",\n \"Brand applying to envelope\",\n \"The brand has been applied to the envelope!<br/> Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } elseif (!$token_ok) {\n $this->clientService->needToReAuth($this->eg);\n } elseif (!$envelope_id) {\n $this->clientService->envelopeNotCreated(\n basename(__FILE__),\n $this->routerService->getTemplate($this->eg),\n $this->routerService->getTitle($this->eg),\n $this->eg,\n ['envelope_ok' => false]\n );\n }\n }", "title": "" }, { "docid": "fbf33bb996d88a43967a0fb2d41b7cbf", "score": "0.60354894", "text": "protected function makeController( $controller )\n\t{\n\t\tController::setRouter( $this->router );\n\n\t\treturn UniversalBuilder::buildClass( $controller );\n\t}", "title": "" }, { "docid": "f56a64bb7cfeb36f9051c562c69f3277", "score": "0.6022596", "text": "protected function callController() {\n\n\t\t\t// Create class name\n\t\t\t$className = self::get(\"applicationNamespace\") . \"\\\\Controllers\\\\\" . $this->_activeRoute->controller;\n\n\t\t\t// Create the controller\n\t\t\t$controllerInstance = new $className($this->_request, $this->_activeRoute, $this->_urlVariables);\n\n\t\t\t// Is it a Controller-derived classed?\n\t\t\tif (!is_subclass_of($controllerInstance, \"ChickenWire\\Core\\Controller\")) {\n\t\t\t\tthrow new \\Exception(get_class($controllerInstance) . \" does not extend ChickenWire\\\\Core\\\\Controller.\", 1);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Call the action!\n\t\t\t$controllerInstance->{$this->_activeRoute->action}();\n\n\n\t\t}", "title": "" }, { "docid": "c6ebab64f6899be399a108fc8801c174", "score": "0.60070246", "text": "private function autoInjectConstructor () {\n\n\t\t$reflectionClass = new \\ReflectionClass($this->controller);\n\t\t$parameters = $reflectionClass->getConstructor()->getParameters();\n\t\t$countParams = $reflectionClass->getConstructor()->getNumberOfParameters();\n\t\t$arguments = $this->getDataArguments('constructor', $parameters, $countParams);\n\n\t\tif ($countParams === 0) {\n\t\t\t$this->controller = new $this->controller;\n\t\t}\n\n\t\tif ($countParams > 0) {\n\t\t\t$class = new \\ReflectionClass($this->controller);\n\t\t\t$this->controller = $class->newInstanceArgs( $arguments);\n\t\t}\n\n\t}", "title": "" }, { "docid": "8feab6599948b1901888f3629d4a6f42", "score": "0.6004968", "text": "public static function getControllerByName($controllerName) {\n $controllerClassName = \"\\\\App\\\\Controller\\\\\" . ucfirst($controllerName);\n $controller = new $controllerClassName();\n\n return $controller;\n }", "title": "" }, { "docid": "dd1435c8a999be3ed924bbd293f22005", "score": "0.5997003", "text": "public function make($class)\n {\n $controller = $this->container->make($class);\n $controller->setServer($this->makeServer());\n $controller->setView($this->makeView());\n $controller->setSession($this->makeSession());\n $controller->setUrlGenerator($this->makeUrlGenerator());\n\n return $controller;\n }", "title": "" }, { "docid": "9da248454fa5d4aad4f1f2b15c7eba54", "score": "0.59942055", "text": "public function controller();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cbfa904174bb5e9d75ffce5eff6daba2", "score": "0.59778535", "text": "public function create()\n {\n //This is where we would work in create function routing, but we are writing that into the index page for this project.\n }", "title": "" }, { "docid": "b526a7fb98b2de5fa773bb17d5327d25", "score": "0.5955094", "text": "private function _controller()\n\t{\n\t\t$class_name = ucfirst($this->_name);\n\t\t$parent_controller = self::parent_controller;\n\t\t$parent_controller_constructor = self::parent_controller_constructor;\n\t\t$application_folder_name = self::application_folder_name;\n\t\t\n$controller = <<<CONTROLLER\n<?php if (!defined('BASEPATH')) exit('No direct script access allowed');\n\nclass {$class_name} extends {$parent_controller}\n{\n\t/**\n\t * The Constructor!\n\t **/\n\tpublic function __construct()\n\t{\n\t\tparent::{$parent_controller_constructor}();\n\t}\nCONTROLLER;\n\n\t\t$controller = $this->_add_actions($controller);\n\n$controller .= <<<CONTROLLER\n\t\n} // End of the {$class_name} controller\n\n/* End of file {$this->_name}.php */\n/* Location ./{$application_folder_name}/controllers/{$this->_name}.php */\nCONTROLLER;\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "b3d0f810431c48da48d574a3342f562d", "score": "0.5951398", "text": "private function run() {\n\n new PublicController();\n }", "title": "" }, { "docid": "b68e4cd0cb46bde7d422a5e20dfe11c2", "score": "0.59435284", "text": "private function createIndexControllerFolderAndFile(): void\n {\n if (!file_exists($this->getModulePath() . '/Controllers')) {\n mkdir($this->getModulePath() . '/Controllers');\n }\n\n if (!file_exists($this->getModulePath() . '/Controllers/IndexController.php')) {\n $moduleController = fopen($this->getModulePath() . '/Controllers/IndexController.php', 'a+');\n $content = require __DIR__ . '/templates/indexController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "b69e39d0dbba22f31778a3f49782d751", "score": "0.5922964", "text": "public function __construct() {\n if (empty($_GET[\"controller\"])) {\n $_GET[\"controller\"] = \"Index\";\n }\n include_once \"controllers/\". $_GET[\"controller\"] .\".php\";\n $obj = new $_GET[\"controller\"];\n return (empty($_GET[\"method\"]) ? $obj : $obj->$_GET[\"method\"]());\n }", "title": "" }, { "docid": "658177547457870d58ca5a9ee57ac470", "score": "0.5914998", "text": "private function defaultController()\n {\n $this->controller = new IndexController();\n $this->controller->loadModel(self::getModel());\n $this->controller->index();\n }", "title": "" }, { "docid": "23266def565b2713d6972c194e7366a6", "score": "0.590619", "text": "public function testMakeControllerCommand()\n {\n $class = 'App\\Http\\Controllers\\TestController';\n $classPath = app_path() . '/Http/Controllers/TestController.php';\n $this->artisan('make:controller', ['name' => 'TestController']);\n\n $this->assertFileExists($classPath);\n require_once $classPath;\n $this->assertInstanceOf('App\\Http\\Controllers\\Controller', new $class());\n }", "title": "" }, { "docid": "357d9524ad24f73d9991299d2869f17f", "score": "0.5899775", "text": "public function __construct() {\n\t\t$this->categoryController = new CategoriaController();\n\t}", "title": "" }, { "docid": "b28dae14eecd6e604ccfe8758d0769b4", "score": "0.58964086", "text": "private function createModuleController(): void\n {\n $fileName = $this->moduleName . 'Module.php';\n\n if (!file_exists($this->getModulePath() . '/' . $fileName)) {\n $moduleController = fopen($this->getModulePath() . '/' . $fileName, 'a+');\n $content = require __DIR__ . '/templates/moduleController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "11fc5e77841e71e79ca850a2cdcc4a08", "score": "0.58807135", "text": "public function __construct() {\n $this->Services = new services\\ServicesController();\n }", "title": "" }, { "docid": "ffd63bfff3466f0a879bebc0914e0bc2", "score": "0.5879503", "text": "public function get_controller();", "title": "" }, { "docid": "a35f36e4e684ae02470abde9bfe293c8", "score": "0.5878065", "text": "public function controller($name)\n {\n $fileName = \"{$name}.php\";\n\n if (isset($this->arguments[2])) {\n $actions = explode(',', $this->arguments[2]);\n\n if (count($actions) == 0) {\n $actions = array('index');\n }\n\n } else {\n $actions = array('index');\n }\n\n $file = $this->appPath . \"/Controllers/\" . $fileName;\n $class = $name;\n $date = date(\"n/j/Y\");\n $contents = array('<?php');\n $contents[] = '/*';\n $contents[] = \" * {$name} controller\";\n $contents[] = ' *';\n $contents[] = ' * @author ';\n $contents[] = ' * @version 1.0';\n $contents[] = \" * @date $date\";\n $contents[] = ' */';\n $contents[] = '';\n $contents[] = 'namespace Controllers;';\n $contents[] = 'use \\Core\\Controller;';\n $contents[] = '';\n $contents[] = 'class ' . $class . ' extends Controller';\n $contents[] = '{';\n\n foreach ($actions as $action) {\n $contents[] = \"\";\n $contents[] = \" public function \" . $action . \"Action()\";\n $contents[] = \" {\";\n $contents[] = \" \";\n $contents[] = \" }\";\n $contents[] = \"\";\n }\n\n $contents[] = '}';\n\n if (file_put_contents($file, implode(\"\\n\", $contents))) {\n echo Utils::colorize('Create ' . $file, 'SUCCESS');\n\n return true;\n } else {\n echo Utils::colorize('Can\\'t create ' . $file, 'FAILURE');\n\n return false;\n }\n }", "title": "" }, { "docid": "f46b4bbf2600a7cefc0e0c3396d8be2d", "score": "0.5875437", "text": "private function choosenController()\n {\n $file = self::controllerFileBuilder();\n $class = self::controllerClassBuilder();\n \n if (file_exists($file)) {\n $this->controller = new $class();\n $this->controller->loadModel(self::getModel());\n $this->callMethod();\n } else {\n $this->raiseError();\n }\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.58657455", "text": "public function create() { }", "title": "" }, { "docid": "52d5b0d26b9c5c6f460a8454d777128b", "score": "0.58651024", "text": "private function initController()\n {\n $container = $this->request->getControllerContainer();\n $container->validate();\n if(!$this->controller)\n $this->controller = $container\n ->getController()\n ->setRequest($this->request)\n ->setResponse($container->getResponse())\n ;\n return $this;\n }", "title": "" }, { "docid": "d77b48f20163df66d3b44768c441b457", "score": "0.5864596", "text": "public function runClient()\n {\n new Controller($this->getResourceContainer());\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "d82231dcca17151b07356febf43aa474", "score": "0.58513033", "text": "private function createModuleController(): void\n {\n $fileName = $this->moduleName . 'Module.php';\n\n if (!file_exists($this->getModulePath() . '/' . $fileName)) {\n $moduleController = fopen($this->getModulePath() . '/' . $fileName, 'a+');\n $content = require __DIR__ . '/templates/moduleController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "ecbb99afcad292f7d778c36fffda6276", "score": "0.5847455", "text": "public function create()\n {\n // NON USED SINCE ITS FOR API\n }", "title": "" }, { "docid": "970d803afad2ceb029f0b4ef18238639", "score": "0.5841589", "text": "private function setControllerClass()\n {\n $name = ucwords(strtolower($this->argument('name')));\n\n $modelClass = $this->parseName($name);\n\n $this->repositoryClass = $modelClass . 'Controller';\n\n return $this;\n }", "title": "" }, { "docid": "8aef7aa4e91feb5999be9085ab0e8f94", "score": "0.58400834", "text": "public function setController(Controller $controller);", "title": "" }, { "docid": "d7e27ec5d03e84ea2631159e66ee4e5b", "score": "0.5837599", "text": "public function getController()\n {\n $dom = new DOMDocument;\n $dom->load(dirname(__FILE__).'/../apps/'.$this->app()->name().'/config/routes.xml');\n\n // Search the routes.xml file to find a route matching with the URL\n foreach ($dom->getElementsByTagName('route') as $route)\n {\n if (preg_match('`^'.$route->getAttribute('url').'$`', $this->app()->httpRequest()->requestURI(), $matches)) \n {\n $module = $route->getAttribute('module');\n $action = $route->getAttribute('action');\n \n $classname = ucfirst($module).'Controller';\n $file = dirname(__FILE__).'/../apps/'.$this->app()->name().'/modules/'.$module.'/'.$classname.'.class.php';\n \n if (!file_exists($file))\n throw new RuntimeException('The module used by the route \"' . $route->getAttribute('url') . '\" does not exist');\n \n require $file;\n\n $controller = new $classname($this->app(), $module, $action);\n\n if ($route->hasAttribute('vars'))\n {\n $vars = explode(',', $route->getAttribute('vars'));\n \n foreach ($matches as $key => $match)\n {\n if ($key !== 0)\n $this->app()->httpRequest()->addGetVar($vars[$key - 1], $match);\n }\n }\n \n break;\n }\n }\n if (!isset($controller))\n $this->app()->httpResponse()->redirect404();\n return $controller;\n }", "title": "" }, { "docid": "6466e04207610ca1765905e139c3682d", "score": "0.5837279", "text": "public function getControllerInstance()\n {\n return new BloggersController($this->entityManager, $this->doctrine);\n }", "title": "" }, { "docid": "316cc69dd98c7efc2537188ddc7730a6", "score": "0.5824567", "text": "public function testMakeController()\n {\n $code = $this->artisan('lpackager:controller', [\n 'class' => 'GoboController',\n 'package' => 'Tobo',\n 'path' => 'Kernel/Tobo',\n 'namespace' => \"Kernel\\Tobo\",\n ]);\n\n $this->assertEquals(0, $code);\n }", "title": "" }, { "docid": "938c043ecf58d3ef78f56c8b729dcb65", "score": "0.58222675", "text": "public function setUp()\n {\n $this->class_object = $this->newController('Website_Controller');\n }", "title": "" }, { "docid": "4be837d7e50c8642a0e2e285d9ea04fe", "score": "0.58186156", "text": "public static function controller($name)\n {\n static::make(\n \"ControllerTemplate\",\n (new Convert($name . \"Controller\"))->toPascal(),\n \"Controllers\",\n [\n \"templateview\" => (new Convert($name))->toKebab(),\n ]\n );\n }", "title": "" }, { "docid": "5f7f79b6433cbf038e2ad7a925580444", "score": "0.5818051", "text": "private function getMockController() {\n \t$controller = $this->generate('Locations');\n \t$controller->constructClasses();\n \t$controller->Components->init($controller);\n \treturn $controller;\n }", "title": "" }, { "docid": "6b88b919f0d1d70ab9e0a1faf806eacc", "score": "0.58156353", "text": "public function getDefaultController()\n\t{\n\t\t$class_name = $this->getDefaultControllerName();\n\t\treturn new $class_name($this->getRequest(), $this->getResponse());\n\t}", "title": "" }, { "docid": "ef09b25682a9f1867aa178915b4fd85f", "score": "0.5811402", "text": "protected function _initController()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$response = $this->getResponse();\n\t\tif(isset($this->modes[$request->getModeName()]) && isset($this->modes[$request->getModeName()]['controller']))\n\t\t{\n\t\t\t$class_name = $this->modes[$request->getModeName()]['controller'];\n\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['path']);\n\n\t\t\tif($class_path)\n\t\t\t{\n\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t}\n\t\t\tif($class_name && class_exists($class_name))//NOTE: autoload in the play\n\t\t\t{\n\t\t\t\t$this->_current_controller = new $class_name($request, $response);\n\t\t\t\t//give access to current request object, user defined init\n\t\t\t\t$this->_current_controller->setRequest($this->getRequest())->init();\n\t\t\t}\n\t\t\t// Known controller (found in e_admin_dispatcher::$modes), class not found exception\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO - admin log\n\t\t\t\t// get default controller\n\t\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t\t// add messages\n\t\t\t\te107::getMessage()->add('Can\\'t find class <strong>&quot;'.($class_name ? $class_name : 'n/a').'&quot;</strong> for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t\t//\n\t\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t\t}\n\n\t\t\tif(vartrue($this->modes[$request->getModeName()]['ui']))\n\t\t\t{\n\t\t\t\t$class_name = $this->modes[$request->getModeName()]['ui'];\n\t\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['uipath']);\n\t\t\t\tif($class_path)\n\t\t\t\t{\n\t\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t\t}\n\t\t\t\tif(class_exists($class_name))//NOTE: autoload in the play\n\t\t\t\t{\n\t\t\t\t\t$this->_current_controller->setParam('ui', new $class_name($this->_current_controller));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_current_controller->setParam('modes', $this->modes);\n\n\t\t}\n\t\t// Not known controller (not found in e_admin_dispatcher::$modes) exception\n\t\telse\n\t\t{\n\t\t\t// TODO - admin log\n\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t// add messages\n\t\t\te107::getMessage()->add('Can\\'t find class for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t// go to not found page\n\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "36f10fe19ad1967c6d91d05e14a3e9ca", "score": "0.580944", "text": "public function __construct() {\n if(!empty(App::post('uid'))) {\n App::setUID(App::post('uid'));\n }\n if(!empty(App::get('lang')) || !empty(App::post('lang'))) {\n Translator::setLanguage(App::get('lang') ?? App::post('lang'));\n }\n if(!empty(App::get('r'))) {\n $url = \"/\".App::get('r');\n } else { // Pretty URL\n $uri = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'].'?','?'));\n $url = str_replace($_SERVER['BASE'], '', $uri);\n }\n // Uppercase char with prefix _\n $url = str_replace(\" \",\"\",ucwords(str_replace(\"_\", \" \", $url)));\n $controllerName = ucfirst(substr($url,1,strpos($url.\"/\",\"/\",1)-1));\n if (!empty($controllerName)) {\n $controllerNameLength = strlen($controllerName)+2;\n $actionName = 'action' . ucfirst(substr($url,$controllerNameLength,strpos($url.\"/\",\"/\",$controllerNameLength)-1));\n $actionName = ($actionName!='action') ? $actionName : 'index';\n } else {\n $controllerName=ucfirst(App::params('defaultController'));\n $actionName='index';\n }\n $controllerName = 'app\\\\controllers\\\\' . $controllerName . 'Controller';\n \n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n if (@method_exists($controller,$actionName)) {\n $controller->$actionName();\n } elseif (@method_exists($controller,'index')) {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no action $actionName\");\n $controller->index();\n } else {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no Index action\");\n }\n } else {\n http_response_code(404);\n if (file_exists(self::$error404Page)) {\n include self::$error404Page;\n }\n die();\n }\n }", "title": "" }, { "docid": "bcaa36de43243b111f5dfd296978cbdf", "score": "0.5808198", "text": "public function __construct()\n {\n $this->model = str_replace('Controller', '', (new ReflectionClass(get_class($this)))->getShortName());\n }", "title": "" }, { "docid": "fac09fb32057998ecc654638754ed950", "score": "0.5807649", "text": "private function _testCreateController( IController $controller, $action = 'indexAction' )\n {\n $this->assertNotNull( $controller );\n $this->assertInstanceOf( 'RawPHP\\RawRouter\\Support\\Controller\\HomeController', $controller );\n $this->assertNotNull( $controller->getAction() );\n $this->assertEquals( $action, $controller->getAction()->getName() );\n }", "title": "" }, { "docid": "2f45aa4b0488f5dc936f0a345b22e012", "score": "0.5802636", "text": "function factory($type, $router = null) {\n\t\t$factory = ControllerFactory::get_instance();\n\n\t\treturn $factory->factory($type, $router);\n\t}", "title": "" }, { "docid": "6cd876307619929a796e0ed5d9b4eca1", "score": "0.58016664", "text": "protected function createErrorController() {\n\t\trequire_once PATH_CONTROLLERS_DIR.'error.php';\n\t\treturn new Error();\n\t}", "title": "" }, { "docid": "227edb277af507ecd7ea2f5c409aa056", "score": "0.57898784", "text": "private function controllerClassBuilder()\n {\n $namespace = 'Smart\\\\Router\\\\';\n $class = ucfirst($this->url[0]);\n \n return sprintf('%s%sController', $namespace, $class);\n }", "title": "" }, { "docid": "e8458bc5d4cd3ab1c9dbdcd9b322f4ce", "score": "0.5789091", "text": "public function testInstantiation()\n {\n $controller = new BackendController();\n\n $this->assertInstanceOf('Contao\\\\CoreBundle\\\\Controller\\\\BackendController', $controller);\n }", "title": "" }, { "docid": "930be58cde198b15fd1f9a45b4192794", "score": "0.5788672", "text": "protected function _loadController() {\n\t\t\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__d('cake_console', 'Controller not found'));\n\t\t}\n\n\t\t$plugin = null;\n\t\tif ($this->plugin) {\n\t\t\t$plugin = $this->plugin . '.';\n\t\t}\n\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\tApp::uses($controllerClassName, $plugin . 'Controller');\n\t\tif (!class_exists($controllerClassName)) {\n\t\t\t$file = $controllerClassName . '.php';\n\t\t\t$this->err(__d('cake_console', \"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", $file));\n\t\t\treturn $this->_stop();\n\t\t}\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->plugin = $this->plugin;\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj = $controllerObj->{$controllerObj->modelClass};\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$schema = $modelObj->schema(true);\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->_associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = $displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$fields = $schema = $associations = array();\n\t\t}\n\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t$pluralHumanName = $this->_pluralHumanName($this->controllerName);\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields', 'associations', 'modelObj');\n\t}", "title": "" }, { "docid": "be57f9705674561960c76d5878c06633", "score": "0.57749593", "text": "public function getController($name)\n\t{\n\t\t$loader = new Loader();\n\t\t$loader->registerClasses(\n\t\t\t[\n\t\t\t\t'\\<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\API\\\\' . ucfirst($name) . 'Controller' => ROOT_PATH . 'modules/<%= module.slug %>/controller/api/'\n\t\t\t]\n\t\t)->register();\n\n\t\t$indexCntrl = new \\<%= project.namespace %>\\<%= module.namespace %>\\Controllers\\API\\IndexController();\n\t\t$this->assertNotNull($indexCntrl, 'Make sure the index controller could be loaded');\n\n\t\treturn $indexCntrl;\n\t}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "65595bd73ea46f8f286cb4b0705c796c", "score": "0.57685554", "text": "public function getController() {\n $uri = explode('/', $this->__request);\n\t\t\t$class = isset($uri[0]) && ($uri[0] != \"\") ? strtolower($uri[0]) : DEFAULT_CONTROLLER; // class\n\t\t\t$method = isset($uri[1]) ? strtolower($uri[1]) : 'index';\t// method\n\t\t\t$param = isset($uri[2]) ? $uri[2] : false;\t// param\n\n\t\t\t// explode request untuk url cantik\n\t\t\t$class = str_replace('_', ' ', $class);\n\t\t\t$method = str_replace('_', ' ', $method);\n\n\t\t\t$tempClass = explode('-', $class);\n\t\t\t$tempMethod = explode('-', $method);\n\n\t\t\t$newClass = ucfirst(implode('_', $tempClass));\n\t\t\t$newMethod = implode('_', $tempMethod);\n\n\t\t\t// set request controller - class\n\t\t\t$this->__controller = ROOT.DS.'app'.DS.'controllers'.DS.$newClass.\"Controller.php\";\n\n\t\t\t// cek file controller\n\t\t\tif(file_exists($this->__controller)){\n\t\t\t\t// load controller dan class\n\t\t\t\trequire_once $this->__controller;\n\t\t\t\t$obj = new $newClass();\n\n\t\t\t\tif(method_exists($obj, $newMethod)){\n // check method public atau tidak\n $reflection = new ReflectionMethod($obj, $newMethod);\n if (!$reflection->isPublic()) {\n die($this->error('403')); // method dilarang diakses\n }\n else { $obj->$newMethod($param); }\n\t\t\t\t}\n\t\t\t\telse die($this->error('404')); // method tidak tersedia\t\n\t\t\t}\n\t\t\telse die($this->error('404')); // class tidak tersedia\n }", "title": "" }, { "docid": "85415a4a2addb4c6b151f5d52e89f85f", "score": "0.5757725", "text": "public function testCreateDefaultControllerAndAction()\n {\n $route = '';\n $params = [ ];\n\n /** @var IController $controller */\n $controller = $this->router->createController( $route, $params );\n $this->_testCreateController( $controller );\n }", "title": "" } ]
2e71691ba73c90f1eb5360e691d311d6
Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
[ { "docid": "6a532d09fffbdc2095186ca79adc41b3", "score": "0.43852323", "text": "public function UpdateInstance(\\Google\\Cloud\\Redis\\V1beta1\\UpdateInstanceRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.redis.v1beta1.CloudRedis/UpdateInstance',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "title": "" } ]
[ { "docid": "1d16acda97de3eafae2daa05743e212a", "score": "0.5357568", "text": "function update( $new_instance ) {\n return $new_instance;\n }", "title": "" }, { "docid": "623d3f1ed40bcc8f78306d21f189722d", "score": "0.5343804", "text": "protected function put ()\n {\n try {\n\n $this->responseBody = $this->rest->put(\n $this->url,\n $this->data,\n $this->headers\n );\n\n $this->ok = true;\n\n } catch (Exception $e) {\n\n $this->ok = false;\n $this->exception = $e;\n\n } finally {\n\n return $this;\n }\n }", "title": "" }, { "docid": "25c9dce5c74aa90f836e52aad99739a2", "score": "0.50892586", "text": "public function update(): Result\n {\n return self::getConnection()->update($this);\n }", "title": "" }, { "docid": "7599de510dc2ba798b80f507becfdba6", "score": "0.48621303", "text": "public function viaPut ()\n {\n $this->executor = [$this, 'put'];\n return $this;\n }", "title": "" }, { "docid": "40212aebe7d6190de736fdf5569056ff", "score": "0.47613105", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t$instance['display_results'] = $new_instance['display_results'];\n\t\t\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "b6511677890502ef2dda50517221e1c2", "score": "0.46866655", "text": "private function update()\n {\n $this->ID = wp_update_post($this->get());\n $this->save_meta();\n return $this;\n }", "title": "" }, { "docid": "f94c5f2b658b5c514621fde648118267", "score": "0.46689352", "text": "function update ($new_instance, $old_instance) {\n return $new_instance;\n }", "title": "" }, { "docid": "6d533a1bce9c0bd0d80fced4d69e9ead", "score": "0.4590939", "text": "function update($new_instance, $old_instance) {}", "title": "" }, { "docid": "d23e431149225ee4ab23e772cca3db4a", "score": "0.45774108", "text": "function update( $new_instance, $old_instance ) {\n return $new_instance;\n }", "title": "" }, { "docid": "dbe7325cd1c77238788749ab0a0da947", "score": "0.456516", "text": "function update($new_instance, $old_instance) {\n\t\treturn $new_instance;\n\t}", "title": "" }, { "docid": "aa49be93601a4d390523a04eed928d95", "score": "0.4544952", "text": "public function update()\n {\n $this->setMethod(\\Dsync\\Dsync\\Model\\Api\\Request\\Method::UPDATE);\n $this\n ->getRegistry()\n ->set(\n $this->getEntityType(),\n $this->getMethod()\n );\n $this->validate($this->getMethod());\n return $this->processUpdate();\n }", "title": "" }, { "docid": "c2df639c57e3fea7b6d15adb52e740ed", "score": "0.4536566", "text": "function update($new_instance, $old_instance) {\n\n\t\treturn $new_instance;\n\t}", "title": "" }, { "docid": "3c14ff2504402586d0b20ab61f8b0124", "score": "0.4532176", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t$instance['title'] = wp_kses_post( $new_instance['title'] );\n\t\t$instance['count'] = (int) esc_attr( $new_instance['count'] );\n\t\t$instance['more_text'] = esc_attr( $new_instance['more_text'] );\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "c44dea8ae8424d218c8a4ba6cfded398", "score": "0.45254838", "text": "public function UpgradeInstance(\\Google\\Cloud\\Redis\\V1beta1\\UpgradeInstanceRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.redis.v1beta1.CloudRedis/UpgradeInstance',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "title": "" }, { "docid": "7f8c268a1f5f9a4e53fbe4704812c732", "score": "0.45140228", "text": "public function update( $new_instance, $old_instance );", "title": "" }, { "docid": "dbda80cb84ec5ad9f346a6ecd0a4c621", "score": "0.44921738", "text": "protected function patch ()\n {\n try {\n\n $this->responseBody = $this->rest->patch(\n $this->url,\n $this->data,\n $this->headers\n );\n\n $this->ok = true;\n\n } catch (Exception $e) {\n\n $this->ok = false;\n $this->exception = $e;\n\n } finally {\n\n return $this;\n }\n }", "title": "" }, { "docid": "c56a7fa7b9f116bb9a300db5dcc198f4", "score": "0.44504446", "text": "public function createOrUpdateAsync() {\n\t\tif (strlen ( $this->requestId ) > 0) {\n\t\t\t/* @var $request Dhl_MeinPaketCommon_Model_Async */\n\t\t\t$request = Mage::getModel ( 'meinpaketcommon/async' )->load ( $this->requestId, 'request_id' );\n\t\t\t$request->setCreatedAt ( Varien_Date::now () );\n\t\t\t$request->setUpdatedAt ( Varien_Date::now () );\n\t\t\t$request->setRequestId ( $this->requestId );\n\t\t\t$request->setStatus ( $this->status );\n\t\t\t$request->save ();\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ecc16b8c132e07750d41858b865c5775", "score": "0.44228113", "text": "function update($new_instance, $old_instance){\r\n\t\t$instance = $old_instance;\r\n\t\t$instance['title'] = $new_instance['title'];\r\n\t\t$instance['url'] = $new_instance['url'];\r\n\t\t$instance['header'] = $new_instance['header'];\r\n\t\t$instance['stream'] = $new_instance['stream'];\r\n\t\t$instance['colorscheme'] = $new_instance['colorscheme'];\r\n\t\t$instance['border'] = $new_instance['border'];\r\n\t\t$instance['showfaces'] = $new_instance['showfaces'];\t\r\n\t\t\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "a894d5cc32ff59f0b138f747429ec8df", "score": "0.43885", "text": "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\t\r\n\t\t/* No need to strip tags */\r\n\t\t$instance['subtitle'] = strip_tags($new_instance['subtitle']);\r\n\t\t$instance['content'] = wp_kses_post($new_instance['content']);\r\n\t\t$instance['divider'] = strip_tags($new_instance['divider']);\r\n\t\t$instance['aboutwidth'] = strip_tags($new_instance['aboutwidth']);\r\n\t\t$instance['title_color'] = optimizer_sanitize_hex($new_instance['title_color']);\r\n\t\t$instance['content_color'] = optimizer_sanitize_hex($new_instance['content_color']);\r\n\t\t$instance['content_bg'] = optimizer_sanitize_hex($new_instance['content_bg']);\r\n\t\t$instance['content_bgimg'] = esc_url_raw($new_instance['content_bgimg']);\r\n\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "443428c6ffc6dce36ca0a6bc1efa3baf", "score": "0.43841752", "text": "public function update( $new_instance, $old_instance ) {\n\n}", "title": "" }, { "docid": "1d675d39685798942368f5bb9b0b8a1d", "score": "0.43838814", "text": "function update($new_instance, $old_instance) \n\t{\n\t\t$instance = $old_instance;\n\n\t\t$instance['title'] = strip_tags(stripslashes($new_instance['title']));\n\n\t\t$show = absint($new_instance['show']);\n\n\t\t//! Don't do anything crazy\n\t\tif($show > 10) $show = absint($this->defaults['show']);\n\n\t\t$instance['show'] =\t$show;\n\t\t$instance['author'] = strip_tags(stripslashes($new_instance['author']));\n \t\t$instance['date'] = strip_tags(stripslashes($new_instance['date']));\n\t\t$instance['contribute'] = strip_tags(stripslashes($new_instance['contribute']));\n\t\t$instance['contribute_text'] = strip_tags(stripslashes($new_instance['contribute_text']));\n\n\t\t//! Update Cached Data\n\t\tif($show) $this->flush();\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "4b24a8be34302bad6000ddf705f11a98", "score": "0.43838722", "text": "public function getUpdate(): ResponseObject\n {\n if (! $this->hasUpdate()) {\n throw TelegramSDKException::updateObjectNotFound();\n }\n\n return $this->update;\n }", "title": "" }, { "docid": "600863260fbfcb324938cb6d89e4d4c9", "score": "0.43813428", "text": "function update( $new, $instance ) {\n\t\t$instance['title'] = mc_kses_post( $new['title'] );\n\t\t$instance['url'] = esc_url_raw( $new['url'] );\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "e6446ace3911ebe3a4e73ff499ff4ffd", "score": "0.43762255", "text": "function update( $new_instance, $old_instance ) {\n $instance = $old_instance;\n \n //Strip tags from title and name to remove HTML\n $instance['title'] = strip_tags( $new_instance['title'] ); \n $instance['tax_name'] = strip_tags( $new_instance['tax_name'] );\n $instance['show_post_count'] = (int) $new_instance['show_post_count'];\n $instance['is_icon'] = (int) $new_instance['is_icon'];\n $instance['hide_empty'] = (int) $new_instance['hide_empty'];\n\n return $instance;\n }", "title": "" }, { "docid": "77c9dbfe8ad361b7a1d9bed1ae5db972", "score": "0.43577605", "text": "function update($new_instance, $old_instance) {\n\t\treturn $old_instance;\n\t}", "title": "" }, { "docid": "77c9dbfe8ad361b7a1d9bed1ae5db972", "score": "0.43577605", "text": "function update($new_instance, $old_instance) {\n\t\treturn $old_instance;\n\t}", "title": "" }, { "docid": "8bdf62420d5ba0937b55cf1b2bf8b345", "score": "0.43567902", "text": "public function refresh()\n {\n $instance = clone $this;\n $instance->initialize(true);\n\n return $instance;\n }", "title": "" }, { "docid": "dc363f744f66a0b22b3f9688bd335a17", "score": "0.43483818", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['api_key'] = trim( $new_instance['api_key'] );\n\t\t$instance['style'] = trim( $new_instance['style'] );\n\t\t$instance['site'] = trim( $new_instance['site'] );\n\t\t$instance['max_items'] = intval( $new_instance['max_items'] );\n\t\t$instance['single_post_only'] = isset( $new_instance['single_post_only'] ) ? 1 : 0;\n\t\t$instance['show_powered_by'] = isset( $new_instance['show_powered_by'] ) ? 1 : 0;\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "b977bc661b09b716c945e46739821edd", "score": "0.43424568", "text": "function execute()\n {\n $entity = &$this->e;\n $entityClass = get_class($entity);\n if ( empty($entity->fields->id) ){\n if ( !$id = $entity->getMeta()->getId()) throw new EntityHasNoIdException($entity);\n } else {\n $id = $entity->id;\n }\n $res = $entity->getSkladInstance()->getClient()->put(\n ApiUrlRepository::instance()->getUpdateUrl($entityClass::$entityName, $id),\n $entity->mergeFieldsWithLinks()\n );\n return new $entityClass($entity->getSkladInstance(), $res);\n\n }", "title": "" }, { "docid": "c94e060c4d1004d9b043bb739a518abf", "score": "0.4339454", "text": "public function update( $new_instance, $old_instance ) {\n $instance = $old_instance;\n $instance['title'] strip_tags('Title');\n $instance['nTweets'] strip_tags('Number of Tweets');\n $instance['twitterUser'] strip_tags('Twitter User');\n $instance['consumerKey'] strip_tags('Consumer Key');\n $instance['consumerSecret'] strip_tags('Consumer Secrect');\n $instance['accessTokenSecret'] strip_tags('Access Token Secrect');\n return $instance;\n }", "title": "" }, { "docid": "9ce43c232b1d9aa30f2fcf63bd472524", "score": "0.4336749", "text": "public function updateFromResponse($response) {\n if (is_object($response) && isset($response->data)) {\n $article = $response->data;\n $this->createdAt = $article->createdAt;\n $this->modifiedAt = $article->modifiedAt;\n $this->id = $article->id;\n $this->type = $article->type;\n $this->shareUrl = $article->shareUrl;\n $this->links = serialize([\n 'channel' => $article->links->channel,\n 'sections' => $article->links->sections,\n 'self' => $article->links->self,\n ]);\n $this->revision = $article->revision;\n }\n return $this;\n }", "title": "" }, { "docid": "c9f784b347d748ab9058416588e4f92c", "score": "0.43157214", "text": "private function _update(): Worker {\n if ($this->_status === self::STATUS_READY && $this->_callBuffer) {\n $this->_status = self::STATUS_RUNNING;\n $this->_send($this->_callBuffer);\n }\n\n if ($this->_status === self::STATUS_RUNNING && ($this->_output = $this->_read())) {\n $this->_status = self::STATUS_DONE;\n $this->_callBuffer = null;\n }\n\n if ($this->_client->getState() === Client::STATE_ERROR || $this->_process->isTerminated()) {\n $this->_status = self::STATUS_ERROR;\n $this->reset();\n }\n\n return $this;\n }", "title": "" }, { "docid": "f29452df6e250de59ea209714445b257", "score": "0.42936698", "text": "public function update(array $attributes = [], array $options = []): self\n {\n $this->fill($attributes);\n\n $client = new ApiClient($options['api_key'] ?? $this->_apiKey, $options ?? []);\n $response = $client->put($this->instanceUrl(), $this->toRequestArray(), $options['headers'] ?? []);\n $this->forceFill($response['data']);\n\n return $this;\n }", "title": "" }, { "docid": "b45bb43ef7653fbed0189633cde5f3ab", "score": "0.42879507", "text": "function update( $new_instance, $old_instance ) {\r\n\t\t/**\r\n\t\t * Save the thumbnail dimensions outside so we can\r\n\t\t * register the sizes easily. We have to do this\r\n\t\t * because the sizes must registered beforehand\r\n\t\t * in order for WP to hard crop images (this in\r\n\t\t * turn is because WP only hard crops on upload).\r\n\t\t * The code inside the widget is executed only when\r\n\t\t * the widget is shown so we register the sizes\r\n\t\t * outside of the widget class.\r\n\t\t */\r\n\r\n\t\tif ( function_exists( 'the_post_thumbnail' ) ) {\r\n\t\t\t$sizes = get_option('jlao_cat_post_thumb_sizes');\r\n\t\t\tif ( !$sizes ) {\r\n\t\t\t\t$sizes = array();\r\n\t\t\t}\r\n\t\t\t$thumb_w = isset( $new_instance[ 'thumb_w' ] ) ? $new_instance[ 'thumb_w' ] : null;\r\n\t\t\t$thumb_h = isset( $new_instance[ 'thumb_h' ] ) ? $new_instance[ 'thumb_h' ] : null;\r\n\t\t\t$sizes[$this->id] = array( $thumb_w, $thumb_h );\r\n\t\t\tupdate_option( 'jlao_cat_post_thumb_sizes', $sizes );\r\n\t\t}\r\n\r\n\t\treturn $new_instance;\r\n\t}", "title": "" }, { "docid": "430d148a2d8870391a348540972f15e0", "score": "0.42865732", "text": "public function execute_put(){\n $action = 'action' . $this->uri->segment($this->uri->total_segments());\n // var_dump($this->put()); die;\n $response = $this->amClient->$action($this->put()); //Each command need to implement parameters reader\n if($response['error'] === REST_Controller::HTTP_FORBIDDEN){\n $this->response(null, REST_Controller::HTTP_FORBIDDEN);\n }else{\n $this->response($response, REST_Controller::HTTP_OK); \n }\n }", "title": "" }, { "docid": "896aeb30aee404e8c59795876c3609ba", "score": "0.4285759", "text": "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n $instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\t$instance['video_uri'] = esc_url_raw( $new_instance['video_uri']);\r\n\t\t$instance['customvdo'] = esc_url_raw( $new_instance['customvdo']);\r\n\t\t$instance['vdothumb'] = esc_url_raw( $new_instance['vdothumb']);\r\n\t\t$instance['autoplay'] = absint( $new_instance['autoplay']);\t\r\n\t\t$instance['border'] = absint( $new_instance['border']);\t\r\n\t\t$instance['content'] = wp_kses_post($new_instance['content']);\r\n\t\t$instance['contentposition'] = strip_tags( $new_instance['contentposition']);\t\r\n\t\t$instance['content_color'] = optimizer_sanitize_hex($new_instance['content_color']);\r\n\t\t$instance['content_bg'] = optimizer_sanitize_hex($new_instance['content_bg']);\r\n\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "7e6966dcf6f9db85ea1fdab09dd32bba", "score": "0.42826423", "text": "function update( $new_instance, $instance, $fields = Array() ) {\n $instance = parent::update( $new_instance, $instance, array() );\n\n $instance['content_type'] = 'recommendation';\n if ( in_array( $new_instance['content_type'], array( 'recommendation', 'question', 'post' ) ) ) {\n $instance['content_type'] = $new_instance['content_type'];\n }\n\n $instance['hide_vocabs'] = empty( $new_instance['hide_vocabs'] ) ? array() : $new_instance['hide_vocabs'];\n\n return $instance;\n }", "title": "" }, { "docid": "1e151af51129b9e72670acbc2cc9c950", "score": "0.42605802", "text": "function update($new_instance, $old_instance) {\n\t\t$instance = $old_instance;\n $instance['title'] = $new_instance['title'];\n $instance['nposts'] = $new_instance['nposts'];\n $instance['orderby'] = $new_instance['orderby'];\n $instance['order'] = $new_instance['order'];\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "902b6c6f5eed07e42a4dbd6eb2e727d6", "score": "0.42509618", "text": "public function updateModuleSettings()\n {\n try {\n $inputJSON = self::constructJSONForModuleUpdate($this->module);\n $this->urlPath = \"settings/modules/\" . $this->module->getAPIName();\n $this->requestMethod = APIConstants::REQUEST_METHOD_PUT;\n $this->addHeader(\"Content-Type\", \"application/json\");\n $this->requestBody = $inputJSON;\n $this->apiKey = 'modules';\n $responseInstance = APIRequest::getInstance($this)->getAPIResponse();\n \n return $responseInstance;\n } catch (ZCRMException $exception) {\n APIExceptionHandler::logException($exception);\n throw $exception;\n }\n }", "title": "" }, { "docid": "bd8eddb6c981aad35800d3b77da6b168", "score": "0.42508054", "text": "public function recreate()\n {\n $status = new Status($this->payload['id']);\n $monitor = FALSE;\n if ($status->isTracking()) {\n $monitor = TRUE;\n }\n\n return self::create($this->queue, $this->payload['class'], $this->payload['args'], $monitor);\n }", "title": "" }, { "docid": "a9dcdf1c07c969a6ad6692f9abe76a6c", "score": "0.424501", "text": "function update ( $new_instance, $old_instance ) {\r\n\t\t\r\n\t\t$instance = $old_instance;\r\n\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\t\r\n\t\t$instance['limit'] = esc_attr( $new_instance['limit'] );\r\n\t\t\r\n\t\t/* The select box is returning a text value, so we escape it. */\r\n\t\t$instance['effect'] = esc_attr( $new_instance['effect'] );\r\n\t\t\r\n\t\t/* The checkbox is returning a Boolean (true/false), so we check for that. */\r\n\t\t$instance['pagination'] = (bool) esc_attr( $new_instance['pagination'] );\r\n\t\t$instance['display_author'] = (bool) esc_attr( $new_instance['display_author'] );\r\n\t\t$instance['display_url'] = (bool) esc_attr( $new_instance['display_url'] );\r\n\t\t\r\n\t\treturn $instance;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "28caf47516c274dc85092e9db9fadd59", "score": "0.42223978", "text": "public function updateCustomView($customViewInstance)\n {\n try {\n $inputJSON = self::constructJSONForCustomView($customViewInstance);\n $this->urlPath = \"settings/custom_views/\" . $customViewInstance->getId();\n $this->requestMethod = APIConstants::REQUEST_METHOD_PUT;\n $this->addHeader(\"Content-Type\", \"application/json\");\n $this->addParam(\"module\", $this->module->getAPIName());\n $this->requestBody = $inputJSON;\n // $this->apiKey='custom_views';\n $responseInstance = APIRequest::getInstance($this)->getAPIResponse();\n \n return $responseInstance;\n } catch (ZCRMException $exception) {\n APIExceptionHandler::logException($exception);\n throw $exception;\n }\n }", "title": "" }, { "docid": "29b2818b5eeb7e6be0675b88128058fc", "score": "0.4221626", "text": "public static function init(): self\n {\n return new self(new UpdateOrderResponse());\n }", "title": "" }, { "docid": "05b4906a6bdb10c4a30212032317c411", "score": "0.4218879", "text": "function update($new_instance, $old_instance)\n {\n $instance = $old_instance;\n $instance['title'] = $new_instance['title'];\n $instance['ignore'] = $new_instance['ignore'];\n return $instance;\n }", "title": "" }, { "docid": "b1e57ef721e6062d5ea0a549cc19bb91", "score": "0.4215248", "text": "function update($new_instance, $old_instance) {\n\t\t\t$instance = $old_instance;\n\n\t\t\t/* Strip tags (if needed) and update the widget settings. */\n\t\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t\t$instance['openmenu_id'] = $new_instance['openmenu_id'];\n\t\t\t$instance['qr_size'] = $new_instance['qr_size'];\n\t\t\t$instance['include_link'] = isset($new_instance['include_link']) ? 1 : 0 ;\n\t\t\t\n\t\t\treturn $instance;\n\t\t}", "title": "" }, { "docid": "f591dab2f5881e225cb1622231e1b43a", "score": "0.4212887", "text": "public function update()\n {\n \n if (!empty($this->_session)) {\n $bearer_token = $this->_session->getBearerToken();\n } else {\n $bearer_token = Session::$bearerToken;\n }\n \n $type = preg_replace(\"/\\/rest\\//\",\"\",static::$_endpoint);\n \n if (is_array($this->_changedProperties) and count($this->_changedProperties) == 1 and in_array(\"relationships\",$this->_changedProperties))\n {\n \n /**\n * Aggiorno solo le relationships dell'entità:\n *\n * - Setto POST FIELDS\n * - Setto endpoint specifico\n *\n **/\n $finalEndpoint = \\MomaSDK\\MomaPIX::$apiURL.static::$_endpoint.\"/\".$this->_data['attributes']['id'].\"/relationships/items\";\n \n $postFields = $this->_data['relationships']['items'];\n \n \n }\n else if (is_array($this->_changedProperties) and count($this->_changedProperties) > 0)\n {\n \n /**\n * Rimpiazzo l'intera entità:\n *\n * - Setto POST FIELDS\n * - Setto endpoint generico\n *\n **/\n $finalEndpoint = \\MomaSDK\\MomaPIX::$apiURL.static::$_endpoint.\"/\".$this->_data['attributes']['id'];\n \n switch ( static::$_endpoint ) {\n \n case '/rest/lightbox':\n \n $postFields = array (\n \n \"data\" => array (\n \n \"type\" => $type,\n \"id\" => $this->_data['attributes']['id'],\n \"attributes\" => array(\"description\" => $this->_data['attributes']['description']),\n \"relationships\" => $this->_data['relationships']\n \n )\n \n );\n \n break;\n \n default:\n \n $postFields = array (\n \n \"data\" => array (\n \n \"type\" => $type,\n \"id\" => $this->_data['attributes']['id'],\n \"attributes\" => $this->_data['attributes'],\n \"relationships\" => $this->_data['relationships']\n \n )\n );\n \n }\n \n \n }\n \n $request = new Request($finalEndpoint);\n \n $request -> setRequestHeader(\n array (\n \"Apikey: \". \\MomaSDK\\MomaPIX::$apiKey,\n \"Accept: \". \\MomaSDK\\MomaPIX::$acceptType,\n \"Content-Type: \". \\MomaSDK\\MomaPIX::$contentType,\n \"Authorization: Bearer \". $bearer_token\n )\n );\n \n $request -> setRequestType(\"PATCH\");\n $request -> setPostFields(json_encode($postFields));\n \n $request -> execute();\n \n $response = $request->getResponse();\n \n return $response;\n \n }", "title": "" }, { "docid": "f0d0703176490c191c6a487940887410", "score": "0.42089427", "text": "function update($new_instance, $old_instance) {\n\t$instance = $old_instance;\n $instance['title'] = $new_instance['title'];\n $instance['ntweets'] = $new_instance['ntweets'];\n\treturn $instance;\n}", "title": "" }, { "docid": "1736a0a8a4e3c28983eb99ea589d9571", "score": "0.4208809", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t\n\t\t$instance['title'] \t\t= strip_tags( $new_instance['title'] );\n\t\t$instance['count'] \t\t= (int) $new_instance['count'];\n\t\t$instance['category'] \t= strip_tags( $new_instance['category'] );\n\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "b6229e84e1523e75b54dc07cf67e1901", "score": "0.42068133", "text": "function update($new_instance, $old_instance) {\n\t\t\t$instance = $old_instance;\n\n\t\t\t/* Strip tags (if needed) and update the widget settings. */\n\t\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t\t$instance['omf_url'] = $new_instance['omf_url'];\n\t\t\t$instance['include_hours'] = isset($new_instance['include_hours']) ? 1 : 0 ;\n\t\t\t\n\t\t\treturn $instance;\n\t\t}", "title": "" }, { "docid": "5d56b7b862a25b6a4c06a7e328e5c182", "score": "0.41925475", "text": "protected function doSave()\n {\n // if we got no instance just go straight for the creation info\n if (empty($this->instanceId)) {\n $instance = new CloudInstance($this->createInfo['instance']);\n\n // lets see if we also creating a db and user\n $databases = (!isset($this->databaseName)) ? array(new CloudDatabase($this->createInfo['database'])) : $databases = array();\n $users = (empty($this->userName)) ? array(new CloudUser($this->createInfo['user'])) : $users = array();\n\n $this->savedInstance = $this->rackspacer->addInstance($instance, $databases, $users);\n\n if (empty($this->savedInstance->status)) {\n $this->logBlock('Could not retrieve status of created instance', 'ERROR');\n $this->end();\n } elseif ($this->savedInstance->status != 'BUILD') {\n $this->logBlock('New instance returned a weird status: ' . $this->savedInstance->status, 'ERROR');\n $this->end();\n } else {\n $this->logBlock('New instance created with status: ' . $this->savedInstance->status, 'INFO');\n }\n } else {\n // make sure we got a full instance going on\n if (empty($this->savedInstance)) {\n $this->savedInstance = $this->rackspacer->getInstance($this->instanceId);\n }\n\n // otherwise check if we creating a db and do it\n if (!isset($this->databaseName)) {\n $database = new CloudDatabase($this->createInfo['database']);\n $this->savedDatabase = $this->rackspacer->addDatabase($this->instanceId, $database);\n $this->logBlock('New database created', 'INFO');\n } elseif (empty($this->savedDatabase)) {\n $this->savedDatabase = new CloudDatabase();\n }\n\n // and then add/update user if requested\n if (!isset($this->userName)) {\n $user = new CloudUser($this->createInfo['user']);\n $this->savedUser = $this->rackspacer->addUser($this->instanceId, $user);\n $this->logBlock('User created/updated', 'INFO');\n } elseif (empty($this->savedUser)) {\n $this->savedUser = new CloudUser(array('name' => $this->userName));\n }\n }\n }", "title": "" }, { "docid": "60565449b50b5c166ebb4408b8c34399", "score": "0.41904545", "text": "public function update() {\n $aCallOpts = array(\n 'url' => '/payment/' . $this->payment . '/credit/' . $this->hash\n , 'postData' => get_object_vars($this)\n );\n $aResult = Payname::put($aCallOpts);\n $this->_load($aResult['data']);\n return $this;\n }", "title": "" }, { "docid": "8ac3ae1b73dc489822f7ce512bfb7539", "score": "0.41861418", "text": "public function update()\n {\n $this->crud->setRequest($this->crud->validateRequest());\n $this->crud->setRequest($this->handlePasswordInput($this->crud->getRequest()));\n $this->crud->unsetValidation(); // validation has already been run\n\n return $this->traitUpdate();\n }", "title": "" }, { "docid": "5f7e5e9a29232446570dc87554e663d4", "score": "0.4185811", "text": "public function update()\n {\n $authorization = new Authorization(Auth::refresh());\n return $this->response->item($authorization, new AuthorizationTransformer())->setStatusCode(201);\n }", "title": "" }, { "docid": "87d2a4137c4f16cfec287f7f45915c62", "score": "0.4178576", "text": "public function update( $new_instance, $old_instance ) {\n return $new_instance;\n }", "title": "" }, { "docid": "393d2f32dd5e7a4c2895f1ebe1d83602", "score": "0.41779324", "text": "public function record()\n {\n Redis::incr($this->cacheKey());\n\n return $this;\n }", "title": "" }, { "docid": "c902d2b74b05fd88fb0b139a74514dfa", "score": "0.4176853", "text": "function update($new_instance, $old_instance) {\n $instance = $old_instance;\n $instance['title'] = $new_instance['title'];\n $instance['pageurl'] = $new_instance['pageurl'];\n $instance['showfaces'] = $new_instance['showfaces'];\n $instance['showstream'] = $new_instance['showstream'];\n $instance['showheader'] = $new_instance['showheader'];\n $instance['likebox_height'] = $new_instance['likebox_height'];\n $instance['likebox_width'] = $new_instance['likebox_width'];\n return $instance;\n }", "title": "" }, { "docid": "428a83e6f150c331f3a3cdfc3dbcd736", "score": "0.41738176", "text": "function update($new_instance, $old_instance) {\n\t\t$instance = $old_instance;\n\t\t\n\t\t/* Strip tags (if needed) and update the widget settings. */\n\t\t$instance['title'] = strip_tags($new_instance['title']);\n\t\t$instance['category'] = in_array(0,$new_instance['category']) ? 0 : implode(',',$new_instance['category']);\n\t\t$instance['numberposts'] = strip_tags($new_instance['numberposts']);\n\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "aca9b27cf008b58475992c93891da426", "score": "0.4168699", "text": "public function testControllerUpdateReturnsResponse()\n {\n $controller = new Yatzy();\n $_POST['command'] = 'restart';\n\n $exp = \"\\Psr\\Http\\Message\\ResponseInterface\";\n $res = $controller->updateYatzy();\n $this->assertInstanceOf($exp, $res);\n }", "title": "" }, { "docid": "effbd26314fcdc4c453c49bcdb0f6f71", "score": "0.41667077", "text": "function update( $new_instance, $old_instance ) {\n\t$instance = $old_instance;\n\n\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t$instance['img_src'] = $new_instance['img_src'];\n\t$instance['link'] = $new_instance['link'];\n\n\treturn $instance;\n}", "title": "" }, { "docid": "c400224ca5895604f2d954c0244ec784", "score": "0.41666353", "text": "function update($new_instance, $old_instance) {\n\t\t$instance = wp_parse_args($new_instance, $old_instance);\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "3de351a3691bf884776288ab550afb27", "score": "0.41594055", "text": "public function update( $new_instance, $old_instance ) {\n\t\t\treturn $new_instance;\n\t\t}", "title": "" }, { "docid": "ba46f95729cd8324c077c7dfb564e96d", "score": "0.41578814", "text": "function update( $new_instance, $old_instance ) {\n\n\t\t$new_instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$new_instance['more_text'] = strip_tags( $new_instance['more_text'] );\n\t\t$new_instance['post_info'] = wp_kses_post( $new_instance['post_info'] );\n\t\treturn $new_instance;\n\n\t}", "title": "" }, { "docid": "13c1d4b37247d05059fe3fabc9f899ea", "score": "0.41562563", "text": "public function update($pipe = NULL)\n { \n $conn = ($pipe!==NULL)? $pipe:$this->_redis;\n\n //we add the pk to the array\n $data = array_merge(array( $this->_primary_key => $this->pk() ),$this->_data);\n\n return $conn->hmset($this->_table_name.self::KSEP.$this->pk(), $data); \n }", "title": "" }, { "docid": "fcd864983215092291487a2367922d49", "score": "0.41510183", "text": "public function build(): UpdateOrderResponse\n {\n return CoreHelper::clone($this->instance);\n }", "title": "" }, { "docid": "5352ea11f8313f520bca5842f88ee5ba", "score": "0.4150685", "text": "function update( $new_instance, $old_instance ) {\n\t\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\t\t\n\t\t$instance['number_of_posts'] = strip_tags( $new_instance['number_of_posts']);\n\t\t$instance['sort_by'] = strip_tags( $new_instance['sort_by']);\n\t\t$instance['sort_descending'] = strip_tags( $new_instance['sort_descending']);\n\t\t$instance['post_category_ids'] = $new_instance['post_category_ids'];\n\t\t$instance['display_mode'] = strip_tags( $new_instance['display_mode']);\n\t\t$instance['posts_per_row'] = strip_tags( $new_instance['posts_per_row']);\n\t\t$instance['show_featured_only'] = strip_tags( $new_instance['show_featured_only']);\n\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "7458a189d673073b6162db9ad8889749", "score": "0.41442156", "text": "function update( $new_instance, $old_instance ) {\r\r\n $instance = $old_instance;\r\r\n\r\r\n $instance['title'] = strip_tags($new_instance['title']);\r\r\n\r\r\n if ( current_user_can('unfiltered_html') )\r\r\n $instance['text'] = $new_instance['text'];\r\r\n else\r\r\n $instance['text'] = wp_filter_post_kses($new_instance['text']);\r\r\n\r\r\n if ( current_user_can('unfiltered_html') )\r\r\n $instance['previewUrl'] = $new_instance['previewUrl'];\r\r\n else\r\r\n $instance['previewUrl'] = wp_filter_post_kses($new_instance['previewUrl']);\r\r\n //url to get scripts and styles for preview\r\r\n global $preview_url;\r\r\n $preview_url = $new_instance['previewUrl'];\r\r\n $_SESSION['previewUrl']=$preview_url;\r\r\n\r\r\n if ( current_user_can('unfiltered_html') )\r\r\n $instance['notes'] = $new_instance['notes'];\r\r\n else\r\r\n $instance['notes'] = wp_filter_post_kses($new_instance['notes']);\r\r\n\r\r\n $this->flush_widget_cache();\r\r\n\r\r\n $alloptions = wp_cache_get('alloptions', 'options');\r\r\n\r\r\n if (isset($alloptions['codeLover'])) {\r\r\n delete_option('codeLover');\r\r\n }\r\r\n return $instance;\r\r\n }", "title": "" }, { "docid": "033209f8b05b4ebb782dd8b581774757", "score": "0.41441348", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['num_posts'] = $new_instance['num_posts'];\n\t\t$instance['show_random'] = $new_instance['show_random'];\n\t\t$instance['posts_by'] = $new_instance['posts_by'];\n\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "87352b2832aae693656d14fb8ca0e804", "score": "0.4141759", "text": "public function execute(): AbstractEntity\n {\n $entity = &$this->e;\n $entityClass = get_class($entity);\n $id = $entity->findEntityId();\n /** @var ApiUrlRegistry $apiUrlRegistry */\n $apiUrlRegistry = ApiUrlRegistry::instance();\n $res = $entity->getSkladInstance()->getClient()->put(\n $apiUrlRegistry->getUpdateUrl($entityClass::$entityName, $id),\n $entity->mergeFieldsWithLinks()\n );\n\n return new $entityClass($entity->getSkladInstance(), $res);\n }", "title": "" }, { "docid": "e02fb45caa4b3957e54b5e54831ed1cf", "score": "0.41393402", "text": "public function process(ClassModel $class, Model $model, Config $config){\n $updateMethod = new MethodModel($config->get('update'));\n $updateMethod->addArgument(new ArgumentModel('request', 'Request'));\n $updateMethod->setDocBlock(new DocBlockModel(sprintf('%s: Update', $model->getShortName()),\n sprintf('Método para la actualización de una instancia de %s', $model->getShortName()) , \n sprintf('params: %s ', $model->printAttributes()), \n '@param Request $request', \n '@return Response'));\n $updateMethod->setBody('\n $data = ' . $model->getShortName() . '::find($request->id);\n if(!$data) {\n return $this->error([\"Objeto no encontrado\"]);\n }\n $data->update($request->all());\n return new '. $model->getShortName() .'Resource($data);');\n $class->addMethod($updateMethod);\n }", "title": "" }, { "docid": "ff009976f43d9908a6479dd67f5f9524", "score": "0.41372803", "text": "public function refresh()\n {\n $operationContext = $this->getCreationContext();\n\n $objectData = $this->getSession()->getBinding()->getObjectService()->getObject(\n $this->getRepositoryId(),\n $this->getId(),\n $operationContext->getQueryFilterString(),\n $operationContext->isIncludeAllowableActions(),\n $operationContext->getIncludeRelationships(),\n $operationContext->getRenditionFilterString(),\n $operationContext->isIncludePolicies(),\n $operationContext->isIncludeAcls(),\n null\n );\n\n $this->initialize(\n $this->getSession(),\n $this->getSession()->getTypeDefinition($this->getObjectType()->getId()),\n $this->creationContext,\n $objectData\n );\n }", "title": "" }, { "docid": "ade44e985b3e097e2dc7b2c44588d099", "score": "0.41372454", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['call_number'] = strip_tags( $new_instance['call_number'] );\n\t\t$instance['desc'] = strip_tags( $new_instance['desc'] );\n\t\t$instance['skype_name'] = strip_tags( $new_instance['skype_name'] );\n\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "f082a4f179e8756aa2de62c3dca438cc", "score": "0.41319326", "text": "function update($new_instance, $old_instance){\n\t\n\t\t$applyToClassGroup = empty($instance['applyToClassGroup']) ? 'body' : $instance['applyToClassGroup'];\n\t\t$buttonType = empty($instance['buttonType']) ? 'image' : $instance['buttonType'];\n\t\t$creditYes = empty($instance['creditYes']) ? 'no' : $instance['creditYes'];\n\t\t\n\t\t\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags(stripslashes($new_instance['title']));\n\t\t$instance['applyToClassGroup'] = strip_tags(stripslashes($new_instance['applyToClassGroup']));\n\t\t$instance['buttonType'] = strip_tags(stripslashes($new_instance['buttonType']));\n\t\t$instance['creditYes'] = strip_tags(stripslashes($new_instance['creditYes']));\n\t\t\n\t\t$instance['applyToClassGroup'] = strip_tags(stripslashes($new_instance['applyToClassGroup']));\n\t\t$instance['buttonType'] = strip_tags(stripslashes($new_instance['buttonType']));\n\t\t$instance['creditYes'] = strip_tags(stripslashes($new_instance['creditYes']));\n\t\n\treturn $instance;\n\t}", "title": "" }, { "docid": "c6b3f3d10c45c15e63ab30dbfb4eda81", "score": "0.41316018", "text": "public function update( $new_instance, $old_instance ) {\n\n }", "title": "" }, { "docid": "8e3ce05438ae3f94579efa192bf1df41", "score": "0.41282845", "text": "function update( $new_instance, $old_instance ) {\n $instance = $old_instance;\n\n $instance['title'] = strip_tags(stripslashes($new_instance['title']));\n $instance['width'] = strip_tags(stripslashes($new_instance['width']));\n $instance['height'] = strip_tags(stripslashes($new_instance['height']));\n $instance['zoom'] = $new_instance['zoom'];\n $instance['maptype'] = $new_instance['maptype'];\n\n return $instance;\n }", "title": "" }, { "docid": "e95795b9a6e056533f37b3c1b0f77a61", "score": "0.41245154", "text": "function update( $new_instance, $old_instance ) {\r\n\t\t$instance = $old_instance;\r\n\r\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\r\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\t\t$instance['statistX_ID'] = strip_tags( $new_instance['statistX_ID'] );\r\n\t\t$instance['statistX_Align'] = strip_tags( $new_instance['statistX_Align'] );\r\n\t\t$instance['statistX_BGColor'] = strip_tags( $new_instance['statistX_BGColor'] );\r\n\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "b22274994d8e7b009af9d04520cf1c08", "score": "0.41153392", "text": "public function setManageClassInstanceForRoleAction() {\n\n $layout = $this->layout();\n $layout->setTemplate('layout/simple');\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $post = $request->getPost()->toArray();\n $instanceId = $post['instanceId'];\n $mainRoleId = $post['mainRoleId'];\n $instanceArr = $this->getStructureTable()->setManageControlRoleInstance($instanceId, $mainRoleId);\n\n if (count($instanceArr) > 0) {\n print $this->getStructureTable()->updateManageControlRoleInstance($instanceArr);\n } else {\n print '0';\n }\n exit;\n } else {\n $this->errorReturn();\n }\n }", "title": "" }, { "docid": "de85920264765970ef55f6bf4d4a660d", "score": "0.41140154", "text": "function update( $new_instance, $old_instance ) {\n\n // update logic goes here\n $updated_instance = $new_instance;\n return $updated_instance;\n }", "title": "" }, { "docid": "284b538f50e0438393e4b2a83e92496e", "score": "0.41068837", "text": "function update( $new_instance, $old_instance ) {\n $instance = $old_instance;\n\n /* Strip tags for title and name to remove HTML (important for text inputs). */\n $instance['title'] = strip_tags( $new_instance['title'] );\n $instance['url'] = $new_instance['url'];\n\n return $instance;\n }", "title": "" }, { "docid": "86b28555644a44f33ebf37bd7ae52273", "score": "0.41067946", "text": "public function update()\n {\n $this->crud->request = $this->crud->validateRequest();\n $this->crud->request = $this->handlePasswordInput($this->crud->request);\n $this->crud->request = $this->handleRoles($this->crud->request);\n $this->crud->unsetValidation(); // validation has already been run\n\n return $this->traitUpdate();\n }", "title": "" }, { "docid": "275a43ee5b2542919be0b993b1da2c24", "score": "0.4101292", "text": "function update($new_instance, $old_instance){\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = strip_tags(stripslashes($new_instance['title']));\n\t\t$instance['motivationalStyle'] = strip_tags(stripslashes($new_instance['motivationalStyle']));\n\t\t\t\t\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "6002b35b16f082fb882c844a383cbc7d", "score": "0.40995055", "text": "function update($new_instance, $old_instance) {\n\t\t\t$instance = $old_instance;\n\n\t\t\t/* Strip tags (if needed) and update the widget settings. */\n\t\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\n\t\t\treturn $instance;\n\t\t}", "title": "" }, { "docid": "f3c805cf818c04762f1286a6c7e2b2d2", "score": "0.4098193", "text": "function modify_instance( $instance ){\n\t\tif( empty($instance['controls']) ) {\n\t\t\tif ( ! empty( $instance['speed'] ) ) {\n\t\t\t\t$instance['controls']['speed'] = $instance['speed'];\n\t\t\t\tunset($instance['speed']);\n\t\t\t}\n\t\t\tif ( ! empty( $instance['timeout'] ) ) {\n\t\t\t\t$instance['controls']['timeout'] = $instance['timeout'];\n\t\t\t\tunset($instance['timeout']);\n\t\t\t}\n\t\t\tif ( ! empty( $instance['nav_color_hex'] ) ) {\n\t\t\t\t$instance['controls']['nav_color_hex'] = $instance['nav_color_hex'];\n\t\t\t\tunset($instance['nav_color_hex']);\n\t\t\t}\n\t\t\tif ( ! empty( $instance['nav_style'] ) ) {\n\t\t\t\t$instance['controls']['nav_style'] = $instance['nav_style'];\n\t\t\t\tunset($instance['nav_style']);\n\t\t\t}\n\t\t\tif ( ! empty( $instance['nav_size'] ) ) {\n\t\t\t\t$instance['controls']['nav_size'] = $instance['nav_size'];\n\t\t\t\tunset($instance['nav_size']);\n\t\t\t}\n\n\t\t}\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "a05a6e72d6a6523905b1f64c2f696a71", "score": "0.40975994", "text": "public function replaceThumbnailResourceAction()\n {\n $krakenIoResult = $this->request->getArguments();\n\n if (!isset($krakenIoResult['success']) || $krakenIoResult['success'] !== 'true') {\n throw new Exception('Kraken was unable to optimize resource', 1524665608);\n }\n\n if (!isset($krakenIoResult['resourceIdentifier']) ||\n !isset($krakenIoResult['originalFilename'])\n ) {\n throw new Exception(\n 'Filename or resource identifier missing in Kraken callback payload',\n 1524665605\n );\n }\n\n if (!isset($krakenIoResult['verificationToken']) ||\n $this->krakenService->verifyToken(\n $krakenIoResult['verificationToken'],\n $krakenIoResult['originalFilename']\n ) === false\n ) {\n throw new Exception('Invalid verification token supplied', 1524665601);\n }\n\n try {\n $resourceIdentifier = $krakenIoResult['resourceIdentifier'];\n $resource = $this->resourceManager->getResourceBySha1($resourceIdentifier);\n\n if ((!$resource instanceof PersistentResource)) {\n throw new Exception(\n 'Could not find resource with identifier ' . $resourceIdentifier,\n 1524665602\n );\n }\n $thumbnail = $this->resourceService->getThumbnailsByResource($resource);\n\n if (isset($thumbnail[0]) && $thumbnail[0] instanceof Thumbnail) {\n $thumbnail = $thumbnail[0];\n $this->logger->debug(\n sprintf('Found thumbnail for resource identifier %s', $resourceIdentifier)\n );\n\n $this->resourceService->replaceThumbnailResource($thumbnail, $krakenIoResult);\n } else {\n $this->logger->debug(\n sprintf('Could not find a thumbnail object for resource identifier %s', $resourceIdentifier)\n );\n }\n } catch (\\Exception $e) {\n $this->logger->error(\n sprintf('Failed attempting to replace resource %s for thumbnail', $resourceIdentifier)\n );\n }\n }", "title": "" }, { "docid": "1152d6f707deaa6ba7c1fd412e657772", "score": "0.4096566", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t$instance['title'] = strip_tags(stripslashes($new_instance['title']));\n\t\t$instance['min_height'] = strip_tags(stripslashes($new_instance['min_height']));\n\t\t$instance['show_author'] = (isset($new_instance['show_author']) && $new_instance['show_author'])?1:0;\n\t\t$instance['show_source'] = (isset($new_instance['show_source']) && $new_instance['show_source'])?1:0;\n\t\t$instance['refresh_interval'] = strip_tags(stripslashes($new_instance['refresh_interval']));\n\t\t$instance['random_order'] = (isset($new_instance['random_order']) && $new_instance['random_order'])?1:0;\n\t\t$instance['tags'] = strip_tags(stripslashes($new_instance['tags']));\n\t\t$instance['char_limit'] = strip_tags(stripslashes($new_instance['char_limit']));\n\t\tif(!$instance['char_limit'])\n\t\t\t$instance['char_limit'] = __('none', 'testimonials-widget');\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "ed7efbf3db41088e0da401c98b4c7c3e", "score": "0.4096245", "text": "protected function newInstance() {\n return new RedisCluster(NULL, $this->_arr_node_map);\n }", "title": "" }, { "docid": "f3e9bd0d697fc3474e999aade19c7d08", "score": "0.40960202", "text": "function rubrics_update_instance($rubrics) {\n\n $rubrics->timemodified = time();\n $rubrics->id = $rubrics->instance;\n\n # You may have to add extra stuff in here #\n\n return update_record('rubrics', $rubrics);\n}", "title": "" }, { "docid": "9db0ad503d3fc2ca8b9b458cd9a8c5cf", "score": "0.40957677", "text": "function update($new_instance, $old_instance) {\n $instance = $old_instance;\n // Fields\n $instance['title'] = strip_tags($new_instance['title']);\n $instance['limit'] = strip_tags($new_instance['limit']);\n $instance['category'] = strip_tags($new_instance['category']);\n return $instance;\n }", "title": "" }, { "docid": "a3d70ea3d1ef3543521df3ebe2b01284", "score": "0.40952465", "text": "function update($new_instance, $old_instance) {\n\n\t\t$instance = $old_instance;\n\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t\t$instance['number'] = $new_instance['number'];\n\t\t$instance['orderby'] = $new_instance['orderby'];\n\t\t$instance['type'] = $new_instance['type'];\n\t\t$instance['popularity'] = $new_instance['popularity'];\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "cab9635c4c09ed57e30fe4f772eb36e1", "score": "0.40951276", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\n\t\t$instance['title'] = $new_instance['title'];\n\t\t$instance['username'] = sanitize_title( strip_tags( $new_instance['username'] ) ); //remove non-alfanumeric characters\n\t\t$count = ( 0 < absint( $new_instance['count'] ) ) ? ( absint( $new_instance['count'] ) ) : ( 3 );\n\t\t$instance['count'] = $count;\n\t\t$instance['userinfo'] = $new_instance['userinfo'];\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "9dac84f72aea7aba5da669ce1cf53b61", "score": "0.40895313", "text": "function update($new_instance, $old_instance) {\n $instance = $old_instance;\n $instance['title'] = $new_instance['title'];\n $instance['desc'] = $new_instance['desc'];\n $instance['phone'] = $new_instance['phone'];\n $instance['email'] = $new_instance['email'];\n $instance['social_icons'] = $new_instance['social_icons'];\n return $instance;\n }", "title": "" }, { "docid": "6b4c7889a8411dffa53d5d55d24a61bf", "score": "0.40843752", "text": "function update( $new_instance, $old_instance ) {\n\t\t$instance = $old_instance;\n\t\t$instance['title'] = $new_instance['title'];\n $instance['menu'] = $new_instance['menu'];\n\t\t$instance['divider'] = isset( $new_instance['divider'] );\n\t\t$instance['bold_text'] = isset( $new_instance['bold_text'] );\n\t\t$instance['show_arrow'] = isset( $new_instance['show_arrow'] );\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "62f08ac66e849e1e5f48733f29798757", "score": "0.4081934", "text": "function update($new_instance, $old_instance)\r\n\t{\r\n\t\t//gets the old instance\r\n\t\t$instance = $old_instance;\r\n\t\t\r\n\t\t//sets the new instance into the the old instance values\r\n\t\t\r\n\t\t//makes sure there is some data to use\r\n\t\t\r\n\t\tif(empty($new_instance['title']) == false)\r\n\t\t\t$instance['title'] = $new_instance['title'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['postformat']) == false)\r\n\t\t\t$instance['postformat'] = $new_instance['postformat'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['sortby']) == false)\r\n\t\t\t$instance['sortby'] = $new_instance['sortby'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['sort']) == false)\r\n\t\t\t$instance['sort'] = $new_instance['sort'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['displaybodyid']) == false)\r\n\t\t\t$instance['displaybodyid'] = $new_instance['displaybodyid'];\r\n\t\t\t\t\t\r\n\t\tif(empty($new_instance['displaynumberofpostperpage']) == false || $new_instance['displaynumberofpostperpage'] > 0)\r\n\t\t\t$instance['displaynumberofpostperpage'] = $new_instance['displaynumberofpostperpage'];\r\n\t\t\r\n\t\tif(empty($new_instance['cateid']) == false)\r\n\t\t\t$instance['cateid'] = $new_instance['cateid'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['tagname']) == false)\r\n\t\t\t$instance['tagname'] = $new_instance['tagname'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['format']) == false)\r\n\t\t\t$instance['format'] = $new_instance['format'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['poststatus']) == false)\r\n\t\t\t$instance['poststatus'] = $new_instance['poststatus'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['searchtext']) == false)\r\n\t\t\t$instance['searchtext'] = $new_instance['searchtext'];\r\n\t\t\t\r\n\t\tif(empty($new_instance['headerextraclass']) == false)\r\n\t\t\t$instance['headerextraclass'] = $new_instance['headerextraclass'];\r\n\t\t\t\t\r\n\t\t$instance['displaytitle'] = $new_instance['displaytitle'];\r\n\t\t$instance['displaynotfound'] = $new_instance['displaynotfound'];\r\n\t\t$instance['displayfilters'] = $new_instance['displayfilters'];\r\n\t\t$instance[\"displaypaging\"] = $new_instance['displaypaging'];\r\n\r\n\t\treturn $instance;\r\n\t}", "title": "" }, { "docid": "bdee138e835a743a6094750d05871a15", "score": "0.40813056", "text": "public function ExportInstance(\\Google\\Cloud\\Redis\\V1beta1\\ExportInstanceRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.redis.v1beta1.CloudRedis/ExportInstance',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "title": "" }, { "docid": "ff4a34171c38bebbef1fc2d85e6cd2f3", "score": "0.40811265", "text": "function update( $new_instance, $old_instance ) {\n\n $instance = array();\n\n $instance['title'] = strip_tags( $new_instance['title'] );\n $instance['region'] = strip_tags( $new_instance['region'] );\n $instance['expiration'] = strip_tags( $new_instance['expiration'] );\n $instance['display'] = strip_tags( $new_instance['display'] );\n \n delete_transient( 'twitter_trends' );\n return $instance; \n }", "title": "" }, { "docid": "7d68e5515748f1ce6b07f0cd4950ce11", "score": "0.4076022", "text": "public function update( $new_instance, $old_instance ) {\n\t\t$instance['title'] = sanitize_text_field( $new_instance['title'] );\n\n\t\t$instance['tweet-limit'] = ( 0 !== (int) $new_instance['tweet-limit'] ) ? (int) $new_instance['tweet-limit'] : null;\n\n\t\t$instance['screen-name'] = sanitize_text_field( $new_instance['screen-name'] );\n\n\t\t$instance['is_switch_style'] = (bool) $new_instance['is_switch_style'];\n\t\t$instance['show-timestamp'] = (bool) $new_instance['show-timestamp'];\n\t\t$instance['show-follow-button'] = (bool) $new_instance['show-follow-button'];\n\t\t$instance['show-followers-count'] = (bool) $new_instance['show-followers-count'];\n\n\t\t// empty cache\n\t\tdelete_transient( 'zoom_twitter_t6e_' . $new_instance['screen-name'] . '_' . $new_instance['tweet-limit'] );\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "7139ea30ef2dc73828e49356b91353bb", "score": "0.40707904", "text": "public function methodUpdate() {\n\t\t$this->_method = static::METHOD_UPDATE;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e767f06494b1a81e1dd2b4863a1720b9", "score": "0.4053732", "text": "function update ( $new_instance, $old_instance ) {\n\t\t\n\t\t$instance = $old_instance;\n\n\t\t/* Strip tags for title and name to remove HTML (important for text inputs). */\n\t\t$instance['title'] = strip_tags( $new_instance['title'] );\n\n\t\treturn $instance;\n\t\t\n\t}", "title": "" }, { "docid": "93834411fba9774569cd1e697ea795ba", "score": "0.40535185", "text": "public function update()\n {\n //get infor of item\n $method = $_GET['method'];\n $itemId = $_GET['item'];\n $objectType = $_GET['type'];\n return $this->response->update($method, $itemId, $objectType);\n }", "title": "" }, { "docid": "4b9b1831db8c5b1608b9181702bc94ce", "score": "0.40505004", "text": "public function build(): UpdateWorkweekConfigResponse\n {\n return CoreHelper::clone($this->instance);\n }", "title": "" }, { "docid": "0f6c5b7491050575ee58d65c71fce636", "score": "0.40462735", "text": "public function execute()\n {\n //Check to see if a NewRelic config is in place\n $newrelic_site_config = $this->rocketeer->getOption('newrelic');\n if ($newrelic_site_config != NULL)\n {\n $payload = array(\n \"deployment\" => array(\n \"app_name\" => $newrelic_site_config['app_name'],\n \"application_id\" => $newrelic_site_config['application_id'],\n \"description\" => Rocketeer::execute('SkubaseTask\\GetRemoteTag'),\n \"revision\" => Rocketeer::execute('SkubaseTask\\GetRemoteHash'),\n \"user\" => Rocketeer::execute('SkubaseTask\\GetLocalUser'),\n ),\n );\n\n $request = new \\RestRequest('https://api.newrelic.com/deployments.xml', 'POST', $payload);\n $request->setCustomHeader(\"x-api-key:{$this->rocketeer->getOption('newrelic_api_key')}\");\n $request->execute();\n $this->explainer->line(\"Updated NewRelic Deployments API for {$newrelic_site_config['app_name']}\");\n }\n }", "title": "" } ]
43fc17db4f0e657f4bf4697f437d8d34
Update Medicine cart list
[ { "docid": "5f824d39cc6dcace295eb7ad0fa42198", "score": "0.5952792", "text": "public\r\n\tfunction anyUpdateBuyMedicine ()\r\n\t{\r\n\t\t$updatedRows = 0;\r\n\t\t$deletedRow = 0;\r\n\t\theader (\"Access-Control-Allow-Origin: *\");\r\n\t\t$deleted_length = intval (Input::get ('deleted_length' , 0));\r\n\t\tif ($deleted_length > 0) {\r\n\t\t\t$invoice_number = Input::get ('invoice_number' , '');\r\n\t\t\tfor ($i = 0; $i < $deleted_length; $i++) {\r\n\t\t\t\t$toBeDeleted = Input::get ('item_code' . $i , null);\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$rowTobeDeleted = ItemList::where ('invoice_number' , '=' , $invoice_number)->where ('item_code' , '=' , $toBeDeleted)->first ();\r\n\t\t\t\t\tif ($rowTobeDeleted != null)\r\n\t\t\t\t\t\t$deletedRow = $rowTobeDeleted->delete ();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception $e) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($deletedRow > 0)\r\n\t\t\t$result = array(array('result' => array('status' => 'success')));\r\n\t\telse\r\n\t\t\t$result = array(array('result' => array('status' => 'none')));\r\n\r\n\t\treturn Response::json ($result);\r\n\t}", "title": "" } ]
[ { "docid": "5719b7128e1b687286f7fc852f963652", "score": "0.72606343", "text": "function update_cart(){\n $cart_info = $_POST['cart'] ;\n \t\tforeach( $cart_info as $id => $cart)\n\t\t{\n $rowid = $cart['rowid'];\n $price = $cart['price'];\n $amount = $price * $cart['qty'];\n $qty = $cart['qty'];\n\n \t$data = array(\n\t\t\t\t'rowid' => $rowid,\n 'price' => $price,\n 'amount' => $amount,\n\t\t\t\t'qty' => $qty\n\t\t\t);\n\n\t\t\t$this->cart->update($data);\n\t\t}\n\t\tredirect('food/showFood');\n\t}", "title": "" }, { "docid": "36370774784ad177b182504ccad9ff1d", "score": "0.71963906", "text": "function update_cart(){\n $cart_info = $_POST['cart'] ;\n foreach( $cart_info as $id => $cart)\n {\n $rowid = $cart['rowid'];\n $price = $cart['price'];\n $amount = $price * $cart['qty'];\n $qty = $cart['qty'];\n\n $data = array(\n 'rowid' => $rowid,\n 'price' => $price,\n 'amount' => $amount,\n 'qty' => $qty\n );\n\n $this->cart->update($data);\n }\n redirect('productos');\n }", "title": "" }, { "docid": "5335472e04bf39e5006b0f5df6240237", "score": "0.7193762", "text": "public function testUpdateCart()\n {\n }", "title": "" }, { "docid": "b84c42674b10727881ff0e060b0bf38e", "score": "0.71673185", "text": "public function updateDBCart() {\n //$login = (isset($_SESSION['tempCustomer']['login']) ? $_SESSION['tempCustomer']['login'] : $_SESSION['cmd']['login']);\n db::query(\"DELETE FROM `cart` WHERE login='{$_SESSION['cmd']['login']}'\");\n \n $cart = $_SESSION['cart']['items'];\n \n if(is_array($cart)) {\n foreach($cart as $item) {\n $i = array(\n 'login' => $_SESSION['cmd']['login'],\n 'model' => $item['model'],\n 'version' => $item['version'],\n 'color' => $item['color'],\n 'type' => $item['type'],\n 'order_no' => $item['order_no'],\n 'qty' => 1,\n );\n \n db::db_perform(\"cart\", $i);\n }\n }\n }", "title": "" }, { "docid": "ef41247678fef685739a3a9896e96ec3", "score": "0.7157366", "text": "function update_cart(){\n $cart_info = $_POST['cart'] ;\n foreach( $cart_info as $id => $cart)\n {\n $rowid = $cart['rowid'];\n $price = $cart['price'];\n $amount = $price * $cart['qty'];\n $qty = $cart['qty'];\n\n $data = array(\n 'rowid' => $rowid,\n 'price' => $price,\n 'amount' => $amount,\n 'qty' => $qty\n );\n\n $this->cart->update($data);\n }\n redirect('cart');\n\t}", "title": "" }, { "docid": "e9bf40c68a43ed6c2326bda23d1f5f83", "score": "0.7002418", "text": "public function editCart()\n {\n $cart = $this->getCart();\n $keys = array_keys($cart);\n for($x = 0; $x<count($cart); $x++)\n {\n if($cart[$keys[$x]]['id'] == $_POST['id'])\n {\n $cart[$keys[$x]]['cantidad'] = $_POST['cuantity'];\n $x = $keys[intval(count($cart))-1];\n }\n }\n $this->setCart($cart);\n die();\n }", "title": "" }, { "docid": "5705e63da81f8ace8ffb7fa364ce8013", "score": "0.69034857", "text": "public function actionUpdateCart(){\n $productID = Yii::app()->request->getParam('product_id');\n $sl = Yii::app()->request->getParam('sl');\n cartShop::updateCart($productID, $sl);\n cartShop::showQualityCart();\n }", "title": "" }, { "docid": "d2d7497cf8991fa7716e27995da4a6b7", "score": "0.68288875", "text": "function update_cart(){\n\t\t$data = array(\n\t\t\t'rowid' => $this->input->post('row_id'), \n\t\t\t'qty' => $this->input->post('qty'), \n\t\t);\n\t\t$this->cart->update($data);\n\t\t// echo $this->show_cart();\n\t\techo $this->show_review_order();\n\n\t}", "title": "" }, { "docid": "cb8faf0605c69d7e89a4f2dfeda630fd", "score": "0.676128", "text": "private function updateCartVoucher($data){\n $carts = Yii::app()->session['carts'];\n foreach ($data as $cart_id => $value)\n $carts[$cart_id]['qty'] = $value['qty'];\n Yii::app()->session['carts'] = $carts;\n }", "title": "" }, { "docid": "047f9f532975e912fef3f884e535f76b", "score": "0.67582196", "text": "public function updatePostAction()\r\n {\r\n try {\r\n $cartData = $this->getRequest()->getParam('cart');\r\n if (is_array($cartData)) {\r\n $filter = new Zend_Filter_LocalizedToNormalized(\r\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\r\n );\r\n foreach ($cartData as $index => $data) {\r\n if (isset($data['qty'])) {\r\n $cartData[$index]['qty'] = $filter->filter($data['qty']);\r\n }\r\n }\r\n $cart = $this->_getCart();\r\n if (! $cart->getCustomerSession()->getCustomer()->getId() && $cart->getQuote()->getCustomerId()) {\r\n $cart->getQuote()->setCustomerId(null);\r\n }\r\n\r\n if(Mage::getVersion() >= '1.4.2')\r\n\t\t\t\t\t$cartData = $cart->suggestItemsQty($cartData);\r\n $cart->updateItems($cartData)\r\n ->save();\r\n }\r\n $this->_getSession()->setCartWasUpdated(true);\r\n }\r\n catch (Mage_Core_Exception $e) {\r\n $this->_getSession()->addError($e->getMessage());\r\n }\r\n catch (Exception $e) {\r\n $this->_getSession()->addException($e, $this->__('Cannot update shopping cart.'));\r\n }\r\n $this->_goBack();\r\n }", "title": "" }, { "docid": "49d00252a2aef9bd6282370bd44d1880", "score": "0.67497414", "text": "public function updatecart() : void\n {\n\n // Get shopping cart id\n $cart = $this->getLatestQuotationFromSession($_COOKIE['unele_shop']);\n\n // Loop through al POSTed fields\n foreach($_POST as $key => $value) {\n \n // Skip 'form' post field\n if ($key != 'form') {\n \n $hKey = htmlentities($key);\n $hValue = htmlentities($value);\n\n // Check if value is to be deleted or updated\n if ($hValue == 0) {\n\n // Delete product from quotation\n if ($this->deleteQuotationProduct($hKey, $cart['id']) == 1) {\n\n // Succes\n $this->insertLog('Quotation products', 'Delete', 'Deleted product '.$hKey.' from quotation '.$cart['id']. ' through webshop cart update');\n \n } else {\n\n // Failed\n $this->insertLog('Quotation products', 'Delete', 'Deleting product '.$hKey.' from quotation '.$cart['id']. ' failed through webshop cart update');\n }\n\n } else {\n\n // Update product amount in quotation\n if ($this->editQuotationProductAmount($hValue, $hKey, $cart['id']) == 1) {\n\n // Succes\n $this->insertLog('Quotation products', 'Edit', 'Updated product '.$hKey.' amount from quotation '.$cart['id'].' through webshop cart update');\n\n } else {\n\n // Failed\n $this->insertLog('Quotation products', 'Edit', 'Updating product '.$hKey.' amount from quotation '.$cart['id']. ' failed through webshop cart update');\n }\n }\n }\n }\n }", "title": "" }, { "docid": "1f359991c6a5edf30716c0ed90398d44", "score": "0.6709335", "text": "public function cartsUpdate(Request $req){\n foreach ($req->producto as $arrayCart) {\n $cart = Cart::find(intval($arrayCart['cart_id']));\n // actualizamos la cantidad pedida de cada producto en caso de que esta haya cambiado\n $cart->quantity = $arrayCart['cart_quantity'];\n // lo guardamos\n $cart->save();\n }\n return redirect('checkout');\n }", "title": "" }, { "docid": "9f6833ec2ace70f77d79763840fc81f3", "score": "0.66992885", "text": "public function update_cart(Request $request, $id)\n {\n $items=$request->session()->get('cart');\n $qt=(int)$request->qty;\n\n $i=0;\n foreach ($items as $item)\n {\n if($item['pid']==$id)\n {\n array_splice($items,$i,1,[[\"pid\"=>$id,\"price\"=>$item[\"price\"],\"qty\"=>$qt,'total'=>($item[\"price\"]*$qt)]]);\n }\n $i++;\n }\n\n $request->session()->put('cart',$items);\n // return redirect('cart');\n return \"You have successfully updated the quantity\";\n\n }", "title": "" }, { "docid": "8c1ab4a38ff8f6ae38bdc66ced89296f", "score": "0.6690943", "text": "public function updateCart()\n {\n $product_id = \\CI::input()->post('product_id');\n $quantity = \\CI::input()->post('quantity');\n\n $item = \\AVL::getCartItem($product_id);\n\n if (!$item) {\n return json_encode(['error' => lang('error_product_not_found')]);\n }\n if (intval($quantity) === 0) {\n \\AVL::removeItem($product_id);\n echo json_encode(['success' => true]);\n } else {\n //create a new list of relevant items\n $item->quantity = $quantity;\n $insert = \\AVL::insertItem(['product' => $item, 'quantity' => $quantity]);\n echo $insert;\n }\n\n //save the cart updates\n \\AVL::saveCart();\n\n return true;\n }", "title": "" }, { "docid": "37c3bd72539265cada380264db758bf8", "score": "0.6599573", "text": "public function hapus_cart(){\n $data = array(\n 'rowid' => $this->input->post('row_id'), \n 'qty' => 0, \n );\n $this->cart->update($data);\n echo $this->show_cart();\n }", "title": "" }, { "docid": "bc165c4a9e741508a7ff6f85ac50058e", "score": "0.6590755", "text": "function hapus_cart(){\n\t\t$data = array(\n\t\t\t'rowid' => $this->input->post('row_id'), \n\t\t\t'qty' => 0, \n\t\t);\n\t\t$this->cart->update($data);\n\t\techo $this->show_cart();\n\t}", "title": "" }, { "docid": "6e3e192ba7e78cd9b6655e12213e3acf", "score": "0.6582149", "text": "public function updateCartAction(Request $request) {\n $clear=$request->request->get('clear');\n $update=$request->request->get('update');\n $em = $this->getDoctrine()->getManager();\n $cart = $this->init($em);\n $i = 0;\n if ($clear !=null) {\n\n $em->getRepository('ShopShopBundle:CartItem')->clearCart($cart->getId());\n $this->updateCartTotal();\n } elseif ($update!=null) {\n foreach ($_POST['prodid'] as $i){\n $cartitem= $em->getRepository('ShopShopBundle:CartItem')->find($i);\n $qty=(int)$_POST['prodqty'][$i];\n if ($qty > $cartitem->getProduct()->getStock()){\n $qty=$cartitem->getProduct()->getStock();\n $this->get('session')->getFlashBag()->add('notice-failure', 'Invalid quantity for product: \\''.$cartitem->getProduct()->getTitle().'\\' maximum of stock added.');\n }else{\n $this->get('session')->getFlashBag()->add('notice-success', 'Updated quantity for product : \\''.$cartitem->getProduct()->getTitle().'\\'');\n }\n $cartitem->setQuantity($qty);\n }\n $this->updateCartTotal();\n $em->flush();\n }\n\n return $this->redirect($this->getRequest()->headers->get(\"referer\"));\n }", "title": "" }, { "docid": "d778837a281f6406a6295b0a6abd7bb7", "score": "0.6581366", "text": "public function UpdateCartItems()\n\t{\n\t\tif (!$this->IsAuthencated())\n\t\treturn $this->RedirectNotAuthed();\n\n\t\t$fileNumber = Session::get('fileNumber');\n\t\t$updateFields = array();\n\n\n\t\tif ($fileNumber)\n\t\t{\n\t\t\t// get the clients progress\n//\t\t\t$clientdetail = $this->leadtracapi->GetClient($fileNumber, array('Loan_Program', 'PublicService', 'cart_status', 'cart_items', 'cart_order_time','completed_steps_bitwise'));\n\t\t\t$client = $clientDetails = $clientdetail = $clientdetails = $this->GetClientFromSession(true);\n\n\t\t\tif (!$clientdetails)\n\t\t\t\treturn $this->RedirectWithError('/step1', 'Sorry, unable to find your account. Perhaps your session has expired. Please click returning customer if your information is not displayed below to log in to your account.');\n\n\t\t\t// lets check if they completed step4 if not, add it.\n\t\t\tif ( !($clientdetails->TProperties->completed_steps_bitwise & step4) )\n\t\t\t{\n\t\t\t\t$updateFields['completed_steps_bitwise'] = @$clientdetails->TProperties->completed_steps_bitwise | step4;\n\t\t\t\t// we need to update there status to Products Selected\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// they are most likely updating there order. So anything that needs to happen here, should.\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @todo verify function is working @ 5am\n\t\t\t */\n\t\t\t$paid_products = $this->System_GetPaidProducts();\n\n\n\t\t\t// lets see what they ordered\n\t\t\t$Ordered = array();\n\t\t\t// alright lets find out what they ordered\n\t\t\t$cart_items = 0;\n\n\n\t\t\t//items for re-payment (already consolidated)\n\t\t\tif (Input::get('repayment_promisory_note') && !$paid_products['repayment_app'])\n\t\t\t{\n\t\t\t\t$Ordered[] = 'repayment_promisory_note';\n\t\t\t\t$cart_items |= cart_product_repayment_app;\n\t\t\t}\n\n\t\t\t//items for consolidation forms\n\t\t\tif (Input::get('consolidation_promisory_note') && !$paid_products['consolidation_app'])\n\t\t\t{\n\t\t\t\t$Ordered[] = 'consolidation_promisory_note';\n\t\t\t\t$cart_items |= cart_product_consolidation_app;\n\t\t\t}\n\n\t\t\tif (Input::get('pslf_app') && !$paid_products['pslf_app'])\n\t\t\t{\n\t\t\t\t$Ordered[] = 'pslf_app';\n\t\t\t\t$cart_items |= cart_product_pslf_app;\n\t\t\t}\n\n\t\t\tif (Input::get('forebearance_app') && !$paid_products['forebearance_app'])\n\t\t\t{\n\t\t\t\t$Ordered[] = 'forebearance_app';\n\t\t\t\t$cart_items |= cart_product_forebearance_app;\n\t\t\t}\n\n\t\t\tif (Input::get('recertification_app') && !$paid_products['recertification_app'])\n\t\t\t{\n\t\t\t\t$Ordered[] = 'recertification_app';\n\t\t\t\t$cart_items |= cart_product_recertification_app;\n\t\t\t}\n\t\t\tSession::put('cart_type', 'order');\n\n\t\t\t// check if there order is nothing. if it's nothing, we need to send them back to select a form.\n\t\t\tif ($cart_items == 0 && !$clientdetails->TProperties->products_already_purchased)\n\t\t\t{\n\t\t\t\treturn\t$this->RedirectWithError('step4services', ' You must select an application you wish to have generated for you.');\n\t\t\t}\n $this->ClientUpdatedProfile($fileNumber, step4);\n\n\t\t\tif ($cart_items == 0 && $clientdetails->TProperties->products_already_purchased)\n\t\t\t{\n\t\t\t\t// we're not even ordering we are updating only.\n\t\t\t\t// we need to move them to upgrading\n\t\t\t\t// we need to tell the cart its an update\n\t\t\t\tSession::put('cart_type', 'update');\n\n\t\t\t\tif ($clientdetails->TProperties->products_already_purchased & cart_product_consolidation_app || $clientdetails->TProperties->products_already_purchased & cart_product_repayment_app || $clientdetails->TProperties->products_already_purchased & cart_product_recertification_app )\n\t\t\t\t{\n\t\t\t\t\tSession::put('cart_type', 'update');\n\n\t\t\t\t\treturn Redirect::to('/step5');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to('/updatesuccess');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// we're placing an order, let's record that these are the products we're buying.\n\t\t\t\t$updateFields['cart_items'] = $cart_items;\n\t\t\t\t$updateFields['cart_id'] = uniqid();\n\t\t\t\t$updateFields['cart_steps_required'] = 0;\n\n\t\t\t\tif ($cart_items & cart_product_consolidation_app || $cart_items & cart_product_repayment_app || $cart_items & cart_product_recertification_app )\n\t\t\t\t\t$updateFields['cart_steps_required'] = step1 | step2 | step3 | step4 | step5 | step6 | step7;\n\n\t\t\t\telse\n\t\t\t\t\t$updateFields['cart_steps_required'] = step1 | step2 | step3 | step4 | step7;\n\n\t\t\t\t$updateFields['cart_order_time'] = time();\n\t\t\t}\n\n\t\t\tif ( !($clientdetail->TProperties->completed_steps_bitwise & step4) )\n\t\t\t{\n\t\t\t\t$updateFields['completed_steps_bitwise'] = @$clientdetail->TProperties->completed_steps_bitwise | step4;\n\t\t\t}\n\t\t\t$this->leadtracapi->CreateOrUpdateClient($this->campaignId, $updateFields, $fileNumber);\n\n\n\t\t\t$updateFields = $this->System_Setup_Default_Payment_From_Cart_Items(false, true);\n\n\t\t\tif (count($updateFields) && is_array($updateFields))\n\t\t\t{\n\t\t\t\t$this->leadtracapi->CreateOrUpdateClient($this->campaignId, $updateFields, $fileNumber);\n\t\t\t}\n\n\t\t\t// redirect them to our Step Finder\n\t\t\t// PRZ Skip to Step 7 for Recertification & Forbearance\n\t\t\t// PRZ if ($cart_items & cart_product_consolidation_app || $cart_items & cart_product_repayment_app || $cart_items & cart_product_recertification_app )\n\t\t\tif ($cart_items & cart_product_consolidation_app || $cart_items & cart_product_repayment_app )\n\t\t\t{\n\t\t\t\t## Return the the fasfa pin\n\t\t\t\tSession::put('checkout_title', STEP7_TITLE);\n\t\t\t\treturn Redirect::to('step5');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSession::put('checkout_title', STEP7b_TITLE);\n\t\t\t\t// redirect them to checkout.\n\t\t\t\treturn Redirect::to('step7');\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d2bd2a3c19a49621d26951417ef767e6", "score": "0.655164", "text": "public function update_item() {\r\n\t\t$data = array(\r\n\t\t\t\t'rowid' => $this->input->post('row_id'),\r\n\t\t\t\t'qty' => $this->input->post('qty')\r\n\t\t);\r\n\t\t$this->cart->update($data);\r\n\t\t$this->load_cart();\r\n\t}", "title": "" }, { "docid": "70c3d2cee95aff5d7359533637d8ccc2", "score": "0.6539527", "text": "public function update_shopping() {\n $rows = $this->input->post('rowid');\n $adultos = $this->input->post('adulto');\n $ninos = $this->input->post('nino');\n //creamos un array\n $data = array();\n //creamos un for para saber la posicion de cada arreglo\n for ($i = 0; $i < sizeof($rows); $i++) {\n $data[] = array(\n 'rowid' => $rows[$i],\n 'adultos' => $adultos[$i],\n 'ninos' => $ninos[$i]\n );\n }\n//actulizar el carro\n $this->cart->update($data);\n\n foreach($this->cart->contents() as $fila){\n $cantidad_adulto=$cantidad_adulto + $fila['adultos'];\n $cantidad_nino=$cantidad_nino + $fila['ninos'];\n $datacarrito[]=array(\n 'subtotal'=>formato_moneda($fila['subtotal'],'dolares'),\n 'descuento'=>formato_moneda($this->cart->descuento(),'dolares'),\n 'subtotal_general'=>formato_moneda($this->cart->subtotal(),'dolares'),\n 'total_general'=>formato_moneda($this->cart->total(),'dolares'),\n 'cantidad_adulto'=>$cantidad_adulto,\n 'cantidad_nino'=>$cantidad_nino\n );\n\n }\n\n echo json_encode($datacarrito);\n }", "title": "" }, { "docid": "5169683df280ad7773bf8199120b4b84", "score": "0.65121186", "text": "function hapus_cart(){\n $data = array(\n 'rowid' => $this->input->post('row_id'), \n 'qty' => 0, \n );\n $this->cart->update($data); \n }", "title": "" }, { "docid": "fc5d7ffda556eeef5ad10d1becf30977", "score": "0.64982766", "text": "function hapus_cart() {\n $data = array(\n 'rowid' => $this->input->post('row_id'),\n 'qty' => 0,\n );\n $this->cart->update($data);\n echo $this->show_cart();\n }", "title": "" }, { "docid": "48aed1db9e0128d1e6484029051b52fa", "score": "0.6485188", "text": "public function updateProductCart()\n {\n $this->viewBuilder()->layout('ajax');\n\n $productId = $this->request->data(\"productId\");\n $productCount = $this->request->data(\"productCount\");\n\n $session = $this->request->session();\n $cartArray = $session->read('cart');\n\n $productPos = $this->getProductPosInCart($cartArray, $productId);\n\n $cartArray['products'][$productPos]['count'] = $productCount;\n $cartArray['total'] = $this->calculateCartTotalPrice($cartArray);\n\n $session->write('cart', $cartArray);\n\n $this->set(array('price' => array('total'=>$cartArray['total'], 'productTotal'=>($productCount * $cartArray['products'][$productPos]['product']->price)),\n '__serialize' => 'price'));\n }", "title": "" }, { "docid": "192d0f45af88c05c311458ebfea5b630", "score": "0.64783394", "text": "function update_cart() {\n\t\t$Itemid = JRequest::getInt('Itemid');\n\t\t$eventIds = JRequest::getVar('event_id');\n\t\t$quantities = JRequest::getVar('quantity');\t\t\n\t\t$model = & $this->getModel('cart') ;\n\t\t$model->processUpdateCart($eventIds, $quantities);\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eventbooking&task=view_cart&Itemid='.$Itemid)) ;\n\t}", "title": "" }, { "docid": "b119b0c5baa0da97bc8186373cc9017c", "score": "0.64245003", "text": "function hapus_cart(){\n\t\t$data = array(\n\t\t\t'rowid' => $this->input->post('row_id'), \n\t\t\t'qty' => 0, \n\t\t);\n\n\t\t$this->cart->update($data);\n\n\t\tif($this->session->logged_in == TRUE){\n\t\t\t$id_user = $this->session->id_user;\n\t\t\t$cartContentString = serialize($this->cart->contents());\n\n\t\t\t$cek_user = $this->m_keranjang->cek_user($id_user);\n\t\t\tif ($cek_user->num_rows()) {\n\t\t\t\t$this->m_keranjang->update_cart($id_user, $cartContentString);\n\t\t\t} else $this->m_keranjang->simpan_cart($id_user, $cartContentString);\n\t\t}\n\n\t\techo $this->show_cart();\n\t}", "title": "" }, { "docid": "d5ba6ee6c272b528541625818a110e0f", "score": "0.6389115", "text": "public function updateItems(CartInterface $quote);", "title": "" }, { "docid": "7d01986843253fcee80ead2bbda455ae", "score": "0.6387569", "text": "public function editquantity(){\n if(isset($this->params[0])) {\n $id = (int)($this->params[0]);\n $quantity = (int)($this->params[1]);\n if (!array_key_exists($id, $this->products)) {\n $this->products[$id] = (int)($quantity);\n }else{\n $this->products[$id] = (int)($quantity);\n }\n }\n Cookie::set('cart', json_encode($this->products));\n\n echo $this->indicator();\n die();\n }", "title": "" }, { "docid": "3247032670029e57a3253bae7e018d60", "score": "0.6384804", "text": "function hapus_cart2($rowid){\n$data = array(\n 'rowid' => $rowid, \n 'qty' => 0, \n);\n$this->cart->update($data);\nredirect('sarpras/mutasi_keluar');\n}", "title": "" }, { "docid": "d571daae0d122d8c5820416ba62bbe99", "score": "0.6371576", "text": "public function cart_update($redirect = TRUE) {\n $cart_info = $_POST['cart'];\n\n foreach ($cart_info as $id => $cart) {\n\n $rowid = $cart['rowid'];\n\n $price = $cart['price'];\n\n $amount = $price * $cart['qty'];\n\n $qty = $cart['qty'];\n\n $data = array(\n 'rowid' => $rowid,\n 'price' => $price,\n 'amount' => $amount,\n 'qty' => $qty\n );\n\n $this->cart->update($data);\n }\n\n $descuento = $this->descuento->get_by_codigo($this->input->post('descuento'));\n\n if ($descuento) {\n\n $newdata = array(\n 'codigo_descuento' => $this->input->post('descuento'),\n 'descuento_id' => $descuento->id,\n 'porcentaje' => $descuento->porcentaje\n );\n\n $this->session->set_userdata('descuento_aplicado', $newdata);\n }\n if ($redirect) {\n redirect('carro');\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "b6bcc25b5b91e6aa95e92cb9bd51ccce", "score": "0.63680977", "text": "public function update(Request $request)\n {\n if($request->id && $request->quantity){\n $systemcart = session()->get('systemcart');\n $systemcart[$request->id][\"quantity\"] = $request->quantity;\n session()->put('systemcart', $systemcart);\n session()->flash('success', 'Troli berjaya dikemas kini');\n }\n }", "title": "" }, { "docid": "2d993f3213867f23f02dff63efaaa8c8", "score": "0.6364559", "text": "public function update(Request $request)\n {\n $session_id = session_id();\n\n // Check if session already exist\n $is_session_exist = Cart::where('session_id', '=', $session_id)->first();\n\n if (!$is_session_exist) {\n $cart = new Cart;\n $cart->session_id = $session_id;\n $cart->save();\n $cart_id = $cart->id;\n } else {\n $cart_id = $is_session_exist->id;\n }\n\n // Loop and insert all the cart items\n $post_data = $request->all();\n\n // Collection of current cart items\n $cart_item_product_ids = [];\n foreach ($post_data as $item) {\n // Find the item in if already exist, if so just update the quantity\n $is_item_in_cart = CartItem::where([\n ['cart_id', '=', $cart_id],\n ['product_id', '=', $item['product_id']]\n ])->first();\n\n if ($is_item_in_cart) {\n $is_item_in_cart->quantity = $item['quantity'];\n $is_item_in_cart->save();\n $cart_item_product_id = $is_item_in_cart->product_id;\n } else {\n $cart_item = new CartItem;\n $cart_item->cart_id = $cart_id;\n $cart_item->product_id = $item['product_id'];\n $cart_item->quantity = $item['quantity'];\n $cart_item->save();\n $cart_item_product_id = $cart_item->product_id;\n }\n\n $cart_item_product_ids[] = $cart_item_product_id;\n }\n\n // Delete product from cart_item\n CartItem::whereNotIn('product_id', $cart_item_product_ids)\n ->where('cart_id', '=', $cart_id)\n ->delete();\n }", "title": "" }, { "docid": "42606513e85173f2b9f184c116b5019f", "score": "0.6354647", "text": "public function action_update() {\r\n $quantity = $this->request->postWrap('qty');\r\n $productId = $this->request->postWrap('productId');\r\n $service = $this->pixie->cart;\r\n $service->setProductCount($productId, $quantity);\r\n\r\n $res = ['items_qty' => count($service), 'total_price' => $service->getTotalPrice()];\r\n $this->jsonResponse($res);\r\n }", "title": "" }, { "docid": "f3372273bf1c41feab85e7bd1c36c04e", "score": "0.6345659", "text": "public function update(Request $request){\n $automotiveParts = AutomotiveParts::find($request->id);\n $cart = collect($request->session()->get('cart'));\n\n if(!$automotiveParts)\n return response()->json(['error'=> 'produto não cadastrado']);\n\n $cart = collect($request->session()->get('cart'))->map(function($product, $index) use($request) {\n if($product['id'] == $request->id){\n $product['amount'] = $request->amount;\n return $product;\n }\n return $product;\n })->push(['total'=> $cart->sum(function($value){\n return $value['price'] * $value['amount'];\n })]);\n\n return $cart;\n }", "title": "" }, { "docid": "263928654f8ce413aecf6f560eed2140", "score": "0.6335234", "text": "protected function populate_cart()\n {\n $result_array=Service_ShoppingCart::generate_cart_content_with_prices($this->cart_products);\n // zajisteni likvidace kosiku pri nulove hodnote\n if($result_array[\"cart_prices\"][\"total_cart_price_with_tax\"]<=0) $this->flush();\n \n $this->full_products=$result_array[\"cart_products\"];\n $this->full_prices=$result_array[\"cart_prices\"];\n $this->total_items=$result_array[\"total_items\"];\n $this->session->set(\"total_\".$this->cart_name.\"_price_without_tax\",$result_array[\"cart_prices\"][\"total_cart_price_without_tax\"]);\n $this->session->set(\"total_\".$this->cart_name.\"_price_with_tax\",$result_array[\"cart_prices\"][\"total_cart_price_with_tax\"]);\n $this->session->set(\"total_\".$this->cart_name.\"_items\",$result_array[\"total_items\"]);\n\n }", "title": "" }, { "docid": "322c5b25b35239c4f02d93ce7ff4946a", "score": "0.63350654", "text": "public function updateCart(Request $request)\n {\n if($request->id && $request->quantity)\n {\n $cart = session()->get('cart');\n $sanpham = sanPham::findOrFail($request->id);\n\n if($sanpham->soluongton>=$request->quantity):\n $cart[$request->id][\"quantity\"] = $request->quantity;\n session()->put('cart', $cart);\n session()->flash('success', 'Cart updated successfully');\n else:\n session()->flash('errors', 'Tồn kho không đủ số lượng');\n endif;\n\n }\n }", "title": "" }, { "docid": "c31ee04b53897339eef5871cb6a80b23", "score": "0.63261807", "text": "private static function update_cart()\n {\n // Unset these so our total can be calculated correctly below.\n //\n unset( static::$cart_contents['total_items'] );\n unset( static::$cart_contents['cart_total'] );\n\n // Initiate the needed counters.\n //\n $total = 0;\n $items = 0;\n\n // Loop through the cart items.\n //\n foreach ( static::$cart_contents as $rowid => $item ):\n // Make sure the array contains the proper indexes.\n //\n if ( ! is_array($item) or ! isset($item['price']) or ! isset($item['qty']) ):\n continue;\n endif;\n\n // Calculations...\n //\n $total += ($item['price'] * $item['qty']);\n $items += $item['qty'];\n\n // Set the subtotal of this item.\n //\n static::$cart_contents[ $rowid ]['subtotal'] = (static::$cart_contents[ $rowid ]['price'] * static::$cart_contents[ $rowid ]['qty']);\n endforeach;\n\n // Set the cart total and total items.\n //\n static::$cart_contents['total_items'] = $items;\n static::$cart_contents['cart_total'] = $total;\n\n // Is our cart empty?\n //\n if ( count(static::$cart_contents) <= 2 ):\n // If so we delete it from the session\n //\n self::destroy();\n\n // Nothing more to do here...\n //\n return false;\n endif;\n\n // Update the cart session data.\n //\n Session::put( static::$config['session_name'], static::$cart_contents );\n\n // Success.\n //\n return true;\n }", "title": "" }, { "docid": "b21d180f0682ba068ad6e75167ec39e2", "score": "0.6313763", "text": "function hapus_cart($rowid){\n $data = array(\n 'rowid' => $rowid, \n 'qty' => 0, \n );\n $this->cart->update($data);\n redirect('sarpras/mutasi_masuk');\n}", "title": "" }, { "docid": "56663fe444f558b0c92ac7a5b7bd9926", "score": "0.6269323", "text": "public function updateCart($request, $id)\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n $productsInCart = request()->session()->get('cart');\n foreach($productsInCart as $productInCart)\n {\n if($productInCart->id == $id)\n {\n if($request->amount <= 0 || $request->amount == '')\n {\n $this->removeFromCart($id);\n }else\n {\n $productInCart->amount = $request->amount;\n }\n }\n }\n }", "title": "" }, { "docid": "440a2c52c5dd9b70ba73d4c6f10a2483", "score": "0.62527746", "text": "public function toggleWishlistAndcCart()\n {\n if ($this->request->exists('post')) {\n $data = $this->request->get();\n if ($data['csrftoken'] && $this->token->validateToken($data['csrftoken'], $data['frm_name'])) {\n $table = str_replace(' ', '', ucwords(str_replace('_', ' ', $data['table'])));\n $model = $this->container->make($table . 'Manager'::class);\n $model->assign($data);\n $method = isset($data['method']) ? $data['method'] : '';\n if ($output = $model->manage_user_cart($method)) {\n $this->jsonResponse(['result' => 'success', 'msg' => $output]);\n } else {\n $this->jsonResponse(['result' => 'error', 'msg' => '']);\n }\n }\n }\n }", "title": "" }, { "docid": "08cbb15c16651e61b04516113e408dee", "score": "0.6252093", "text": "public function manageCart(){\n $resp = $this->validateRequest();\n \n if($resp=='401')\n {\n $resp_arr = array('code'=>'400','success'=>false,'error'=>'authentication key is missing','data'=>null);\n }\n else\n {\n \n if(empty($_REQUEST['user_id']) || empty($_REQUEST['product_id']) || empty($_REQUEST['customid']) || empty($_REQUEST['quantity']))\n {\n $resp_arr = array('code'=>'400','success'=>false,'error'=>'required parameter is missing','data'=>null);\n }\n else\n {\n $product_id = $_REQUEST['product_id'];\n $quantity = $_REQUEST['quantity'];\n $user_id = $_REQUEST['user_id'];\n \n if ($_REQUEST['cart_session'] == '') \n {\n $this->Session->write('cart_process');\n $cart_session = $this->str_rand(15);\n } \n else \n {\n $cart_session = $_REQUEST['cart_session'];\n }\n \n \n $carts = $this->Shoppingcart->find('first', array('conditions' => array('product_id' => $product_id,'user_id'=>$user_id,'order_status_id'=>1),'order' => array('Shoppingcart.cart_id' => 'desc')));\n \n if(!empty($carts) && !empty($carts['Shoppingcart']['order_id']))\n {\n $order_status = $this->Order->find('first',array('conditions'=>array('order_id'=>$carts['Shoppingcart']['order_id'],'order_status_id != ' => 1)));\n \n if(!empty($order_status))\n {\n $carts = '';\n }\n }\n \n if (empty($carts)) \n {\n $product_id = $_REQUEST['product_id'];\n $customid = $_REQUEST['customid'];\n $user_id = $_REQUEST['user_id'];\n\n if(isset($_REQUEST['color']))\n {\n $color = $_REQUEST['color'];\n }\n\n if(isset($_REQUEST['size']))\n {\n $size = $_REQUEST['size'];\n }\n\n $product = $this->Product->find('first', array('conditions' => array('product_id' => $product_id)));\n $category = $this->Category->find('first', array('conditions' => array('category_id' => $product['Product']['category_id'])));\n $product_code = $category['Category']['category_code'].$product['Product']['product_code'];\n $productid = $product['Product']['product_id'];\n\n if(!empty($color))\n {\n $gcolor = $color;\n }\n else if(!empty($product['Product']['stone_color_id']))\n {\n $colors = $this->Color->find('first', array('conditions' => array('color_id' => $product['Product']['stone_color_id'])));\n $customid = $product['Product']['metal_purity'].\"K\".$colors['Color']['clarity'].\"-\".$colors['Color']['color'];\n $gcolor = $product['Product']['metal_color'];\n $product_code .= \" - \".str_replace(\"-\",\"\",$customid);\n }\n else\n {\n $customid = $product['Product']['metal_purity'].\"K\";\n $gcolor = $product['Product']['metal_color'];\n }\n\n //gold\n $propurity = $this->Productmetal->find('first', array('conditions' => array('product_id' => $productid, 'type' => 'Purity')));\n $material = explode(\"K\", $customid);\n\n $size_data = $this->Size->find('first', array('conditions' => array('goldpurity' => $material[0], 'category_id' => $category['Category']['category_id'], 'status' => 'Active')));\n\n if(!empty($size_data))\n {\n $size = 9;\n }\n\n if ($product['Product']['stone'] == 'Yes') \n {\n $diamond = $this->Productdiamond->find('all', array('conditions' => array('product_id' => $productid)));\n $this->set('diamonddetails', $diamond);\n }\n\n if ($product['Product']['gemstone'] == 'Yes') \n {\n $gemstone = $this->Productgemstone->find('all', array('conditions' => array('product_id' => $productid)));\n $this->set('sgemstone', $gemstone);\n }\n\n if (!empty($size)) \n {\n $product_wt = $product['Product']['metal_weight'];\n if ($category['Category']['category'] != \"Bangles\") {\n $t = '1';\n } else {\n $t = '0.125';\n }\n\n $minsize = $this->Productmetal->find('first', array('fields' => array('MIN(value) as minsizes'), 'conditions' => array('product_id' => $productid, 'type' => 'Size')));\n $minsizenew = $minsize[0]['minsizes'];\n if ($size == $minsizenew) {\n $add_wt = 0;\n } else {\n $nsize = $this->Size->find('first', array('conditions' => array('size_value BETWEEN ' . ($minsizenew + $t) . ' AND ' . $size, 'goldpurity' => $material[0], 'category_id' => $category['Category']['category_id'], 'status' => 'Active'), 'fields' => array('SUM(gold_diff) AS tot_wt')));\n\n $add_wt = $nsize[0]['tot_wt'];\n }\n $tot_weight = $product_wt + $add_wt;\n } \n else \n {\n $tot_weight = $product['Product']['metal_weight'];\n }\n\n if (!empty($gcolor)) {\n $mcolor = $this->Metalcolor->find('first', array('conditions' => array('metalcolor' => $gcolor, 'status' => 'Active')));\n //modified by prakash\n $goldprice = $this->Price->find('first', array('conditions' => array('metalcolor_id' => $mcolor['Metalcolor']['metalcolor_id'], 'metal_id' => '1', 'metal_fineness' => $product['Product']['metal_fineness'])));\n // echo $goldprice['Price']['price'];\n // exit;\n $gprice = !empty($goldprice['Price']['price']) ? $goldprice['Price']['price'] : 0;\n\n $gold_price = round(round($gprice * ($material[0] / 24)) * $tot_weight);\n // $gold_price = round(round($goldprice['Price']['price'] * ($material[0] / 24)) * $tot_weight);\n $purity = $material[0];\n $making_charge = $product['Product']['making_charge'];\n } else {\n $gold_price = '0';\n $making_charge = '0';\n $purity = '';\n }\n\n //diamond\n if (!empty($material[1])) {\n list($clarity, $color) = explode(\"-\", $material[1]);\n $stone_price = '0';\n $diamond_wt = '0';\n $stone_details = $this->Productdiamond->find('first', array('conditions' => array('clarity' => $clarity, 'color' => $color, 'product_id' => $productid), 'fields' => array('SUM(stone_weight) AS sweight', 'SUM(noofdiamonds) AS stone_nos')));\n $clarities = $this->Clarity->find('first', array('conditions' => array('clarity' => $clarity)));\n $colors = $this->Color->find('first', array('conditions' => array('color' => $color, 'clarity' => $clarity)));\n $stoneprice = $this->Price->find('first', array('conditions' => array('clarity_id' => $clarities['Clarity']['clarity_id'], 'color_id' => $colors['Color']['color_id'])));\n $stone_price = round($stoneprice['Price']['price'] * $stone_details['0']['sweight'], 0, PHP_ROUND_HALF_DOWN);\n $diamond_wt = $stone_details['0']['sweight'] / 5;\n $all_stone_details = $this->Productdiamond->find('all', array('conditions' => array('clarity' => $clarity, 'color' => $color, 'product_id' => $productid)));\n\n } else {\n $clarity = $color = '';\n $stone_price = '0';\n $diamond_wt = '0';\n }\n\n //gemstone\n if (!empty($gemstone)) {\n $gemprice = 0;\n $gemstone_wt = 0;\n foreach ($gemstone as $gemstones) {\n $stone = $this->Gemstone->find('first', array('conditions' => array('stone' => $gemstones['Productgemstone']['gemstone'])));\n $stone_shape = $this->Shape->find('first', array('conditions' => array('shape' => $gemstones['Productgemstone']['shape'])));\n $prices = $this->Price->find('first', array('conditions' => array('gemstone_id' => $stone['Gemstone']['gemstone_id'], 'gemstoneshape' => $stone_shape['Shape']['shape_id'])));\n $gemprice+=round($prices['Price']['price'] * $gemstones['Productgemstone']['stone_weight']);\n $gemstone_wt+=$gemstones['Productgemstone']['stone_weight'] / 5;\n }\n } else {\n $gemprice = '0';\n $gemstone_wt = '';\n }\n\n $sub_total = $gold_price + $stone_price + $gemprice;\n $making = 0;\n //addded by prakash\n if ($product['Product']['making_charge_calc'] == 'PER') {\n $making = round($gold_price * ($making_charge / 100), 0, PHP_ROUND_HALF_DOWN);\n } elseif ($product['Product']['making_charge_calc'] == 'INR') {\n $making = $making_charge;\n }\n $making = floatval($making);\n $vat = round(($sub_total + $making) * ($product['Product']['vat_cst'] / 100), 0, PHP_ROUND_HALF_DOWN);\n $total = $sub_total + $making + $vat;\n\n $total_weight = $tot_weight + $diamond_wt + $gemstone_wt;\n\n\n // echo $product_id.\" \".$product['Product']['metal'].\" \".$purity.\" \".$size.\" \".$clarity.\" \".$color.\" \".$product['Product']['metal_color'].\" \".$tot_weight.\" \".$quantity.\" \".$gold_price.\" \".$stone_price.\" \".$gemprice.\" \".$making.\" \".$vat;\n // // echo $gold_price.\" gold price \".$stone_price.\" stone price \".$total.\" sub total \".$sub_total.\" making \".$making;\n // exit;\n $vat_per = ($product['Product']['vat_cst'] / 100);\n \n $this->request->data['Shoppingcart']['cart_session'] = $cart_session;\n \n if(!empty($_REQUEST['order_id']))\n {\n $this->request->data['Shoppingcart']['order_id'] = $_REQUEST['order_id'];\n }\n \n $this->request->data['Shoppingcart']['product_id'] = $product_id;\n $this->request->data['Shoppingcart']['metal'] = $product['Product']['metal'];\n $this->request->data['Shoppingcart']['purity'] = $purity;\n $this->request->data['Shoppingcart']['size'] = $size;\n $this->request->data['Shoppingcart']['clarity'] = $clarity;\n $this->request->data['Shoppingcart']['color'] = $color;\n $this->request->data['Shoppingcart']['metalcolor'] = $product['Product']['metal_color'];\n $this->request->data['Shoppingcart']['weight'] = $tot_weight;\n $this->request->data['Shoppingcart']['quantity'] = $quantity;\n $this->request->data['Shoppingcart']['vat_per'] = $vat_per;\n $this->request->data['Shoppingcart']['vat'] = $vat;\n $this->request->data['Shoppingcart']['making_per'] = ($making_charge / 100);\n $this->request->data['Shoppingcart']['making_charge'] = $making;\n $this->request->data['Shoppingcart']['goldprice'] = $gprice;\n $this->request->data['Shoppingcart']['goldamount'] = $gold_price;\n $this->request->data['Shoppingcart']['stoneprice'] = (!empty($stoneprice['Price']['price']))?$stoneprice['Price']['price']:'';\n $this->request->data['Shoppingcart']['stoneamount'] = $stone_price;\n $this->request->data['Shoppingcart']['gemstoneamount'] = $gemprice;\n $this->request->data['Shoppingcart']['no_of_diamond'] = (!empty($_REQUEST['no_of_diamond']))?str_replace(\",\", '', $_REQUEST['no_of_diamond']):'';\n $this->request->data['Shoppingcart']['total'] = $total;\n $this->request->data['Shoppingcart']['user_id'] = $user_id;\n $this->request->data['Shoppingcart']['order_status_id'] = 1;\n $this->request->data['Shoppingcart']['created_date'] = date('Y-m-d H:i:s');\n \n $this->Shoppingcart->save($this->request->data);\n } \n else \n {\n // $this->request->data['Shoppingcart']['cart_id'] = $carts['Shoppingcart']['cart_id'];\n // $carts['Shoppingcart']['quantity'] = ($carts['Shoppingcart']['quantity']+$_REQUEST['quantity']);\n $carts['Shoppingcart']['quantity'] = $_REQUEST['quantity'];\n $this->Shoppingcart->save($carts);\n }\n \n if($this->Session->read('discount')!=''){\n $this->Order->updateAll(array('discount_per'=>NULL,'discount_amount'=>0),array('order_id'=>$this->Session->read('Order')));\n $this->Discounthistory->deleteAll(array('order_id'=>$this->Session->read('Order')),false,false,false);\n $this->Session->delete('discount');\n }\n \n \n if($this->Session->check('User.user_id')){\n $this->User->id = $this->Session->read('User.user_id');\n $this->User->saveField('cart_session', $cart_session);\n }\n \n $resp_arr = array('code'=>'200','success'=>'Cart updated successfully','error'=>false,'data'=>array('cart_session'=>$cart_session));\n }\n }\n \n $this->apiResponse($resp_arr);\n }", "title": "" }, { "docid": "a1775ece4b99be71e49d73f92ac01ecc", "score": "0.6247735", "text": "public function updateAction()\n {\n $result = $this->_getHelper()->updateCart($this->getRequest());\n if ($result['result'] === true) {\n Mage::getSingleton('checkout/session')->addSuccess($result['message']);\n } else {\n Mage::getSingleton('checkout/session')->addError($result['message']);\n }\n\n $this->_sendCartContentResponse(true);\n }", "title": "" }, { "docid": "ce0e5e5fbafea3d5867b47f1e311ce3c", "score": "0.6223194", "text": "public function updateCartItem(Request $request) {\n $rowId = $request->rowId;\n $qty = $request->qty;\n $aa = Cart::get($rowId);\n $minqty = $aa->options->minQty;\n if ($qty < $minqty) {\n $data['count'] = Cart::count();\n $data['total'] = Cart::total();\n $data['content'] = Cart::content();\n $data['fail'] = 1;\n return $data;\n } else {\n Cart::update($rowId, $qty);\n $data['count'] = Cart::count();\n $data['total'] = Cart::total();\n $data['content'] = Cart::content();\n $data['fail'] = 0;\n return $data;\n }\n\n// foreach ($items as $rowId => $qty) {\n// Cart::update($rowId, $qty);\n// }\n }", "title": "" }, { "docid": "c39e0df000a33ea2508f97fe0f1b8b1c", "score": "0.6219818", "text": "protected function _updateShoppingCart()\n {\n try {\n $cartData = $this->getRequest()->getParam('cart');\n if (is_array($cartData)) {\n if (!$this->cart->getCustomerSession()->getCustomerId() && $this->cart->getQuote()->getCustomerId()) {\n $this->cart->getQuote()->setCustomerId(null);\n }\n $cartData = $this->quantityProcessor->process($cartData);\n $cartData = $this->cart->suggestItemsQty($cartData);\n $this->cart->updateItems($cartData)->save();\n }\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->messageManager->addErrorMessage(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($e->getMessage())\n );\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage($e, __('We can\\'t update the shopping cart.'));\n $this->_objectManager->get(\\Psr\\Log\\LoggerInterface::class)->critical($e);\n }\n }", "title": "" }, { "docid": "93f4b836f14f943f25ed373449d7e2fb", "score": "0.62129694", "text": "public function setCart()\n {\n }", "title": "" }, { "docid": "a1a4f20300ffa4dbac0e97b0a5dce9f7", "score": "0.6209859", "text": "public function updateCart(Array $data, Form $form) {\n\n\t\t$this->saveCart($data, $form);\n\t\t$this->controller->redirectBack();\n\t}", "title": "" }, { "docid": "b0076cb6d109495a41a229620f992b15", "score": "0.6189144", "text": "public function update(Request $request)\n {\n $cart = [];\n\n foreach ($request->cart as $item) {\n $type = $item['item_type'];\n if ($product = $type::find($item['item_id'])) {\n $cart[$product->getMorphClass().$product->id]['item_id'] = $product->id;\n $cart[$product->getMorphClass().$product->id]['item_type'] = $product->getMorphClass();\n $cart[$product->getMorphClass().$product->id]['qty'] = (int) $item['qty'] ?? 1;\n }\n }\n\n session()->put('cart', $cart);\n\n return back();\n }", "title": "" }, { "docid": "398490350b72a91524c63e4c3b340cb4", "score": "0.6166096", "text": "public function updateCart($key=\"\", $item=\"\", $qty=\"\") {\n $model = explode(\"_\", $item);\n \n $temp;\n\t\t\t$_SESSION['Temp']=0;\n\t\t\t$myNewItems = \"\";\n\t\t\t$temparray=array();\n \t\t$x=1;\n \n \t\t/* Create an array of our items grouped by the qty. */\n\t\t foreach($_SESSION['cart']['items'] as $c => $i) {\n\t \t\t$code = $i['model'];\n\t \t\t$model = $i['model'];\n\t \t\t$version = $i['version'];\n\t \t\t$color = $i['color'];\n $type = $i['type'];\n $orderno = $i['order_no'];\n\t \t\t\n\t \t\tif(@is_array($temparray[$code][$model][$version][$color][$type][$orderno])) {\n\t \t\t\t$temparray[$code][$model][$version][$color][$type][$orderno]['qty']=$temparray[$code][$model][$version][$color][$type][$orderno]['qty']+1;\n\t \t\t} else {\n\t \t\t\t$temparray[$code][$model][$version][$color][$type][$orderno]['qty']=1;\n\t \t\t\t$temparray[$code][$model][$version][$color][$type][$orderno]['qty']=1;\n\t \t\t}\n\t\t }\n \n \n foreach($temparray as $c => $prod) {\n\t\t \tforeach($prod as $n => $p) {\n\t\t \t\tforeach ($p as $k => $v) {\n\t\t \t\t foreach ($v as $t => $u) {\n\t\t \t\t foreach ($u as $m => $n) {\n \t\t \t\t\tforeach($n as $x=>$y) {\n \t\t\t \t\t\t$farray[] = array(\n \t\t\t \t\t\t\t\t'code' => $c,\n \t\t\t\t\t\t\t\t\t'model' => $c,\n \t\t\t\t\t\t\t\t\t'version' => $k,\n \t\t\t\t\t\t\t\t\t'color' => $t,\n 'type' => $m,\n 'order_no' => $x,\n \t\t\t\t\t\t\t\t\t'qty' => $y['qty'],\n \t\t\t\t\t\t\t);\n \t\t\t\t\t\t}\n }\n }\n\t\t \t\t}\n\t\t \t}\t\n\t\t }\n \n /* Find our bike which we want to add qty to based on the key based in and update the qty qith the wty passed in */ \n foreach ($farray as $k => $i) {\n\t\t\t\t\n\t\t\t\tif($k == $key) {\n\t\t\t\t\t$narray[$k] = array(\n 'model' => $i['code'], \n\t\t\t\t\t\t 'version' => $i['version'],\n\t\t\t\t\t\t\t'color' => $i['color'],\n 'type' => $i['type'],\n 'order_no' => $i['order_no'],\n\t\t\t\t\t\t\t'qty' => $qty,\n\t\t\t\t\t\t\t'key' => $k,\n\t\t\t\t\t);\t\n\t\t\t\t} else{\n\t\t\t\t\t$narray[$k] = array(\n 'model' => $i['code'], \n\t\t\t\t\t\t 'version' => $i['version'],\n\t\t\t\t\t\t\t'color' => $i['color'],\n 'type' => $i['type'],\n 'order_no' => $i['order_no'],\n\t\t\t\t\t\t\t'qty' => $i['qty'],\n\t\t\t\t\t\t\t'key' => $k,\n\t\t\t\t\t);\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n \n /* Break the array back down into individual items based on qty */ \n sort($narray);\n\t\t\tforeach($narray as $i) {\n\t\t\t\tfor($x=0; $x<$i['qty']; $x++) {\n\t\t\t\t\t$myNewItems[] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'model' => $i['model'],\n\t\t\t\t\t\t\t\t\t\t\t\t \t'version' => $i['version'],\n\t\t\t\t\t\t\t\t\t\t\t\t \t'color' => $i['color'],\n 'type' => $i['type'],\n 'order_no' => $i['order_no'],\n 'qty' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t );\t\n\t\t\t\t}\n\t\t\t}\n \n unset($_SESSION['cart']['items']);\n\t\t\t$_SESSION['cart']['items'] = $myNewItems; \n \n $this->updateDBCart(); \n }", "title": "" }, { "docid": "1bd45f27df17b9e3cba1d5eb03d99e33", "score": "0.61655617", "text": "public function updateProducts(){\n \n MPCController::setJSONcacheTable('items_data_init');\n MPCController::setJSONcacheProduct();\n\n }", "title": "" }, { "docid": "c3798bc53be64bde01d6e92af67144ed", "score": "0.6161483", "text": "public function update(Request $request)\n {\n $item = Cart::instance('saveForLater')->get($request->id);\n \n Cart::update($request->id, $request->quantity);\n \n $response = [\n\n 'status' => 1,\n 'message' => 'suc',\n 'data' => $request->id,\n \n ];\n \n return response()->json($response);\n // flash()->success(\" المنتج الذي اسمه \" . $item->name . \" أصبحت كميته \" . $request->quantity);\n \n \n }", "title": "" }, { "docid": "968d864f648c6d38346af24ba6c8485a", "score": "0.61601615", "text": "public function updateAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n $bid=$_POST['bid'];\r\n $uid=$_POST['uid'];\r\n $bookrepo=$this->getDoctrine()->getRepository('BookstoreBundle:Book');\r\n $book=$bookrepo->findByBid($bid);\r\n $cartbook = $em->find(\"BookstoreBundle:Cart\", array(\"uid\"=>$uid,\"book\"=>$book[0]));\r\n if($_POST['qty']==0){\r\n $em->remove($cartbook);\r\n }else{\r\n $cartbook->setQty($_POST['qty']);\r\n }\r\n $em->flush();\r\n return $this->redirect($this->generateUrl('view_cart',array(\r\n 'status'=>true\r\n )));\r\n }", "title": "" }, { "docid": "a1e0988851c22b3f577da1c79ee1d367", "score": "0.6154532", "text": "public function update(Request $request)\n {\n // $request->validate([])\n if($request->qunt)\n {\n $i=0;\n foreach($request->qunt as $q)\n {\n\n \\Cart::update($request->prodCart[$i], array(\n 'quantity' => array(\n 'relative' => false,\n 'value' => $q\n ),\n ));\n $i++;\n }\n return back();\n \n }\n }", "title": "" }, { "docid": "b4832481ff738e44e26b5d1503a0640b", "score": "0.615113", "text": "public function addToCart(){\n //create a session to store the product object and the quantity.\n //if the object has the same Id, Add the new quantity.\n }", "title": "" }, { "docid": "25280d7f63fea7c4be9e8cfba4864a26", "score": "0.6143789", "text": "private function saveCart(Array $data, Form $form) {\n\t\t$currentOrder = Cart::get_current_order();\n\t\t$quantities = (isset($data['Quantity'])) ?$data['Quantity'] :null;\n\n\t\tif ($quantities) foreach ($quantities as $itemID => $quantity) {\n\n\t\t\tif ($item = $currentOrder->Items()->find('ID', $itemID)) {\n\t\t\t\tif ($quantity == 0) {\n\n\t\t\t\t\tSS_Log::log(new Exception(print_r($item->toMap(), true)), SS_Log::NOTICE);\n\n\t\t\t\t\t$item->delete();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$item->Quantity = $quantity;\n\t\t\t\t\t$item->write();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$currentOrder->updateTotal();\n\t}", "title": "" }, { "docid": "fb6b72320579431f70719748d70defb4", "score": "0.6142586", "text": "public function changeInCart()\n { \n $this->quantity = intval($this->post_data['quantity']);\n $this->id = intval($this->post_data['id']); \n \n //odebrani z kosiku\n if($this->quantity === 0)\n {\n unset($_SESSION[\"cart_products\"][$this->id]);\n $this->info = $_SESSION['info'] = \"Produkt byl odebrán z košíku.\";\n $this->redirect('kosik/');\n exit;\n } \n \n //pridani nebo uprava poctu kusu v kosiku\n if(!isset($_SESSION[\"cart_products\"][$this->id]))\n {\n $product = parent::$db->getRowByID(\"product\", $this->id);\n if(!empty($product)){\n $_SESSION[\"cart_products\"][$this->id] = $product; \n }\n } \n \n $_SESSION[\"cart_products\"][$this->id][\"quantity\"] = $this->quantity;\n $this->source = $this->post_data['source']; \n \n if(($this->source === \"kosik\") or ($this->source === \"cart\"))\n {\n $this->info = \"Počet byl upraven.\";\n $_SESSION['info'] = $this->info;\n $this->redirect('kosik/');\n }\n else\n { \n $this->info = \"Produkt byl přidán do košíku.\";\n $_SESSION['info'] = $this->info; \n $this->redirect('/'); \n } \n }", "title": "" }, { "docid": "69d93839097d3935d635d39704a879b0", "score": "0.613679", "text": "public static function action_cart_update_qty() {\n $id_product_key = $_POST['id_product_key'];\n $qty = max( absint( $_POST['qty'] ), 1 );\n $new_qty = WPXSmartShopShoppingCart::updateProductQuantity( $id_product_key, $qty );\n $content = WPXSmartShopShoppingCart::cart();\n\n $json = array(\n 'content' => $content\n );\n\n /* @todo Da completare */\n if ( is_wp_error( $new_qty ) ) {\n /* @todo Aggiungere filtro */\n $json['message'] = $new_qty->get_error_message();\n }\n echo json_encode( $json );\n\n die();\n }", "title": "" }, { "docid": "5e01d70dfb7628a39ac6b9537facb788", "score": "0.612565", "text": "public function update(Request $request, $id)\n {\n //\n if ($request->qty >= 1) {\n foreach (Cart::content() as $item) {\n if ($item->id == $id) {\n Cart::update($item->rowId, ['qty' => $request->qty]);\n break;\n }\n //print_r($item);\n }\n Session::flash('add_cart', 'Cap nhap so luong thanh cong');\n } else {\n Session::flash('add_cart', 'So luong phai >=1');\n }\n return redirect('cart');\n }", "title": "" }, { "docid": "74b1ab906d87602baad27335ebf83dde", "score": "0.61213213", "text": "public function updateCart(Request $request)\n {\n $cart = Session::get('cart');\n $id = $request->get('id');\n $quantity = $request->get('quantity');\n $grandTotal = 0;\n if (isset($cart[$id])) {\n $cart[$id]['quantity'] = $quantity;\n $cart[$id]['total'] = $quantity * $cart[$id]['price'];\n foreach($cart as $item) {\n $grandTotal += $item['total'];\n }\n view()->share('grandTotal',$grandTotal);\n session()->put('cart', $cart);\n }\n $output = array(\n 'cart' => $cart,\n 'grandTotal' => $grandTotal,\n );\n echo json_encode($output);\n }", "title": "" }, { "docid": "82702c2815fdf985d002fe1bbc1b06e8", "score": "0.61196345", "text": "function updateQtyCart($newQty, $key){\n\t\t\t\t$cartItem = new CartItem($_POST[\"product_code\"], $_POST[\"product_name\"], $_POST[\"product_price\"], $newQty);\n\t\t\t\t//substitute the old element with the new\n\t\t\t\t$_SESSION[\"products\"] [$key] = serialize($cartItem);\n\t\n\t\t\t\t//here we can print the cart\n\t\t\t}", "title": "" }, { "docid": "adefadd78f0722385f3b8b45f6115b37", "score": "0.6074149", "text": "public function addAllToCart() {\n $idShoppingList = Tools::getValue('id_shopping_list');\n $shoppingListObj = ShoppingListObject::loadByIdAndCustomer($idShoppingList, $this->context->cookie->id_customer);\n $products = $shoppingListObj->getAllProducts();\n \n foreach($products as $product) {\n $this->updateProductInCart($idShoppingList, $product['id_product'], $product['id_product_attribute']);\n }\n\n $this->indexShoppingListProduct($idShoppingList);\n }", "title": "" }, { "docid": "8cd6f9d88a02a4fa345d7a366ba53317", "score": "0.6073832", "text": "function hapus_cart_rusak($rowid){\n $data = array(\n 'rowid' => $rowid, \n 'qty' => 0, \n );\n $this->cart->update($data);\n redirect('sarpras/mutasi_rusak');\n}", "title": "" }, { "docid": "a0e9dd0599bc77b3d9910256347eb301", "score": "0.6060349", "text": "public function update(Request $request, Cart $cart)\n {\n $digit=0;\n foreach ($request->qty as $item) {\n $payAmount=$request->qty[$digit]*$request->price[$digit];\n $qty=$request->qty[$digit];\n $cartId=$request->cartId[$digit];\n $price=$request->price[$digit];\n if ($qty==0) {\n Cart::where('id',$cartId)->delete();\n } else {\n Cart::where('id',$cartId)->update([\n 'quantity'=>$qty,\n 'totalAmount'=>$payAmount,\n 'payableAmount'=>$payAmount\n ]);\n }\n \n $digit=$digit+1;\n }\n return redirect()->back()->with('success','Cart updated successfully');\n }", "title": "" }, { "docid": "7e064264cd273a351e7f3188d51b945d", "score": "0.60595876", "text": "public function addProductCart($id){\n $product = product::find($id);\n $cart = \\Cart::session(Auth()->id())->getContent();\n $cek_itemId = $cart->whereIn('id', $id);\n\n if($cek_itemId->isNotEmpty()){\n if($product->qty == $cek_itemId[$id]->quantity){\n return redirect()->back()->with('Error','Jumlah Item Kurang');\n }\n else{\n \\Cart::session(Auth()->id())->update($id, array(\n 'quantity'=> 1));\n }\n } else{\n \\Cart::session(Auth()->id())->add(array(\n 'id'=>$id,\n 'nama'=> $product->nama,\n 'harga'=> $product->harga,\n 'quantity'=> 1,\n 'attributes'=> array(\n 'created_at'=> date('Y-m-d H:i:s'))\n ));\n }\n\n return redirect()->back();\n\n }", "title": "" }, { "docid": "aa323d15fc0e415445b93c2ed4a46a0b", "score": "0.6047993", "text": "public function write_cart() {\n\t\tif ( isset($_SESSION['validuser']) AND $_SESSION['validuser'] AND isset($_SESSION['cart']) ) {\n\n\t\t\t$max=count($_SESSION['cart']);\n\t\t\t$cid = $_SESSION['custid'];\n\t\t\t//if( $cidexist = mysql_fetch_assoc($check) ){ //not needed\n\t\t\t\n\t\t\tfor($i=0;$i<$max;$i++){\n\t\t\t\t$qty = $_SESSION['cart'][$i]['qty'];\n\t\t\t\t$pid = $_SESSION['cart'][$i]['productid'];\n\t\t\t\t\n\t\t\t\t$price = $this->store_model->get_price($pid);\n\t\t\t\t$sqlpidcheck = \"SELECT pID FROM shoppingcart WHERE custid='$cid' AND pID='$pid'\";\n\t\t\t\t//$checkpid = mysql_query($sqlpidcheck) or die($sqlpidcheck.\"<br/><br/>\".mysql_error());\n\t\t\t\t$checkpid = $this->db->query($sqlpidcheck);\n\t\t\t\t\n\n\t\t\t\t//if( $pidexist = mysql_fetch_assoc($checkpid) ){\n\t\t\t\tif( $checkpid->num_rows > 0 ) {\n\t\t\t\t\t$sql = \"UPDATE shoppingcart SET pquantity='$qty', pPrice='$price' WHERE custid='$cid' AND pID='$pid'\";\n\t\t\t\t\t//echo 'UPDATE TABLE: check:'.$sqlpidcheck.' || update:'.$sql.'<br/>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$sql = \"INSERT INTO shoppingcart (pquantity, pID, custid, pPrice) VALUES ('$qty', '$pid', '$cid', '$price')\";\n\t\t\t\t\t//echo 'NEW INSERT: check:'.$sqlpidcheck.' || insert:'.$sql.'<br/>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$result=mysql_query($sql) or die($sql.\"<br/><br/>\".mysql_error());\n\t\t\t\t$result = $this->db->query($sql);\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "0b7b2de489edbef3d73bc78863378601", "score": "0.60372746", "text": "private function attachCartProducts(){\n\t\tforeach($this->cart['cart'] as $product => $data){\n\t\t\t$this->attachCartProduct($product,$data['quantity']);\n\t\t}\n\t}", "title": "" }, { "docid": "fa354725778fc32aa28727218d4b28dd", "score": "0.6036169", "text": "public function payment(Request $request){\n \n $invoices_id = Invoice::where('status',0)->value('invoice_id');\n $invoice_status_update = Invoice::where('invoice_id',$invoices_id)->update(['status' => 1]);\n Session::put('invoices_id',$invoices_id);\n \n $hashed_invoices_id = \\Hashids::encode($invoices_id);\n /*\n |\n |--- Adding data from session cart to main cart\n |\n */\n $cart_data = Session::get('cart');\n \n \n //dd(count($cart_data));\n if(count($cart_data) <=1){\n $cart = new Cart();\n $cart->invoices_id = $invoices_id;\n $cart->products_id = $cart_data[0]['products_id'];\n $cart->colors_id = $cart_data[0]['colors_id'];\n $cart->sizes_id = $cart_data[0]['sizes_id'];\n $cart->quantity = $cart_data[0]['quantity'];\n $cart->sub_total = $cart_data[0]['sub_total'];\n $cart->save();\n }else{\n foreach($cart_data as $value){\n $cart = new Cart();\n $cart->invoices_id = $invoices_id;\n $cart->products_id = $value['products_id'];\n $cart->colors_id = $value['colors_id'];\n $cart->sizes_id = $value['sizes_id'];\n $cart->quantity = $value['quantity'];\n $cart->sub_total = $value['sub_total'];\n $cart->save();\n }\n }\n /*\n |\n |--- Updating Inventory data\n |\n */\n foreach($cart_data as $value){\n $new_quantity = $value['product_variations_quantity'] - $value['quantity'];\n $update_quantity = ProductVariation::where('id',$value['product_variations_id'])->update(['quantity'=>$new_quantity]); \n }\n /*\n |\n |--- Adding data in Order Table\n |\n */\n $sub_total= intval($request->sub_total);\n $shipping= $request->shipping;\n $discount = $request->discount;\n $order_total = $request->order_total;\n $billing_address = $request->billing_first_name.\" \".$request->billing_last_name.\"<br>\".$request->billing_your_address.\"<br>\".$request->billing_second_address.\"<br>\".$request->billing_your_email.\"<br>\".$request->billing_phone_number;\n $shipping_address =$request->shipping_first_name.\" \".$request->shipping_last_name.\"<br>\".$request->shipping_your_address.\"<br>\".$request->shipping_second_address.\"<br>\".$request->shipping_your_email.\"<br>\".$request->shipping_phone_number;\n $payment_method =$request->payment_method;\n $order_status = \"Payment Processing\";\n \n $new_order = new Order;\n $new_order->invoices_id = $invoices_id ;\n $new_order->sub_total = $sub_total;\n $new_order->shipping = $shipping;\n if ($discount != null) {\n $new_order->discount = $discount;\n }\n $new_order->order_total = $order_total;\n $new_order->billing_address = $billing_address;\n $new_order->shipping_address = $shipping_address;\n $new_order->payment_method = $payment_method;\n $new_order->order_status = $order_status;\n \n $place_order = $new_order->save();\n \n \n if($place_order){\n \n \n if($new_order->payment_method ==\"online\"){\n /*---------------------------------------------------------*/\n \t$ch = curl_init();\n\t \n $options = array( 'Merchant_Username'=>'spaytest', 'Merchant_password'=>'pass1234'); \n \t$uniq_transaction_key='NOK'.time();//Given By Shurjumukhi Limited \n \t$amount=$new_order->order_total;\n \t$clientIP = '127.0.0.1';//getRealIpAddr();// $_SERVER['REMOTE_ADDR'];exit(\"IP\");\n \t\t\t\t\n \t$xml_data = 'spdata=<?xml version=\"1.0\" encoding=\"utf-8\"?>\n \t\t\t\t<shurjoPay><merchantName>'.$options['Merchant_Username'].'</merchantName>\n \t\t\t\t<merchantPass>'.$options['Merchant_password'].'</merchantPass>\n \t\t\t\t<userIP>'.$clientIP.'</userIP>\n \t\t\t\t<uniqID>'.$uniq_transaction_key.'</uniqID>\n \t\t\t\t<totalAmount>'.$amount.'</totalAmount>\n \t\t\t\t<paymentOption>shurjopay</paymentOption>\t\t\t\t\t\t\t\t\n \t\t\t\t<returnURL>https://maroon-akandshuvo.c9users.io/paymentreturn</returnURL></shurjoPay>'; \t\t\t\n \t$url = \"https://shurjotest.com/sp-data.php\"; \n \t\n \t\n \t\n \t curl_setopt($ch,CURLOPT_URL,$url);\n \t curl_setopt($ch,CURLOPT_POST, 1); //0 for a get request\n \t curl_setopt($ch,CURLOPT_POSTFIELDS,$xml_data);\n \t curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n \t curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3);\n \t curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n \t $response = curl_exec($ch);\n \t print_r($response);\n \t curl_close ($ch);\n /*--------------------------------------------------------------*/\n Session::put('shipping_phone_number',$request->shipping_phone_number);\n Session::put('order_total',$request->order_total);\n /*-------------------------------------------------------------*/\n \t \n \t \n \t \n }\n \n \n if($new_order->payment_method ==\"cash\"){\n /*\n |\n |--- Adding data from session cart to main cart\n |\n */\n /*\n $cart_data = Session::get('cart');\n foreach($cart_data as $value){\n $cart = new Cart();\n $cart->invoices_id = $invoices_id;\n $cart->products_id = $value['products_id'];\n $cart->colors_id = $value['colors_id'];\n $cart->sizes_id = $value['sizes_id'];\n $cart->quantity = $value['quantity'];\n $cart->sub_total = $value['sub_total'];\n $cart->save();\n }\n */\n /*\n |\n |--- Updating Inventory data\n |\n */\n foreach($cart_data as $value){\n $new_quantity = $value['product_variations_quantity'] - $value['quantity'];\n $update_quantity = ProductVariation::where('id',$value['product_variations_id'])->update(['quantity'=>$new_quantity]); \n }\n /*\n |\n |---Update Order Status\n |\n */\n $order_status = \"Cash on delivery\";\n $update_order_status = Order::where('invoices_id',$invoices_id)->update(['order_status'=>$order_status]); \n \n /*\n |\n |---SENDING SMS\n |\n */\n /*\n $message = $invoices_id;\n \t\t\t$url=\"http://api.boom-cast.com/boomcast/WebFramework/boomCastWebService/externalApiSendTextMessage.php?masking=NOMASK&userName=01534653592&password=8d2ab8d870266d4a1e03029bd616d54e&MsgType=TEXT&receiver=8801534653592&message=\".$message; \n \t\t\t$crl = curl_init(); \n \t\t\tcurl_setopt($crl,CURLOPT_SSL_VERIFYPEER,FALSE); \n \t\t\tcurl_setopt($crl,CURLOPT_SSL_VERIFYHOST,2); \n \t\t\tcurl_setopt($crl,CURLOPT_URL,$url); \n \t\t\tcurl_setopt($crl,CURLOPT_HEADER,0); \n \t\t\tcurl_setopt($crl,CURLOPT_RETURNTRANSFER,1); \n \t\t\tcurl_setopt($crl,CURLOPT_POST,1); \n \t\t\t$response = curl_exec($crl); \n \t\t\tcurl_close($crl); \n \t\t\techo \"<pre>\".$response.\"</pre>\"; \n /*\n |\n |---SENDING EMAIL\n |\n */\n \n //dd($request->billing_email);\n $mail = $request->billing_email;\n $name = $request->billing_first_name.$request->billing_last_name;\n $data = array('name'=>$name,\"invoice\"=>$invoices_id,\"invoice_encrypted\"=>$hashed_invoices_id);\n\n \n// Mail::send(['text'=>'purchasemail'], $data, function($message) use($mail,$name) {\n// $message->to($mail, $name)->subject('Thank you for Purchasing from MAROON');\n// $message->from('[email protected]','MAROON-House of Attire');\n// });\n \n /*\n |\n |--- Flushing session data of a specific key\n |\n */\n Session::flush('cart');\n Session::flush('invoices_id');\n \n /*\n |\n |--- Hashing Invoice ID for Security\n |--- Redirecting to invoice Page\n |\n */\n \n \n return redirect('invoice/'.$hashed_invoices_id);\n }\n \n }\n \n }", "title": "" }, { "docid": "d1a570612d44c57bf33f9307493c7256", "score": "0.60342366", "text": "function updateProduct($item)\n\t\t{\n\t\t\techo \"enter update function....\";\n\n\t\t\tif(isset($_SESSION['cart'])==true)\n\t\t\t{\n\t\t\t\t$cart=$_SESSION['cart'];\n\t\t\t\tforeach ($cart as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif($item == $val['id'])\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \" updates the quantity of the item\";\n\t\t\t\t\t\t$cart[$key]['quantity']+=1;\n\t\t\t\t\t\t$cost = $cart[$k]['price']*$cart[$k]['quantity'];\n\t\t\t\t\t\techo \"update total price = \".$cost;\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $cart;\n\t\t\t}\n\t\t\telse return 0;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3f4f0a2146e8709a1fcd1ce55de4e52b", "score": "0.6024462", "text": "function update_cart()\n{\n\tglobal $db;\n\tif(isset($_POST['update']))\n\t{\n\t\tforeach ($_POST['remove'] as $remove_id) \n\t\t{\n\t\t $delete_product=\"delete * from cart where p_id='$remove_id'\";\n\t\t $run_delete=mysqli_query($db,$delete_product);\n\t\t if($run_delete)\n\t\t {\n\t\t \techo \"<script>window.open('cart.php','self')</script>\";\n\t\t }\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f9268264127ee04ce02740a396d4244d", "score": "0.6012047", "text": "public function increaseProductInShoppingCart(){\n $id = $this->request->GET(\"id\");\n\n if($this->shoppingCart != \"\"){\n if($this->shoppingCart->checkProductInShoppingCart($id)){\n $this->shoppingCart->increaseAmountOfProduct($id);\n $this->request->setSESSION(\"shoppingCart\", serialize($this->shoppingCart));\n }\n }\n header(\"Location: http://Localhost/WebundMultimedia/shoppingcart\");\n die();\n }", "title": "" }, { "docid": "07250d77260b6b5356c90b0b36352483", "score": "0.60022104", "text": "public function update()\n {\n $rowId = Input::get('rowid');\n $update_success = Cart::update($rowId, array('qty' => Input::get('qty')));\n if (!$update_success)\n {\n return Redirect::back()\n -> withErrors(\"There is something wrong.\");\n }\n }", "title": "" }, { "docid": "c9ae3c325db6d418311594024ca5d931", "score": "0.59861064", "text": "public function updateCart($id, $qty){\n return $id;\n $products = new Product;\n $userId = auth()->user()->id; // or any string represents user identifier\n\n // add cart items to a specific user\n Cart::session($userId)->update($product->id, $product->name, $product->sale_price, $qty,[\n 'image' => $product->image_name\n ]);\n\n }", "title": "" }, { "docid": "f57f42751978bb36173e219642a7254f", "score": "0.5982298", "text": "public function addToCart($id)\n {\n\n $user = User::where('user_id',Auth()->user()->user_id)->first();\n $product = Product::findOrFail($id);\n $price = Product::findOrFail($id)->price()->where('price_level' , $user->member_type)->first();\n\n $systemcart = session()->get('systemcart', []);\n \n if(isset($systemcart[$id])) {\n $systemcart[$id]['quantity']++;\n } else {\n $systemcart[$id] = [\n \"name\" => $product->name,\n \"quantity\" => 1,\n \"price\" => $price->price,\n \"image\" => $product->image\n ];\n }\n \n session()->put('systemcart', $systemcart);\n return redirect()->back()->with('success', 'Produk berjaya ditambahkan ke troli!');\n \n }", "title": "" }, { "docid": "968a55b37df0c79b7f196cf84a2be32d", "score": "0.59803694", "text": "public function saveCarts(Request $request)\n {\n $tblcart = new OderModel([\n 'order_name' => $request->order_name,\n 'order_address' => $request->order_address,\n 'order_email' => $request->order_email,\n 'order_phone' => $request->order_phone,\n 'order_note' => $request->order_note,\n 'totalMoney' => $request->totalMoney,\n 'payment_status' => $request->payment_status,\n ]);\n try {\n $tblcart->save();\n // return response()->json([\"data\" => $tblcart, \"success\" => true], 200);\n\n $items = json_decode($request->getContent(), true);\n foreach ($request->carts as $key => $value) {\n $value = (object) $value;\n $tblinfocart = new OderDetailModel([\n 'product_id' => $value->id,\n 'order_id' => $tblcart->id,\n 'quantity' => $value->quantity,\n ]);\n // dd($tblinfocart);\n $product = OderModel::where('id', $value->id);\n $product->update(['quantity' => ($product->first()->quantity) - ($value->quantity)]);\n $tblinfocart->save();\n }\n\n return response()->json([\"data\" => $tblcart, \"success\" => true], 200);\n } catch (QueryException $ex) { // User not found\n return response()->json([\"error\" => $ex->getMessage(), \"success\" => false], 200);\n }\n\n // $tblinfocart->save();\n // dd($tblcart);\n return response()->json([\n 'id' => $tblcart,\n 'message' => 'Successfully!'\n ], 200);\n $tblinfocart = new OderDetailModel([\n 'product_id' => $value->id,\n 'order_id' => $tblcart->id,\n 'quantity' => $value->quantity,\n ]);\n\n $tblcart->save();\n return response()->json([\n 'id' => $tblcart->id,\n 'message' => 'Successfully!'\n ], 200);\n }", "title": "" }, { "docid": "39d7930beb904b190a991e7f74f8470f", "score": "0.59743136", "text": "public function increment()\n {\n $prods = Products::all();\n\n if (Request::isMethod('post')) \n {\n $product_id = Request::get('product_id');\n $product = Products::find($product_id);\n Cart::add(array('id' => $product_id, 'name' => $product->name, 'qty' => 1, 'price' => $product->price));\n }\n\n //increment the quantity\n if (Request::get('product_id') && (Request::get('increment')) == 1) \n {\n $item = Cart::search(function($key, $value) { return $key->id == Request::get('product_id'); })->first();\n Cart::update($item->rowId, $item->qty + 1);\n }\n\n\n //decrease the quantity\n if (Request::get('product_id') && (Request::get('decrease')) == 1) \n {\n $item = Cart::search(function($key, $value) { return $key->id == Request::get('product_id'); })->first();\n Cart::update($item->rowId, $item->qty - 1);\n }\n\n $cart = Cart::content();\n\n return view('order.menu',['prods' => $prods], array('cart' => $cart));\n }", "title": "" }, { "docid": "337ff1fc6c4e2b16b1a082f490e8beae", "score": "0.59734917", "text": "public function updateProductQty(Request $request)\n {\n //cand nu este logat\n if ($request->id) {\n \\Cart::remove($request->id);\n if (Auth::check()) {\n $id = \\Auth::user()->id;//id'ul lui\n $cartIdentifier = DB::table('shoppingcart')->select('identifier')->where('identifier', '=', 1)->first();\n if ($cartIdentifier) {\n //exista deja, trebuie updatat\n DB::table('shoppingcart')->where('identifier', $cartIdentifier->identifier)->delete();//stergem\n \\Cart::store(\\Auth::user()->id);//adaugam iar\n } else {\n //cazul cand o fost luat din db, si trebuie adaugat iar\n \\Cart::store(\\Auth::user()->id);\n }\n }\n /* \\Cart::remove('c42f6beec9c93fd6afea6eb0684aa99');*/\n }\n\n $product = Product::where('id', $request->idProd)->first();\n if ($product) {\n if ($product->quantity > $request->quantity) { // daca cantitatea introdusa de user ii mai mare decat cantitatea prod din db ii dam maximul din db\n \\Cart::add($product->id, $product->title, $request->quantity, $product->price);\n }\n else {\n \\Cart::add($product->id, $product->title, $product->quantity, $product->price);\n }\n\n /// verificam daca trebuie salvat noul cart in db\n if (Auth::check()) {\n $id = \\Auth::user()->id;//id'ul lui\n $cartIdentifier = DB::table('shoppingcart')->select('identifier')->where('identifier', '=', $id)->first();\n if ($cartIdentifier) {\n //exista deja, trebuie updatat\n DB::table('shoppingcart')->where('identifier', $cartIdentifier->identifier)->delete();//stergem\n \\Cart::store(\\Auth::user()->id);//adaugam iar\n } else {\n //cazul cand o fost luat din db, si trebuie adaugat iar\n \\Cart::store(\\Auth::user()->id);\n }\n }\n }\n\n return Response::json(['success' => '1']);\n }", "title": "" }, { "docid": "a61ee1a92c3b4562e034bdf2a1fb6e1f", "score": "0.5971037", "text": "public function updateCombinedQuantity()\n {\n $this->jsonHeader();\n $adminId = (int)$_GET['adminId'];\n if ($adminId) {\n define('IN_ADMIN', 1);\n $_COOKIE['classified_session'] = $_COOKIE['admin_classified_session'];\n }\n\n $session = geoSession::getInstance();\n $session->initSession();\n\n $cart = geoCart::getInstance();\n //start up the cart\n $userId = ($adminId) ? (int)$_GET['userId'] : null;\n $cart->init(true, $userId);\n\n if (!$this->_validateCartStep()) {\n //invalid it seems?\n return;\n }\n\n $new = (isset($_POST['new']));\n\n\n //data to be returned\n $data = array();\n\n $session_variables = $cart->item->get('session_variables');\n if (!$session_variables) {\n //failsafe\n return $this->_error($this->messages[502221]);\n }\n $tpl_vars = $cart->getCommonTemplateVars();\n\n //make sure the entries are valid. This is user input after all!\n $cost_options_quantity = array();\n\n foreach ($_POST['cost_options_quantity'] as $key => $quantity) {\n $quantity = (int)$quantity;\n if (!$quantity) {\n //remove 0 quantity (or invalid entries)\n continue;\n }\n $comb_ids = explode('_', $key);\n //TODO: validate each combined ID\n\n $cost_options_quantity[$key] = $quantity;\n }\n $session_variables['cost_options_quantity'] = $cost_options_quantity;\n\n //go ahead and set the quantity\n $info = $this->_checkQuantity($session_variables);\n if ($info['quantity'] > 0 && !$info['noAdd']) {\n //send quantity to auto-update...\n $data['update_quantity'] = $info['quantity'];\n }\n\n $cart->item->set('session_variables', $session_variables);\n $cart->save();\n\n $tpl_vars['session_variables'] = $session_variables;\n $tpl_vars['ajax'] = true;\n $tpl_vars['precurrency'] = '';\n\n $tpl = new geoTemplate(geoTemplate::SYSTEM, 'order_items');\n $tpl->assign($tpl_vars);\n\n $data['cost_options_box'] = $tpl->fetch('shared/cost_options/index.tpl');\n\n echo $this->encodeJSON($data);\n }", "title": "" }, { "docid": "cffec688312d5f797250ec62b3282660", "score": "0.59670967", "text": "public function updateItemQty() {\n\t$update = 0; \n\t$rowid = $this->input->get('rowid');\n\t$qty = $this->input->get('qty');\n\tif (!empty($rowid) && !empty($qty)) {\n\t\t$data = array(\n\t\t'rowid' => $rowid,\n\t\t'qty' => $qty\n\t\t);\n\t\t$update = $this->cart->update($data);\n\t}\n\techo $update ? 'ok' : 'err';\n}", "title": "" }, { "docid": "3ae0d2bc384988f6143f28a02742bf40", "score": "0.59470546", "text": "public function update(Request $request, Cart $cart)\n {\n //====Upadating the Cart Detail on ajax====////\n\n $Cart_id=$request->cookie('SI_CartID');\n $CartDetail=CartDetail::where(['cart_id' =>$Cart_id,'product_id'=>$request->product_id])->update(['qty' => $request->qty]);\n\n $AllDetail=$this->showCart($Cart_id);\n $ProductDetailSize=$AllDetail[0];\n $TotPrice=$AllDetail[1];\n \n return view('ajax.ajax_cart',compact('ProductDetailSize','TotPrice'));\n }", "title": "" }, { "docid": "4e2d5a3982f35f1b4c2e81a3d5214057", "score": "0.5934695", "text": "function updateItem($db, $pid) {\n $cartID = getCartID();\n $qty = getQuantity();\n if ($qty <= 0) {\n deleteItem($db, $pid);\n } else {\n $sql = \"UPDATE shoppingcarts SET Quantity=$qty \n WHERE CartID='$cartID' AND ProductID=$pid\";\n $db->query($sql);\n }\n }", "title": "" }, { "docid": "44ea352ace5cd8c0ab6890f35ed98ed2", "score": "0.59341675", "text": "public function update($quantity, $id_cart) {\n $this->db->set('quantite', $quantity);\n $this->db->where(array('id' => $id_cart, 'id_client' => $this->session->id));\n $this->db->update('panier');\n }", "title": "" }, { "docid": "779aae19eeb7ecd6fae2cef413d3c2f9", "score": "0.5919743", "text": "public function updateCartQuantity($cartId,$quantity){\n $cartId = $this->fm->validation($cartId);\n $quantity = $this->fm->validation($quantity);\n $cartId = mysqli_real_escape_string($this->db->link,$cartId);\n $quantity = mysqli_real_escape_string($this->db->link,$quantity);\n \n $query = \"UPDATE tbl_cart SET quantity ='$quantity' WHERE cartId ='$cartId'\";\n $updated_row = $this->db->update($query);\n if($updated_row){\n \n header(\"Location:cart.php\");\n \n }else{\n $msg = \"<span class='error'>Quantity Not Updated.</span>\";\n return $msg;\n }\n \n \n \n }", "title": "" }, { "docid": "695c39f2ff3892294447036e1e90307c", "score": "0.591643", "text": "public function deleteFromCart(Request $request,$id){\n $cart = $request->session()->get('cart');\n if(array_key_exists($id,$cart->items)){\n unset($cart->items[$id]);\n }\n $prevCart = $request->session()->get('cart');\n $updateCart =new cart($prevCart);\n $updateCart->updatePriceAndQuantity();\n $request->session()->put('cart',$updateCart);\n return redirect()->route('cartProduct');\n }", "title": "" }, { "docid": "0deebe2d6bcda410149e12e36daf9539", "score": "0.59112287", "text": "public function updateItems($data)\n { \n\t\tMage::dispatchEvent('checkout_cart_update_items_before', array('cart'=>$this, 'info'=>$data));\t\t\n foreach ($data as $itemId => $itemInfo) {\n $item = $this->getQuote()->getItemById($itemId);\n\t\t\tif (!$item) {\n continue;\n }\r \n if (!empty($itemInfo['remove']) || (isset($itemInfo['qty']) && $itemInfo['qty']=='0')) {\n $this->removeItem($itemId);\n continue;\r }\n $qty = isset($itemInfo['qty']) ? (float) $itemInfo['qty'] : false;\n if ($qty > 0) {\n $item->setQty($qty);\n } \r \r if (isset($itemInfo['options'])) {\r $optionId = '';\r foreach ($item->getOptions() as $option){\r //echo $option->getId();\r if($option->getCode() == 'info_buyRequest'){ \r $unserialized = unserialize($option->getValue());\r $options = array();\r foreach($unserialized['options'] as $key=>$infoOption) {\r $options[$key] = $itemInfo['options'][$key];\r }\r $unserialized['options'] = $options;\r $option->setValue(serialize($unserialized)); \r } elseif ($option->getCode() == 'option_ids'){\r $option->setValue($option->getValue());\r $optionId = $option->getValue();\r } elseif ($option->getCode() == 'option_'.$optionId){\r $option->setValue($itemInfo['options'][$optionId]);\r }\r } \r }\n }\n Mage::dispatchEvent('checkout_cart_update_items_after', array('cart'=>$this, 'info'=>$data));\n return $this;\n }", "title": "" }, { "docid": "0212814151a85af1aeb06db7e7df3374", "score": "0.5908077", "text": "public function update_cart_product_quantity(){\n \n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n } else {\n if(isset($_COOKIE[CART_COOKIE_NAME]) && !empty($_COOKIE[CART_COOKIE_NAME])){\n \n $cookie = stripslashes($_COOKIE[CART_COOKIE_NAME]);\n $savedCartArray = json_decode($cookie, true); \n $cookie_cart_id = $savedCartArray['cookie_cart_id'];\n \n $actual_qty = (int)$this->input->post('actual_qty');\n $product_id = $this->input->post('product_id');\n $cart_id = $this->input->post('cart_id');\n \n if($cart_id && $product_id){\n //get product details and check product stock\n $product_details = $this->cm->select_row('products', ['id'=> $product_id], 'id,name,slug,purchase_quantity');\n if(strlen($actual_qty) > 1 || $actual_qty > 5){\n echo json_encode(array('success'=> false, 'message'=> \"We're sorry! Only 5 units of \".$product_details['name'].\" for each customer.\")); die();\n } elseif($product_details['purchase_quantity'] < $actual_qty){\n echo json_encode(array('success'=> false, 'message'=> \"You can buy only up to \".($actual_qty-1).\" unit(s) of this product\")); die();\n }\n \n //update cart product quantity\n if($actual_qty < 1){\n $product_qty = 1;\n } else {\n $product_qty = $actual_qty;\n }\n $update_status = $this->cm->update('product_cart', ['id'=> $cart_id], ['quantity'=> $product_qty]);\n if(!$update_status){\n echo json_encode(array('success'=> false, 'message'=> \"We can't update this item quantity to your cart12\")); die();\n }\n //Get update cart price summery\n $cart_html = '';\n $get_cart_details = GetUserCartDetailsByCartId($cookie_cart_id);\n if(!empty($get_cart_details)){\n $data['cart_details'] = $get_cart_details;\n $cart_html = $this->load->view('frontend/ajax/cart_price_update', $data, TRUE);\n }\n echo json_encode(array('success'=> true, 'message'=> 'Successfully update cart', 'html'=> $cart_html)); die();\n } else {\n echo json_encode(array('success'=> false, 'message'=> 'Faild to update cart quantity.')); die();\n }\n } else {\n echo json_encode(array('success'=> false, 'message'=> \"We can't update this item quantity to your cart\")); die();\n }\n }\n }", "title": "" }, { "docid": "c09b7a41a0b6fb925ebe795123810e10", "score": "0.58892053", "text": "public function update()\n\t{\n\t\t$this->load->helper('currency');\n\t\t$data= [\n\t\t\t'rowid' => $this->input->post('rowid'),\n\t\t\t'qty' => $this->input->post('qty'),\n\t\t];\n\t\t$this->cart->update($data);\n\t\tif ( ! empty( $this->cart->contents()[ $this->input->post('rowid') ] ) ) {\n\t\t\t# code...\n\t\t\t$row= $this->cart->contents()[ $this->input->post('rowid') ];\n\t\t\t$row['subtotal']= idr($row['subtotal']);\n\t\t\t$row['weight']= ( ($row['qty']*$row['options']['weight']) );\n\t\t\t$row['total']= idr( $this->cart->total() );\n\t\t} else {\n\t\t\t# code...\n\t\t\t$row= [];\n\t\t\t$row['subtotal']= idr( 0 );\n\t\t\t$row['total']= idr( $this->cart->total() );\n\t\t}\n\t\t\n\t\techo json_encode($row);\n\t\t$this->weight();\n\t}", "title": "" }, { "docid": "a84a3e16bbfb8fd7713e71f8d25898af", "score": "0.58868134", "text": "public function update(Request $request)\n {\n // return $request->all();\n $id = $request->input('id');\n foreach($id as $key=>$value ){\n // ubah status produk return\n product_return::where('id',$value)->update(array(\n 'status' => 'Approve'\n ));\n\n // ubah jumlah produk\n $produk = Products::select('total')\n ->where('id',$request->input('produk')[$key])\n ->first();\n Products::where('id',$request->input('produk')[$key])->update(array(\n 'total' => $produk->total + $request->input('qty')[$key],\n ));\n\n // ubah detail\n $jum = ProductsDetail::select('qty')\n ->where([\n 'size' => $request->input('size')[$key],\n 'id_products' => $request->input('produk')[$key],\n ])\n ->first();\n ProductsDetail::where([\n 'id_products' => $request->input('produk')[$key],\n 'size' => $request->input('size')[$key],\n ])\n ->update(array(\n 'qty' => $jum->qty + $request->input('qty')[$key],\n ));\n }\n Alert::success('Data berhasil ditambah', 'Selamat!');\n return redirect('/Produk/kembali');\n }", "title": "" }, { "docid": "736e0f91eff67533ead6f1fa56672381", "score": "0.5886632", "text": "public function test_update_item_from_cart_logged_id()\n {\n $user = User::factory()->create();\n $token = $user->createToken('apptoken')->plainTextToken;\n $user->remember_token = $token;\n $user->save();\n\n Sanctum::actingAs(\n $user,\n ['*']\n );\n\n $addToUserCart = $this->postJson('/api/cart', [\n 'id' => 1,\n 'name' => 'Air pods',\n 'qty' => '2',\n 'price' => '299',\n ]);\n\n $response = $this->putJson('/api/cart/1',[\n 'qty' => 3\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "758665f2cfb1c53ec517b82bf245a7dc", "score": "0.5885596", "text": "public function actionAddCart(){\n\t $productID = Yii::app()->request->getParam('product_id');\n\n\t //Thêm sản phẩm vào giỏ hàng\n\t cartShop::addCart($productID);\n\n //Hien thi thong tin gio hang\n cartShop::showInfoCart();\n }", "title": "" }, { "docid": "adcaacde0e38effdea84b52534d991f4", "score": "0.5883322", "text": "public function display(): void{\r\n //get the totals\r\n $overalTotal = $this->calculateTotals();\r\n ?>\r\n <div id=\"cart\">\r\n <h3>Current Cart:</h3>\r\n <table>\r\n <tr>\r\n <th>Product name</th>\r\n <th>Price per unit</th>\r\n <th>Quantity in cart</th>\r\n <th>Product total cost</th>\r\n <th>Remove from Cart</th>\r\n <th>Overall total</th>\r\n </tr>\r\n <?php\r\n //for each item inside the cart\r\n foreach($this->listOfItems as $item){\r\n ?>\r\n <tr>\r\n <form action=\"modifyCart.php\" method=\"post\">\r\n <input type=\"hidden\" name=\"name\" value=\"<?php echo $item['name']; ?>\" readonly>\r\n <input type=\"hidden\" name=\"method\" value=\"remove\" readonly>\r\n <td><?php echo $item['name']; ?></td>\r\n <td><?php echo displayPrice($item['price']); ?></td>\r\n <td><?php echo $item['quantity']; ?></td>\r\n <td><?php echo displayPrice($item['total']);?></td>\r\n <td>\r\n <input type=\"number\" value=\"1\" name=\"quantity\" min=\"1\">\r\n <input type=\"submit\" value=\"Remove from cart\">\r\n </td>\r\n </form>\r\n </tr> \r\n <?php\r\n }\r\n\r\n ?>\r\n <tr>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n <td><?php echo $overalTotal ?></td>\r\n </tr>\r\n </table>\r\n </div>\r\n <?php\r\n }", "title": "" }, { "docid": "0b5df40903a346246eb1591de4cda2a2", "score": "0.5882783", "text": "public function update(Request $request, $id)\n {\n $rowid = $request->rowid;\n $qty = $request->qty;\n $sessiondata = $request->session()->get('cart_session', '0');\n foreach ($sessiondata as $key => $value){\n if($key == $rowid){\n $sessiondata[$key]['qty'] = $qty;\n }\n }\n session()->put('cart_session', $sessiondata);\n return redirect('cart');\n }", "title": "" }, { "docid": "004dcb1f0d86996d158b05ffc07f20c4", "score": "0.58807224", "text": "public function page_cart_get(){\n if(Session('cart')){\n $oldCart=Session::get('cart');\n $cart=new cart($oldCart);\n $product_cart = $cart->items;\n foreach ($product_cart as $product) {\n echo '<div class=\"row moihangchitiet\"><div class=\"col-lg-2\"><img class=\"img_gh\" src=\"'.asset('').'/'.explode('||',$product['item']['image'])[0].'\" alt=\"'.$product['item']['name'].'\"></div><div class=\"col-sx-5 col-sm-5 col-md-5 col-lg-5\"><a href=\"'.route('san-pham',$product['item']['id']).'\">'.$product['item']['name'].'</a><br><p> Màn hinh: '.$product['item']['display'].',Ram: '.$product['item']['ram'].',Ô cứng: '.$product['item']['hard_disk'].'</p></div><div class=\"col-sx-2 col-sm-2 col-md-2 col-lg-2\"><p class=\"tien\">'.$product['item']['promotion_price'].'</p></div><div class=\"col-sx-3 col-sm-3 col-md-3 col-lg-3 nut\"><button class=\"tru1\" name=\"'.$product['item']['id'].'\">-</button><input class=\"soluong\" type=\"text\" value=\"'.$product['qty'].'\" readonly=\"readonly\"><button class=\"cong1\" name=\"'.$product['item']['id'].'\">+</button><button class=\"delete_page_cart\" name=\"'.$product['item']['id'].'><i class=\"far fa-trash-alt\"></i>Xóa</button></div></div>';\n }\n }\n else{\n echo '';\n }\n }", "title": "" }, { "docid": "b59d8ac26780453f3b304ff4143e087b", "score": "0.5872758", "text": "function addToCartCustomer($data){\r\n\t\tglobal $Config;\r\n\t\t$Cid=$_SESSION['UserData']['Cid'];\r\n\t\t$CustCode=$_SESSION['UserData']['CustCode'];\r\n\r\n\t\tforeach($data['ProductID'] as $key=>$val){\r\n\r\n\r\n\t\t\t$ProductID=$val;\r\n\t\t\t$Quantity=$data['Quantity'][$val];\r\n\t\t\t$DesComment=$data['DesComment'][$val];\r\n\r\n\t\t\t$sql = \"select count(*) as total,CartID from s_cart_sales where ProductID='\".addslashes($ProductID).\"' and Cid = '\" . $Cid . \"' \";\r\n\t\t\t$res=$this->query($sql, 1);\r\n\t\t\t$sql = \"select * from inv_items where ItemID='\".addslashes($ProductID).\"'\";\r\n\t\t\t$productDetails=$this->query($sql, 1);\r\n\t\t\t$Price=$productDetails[0]['sell_price'];\r\n\r\n\r\n\t\t\tif($res[0]['total']>0){\r\n\t\t\t\t// update\r\n\t\t\t\t$sql = \"update s_cart_sales set Quantity=Quantity+'\" . addslashes($Quantity) . \"',\r\n\t\t\t\tAddedDate='\" . date('Y-m-d h:i:s') . \"' where CartID='\" . $res[0]['CartID'] . \"'\";\r\n\t\t\t\t$this->query($sql, 0);\r\n\t\t\t}else{\r\n\t\t\t\t// add\r\n\t\t\t\t$sql = \"insert into s_cart_sales SET Cid = '\" . $Cid . \"', ProductID = '\" .addslashes($ProductID) . \"',\r\n\t\t\t\tPrice = '\" . $Price . \"', Quantity = '\" . $Quantity . \"',DesComment = '\" . $DesComment . \"',AddedDate = '\" .date('Y-m-d h:i:s') . \"' \";\t\t\t\r\n\r\n\t\t\t\t$this->query($sql, 0);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "021957f84cf7790a39a8a2c442da3efa", "score": "0.58718866", "text": "private function UpdateInCart()\n\t{\n\t\tif(isset($_REQUEST['selectedShippingMethod'])) {\n\t\t\t$id = $_REQUEST['selectedShippingMethod'];\n\n\t\t\t// Legancy - Vendor template\n\t\t\tif(isset($id[0])) {\n\t\t\t\t$id = $id[0];\n\t\t\t}\n\n\t\t\t// Make sure split shipping is disabled here - it doesn't work on\n\t\t\t// the cart pages.\n\t\t\t$this->getQuote()->SetIsSplitShipping(false);\n\t\t\t$shippingAddress = $this->getQuote()->getShippingAddress(0);\n\t\t\t$cachedShippingMethod = $shippingAddress->getCachedShippingMethod($id);\n\n\t\t\tif(!empty($cachedShippingMethod)) {\n\t\t\t\t$shippingAddress->setShippingMethod(\n\t\t\t\t\t$cachedShippingMethod['price'],\n\t\t\t\t\t$cachedShippingMethod['description'],\n\t\t\t\t\t$cachedShippingMethod['module']\n\t\t\t\t);\n\t\t\t\t$shippingAddress->setHandlingCost($cachedShippingMethod['handling']);\n\t\t\t}\n\t\t\t$shippingAddress->removeCachedShippingMethods();\n\t\t}\n\n\t\tif(!empty($_REQUEST['qty']) && is_array($_REQUEST['qty'])) {\n\t\t\tforeach($_REQUEST['qty'] as $itemId => $quantity) {\n\t\t\t\ttry {\n\t\t\t\t\tif(!$this->getQuote()->hasItem($itemId)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if the quantity updated to 0, then remove it from cart\n\t\t\t\t\tif (empty ($quantity)) {\n\t\t\t\t\t\t$this->getQuote()\n\t\t\t\t\t\t->removeItem($itemId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$item = $this->getQuote()->getItemById($itemId);\n\t\t\t\t\t\tif(!$item->getParentId()) {\n\t\t\t\t\t\t\t$item->setQuantity($quantity);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ISC_QUOTE_EXCEPTION $e) {\n\t\t\t\t\tflashMessage($e->getMessage(), MSG_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update the coupon code, if there are any applied, as shipping method\n\t\t// changed affect the coupon amount.\n\t\ttry {\n\t\t\t$this->getQuote()\n\t\t\t->reapplyCoupons(true);\n\t\t}\n\t\tcatch(ISC_QUOTE_EXCEPTION $e) {\n\t\t\tflashMessage($e->getMessage(), MSG_ERROR);\n\t\t}\n\n\t\tif(empty($_REQUEST['selectedShippingMethod'])) {\n\t\t\tflashMessage(getLang('CartUpdated'), MSG_SUCCESS);\n\t\t}\n\n\t\tredirect('cart.php');\n\t}", "title": "" }, { "docid": "046a0a04b735e2ceee17679d53ba5cc8", "score": "0.58551276", "text": "public function store(Request $request, $id_produk )\n {\n $product = Product::where('id_produk', $id_produk)->first();\n $cart = $product->id_produk;\n\n // Validasi Stok\n if ($request->qty > $product->stok) {\n return redirect()->back()->with('danger','Anda Memesan melebihi Stok');\n }\n\n // Cek Validasi\n $cek = Cart::where('user_id', Auth::user()->id)->where('id_produk', $cart)->first();\n \n // Simpan ke Cart\n if ($product->stok != 0){\n if (empty($cek)) {\n $cart = New Cart;\n $cart->user_id = Auth::user()->id;\n $cart->id_produk = $product->id_produk;\n $cart->qty = $request->qty;\n $cart->harga = $product->harga;\n $cart->total = $cart->harga * $request->qty;\n $product->stok = $product->stok - $request->qty;\n $product->update();\n $cart->save();\n return redirect()->back()->with('success', 'Anda Menambahakan Pesanan Ke Keranjang');\n }else{\n $cart = Cart::where('user_id', Auth::user()->id)->where('id_produk', $cart)->first();\n $cart->qty = $request->qty + $cart->qty;\n\n $harga_cart_baru = $product->harga * $request->qty; \n $cart->harga = $product->harga;\n $cart->total = $harga_cart_baru + $cart->total;\n $product->stok = $product->stok - $request->qty;\n\n $product->update();\n $cart->update();\n return redirect()->back()->with('success', 'Anda Menambahkan Jumlah Pesanan Ke Keranjang');\n } \n }else{\n return redirect()->back()->with('danger','Mohon Maaf stok sudah habis');\n }\n \n return redirect()->back();\n }", "title": "" }, { "docid": "e5c6707c7d3084dcaf3978a39bf1f1e8", "score": "0.58415127", "text": "public function edit(Request $request,$id)\n {\n if(!Session::has('customerlogin'))\n {\n $cart = Cart::where(['id'=>$id, 'session_key'=>Session::getId()])->update(array('quantity' => $request->quantity));\n }else{\n $cart = Cart::where(['customer_id'=>Session::get('customerid'),'id'=>$id])->update(array('quantity' => $request->quantity));\n }\n\n Session::flash('flash_message_success', 'Product quantity updated');\n return redirect('cart');\n }", "title": "" }, { "docid": "78aafcd6ef38eaeb84313c7ee024efa7", "score": "0.5837718", "text": "public function cartAction()\r\n {\r\n $cart = $this->_getCart();\r\n if ($cart->getQuote()->getItemsCount()) {\r\n $cart->init();\r\n $cart->save();\r\n\r\n if (!$this->_getQuote()->validateMinimumAmount()) {\r\n $warning = Mage::getStoreConfig('sales/minimum_order/description');\r\n $cart->getCheckoutSession()->addNotice($warning);\r\n }\r\n }\r\n\r\n foreach ($cart->getQuote()->getMessages() as $message) {\r\n if ($message) {\r\n $cart->getCheckoutSession()->addMessage($message);\r\n }\r\n }\r\n\r\n /**\r\n * if customer enteres shopping cart we should mark quote\r\n * as modified bc he can has checkout page in another window.\r\n */\r\n $this->_getSession()->setCartWasUpdated(true);\r\n\r\n Varien_Profiler::start(__METHOD__ . 'cart_display');\r\n $this\r\n ->loadLayout()\r\n ->_initLayoutMessages('checkout/session')\r\n ->_initLayoutMessages('catalog/session')\r\n ->getLayout()->getBlock('head')->setTitle($this->__('Shopping Cart'));\r\n $this->renderLayout();\r\n Varien_Profiler::stop(__METHOD__ . 'cart_display');\r\n }", "title": "" }, { "docid": "496b32b2884197d4c4fa642942a23792", "score": "0.58371586", "text": "function update_cart()\n\t\t{\n\t\t// POST VALUE IS AN ARRAY OF ALL ITEM IDs IN THE CART\n\t\tif (is_array($_POST['jcart_item_ids']))\n\t\t\t{\n\t\t\t// TREAT VALUES AS A STRING FOR VALIDATION\n\t\t\t$item_ids = implode($_POST['jcart_item_ids']);\n\t\t\t}\n\n\t\t// POST VALUE IS AN ARRAY OF ALL ITEM QUANTITIES IN THE CART\n\t\tif (is_array($_POST['jcart_item_qty']))\n\t\t\t{\n\t\t\t// TREAT VALUES AS A STRING FOR VALIDATION\n\t\t\t$item_qtys = implode($_POST['jcart_item_qty']);\n\t\t\t}\n\n\t\t// IF NO ITEM IDs, THE CART IS EMPTY\n\t\tif ($_POST['jcart_item_id'])\n\t\t\t{\n\t\t\t// IF THE ITEM QTY IS AN INTEGER, OR ZERO, OR EMPTY\n\t\t\t// UPDATE THE ITEM\n\t\t\tif (preg_match(\"/^[0-9-]+$/i\", $item_qtys) || $item_qtys == '')\n\t\t\t\t{\n\t\t\t\t// THE INDEX OF THE ITEM AND ITS QUANTITY IN THEIR RESPECTIVE ARRAYS\n\t\t\t\t$count = 0;\n\n\t\t\t\t// FOR EACH ITEM IN THE CART\n\t\t\t\tforeach ($_POST['jcart_item_id'] as $item_id)\n\t\t\t\t\t{\n\t\t\t\t\t// GET THE ITEM QTY AND DOUBLE-CHECK THAT THE VALUE IS AN INTEGER\n\t\t\t\t\t$update_item_qty = intval($_POST['jcart_item_qty'][$count]);\n\n\t\t\t\t\tif($update_item_qty < 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$this->del_item($item_id);\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// UPDATE THE ITEM\n\t\t\t\t\t\t$this->update_item($item_id, $update_item_qty);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// INCREMENT INDEX FOR THE NEXT ITEM\n\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t// IF NO ITEMS IN THE CART, RETURN TRUE TO PREVENT UNNECSSARY ERROR MESSAGE\n\t\telse if (!$_POST['jcart_item_id'])\n\t\t\t{\n\t\t\treturn true;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e20fe82250996cb3482e30ddfd3fd2ae", "score": "0.58275926", "text": "public function update(SaleRequest $request, $id)\n {\n $product= Product::find($request->product_id);\n $cart= Cart::instance('shopping')->get($id);\n //check số lượng trừ đi số lượng đang order ngoiaj trừ đã hủy vào đã thanh toán : thánh toán 3 và đã hủy là 4\n $sum=0;\n $detail_orders= Order::join('detail_orders', 'orders.id', '=', 'detail_orders.order_id')\n ->select('detail_orders.*')\n ->where('orders.status', '!=', 3)\n ->where('orders.status', '!=', 4)\n ->where('detail_orders.product_id',$request->product_id)\n ->get();\n \n foreach ($detail_orders as $key => $detail_order) {\n $sum +=$detail_order->quantity_buy;\n }\n// check trừ đi số lượng đã order\n if($request->quantity_buy>($product->quantity-$sum)){\n return response()->json([\n 'error'=>true,\n 'messages'=>'Số lượng bạn cần mua lớn hơn số lượng cửa hàng hiện có !'\n ]);\n }\n\n Cart::instance('shopping')->update($id, $request->quantity_buy);\n $count = Cart::instance('shopping')->count();\n\n $new_cart= Cart::instance('shopping')->get($id);\n $total = Cart::instance('shopping')->subtotal();\n return response()->json([\n 'error'=>false,\n 'messages'=>'Update cart success !',\n 'cart'=>$new_cart,\n 'count'=>$count,\n 'total'=>$total,\n ]);\n }", "title": "" }, { "docid": "20ccffca285026596d7afc4c1b6c3016", "score": "0.58181083", "text": "public function cart();", "title": "" }, { "docid": "f403d4af6b26c5d1bac009785b0390ca", "score": "0.5817489", "text": "function hapus_pengajuan($product){\n $data = array(\n 'rowid' => $product,\n 'qty' => 0\n );\n\n $this->cart->update($data);\n redirect('tambah-permintaan','Refresh');\n }", "title": "" }, { "docid": "86a91a1c59cb512459bb1c81390ce0ee", "score": "0.5810962", "text": "public function ajaxheaderUpdateCart(Request $req){\n \n $Cart_id=$req->cookie('SI_CartID');\n $CartDetail=CartDetail::where(['cart_id' => $Cart_id,'product_id'=>$req->product_id])->update(['qty' => $req->qty]);\n \n $AllDetail=$this->showCart($Cart_id);\n $ProductDetailSize=$AllDetail[0];\n $TotPrice=$AllDetail[1];\n\n if($req->header_cart_type==0)\n return view('ajax.ajax_header_cart_area',compact('ProductDetailSize','TotPrice'));\n else\n return view('ajax.ajax_mobile_menu_cart',compact('ProductDetailSize','TotPrice')); \n }", "title": "" } ]
2471719d2951784d0a5bd3081209cf7f
Store Timesheet Uploaded Files To timesheet_files
[ { "docid": "175c06b7755858a7d04fd20af62d346e", "score": "0.630888", "text": "protected function storeTimesheetUploadedFiles(\n\t\tArray $fileName, \n\t\tVolunteer $volunteer, \n\t\tArray $fileTitle,\n\t\tstring $document_segment = \"\", \n\t\tstring $document_type = \"\",\n\t\tPayPeriod $period,\n\t\t?Site $site = null\n\t) : void{\n\t $fileData = array();\n\t $count = 0;\n\n\t foreach ($fileName as $file) {\n\n\t $data = array(\n\t 'document_segment' => $document_segment != \"\" ? $document_segment : 'upload',\n\t 'document_type' => $document_type != \"\" ? $document_type : 'file',\n\t 'document_title' => is_array($fileTitle) ? (isset($fileTitle[$count]) ? $fileTitle[$count] : \"title\") : $fileTitle,\n\t 'file_name' => $file,\n\t 'created_at' => date('Y-m-d H:i:s'),\n\t 'volunteer_id'\t=> $volunteer->id,\n\t 'period_id'\t=> $period->id,\n\t 'site_id'\t=> $site->id ?? $site,\n\t 'userc_id'\t=> auth()->id()\n\t );\n\t array_push($fileData, $data);\n\t $count++;\n\t }\n\n\t DB::transaction(function() use($fileData) {\n\n\t \t\\App\\Models\\Fgp\\TimesheetFile::insert($fileData);\n\n\t });\n\t}", "title": "" } ]
[ { "docid": "a110d7b868b3453fe5738a2bcecd5d04", "score": "0.6061477", "text": "public function store(Request $request)\n {\n\n\n $file = $request->file('global_tags_excel');\n\n $destinationPath = 'generic_global_tags';\n $file_name = $file->getClientOriginalName();\n\n $file_name = explode(\".\",$file_name);\n $file_name = $file_name[0].\"_\".time().\".\".$file_name[1];\n $file->move($destinationPath,$file_name);\n\n // echo $file->getFilename();\n\n $this->genericGlobalTagsDao->insertAllTags($file_name);\n\n\n }", "title": "" }, { "docid": "b9d534d04e971e1614e54dc65f8e4b67", "score": "0.59583527", "text": "function storeFiles()\n {\n }", "title": "" }, { "docid": "f4e05c08dd69799b670cf8b561d01cf5", "score": "0.58639854", "text": "function upload_file() {\n upload_file_to_temp();\n }", "title": "" }, { "docid": "2021bd21c71f98e727f3ed0b2641e8d9", "score": "0.58579713", "text": "protected function storeFiles()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n $this->log(sprintf('Playlist - Writing file list to temporary file. (%s)', basename($this->tempFilesFromFilename)), 'info');\n $stream = new Stream(fopen($this->tempFilesFromFilename, 'w'));\n\n try {\n $stream->write($this->filesToString());\n } catch (\\Exception $e) {\n $this->log(sprintf('Playlist - Error while writing to file %s. (%s)', basename($this->tempFilesFromFilename), $e->getMessage()), 'error');\n }\n\n $stream->close();\n }", "title": "" }, { "docid": "8e3b70922a5421d7410359c329d2c0d2", "score": "0.579023", "text": "public function save(){\n $location = '../public/'.$this->folder.'/'.$this->type.'-'.$this->name.'.'.$this->extension;\n move_uploaded_file($_FILES['file']['tmp_name'],$location);\n }", "title": "" }, { "docid": "408c5868389818cf80ba88fc582519ba", "score": "0.57738316", "text": "function saveExcelFile($path)\n{\n\n $uploadsdir = 'uploads';\n\n if (!is_dir($uploadsdir)) {\n if (!mkdir($uploadsdir, 0777, true)) {\n die('Не удалось создать директорию ' . $uploadsdir);\n }\n }\n\n $uploaddir = __DIR__ . '/../' . $uploadsdir . '/';\n\n $info = pathinfo($_FILES['excel']['name']);\n\n if (!in_array(strtolower($info['extension']), ['xls', 'xlsx'])) {\n msg(\"Поддерживаемые типы файлов: XLS, XLSX\");\n return false;\n }\n\n $filename = basename($_FILES['excel']['name'], '.' . $info['extension']);\n\n\n $uploadfile = $uploaddir . (new DateTime)->format('Y-m-d-H-m-s') . \"_\" . basename($_FILES['excel']['name']);\n\n if (file_exists($uploadfile)) {\n $uploadfile = $uploaddir . (new DateTime)->format('Y-m-d-H-m-s') . \"_\" . $filename . \".\" . $info['extension'];\n }\n\n if (move_uploaded_file($_FILES['excel']['tmp_name'], $uploadfile)) {\n msg(\"Файл был успешно загружен\", \"div\", \"alert alert-info\");\n\n } else {\n msg(\"Проблемы с сохранением файла!\", \"div\", \"alert alert-danger\");\n return false;\n }\n\n return $uploadfile;\n}", "title": "" }, { "docid": "a826073058bd0292b1c9c284ada079df", "score": "0.56061333", "text": "function guardar_varios_archivos($array_files, $ruta_donde_guardarlos){\r\n for($i = 0; $i < count($array_files['name']); $i++){\r\n $nombre_archivo = date('m-d-Y') . '--' . $array_files['name'][$i];\r\n move_uploaded_file($array_files['tmp_name'][$i], $ruta_donde_guardarlos . '/' . $nombre_archivo);\r\n }\r\n}", "title": "" }, { "docid": "c309609fa39af846a7774c614eaad09e", "score": "0.55982924", "text": "protected function uploadFiles($uploadedFiles)\n {\n $file = date('H_i_s');\n }", "title": "" }, { "docid": "b58a4b9ec367d14868231ef0c48940a0", "score": "0.55695695", "text": "public function dz_files()\n {\n if (!empty($_FILES) && $_FILES['file']) {\n $file = $_FILES['file'];\n\n\n foreach ($file['error'] as $key=>$error) {\n $uploadfile = sys_get_temp_dir().basename($file['name']['key']);\n move_uploaded_file($file['tmp_name'],$uploadfile);\n\n }\n }\n }", "title": "" }, { "docid": "24a7b01abf2d7ec105f30ac65645bff1", "score": "0.5485588", "text": "function save_files($files_array, $id){\n $filenames = array();\n foreach($files_array as $file){\n $generated_filename = time().'_'.$file->getClientOriginalName();\n// $file->move(storage_path('uploads'), $generated_filename);\n// $file->store('uploads', 'public');\n\n\n// Storage::disk('public')->put($generated_filename, 'Contents');\n $file_path = $file->storeAs('public', $generated_filename);\n\n array_push($filenames, $generated_filename);\n }\n Tasks::whereIn('id', [$id])->update(['files'=>implode(';',$filenames)]);\n }", "title": "" }, { "docid": "0df58357a15192bb03899d944537ca1c", "score": "0.5441621", "text": "public function saveActiveSheetChanges() {\n\n $file = $this->getExtractedFile();\n\n $file->addFromString( $this->activeSheet->sheet->attributes->path, $this->activeSheet->sheet->contents->asXML() );\n }", "title": "" }, { "docid": "548c321cdeda0d8f665df720f4528699", "score": "0.5380703", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'file_name'=>'required',\n 'workout'=>'required|min:2',\n 'description'=>'required|min:10',\n 'day'=>'required',\n 'time'=>'required'\n\n ]);\n\n\n $getValueDay = $request->input('day');\n $getValueTime = $request->input('time');\n\n $path = $request->file('file_name')->storePublicly('public/images/workouts');\n\n $post = [\n 'file_name'=> $path,\n 'workout'=>$request['workout'],\n 'description'=>$request['description'],\n 'day'=>$getValueDay['0'],\n 'time'=>$getValueTime,\n 'users_id'=>Auth::user()->id\n ];\n\n // var_dump($post);\n\n Workout::create($post);\n\n $post = $request->except('_token');\n\n\n return redirect()->route('workout');\n }", "title": "" }, { "docid": "1fa77f7f701f473edfc9287e47b2e9c3", "score": "0.53549904", "text": "public function saveFiles($arrMetafiles)\n {\n if (!is_array($arrMetafiles) || count($_FILES) == 0)\n {\n throw new Exception($GLOBALS['TL_LANG']['ERR']['missing_file_information']);\n }\n\n $arrResponse = array();\n\n foreach ($_FILES as $key => $value)\n {\n if (!key_exists($key, $arrMetafiles))\n {\n throw new Exception($GLOBALS['TL_LANG']['ERR']['missing_file_information']);\n }\n\n $strFolder = $arrMetafiles[$key][\"folder\"];\n $strFile = $arrMetafiles[$key][\"file\"];\n $strMD5 = $arrMetafiles[$key][\"MD5\"];\n\n switch ($arrMetafiles[$key][\"typ\"])\n {\n case SyncCtoEnum::UPLOAD_TEMP:\n $strSaveFile = $this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'], $strFolder, $strFile);\n break;\n\n case SyncCtoEnum::UPLOAD_SYNC_TEMP:\n $strSaveFile = $this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'], \"sync\", $strFolder, $strFile);\n break;\n\n case SyncCtoEnum::UPLOAD_SQL_TEMP:\n $strSaveFile = $this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'], \"sql\", $strFile);\n break;\n\n case SyncCtoEnum::UPLOAD_SYNC_SPLIT:\n $strSaveFile = $this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'], $arrMetafiles[$key][\"splitname\"], $strFile);\n break;\n\n default:\n throw new Exception($GLOBALS['TL_LANG']['ERR']['unknown_path']);\n break;\n }\n\n $objFolder = new Folder(dirname($strSaveFile));\n\n if ($this->objFiles->move_uploaded_file($value[\"tmp_name\"], $strSaveFile) === FALSE)\n {\n throw new Exception(vsprintf($GLOBALS['TL_LANG']['ERR']['cant_move_file'], array($value[\"tmp_name\"], $strSaveFile)));\n }\n else if ($key != md5_file(TL_ROOT . \"/\" . $strSaveFile))\n {\n throw new Exception($GLOBALS['TL_LANG']['ERR']['checksum_error']);\n }\n else\n {\n $arrResponse[$key] = \"Saving \" . $arrMetafiles[$key][\"file\"];\n }\n }\n\n return $arrResponse;\n }", "title": "" }, { "docid": "cc5dbbf72625ce3ccc5e0dc2f1471478", "score": "0.5347648", "text": "public function uploadFiles($user_id,$report_detail_id,$checklist_id,$filename,$path)\n {\n $uploadedFile = new UploadedFile;\n $uploadedFile->user_id = $user_id;\n $uploadedFile->report_detail_id = $report_detail_id;\n $uploadedFile->checklist_id = $checklist_id;\n $uploadedFile->uploader_id = Auth::user()->id;\n $uploadedFile->file_name = $filename;\n $uploadedFile->file_path = $path;\n $uploadedFile->model = 'App\\Report';\n $uploadedFile->status = '0';\n $uploadedFile->save();\n }", "title": "" }, { "docid": "2b0cb6348965cdea3a471547ffefbf63", "score": "0.5346912", "text": "public function saveUploadedFiles(UploadedFilesInterface $files, $path = '/');", "title": "" }, { "docid": "29220f0d71755b20e45c0d6a2a7dac4a", "score": "0.5315038", "text": "public function store($internal_training_id)\n\t{\n\t\tdate_default_timezone_set('Asia/Manila');\n\t\t$currentTimeDate = date(\"Y-m-d H:i:s\"); \n\t\t$currentTime = time(\"H:i:s\"); \n\t\t$currentDate = date(\"Y-m-d\");\n\n\t\t//excel file must contain 2 columns (employee_number & time)\n\t\tif(Input::get('isIndividual') == 0) { //IF UPLOAD OPTION IS SELECTED\n\t\t\tif(file_exists(Input::file('file'))) {\n\t\t\t\tExcel::load(Input::file('file'), function($reader) {\n\t\t\t\t\t$results = $reader->get();\n\n\t\t\t\t\t//save the contents to the it_attendance table\n\t\t\t\t\tfor ($i = 0; $i < count($results) ; $i++) { \n\t\t\t\t\t\t$it_attendances = new Participant_Attendance;\n\n\t\t\t\t\t\t$exists = IT_Participant::where('employee_id', '=', $results[i]->employee_number)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t//$exists = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', true);\n\t\t\t\t\t\tif($exists != null)\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t\tif($results[$i]->time != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$it_attendances->time = $results[$i]->time;\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$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$it_attendances->it_participant_id = $exists->id;\n\t\t\t\t\t\t\t//$it_attendances->save();\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$emp_valid = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', true)->get();\n\t\t\t\t\t\t\tif($emp_valid != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//WRITE TO IT_PARTICIPANTS\n\t\t\t\t\t\t\t\t$it_participant = new IT_Participant;\n\t\t\t\t\t\t\t\t$it_participant->employee_id = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', 1)->pluck('id');\n\n\t\t\t\t\t\t\t\t/**$emp_desig_temp = Employee_Designation::where('employee_id', '=', Employee::where('employee_number', '=', $results[i]->employee_number)->pluck('id'))->first();\n\t\t\t\t\t\t\t\t$it_participant->employee_designation_id = Employee_Designation::where('')*/\n\n\t\t\t\t\t\t\t\t$it_participant->internal_training_id = $internal_training_id;\n\t\t\t\t\t\t\t\t$it_participant->save();\n\n\t\t\t\t\t\t\t\t//WRITE TO PARTICIPANT_ATTENDANCES\n\t\t\t\t\t\t\t\t$exists2 = IT_Participant::where('employee_id', '=', $results[i]->employee_number)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t\t\tif($results[$i]->time != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$it_attendances->time = $results[$i]->time;\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$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$it_attendances->it_participant_id = $exists2->id;\n\t\t\t\t\t\t\t\t$it_attendances->save();\n\t\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\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t\t\t\t\t->withErrors('Employee number doesn\\'t exist');\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$it_attendances->save();\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo 'No file selected';\n\t\t\t}\n\t\t}\n\t\telse if(Input::get('isIndividual') == 1) { //IF INDIVIDUAL OPTION IS SELECTED\n\t\t\tif(Input::get('individual_id') != \"\") {\n\t\t\t\t$individual_id = Input::get('individual_id');\n\t\t\t\t$it_attendances = new Participant_Attendance;\n\t\t\t\t$exists = IT_Participant::where('employee_id', '=', $individual_id)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\tif($exists != null)\t\n\t\t\t\t{\n\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\n\t\t\t\t\t$it_attendances->it_participant_id = $exists->id;\n\t\t\t\t\t//$it_attendances->save();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$emp_valid = Employee::where('employee_number', '=', $individual_id)->where('isActive', '=', true)->get();\n\t\t\t\t\tif($emp_valid != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//WRITE TO IT_PARTICIPANTS\n\t\t\t\t\t\t$it_participant = new IT_Participant;\n\t\t\t\t\t\t$it_participant->employee_id = Employee::where('employee_number', '=', $individual_id)->where('isActive', '=', 1)->pluck('id');\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**$emp_desig_temp = Employee_Designation::where('employee_id', '=', Employee::where('employee_number', '=', $results[i]->employee_number)->pluck('id'))->first();\n\t\t\t\t\t\t$it_participant->employee_designation_id = Employee_Designation::where('')*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t$it_participant->internal_training_id = $internal_training_id;\n\t\t\t\t\t\t$it_participant->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//WRITE TO PARTICIPANT_ATTENDANCES\n\t\t\t\t\t\t$exists2 = IT_Participant::where('employee_id', '=', $individual_id)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\n\t\t\t\t\t\t$it_attendances->it_participant_id = $exists2->id;\n\t\t\t\t\t\t//$it_attendances->save();\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t\t\t->withErrors('Employee number doesn\\'t exist');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$it_attendances->save();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t->withErrors('Please input an employee number');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t->withErrors('Select if individual or batch');\n\t\t}\n\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants');\n\t}", "title": "" }, { "docid": "c299ff5e7f168095e2d270c439eebf9b", "score": "0.53113914", "text": "function bulk_file_upload(array $mult_arr, $save_path){\n $total_file = @count($mult_arr['name']);\n for($i = 0; $i < $total_file; $i++) {\n $unique_name = round(microtime(true)) . '-' . $mult_arr['name'][$i];\n $target = $save_path.$unique_name;\n move_uploaded_file($mult_arr['tmp_name'][$i],$target);\n chmod($target, 0777);\n # skip the APP_ROOT form the path for database save\n $target = str_replace(APP_ROOT.'/','' , $target);\n $return_arr[] = $target;\n }\n\n return $return_arr;\n}", "title": "" }, { "docid": "28c8479cbf1f0fe84442c8f4900206e8", "score": "0.5306994", "text": "function uploadAssignmentFiles($a_files)\n\t{\n\t\tinclude_once(\"./Modules/Exercise/classes/class.ilFSStorageExercise.php\");\n\t\t$storage = new ilFSStorageExercise($this->getExerciseId(), $this->getId());\n\t\t$storage->create();\n\t\t$storage->uploadAssignmentFiles($a_files);\n\t}", "title": "" }, { "docid": "ec8551927468e594be3c3022d4d8cf84", "score": "0.5305422", "text": "public function processTimekeeping()\n {\n $directory=\"wotc_tk\";\n set_time_limit(160);\n \n\n $files = File::allFiles($directory);\n $dateNow = Carbon::now();\n $IniDate = $dateNow->copy()->subWeek(4);\n\n $date_ini_data=Configuration::where('variable', 'PAYROLL_DATE_INI')->first();\n $date_end_data=Configuration::where('variable', 'PAYROLL_DATE_END')->first();\n\n $date_ini_data->value=$IniDate->format('Y-m-d');\n $date_end_data->value=date('Y-m-d');\n\n $date_ini_data->save();\n $date_end_data->save();\n\n foreach ($files as $file) {\n\n \n $file_exists=File_load::where('file_name', $file)\n ->where('type', 16)\n ->exists();\n if(!$file_exists){ \n $count_insert=0;\n $count_update=0;\n Timekeeping::truncate();\n\n $data = Excel::load($file)->toArray();\n echo $file;\n foreach ($data as $row) {\n \n $data_value=$row;\n \n $str = $data_value['workdate2'];\n $date = DateTime::createFromFormat('m/d/Y', $str);\n Timekeeping::create([\n 'winteam_id' => $data_value['id'], \n 'job_number' => $data_value['jobnumber'], \n 'employee_number' => $data_value['employeenumber'],\n 'work_date2' => $date->format('Y-m-d'), \n 'hours' => isset($data_value['hours'])?$data_value['hours']:\"\", \n 'lunch' => isset($data_value['lunch'])?$data_value['lunch']:\"\",\n 'pay_rate' => isset($data_value['payrate'])?$data_value['payrate']:\"\", \n ]);\n $count_insert++;\n \n \n }\n\n //Insert file record\n File_load::create([\n 'file_name' => $file,\n 'type' => 16, \n 'count_insert'=> $count_insert,\n 'count_update'=> $count_update, \n ]);\n\n\n }\n \n\n } \n return \"Data Inserted\";\n }", "title": "" }, { "docid": "f2537195322b2b60176b47019858bd7a", "score": "0.5294214", "text": "public function uploadUsers($sheet)\n { \n try {\n\n $em = $this->serviceContainer->get('doctrine.orm.entity_manager');\n\n // Path to CSV file\n global $kernel;\n $path = $kernel->getContainer()->getParameter('data_dir');\n $filePath= $path.\"/\".$sheet;\n\n //extract data from a CSV document using LeagueCsv reader\n $reader=Reader::createFromPath($filePath);\n //get Iterator of all rows\n $results = $reader->fetchAssoc();\n foreach ($results as $row) {\n \n //create new users\n $user = new User;\n $user->setName($row['name']);\n $user->setLast($row['last']);\n $user->setOtp(rand(100000,999999));\n $em->persist($user);\n\n //create new phone records\n $userPhone1 = $this->createPhone($row['phone1'] ,$user);\n\n $userPhone2 = $this->createPhone($row['phone2'] ,$user);\n $userPhone3 = $this->createPhone($row['phone3'] ,$user);\n }\n $em->getConnection()->beginTransaction();\n // Do flush here\n $em->flush();\n \n $em->getConnection()->commit();\n\n $returnData['success']= $this->translator->trans('api.csv_uploaded');\n } catch (\\Exception $e) {\n if ($em->getConnection() && $em->getConnection()->isOpen()) {\n $em->getConnection()->rollback();\n }\n\n $returnData['errorMessage'] = $e->getMessage();\n }\n\n return $returnData;\n }", "title": "" }, { "docid": "f3fd82571d2e2b726e26ea3ca22bb641", "score": "0.52940875", "text": "public function upload();", "title": "" }, { "docid": "7567a228291da519955453b9551f0f55", "score": "0.52776116", "text": "public function uploadMeetingMinutes(Request $request)\n {\n\n\n $destinationFolder = 'minutes/meeting_'.$request['meetingID'];\n\n if(!\\File::exists($destinationFolder)) {\n $createDir = \\File::makeDirectory($destinationFolder,0777,true);\n }\n\n $fileName = $request->file('minuteFile')->getClientOriginalName();\n $fileFullPath = $destinationFolder.'/'.$fileName;\n\n if(!\\File::exists($fileFullPath)) {\n\n $request->file('minuteFile')->move($destinationFolder,$fileName);\n $meetingAttendees = MeetingAttendee::where('meeting','=',$request['meetingID'])->get();\n $meetingMinutesFile = new MeetingFile();\n $meetingMinutesFile->file = $fileName;\n $meetingMinutesFile->img_url = $fileFullPath;\n $meetingMinutesFile->user = \\Auth::user()->id;\n $meetingMinutesFile->addressbook = 0;\n $meetingMinutesFile->meeting_id = $request['meetingID'];\n $meetingMinutesFile->file_note = $request['fileNote'];\n $meetingMinutesFile->save();\n\n foreach ($meetingAttendees as $meetingAttendee) {\n\n\n if ($meetingAttendee->addressbook == 1){\n\n $addressbook = addressbook::find($meetingAttendee->attendee);\n $data = array(\n 'name' => $addressbook->name,\n 'caseID' => $request['caseID'],\n 'caseNote' => $fileName,\n 'caseFileDesc' => $request['fileNote'],\n 'author' => \\Auth::user()->name .' '.\\Auth::user()->surname\n );\n\n\n \\Mail::send('meetings.email',$data, function($message) use ($addressbook) {\n\n $message->from('[email protected]', 'Siyaleader');\n $message->to($addressbook->email)->subject(\"Siyaleader Notification - New Case File Uploaded: \");\n\n });\n\n\n\n } else {\n\n $user = User::find($meetingAttendee->attendee);\n $data = array(\n 'name' => $user->name,\n 'caseID' => $request['caseID'],\n 'caseNote' => $fileName,\n 'caseFileDesc' => $request['fileNote'],\n 'author' => \\Auth::user()->name .' '.\\Auth::user()->surname\n );\n\n \\Mail::send('meetings.email',$data, function($message) use ($user) {\n\n $message->from('[email protected]', 'Siyaleader');\n $message->to($user->email)->subject(\"Siyaleader Notification - New Case File Uploaded: \");\n\n });\n\n\n }\n\n\n }\n\n return \"ok\";\n\n\n }\n\n\n\n\n\n return \"ok\";\n\n\n\n }", "title": "" }, { "docid": "e6ab6aaf3ee855becc0d6135d070bc0b", "score": "0.526342", "text": "public function store(Request $request)\n {\n\n $validated = $request->validate([\n 'province' => 'required',\n 'event_type' => 'required',\n 'year' => 'required',\n 'month' => 'required',\n 'week' => 'required',\n 'json_data' => 'required'\n ]);\n\n $report = new Report;\n if ($request->hasFile('weekly_report')) {\n $new_file_extension = $request->file('weekly_report')->getClientOriginalExtension();\n $name = $request->province . $request->year. $request->month . $request->week . '.' . $new_file_extension;\n $path = 'weekly_reports/' . $name;\n\n // If the file is not yet uploaded.\n if (! Storage::exists('weekly_reports/' . $name)) {\n $path = $request->file('weekly_report')->storeAs('weekly_reports', $name);\n }\n\n $report->weekly_report_file = $path;\n }\n\n if ($request->hasFile('images')) {\n $images = [];\n foreach($request->file('images') as $index => $image) {\n $name = $request->province . $request->year. $request->month . $request->week . '_'. $index . '.' . $image->extension();\n $path = $image->storeAs('weekly_report_images', $name);\n $images[] = $path;\n }\n\n $report->images = $images;\n\n }\n \n \n $report->province = $request->province;\n $report->year = $request->year;\n $report->month = $request->month;\n $report->week = $request->week;\n $report->event_type_id = $request->event_type;\n $report->json_data = json_decode($request->json_data);\n\n $report->save();\n\n // Loop through testimonials.\n if ($request->testimonial) {\n foreach ($request->testimonial as $key => $testimoniala) {\n\n if ($testimoniala[0] != null && $testimoniala[1] != null) {\n $testim = new Testimonial;\n // Uploading image of the person.\n if ($request->hasFile('testimonial.'.$key.'.2')) {\n $name = strtotime(date('Y-m-dTH:i:s ')) . $request->file('testimonial.'.$key.'.2')->getClientOriginalName();\n $testi_image = $request->file('testimonial.'.$key.'.2')->storeAs('testimonial_image', $name);\n $testim->image = $testi_image;\n }\n $testim->report_id = $report->id;\n $testim->testimonial = $testimoniala[0];\n $testim->name = $testimoniala[1];\n $testim->save();\n }\n }\n }\n \n Session::flash('message', ['Insertion Successful!', 'Province Store Successfully!', 'success']);\n return redirect()->route('activities', $request->event_type);\n }", "title": "" }, { "docid": "94bbc4c4d8d6251d5ef824d376c8c4cf", "score": "0.52631235", "text": "function FileUpload(){\n $client = $this->getClientInfo();\n $this->previousFileDelete($client);\n $backupFiles = $this->getSqlBackupFiles();\n// $this->pr($backupFiles);die;\n if(!empty($backupFiles)){\n foreach($backupFiles as $backup){\n $info = $this->fileUploadInoGoogleDrive($client,$backup);\n print_r($info);\n print \"\\n\";\n }\n }\n die;\n }", "title": "" }, { "docid": "f9f5ecfac9fa916387ebffcd9ad0c86c", "score": "0.5262113", "text": "public function uploadFile($object, $file, $path){\n $fileName = md5(uniqid()).'.'.$file->guessExtension();\n // Move the file to the directory where brochures are stored\n $picDir = $_SERVER['DOCUMENT_ROOT'].'/uploads/'.$path;\n $file->move($picDir, $fileName);\n // Update the 'screenshot' property to store the file name instead of the file\n return $object->setPic($fileName);\n}", "title": "" }, { "docid": "b66e5f1cd838c2e45afc4e557bbc5d93", "score": "0.5261244", "text": "function hook_file_presave($file) {\n // Change the file timestamp to an hour prior.\n $file->timestamp -= 3600;\n}", "title": "" }, { "docid": "0ba7b3c73db18882a713fb7033b7d31c", "score": "0.52579737", "text": "public function storeFiles($files)\n {\n\n // check if file exist\n foreach ($files as $file) {\n $fileDes = $destinationPath . '/' . $file->getClientOriginalName();\n $checkFile = Files::where('file', $fileDes);\n if ($checkFile->count() > 0) {\n $files = $checkFile->first();\n Session::flash('Error', 'File ' . $files->ftype . ' exist already.');\n }else{\n //Move Uploaded File\n $destinationPath = 'uploads/files/' . $request->uid;\n $file->move($destinationPath, $file->getClientOriginalName());\n $saveFile = $destinationPath . '/' . $file->getClientOriginalName();\n // Now save the file in our database \n $fileDB = new Files;\n $fileDB->uid = $request->uid;\n $fileDB->nid = null;\n $fileDB->ntype = 'media';\n $fileDB->file = $saveFile;\n $fileDB->ftype = $file->getClientOriginalName();\n $fileDB->save();\n Session::flash('Success', 'Files uploaded successfully.');\n }\n }\n \n }", "title": "" }, { "docid": "88534372a525c0f575b7e46f8566efdd", "score": "0.52256507", "text": "function Upload() {\n\t\t// What permissions checks do we need?\n\n\t\tset_time_limit(600);\n\t\tignore_user_abort(1);\n\n\t\t$taskID = Request::post('taskid');\n\t\t$projectID = Request::post('projectid');\n\t\t$file = Request::files('document', Request::R_ARRAY);\n\t\t$caller = Request::post('caller');\n\n\t\tforeach ($file[\"error\"] as $key => $error)\n\t\t{\n\t\t\tif ($error == UPLOAD_ERR_OK)\n\t\t\t{\n\t\t\t\t$file_tmp = $file['tmp_name'][$key];\n\t\t\t\t$file_name = $file['name'][$key];\n\t\t\t\t$file_type = $file['type'][$key];\n\t\t\t\t$file_size = $file['size'][$key];\n\t\t\t\tif ($file_size > 0) \n\t\t\t\t{\n\t\t\t\t\t$project_dir = str_pad($projectID, 7, '0', STR_PAD_LEFT);\n\t\t\t\t\t$task_dir = str_pad($taskID, 7, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t$trailer = substr(SYS_FILEPATH, strlen(SYS_FILEPATH) - 1, 1);\n\t\t\t\t\t$filepath = ( ($trailer != '\\\\') && ($trailer != '/') ) ? SYS_FILEPATH . '/' : SYS_FILEPATH;\n\n\t\t\t\t\t$project_path = $filepath . $project_dir;\n\t\t\t\t\t$task_path = $filepath . $project_dir . '/'. $task_dir;\n\t\t\t\t\t@mkdir($project_path, 0777);\n\t\t\t\t\t@mkdir($task_path, 0777);\n\n\t\t\t\t\t$new_file_name = $this->MD5($projectid.$taskid.$file_name.microtime(true));\n\t\t\t\t\t$new_file_path = $task_path . '/' . $new_file_name;\n\n\t\t\t\t\t// File versioning has introduced a different file naming convention.\n\t\t\t\t\t// Instead of <project id>/<task id>/<md5 hash> we will have \n\t\t\t\t\t// <project id>/<task id>/md5 hash/<md5 hash>_<version>\n\t\t\t\t\t// ie. the hash becomes the folder, and version number is a suffix of the on-disk filename.\n\t\t\t\t\tif ( defined( 'FILE_VERSIONING_ENABLED' ) && FILE_VERSIONING_ENABLED == '1' )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !is_dir( $new_file_path ) )\n\t\t\t\t\t\t\tmkdir( $new_file_path, 0777 );\n\t\t\t\t\t\t$versionSuffix = 1; // We are always uploading a new file in Springboard, so it gets version=1. \n\t\t\t\t\t\t$new_file_path .= '/' . $new_file_name . '_' . $versionSuffix;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( move_uploaded_file($file_tmp, $new_file_path) ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$SQL = sprintf(SQL_FILE_CREATE, $file_name, '', $file_type, $this->User->ID, date('Y-m-d H:i:s'), $file_size, 1, $new_file_name, 0, '0', $projectID, $taskID);\n\t\t\t\t\t\t$this->DB->Execute($SQL);\n\n\t\t\t\t\t\t$fileID = $this->DB->ExecuteScalar( SQL_LAST_INSERT );\n\t\t\t\t\t\t$SQL = sprintf(SQL_FILE_LOG, $fileID, $this->User->ID, date('Y-m-d H:i:s'), MSG_UPLOADED, $version);\n\t\t\t\t\t\t$this->DB->Execute($SQL);\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$no_redirect = 1;\n\t\t\t\t\t\t$message = \"Post Max Size: \".ini_get('post_max_size');\n\t\t\t\t\t\t$message .= ' - Upload Max Filesize: '.ini_get('upload_max_filesize');\n\t\t\t\t\t\t$this->ThrowError(4000, base64_encode($message));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$module = ($caller == 'springboard') ? 'springboard' : 'projects';\n\t\tResponse::redirect(\"index.php?module=$module&action=taskview&projectid=$projectID&taskid=$taskID\");\n\t}", "title": "" }, { "docid": "e8705e5155fcf8e433156c4358aa4eb5", "score": "0.5219527", "text": "function task_file_upload(){ \n\t\t\t\t$this->load->helper(array('form', 'url'));\n\t\t\t\t$action_type = $this->input->post('action_type'); \n\t\t\t\t$count = count($_FILES['userfile']['size']);\n\t\t\t\t$action_type = $this->input->post('action_type');\n\t\t\t\t$config['upload_path'] = './documents/';\n\t\t\t\t$config['allowed_types'] = 'gif|jpg|jpeg|png|pdf|docx|doc|csv|xls|xlsx|PDF';\n\t\t\t\t$config['max_size'] = 200024;\n\t\t\t\t$this->load->library('upload', $config);\n\t\t\t\tforeach($_FILES as $key=>$value)\n\t\t\t\tfor($s=0; $s<=$count-1; $s++) {\n\t\t\t\t \t$_FILES['userfile']['name']=$value['name'][$s];\n\t\t\t\t\t$_FILES['userfile']['type'] = $value['type'][$s];\n\t\t\t\t\t$_FILES['userfile']['tmp_name'] = $value['tmp_name'][$s];\n\t\t\t\t\t$_FILES['userfile']['error'] = $value['error'][$s];\n\t\t\t\t\t$_FILES['userfile']['size'] = $value['size'][$s]; \n\t\t\t\t\t$this->upload->do_upload();\n\t\t\t\t\t$data = $this->upload->data();\n\t\t\t\t\t$file_name = $data['file_name']; \n\t\t\t\t\t$post_id = $this->input->post('post_id');\n\t\t\t\t\t$user_id = $this->input->post('user_id');\n\t\t\t\t\t$details = $this->input->post('details');\n\t\t\t\t\t$task_type = $this->input->post('task_type');\n\t\t\t\t\t$_deatils = array('heading' => $details[$s], 'file_name' => $file_name);\n\t\t\t\t\t$serialized_array = serialize($_deatils);\t\t\t\t\t\n\t\t\t\t\t$__data = array('post_id' => $post_id,\n\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t'schedule_date' => '',\n\t\t\t\t\t\t\t'details' => $serialized_array,\n\t\t\t\t\t\t\t'date' => date('Y-m-d h:i:s'),\n\t\t\t\t\t\t\t'task_type' => $task_type, \n\t\t\t\t\t\t);\t\t\t\t\n\t\t\t\t\t$response = $this->InteractModal->save_new_task_db( $__data );\n\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\tif( array_key_exists('id', $response ) && isset($response['id'])):\t\t\t\t\n\t\t\t\t$this->session->set_flashdata('msg', 'Documents Uploaded');\n\t\t\t\tredirect( base_url('Interact/property_details/'.urlencode(base64_encode($post_id)).'/'.urlencode(base64_encode($user_id)). '/'.urlencode(base64_encode($action_type))));\n\t\t\telse:\n\t\t\t\t$msg = $response['error'];\n\t\t\t\t$this->session->set_flashdata('msg', $msg );\n\t\t\t\tredirect( base_url('Interact/property_details/'.urlencode(base64_encode($post_id)).'/'.urlencode(base64_encode($user_id)). '/'.urlencode(base64_encode($action_type))));\t\t\t\t\n\t\t\tendif;\n }", "title": "" }, { "docid": "eee7a0cca51cc17bc1b30f2e5c8140ab", "score": "0.52171695", "text": "public function store(CreateSheetRequest $request)\n {\n if ($this->TimeSheetService->createTimeSheet($request->except('_token'))) {\n $request->session()->flash('successTS','create TimeSheet success');\n }\n else {\n $request->session()->flash('error','create TimeSheet error');\n }\n return redirect()->route('sheet.index');\n \n }", "title": "" }, { "docid": "aaeeff616b1cd1b466420e5925316aab", "score": "0.5208944", "text": "public function store(Request $request) {\n $user = \\Auth::guard()->user();\n $user_id = $user->id;\n $turnitin_files = new TurnitinFile; \n // get all post data element\n $data = Input::all();\n $file = $data['file'];\n $turnitin_files->npm = $data['npm'];\n $turnitin_files->type = $data['type'];\n $turnitin_files->file = $file;\n if($turnitin_files->validate($turnitin_files, $data, $turnitin_files->messages('validation'))) {\n \n // read file and store\n DB::beginTransaction();\n try {\n $fileName = $data['npm'].'-KP-'.time().'-'.(str_replace(' ', '', $file->getClientOriginalName()));\n \n // set object to be save \n $turnitin_files->file_name = $fileName;\n $turnitin_files->file_display_name = $file->getClientOriginalName();\n $filePath = $this->getTurnitinFileFolderPath($turnitin_files) . $fileName;\n $turnitin_files->file_path = $filePath;\n $turnitin_files->uploaded_by = $user_id;\n $turnitin_files->uploaded_on = now();\n $turnitin_files->created_at = now();\n // dd($turnitin_files);\n // move to folder \n $file->move(public_path() . $this->getTurnitinFileFolderPath($turnitin_files), $fileName);\n \n // store the data into db\n $turnitin_files->save();\n DB::commit();\n // redirect\n $this->setFlashMessage('success', $turnitin_files->messages('success', 'create'));\n return redirect($this->getRoute('list'));\n } catch(\\Exception $e) {\n DB::rollback();\n return $this->parseErrorAndRedirectToRouteWithErrors($this->getRoute('create'), $e);\n }\n } else {\n $errors = $turnitin_files->errors();\n return $this->parseErrorAndRedirectToRouteWithErrors($this->getRoute('create'), $errors);\n }\n }", "title": "" }, { "docid": "e6512211c9411df06728237f9632794c", "score": "0.52068573", "text": "public function upload()\n {\n $fileName = uniqid() . $this->uploadFile->baseName\n . '.'\n . $this->uploadFile->extension;\n $path = self::UPLOAD_PATH . DIRECTORY_SEPARATOR . $fileName;\n $this->uploadFile->saveAs($path);\n $this->file = $fileName;\n }", "title": "" }, { "docid": "42f36d518e90225f92c219cc2c838ddd", "score": "0.51943254", "text": "public function store(Request $request)\n {\n if(Input::hasFile('archivo')){\n\n $file=Input::file('archivo'); // para guardar el archivo temporal\n $path = Input::file('archivo')->getRealPath(); // para el archivo excel luego recorrerlo\n\n $nombre_original=$file->getClientOriginalName(); // el nombre del archivo\n $extension=$file->getClientOriginalExtension(); // la extencion del archivo\n $r1=Storage::disk('equipo')->put($nombre_original, \\File::get($file) ); // donde guardo el archivo \n \n $data = Excel::load($path, function($reader) { \n })->get(); \n\n $mytime = Carbon::now('America/bogota');\n $fecha_ingreso=$mytime->toDateTimeString();\n\n if(!empty($data) && $data->count()){\n foreach ($data as $key => $value) {\n DB::table('equipo')->insert(['tipo_equipo_id' =>$value->tipo_equipo_id,\n 'nombre_equipo' => $value->nombre_equipo,'nombre_usuario'=>$value->nombre_usuario,\n 'marca'=>$value->marca,'modelo_equipo'=>$value->modelo_equipo,'sistema'=>$value->sistema,\n 'procesador'=>$value->procesador,'ram'=>$value->ram,'discoduro'=>$value->discoduro,\n 'ip'=>$value->ip,'serial_sistema'=>$value->serial_sistema,'marca_procesador'=>$value->marca_procesador,\n 'marca_sistema'=>$value->marca_sistemas,'estado_id'=>$value->estado_id,\n 'fecha_crea'=>$fecha_ingreso\n ]);\n\n\n }\n return back()->with('info','cargado Exitosamente');\n }\n\n }\n }", "title": "" }, { "docid": "2e5decff4ebf4b90ee54bdbb397bcae8", "score": "0.51941645", "text": "public function upload_files() {\n\n $input = Input::all();\n\n $caso = $this->casoRepository->findWithoutFail($input['caso_id']);\n\n if(!Auth::user()->can('update',$caso)){\n return $this->sendError('No tiene permiso para subir archivos');\n }\n\n if(Input::hasFile('file')) {\n\n $file = Input::file('file');\n\n $folder = storage_path('uploads');\n $filename = $file->getClientOriginalName();\n\n $date_append = date(\"Y-m-d-His-\");\n $upload_success = Input::file('file')->move($folder, $date_append.$filename);\n\n if( $upload_success ) {\n\n $public = Input::get('public');\n if(isset($public)) {\n $public = true;\n } else {\n $public = false;\n }\n\n $upload = Upload::create([\n \"name\" => $filename,\n \"path\" => $date_append.$filename,\n \"extension\" => pathinfo($filename, PATHINFO_EXTENSION),\n \"caption\" => \"\",\n \"hash\" => \"\",\n \"isPublic\" => $public,\n \"user_id\" => Auth::id(),\n ]);\n // apply unique random hash to file\n while(true) {\n $hash = strtolower(str_random(20));\n if(!Upload::where(\"hash\", $hash)->count()) {\n $upload->hash = $hash;\n break;\n }\n }\n $upload->save();\n\n \\DB::table('casos_uploads')->insert([\n 'caso_id' => $input['caso_id'],\n 'upload_id' => $upload->id,\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 return response()->json([\n \"status\" => \"success\",\n \"upload\" => $upload\n ], 200);\n } else {\n return response()->json([\n \"status\" => \"error\"\n ], 400);\n }\n } else {\n return response()->json('error: upload file not found.', 400);\n }\n }", "title": "" }, { "docid": "06441758bc11e35f3b159743cbe85155", "score": "0.5193907", "text": "public function store(Request $request)\n {\n $f = $_FILES['fileToUpload'];\n $path = $request->file('fileToUpload')->getRealPath();\n $file = new File([\n 'filename' => $f['name'],\n 'path' => $path,\n 'mime'=> $f['type'],\n 'size'=> $f['size'],\n ]);\n\n $request->validate([\n 'fileToUpload' => 'required|file|max:1024',\n ]);\n\n if($request->fileToUpload->storeAs('logos',$file['filename'])) {\n $work = new Work([\n 'titulo' => $request->get('titulo'),\n 'tema'=> $request->get('tema'),\n 'palavras_chaves' => $request->get('palavras_chaves'),\n 'resumo' => $request->get('resumo'),\n 'data_apresentacao' => $request->get('data_apresentacao'),\n 'instituicao_id' => $request->get('instituicao_id'),\n 'curso_id' => $request->get('curso_id'),\n 'professor_id' => $request->get('professor_id'),\n 'aluno1_id' => $request->get('aluno1_id'),\n 'aluno2_id' => $request->get('aluno2_id'),\n 'tipo_trabalho_id' => $request->get('tipo_trabalho_id')\n ]);\n if($file->save()) {\n $work->arquivo_id = $file->id;\n if($work->save()) {\n return back()->with('success','Trabalho submetido com sucesso!');\n } else {\n Storage::delete($f->filename);\n }\n\n }else {\n Storage::delete($f->filename);\n }\n\n }else {\n return back()->with('error','Erro ao submeter trabalho!');\n }\n }", "title": "" }, { "docid": "c8efc99271252456081c3b52edf1f691", "score": "0.51931316", "text": "private function uploadFiles($fileInput,$model,$key)\n {\n $filepond = app(Filepond::class);\n $files = $fileInput;\n if(is_iterable($files)){\n foreach ($files as $item){\n $path = $filepond->getPathFromServerId($item);\n $file = $path;\n $enc = md5(time());\n $finalLocation = \"uploads/{$enc}{$file}\";\n $from = '/filepond/temp/'.$file;\n $size = Storage::disk('upload')->size($from);\n $extArray = explode('.',$file);\n $ext = end($extArray);\n if(!in_array($ext,[\"7z\",\"3gp\",\"ai\",\"asf\",\"avi\",\"bin\",\"bmp\",\"bz2\",\"c\",\"cpp\",\"doc\",\"docx\",\"dwg\",\"eot\",\"epub\",\"f\",\"flv\",\"gif\",\"gz\",\"html\",\"ico\",\"jar\",\"jpg\",\"jpeg\",\"m4v\",\"mdb\",\"mkv\",\"mov\",\"mp4\",\"mp4a\",\"mp3\",\"mpeg\",\"mpga\",\"odt\",\"oga\",\"ogg\",\"ogv\",\"p\",\"pdf\",\"png\",\"ppt\",\"pptx\",\"psd\",\"qt\",\"rar\",\"rtf\",\"sql\",\"svg\",\"swf\",\"tar\",\"tiff\",\"ttf\",\"txt\",\"vcf\",\"wav\",\"webm\",\"webp\",\"xls\",\"xlsx\",\"xml\",\"xz\",\"zip\"])){\n Storage::disk('upload')->delete($from);\n continue;\n }\n Storage::disk('upload')->move($from, $finalLocation);\n File::create([\n 'user_id' => user()->id,\n $key => $model->id,\n 'url' => $finalLocation,\n 'name' => $enc.$file,\n 'size' => $size,\n 'type' => $ext\n ]);\n }\n }\n }", "title": "" }, { "docid": "8ee79fdd05894106a26a30835e448d58", "score": "0.51842505", "text": "public function uploadFile()\n\t{\n\t\t$config\t\t=\tFD::config();\n\t\t$limit\t\t=\t$config->get($type . '.attachments.maxsize');\n\n\t\t// Set uploader options\n\t\t$options\t=\tarray(\n\t\t\t\t\t\t\t'name' => 'file',\n\t\t\t\t\t\t\t'maxsize' => $limit . 'M'\n\t\t\t\t\t\t);\n\n\t\t// Let's get the temporary uploader table.\n\t\t$uploader \t\t\t= FD::table('Uploader');\n\t\t$uploader->user_id\t= $this->plugin->get('user')->id;\n\n\t\t// Pass uploaded data to the uploader.\n\t\t$uploader->bindFile($data);\n\t\t$state \t= $uploader->store();\n\t}", "title": "" }, { "docid": "a9f7b0e3850f20ace2ea8e39bf8e6964", "score": "0.5176597", "text": "public function storeUpload ( string $name , string $filename ){}", "title": "" }, { "docid": "bcc441bf7984607ba6b6dd6c98f9ddbb", "score": "0.5172794", "text": "protected function writeSysFileStorageRecords() {}", "title": "" }, { "docid": "dc03d6e833913c851a7849887556952e", "score": "0.516853", "text": "public function postUpload(Request $request)\n {\n if(\\App\\Permission::SubMenu('23',Auth::user()->role_id) == 0){\n return redirect()->back();\n } \n $kosong = 0;\n $number = 0;\n $results=\\Excel::load($request->file('file')->path(), function($reader) {})->get();\n foreach($results->toArray() as $row)\n {\n if(count($row)!=4){\n \n $kosong++;\n continue;\n \n }\n if($row[0] == null || $row[1] == null || $row[2] == null || $row[3]==null){\n ++$kosong;\n continue;\n }else{\n $checkgym = Gym::find($row[1]);\n if(is_null($checkgym)){\n $kosong++;\n }else\n {\n $member = Member::where('slug','=',$row[0])->orWhere('card',$row[0])->first();\n if (is_null($member)) {\n continue;\n }\n\n $member->processAttendance($row[1], $row[2]);\n $member->processAttendance($row[1], $row[3]);\n\n ++$number;\n }\n }\n }\n \n\n $request->session()->flash('alert-success', $number.' Berhasil di import');\n return redirect('/u/members');\n }", "title": "" }, { "docid": "bec55d1c98fab7ec19f2ba4e6a399350", "score": "0.51660347", "text": "public static function uploadExcel($excel, $folder)\n {\n $name = time() . $excel->getClientOriginalName();\n \n // file path the file is stored\n $filePath = $folder . '/' . $name;\n \n // store file to aws s3\n Storage::disk('public')->put($filePath, file_get_contents($excel));\n // Set file visibility to public\n Storage::disk('public')->setVisibility($filePath, 'public');\n\n // url of the stored file from s3\n // $url = 'https://s3.' . env('AWS_DEFAULT_REGION') . '.amazonaws.com/' . env('AWS_BUCKET') . '/' . $filePath;\n $url = config('app.url') . '/storage/'.$filePath;\n // dd($url);\n return $url;\n }", "title": "" }, { "docid": "c8058d5df9f3bffafa57f159f2d9cd99", "score": "0.516206", "text": "public static function saveAppointmentsFileByHistory($filePath,$contents){\n $time = time();\n $file = pathinfo($filePath);\n $fileNamebase = $file['filename'];\n $filePath = $file['dirname'].'/'.$fileNamebase.'_'.$time.'.json';\n if(!file_exists($filePath)){\n self::writeFile($filePath,'');\n }\n self::writeFile($filePath,$contents);\n }", "title": "" }, { "docid": "f7e204c5b9406ac255bc97efbe4b9c4c", "score": "0.5156319", "text": "function putFileInStorage($file, $path)\n{\n $filename = uniqid() . '.' . $file->getClientOriginalExtension();\n $file->storeAs($path, $filename);\n return $filename;\n}", "title": "" }, { "docid": "56bd1af29fcff59cf6c0089069b1ac04", "score": "0.51498556", "text": "public function storeResumeFile()\n\t\t{\n\t\t\t// check to make sure file was posted\n\t\t\tif (!isset($_FILES['resume'])) {\n\t\t\t\t$this->throwJsonError(500, 'No resume file found.');\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// Get the PHP assigned file name & location from the RAM storage of the file\n\t\t\t$tmp_name = $_FILES['resume']['tmp_name'];\n\t\t\t// Get the original file name as uploaded\n\t\t\t$name = $_FILES['resume']['name'];\n\t\t\t// To ensure all files are unique, get the timestamp of the uplaod.\n\t\t\t$timestamp = date('YmdHis');\n\t\t\t// Determine the server location for the file to be stored.\n\t\t\t$location = \"$this->uploads_dir/$timestamp-$name\";\n\t\t\t// Store the file.\n\t\t\tif (move_uploaded_file($tmp_name, $location)) {\n\t\t\t\tchmod($location, 0666);\n\t\t\t\treturn $location;\n\t\t\t}\n\t\t\treturn $tmp_name;\n\t\t}", "title": "" }, { "docid": "51b59d21911f4fdad20f86955dda8b63", "score": "0.51421624", "text": "protected function uploadFile ()\n {\n if ($this->exists($this->file['tmp_name'])) {\n if ($this->validator->validateFile($this->file)) {\n move_uploaded_file($this->file['tmp_name'], 'tmp_files/' . $fileName = $this->generateFileName($this->file['name']));\n $this->insertFileIntoDatabase($fileName);\n }\n }\n }", "title": "" }, { "docid": "ce1b606cbdeff8f0ffaef4f8e6feb8ba", "score": "0.51394737", "text": "public function upload($files)\r\n {\r\n $storage = new \\Upload\\Storage\\FileSystem($this->upload_dir);\r\n\r\n $uploaded_files = [];\r\n\r\n foreach($files as $key => $value){\r\n $file = new \\Upload\\File($key, $storage);\r\n\r\n $new_filename = uniqid();\r\n $file->setName($new_filename);\r\n\r\n // Validate file upload\r\n // MimeType List => http://www.iana.org/assignments/media-types/media-types.xhtml\r\n $file->addValidations(array(\r\n\r\n //You can also add multi mimetype validation\r\n # We support commonly used MIME type extensions\r\n new \\Upload\\Validation\\Mimetype(array(\r\n 'image/png',\r\n 'image/jpeg',\r\n 'image/gif',\r\n 'application/pdf',\r\n 'text/csv',\r\n 'text/plain', # .txt\r\n 'application/msword', # .doc\r\n 'application/vnd.ms-excel', # .xls\r\n 'application/vnd.ms-powerpoint', # .ppt\r\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # .xlsx\r\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', # .docx\r\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation', # .pptx\r\n )),\r\n // Ensure file is no larger than 5M (use \"B\", \"K\", M\", or \"G\")\r\n // new \\Upload\\Validation\\Size('20M')\r\n ));\r\n\r\n\r\n try{\r\n $file->upload();\r\n\r\n $uploaded_files[$key] = $file->getNameWithExtension();\r\n }\r\n catch(\\Exception $e){\r\n return $e->getMessage();\r\n }\r\n }\r\n\r\n return $uploaded_files;\r\n\r\n }", "title": "" }, { "docid": "c5dbacd461ad5e1b0c77f94395e2cf7c", "score": "0.51249367", "text": "public function store(Request $request)\n {\n $path = public_path().'/uploads/';\n $files = $request->file('file');\n foreach($files as $file){\n $fileName = $file->getClientOriginalName();\n $file->move($path, $fileName);\n // Storage::disk('local2')->put($fileName, \\File::get($file));\n $url=$fileName;\n $seccion = Auth::user()->type;\n $imagen = array('url'=>$url,'seccion'=>$seccion);\n $imagenes = new imagenes ($imagen);\n $estado = $imagenes->save();\n \n }\n }", "title": "" }, { "docid": "fbe6184da65e9ecf48d5caf5b3cea6f9", "score": "0.5114951", "text": "function upload()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('key',\t\t\tNOTSET,'any');\n\t\t$args->set('format_id', \tNOTSET,'any');\t\t\n\t\t$args->set('filename', \t\tNOTSET,'any');\t\t\n\t\t$args->set('userfile', \t\tNOTSET,'any');\t// must be the same declares in $_Files['userfile']\t\n\t\t$args->set('header', \t\t'N','any');\t\n\t\t$args->set('duplicate', \t'N','any');\n\t\t$args->set('related', \t\t'N','any');\t\t\t\t\t\t\t\n\t\t$args = $args->get(func_get_args());\n\n $GLOBALS['appshore']->add_xsl('lib.import');\n $GLOBALS['appshore']->add_xsl('lib.base'); \n \n // set up the different files format supported\n\t\t$fileFormat = array(\n\t array ( 'format_id' => ',', \t\t'format_name' => lang('Generic CSV file with comma delimiter')),\n\t array ( 'format_id' => ';', \t\t'format_name' => lang('Generic CSV file with semicolon delimiter')),\n\t array ( 'format_id' => ' ', \t\t'format_name' => lang('Generic CSV file with space delimiter')),\n\t array ( 'format_id' => chr(9), \t\t'format_name' => lang('Generic CSV file with tab delimiter'))\n\t ); \n\n#\t\t$duplicates = array(\n#\t array ( 'duplicate_id' => 'IG', \t\t'duplicate_name' => lang('Ignore new record')),\n#\t array ( 'duplicate_id' => 'MN', \t\t'duplicate_name' => lang('Merge records - new record prevails')),\n#\t array ( 'duplicate_id' => 'MO', \t\t'duplicate_name' => lang('Merge records - old record prevails')),\n#\t array ( 'duplicate_id' => 'RE', \t\t'duplicate_name' => lang('Replace old record'))\n#\t ); \n\n#\t\t$mapping = array(\n#\t array ( 'mapping_id' => 'I', \t\t'duplicate_name' => lang('Ignore')),\n#\t array ( 'duplicate_id' => 'M', \t\t'duplicate_name' => lang('Merge')),\n#\t array ( 'duplicate_id' => 'R', \t\t'duplicate_name' => lang('Replace'))\n#\t ); \n\t \n\t\t// test of RBAC level upon record owner, if no READ_WRITE then go to the View display\n\t\tif ( !$GLOBALS['appshore']->rbac->check( $this->appRole, RBAC_USER_WRITE ) || !$GLOBALS['appshore']->rbac->checkPermissionOnFeature($this->appRole, 'import'))\n {\n\t\t\tmessagebox( ERROR_PERMISSION_DENIED, ERROR);\n\t\t\treturn execMethod( $this->appName.'.base.start', null, true);\n }\n\n \t\tswitch($args['key'])\n\t\t{\n\t\t\tcase 'Next':\n\t\t\t\n\t\t\t\t// test if upload gone well\n\t\t\t\tif (is_uploaded_file( $_FILES['userfile']['tmp_name']))\n\t\t\t\t{ \n\t\t\t\t\tmove_uploaded_file( $_FILES['userfile']['tmp_name'], $_FILES['userfile']['tmp_name'].'.imp');\n\t\t\t\t\t$args['tmp_name'] = $_FILES['userfile']['tmp_name'].'.imp';\n\t\t\t\t\t$_SESSION['import']['format_id'] = $args['format_id'] ;\n\t\t\t\t\t$_SESSION['import']['filename'] = $args['filename'];\t\t\t\t\t\t\t\n\t\t\t\t\t$_SESSION['import']['userfile'] = $_FILES['userfile']['name'];\t\t\t\t\t\t\t\n\t\t\t\t\t$_SESSION['import']['tmp_name'] = $_FILES['userfile']['tmp_name'].'.imp';\t\t\t\t\t\t\n\t\t\t\t\t$_SESSION['import']['header'] = $args['header'];\n\n\t\t\t\t\tif( $this->isDuplicate )\t\t\n\t\t\t\t\t\t$_SESSION['import']['duplicate'] = $args['duplicate'];\t\n\t\t\t\t\telse\n\t\t\t\t\t\tunset($_SESSION['import']['duplicate']);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tif( $this->isRelated )\t\t\n\t\t\t\t\t\t$_SESSION['import']['related'] = $args['related'];\t\n\t\t\t\t\telse\n\t\t\t\t\t\tunset($_SESSION['import']['related']);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tunset( $args['key']);\t\t\t\t\t\t\n\t\t\t\t\t$result = $this->selectFields( $args);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t messagebox( ERROR_INVALID_DATA, ERROR);\t\n\t $result['error']['userfile'] = ERROR_MANDATORY_FIELD;\t\t\t\t\n\t\t\t\t\t$result['action']['import'] = 'upload';\n\t\t\t\t\t$result['format'] = $fileFormat;\t\n\t\t\t\t}\n\t\t\t\t$result['import'] = $_SESSION['import'];\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t$result['action']['import'] = 'upload';\n\t\t\t\t$result['format'] = $fileFormat;\n\t\t\t\t$result['duplicates'] = $duplicates;\n\t\t\t\t$result['import'] = $_SESSION['import'];\t\n\t\t\t\t$result['import']['isDuplicate'] = $this->isDuplicate;\t\n\t\t\t\t$result['import']['isRelated'] = $this->isRelated;\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\n return $result;\n }", "title": "" }, { "docid": "280bc9427e31981c225cca7b0b6de410", "score": "0.5112256", "text": "public function _fuploaded()\r\n\t{}", "title": "" }, { "docid": "d4da3390428755f6af050ccc11983fae", "score": "0.5100237", "text": "public function export_addFilesFromSysFilesRecords() {}", "title": "" }, { "docid": "66619e2dae751cf0bfd63a3b7862d8ca", "score": "0.5093075", "text": "public function store(Request $request)\n {\n $attr = $request->validate([\n 'case_list_id' => 'required',\n 'file_upload' => 'required',\n 'time_upload' => 'required',\n ]);\n\n if ($request->hasFile('file_upload')) {\n $files = $request->file('file_upload');\n foreach ($files as $file) {\n $name = date('dmYHis') . '-' . $file->getClientOriginalName();\n $filename = 'files/report-satu/' . $name;\n\n if (in_array($file->extension(), ['jpeg', 'jpg', 'png'])) {\n \\Image::make($file)->fit(600, null)->save(\\public_path('storage/files/report-satu/' . $name), 90);\n } else {\n $file->storeAs('files/report-satu/', $name);\n }\n\n ReportSatu::create([\n 'case_list_id' => $request->case_list_id,\n 'file_upload' => $filename,\n 'time_upload' => Carbon::now()\n ]);\n }\n }\n\n $caseList = CaseList::find($request->case_list_id);\n if ($caseList->ia_status == 0) {\n $caseList->update([\n 'ia_amount' => $request->ia_amount,\n 'ia_status' => 1,\n 'ia_date' => Carbon::now(),\n 'now_update' => Carbon::now(),\n 'pr_limit' => Carbon::now()->addDay(14),\n 'file_status_id' => 3\n ]);\n } else {\n $caseList->update([\n 'ia_amount' => $request->ia_amount,\n ]);\n }\n\n\n return back()->with('success', 'Report satu has been uploaded');\n }", "title": "" }, { "docid": "28bbf5ca6d88088ac3776e41f6aabb07", "score": "0.50895226", "text": "public function storeFiles(\\Illuminate\\Http\\UploadedFile $file): array\n {\n $extension = $file->getClientOriginalExtension();\n $fileHashName = explode('.', $file->hashName())[0];\n $fileName = $fileHashName.'.'.$extension;\n \n return [\n 'file_hash_name' => $fileHashName,\n 'original_file_path' => $this->saveUploadedFile($file, $fileName, 'original'),\n 'modified_file_path' => $this->storeExportFile($fileName, 'modified')\n ];\n }", "title": "" }, { "docid": "f2e8164f66fcff70c01aa719f3f49ab5", "score": "0.5084715", "text": "private function handle_uploaded_excel() {\n\n\t\t\n\t\t$CI = $this->CI;\n\t\t\n $upload_path \t\t\t= $this->upload_location;\n\n $config[\"upload_path\"] \t = $upload_path;\n $config[\"allowed_types\"] \t= \"xls|xlsx\";\n $config[\"max_size\"] \t\t = 10000;\n $config[\"max_width\"] \t\t= 200000;\n $config[\"max_height\"] \t = 200000;\n $config[\"encrypt_name\"] = TRUE;\n\n $CI->load->library(\"upload\", $config);\n $upload_data = NULL;\n\n // upload the image from input. (image data is in $_FILES)\n if (! $CI->upload->do_upload(\"excel_file\")) {\n\t\t\t\n log_message(\"error\", $CI->upload->display_errors());\n\t\t\t\n } else {\n // image data after upload.\n $upload_data = $CI->upload->data();\n }\n\n return $upload_data;\n }", "title": "" }, { "docid": "0215da74844855740f9aff88062b68ec", "score": "0.5083188", "text": "function uploadGSFile($col,$fn,$fsFile) {\n $path= pathinfo($fsFile,PATHINFO_DIRNAME);\n\n if(file_exists($fsFile)){\n \tchdir($path);\n \t$col->deleteOne(array('filename' => $fn));\n\t//exec(\"cd $path;mongofiles -h mmb.pcb.ub.es -u dataLoader -p mdbwany2015 --authenticationDatabase admin -d restcastemp -r put $fn\");\n\t//$col->storeBytes(file_get_contents(\"$fsFile\"), array('filename'=>$fn));\n\t$col->storeFile($fsFile,array('filename'=>$fn));\n\treturn 1;\n }else{\n\t$_SESSION['errorData']['mongoDB'][]= 'File ' . $fn . ' not stored. Temporal '. $fsFile . ' not found';\n\treturn 0;\n }\n}", "title": "" }, { "docid": "be0fbd1a7f83d742b13b9c21b5ae06f0", "score": "0.5067612", "text": "public function insertExcel()\n {\n $json = file_get_contents('php://input');\n $data = json_decode($json);\n // Define the Base64 value you need to save as an image\n $b64 = explode(',', $data);\n\n // Obtain the original content (usually binary data)\n $bin = base64_decode($b64[1]);\n $filecontent = file_put_contents('evenement.xlsx', $bin);\n\n\n $allowed_ext = ['xls', 'csv', 'xlsx'];\n $filename = 'evenement.xlsx';\n $check_ext = explode(\".\", $filename);\n $file_ext = end($check_ext);\n \n\n if (in_array($file_ext, $allowed_ext)) {\n $targetPath = './evenement.xlsx';\n $spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($targetPath);\n $data = $spreadsheet->getActiveSheet();\n \n $highestRow = $data->getHighestRow();\n\n for($row=4; $row < $highestRow ; $row++){\n \n $number_sign = $data->getCellByColumnAndRow(1, $row)->getValue(); \n\n $first_time = $data->getCellByColumnAndRow(4, $row)->getValue();\n $min = $first_time * 24 * 60;\n $seconds = $min *60;\n $milliseconds = $seconds * 1000;\n $timefirst = ($min%60). ':'.($seconds%60).(($milliseconds===0)?'':'.'.rtrim($milliseconds%1000, '0'));\n \n $second_time = $data->getCellByColumnAndRow(5, $row)->getValue();\n $min = $second_time * 24 * 60;\n $seconds = $min *60;\n $milliseconds = $seconds * 1000;\n $timesecond = ($min%60). ':'.($seconds%60).(($milliseconds===0)?'':'.'.rtrim($milliseconds%1000, '0'));\n\n $average = $data->getCellByColumnAndRow(6, $row)->getCalculatedValue();\n $min = $average * 24 * 60;\n $seconds = $min *60;\n $milliseconds = $seconds * 1000;\n $timeaverage = ($min%60). ':'.($seconds%60).(($milliseconds===0)?'':'.'.rtrim($milliseconds%1000, '0'));\n \n $insertTrial = new Trial(array('number_sign' => $number_sign, 'first_time' => $timefirst, 'second_time' => $timesecond, 'average' => $timeaverage));\n $manager = new TrialManager();\n $trials = $manager->insertionTrial($insertTrial);\n \n }\n } else {\n echo 'invalid file';\n }\n }", "title": "" }, { "docid": "a715dda65541ee8d576fb1f07caf4649", "score": "0.5067348", "text": "public function upload_img()\r\n {\r\n if(!is_dir('./uploads/groups'))mkdir(('./uploads/groups')); \r\n if (!empty($_FILES)) \r\n { \r\n $tempFile = $_FILES['file']['tmp_name']; \r\n\r\n $file_info = explode('.',$_FILES['file']['name']);\r\n $file_ext = $file_info[1];\r\n\r\n $targetPath = './uploads/groups'; \r\n\r\n $newFile = time().'.'.$file_ext;\r\n \r\n $targetFile = $targetPath.$newFile; \r\n \r\n move_uploaded_file($tempFile,$targetFile); \r\n\r\n $this->output->set_output(json_encode($newFile));\r\n }\r\n }", "title": "" }, { "docid": "f3f1f4e663dde1eb05b56926d6c44b5c", "score": "0.5057441", "text": "public function save(Request $request)\n {\n //recupera archivo del form\n $file = $request->file('filexls');\n\n $nombre = $file->getClientOriginalName(); \n $carpeta =(string) Carbon::today();\n $carpeta = \\substr($carpeta,0,7);\n \n //indicamos que queremos guardar un nuevo archivo en el disco local\n $path = Storage::putFileAs($carpeta, $file, $nombre);\n\n $archivos = Archivo::all(); \n $band = true;\n foreach ($archivos as $archivo){\n if ($archivo->url == 'app/'.$path){\n $band = false;\n break;\n }\n \n }\n\n if($band){\n\n $archivo = new Archivo();\n $archivo->url = 'app/'.$path;\n $archivo->nombre = $nombre;\n $archivo->extension = strtolower( $file->getClientOriginalExtension());\n $archivo->descripcion = 'Archivo de afiliados activos en el SGAP ';\n $archivo->categoria='activos';\n \n \n\n //recupera el nombre del archivo\n \n if($archivo->extension==\"xlsx\"){\n Excel::import(new PersonasImport,$request->file('filexls'));\n \n $personas = PersonasSag::all();\n foreach( $personas as $per){\n if(trim($per->nombre) == 'nombre'){\n \n $per->delete();\n }\n }\n \n \n $archivo->save();\n\n $personas = PersonasSag::where('archivo_id',null)->get();\n foreach( $personas as $persona){\n $persona->archivo_id = $archivo->id;\n $persona->save();\n }\n return redirect('home')->with('success','ARCHIVO CARGADO EXITOSAMENTE!!!!!!');\n\n }else{\n return redirect('cargaxls')->with('success','LA EXTENSION DEL ARCHIVO NO ES SOPORTADA ,CARGUE UN ARCHIVO CORRECTO!!!!!!!!');\n \n }\n \n }else {\n\n return redirect('home')->with('success','ARCHIVO YA EXISTE');\n }\n \n }", "title": "" }, { "docid": "f2e392e46ad653d7799ce99779686b00", "score": "0.5055326", "text": "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "title": "" }, { "docid": "4852d8921ebad33f8919a6a87eaebbb1", "score": "0.5050361", "text": "public function storeUploadedFile($type, UploadedFile $uploadedFile, $newFilename = null, $unlinkAfterStore = false);", "title": "" }, { "docid": "1a75546dc004c885a66dcf6ba16541c8", "score": "0.5047792", "text": "function lzto_uploadFile(){\n Builder::newInstance()->saveUpload();\n}", "title": "" }, { "docid": "7d1261b50874caa619ca9276e956c9ed", "score": "0.50456077", "text": "private function _setFileObject() {\n try {\n $fileArry = $_FILES;\n $_FILES = array();\n\n $fName = $fType = $fTmpName = $fErr = $fSize = array();\n foreach ($fileArry as $key => $val) {\n $fArr = explode('_', $key);\n $fKey = $fArr[0];\n $fPos = $fArr[1];\n\n $fName[] = $val['name'];\n $fType[] = $val['type'];\n $fTmpName[] = $val['tmp_name'];\n $fErr[] = $val['error'];\n $fSize[] = $val['size'];\n\n $_FILES[$fKey] = array(\n 'name' => $fName,\n 'type' => $fType,\n 'tmp_name' => $fTmpName,\n 'error' => $fErr,\n 'size' => $fSize\n );\n }\n } catch (Exception $ex) {\n throw new Exception('Error in _setFileObject function - ' . $ex);\n }\n }", "title": "" }, { "docid": "d3f822ab14d7d08f4b26101cbefb700f", "score": "0.5044814", "text": "public function getUploadedFiles() {}", "title": "" }, { "docid": "195218f18699715cfb57857e461b4fb2", "score": "0.504228", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name'=>'required',\n 'description'=>'required',\n 'category' => 'required',\n 'end_at' => 'nullable|date',\n ]);\n\n $task = new Task([\n 'name' => $request->get('name'),\n 'description' => $request->get('description'),\n 'end_at' => $request->get('end_at'),\n 'category_id' => $request->get('category'),\n ]);\n $task->save();\n\n $files = null;\n\n $files = $request->file('files');\n\n if($files != null)\n {\n foreach ($files as $file)\n {\n $path = Storage::putFile('/'.auth()->user()->id.'/'.$task->id, $file);\n $fileDB = new \\App\\File();\n $fileDB->path = $path;\n $fileDB->name = $file->getClientOriginalName();\n $fileDB->save();\n\n $task->files()->attach($fileDB->id);\n }\n }\n\n return redirect(\"/categories/\". $task->category_id)->with('success', 'Task Created!');\n }", "title": "" }, { "docid": "1d4a8c9c568fac0e048955f45f80c6ab", "score": "0.50254625", "text": "public function store(Request $request){\n \tif ($request->form_type == 1) {\n\t \t$dir = 'files/';\n\t \t$files = $request->file('file');\n\t \tforeach ($files as $file) {\n \t\t\t// Subida del archivo al server\n\t \t\t$nombreFichero = $file->getClientOriginalName();\n\t \t\t$file->move($dir, $nombreFichero);\n\n\t \t\t// Se guarda la informacion de la imagen en la base de datos\n\t $archivo = new Archivo();\n\t $archivo->inmueble_id = $request->inmueble_id;\n\t $archivo->nombre = $nombreFichero;\n\t $archivo->save();\n\t \t};\n \t}\n\n \t// Guardamos la informacion del archivo en a base de datos\n\n\n\n }", "title": "" }, { "docid": "024628ba78d56e3974ecd8952b785a7c", "score": "0.50248826", "text": "public function store(Request $request) {\n $file = $request->file('file');\n $now = Carbon::now()->toFormattedDateString();\n \n $name = $now. $file->getClientOriginalName();\n $file->move('images',$name);\n Photo::create(['file'=>$name]);\n }", "title": "" }, { "docid": "1c14c512b5e201707cd1790bfa7f5039", "score": "0.5019271", "text": "function uploadFiles($filename, $filesize, $filetype, $section, $filedir, $appid) {\n // echo \"<br>File $fileName uploaded<br>\";\n $strQuery = \"INSERT INTO uploadedfiles set filename='$filename',size='$filesize', type='$filetype',section='$section',\n\t\t\t\t\t\tfiledir='$filedir', appid=$appid ON DUPLICATE KEY UPDATE filename='$filename',size='$filesize', \"\n . \" type='$filetype',section='$section',\n\t\t\t\t\t\tfiledir='$filedir', appid=$appid\";\n\n return $this->query($strQuery);\n }", "title": "" }, { "docid": "333b8e66677e524edf3bc585cc32a6b0", "score": "0.50179327", "text": "public function upload_local_file()\n\t{\n if ($this->local_file) {\n \t$s3 = AWS::createClient('s3');\n $s3->putObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location,\n 'SourceFile' => $this->local_file,\n 'ContentType' => $this->mime,\n 'StorageClass' => $this->storage,\n 'ServerSideEncryption' => $this->encryption\n )\n );\n }\n\t}", "title": "" }, { "docid": "85f90b6cd2a9ebcac5e380bec283591c", "score": "0.5016652", "text": "public function plot_schedules_upload()\n\t{\n\t\t$numOfEmp \t\t= 0;\n \t$foundError \t= False;\n \t\n \t$excelEmpName \t= array();\n \t$result \t\t= 0;\n\n \t$fileName = $_FILES['file']['name'];\n\t\t$action = $_POST['action'];\n\t\t\n\n\t\t\t$config['upload_path'] \t\t= './public/import_template/'; \n\t $config['file_name'] \t\t= $fileName;\n\t $config['allowed_types'] \t= 'xlsx|xls';\n\t $config['max_size'] \t\t= 10000;\n\n\t $this->load->library('upload');\n\t $this->upload->initialize($config);\n\t if(! $this->upload->do_upload('file'))\n\t \t$this->upload->display_errors();\n\n\t $media = $this->upload->data('file');\n\t $inputFileName = './public/import_template/'.$fileName;\n\t $imagepath = \"user.png\";\n\t try {\n\t $inputFileType \t= IOFactory::identify($inputFileName);\n\t $objReader \t\t= IOFactory::createReader($inputFileType);\n\t $objPHPExcel \t= $objReader->load($inputFileName);\n\t } catch(Exception $e) {\n\t\t\t echo \"<script>alert('Invalid file format.Please use the template')</script>\";\n\t\t\t\t\techo \" <script type='text/javascript'>\n\t\t\t\t\t\t\t open(location, '_self').close();\n\t\t\t\t\t\t\t</script>\"; \t\n\t\t\t \t }\n\t \t$objPHPExcel->setActiveSheetIndex(0);\n\t\t\t\t$sheet \t\t\t= $objPHPExcel->getSheet(0);\n\t $highestRow \t= $sheet->getHighestRow();\n\t $highestColumn \t= $sheet->getHighestColumn();\n\t $colNumber \t\t= PHPExcel_Cell::columnIndexFromString($highestColumn);\n\t //get the number of license\n\t \t$data \t\t= $this->employee_model->get_employeee_license(1);\n\t \t$numLicense = $data[0]->myhris;\n\t //end of get the number of license\n\n\t //count the number of isEmployee\n\t \t$numisEmployee = $this->employee_model->get_employee_isEmployee(1);\n\t \n\t //number of import data\n\t \t$numImportexcel\t\t= $highestRow - 1;\n\t //$numisEmployee + $numImportexcel\n\t \t$totalEmployee\t\t= $numImportexcel + $numisEmployee;\n\t //Allowed\n\t \t$allowedEmployee \t= $numLicense - $numisEmployee;\n\t\tif(isset($_POST[\"import\"]))\n\t {\n\t \n\t\t\tif($action == 'Save'){\n //For license purpose\n\t if($totalEmployee <= \t$numLicense){\n\t \t$forNull \t\t= 'Value cannot be Null';\n\t $forDate \t\t= 'Invalid Date';\n\t $forDate \t\t= 'Format:yyyy-mm-dd';\n\t $forShift \t\t= 'Invalid Shift Category';\n\t $forTime \t\t= 'Invalid Time Format please use the hh:mm';\n\t $forRestday \t= 'Invalid Rest day option. Please use only the yes or no options';\n\t $company_error = 'Employee ID doesnt exist in employee ';\n\t\t $styleArray = array(\n\t\t\t\t 'font' => array(\n\t\t\t\t 'bold' => true,\n\t\t\t\t 'color' => array('rgb' => 'FF0000')\n\t\t\t\t ));\n\t\t $nameIndex\t\t= 0;\n\t\t\t\t //check and rewrite the error of imported excel\n\t\t for ($row = 2; $row <= $highestRow; $row++){\n\t\t \t$colLetter \t\t= 'A';\n\t\t \t$companyTemp \t= 0;\n\t\t \t$divisionTemp \t= 0;\n\t\t \t$departmentTemp = 0;\n\t\t \t$sectionTemp \t= 0;\n\t\t \t$isSubsection \t= false;\n\t\t\t\t \t$isDivision \t= false;\n\t\t for($col = 0; $col < $colNumber; $col++){\n\t\t \t$colrow = $colLetter.(string)$row; \n\t\t\t\t\t $getCellvalue = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col, $row)->getValue();\n\t\t\t\t\t \n\t\t\t\t\t \tif(empty($getCellvalue)){//If null\n\t\t\t\t\t \t\tif($col == 0 || $col == 2 || $col == 3 || $col == 4 || $col == 5 || $col == 6){ // for null\n\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $forNull);\n\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t \telse{\n\t\t\t \t\t\tif($col==2)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$date =$objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col, $row)->getValue();\n\t\t\t\t\t\t\t\t\t\t\t$check = $this->validateDate($date);\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\tif($check === false){\n\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $date.' -> '.$forDate);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t if($col==0)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$col_0 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue();\n\t\t\t\t\t\t\t \t$employee_companylist =$col_0;\n\t\t\t\t\t\t\t \t$resultemployee_companylist = $this->payroll_emp_loan_enrolment_model->employee_company_checke_ws_model($employee_companylist);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($resultemployee_companylist === false){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $employee_companylist.' -> '.$company_error);//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\n\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\t\t if($col==3)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$col_3 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, $row)->getValue();\n\t\t\t\t\t\t\t \tif($col_3 != 'regular' AND $col_3 != 'restday' AND $col_3 != 'halfday' \n\t\t\t\t\t\t\t \t\tAND $col_3 != 'regular-holiday'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $col_3.' -> '.$forShift);//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\n\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\t\t if($col==5)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$col_5 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(5, $row)->getValue();\n\t\t\t\t\t\t\t \t$time_checker = preg_match(\"/^(?:2[0-3]|[01][0-9]|[0-9]):[0-5][0-9]$/\", $col_5);\n\t\t\t\t\t\t\t \tif($time_checker==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $col_5.' -> '.$forTime);//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\n\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\t\t if($col==6)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$col_6 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(6, $row)->getValue();\n\t\t\t\t\t\t\t \t$time_checker = preg_match(\"/^(?:2[0-3]|[01][0-9]|[0-9]):[0-5][0-9]$/\", $col_6);\n\t\t\t\t\t\t\t \tif($time_checker==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $col_6.' -> '.$forTime);//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\n\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\t\t if($col==4)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$col_4 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(4, $row)->getValue();\n\t\t\t\t\t\t\t \t$col_3 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, $row)->getValue();\n\t\t\t\t\t\t\t \tif($col_4 != 'yes' AND $col_4 != 'no'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $col_4.' -> '.$forRestday);//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\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\telse{ \n\t\t\t\t\t\t\t\t\t\t\tif($col_3!='restday' AND $col_4=='yes'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCellValueByColumnAndRow($col, $row, $col_4.' -> '.'Please check the shift category. You can only use the option yes if the shift category is restday');//doesn't exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($colrow)->applyFromArray($styleArray)->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foundError = True;\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}\n\t\t\t\t\t\t\t }\n\n\n\n\t\t\t \t}\n\t\t\t \t\t\n\t\t \t$colLetter++;// increment A\n\t\t\t\t\t}//end of col for loop\n\t\t }//end of row for loop\n\t\t \t\t\n\t\t\t\t\n\t\t //End of check and rewrite the error of imported excel\n\t\t if($foundError==False){ // insert to employee_info table\n\t\t \n\t\t\t\t\t\tfor ($row = 2; $row <= $highestRow; $row++){\n\t\t\t\t\t\t\t$numOfEmp++; \n\t\t\t\t\t\t\t$rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row,\n\t\t NULL,TRUE,FALSE);\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t $dt = $date_array = getdate();\n\t\t\t\t\t\t\t\t $formated_date = \"ws\";\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['mon'];\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['mday'];\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['year'] . \"_\";\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['hours'];\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['minutes'];\n\t\t\t\t\t\t\t\t\t\t$formated_date .= $date_array['seconds'];\n\t\t \t\t\t\t$date_created \t= date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t $date_o = $rowData[0][2];\n\t\t\t\t\t\t\t\t $month = date('m', strtotime($date_o));\n\t\t\t\t\t\t\t\t $day = date('d', strtotime($date_o));\n\t\t\t\t\t\t\t\t $year = date('Y', strtotime($date_o));\n\t\t\t\t\t\t\t\t $tablename = 'working_schedule_'.$month;\n\t\t\t\t\t\t\t\t $company_id = $this->plot_schedules_model->get_company($rowData[0][0]);\n\t\t\t\t\t\t\t\t if($rowData[0][4]=='no'){ $restday =0; } else{ $restday =1;}\n\t\t\t\t\t\t\t\t \t$data = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'date'\t\t\t\t\t=>\t\t\t\t$rowData[0][2],\n\t\t\t\t\t\t\t\t\t\t\t\t'company_id'\t\t\t=>\t\t\t\t$company_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'employee_id'\t\t\t=>\t\t\t\t$rowData[0][0],\n\t\t\t\t\t\t\t\t\t\t\t\t'mm'\t\t\t\t\t=>\t\t\t\t$month,\n\t\t\t\t\t\t\t\t\t\t\t\t'dd'\t\t\t\t\t=>\t\t\t\t$day,\n\t\t\t\t\t\t\t\t\t\t\t\t'yy'\t\t\t\t\t=>\t\t\t\t$year,\n\t\t\t\t\t\t\t\t\t\t\t\t'shift_in'\t\t\t\t=>\t\t\t\t$rowData[0][5],\n\t\t\t\t\t\t\t\t\t\t\t\t'shift_out'\t\t\t\t=>\t\t\t\t$rowData[0][6],\n\t\t\t\t\t\t\t\t\t\t\t\t'plotter'\t\t\t\t=>\t\t\t\t$this->session->userdata('employee_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t'group_id'\t\t\t\t=>\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t'shift_category'\t\t=>\t\t\t\t$rowData[0][3],\n\t\t\t\t\t\t\t\t\t\t\t\t'restday'\t\t\t\t=>\t\t\t\t$restday,\n\t\t\t\t\t\t\t\t\t\t\t\t'date_plotted'\t\t\t=> \t\t\t\tdate('Y-m-d')\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t \t$where = array('employee_id'=>$rowData[0][0],'company_id'=>$company_id,'date'=>$date_o,'group_id'=>0);\n\t\t\t\t\t\t\t\t \t$this->db->where($where);\n\t\t\t\t\t\t\t\t \t$querye = $this->db->get($tablename);\n\t\t\t\t\t\t\t\t \tif($querye->num_rows() > 0)\n\t\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t \t\t$this->db->where($where);\n\t\t\t\t\t\t\t\t \t\t$query = $this->db->update($tablename,$data);\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t \telse{ $query = $this->db->insert($tablename,$data); }\n\t \t\t\t\t\t\n\t \t\t\t\t\t$insert = 'inserted';\t\t\t \n\t \n\t\t\t\t}//end of else find error\n\t\t\t\t if($insert){ //file name for successfully imported\n\t\t\t\t \t$this->data['action']='save';\n\t\t\t\t\t\t\t\t$this->data['count_data']=$highestRow - 1;\n\t\t\t\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_header',$this->data);\n\t\t\t\t\t\t\t\tfor ($row = 2; $row <= $highestRow; $row++){\n\t\t\t\t\t\t\t\t\t$this->data['col_0']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_1']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_2']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(2, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_3']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_4']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(4, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_5']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(5, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_6']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(6, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_7']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(7, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->data['col_8']= $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(7, $row)->getValue();\n\t\t\t\t\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_content',$this->data);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_footer',$this->data);\n\t\t\t\t\t\t\t $dt = $date_array = getdate();\n\t\t\t\t\t\t\t $formated_date = \"ws_\";\n\t\t\t\t\t\t\t $formated_date .= $date_array['mon'];\n\t\t\t\t\t\t\t $formated_date .= $date_array['mday'];\n\t\t\t\t\t\t\t\t $formated_date .= $date_array['year'] . \"_\";\n\t\t\t\t\t\t\t\t $formated_date .= $date_array['hours'];\n\t\t\t\t\t\t\t $formated_date .= $date_array['minutes'];\n\t\t\t\t\t\t\t\t $formated_date .= $date_array['seconds'];\n\t\t\t\t\t\t\t \trename( $inputFileName, './public/import_template/'.$formated_date.'.xls' );\n\t\t\t\t\t\t} \n\t\t\t\t\t\t}//end of file name for successfully imported\n\t\t\t\telse{//download if found an error\n\t\t\t\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\t\t\t\theader('Content-Disposition: attachment;filename=\"' .\"ws_errr\". '\"\"' .date('Y-m-d').\"_\".date('H:i:s').\".xlsx\".'\"');\n\t\t\t\t\theader('Cache-Control: max-age=0');\n\t\t\t\t\tunlink($inputFileName);\n\t\t\t\t\t$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t\t\t\t$objWriter->save('php://output');\n\t\t\t\t\texit; \n\t\t\t\t}//end of download if found an error\n\t\t\t}//end of For license purpose\n\t\t\t\n\t\t}\n\t\t//start of review\n\t\telse\n\t\t\t{ \n\t\t\t\t\t$this->data['action']='review'; \n\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_header',$this->data);\n\t\t\t\t\tfor ($row = 2; $row <= $highestRow; $row++)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$col_0 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue();\n\t\t\t\t\t\t\t$col_1 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, $row)->getValue();\n\t\t\t\t\t\t\t$col_2 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(2, $row)->getValue();\n\t\t\t\t\t\t\t$col_3 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(3, $row)->getValue();\n\t\t\t\t\t\t\t$col_4 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(4, $row)->getValue();\n\t\t\t\t\t\t\t$col_5 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(5, $row)->getValue();\n\t\t\t\t\t\t\t$col_6 = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(6, $row)->getValue();\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\tif(empty($col_0) || empty($col_2) || empty($col_3) || empty($col_4) || empty($col_5) || empty($col_6) ){\n\t\t\t\t\t\t\t\t$foundError=True;\n\t\t\t\t\t\t\t\t$null='Check empty fieds.<br>';\n\t\t\t\t\t\t\t} else{ $null='';}\n\t\t\t\t\t\t$check = $this->validateDate($col_2);\n\t\t\t\t\t\tif($check === false || $check === false){\n\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t\t$date='Invalid Date<br>';\n\t\t\t\t\t\t} else{ $date=''; }\n\t\t\t\t\t\t$c_emp = $this->payroll_emp_loan_enrolment_model->employee_company_checke_ws_model($col_0);\n\t\t\t\t\t\tif($c_emp === false) \n\t\t\t\t\t\t{ $foundError = True;\n\t\t\t\t\t\t $ec='Employee ID does not exist in database.<br>'; }\n\t\t\t\t\t\telse{ $ec=\"\"; }\n\n\t\t\t\t\t\tif($col_3 !='restday' AND $col_3 !='regular' AND $col_3 !='halfday' AND $col_3 !='regular-holiday' ) \n\t\t\t\t\t\t{ $foundError = True;\n\t\t\t\t\t\t $sc='Invalid Shift Category.<br>'; }\n\t\t\t\t\t\telse{ $sc=\"\"; }\n\n\t\t\t\t\t\tif($col_4 !='yes' AND $col_4 !='no') \n\t\t\t\t\t\t{ $foundError = True;\n\t\t\t\t\t\t $rd='Invalid Restday Option.<br>'; }\n\t\t\t\t\t\telse{ \n\n\t\t\t\t\t\t\tif($col_3!='restday' AND $col_4 =='yes')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t\t\t$rd='You can only use the yes option when the shift category is restday.<br>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{ $rd=''; }\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$time_checker5 = preg_match(\"/^(?:2[0-3]|[01][0-9]|[0-9]):[0-5][0-9]$/\", $col_5);\n\t\t\t\t\t\tif($time_checker5==0){\n\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t \t$t5='Invalid Time Format.<br>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ $t5=''; }\n\n\t\t\t\t\t\t$time_checker6 = preg_match(\"/^(?:2[0-3]|[01][0-9]|[0-9]):[0-5][0-9]$/\", $col_6);\n\t\t\t\t\t\tif($time_checker6==0){\n\t\t\t\t\t\t\t$foundError = True;\n\t\t\t\t\t\t \t$t6='Invalid Time Format.<br>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ $t6=''; }\n\n\t\t\t\t\t\t\t$this->data['col_0']= $col_0;\n\t\t\t\t\t\t\t$this->data['col_1']= $col_1;\n\t\t\t\t\t\t\t$this->data['col_2']= $col_2;\n\t\t\t\t\t\t\t$this->data['col_3']= $col_3;\n\t\t\t\t\t\t\t$this->data['col_4']= $col_4;\n\t\t\t\t\t\t\t$this->data['col_5']= $col_5;\n\t\t\t\t\t\t\t$this->data['col_6']= $col_6;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($foundError==True)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->data['remarks']= 'Error';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->data['errors']= $null.$date.$ec.$sc.$rd.$t5.$t6;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$this->data['remarks']= 'Ok';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_content',$this->data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->load->view('app/time/plot_schedules/review_upload/template_footer',$this->data);\n\t\t\t\t\t\tunlink($inputFileName);\t\t\n\t\t\t}\n\n\t\t//end of review\n\t\t}\n\t\telse{\n\t\t\techo \"<script>alert('Error report to technical support')</script>\";\n\t\t}\n\t}", "title": "" }, { "docid": "7bf2e93a55de5ff0bb3a87c0dd18469b", "score": "0.50147915", "text": "public function upload()\n\t{\n\t\t$this->validate(request(), [\n\t\t\t'archivo' => ['required', 'file'],\n\t\t]);\n\n\t\tif (Input::file('archivo')->isValid()) {\n\t\t\t$archivo = Input::file('archivo');\n\t\t\t$path = $archivo->getRealPath();\n\n\t\t\t$results = Excel::load($path, function($reader) {})->get();\n\n\t\t\tif($results instanceof \\Maatwebsite\\Excel\\Collections\\SheetCollection){\n\t\t\t\tforeach($results as $sheet){\n\t\t\t\t\t$table = strtoupper($sheet->getTitle());\n\t\t\t\t\t$this->crearRegistros($table, $sheet->toArray());\n\t\t\t\t}\n\t\t\t} else if($results instanceof \\Maatwebsite\\Excel\\Collections\\RowCollection){\n\t\t\t\t$table = strtoupper($results->getTitle());\n\t\t\t\t$this->crearRegistros($table, $results->toArray());\n\t\t\t}\n\t\t}\n\t\treturn redirect()->back()->with($this->logs)->withInput()->send();\n\t}", "title": "" }, { "docid": "56584a9d4f941fce8169d2e1b322d805", "score": "0.5004807", "text": "function storeUploadedFile($tmpFilePath){\r\n \r\n // gets the image type, reads first few bytes of image and returns int that represents jpg or png\r\n $imageTypeInt = exif_imagetype($tmpFilePath);\r\n \r\n // takes int and gets image extension\r\n $extension = image_type_to_extension($imageTypeInt);\r\n \r\n // gets the target directory for upload\r\n $target_dir = \"images/properties/\";\r\n \r\n // generates unique name for file based on microseconds of upload time\r\n // second param makes it more unique adds additional characters on end of returned value\r\n //eg \"/images/properties/8872791982.jpg\"\r\n $newImagePath = $target_dir . uniqid(\"prop\", true) . $extension;\r\n \r\n // takes current image path (in tmp folder) and puts it in new location newImagePath\r\n move_uploaded_file($tmpFilePath, $newImagePath);\r\n \r\n return $newImagePath;\r\n}", "title": "" }, { "docid": "59c431dc3454faefe638ee485f705f8d", "score": "0.5003567", "text": "function save_files($post_id = 0){\r\n if(empty($_FILES['acf']['name'])){\r\n return;\r\n }\r\n \r\n // upload files\r\n $this->upload_files();\r\n \r\n }", "title": "" }, { "docid": "6a64ca49b624717fa8756307f42ac5e2", "score": "0.49919924", "text": "public function saveFiles(){\n // Nomme le dossier d'après la date/heure courante\n $this->folder = (new DateTime)->format('Y-m-d_H-i-s');\n $backupFolderPath = $this->getFolderPath(); // génère le chemin correspondant\n mkdir($backupFolderPath); // crée le dossier\n\n // Sauvegarde un à un les fichiers éditables (renseignés dans FILES_LOCATION)\n foreach (static::FILES_LOCATION as $location) {\n $content = file_get_contents($location);\n if ($content === false) return false;\n\n $backupFileLocation = $this->getBackupFileLocation($location); // Donne le chemin du fichier à écrire de type ../views/backups/{date}/nom-de-fichier.phtml\n\n if(file_put_contents($backupFileLocation, $content) === false) return false;\n }\n\n return $this;\n }", "title": "" }, { "docid": "664d246ae7201fd5c134c1a160ea1b53", "score": "0.4991017", "text": "function upload($arquivo, $pasta, $tipos)\n {\n\n $nomeOriginal = $arquivo[\"name\"];\n $nomeFinal = md5($nomeOriginal . date(\"dmYHis\"));\n $tipo = strrchr($arquivo[\"name\"], \".\");\n $tamanho = $arquivo[\"size\"];\n\n\n\n\n if (move_uploaded_file($arquivo[\"tmp_name\"], $pasta . $nomeFinal . $tipo)) {\n $nome = $nomeFinal . $tipo;\n $tipo = $tipo;\n $tamanho = number_format($arquivo[\"size\"] / 1024, 2) . \"KB\";\n return $nomeFinal . $tipo;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "bbed86771fe6fea82ebf83aad74cbe8c", "score": "0.49788484", "text": "function handle_upload_ticket_suite_statement(){\r\n\t\t$config = array();\r\n\t\t$config['upload_path'] = './assets/image_uploads/bank_statement';\r\n\t\t$config['allowed_types'] = 'gif|jpg|png|pdf';\r\n $new_name = time().'_'.$_FILES[\"bank_attachment_for_ts\"]['name'];\r\n\t\t$config['file_name'] = $new_name;\r\n\t\t$this->load->library('upload', $config);\r\n\t\t$this->upload->initialize($config);\r\n\r\n\t\tif (isset($_FILES['bank_attachment_for_ts']) && !empty($_FILES['bank_attachment_for_ts']['name'])){\r\n\r\n\t\t\tif ($this->upload->do_upload('bank_attachment_for_ts')){\r\n\t\t\t\t// set a $_POST value for 'image' that we can use later\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\t$_POST['old_bank_ticket_suite_statement'] = $upload_data['file_name'];\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\t// possibly do some clean up ... then throw an error\r\n\t\t\t\t$this->form_validation->set_message('handle_upload_ticket_suite_statement', $this->upload->display_errors());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c05e91c26aef49be52d0e86f490a3cd7", "score": "0.4978312", "text": "function upload(){\r\n\t\t\tglobal $_POST;\r\n\t\t\t$_POST['folder'] = str_replace('/umeos','',$_POST['folder']);\r\n\t\t\t$_POST['folder'] = str_replace('/root/infinite-home/','',$_POST['folder']);\r\n\r\n\t\t\tif (!empty($_FILES)) {\r\n\t\t\t\tforeach($_FILES as $file){\r\n\t\t\t if (!empty($file['tmp_name'])) {\r\n\t\t\t $this->mFile['size']\t= $file['size'];\r\n\t\t\t $this->mFile['type']\t= $file['type'];\r\n\t\t\t \t$tmp \t\t\t\t\t= $file['tmp_name'];\r\n\t\t\t \t$this->mFile['path'] \t= ($_POST['user_id']) ? $_SERVER['HTTP_HOST'].'/'. $_POST['user_id'] : $_SERVER['HTTP_HOST'] ;\r\n\t\t\t $this->mFile['name'] \t= $file['name'];\r\n\t\t\t $this->mFile['md5'] \t= md5_file($tmp);\r\n\t\t\t $this->mFile['real'] \t= htmlentities(urlencode($this->mFile['name']));\r\n\t\t\t $this->mFile['loc'] \t= '/^/'.$this->mFile['path'] .'/'. $this->mFile['md5'];\r\n\t\t\t $this->mFile['src'] \t= str_replace('//','/',$_SERVER['DOCUMENT_ROOT'].$this->mFile['loc']);\r\n\t\t\t // Uncomment the following line if you want to make the directory if it doesn't exist\r\n\t\t\t /**\r\n\t\t\t * we dont want to save the file in a dir tree...\r\n\t\t\t * only the db holds that info. instead we change save the file as its md5 hash.\r\n\t\t\t *\r\n\t\t\t */\r\n\r\n\t\t\t if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/^/')){\r\n\t\t\t \tmkdir($_SERVER['DOCUMENT_ROOT'].'/^/', 0755, true);\r\n\t\t\t }\r\n\r\n\t\t\t $path = $_SERVER['DOCUMENT_ROOT'].'/^/'.$this->mFile['path'];\r\n\t\t\t $path = str_replace('//','/',$path);\r\n\r\n\r\n\t\t\t if(!file_exists($path)){\r\n\t\t\t \tmkdir($path, 0755, true);\r\n\t\t\t }\r\n\r\n\t\t\t move_uploaded_file($tmp,$this->mFile['src']);\r\n\t\t\t return $this->Index();\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "361232e14044a152f5079e8dbe78fb04", "score": "0.49728274", "text": "public function getUploadedFiles();", "title": "" }, { "docid": "a2a60a8d80abad53486b12ec09933f31", "score": "0.49682662", "text": "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "f8c84b4af2091c66f2c3e2efa3c38c0d", "score": "0.49647367", "text": "public function uploadSectionMarks(Request $request){\n $file = $request->file('marksFile');\n $courseId = $request->input('courseId');\n $courseworkId = $request->input('uploadCoursework');\n $subcourseworkId = $request->input('uploadSubcoursework');\n $sectionId = $request->input('uploadSection');\n\n if($courseworkId != 0) {\n $section = Section::where('id', $sectionId)->first();\n $subcoursework = SubCoursework::where('id', $subcourseworkId)->first();\n $coursework = Coursework::where('id', $courseworkId)->first();\n\n $deptAdminCourseMap = DeptAdminDeptMap::where('user_id', Auth::user()->id)\n ->where('department_id', $section->subCoursework->coursework->course->department->id)->first();\n $convenorCourseMap = ConvenorCourseMap::where('user_id', Auth::user()->id)\n ->where('course_id', $section->subCoursework->coursework->course->department->id)->first();\n\n if ((($deptAdminCourseMap && $deptAdminCourseMap->status == 0) ||\n ($convenorCourseMap && $convenorCourseMap->status == 0)) && Auth::user()->role_id != 6) {\n throwException();\n }\n }\n\n $validation = $courseworkId==0 || ($coursework && $subcoursework && $section &&\n $section->subcoursework_id == $subcourseworkId &&\n $subcoursework->coursework_id == $courseworkId &&\n $coursework->course_id == $courseId);\n\n $path = Storage::putFileAs('file', $file, 'marks_file_'.$courseworkId.'_'.$subcourseworkId.'_'.$sectionId.'_'.$courseId.'.csv');\n\n if($path && $validation) {\n\n Excel::load('storage/app/'.$path, function ($reader) use(&$sectionId, $courseId, $courseworkId){\n\n $values = $reader->toArray();\n// print_r($values);\n\n foreach ($values as $row) {\n $employeeId = $row['emplid'];\n $campusId = strtolower($row['campus_id']);\n $term = $row['term'];\n $subject = $row['subject'];\n $catalogNumber = $row['catalog_nbr'];\n $classNumber = $row['class_nbr'];\n $academicProgram = $row['acad_prog'];\n $marks = $row['final_grade'];\n\n $courseCode = $subject.$catalogNumber;\n $course = Course::find($courseId)->first();\n /*if(strtolower($course->code) != strtolower($courseCode) || $term!=$course->term_number){\n break;\n }*/\n\n $user = User::where('employee_id', $employeeId)\n ->orWhere('student_number', $campusId)->first();\n if(!$user) {\n $user = new User();\n $user->employee_id = $employeeId;\n $user->student_number = $campusId;\n $user->approved = 1;\n $user->save();\n }\n $userCourseMap = UserCourseMap::where('user_id', $user->id)\n ->where('course_id', $courseId)->first();\n if(!$userCourseMap){\n $userCourseMap = new UserCourseMap();\n $userCourseMap->user_id=$user->id;\n $userCourseMap->course_id=$courseId;\n $userCourseMap->academic_program=$academicProgram;\n $userCourseMap->class_number=$classNumber;\n $userCourseMap->status=1;\n $userCourseMap->save();\n }\n if($courseworkId != 0) {\n $sectionMap = SectionUserMarkMap::where('user_id', $user->id)\n ->where('section_id', $sectionId)->first();\n if (!$sectionMap) {\n $sectionMap = new SectionUserMarkMap();\n $sectionMap->user_id = $user->id;\n $sectionMap->section_id = $sectionId;\n }\n $sectionMap->marks = $marks;\n $sectionMap->save();\n } else {\n $userFinalMap = UserCourseFinalGrade::where('user_id', $user->id)\n ->where('course_id', $courseId)->first();\n if(!$userFinalMap){\n $userFinalMap = new UserCourseFinalGrade();\n $userFinalMap->user_id = $user->id;\n $userFinalMap->course_id = $courseId;\n }\n $grade = FinalGradeType::where('name', $marks)->first();\n $userFinalMap->type_id = (is_numeric($marks) || !$grade || !$marks)?1:$grade->id;\n $userFinalMap->save();\n }\n }\n });\n }\n\n Storage::delete($path);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24a720d8a8dd797daca929260d4b164d", "score": "0.49622786", "text": "function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }", "title": "" }, { "docid": "0929484bac7216e2dad61266a1d5e6e2", "score": "0.4959494", "text": "private function upload_file() {\n if (strpos($this->contentType, \"multipart\") !== false) {\n if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {\n // Open temp file\n $out = fopen($this->targetDir . DIRECTORY_SEPARATOR . $this->fileName, $this->chunk == 0 ? \"wb\" : \"ab\");\n if ($out) {\n // Read binary input stream and append it to temp file\n $in = fopen($_FILES['file']['tmp_name'], \"rb\");\n if ($in) {\n while ($buff = fread($in, 4096)) fwrite($out, $buff);\n }\n else\tdie('{\"status\" : \"error\", \"type\" : \"uploader\", \"message\" : \"Failed to open input stream.\"}');\n\n fclose($in);\n fclose($out);\n @unlink($_FILES['file']['tmp_name']);\n }\n else\tdie('{\"\"status\" : \"error\", \"type\" : \"uploader\", \"message\" : \"Failed to open output stream.\"}');\n }\n else\tdie('{\"status\" : \"error\", \"type\" : \"uploader\", \"message\" : \"Failed to move uploaded file.\"}');\n }\n else {\n // Open temp file\n $out = fopen($this->targetDir . DIRECTORY_SEPARATOR . $this->fileName, $this->chunk == 0 ? \"wb\" : \"ab\");\n if ($out) {\n // Read binary input stream and append it to temp file\n $in = fopen(\"php://input\", \"rb\");\n if ($in) {\n while ($buff = fread($in, 4096)) fwrite($out, $buff);\n }\n else\tdie('{\"status\" : \"error\", \"type\" : \"uploader\", \"message\" : \"Failed to open input stream.\"}');\n fclose($in);\n fclose($out);\n }\n else\tdie('{\"status\" : \"error\", \"type\" : \"uploader\", \"message\" : \"Failed to open output stream\"}');\n }\n }", "title": "" }, { "docid": "c58b7b398dbbc0167df668eaf0a4920a", "score": "0.4956584", "text": "public function upload()\n\t{\n\t\t// the file property can be empty if the field is not required\n\t\tif (null === $this->getFile()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// we use the original file name here but you should\n\t\t// sanitize it at least to avoid any security issues\n\n\t\t$newName = md5($this->getFile()->getClientOriginalName().(date(\"now\"))).'.'.$this->getFile()->getClientOriginalExtension();\n\t\t\n\t\t// move takes the target directory and target filename as params\n\t\t$this->getFile()->move(\n\t\t\tImage::SERVER_PATH_TO_IMAGE_FOLDER,$newName\n\t\t);\n\t\t\n\t\t//$photo = Image::getImagine()->open($dir . $fileName);\n\n\t\t// set the path property to the filename where you've saved the file\n\t\t\n\t\t$title = $this->getFile()->getClientOriginalName();\n\t\t$pos = strrpos($title, \".\");\n\t\tif ($pos !== false)\n\t\t{\n\t\t\t$title = substr($title,0,$pos);\n\t\t}\n\t\t$this->title = $title;\n\t\t$this->filename = $newName;\n\n\t\t// clean up the file property as you won't need it anymore\n\t\t$this->setFile(null);\n\t}", "title": "" }, { "docid": "254a8614a9aa62ff871b54b89bdb853b", "score": "0.49549097", "text": "protected function storeUploadedFilePath($fileName, $volunteer, $fileTitle, $document_segment = \"\", $document_type = \"\")\n\t{\n\t $fileData = array();\n\t $count = 0;\n\t foreach ($fileName as $file) {\n\n\t $data = array(\n\t 'table' => $volunteer->getTable(),\n\t 'table_id' => $volunteer->id,\n\t 'document_segment' => $document_segment != \"\" ? $document_segment : 'upload',\n\t 'document_type' => $document_type != \"\" ? $document_type : 'file',\n\t 'document_title' => is_array($fileTitle) ? (isset($fileTitle[$count]) ? $fileTitle[$count] : \"title\") : $fileTitle,\n\t 'file_name' => $file,\n\t 'created_at' => date('Y-m-d H:i:s')\n\t );\n\t array_push($fileData, $data);\n\t $count++;\n\t }\n\t \\App\\File::insert($fileData);\n\t}", "title": "" }, { "docid": "c4820898abb8cab04ba2203e2d523eed", "score": "0.49529412", "text": "public function uploadFile(Request $request){\n\n $org_id = AUTH::user()->organization_id;\n $path = public_path().'/shared/org_'.$org_id;\n if (!is_dir($path)){\n File::makeDirectory($path, $mode = 0777, true, true);\n }\n $filename = $request->file('file')->getClientOriginalName();\n \n $type = $request->file('file')->getClientOriginalExtension();\n $file_name_new = date('YmdHis').''.substr((string)microtime(), 2, 6).''.rand(1000,9999).'.'.$type;\n $size = $request->file('file')->getSize();\n $uploadFile = $request->file('file')->move($path, $file_name_new);\n if($type == 'mp3' || $type == 'wav'){\n $media = 'audio_'.rand(1000,9999).time();\n }elseif($type == 'jpg' || $type == 'jpeg' || $type == 'png'){\n $media = 'image_'.rand(1000,9999).time();\n }\n $data = array( \n 'name' => $filename,\n 'type' => $type,\n 'size' => $size,\n 'media' => $media,\n 'server_path' => public_path().'/shared/org_'.$org_id,\n 'url' => url('/shared/org_'.$org_id).'/'.$file_name_new,\n 'modified_at' => date('Y-m-d h:i:s'),\n 'permission' => '',\n 'org_id' => $org_id\n );\n $fm = FM::create($data);\n $fm->save();\n return ['status'=>'success','message'=>'Successfully uploaded!'];\n \n }", "title": "" }, { "docid": "2f960c19bbe7f3ff3e5d1dfd0a375717", "score": "0.49493423", "text": "function bulkSave() {\n\t\t\n\t\t// list of valid extensions, ex. array(\"jpeg\", \"xml\", \"bmp\")\n\t\t$allowedExtensions = array();\n\t\t// max file size in bytes\n\t\t$sizeLimit = 10 * 1024 * 1024;\n\t\t\n\t\t$uploader = new WbtyFileUploader($allowedExtensions, $sizeLimit);\n\n\t\t// Call handleUpload() with the name of the folder, relative to PHP's getcwd()\n\t\tif (!JFolder::exists(JPATH_ROOT.'/images/wbty_gallery/')) {\n\t\t\tJFolder::create(JPATH_ROOT.'/images/wbty_gallery/');\n\t\t}\n\t\t$directory = JPATH_ROOT.'/images/wbty_gallery/';\n\t\t$result = $uploader->handleUpload($directory);\n\t\t\n\t\techo json_encode($result);exit();\n\t}", "title": "" }, { "docid": "f1c2f246946ec754a90bb479caa3f188", "score": "0.4947615", "text": "public function UploadFileTempServer($files){\r\n\t\t\t\r\n\t\t\t/*\tLoop through the name of the files sent, if the slideBG \r\n\t\t\t\tmatches the name then it is the background slide. Move the \r\n\t\t\t\tfile. */\r\n\t\t\tfor($i = 0; $i != count($files[\"upldFiles\"][\"tmp_name\"]); $i++){\r\n\r\n\t\t\t\tmove_uploaded_file(\r\n\t\t\t\t\t$files[\"upldFiles\"][\"tmp_name\"][$i],\r\n\t\t\t\t\t$this->userUploadedImageLocation . $files[\"upldFiles\"][\"name\"][$i]\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "b4d04a66ce1729987b7cb370cda6d339", "score": "0.49458808", "text": "public function store(Request $request)\n {\n //\n $file =\"\";echo base_path();\n print_r($request->all());\n $destinationPath =\"./documents/\";\n\n //$file = \\Input::file('filexlx')->;\n $file = \\Input::file('filexlx')->getClientOriginalName();\n var_dump($file);\n $request->file('filexlx')->move($destinationPath,\"meda\");\n dd($request->file('filexlx'));\n if ($request->hasFile('filexlx')) {\n //\n $file = $request->file('filexlx');\n var_dump($file);\n\n }else{\n //var_dump($file);\n }\n /*$objPHPExcel = \\PHPExcel_IOFactory::load($destinationPath.$file);\n $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);\n print_r($sheetData);*/\n\n }", "title": "" }, { "docid": "ffe5ff70550e8807de60b4c329dc3335", "score": "0.4932417", "text": "public function upload(): void\n {\n $this->request->allowMethod(['post']);\n\n $table = $this->loadModel();\n Assert::isInstanceOf($table, Table::class);\n\n $fileUpload = new FileUpload($table);\n\n $result = [\n 'success' => true,\n 'data' => [],\n ];\n foreach ((array)$this->request->getData($this->name) as $field => $files) {\n if (! is_array($files)) {\n continue;\n }\n\n $result['data'] = $fileUpload->saveAll($field, $files);\n }\n\n $this->set('result', $result);\n $this->set('_serialize', 'result');\n }", "title": "" }, { "docid": "a366efcea8b200391ae80f59bec7fb86", "score": "0.4931826", "text": "function perform_upload($path,$token,$size,$filetmp,$filename)\n{\n\t$json = @file_get_contents(upload_path($path));\n\tif ( !$json ) return false;\n\t\n\t$policy = @json_decode($json);\n\tif ( !$policy ) return false;\n\t\n\tif ( $policy->token != $token ) return false;\n\t\n\tif ( $policy->size < $size ) return false;\n\t\n\tif ( $policy->ends < NOW ) return false;\n\t\n\t$meta = array(\n\t\t\"name\" => $filename, \n\t\t\"path\" => $path\n\t);\n\t\n\t$filepath = file_path($path);\t\n\tprepath($filepath);\n\t\n\t$success = @copy($filetmp, $filepath);\n\tif ( !$success ) return false;\n\t\n\t@file_put_contents(meta_path($path), json_encode($meta));\n\t@unlink(upload_path($path));\n\t\n\treturn true;\n}", "title": "" }, { "docid": "1ad58ac805dbdd381fa5f76bb89e8d49", "score": "0.49269384", "text": "private function storeAttachments(Asigment $asigment)\n {\n $folder = \"attachments/{$asigment->id}\";\n\n foreach (request()->file('files') as $file) {\n if (!$file->isValid()) {\n continue;\n }\n\n // TODO: if the file is an image we should compress it\n $filename = $file->store($folder);\n $path = \"/storage/$filename\";\n\n $asigment->files()->create([\n 'name' => $file->getClientOriginalName(),\n 'type' => $file->getClientMimeType(),\n 'size' => $file->getSize(),\n 'path' => $path,\n ]);\n }\n }", "title": "" }, { "docid": "1a308fd902fb80f446bb1fd3819556ca", "score": "0.492479", "text": "function sb_files() {\n\tglobal $wpdb, $filetypes, $sermon_domain;\n\t//Security check\n\tif (!current_user_can('upload_files'))\n\t\t\twp_die(__(\"You do not have the correct permissions to upload sermons\", $sermon_domain));\n\t// sync\n\tsb_scan_dir();\n\n\tif (isset($_POST['import_url'])) {\n\t\t$url = $_POST['url'];\n\t\t$valid_url = false;\n\t\tif(ini_get('allow_url_fopen')) {\n\t\t\t$headers = array_change_key_case(get_headers($url, 1),CASE_LOWER);\n\t\t\tif ($headers[0] == 'HTTP/1.1 200 OK') {\n\t\t\t\tif ($_POST['import_type'] == 'download') {\n\t\t\t\t\t$filename = substr($url, strrpos ($url, '/')+1);\n\t\t\t\t\t$filename = substr($filename, 0, strrpos ($filename, '?'));\n\t\t\t\t\tif (file_exists(SB_ABSPATH.sb_get_option('upload_dir').$filename))\n\t\t\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.sprintf(__('File %s already exists', $sermon_domain), $filename).'</b></div>';\n\t\t\t\t\telse {\n\t\t\t\t\t\t$file = @fopen(SB_ABSPATH.sb_get_option('upload_dir').$filename, 'wb');\n\t\t\t\t\t\t$remote_file = @fopen($url, 'r');\n\t\t\t\t\t\t$remote_contents = '';\n\t\t\t\t\t\twhile (!feof($remote_file))\n\t\t\t\t\t\t\t$remote_contents .= fread($remote_file, 8192);\n\t\t\t\t\t\tfwrite($file, $remote_contents);\n\t\t\t\t\t\tfclose($remote_file);\n\t\t\t\t\t\tfclose($file);\n\t\t\t\t\t\t$wpdb->query(\"INSERT INTO {$wpdb->prefix}sb_stuff VALUES (null, 'file', '\".$wpdb->escape($filename).\"', 0, 0, 0)\");\n\t\t\t\t\t\techo \"<script>document.location = '\".admin_url('admin.php?page=sermon-browser/new_sermon.php&getid3='.$wpdb->insert_id).\"';</script>\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$wpdb->query(\"INSERT INTO {$wpdb->prefix}sb_stuff VALUES (null, 'url', '\".$wpdb->escape($url).\"', 0, 0, 0)\");\n\t\t\t\t\techo \"<script>document.location = '\".admin_url('admin.php?page=sermon-browser/new_sermon.php&getid3='.$wpdb->insert_id).\"';</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.__('Invalid URL.', $sermon_domain).'</b></div>';\n\t\t} else\n\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.__('Your host does not allow remote downloading of files.', $sermon_domain).'</b></div>';\n\t}\n\telseif (isset($_POST['save'])) {\n\t\tif ($_FILES['upload']['error'] == UPLOAD_ERR_OK) {\n\t\t\t$filename = basename($_FILES['upload']['name']);\n\t\t\tif (IS_MU) {\n\t\t\t\t$file_allowed = FALSE;\n\t\t\t\tglobal $wp_version;\n\t\t\t\tif (version_compare ($wp_version, '3.0', '<'))\n\t\t\t\t\trequire_once(SB_ABSPATH . 'wp-includes/wpmu-functions.php');\n\t\t\t\telse\n\t\t\t\t\trequire_once(SB_ABSPATH . 'wp-includes/ms-functions.php');\n\t\t\t\tif (function_exists('get_site_option')) {\n\t\t\t\t\t$allowed_extensions = explode(\" \", get_site_option(\"upload_filetypes\"));\n\t\t\t\t\tforeach ($allowed_extensions as $ext) {\n\t\t\t\t\t\tif (substr(strtolower($filename), -(strlen($ext)+1)) == \".\".strtolower($ext))\n\t\t\t\t\t\t\t$file_allowed = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$file_allowed = TRUE;\n\t\t\t}\n\t\t\tif ($file_allowed) {\n\t\t\t\t$prefix = '';\n\t\t\t\t$dest = SB_ABSPATH.sb_get_option('upload_dir').$prefix.$filename;\n\t\t\t\tif($wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->prefix}sb_stuff WHERE name = '\".mysql_real_escape_string($filename).\"'\") == 0) {\n\t\t\t\t\t$filename = mysql_real_escape_string($filename);\n\t\t\t\t\tif (move_uploaded_file($_FILES['upload']['tmp_name'], $dest)) {\n\t\t\t\t\t\t$filename = $prefix.$filename;\n\t\t\t\t\t\t$wpdb->query(\"INSERT INTO {$wpdb->prefix}sb_stuff VALUES (null, 'file', '{$filename}', 0, 0, 0)\");\n\t\t\t\t\t\tif (sb_import_options_set ())\n\t\t\t\t\t\t\techo \"<script>document.location = '\".admin_url('admin.php?page=sermon-browser/new_sermon.php&getid3='.$wpdb->insert_id).\"';</script>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.__('Files saved to database.', $sermon_domain).'</b></div>';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.__($filename. ' already exists.', $sermon_domain).'</b></div>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t@unlink($_FILES['upload']['tmp_name']);\n\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><b>'.__('You are not permitted to upload files of that type.', $sermon_domain).'</b></div>';\n\t\t\t}\n\t\t}\n\t} elseif(isset($_POST['clean'])) {\n\t\t$unlinked = $wpdb->get_results(\"SELECT f.*, s.title FROM {$wpdb->prefix}sb_stuff AS f LEFT JOIN {$wpdb->prefix}sb_sermons AS s ON f.sermon_id = s.id WHERE f.sermon_id = 0 AND f.type = 'file' ORDER BY f.name;\");\n\t\t$linked = $wpdb->get_results(\"SELECT f.*, s.title FROM {$wpdb->prefix}sb_stuff AS f LEFT JOIN {$wpdb->prefix}sb_sermons AS s ON f.sermon_id = s.id WHERE f.sermon_id <> 0 AND f.type = 'file' ORDER BY f.name;\");\n\t\t$wanted = array(-1);\n\t\tforeach ((array) $unlinked as $k => $file) {\n\t\t\tif (!file_exists(SB_ABSPATH.sb_get_option('upload_dir').$file->name)) {\n\t\t\t\t$wanted[] = $file->id;\n\t\t\t\tunset($unlinked[$k]);\n\t\t\t}\n\t\t}\n\t\tforeach ((array) $linked as $k => $file) {\n\t\t\tif (!file_exists(SB_ABSPATH.sb_get_option('upload_dir').$file->name)) {\n\t\t\t\t$wanted[] = $file->id;\n\t\t\t\tunset($unlinked[$k]);\n\t\t\t}\n\t\t}\n\t\t$wpdb->query(\"DELETE FROM {$wpdb->prefix}sb_stuff WHERE id IN (\".implode(', ', (array) $wanted).\")\");\n\t\t$wpdb->query(\"DELETE FROM {$wpdb->prefix}sb_stuff WHERE type != 'file' AND sermon_id=0\");\n\t}\n\n\t$unlinked = $wpdb->get_results(\"SELECT f.*, s.title FROM {$wpdb->prefix}sb_stuff AS f LEFT JOIN {$wpdb->prefix}sb_sermons AS s ON f.sermon_id = s.id WHERE f.sermon_id = 0 AND f.type = 'file' ORDER BY f.name LIMIT 10;\");\n\t$linked = $wpdb->get_results(\"SELECT f.*, s.title FROM {$wpdb->prefix}sb_stuff AS f LEFT JOIN {$wpdb->prefix}sb_sermons AS s ON f.sermon_id = s.id WHERE f.sermon_id <> 0 AND f.type = 'file' ORDER BY f.name LIMIT 10;\");\n\t$cntu = $wpdb->get_row(\"SELECT COUNT(*) as cntu FROM {$wpdb->prefix}sb_stuff WHERE sermon_id = 0 AND type = 'file' \", ARRAY_A);\n\t$cntu = $cntu['cntu'];\n\t$cntl = $wpdb->get_row(\"SELECT COUNT(*) as cntl FROM {$wpdb->prefix}sb_stuff WHERE sermon_id <> 0 AND type = 'file' \", ARRAY_A);\n\t$cntl = $cntl['cntl'];\n\tsb_do_alerts();\n?>\n\t<script>\n\t\tfunction rename(id, old) {\n\t\t\tvar f = prompt(\"<?php _e('New file name?', $sermon_domain) ?>\", old);\n\t\t\tif (f != null) {\n\t\t\t\tjQuery.post('<?php echo admin_url('admin.php?page=sermon-browser/uploads.php'); ?>', {fid: id, oname: old, fname: f, sermon: 1}, function(r) {\n\t\t\t\t\tif (r) {\n\t\t\t\t\t\tif (r == 'renamed') {\n\t\t\t\t\t\t\tjQuery('#' + id).text(f.substring(0,f.lastIndexOf(\".\")));\n\t\t\t\t\t\t\tjQuery('#link' + id).attr('href', 'javascript:rename(' + id + ', \"' + f + '\")');\n\t\t\t\t\t\t\tFat.fade_element(id);\n\t\t\t\t\t\t\tjQuery('#s' + id).text(f.substring(0,f.lastIndexOf(\".\")));\n\t\t\t\t\t\t\tjQuery('#slink' + id).attr('href', 'javascript:rename(' + id + ', \"' + f + '\")');\n\t\t\t\t\t\t\tFat.fade_element('s' + id);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (r == 'forbidden') {\n\t\t\t\t\t\t\t\talert('<?php _e('You are not permitted files with that extension.', $sermon_domain) ?>');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\talert('<?php _e('The script is unable to rename your file.', $sermon_domain) ?>');\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\tfunction kill(id, f) {\n\t\t\tjQuery.post('<?php echo admin_url('admin.php?page=sermon-browser/files.php'); ?>', {fname: f, fid: id, del: 1, sermon: 1}, function(r) {\n\t\t\t\tif (r) {\n\t\t\t\t\tif (r == 'deleted') {\n\t\t\t\t\t\tjQuery('#file' + id).fadeOut(function() {\n\t\t\t\t\t\t\tjQuery('.file:visible').each(function(i) {\n\t\t\t\t\t\t\t\tjQuery(this).removeClass('alternate');\n\t\t\t\t\t\t\t\tif (++i % 2 == 0) {\n\t\t\t\t\t\t\t\t\tjQuery(this).addClass('alternate');\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\tjQuery('#sfile' + id).fadeOut(function() {\n\t\t\t\t\t\t\tjQuery('.file:visible').each(function(i) {\n\t\t\t\t\t\t\t\tjQuery(this).removeClass('alternate');\n\t\t\t\t\t\t\t\tif (++i % 2 == 0) {\n\t\t\t\t\t\t\t\t\tjQuery(this).addClass('alternate');\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} else {\n\t\t\t\t\t\talert('<?php _e('The script is unable to delete your file.', $sermon_domain) ?>');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\tfunction fetchU(st) {\n\t\t\tjQuery.post('<?php echo admin_url('admin.php?page=sermon-browser/uploads.php'); ?>', {fetchU: st + 1, sermon: 1}, function(r) {\n\t\t\t\tif (r) {\n\t\t\t\t\tjQuery('#the-list-u').html(r);\n\t\t\t\t\tif (st >= <?php echo sb_get_option('sermons_per_page') ?>) {\n\t\t\t\t\t\tx = st - <?php echo sb_get_option('sermons_per_page') ?>;\n\t\t\t\t\t\tjQuery('#uleft').html('<a href=\"javascript:fetchU(' + x + ')\">&laquo; <?php _e('Previous', $sermon_domain) ?></a>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#uleft').html('');\n\t\t\t\t\t}\n\t\t\t\t\tif (st + <?php echo sb_get_option('sermons_per_page') ?> <= <?php echo $cntu ?>) {\n\t\t\t\t\t\ty = st + <?php echo sb_get_option('sermons_per_page') ?>;\n\t\t\t\t\t\tjQuery('#uright').html('<a href=\"javascript:fetchU(' + y + ')\"><?php _e('Next', $sermon_domain) ?> &raquo;</a>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#uright').html('');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\tfunction fetchL(st) {\n\t\t\tjQuery.post('<?php echo admin_url('admin.php?page=sermon-browser/files.php'); ?>', {fetchL: st + 1, sermon: 1}, function(r) {\n\t\t\t\tif (r) {\n\t\t\t\t\tjQuery('#the-list-l').html(r);\n\t\t\t\t\tif (st >= <?php echo sb_get_option('sermons_per_page') ?>) {\n\t\t\t\t\t\tx = st - <?php echo sb_get_option('sermons_per_page') ?>;\n\t\t\t\t\t\tjQuery('#left').html('<a href=\"javascript:fetchL(' + x + ')\">&laquo; <?php _e('Previous', $sermon_domain) ?></a>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#left').html('');\n\t\t\t\t\t}\n\t\t\t\t\tif (st + <?php echo sb_get_option('sermons_per_page') ?> <= <?php echo $cntl ?>) {\n\t\t\t\t\t\ty = st + <?php echo sb_get_option('sermons_per_page') ?>;\n\t\t\t\t\t\tjQuery('#right').html('<a href=\"javascript:fetchL(' + y + ')\"><?php _e('Next', $sermon_domain) ?> &raquo;</a>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#right').html('');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\tfunction findNow() {\n\t\t\tjQuery.post('<?php echo admin_url('admin.php?page=sermon-browser/files.php'); ?>', {search: jQuery('#search').val(), sermon: 1}, function(r) {\n\t\t\t\tif (r) {\n\t\t\t\t\tjQuery('#the-list-s').html(r);\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t</script>\n\t<a name=\"top\"></a>\n\t<div class=\"wrap\">\n\t\t<a href=\"http://www.sermonbrowser.com/\"><img src=\"<?php echo SB_PLUGIN_URL; ?>/sb-includes/logo-small.png\" width=\"191\" height =\"35\" style=\"margin: 1em 2em; float: right; background: #f9f9f9;\" /></a>\n\t\t<h2><?php _e('Upload Files', $sermon_domain) ?></h2>\n\t\t<?php if (!sb_import_options_set()) {\n\t\t\techo '<p class=\"plugin-update\">';\n\t\t\tsb_print_import_options_message();\n\t\t\techo \"</p>\\n\";\n\t\t} ?>\n\t\t<br style=\"clear:both\">\n\t\t<?php\n\t\t\tsb_print_upload_form();\n\t\t?>\n\t</div>\n\t<div class=\"wrap\">\n\t\t<h2><?php _e('Unlinked files', $sermon_domain) ?></h2>\n\t\t<br style=\"clear:both\">\n\t\t<table class=\"widefat\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t<th width=\"10%\" scope=\"col\"><div style=\"text-align:center\"><?php _e('ID', $sermon_domain) ?></div></th>\n\t\t\t\t<th width=\"50%\" scope=\"col\"><div style=\"text-align:center\"><?php _e('File name', $sermon_domain) ?></div></th>\n\t\t\t\t<th width=\"20%\" scope=\"col\"><div style=\"text-align:center\"><?php _e('File type', $sermon_domain) ?></div></th>\n\t\t\t\t<th width=\"20%\" scope=\"col\"><div style=\"text-align:center\"><?php _e('Actions', $sermon_domain) ?></div></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody id=\"the-list-u\">\n\t\t\t\t<?php if (is_array($unlinked)): ?>\n\t\t\t\t\t<?php foreach ($unlinked as $file): ?>\n\t\t\t\t\t\t<tr class=\"file <?php $i=0; echo (++$i % 2 == 0) ? 'alternate' : '' ?>\" id=\"file<?php echo $file->id ?>\">\n\t\t\t\t\t\t\t<th style=\"text-align:center\" scope=\"row\"><?php echo $file->id ?></th>\n\t\t\t\t\t\t\t<td id=\"<?php echo $file->id ?>\"><?php echo substr($file->name, 0, strrpos($file->name, '.')) ?></td>\n\t\t\t\t\t\t\t<td style=\"text-align:center\"><?php echo isset($filetypes[substr($file->name, strrpos($file->name, '.') + 1)]['name']) ? $filetypes[substr($file->name, strrpos($file->name, '.') + 1)]['name'] : strtoupper(substr($file->name, strrpos($file->name, '.') + 1)) ?></td>\n\t\t\t\t\t\t\t<td style=\"text-align:center\">\n\t\t\t\t\t\t\t\t<a id=\"\" href=\"<?php echo admin_url(\"admin.php?page=sermon-browser/new_sermon.php&amp;getid3={$file->id}\"); ?>\"><?php _e('Create sermon', $sermon_domain) ?></a> |\n\t\t\t\t\t\t\t\t<a id=\"link<?php echo $file->id ?>\" href=\"javascript:rename(<?php echo $file->id ?>, '<?php echo $file->name ?>')\"><?php _e('Rename', $sermon_domain) ?></a> | <a onclick=\"return confirm('Do you really want to delete <?php echo str_replace(\"'\", '', $file->name) ?>?');\" href=\"javascript:kill(<?php echo $file->id ?>, '<?php echo $file->name ?>');\"><?php _e('Delete', $sermon_domain) ?></a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<br style=\"clear:both\">\n\t\t<div class=\"navigation\">\n\t\t\t<div class=\"alignleft\" id=\"uleft\"></div>\n\t\t\t<div class=\"alignright\" id=\"uright\"></div>\n\t\t</div>\n\t</div>\n\t<a name=\"linked\"></a>\n\t<div class=\"wrap\">\n\t\t<h2><?php _e('Linked files', $sermon_domain) ?></h2>\n\t\t<br style=\"clear:both\">\n\t\t<table class=\"widefat\">\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('ID', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('File name', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('File type', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('Sermon', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('Actions', $sermon_domain) ?></div></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody id=\"the-list-l\">\n\t\t\t\t<?php if (is_array($linked)): ?>\n\t\t\t\t\t<?php foreach ($linked as $file): ?>\n\t\t\t\t\t\t<tr class=\"file <?php echo (++$i % 2 == 0) ? 'alternate' : '' ?>\" id=\"file<?php echo $file->id ?>\">\n\t\t\t\t\t\t\t<th style=\"text-align:center\" scope=\"row\"><?php echo $file->id ?></th>\n\t\t\t\t\t\t\t<td id=\"<?php echo $file->id ?>\"><?php echo substr($file->name, 0, strrpos($file->name, '.')) ?></td>\n\t\t\t\t\t\t\t<td style=\"text-align:center\"><?php echo isset($filetypes[substr($file->name, strrpos($file->name, '.') + 1)]['name']) ? $filetypes[substr($file->name, strrpos($file->name, '.') + 1)]['name'] : strtoupper(substr($file->name, strrpos($file->name, '.') + 1)) ?></td>\n\t\t\t\t\t\t\t<td><?php echo stripslashes($file->title) ?></td>\n\t\t\t\t\t\t\t<td style=\"text-align:center\">\n\t\t\t\t\t\t\t<script type=\"text/javascript\" language=\"javascript\">\n\t\t\t\t\t\t\tfunction deletelinked_<?php echo $file->id;?>(filename, filesermon) {\n\t\t\t\t\t\t\t\tif (confirm('Do you really want to delete '+filename+'?')) {\n\t\t\t\t\t\t\t\t\treturn confirm('This file is linked to the sermon called ['+filesermon+']. Are you sure you want to delete it?');\n\t\t\t\t\t\t\t\t}\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\t</script>\n\t\t\t\t\t\t\t\t<a id=\"link<?php echo $file->id ?>\" href=\"javascript:rename(<?php echo $file->id ?>, '<?php echo $file->name ?>')\"><?php _e('Rename', $sermon_domain) ?></a> | <a onclick=\"return deletelinked_<?php echo $file->id;?>('<?php echo str_replace(\"'\", '', $file->name) ?>', '<?php echo str_replace(\"'\", '', $file->title) ?>');\" href=\"javascript:kill(<?php echo $file->id ?>, '<?php echo $file->name ?>');\"><?php _e('Delete', $sermon_domain) ?></a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<br style=\"clear:both\">\n\t\t<div class=\"navigation\">\n\t\t\t<div class=\"alignleft\" id=\"left\"></div>\n\t\t\t<div class=\"alignright\" id=\"right\"></div>\n\t\t</div>\n\t</div>\n\t<a name=\"search\"></a>\n\t<div class=\"wrap\">\n\t\t<h2><?php _e('Search for files', $sermon_domain) ?></h2>\n\t\t<form id=\"searchform\" name=\"searchform\">\n\t\t\t<p>\n\t\t\t\t<input type=\"text\" size=\"30\" value=\"\" id=\"search\" />\n\t\t\t\t<input type=\"submit\" class=\"button\" value=\"<?php _e('Search', $sermon_domain) ?> &raquo;\" onclick=\"javascript:findNow();return false;\" />\n\t\t\t</p>\n\t\t</form>\n\t\t<table class=\"widefat\">\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('ID', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('File name', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('File type', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('Sermon', $sermon_domain) ?></div></th>\n\t\t\t\t<th scope=\"col\"><div style=\"text-align:center\"><?php _e('Actions', $sermon_domain) ?></div></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody id=\"the-list-s\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><?php _e('Search results will appear here.', $sermon_domain) ?></td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<br style=\"clear:both\">\n\t</div>\n\t<script>\n\t\t<?php if ($cntu > sb_get_option('sermons_per_page')): ?>\n\t\t\tjQuery('#uright').html('<a href=\"javascript:fetchU(<?php echo sb_get_option('sermons_per_page') ?>)\">Next &raquo;</a>');\n\t\t<?php endif ?>\n\t\t<?php if ($cntl > sb_get_option('sermons_per_page')): ?>\n\t\t\tjQuery('#right').html('<a href=\"javascript:fetchL(<?php echo sb_get_option('sermons_per_page') ?>)\">Next &raquo;</a>');\n\t\t<?php endif ?>\n\t</script>\n\t<?php\n\t\tif (isset($checkSermonUpload) && $checkSermonUpload == 'writeable') {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Clean up', $sermon_domain) ?></h2>\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p><?php _e('Pressing the button below scans every sermon in the database, and removes missing attachments. Use with caution!', $sermon_domain) ?></p>\n\t\t\t\t<input type=\"submit\" name=\"clean\" value=\"<?php _e('Clean up missing files', $sermon_domain) ?>\" />\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "183ceb8854842995317b4be97bba005b", "score": "0.49201694", "text": "public function upload($destination, array $files);", "title": "" }, { "docid": "68ac893ca2221cf80f1a52a2ab89abea", "score": "0.49184942", "text": "function save_file() {\n\n\n $this->validate_submitted_data(array(\n \"id\" => \"numeric\",\n \"bu_id\" => \"required|numeric\"\n ));\n\n $bu_id = $this->request->getPost('bu_id');\n $this->access_only_allowed_members();\n $this->can_access_this_intake($bu_id);\n\n\n $files = $this->request->getPost(\"files\");\n $success = false;\n $now = get_current_utc_time();\n\n $target_path = getcwd() . \"/\" . get_general_file_path(\"bu\", $bu_id);\n\n //process the files which has been uploaded by dropzone\n if ($files && get_array_value($files, 0)) {\n foreach ($files as $file) {\n $file_name = $this->request->getPost('file_name_' . $file);\n $file_info = move_temp_file($file_name, $target_path);\n if ($file_info) {\n $data = array(\n \"bu_id\" => $bu_id,\n \"file_name\" => get_array_value($file_info, 'file_name'),\n \"file_id\" => get_array_value($file_info, 'file_id'),\n \"service_type\" => get_array_value($file_info, 'service_type'),\n \"description\" => $this->request->getPost('description_' . $file),\n \"file_size\" => $this->request->getPost('file_size_' . $file),\n \"created_at\" => $now,\n \"uploaded_by\" => $this->login_user->id\n );\n $success = $this->General_files_model->ci_save($data);\n } else {\n $success = false;\n }\n }\n }\n\n\n if ($success) {\n echo json_encode(array(\"success\" => true, 'message' => app_lang('record_saved')));\n } else {\n echo json_encode(array(\"success\" => false, 'message' => app_lang('error_occurred')));\n }\n }", "title": "" }, { "docid": "2833609ca1415f4ed20292b3050a060e", "score": "0.49184427", "text": "public function store(Request $request, Excel $excel)\n { \n $excel::import(new StaffImport, $request->file('staff-import'));\n\n return redirect('settings')->with('alert.success', 'Staff imported successfully!');\n }", "title": "" }, { "docid": "867b6d6eb4f12fb58ea0032ddaf14199", "score": "0.49155235", "text": "public function processTimekeepingData()\n {\n $directory=\"data/timekeeping_data\";\n set_time_limit(160);\n \n\n $files = File::allFiles($directory);\n\n foreach ($files as $file) {\n $file_exists=File_load::where('file_name', $file)\n ->where('type', 19)\n ->exists();\n if(!$file_exists){\n $count_insert=0;\n $count_update=0;\n Timekeeping_data::truncate();\n \n $data = Excel::load($file)->toArray();\n \n foreach ($data as $row) {\n \n $data_value=$row;\n\n //Insert Profile\n Timekeeping_data::create([\n 'job_number' => $data_value['jobnumber'], \n 'hours' => $data_value['hours'], \n 'lunch' => $data_value['lunch'],\n 'total' => $data_value['total'],\n 'period' => $data_value['period'], \n ]); \n $count_insert++; \n }\n\n File_load::create([\n 'file_name' => $file,\n 'type' => 19, \n 'count_insert'=> $count_insert,\n 'count_update'=> $count_update,\n ]);\n }\n } \n\n return \"Data Inserted\";\n }", "title": "" }, { "docid": "94b47f5b46d2b0ce7ee9c3c20732763d", "score": "0.49031416", "text": "function create_file(){\n $files = $_FILES;\n foreach ($files as $file_name => $file_info){\n $_FILES[\"files\"][\"name\"][$file_name] = $file_info['name'];\n $_FILES[\"files\"][\"tmp_name\"][$file_name] = $file_info['tmp_name'];\n $_FILES[\"files\"][\"size\"][$file_name] = $file_info['size'];\n $_FILES[\"files\"][\"error\"][$file_name] = $file_info['error'];\n }\n /*function address : services module /resources /file_resource.inc*/\n return _file_resource_create_raw();\n}", "title": "" }, { "docid": "c2545eeded0cc9821ff694d6434128bf", "score": "0.4900723", "text": "public function saveUploadData(array $data);", "title": "" }, { "docid": "c361006db8170403dffade042fc07e39", "score": "0.4898453", "text": "public function processWOTC()\n {\n $directory=\"wotc\";\n set_time_limit(160);\n \n $files = File::allFiles($directory);\n\n foreach ($files as $file) {\n $file_exists=File_load::where('file_name', $file)\n ->where('type', 17)\n ->exists();\n if(!$file_exists){ \n $count_insert=0;\n $count_update=0;\n Payroll_user::truncate();\n\n $data = Excel::load($file)->toArray();\n \n foreach ($data as $row) {\n\n $data_value=$row;\n\n $str = $data_value['birthdate'];\n $date_birthdate = DateTime::createFromFormat('m/d/Y', $str);\n\n $str = $data_value['hiredate'];\n $date_hiredate = DateTime::createFromFormat('m/d/Y', $str);\n\n\n Payroll_user::create([\n 'ssn' => $data_value['socialsecuritynumber'], \n 'employee_number' => $data_value['employeenumber'],\n 'birth_date' => $date_birthdate->format('Y-m-d'), \n 'first_name' => $data_value['firstname'], \n 'last_name' => $data_value['lastname'],\n 'address' => $data_value['address1'], \n 'city' => $data_value['city'], \n 'state' => $data_value['state'], \n 'postal_code' => $data_value['zip'], \n 'hire_date' => $date_hiredate->format('Y-m-d'), \n 'type' => $data_value['typeid'], \n 'rate' => $data_value['payrate'], \n 'job_title' => $data_value['jobtitle']\n ]);\n\n $count_insert++;\n \n }\n\n //Insert file\n File_load::create([\n 'file_name' => $file,\n 'type' => 17, \n 'count_insert'=> $count_insert,\n 'count_update'=> $count_update, \n\n ]);\n }\n }\n\n \n return \"Data Inserted\";\n }", "title": "" }, { "docid": "7548c1b677b11ffc5e62766e4aa250c3", "score": "0.48965803", "text": "public function getFileStorages() {}", "title": "" }, { "docid": "4dbcf0ec008937e4bfca8fb54e44b11a", "score": "0.48871142", "text": "public function store(Request $request)\n {\n // in case maks upload to server 2MB, dirubah ke 20MB\n // ini_set('upload_max_filesize', '20M');\n ini_set('memory_limit', '-1');\n // Delete Database Sebelum Upload Baru\n // Excel::truncate();\n \n // maksimum time limit 900 seconds, bisa disesuaikan\n ini_set('max_execution_time', 900);\n \n function getDateTime($code, $paramsArray){\n $tempArray = array();\n for ($j=0; $j < strlen($paramsArray)/20 ; $j++) {\n $start = $j*20;\n $tempArray[$code.$j] = substr($paramsArray,$start,20);\n }\n return $tempArray;\n }\n\n // Method untuk menrubah Selisih menjadi menit\n function filterMinute($dateDiff){\n $value = null;\n if($dateDiff->days == 0 && $dateDiff->h == 0 && $dateDiff->i == 0 && $dateDiff->s == 0){\n }\n else{\n $value += $dateDiff->i + ($dateDiff->h * 60) + ($dateDiff->days * 24 * 60);\n if($dateDiff->s>0){\n $value += ($dateDiff->s/60);\n }\n } \n return $value;\n }\n \n $getSheet = null;\n $highestRow = null;\n if(isset($_FILES['excelFile']) && !empty($_FILES['excelFile']['tmp_name']))\n {\n $excelObject = PHPExcel_IOFactory::load($_FILES['excelFile']['tmp_name']);\n $getSheet = $excelObject->getActiveSheet()->toArray(null);\n $highestRow = $excelObject->setActiveSheetIndex(0)->getHighestDataRow();\n }\n \n for ($i = 1; $i < $highestRow; $i++) { \n if ($getSheet[$i][0] != '') {\n $arrayStartTravel = null;\n $arrayStartWork = null;\n $arrayComplete = null;\n $rsps = 0;\n $wo_complete = null;\n // <!-- Menghitung Durasi SBU -->\n // <!-- Selisih Antara AR_Date dengan WO Date -->\n $SBU = null;\n $AR_Date = new DateTime($getSheet[$i][8]); // Default Format\n $WO_Date = new DateTime($getSheet[$i][9]);\n // $WO_Date = DateTime::createFromFormat('d M Y H:i:s',$getSheet[$i][9]); // Custom Format\n \n // Filter By kode_wo dan wo_cancelled Starts Here\n $filteredDate = Excel::where('kode_wo',$getSheet[$i][2])->value('kode_wo');\n if($filteredDate!=$getSheet[$i][2] && $getSheet[$i][16]!=''){\n $SBU = date_diff($WO_Date, $AR_Date);\n $SBU = filterMinute($SBU);\n $rsps += 25;\n // Code untuk menghitung preparation time\n if($getSheet[$i][11]==''){\n if($getSheet[$i][12]==''){\n if($getSheet[$i][16]==''){\n $prepTime = null; // filter jika complete time kosong\n }else{\n $stringStartTravel = str_replace(array( '(', ')' ), '', $getSheet[$i][16]); //ambil selisih dari WO date s.d. complete\n $arrayStartTravel = getDateTime('st', $stringStartTravel);\n $startTravel = new DateTime($arrayStartTravel['st0']);\n $prepTime = round(filterMinute(date_diff($WO_Date, $startTravel)),2);\n }\n }\n }else{\n $stringStartTravel = str_replace(array( '(', ')' ), '', $getSheet[$i][11]);\n $arrayStartTravel = getDateTime('st', $stringStartTravel);\n $startTravel = new DateTime($arrayStartTravel['st0']);\n $prepTime = round(filterMinute(date_diff($WO_Date, $startTravel)),2);\n $rsps += 25;\n }\n \n // Code untuk Menghitung Travel Time\n $startWork = null;\n if($getSheet[$i][12]=='' || $getSheet[$i][11]==''){\n if($getSheet[$i][16]==''){\n $travelTime = null;\n }else{\n $stringStartWork = str_replace(array( '(', ')' ), '', $getSheet[$i][16]);\n $arrayStartWork = getDateTime('sw', $stringStartWork);\n $startWork = new DateTime($arrayStartWork['sw0']);\n $travelTime = date_diff($startTravel, $startWork);\n $travelTime = round(filterMinute($travelTime),2); \n }\n }else{\n $stringStartWork = str_replace(array( '(', ')' ), '', $getSheet[$i][12]);\n $arrayStartWork = getDateTime('sw', $stringStartWork);\n $startWork = new DateTime($arrayStartWork['sw0']);\n $travelTime = date_diff($startTravel, $startWork);\n $travelTime = round(filterMinute($travelTime),2);\n $rsps += 25;\n }\n\n // Code untuk menghitung Working time\n $stringComplete = str_replace(array( '(', ')' ), '', $getSheet[$i][16]);\n if($getSheet[$i][16]=='' || $getSheet[$i][12]==''){\n $workTime = null;\n }else{\n $stringStartWork = str_replace(array( '(', ')' ), '', $getSheet[$i][12]);\n $arrayStartWork = getDateTime('sw', $stringStartWork);\n $startWork = new DateTime($arrayStartWork['sw0']);\n\n $arrayComplete = getDateTime('cp',$stringComplete);\n $complete = new DateTime($arrayComplete['cp0']);\n $workTime = date_diff($startWork, $complete);\n $workTime = round(filterMinute($workTime),2);\n $rsps += 25;\n }\n // Menghitung wo complete\n if($getSheet[$i][16]!=null){\n $completeArr = getDateTime('complete',$stringComplete);\n $wo_complete = new DateTime(end($completeArr));\n }\n // stop clock starts here\n $stringStopClock = str_replace(array( '(', ')' ), '', $getSheet[$i][14]);\n $arrayStopClock = getDateTime('sc',$stringStopClock);\n if($arrayStartTravel != null && $arrayStartWork != null && $arrayComplete != null){\n $arrayMerge = array_merge($arrayStartTravel, $arrayStartWork, $arrayComplete);\n foreach ($arrayStopClock as $key => $value) {\n // Filter untuk anomalli data (timestamp stopclock diluar timestamp complete)\n if(new DateTime($value) >= $complete){\n continue;\n }else{\n $tempAm = array();\n foreach ($arrayMerge as $am => $arr) {\n if(new DateTime($arr) > new DateTime($value)){\n $tempSCValue = round(filterMinute(date_diff(new DateTime($value),new DateTime($arr))),2);\n $tempAm[$am] = $tempSCValue;\n }\n }\n $minValue = round(min($tempAm),2);\n $indeks = array_search(min($tempAm),$tempAm);\n // return $tempAm;\n // return $key.' :: '.$value.' , '.$indeks.' :: '.$minValue;\n if($indeks == 'st0' && $prepTime > $minValue){\n $prepTime -= $minValue;\n }else if(substr($indeks,0,2)=='st' && $travelTime > $minValue){\n $travelTime -= $minValue;\n }else if(substr($indeks,0,2)=='sw' && $workTime > $minValue){\n $workTime -= $minValue;\n }\n }\n }\n }\n\n //Menghitung Total durasi starts here\n $total_durasi_serpo = null;\n $category = null;\n $root_cause = null;\n $kendala = null;\n $terminasi_pop = null;\n $total_durasi_sc = null;\n $total_durasi_serpo = $prepTime + $travelTime + $workTime;\n // Category setiap root cause\n if($getSheet[$i][24]!=null){\n $category = $getSheet[$i][24];\n }\n // Root cause diperoleh dari kolom root cause\n if($getSheet[$i][25]!=null){\n $root_cause = $getSheet[$i][25];\n // $root_cause = findRootCause($getSheet[$i][23]);\n }\n // kendala diperoleh dari kolom kendala\n if($getSheet[$i][26]!=null){\n $kendala = $getSheet[$i][26];\n // $kendala = findKendala($getSheet[$i][20]);\n }\n // terminasi pop diperoleh dari kolom terminasi pop\n if($getSheet[$i][27]!=null){\n $terminasi_pop = $getSheet[$i][27];\n }\n // filter untuk total sc apabila kosong\n if($getSheet[$i][29]!=null){\n $total_durasi_sc = $getSheet[$i][29];\n }\n // code untuk menyimpan ke db (tabel excel)\n $data = new Excel();\n $data->ar_id = $getSheet[$i][0];\n $data->prob_id = $getSheet[$i][1];\n $data->kode_wo = $getSheet[$i][2];\n $data->region = $getSheet[$i][5];\n $data->basecamp = $getSheet[$i][6];\n $data->serpo = $getSheet[$i][7];\n $data->wo_date = $WO_Date;\n $data->wo_complete = $wo_complete;\n $data->durasi_sbu = $SBU;\n $data->prep_time = $prepTime;\n $data->travel_time = $travelTime;\n $data->work_time = $workTime;\n $data->rsps = $rsps/100;\n $data->total_durasi_serpo = $total_durasi_serpo;\n $data->total_durasi_wo = $total_durasi_serpo + $SBU;\n $data->total_durasi_sc = $total_durasi_sc;\n $data->category = $category;\n $data->root_cause = $root_cause;\n $data->kendala = $kendala;\n $data->terminasi_pop = $terminasi_pop;\n $data->root_cause_description = $getSheet[$i][23];\n $data->kendala_description = $getSheet[$i][20];\n $data->save();\n }\n }\n }\n return redirect()->route('allData.index');\n }", "title": "" }, { "docid": "1bf79b3ffa8513deea68305f6c6fce23", "score": "0.48829752", "text": "function store($dateStart ,$dateFinish , $available_room ){\n //data needed :\n /// dateStart \n //dd($dateStart);\n /// dateFinish\n //dd($dateFinish);\n /// id_reservation\n ///id_room\n //dd(Request('id_room'));\n ///id_user\n // dd(Auth::id());\n // is_approved\n /// file\n // created_at\n // updated_at\n\n\n \n\n \n ///generate the name of the file (random string)\n // do{\n // $file_name = bin2hex(random_bytes(5));\n // $file_exists = reservation::where('file',$file_name)->get();\n // } while (count($file_exists) != 0);\n // $file_name = Auth::user()->name . $file_name;\n\n\n ////generate the name of the file\n $file_name = Auth::user()->name . date(\"Y-m-d_h:i:sa\") ;\n request('file')->storeAs('files',$file_name); \n $id_room = Request('id_room');\n\n $id_user = Auth::id();\n\n $data = array('id_room' => $id_room, \n 'id_user' => $id_user,\n 'date_time_start' => $dateStart,\n 'date_time_finish' => $dateFinish,\n 'file' => $file_name,\n 'created_at' => date('Y-m-d H:i:s'));\n //dd($data);\n DB::table('reservations')->insert($data);\n return redirect('/ClubHome');\n }", "title": "" } ]
1a718db08f05878538edea953242405a
/// erabiltzailea eta pass ondo sartu dizen konprobatu
[ { "docid": "49fd90bad2a38c4f0f3f3ac0ba1047c7", "score": "0.0", "text": "public function validar($usuario, $contrasena) {\r\n $query = \"select usuario from usuarios where usuario='$usuario' and contrasena='$contrasena' and activo=1\";\r\n $result = $this->mysqli->query($query);\r\n if ($result->num_rows == 1) {\r\n return TRUE;\r\n } else {\r\n return FALSE;\r\n }\r\n }", "title": "" } ]
[ { "docid": "e1f0d933a6253291a12fd8254fba5a46", "score": "0.71574324", "text": "abstract public function dajSveParoveUlazIzlaz();", "title": "" }, { "docid": "651014fda3171f283034e7a49b54c179", "score": "0.6817444", "text": "public function tinhDienTich()\n {\n }", "title": "" }, { "docid": "80d1ba9d08e303707b3cfaefa3c27393", "score": "0.6425998", "text": "public function czyPozyczkaSplacona()\n {\n }", "title": "" }, { "docid": "8df0f0a51a0d047925b7aed74a6b94de", "score": "0.6404332", "text": "public function czyPozyczkaOdstapiona()\n {\n }", "title": "" }, { "docid": "2e284827ea95ca59877c80df71ce0e15", "score": "0.63607436", "text": "public function feriado();", "title": "" }, { "docid": "8085d3834cf87364e5abe65d35a97663", "score": "0.6351154", "text": "public function saldos_fin_cont_pb_e_lalur(){\n \n}", "title": "" }, { "docid": "8b11a00f011a7f20db9a782b190484a1", "score": "0.6328052", "text": "public function pretraga() {\n $this->prikaz('pretraga', []);\n }", "title": "" }, { "docid": "25e81219b024df5f0f475fe3083b103d", "score": "0.6288101", "text": "function ispisiCestitku()\n\t{\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<title> Memory - Bravo!</title>\n\t\t</head>\n\t\t<body>\n\t\t\t<p>\n\t\t\t\tBravo, <?php echo htmlentities( $this->imeIgraca ); ?>!\n\t\t\t\t<br/>\n\t\t\t\tZavršio si igru u <?php echo ($this->brojPoteza - 1); ?> poteza!\n\t\t\t\t<br/>\n\t\t\t</p>\n\t\t</body>\n\t\t</html>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "019084decfb5d6a871b3d59fe79d6161", "score": "0.6268828", "text": "function abilitazione($abilitazione){}", "title": "" }, { "docid": "579933170fd40dcfc353f79bfba3a8ce", "score": "0.62292755", "text": "function nilai_A (){\r\n\t\techo \"Selamat… proses belajarmu sangat baik, tingkatkan terus kemampuan codingnya…\";\r\n\t}", "title": "" }, { "docid": "b429b74ab6b82b7e01c996097e99b209", "score": "0.6221503", "text": "abstract public function dajSveDozvoljeneUlaze();", "title": "" }, { "docid": "14601e899e9f733bdd5e218029bb8238", "score": "0.6189744", "text": "function pozdrav (){\r\n\t\t\techo \"<h1> Dobar dan </h1>\";\r\n\t\t}", "title": "" }, { "docid": "1bf4e7180bcb1a5b98f593b065e12532", "score": "0.6164334", "text": "public function descMarzoAbril()\n {\n\n }", "title": "" }, { "docid": "af339bbed1a7e0af32cdf287dbe34d06", "score": "0.61476135", "text": "function olustur(){\n\t\tglobal $degerler;\n\n\t\t$this->veritabani_ayarlarini_yap();\n\t\t$urun_id = $_GET['id'];\n\t\t$degerler[\"urun_adi\"] = $this->urun_adi_al($urun_id);\n\t\t$degerler[\"yorumlar\"] = $this->yorumlari_getir($urun_id);\n\t\trequire_once(\"yorumlar_template.php\");\n\t}", "title": "" }, { "docid": "a1965097a388f24efb5451d07351bd63", "score": "0.6146315", "text": "abstract public function nyalakanMesin();", "title": "" }, { "docid": "551355b3a8a043c77641efee60074d08", "score": "0.6140908", "text": "public function otkazi_prihvacen(){\r\n if(!isset($_GET['termin']))\r\n header(\"Location = ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n require_once 'models/termin.php';\r\n Zahtev::obrisi($_SESSION['username'], $_GET['termin']);\r\n Termin::umanjiBrojIgraca($_GET['termin']);\r\n header(\"Location: ?controller=admin&action=termini\");\r\n exit();\r\n }", "title": "" }, { "docid": "0baf2ff2c87d3543afde57bee7625197", "score": "0.6126618", "text": "public function escreverComentario()\n {\n }", "title": "" }, { "docid": "2c4e97fdc55ab8449de7eaddda7ab253", "score": "0.6052633", "text": "public function Lutador();", "title": "" }, { "docid": "7942a0123015b7db1fb8ec8635e48844", "score": "0.603401", "text": "function muj_vypis($hodnota){\n\t echo \"$hodnota<br />\";\n }", "title": "" }, { "docid": "e66402690240a10a2095c00a90defada", "score": "0.6031118", "text": "public function estadistica()\n {\n }", "title": "" }, { "docid": "c10487c64b8d2aeb6630069245c4201f", "score": "0.6029442", "text": "public function prihvati(){\r\n if(!isset($_GET['korisnik']) || !isset($_GET['termin']))\r\n header(\"Location: ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n require_once 'models/termin.php';\r\n Zahtev::prihvati($_GET['korisnik'], $_GET['termin']);\r\n Termin::uvecajBrojIgraca($_GET['termin']);\r\n header(\"Location: ?controller=admin&action=obavestenja\");\r\n exit();\r\n }", "title": "" }, { "docid": "45c7e2b1d6acd3ec20727796c6ef7c65", "score": "0.602916", "text": "public function respostacontato()\n {\n //\n }", "title": "" }, { "docid": "5a01acf07515e03416278aa9c197627c", "score": "0.60159755", "text": "public function otkazi_kreiran(){\r\n if(!isset($_GET['termin']))\r\n header(\"Location = ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n require_once 'models/termin.php';\r\n Zahtev::obrisiSve($_GET['termin']);\r\n Termin::obrisi($_GET['termin']);\r\n header(\"Location: ?controller=admin&action=termini\");\r\n exit();\r\n }", "title": "" }, { "docid": "c3c925119be47f195323e8c4a7dd9e0f", "score": "0.60128933", "text": "abstract public function dajSveIzlazeZaUlaz($ulaz);", "title": "" }, { "docid": "efaa00f789a6dd6765bc89bae4295f8e", "score": "0.59999925", "text": "function hamxuatgiatri(){\n return 30;\n }", "title": "" }, { "docid": "950dd11c897cbae357953b49271600a9", "score": "0.59981334", "text": "public function spracuj($parametre) {\r\n //kontroler odosle prehliadacu hlavicku aby vedel ze ide o chybovy strankku\r\n header(\"HTTP//1.0 404 Not Found\");\r\n //hlavicka stranky\r\n $this->hlavicka['titulok'] = 'Chyba 404';\r\n $this->hlavicka['popis'] = 'Chybova stranka Datalea';\r\n $this->hlavicka['klucove_slova'] = 'chyba, chybovy vypis';\r\n //nastavenie sablony\r\n $this->pohlad = 'chyba';\r\n }", "title": "" }, { "docid": "7b7bcfe502d3ee0863f38f9883239203", "score": "0.59962505", "text": "function darBienvenida ($nombre) {\n echo \"Bievenido/a \".$nombre. \"!!\";\n }", "title": "" }, { "docid": "c487fd09f08c96010917c74e4d64f766", "score": "0.59878343", "text": "function Llena_Enc($enc,&$L_gde_enc,&$L_fac_enc,$Listop){\n\t//general::writeevent('REVISA_DATOS => ididespacho '.$enc[0].' numguia '.$enc[1].' fechaguia '.$enc[2].' idordenpick '.$enc[3].' enc 4 '.$enc[4] .' enc 5 '.$enc[5]);\n\t$Listop->gofirst();\n\t$id_ordenent=$Listop->getelem()->id_ordenent;\t\n\tif ($enc[5]){\n\t\tbizcve::putordenpicking($newop = new connlist(new dtoencordenpicking(\n\t\t\t\t\t\t\t\t\t\t\t\t\t array('id_ordenpicking'=>$enc[3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t'id_ordenent'=>$id_ordenent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t'id_estado'=>'PF'))), null);\t\t\n\t}\n\t/*Para obtener datos del cliente consultamos la OE*/\n\tbizcve::getordenent($ListEncOe = new connlist(new dtoencordenent(array('id_ordenent'=>$id_ordenent))), $ListDetOe = new connlist);\n\t$ListEncOe->gofirst();\n\t$id_cotizacion=$ListEncOe->getelem()->id_cotizacion;\t\n\t$idtipopago =$ListEncOe->getelem()->id_tipopago;\n\n\t$flujo=$ListEncOe->getelem()->id_tipoflujo;\t\n\t$hoy=DATE('d/m/Y');\n\tif ($flujo==3 || $flujo==4){\n\t/*Para generar los documentos de Guia de despacho*/\t\t\t\n\t\t$ListEnc = new connlist(new dtodocumento(array('id_tipodocumento'=> 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'id_tipoorigen'=> 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'tipoorigen'=> 'OE',\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'sigtipodoc'=>'GDE',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numorigen'=>$id_ordenent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numdocumento'=>$enc[1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numdocrefop'=>$enc[3],\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'fechadocumento'=>$enc[2],\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codigovendedor'=>$ListEncOe->getelem()->codigovendedor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'rutcliente'=>$ListEncOe->getelem()->rutcliente,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'razonsoc'=>$ListEncOe->getelem()->razonsoc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'giro'=>$ListEncOe->getelem()->giro,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'direccion'=>$ListEncOe->getelem()->direccion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'comuna'=>$ListEncOe->getelem()->comuna,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'iva'=>$ListEncOe->getelem()->iva,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'condicion'=>$ListEncOe->getelem()->condicion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'diascondicion'=>$ListEncOe->getelem()->diascondicion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'fonocontacto'=>$ListEncOe->getelem()->fonocontacto,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'observaciones'=>$ListEncOe->getelem()->observaciones,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'nota'=>$ListEncOe->getelem()->nota,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codlocalventa'=>$ListEncOe->getelem()->codlocalventa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codlocalcsum'=>$ListEncOe->getelem()->codlocalcsum,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'feccrea'=>general::formato_fecha_FORM2DB($hoy),\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'usrcrea'=>'Despacho')\n\t \t\t\t\t\t\t\t\t\t\t\t));\t\n\t}\n\n\t$L_gde_enc=$ListEnc;\n\t$ListDetOe->gofirst();\t\n\t/*Para generar el encabezado de la Factura*/\n\tif ($flujo==4){\n\t\t$ListEncFct = new connlist(new dtodocumento(array('id_tipodocumento'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'id_tipoorigen'=> 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'tipoorigen'=> 'OE',\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'sigtipodoc'=>'FCT',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numorigen'=>$id_ordenent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numdocumento'=>$enc[1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'numdocrefop'=>$enc[3],\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'fechadocumento'=>$enc[2],\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codigovendedor'=>$ListEncOe->getelem()->codigovendedor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'rutcliente'=>$ListEncOe->getelem()->rutcliente,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'razonsoc'=>$ListEncOe->getelem()->razonsoc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'giro'=>$ListEncOe->getelem()->giro,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'direccion'=>$ListEncOe->getelem()->direccion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'comuna'=>$ListEncOe->getelem()->comuna,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'iva'=>$ListEncOe->getelem()->iva,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'condicion'=>$ListEncOe->getelem()->condicion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'diascondicion'=>$ListEncOe->getelem()->diascondicion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'fonocontacto'=>$ListEncOe->getelem()->fonocontacto,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'observaciones'=>$ListEncOe->getelem()->observaciones,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'nota'=>$ListEncOe->getelem()->nota,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codlocalventa'=>$ListEncOe->getelem()->codlocalventa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'codlocalcsum'=>$ListEncOe->getelem()->codlocalcsum,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'feccrea'=>general::formato_fecha_FORM2DB($hoy),\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'usrcrea'=>'Despacho')\n\t \t\t\t\t\t\t\t\t\t\t\t));\t\t\n\t}\t\n\t$L_fac_enc=$ListEncFct;\n\treturn true;\n}", "title": "" }, { "docid": "6ff630739600dc2b89ca1be13aafee66", "score": "0.598506", "text": "public function contra();", "title": "" }, { "docid": "06e12a7d78f4347dbf6171cb00d47afd", "score": "0.59803206", "text": "public function prijavise(){\r\n if(!isset($_GET['termin']))\r\n header(\"Location: ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n Zahtev::posalji($_SESSION['username'], $_GET['termin']);\r\n header(\"Location: ?controller=admin&action=termini\");\r\n exit();\r\n }", "title": "" }, { "docid": "05ee7435415b98f689c5e9c58ca30d45", "score": "0.59686893", "text": "public function bloco_9_ecf(){\n $this->abertura_bloco_9_ecf();\n// $this->avisos_escr(); // --> INSERIDO PELO SISTEMA\n $this->regs_do_arq();\n $this->enc_bloco_9_ecf();\n $this->enc_arquivo_digital_ecf();\n}", "title": "" }, { "docid": "4dcd3ecaa044c965cc1376871b85712c", "score": "0.59588474", "text": "function manaFunkcijaArNeobligatuParametru($var='zivis'){\n\t\n}", "title": "" }, { "docid": "1589dcc4992c0a4318eeb93946143160", "score": "0.5946944", "text": "public function vente();", "title": "" }, { "docid": "fb500cb9dba507af48b00c96abab1d57", "score": "0.5935204", "text": "public function potvrdi(){\r\n if(!isset($_GET['termin']) || !isset($_GET['korisnik']) || !isset($_GET['ocena']) || !isset($_GET['razlog']))\r\n header(\"Location: ?controller=admin&action=index\");\r\n require_once 'models/ocena.php';\r\n require_once 'models/korisnik.php';\r\n require_once 'models/termin.php';\r\n Ocena::unesi($_GET['termin'], $_GET['korisnik'], $_SESSION['username'], $_GET['ocena'], $_GET['razlog']);\r\n Korisnik::uvecajOcenu($_GET['korisnik'], $_GET['ocena']);\r\n Termin::azurirajOcenu($_GET['korisnik']);\r\n unset($_GET['korisnik']);\r\n unset($_GET['ocena']);\r\n unset($_GET['razlog']);\r\n header(\"Location: ?controller=admin&action=oceni&termin=\" . $_GET['termin']);\r\n }", "title": "" }, { "docid": "8dbe78482e5f20cd2f12e6be59e48eaa", "score": "0.5929236", "text": "public function konstruiraj_igru()\n\t{\n\t\t$bs = new BriskulaService();\n\t\t$ss = new SobaService();\n\n\t\t$_SESSION['id_igre'] = $bs->stvori_novu_igru($_SESSION['id_sobe'], $_SESSION['broj_igraca']);\n\t\t$ss->postavi_id_igre_u_sobu($_SESSION['id_sobe'], $_SESSION['broj_igraca'], $_SESSION['id_igre']);\n\n\t\theader('Location: ' . __SITE_URL . \"/index.php?rt=igra\" );\n\t\texit();\n\t}", "title": "" }, { "docid": "6b0e9d149869bba7a2b6a0d1b4bb80a6", "score": "0.59165883", "text": "public function kosarka() {\r\n require_once 'models/termin.php';\r\n require_once 'models/baloni.php';\r\n $_POST['sport'] = 'kosarka';\r\n self::$termini = Termin::dohvatiSveAktivneUKojimaNeUcestvujem($_SESSION['username'], 'kosarka');\r\n self::$baloni = Balon::dohvatiSve();\r\n require_once 'views/admin/header.php';\r\n require_once 'views/termini.php';\r\n require_once 'views/baloni.php';\r\n require_once 'views/footer.php';\r\n }", "title": "" }, { "docid": "56dfd53ba1b10da95785816478622f5e", "score": "0.5912032", "text": "public function nuovaaziendaAction(){\n \n }", "title": "" }, { "docid": "750b7b0bc349b6ede4bf9a874f11f76a", "score": "0.5897235", "text": "public function otkazi(){\r\n if(!isset($_GET['termin']))\r\n header(\"Location = ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n Zahtev::obrisi($_SESSION['username'], $_GET['termin']);\r\n header(\"Location: ?controller=admin&action=termini\");\r\n exit();\r\n }", "title": "" }, { "docid": "718e58f610f7a908656f2dc2a54eb984", "score": "0.58929044", "text": "function post_code() {\n\t$golosname=$_POST['golosname'];\n\t$vopr=intval($_POST['vopr']);\n\tif(!$vopr) idie('error n');\n\n\n\t$gol=array(); for($i=1;$i<=$vopr;$i++) { $g=intval($_POST[$golosname.'_'.$i]);\n\t\tif(!$g) // dier($_POST);\nidie(\"Нельзя оставлять пункты невыбранными.<br>Пожалуйста вернитесь и сделайте выбор.\");\n\t\telse $gol[$i]=$g;\n\t}\n\n\tif(!golos_update($golosname,$gol)) idie(\"Ошибка: вы уже голосовали!\"); // добавить голос, если не голосовал такой\n\tgolos_calculate($golosname,$gol); // пересчитать результат\n\tredirect($_POST['golos_return']);\n}", "title": "" }, { "docid": "afdaf07b1a8f91b5ccb8578ec07c40e8", "score": "0.58868176", "text": "abstract public function gerar();", "title": "" }, { "docid": "afdaf07b1a8f91b5ccb8578ec07c40e8", "score": "0.58868176", "text": "abstract public function gerar();", "title": "" }, { "docid": "ca68f8810d6606d7c76e7527998eac29", "score": "0.58819467", "text": "public function det_saldos_cont_res_ant_enc(){\n \n}", "title": "" }, { "docid": "565a5c1af5f3d37467de25f123aba4c6", "score": "0.58594745", "text": "function semakPembolehubah($senarai,$jadual='entahlah',$p='0')\n\t{\n\t\t# semak $senarai adalah array atau tidak\n\t\t$semak = is_array($senarai) ? 'array' : 'bukan';\n\t\tif($semak == 'array'):\n\t\t\techo '<pre>$' . $jadual . '=><br>';\n\t\t\tif($p == '0') print_r($senarai);\n\t\t\tif($p == '1') var_export($senarai);\n\t\t\techo '</pre>' . \"\\n\";\n\t\telse:\n\t\t\techo tagVar($senarai,$jadual,2);\n\t\tendif;\n\t\t//$this->semakPembolehubah($ujian,'ujian',0);\n\t\t#http://php.net/manual/en/function.var-export.php\n\t\t#http://php.net/manual/en/function.print-r.php\n\t}", "title": "" }, { "docid": "a6551526583ba8a7404bc456925b4ee0", "score": "0.5850118", "text": "function tarefa($txt) {\n $this->duelo->apagar_tarefa($this->dono, 'end_phase', $this->inst);\n parent::destruir();\n return false;\n }", "title": "" }, { "docid": "f0bb0805268799587eb636f9dd3c48c0", "score": "0.5839612", "text": "function Geral() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n \r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_vinc = $_REQUEST['w_chave_vinc'];\r\n $w_sq_projeto_rubrica = $_REQUEST['w_sq_projeto_rubrica'];\r\n $w_imposto = $_REQUEST['w_imposto'];\r\n $w_sq_documento = $_REQUEST['w_sq_documento'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_exige_autorizacao = 'N';\r\n $w_readonly = '';\r\n $w_erro = '';\r\n\r\n // Recupera os dados do lançamento financeiro de origem\r\n $sql = new db_getSolicData; $RS_Vinc = $sql->getInstanceOf($dbms,$w_chave_vinc);\r\n $dados_vinc = explode('|@|',f($RS_Vinc,'dados_solic'));\r\n $RS_Vinc = $sql->getInstanceOf($dbms,$w_chave_vinc,$dados_vinc[5]);\r\n\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_cpf = $_REQUEST['w_cpf'];\r\n $w_cnpj = $_REQUEST['w_cnpj'];\r\n $w_sq_prop = $_REQUEST['w_sq_prop'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_nome_resumido = $_REQUEST['w_nome_resumido'];\r\n $w_sexo = $_REQUEST['w_sexo'];\r\n $w_vinculo = $_REQUEST['w_vinculo'];\r\n $w_solic_vinculo = $_REQUEST['w_solic_vinculo'];\r\n\r\n // Se for recarga da página\r\n $w_sq_menu_relac = $_REQUEST['w_sq_menu_relac'];\r\n if($w_sq_menu_relac=='CLASSIF') {\r\n $w_chave_pai = '';\r\n } else {\r\n $w_chave_pai = $_REQUEST['w_chave_pai'];\r\n }\r\n $w_pessoa = $_REQUEST['w_pessoa'];\r\n $w_tipo_pessoa = $_REQUEST['w_tipo_pessoa'];\r\n $w_nm_tipo_pessoa = $_REQUEST['w_nm_tipo_pessoa'];\r\n $w_sq_acordo_parcela = $_REQUEST['w_sq_acordo_parcela'];\r\n $w_sq_forma_pagamento = $_REQUEST['w_sq_forma_pagamento'];\r\n $w_forma_atual = $_REQUEST['w_forma_atual'];\r\n $w_vencimento_atual = $_REQUEST['w_vencimento_atual'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_observacao = $_REQUEST['w_observacao'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_executor = $_REQUEST['w_executor'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_emissao = $_REQUEST['w_emissao'];\r\n $w_vencimento = $_REQUEST['w_vencimento'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_conclusao = $_REQUEST['w_conclusao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_opiniao = $_REQUEST['w_opiniao'];\r\n $w_data_hora = $_REQUEST['w_data_hora'];\r\n $w_pais = $_REQUEST['w_pais'];\r\n $w_uf = $_REQUEST['w_uf'];\r\n $w_cidade = $_REQUEST['w_cidade'];\r\n $w_palavra_chave = $_REQUEST['w_palavra_chave'];\r\n $w_sqcc = $_REQUEST['w_sqcc'];\r\n $w_tipo_rubrica = $_REQUEST['w_tipo_rubrica'];\r\n $w_solic_apoio = $_REQUEST['w_solic_apoio'];\r\n $w_data_autorizacao = $_REQUEST['w_data_autorizacao'];\r\n $w_texto_autorizacao = $_REQUEST['w_texto_autorizacao'];\r\n $w_numero_processo = $_REQUEST['w_numero_processo'];\r\n $w_protocolo = $_REQUEST['w_protocolo'];\r\n $w_protocolo_nm = $_REQUEST['w_protocolo_nm'];\r\n $w_qtd_nota = $_REQUEST['w_qtd_nota'];\r\n $w_per_ini = $_REQUEST['w_per_ini'];\r\n $w_per_fim = $_REQUEST['w_per_fim'];\r\n $w_texto_pagamento = $_REQUEST['w_texto_pagamento'];\r\n $w_moeda = $_REQUEST['w_moeda'];\r\n $w_solic_apoio = $_REQUEST['w_solic_apoio'];\r\n $w_data_autorizacao = $_REQUEST['w_data_autorizacao'];\r\n $w_texto_autorizacao = $_REQUEST['w_texto_autorizacao'];\r\n\r\n // Recarrega dados do comprovante\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_doc = $_REQUEST['w_valor_doc'];\r\n $w_patrimonio = $_REQUEST['w_patrimonio'];\r\n $w_tipo = $_REQUEST['w_tipo'];\r\n } elseif(strpos('AEV',$O)!==false || nvl($w_copia,'')!='') {\r\n // Recupera os dados do lançamento\r\n\r\n $sql = new db_getSolicData;\r\n if ($w_copia>'') $RS = $sql->getInstanceOf($dbms,$w_copia,$SG);\r\n else $RS = $sql->getInstanceOf($dbms,$w_chave,$SG);\r\n if (count($RS)>0) {\r\n $w_imposto = f($RS,'sq_imposto');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_observacao = f($RS,'observacao');\r\n $w_aviso = f($RS,'aviso_prox_conc');\r\n $w_dias = f($RS,'dias_aviso');\r\n $w_sq_acordo_parcela = f($RS,'sq_acordo_parcela');\r\n $w_sq_tipo_lancamento = f($RS,'sq_tipo_lancamento');\r\n $w_pessoa = f($RS,'pessoa');\r\n $w_tipo_pessoa = f($RS,'sq_tipo_pessoa');\r\n $w_nm_tipo_pessoa = f($RS,'nm_tipo_pessoa');\r\n $w_sq_forma_pagamento = f($RS,'sq_forma_pagamento');\r\n $w_forma_atual = f($RS,'sq_forma_pagamento');\r\n $w_codigo_interno = f($RS,'codigo_interno');\r\n $w_chave_pai = f($RS,'sq_solic_pai');\r\n $w_chave_aux = null;\r\n $w_sq_menu = f($RS,'sq_menu');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_sq_tramite = f($RS,'sq_siw_tramite');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_executor = f($RS,'executor');\r\n $w_descricao = f($RS,'descricao');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_vencimento = FormataDataEdicao(f($RS,'fim'));\r\n $w_vencimento_atual = FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao = f($RS,'inclusao');\r\n $w_ultima_alteracao = f($RS,'ultima_alteracao');\r\n $w_conclusao = f($RS,'conclusao');\r\n $w_opiniao = f($RS,'opiniao');\r\n $w_data_hora = f($RS,'data_hora');\r\n $w_sqcc = f($RS,'sq_cc');\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_origem');\r\n $w_palavra_chave = f($RS,'palavra_chave');\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n $w_tipo_rubrica = f($RS,'tipo_rubrica');\r\n $w_numero_processo = f($RS,'processo');\r\n $w_protocolo = f($RS,'processo');\r\n $w_protocolo_nm = f($RS,'processo');\r\n $w_nm_tipo_rubrica = f($RS,'nm_tipo_rubrica');\r\n $w_qtd_nota = f($RS,'qtd_nota');\r\n $w_per_ini = FormataDataEdicao(f($RS,'referencia_inicio'));\r\n $w_per_fim = FormataDataEdicao(f($RS,'referencia_fim'));\r\n $w_texto_pagamento = f($RS,'condicoes_pagamento');\r\n $w_cpf = f($RS,'cpf');\r\n $w_cnpj = f($RS,'cnpj');\r\n $w_nome = f($RS,'nm_pessoa');\r\n $w_nome_resumido = f($RS,'nm_pessoa_resumido');\r\n $w_sexo = f($RS,'sexo');\r\n $w_vinculo = f($RS,'sq_tipo_vinculo');\r\n $w_solic_vinculo = f($RS,'sq_solic_vinculo');\r\n $w_uf = f($RS,'co_uf');\r\n $w_sq_prop = f($RS,'sq_prop');\r\n $w_dados_pai = explode('|@|',f($RS,'dados_pai'));\r\n $w_sq_menu_relac = $w_dados_pai[3];\r\n if (nvl($w_sqcc,'')!='') $w_sq_menu_relac='CLASSIF';\r\n $w_sq_projeto_rubrica = f($RS,'sq_projeto_rubrica');\r\n $w_moeda = f($RS,'sq_moeda');\r\n $w_solic_apoio = f($RS,'sq_solic_apoio');\r\n $w_data_autorizacao = FormataDataEdicao(f($RS,'data_autorizacao'));\r\n $w_texto_autorizacao = f($RS,'texto_autorizacao');\r\n }\r\n\r\n if (nvl($w_troca,'')=='' && (nvl($w_copia,'')!='' || nvl($w_chave,'')!='')) {\r\n // Recupera dados do comprovante\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'sq_tipo_documento','asc');\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n $w_chave_doc = f($RS,'sq_lancamento_doc');\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_doc = formatNumber(f($RS,'valor'));\r\n $w_patrimonio = f($RS,'patrimonio');\r\n $w_tributo = f($RS,'calcula_tributo');\r\n $w_retencao = f($RS,'calcula_retencao');\r\n }\r\n }\r\n\r\n if (nvl($w_sq_prop,'')=='') $w_sq_prop = $w_usuario;\r\n\r\n if (nvl($w_imposto,'')!='') {\r\n // Recupera os dados da finalidade informada\r\n $sql = new db_getImposto;\r\n $RS_Imposto = $sql->getInstanceOf($dbms, $w_imposto, $w_cliente);\r\n foreach ($RS_Imposto as $row) {\r\n $RS_Imposto = $row;\r\n break;\r\n }\r\n\r\n // Inicializa o valor da moeda como sendo a mesma do lançamento pai\r\n if (nvl($w_moeda,'')=='') $w_moeda = f($RS_Vinc,'sq_moeda');\r\n\r\n if (nvl(f($RS_Imposto, 'sq_tipo_documento'), '') != '' && nvl($_REQUEST['w_sq_tipo_documento'], '') == '')\r\n $w_sq_tipo_documento = f($RS_Imposto, 'sq_tipo_documento');\r\n if (nvl(f($RS_Imposto, 'sq_tipo_lancamento'), '') != '')\r\n $w_sq_tipo_lancamento = f($RS_Imposto, 'sq_tipo_lancamento');\r\n if (nvl(f($RS_Imposto, 'sq_forma_pagamento'), '') != '')\r\n $w_sq_forma_pagamento = f($RS_Imposto, 'sq_forma_pagamento');\r\n\r\n if (f($RS_Imposto, 'tipo_beneficiario') != 3) {\r\n if (f($RS_Imposto, 'tipo_beneficiario') == 0)\r\n $w_pessoa = f($RS_Vinc, 'pessoa'); // Igual ao do lançamento financeiro\r\n elseif (f($RS_Imposto, 'tipo_beneficiario') == 1)\r\n $w_pessoa = $w_cliente; // A própria organização\r\n elseif (f($RS_Imposto, 'tipo_beneficiario') == 2)\r\n $w_pessoa = f($RS_Imposto, 'sq_beneficiario'); // Padrão vinculado à finalidade\r\n }\r\n\r\n if (f($RS_Imposto, 'tipo_vinculo') != 2) {\r\n if (f($RS_Imposto, 'tipo_vinculo') == 0) {\r\n // Igual ao do lançamento financeiro\r\n if (nvl(f($RS_Vinc, 'sq_cc'), '') != '') {\r\n $w_sq_menu_relac = 'CLASSIF';\r\n $w_sqcc = f($RS_Vinc, 'sq_cc');\r\n } else {\r\n $w_dados_vinc = explode('|@|', f($RS_Vinc, 'dados_pai'));\r\n $w_sq_menu_relac = $w_dados_vinc[3];\r\n $w_chave_pai = f($RS_Vinc, 'sq_solic_pai');\r\n }\r\n } elseif (f($RS_Imposto, 'tipo_vinculo') == 1) {\r\n // Padrão vinculado à finalidade\r\n if (nvl(f($RS_Imposto, 'sq_cc_vinculo'), '') != '') {\r\n $w_sq_menu_relac = 'CLASSIF';\r\n $w_sqcc = f($RS_Imposto, 'sq_cc_vinculo');\r\n } elseif (nvl(f($RS_Imposto, 'sq_solic_vinculo'), '') != '') {\r\n $sql = new db_getSolicData;\r\n $RS_Vinc_pai = $sql->getInstanceOf($dbms, f($RS_Imposto, 'sq_solic_vinculo'));\r\n $dados_vinc = explode('|@|', f($RS_Vinc_pai, 'dados_solic'));\r\n $w_sq_menu_relac = $dados_vinc[3];\r\n $w_chave_pai = f($RS_Imposto, 'sq_solic_vinculo');\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (nvl($w_chave_vinc,'')!='') {\r\n // Se ligado a projeto, recupera rubricas\r\n $sql = new db_getSolicRubrica; $RS_Rub = $sql->getInstanceOf($dbms,f($RS_Vinc,'sq_solic_pai'),null,'S',null,null,null,null,null,'SELECAO');\r\n\r\n if (count($RS_Rub)>0) {\r\n if (nvl($w_sq_projeto_rubrica,'')=='' && $O!='I') {\r\n // Recupera os documentos do lançamento\r\n $sql = new db_getLancamentoDoc; $RS_Doc = $sql->getInstanceOf($dbms,$w_chave,null,null,null,null,null,null,'DOCS');\r\n if (count($RS_Doc)>0) {\r\n foreach($RS_Doc as $row) {\r\n $sql = new db_getLancamentoItem; $RS_Item = $sql->getInstanceOf($dbms,null,f($row,'sq_lancamento_doc'),null,null,null);\r\n foreach($RS_Item as $row1) {\r\n $w_sq_projeto_rubrica = f($row1,'sq_projeto_rubrica');\r\n break;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Inicializa o valor da rubrica como sendo a mesma do lançamento pai\r\n if (nvl($w_sq_projeto_rubrica,'')=='') $w_sq_projeto_rubrica = f($RS_Vinc,'sq_projeto_rubrica');\r\n\r\n if (nvl($w_sq_projeto_rubrica,'')!='') {\r\n // Recupera dados da rubrica\r\n $sql = new db_getSolicRubrica; $RS = $sql->getInstanceOf($dbms,f($RS_Vinc,'sq_solic_pai'),$w_sq_projeto_rubrica,null,null,null,null,null,null,null);\r\n foreach($RS as $row) {\r\n $w_exige_autorizacao = f($row,'exige_autorizacao');\r\n }\r\n\r\n\r\n // Verificar fontes de financiamento possíveis. Se apenas uma, atribui direto.\r\n $sql = new db_getCronograma; $RS_Fonte = $sql->getInstanceOf($dbms,$w_sq_projeto_rubrica,null,null,null,null,'RUBFONTES');\r\n if (count($RS_Fonte)==0) {\r\n $w_exibe_ff = false;\r\n } else {\r\n $w_exibe_ff = true;\r\n if (count($RS_Fonte)==1 || nvl($w_solic_apoio,'')!='') {\r\n foreach($RS_Fonte as $row) {\r\n if (nvl($w_solic_apoio,f($row,'sq_solic_apoio'))==f($row,'sq_solic_apoio')) {\r\n $w_solic_apoio = f($row,'sq_solic_apoio');\r\n break;\r\n }\r\n }\r\n if (count($RS_Fonte)==1) $w_exibe_ff = false;\r\n }\r\n }\r\n\r\n // Inicializa o valor da fonte de financiamento como sendo a mesma do lançamento pai\r\n if (nvl($w_solic_apoio,'')=='' && nvl($w_troca,'')=='') $w_solic_apoio = f($RS_Vinc,'sq_solic_apoio');\r\n }\r\n }\r\n }\r\n\r\n // Recupera a sigla do tipo do documento para tratar a Nota Fiscal\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) { $w_tipo = f($row,'sigla'); break; }\r\n }\r\n\r\n // Recupera os documentos do lançamento financeiro\r\n $sql = new db_getLancamentoDoc; $RS_Docs = $sql->getInstanceOf($dbms,$w_chave_vinc,null,null,null,null,null,null,'DOCS');\r\n $RS_Docs = SortArray($RS_Docs,'data','asc');\r\n if (count($RS_Docs)==1) {\r\n foreach($RS_Docs as $row) {\r\n $w_sq_documento = f($row,'sq_lancamento_doc');\r\n $RS_Documento = $row;\r\n }\r\n }\r\n\r\n // Tenta recuperar os dados do beneficiário\r\n if (Nvl($w_pessoa,'')!='' || Nvl($_REQUEST['w_cpf'],'')!='' || Nvl($_REQUEST['w_cnpj'],'')!='') {\r\n // Recupera os dados do proponente\r\n $sql = new db_getBenef; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_pessoa,null,((nvl($w_pessoa,'')=='') ? $_REQUEST['w_cpf'] : null),((nvl($w_pessoa,'')=='') ? $_REQUEST['w_cnpj'] : null),null,null,null,null,null,null,null,null,null, null, null, null, null);\r\n if (count($RS)>0) {\r\n foreach($RS as $row) { $RS = $row; break; }\r\n $w_cpf = f($RS,'cpf');\r\n $w_cnpj = f($RS,'cnpj');\r\n $w_tipo_pessoa = f($RS,'sq_tipo_pessoa');\r\n $w_sq_prop = f($RS,'sq_pessoa');\r\n $w_nome = f($RS,'nm_pessoa');\r\n $w_nome_resumido = f($RS,'nome_resumido');\r\n $w_sexo = f($RS,'sexo');\r\n $w_vinculo = f($RS,'sq_tipo_vinculo');\r\n }\r\n }\r\n\r\n // Recupera as possibilidades de vinculação\r\n $w_exige_relac = true;\r\n if (f($RS_Menu,'solicita_cc')=='N') {\r\n $sql = new db_getMenuRelac; $RS = $sql->getInstanceOf($dbms, $w_menu, null, null, null, 'SERVICO');\r\n if (count($RS)==1) {\r\n $w_exige_relac = false;\r\n foreach($RS as $row) $w_sq_menu_relac = f($row,'sq_menu');\r\n }\r\n }\r\n\r\n // Recupera o trâmite de conclusão\r\n $sql = new db_getTramiteList; $RS = $sql->getInstanceOf($dbms, $w_menu,null,null,null);\r\n $RS = SortArray($RS,'ordem','asc');\r\n foreach ($RS as $row) {\r\n if (f($row,'sigla')=='AT') {\r\n $w_tramite_conc = f($row,'sq_siw_tramite');\r\n break;\r\n }\r\n }\r\n\r\n if(nvl($w_sq_menu_relac,0)>0) { $sql = new db_getMenuData; $RS_Relac = $sql->getInstanceOf($dbms,$w_sq_menu_relac); }\r\n\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n FormataCPF();\r\n FormataCNPJ();\r\n Modulo();\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n if ($O=='I') Validate('w_imposto','Finalidade','SELECT',1,1,18,'','0123456789');\r\n if (count($RS_Docs)>1) {\r\n Validate('w_sq_documento','Documento','SELECT',1,1,18,'','0123456789');\r\n }\r\n if (f($RS_Imposto,'tipo_vinculo')==2) {\r\n if ($w_exige_relac) Validate('w_sq_menu_relac','Vincular a','SELECT',1,1,18,1,1);\r\n if(nvl($w_sq_menu_relac,'')!='') {\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n Validate('w_sqcc','Classificação','SELECT',1,1,18,1,1);\r\n } else {\r\n Validate('w_chave_pai','Vinculação','SELECT',1,1,18,1,1);\r\n }\r\n }\r\n }\r\n if (count($RS_Rub)>0) Validate('w_sq_projeto_rubrica','Rubrica', 'SELECT', 1, 1, 18, '', '0123456789');\r\n if ($w_exibe_ff) Validate('w_solic_apoio','Fonte de financiamento','SELECT',1,1,18,'','0123456789');\r\n if ($w_exige_autorizacao=='S') {\r\n Validate('w_data_autorizacao','Data \"No objection\"','DATA',1,10,10,'','0123456789/');\r\n Validate('w_texto_autorizacao','Texto \"No objection\"','1','','2','500','1','0123456789');\r\n }\r\n Validate('w_sq_tipo_lancamento','Tipo do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento'),'SELECT',1,1,18,'','0123456789');\r\n Validate('w_descricao','Detalhamento','1',1,5,2000,'1','1');\r\n Validate('w_tipo_pessoa',''.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'Recebimento': 'Pagamento').' para pessoa','SELECT',1,1,18,'','0123456789');\r\n Validate('w_sq_forma_pagamento','Forma de recebimento','SELECT',1,1,18,'','0123456789');\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') 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 Validate('w_vencimento','Vencimento','DATA',1,10,10,'','0123456789/');\r\n if ($w_tipo_pessoa==1) Validate('w_cpf','CPF','CPF','1','14','14','','0123456789-.');\r\n else Validate('w_cnpj','CNPJ','CNPJ','1','18','18','','0123456789/-.');\r\n Validate('w_nome','Nome','1',1,5,60,'1','1');\r\n Validate('w_nome_resumido','Nome resumido','1',1,2,21,'1','1');\r\n if ($w_tipo_pessoa==1) Validate('w_sexo','Sexo','SELECT',1,1,1,'MF','');\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 de emissão', 'DATA', '1', '10', '10', '', '0123456789/');\r\n ShowHTML(' disAll();');\r\n }\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if ($w_troca>'') BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n elseif (!(strpos('AEV',$O)===false)) BodyOpen('onLoad=\\'this.focus()\\';');\r\n else BodyOpen('onLoad=\\'document.Form.w_imposto.focus()\\';');\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (strpos('IAEV',$O)!==false) {\r\n if (Nvl($w_pais,'')=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = Nvl(f($RS_Menu,'sq_cidade'),f($RS,'sq_cidade_padrao'));\r\n }\r\n if (strpos('EV',$O)!==false) {\r\n $w_Disabled=' DISABLED ';\r\n if ($O=='V') $w_Erro = Validacao($w_sq_solicitacao,$SG);\r\n }\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(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tramite\" value=\"'.$w_tramite_conc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.$w_cidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_solicitante\" value=\"'.$_SESSION['SQ_PESSOA'].'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade\" value=\"'.f($RS_Menu,'sq_unid_executora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_forma_atual\" value=\"'.$w_forma_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_vencimento_atual\" value=\"'.$w_vencimento_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_acordo_parcela\" value=\"'.$w_sq_acordo_parcela.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"S\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_dias\" value=\"3\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_codigo_interno\" value=\"'.$w_codigo_interno.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_qtd_nota\" value=\"'.$w_qtd_nota.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo\" value=\"'.$w_tipo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_doc\" value=\"'.$w_chave_doc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_vinc\" value=\"'.$w_chave_vinc.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" bgcolor=\"#D0D0D0\"><b>Pagamento Original</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Código:</b><br>'.f($RS_Vinc,'codigo_interno'));\r\n ShowHTML(' <td><b>Finalidade:</b><br>'.f($RS_Vinc,'descricao'));\r\n ShowHTML(' <td><b>Valor:</b><br>'.formatNumber(f($RS_Vinc,'valor')));\r\n\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n\r\n ShowHTML(' <tr>'.(($w_chave>'') ? '<td><font size=\"2\"><b>'.$w_codigo_interno.' ('.$w_chave.')</b></font></td>' : ''));\r\n if ($O=='I') {\r\n SelecaoImposto('<u>F</u>inalidade:','T', 'Selecione a finalidade do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.', $w_imposto,$w_cliente,'w_imposto',null,'onChange=\"disAll(); document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_imposto\\'; document.Form.submit();\"');\r\n } else {\r\n SelecaoImposto('<u>F</u>inalidade:','T', 'Selecione a finalidade do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.', $w_imposto,$w_cliente,'w_imposto',null,' disabled ');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_imposto\" value=\"'.$w_imposto.'\">');\r\n }\r\n\r\n if (count($RS_Docs)==1) {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_documento\" value=\"'.$w_sq_documento.'\">');\r\n } else {\r\n ShowHTML(' <tr><td colspan=\"3\" title=\"Selecione o documento ao qual este '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').' é vinculado.\"><b><b><u>D</u>ocumento:</b><br>');\r\n ShowHTML(' <SELECT ACCESSKEY=\"D\" CLASS=\"sts\" NAME=\"w_sq_documento\" '.$w_Disabled.'>');\r\n ShowHTML(' <option value=\"\">---');\r\n foreach($RS_Docs as $row) {\r\n ShowHTML(' <option value=\"'.f($row,'sq_lancamento_doc').'\" '.((Nvl($w_sq_documento,'')==f($row,'sq_lancamento_doc')) ? 'SELECTED' : '').'>'.f($row,'nm_tipo_documento').' '.f($row,'numero'));\r\n }\r\n ShowHTML(' </select>');\r\n ShowHTML(' </td></tr>');\r\n }\r\n\r\n if (nvl(f($RS_Imposto,'tipo_vinculo'),-1)==2) {\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exige_relac) selecaoServico('<U>V</U>incular a:', 'S', null, $w_sq_menu_relac, $w_menu, null, 'w_sq_menu_relac', 'MENURELAC', 'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_menu_relac\\'; document.Form.submit();\"', $w_acordo, $w_acao, $w_viagem);\r\n\r\n if(Nvl($w_sq_menu_relac,'')!='') {\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n SelecaoSolic('Classificação:',null,null,$w_cliente,$w_sqcc,$w_sq_menu_relac,null,'w_sqcc','SIWSOLIC',null,null,'<BR />',2);\r\n } else {\r\n SelecaoSolic('Vinculação:',null,null,$w_cliente,$w_chave_pai,$w_sq_menu_relac,$w_menu,'w_chave_pai',f($RS_Relac,'sigla'),'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_tipo_lancamento\\'; document.Form.submit();\"',$w_chave_pai,'<BR />',2);\r\n }\r\n }\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_pai\" value=\"'.$w_chave_pai.'\">');\r\n }\r\n\r\n if(count($RS_Rub)>0) {\r\n ShowHTML(' <tr>');\r\n SelecaoRubrica('<u>R</u>ubrica:','R', 'Selecione a rubrica do projeto.', $w_sq_projeto_rubrica,f($RS_Vinc,'sq_solic_pai'),null,'w_sq_projeto_rubrica','SELECAO','onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_projeto_rubrica\\'; document.Form.submit();\"');\r\n ShowHTML(' </tr>');\r\n\r\n // Trata fonte de financiamento\r\n if ($w_exibe_ff) {\r\n ShowHTML(' <tr>');\r\n SelecaoRubricaApoio('<u>F</u>onte de financiamento:','F', 'Selecione a fonte de financiamento que dará suporte ao lançamento.', $w_solic_apoio,$w_sq_projeto_rubrica,'w_solic_apoio','RUBFONTE',null);\r\n ShowHTML(' </tr>');\r\n } else {\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_solic_apoio\" value=\"'.$w_solic_apoio.'\">');\r\n }\r\n\r\n // Trata autorização da despesa\r\n if ($w_exige_autorizacao=='S') {\r\n ShowHTML(' <tr><td colspan=\"3\"><b><u>D</u>ata <i>No objection</i>:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_data_autorizacao\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_data_autorizacao,FormataDataEdicao(time())).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','w_data_autorizacao').'</td>');\r\n ShowHTML(' <tr><td colspan=\"3\"><b><u>T</u>exto <i>No objection</i>:</b><br><textarea '.$w_Disabled.' accesskey=\"T\" name=\"w_texto_autorizacao\" class=\"sti\" ROWS=3 cols=75 title=\"Texto de autorização da despesa\">'.$w_texto_autorizacao.'</TEXTAREA></td>');\r\n }\r\n }\r\n\r\n ShowHTML(' <tr>');\r\n SelecaoTipoLancamento('<u>T</u>ipo de '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').':','T','Selecione na lista o tipo de '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').' adequado.',$w_sq_tipo_lancamento,null,$w_cliente,'w_sq_tipo_lancamento',$SG,null,2);\r\n ShowHTML(' </tr>');\r\n\r\n // Se a descrição não foi recebida, formata conforme especificação da ABDI.\r\n if (nvl($w_descricao,'')==''||$w_descricao==f($RS_Imposto,'descricao')) {\r\n $w_descricao = f($RS_Imposto,'nome').' referente a '.lower(f($RS_Documento,'nm_tipo_documento')).' '.f($RS_Documento,'numero').', emitido por '.f($RS_Vinc,'nm_pessoa').'.';\r\n }elseif(strpos($w_descricao,f($RS_Imposto,'nome'))===false){\r\n $w_descricao = f($RS_Imposto,'nome').' referente a '.lower(f($RS_Documento,'nm_tipo_documento')).' '.f($RS_Documento,'numero').', emitido por '.f($RS_Vinc,'nm_pessoa').'.';\r\n }\r\n ShowHTML(' <tr><td colspan=3><b><u>D</u>etalhamento:</b><br><textarea '.$w_Disabled.' accesskey=\"F\" name=\"w_descricao\" class=\"sti\" ROWS=3 cols=75 title=\"Detalhamento do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.\">'.$w_descricao.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\">');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoTipoPessoa(''.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'Recebimento': 'Pagamento').' para pessoa:','T','Selecione na lista o tipo de pessoa associada a este '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.',$w_tipo_pessoa,$w_cliente,'w_tipo_pessoa',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_forma_pagamento\\'; document.Form.submit();\"',null);\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento:','F','Selecione na lista a forma de pagamento para este '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.',$w_sq_forma_pagamento,$SG,'w_sq_forma_pagamento',null);\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') {\r\n ShowHTML(' <tr valign=\"top\">');\r\n selecaoMoeda('<u>M</u>oeda:','U','Selecione a moeda na relação.',$w_moeda,null,'w_moeda','ATIVO',null);\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 ShowHTML(' <td><b><u>D</u>ata do pagamento:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_vencimento\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_vencimento,FormataDataEdicao(time())).'\" onKeyDown=\"FormataData(this,event);\">'.ExibeCalendario('Form','w_vencimento').'</td>');\r\n\r\n ShowHTML(' <tr><td colspan=\"5\" valign=\"top\" align=\"center\" style=\"border: 1px solid rgb(0,0,0);\"><b>Dados do Beneficiário</td></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_tipo_pessoa==1) ShowHTML(' <tr><td><b><u>C</u>PF:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cpf\" VALUE=\"'.$w_cpf.'\" SIZE=\"14\" MaxLength=\"14\" onKeyDown=\"FormataCPF(this, event);\" onBlur=\"disAll(); document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_nome\\'; document.Form.submit();\">');\r\n else ShowHTML(' <tr><td><b><u>C</u>NPJ:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cnpj\" VALUE=\"'.$w_cnpj.'\" SIZE=\"18\" MaxLength=\"18\" onKeyDown=\"FormataCNPJ(this, event);\" onBlur=\"disAll(); document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_nome\\'; document.Form.submit();\">');\r\n ShowHTML(' <td><b><u>N</u>ome completo:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"45\" MAXLENGTH=\"60\" VALUE=\"'.$w_nome.'\"></td>');\r\n ShowHTML(' <td><b><u>N</u>ome resumido:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome_resumido\" class=\"sti\" SIZE=\"15\" MAXLENGTH=\"21\" VALUE=\"'.$w_nome_resumido.'\"></td>');\r\n if ($w_tipo_pessoa==1) SelecaoSexo('Se<u>x</u>o:','X',null,$w_sexo,null,'w_sexo',null,null);\r\n\r\n // Recupera o tipo de vínculo\r\n $sql = new db_getVincKindList; $RS = $sql->getInstanceOf($dbms, $w_cliente, 'S', (($w_tipo_pessoa==1) ? 'Física' : 'Jurídica'), 'Fornecedor', null);\r\n foreach($RS as $row) { ShowHTML('<INPUT type=\"hidden\" name=\"w_vinculo\" value=\"'.f($row,'sq_tipo_vinculo').'\">'); break; }\r\n\r\n ShowHTML(' <tr><td colspan=\"5\" valign=\"top\" align=\"center\" style=\"border: 1px solid rgb(0,0,0);\"><b>Documento de despesa</td></td></tr>');\r\n ShowHTML(' <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 de emissão:</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 //if (Nvl($w_tipo,'-')=='NF') 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 //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_doc.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"></td>');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_doc\" value=\"'.$w_valor_doc.'\">');\r\n\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n // Verifica se poderá ser feito o envio da solicitação, a partir do resultado da validação\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"javascript:window.close(); opener.focus();\" name=\"Botao\" value=\"Abandonar\">');\r\n ShowHTML(' </td>');\r\n\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 Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "52ff36115dc0e26f8e2726aa053217b0", "score": "0.5837937", "text": "function tarefa($txt) {\n $this->duelo->apagar_tarefa($this->dono, 'end_phase', $this->inst);\n parent::destruir();\n $this->_ativar();\n return true;\n }", "title": "" }, { "docid": "6be94bc77b083d60d1a797e9069b2645", "score": "0.5837077", "text": "function cl_atolegalprevidenciainssirf() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"atolegalprevidenciainssirf\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "706c1a656019ad5752f2159e7d43c127", "score": "0.5836814", "text": "function cl_iptucadtaxaexe() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptucadtaxaexe\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "fdacde0567ea38ee70a62a0de014789d", "score": "0.58245164", "text": "function FichaRubrica() {\r\n extract($GLOBALS);\r\n $w_sq_projeto_rubrica = $_REQUEST['w_sq_projeto_rubrica'];\r\n // Recupera os dados do lançamento\r\n $sql = new db_getSolicRubrica; $RS = $sql->getInstanceOf($dbms,null,$w_sq_projeto_rubrica,null,null,null,null,null,null,'FICHA');\r\n foreach($RS as $row){$RS=$row; break;}\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n BodyOpen(null);\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (count($RS)<=0) {\r\n ScriptOpen('JavaScript');\r\n ShowHTML('alert(\\'Não existe nenhum lançamento para este rubrica!\\');');\r\n ShowHTML('window.close();');\r\n ShowHTML('opener.focus();');\r\n ScriptClose();\r\n } else {\r\n if(nvl(f($RS,'nm_label'),'')>'')\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=\"2\">'.f($RS,'nm_label').': <b><A class=\"hl\" HREF=\"mod_ac/contratos.php?par=Visual&O=L&w_chave='.f($RS,'sq_acordo').'&w_tipo=Volta&P1=2&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.f($RS,'sg').'\" title=\"Exibe as informações.\">'.f($RS,'cd_acordo').' ('.f($RS,'sq_acordo').')</a></b></font></td>');\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=\"2\">Projeto: <b><A class=\"hl\" HREF=\"projeto.php?par=Visual&O=L&w_chave='.f($RS,'sq_projeto').'&w_tipo=Volta&P1=2&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\" title=\"Exibe as informações do projeto.\">'.f($RS,'nm_projeto').'</a></b></font></td>');\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=\"2\">Rubrica: <b>'.f($RS,'codigo_rubrica').' - '.f($RS,'nm_rubrica').'</b></font></td>');\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=\"2\">Classificação: <b>'.f($RS,'nm_cc').'</b></font></td>');\r\n ShowHTML(' <tr><td colspan=\"2\">&nbsp</td></tr>');\r\n $sql = new db_getSolicRubrica; $RS = $sql->getInstanceOf($dbms,null,$w_sq_projeto_rubrica,null,null,null,null,null,null,'FICHA');\r\n $RS = SortArray($RS,'phpdt_vencimento','desc','sq_lancamento','desc');\r\n ShowHTML(' <tr><td><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=\"2\">');\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 rowspan=2><b>Operação</td>');\r\n ShowHTML(' <td rowspan=2><b>Data</td>');\r\n ShowHTML(' <td colspan=2><b>Valor</td>');\r\n ShowHTML(' <td rowspan=2><b>Histórico</td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Previsto</td>');\r\n ShowHTML(' <td><b>Real</td>');\r\n ShowHTML(' </tr>');\r\n // Lista os registros selecionados para listagem\r\n $w_total_previsto=0;\r\n $w_total_real=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,'operacao').'</td>');\r\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'vencimento')).'</td>');\r\n if(f($row,'tipo_rubrica')==5)\r\n ShowHTML(' <td align=\"right\">-'.formatNumber(f($row,'valor')).'</td>');\r\n else\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')).'</td>');\r\n if(nvl(f($row,'sg_tramite'),'')=='AT') {\r\n if(f($row,'tipo_rubrica')==5)\r\n ShowHTML(' <td align=\"right\">-'.formatNumber(f($row,'valor')).'</td>');\r\n else\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')).'</td>');\r\n } else {\r\n ShowHTML(' <td align=\"right\">'.formatNumber(0).'</td>');\r\n }\r\n ShowHTML(' <td><A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'Visual&O=L&w_chave='.f($row,'sq_lancamento').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$l_P4.'&TP='.$TP.'&SG='.f($row,'sg_lancamento_menu').MontaFiltro('GET').'\" title=\"Exibe as informações do lançamento\"> '.f($row,'cd_lancamento').' - '.f($row,'nm_lancamento').'</a>');\r\n ShowHTML(' </tr>');\r\n if(f($row,'tipo_rubrica')==5)\r\n $w_total_previsto -= f($row,'valor');\r\n else\r\n $w_total_previsto += f($row,'valor');\r\n if(nvl(f($row,'sg_tramite'),'')=='AT') {\r\n if(f($row,'tipo_rubrica')==5)\r\n $w_total_real -= f($row,'valor');\r\n else\r\n $w_total_real += f($row,'valor');\r\n }\r\n }\r\n if (nvl($w_total_previsto,'')!='') {\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=2><b>Saldo atual</b></td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total_previsto).'</b></td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total_real).'</b></td>');\r\n ShowHTML(' <td>&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 ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n }\r\n}", "title": "" }, { "docid": "ccfec1615287ccee31765e9af921fa41", "score": "0.58205056", "text": "public function obrisi_reklamu(){\r\n if(!isset($_GET['reklama']))\r\n header(\"Location = ?controller=admin&action=index\");\r\n require_once 'models/baloni.php';\r\n Balon::obrisi($_GET['reklama']);\r\n header(\"Location: ?controller=admin&action=upravljaj_reklamama\");\r\n exit();\r\n }", "title": "" }, { "docid": "5fd6caad83e1b15f04cdb3696609f2f5", "score": "0.58194107", "text": "function ExibeEtapa($O,$p_chave,$p_chave_aux,$p_tipo,$p_P1,$p_etapa,$p_tp,$p_sg) {\r\n extract($GLOBALS,EXTR_PREFIX_SAME,'l_');\r\n if($p_tipo == 'PDF'){\r\n $w_embed = 'WORD';\r\n }\r\n\r\n if (Nvl($p_etapa,'')=='') {\r\n $l_string=\"---\";\r\n } else {\r\n if($w_embed == 'WORD'){\r\n $l_string .= $p_etapa;\r\n }else{\r\n $l_string .= '<a name=\"'.$p_chave_aux.'\" class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"window.open(\\''.$conRootSIW.(($w_dir=='mod_pr/') ? '' : $w_dir).'projeto.php?par=AtualizaEtapa&w_chave='.$p_chave.'&O='.$O.'&w_chave_aux='.$p_chave_aux.'&w_tipo='.$p_tipo.'&P1='.$p_P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$p_tp.'&SG='.$p_sg.'\\',\\'Etapa\\',\\'width=780,height=550,top=50,left=10,toolbar=no,scrollbars=yes,resizable=yes,status=no\\'); return false;\" title=\"Clique para exibir os dados!\">'.$p_etapa.'</a>';\r\n }\r\n }\r\n return $l_string;\r\n}", "title": "" }, { "docid": "369562fd6ceff80aeec75d394801a111", "score": "0.5814413", "text": "function traduci($contenuto,$nomeContenuto='')\n{\n global $lingua, $traduzioni, $traduzioniCostanti;\n \n //iumposto la lingua in uso\n $lingua = costantiP::LINGUA;\n \n if (costantiP::LINGUA==costanti::LINGUA_MADRE)\n {\n $fileTraduzioni=decodificaLinguaTraduzione($lingua);\n require_once('../lingue/'.$fileTraduzioni);\n $risultato = '';\n \n if ($nomeContenuto!='')\n {\n //costante\n //$testoTradotto = \n foreach($traduzioniCostanti as $traduzione)\n if ($traduzione[0]==$nomeContenuto)\n $risultato=$traduzione[1];\n \n }\n else\n {\n \n $risultato = $contenuto;\n \n }\n \n }\n else\n {\n $fileTraduzioni=decodificaLinguaTraduzione($lingua);\n require_once('../lingue/'.$fileTraduzioni);\n $risultato = '';\n \n if ($nomeContenuto!='')\n {\n //costante\n //$testoTradotto = \n foreach($traduzioniCostanti as $traduzione)\n if ($traduzione[0]==$nomeContenuto)\n $risultato=$traduzione[1];\n \n }\n else\n {\n //testo\n //in_array\n foreach($traduzioni as $traduzione)\n if ($traduzione[0]==$contenuto)\n $risultato=$traduzione[1];\n \n }\n }\n \n \n \n return ($risultato!='')?$risultato:$contenuto;\n}", "title": "" }, { "docid": "0fc7fbc0537877b090bbd33c1a92977b", "score": "0.5804122", "text": "public function dibujarPantalla( ) {\n echo \"entra en la pantalla del dvddddddddddddddddddddddddddddddddddddddddd\\n\";\n\n$this->activarPantalla();\n $this->enviarEstado();\n\t\t$this->enviarComando();\n\t\t$this->enviarVolumen();\n \n }", "title": "" }, { "docid": "61d213deaa95fc37c4de6154b899ba39", "score": "0.57968086", "text": "public function aaa()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "9d6322ffa64ccd6f7bafeeb55acbe81f", "score": "0.5792444", "text": "public function EmitirSom()\n {\n echo \"<br>Som de ave\";\n }", "title": "" }, { "docid": "a964f09b409205c87e53a26fe6bba72b", "score": "0.57810783", "text": "function trova_parola($parola,$descrizione){\n\t$descrizione = preg_replace(\"/\\W/\", \" \", $descrizione); // elimino caratteri speciali\n\t$des_cerca=explode(\" \",$descrizione); // esplodo le singole parolo\n\t$risultato = count($des_cerca); // conto il totale delle parole esplose\n\t@$_ritono = false;\n\tfor($i=0; $i<=$risultato; $i++){ // ciclo per fare controllo\n\t\tif(@$des_cerca[$i]==@$parola){\n\t\t\t@$_ritono = true; // se la trovo chiudo ciclo e ritorno l'ok\n\t\t\tbreak;\n\t\t}\t\t\n\t}\t\n\treturn $_ritono;\n}", "title": "" }, { "docid": "402658233ac85ca03c4dc339a00bce59", "score": "0.57794327", "text": "public function ZADNJA_VRSTICA()\n\t{\n\t\t//echo nl2br(\"\\n\" . $this->CurrentToken->Lexeme . \"ZADNJA\\n\");\n\t\t//V prvi vrstici se lahko pojavi le številka ali P\n\t\tif($this->CurrentToken->Type == 1)\n\t\t{\n\t\t\t$jTemp = $this->Scan->j;\n\t\t\t$bwTemp = 0;\n\t\t\t//V tem delu se preveri, če je kombinacija P-jev in številk ustrezna\n\t\t\t//Recimo, da se ne pojavi nekaj kot 2P8 (ne mora biti 10 mest praznih)\n\n\t\t\t//Prvo se preveri primer, ko je P na začetku\n\t\t\tif($this->CurrentToken->Lexeme == \"p\" || $this->CurrentToken->Lexeme == \"P\")\n\t\t\t{\n\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\n\t\t\t\tif($this->CurrentToken->Lexeme == 7)\n\t\t\t\t{\n\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\n\t\t\t\t\tif($this->CurrentToken->Lexeme == \"/\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$bwTemp = $this->Scan->j;\n\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\tif($this->CurrentToken->Type != 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Scan->j = $bwTemp - 1;\n\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\treturn true;\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->Scan->j = $jTemp - 1;\n\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\treturn 4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if($this->CurrentToken->Type == 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Potem pa primeri, ko je 7 na začetku\n\t\t\telse if($this->CurrentToken->Lexeme == 7)\n\t\t\t{\n\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\n\t\t\t\tif($this->CurrentToken->Lexeme == \"p\" || $this->CurrentToken->Lexeme == \"P\")\n\t\t\t\t{\n\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\n\t\t\t\t\tif($this->CurrentToken->Lexeme == \"/\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$bwTemp = $this->Scan->j;\n\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\tif($this->CurrentToken->Type != 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Scan->j = $bwTemp - 1;\n\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\treturn true;\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->Scan->j = $jTemp - 1;\n\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\treturn 4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if($this->CurrentToken->Type == 4)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Potem pa še primeri, ko je druga številka na začetku\n\t\t\telse if(is_numeric($this->CurrentToken->Lexeme) && ($this->CurrentToken->Lexeme >= 1 && $this->CurrentToken->Lexeme <= 6))\n\t\t\t{\n\t\t\t\t$st = $this->CurrentToken->Lexeme;\t\n\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t//echo $this->Scan->j . \" \";\n\t\t\t\t\n\t\t\t\tif($this->CurrentToken->Lexeme == \"p\" || $this->CurrentToken->Lexeme == \"P\")\n\t\t\t\t{\n\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t//echo $this->Scan->j . \" \";\n\t\t\t\t\tif(is_numeric($this->CurrentToken->Lexeme) && ($this->CurrentToken->Lexeme == 8\t- ($st + 1)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($this->CurrentToken->Lexeme == \"/\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bwTemp = $this->Scan->j;\n\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\tif($this->CurrentToken->Type != 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->Scan->j = $bwTemp - 1;\n\t\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\t\t//echo \"TEST\";\n\t\t\t\t\t\t\t\treturn true;\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$this->Scan->j = $jTemp - 1;\n\t\t\t\t\t\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t\t\t\t\t\treturn 4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($this->CurrentToken->Type == 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->Scan->j = $jTemp - 1;\n\t\t\t$this->CurrentToken = $this->Scan->nextTokenImp();\n\t\t\t//echo $this->CurrentToken->Lexeme . \" \";\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "58aa1823b9a9a384073ef4016051d912", "score": "0.5778161", "text": "public function udi_u_sobu()\n\t{\n\t\t$this->ubaci_me_u_sobu($_POST['id_sobe'], $_POST['broj_igraca']);\n\t\texit();\n\t}", "title": "" }, { "docid": "835b00c7c160f273b381a563e209d9f0", "score": "0.57765627", "text": "public function saldos_finais_ecf_anterior(){\n \n}", "title": "" }, { "docid": "9643b3041d4c0fe30d27e94f62648e1b", "score": "0.57748127", "text": "public function tinhChuVi()\n {\n }", "title": "" }, { "docid": "28df8935811a8df7f983cdf1bb032391", "score": "0.5773124", "text": "function sozu_kes ( $soz, $bashla, $uzunluq )\n{\n\t$kesilmish_soz = '';\n\n\t/*\n\t * burda --$bashla yazmagimda meqsed $bashlanin qiymetini 1 vahid azaltmaqdir\n\t *\n\t * eger $bashla-- yazsaydim, o zaman $i = 1 qalacaqdi,\n\t * --$bashla olanda ise $i = 0 olur\n\t *\n\t * bashqa bir numune,\n\t *\n\t * $a = 1;\n\t *\n\t * echo $a++; // 1\n\t *\n\t * $a = 1;\n\t *\n\t * echo ++$a; // 2\n\t *\n\t *\n\t * daha sonra for-da bele bir shert yazdim ki, eger cari index bashlangic + uzunluqdan kicikdirse o zaman\n\t * ishe dushsun, eks halda dayansin\n\t */\n\tfor ( $i = --$bashla; $i < $bashla + $uzunluq; $i++ )\n\t{\n\t\t$kesilmish_soz .= $soz[ $i ];\n\t}\n\n\treturn $kesilmish_soz;\n}", "title": "" }, { "docid": "8ecdf3e47a45a2a9731cfa31a8e82819", "score": "0.57730806", "text": "function remplazar($cual){\n\n\t\t \tif($_GET[\"id_tl\"]==\"\" && $_GET[\"id\"]==\"\"){\n\t\t \t\t$que_busca = $_POST[\"buscar_\"];\n\t\t \t\t$que_busca = str_replace(\":\", \" \", $que_busca);\n\t\t\t\t$que_busca = str_replace(\",\", \" \", $que_busca);\n\t\t \t}else{\n\t\t \t\t$que_busca = $_SESSION[\"que_busca\"];\n\t\t \t\t$que_busca = str_replace(\":\", \" \", $que_busca);\n\t\t\t\t$que_busca = str_replace(\",\", \" \", $que_busca);\n\t\t \t}\n\t\t \t\n\t\t\t\n\t\t \t$arrayBusqueda = explode(\" \", $que_busca);\n\n\t\t \t$enBucle = 0;\n\n\t\t \t$resultado= $cual;\n\n\t\t \tforeach ($arrayBusqueda as $busq){\n\n\n\n\t\t \t\tswitch ($enBucle){\n\n\t\t \t\t\tcase 0:\n\t\t \t\t\t$caracterEspecial = \"Š\";\n\t\t \t\t\tbreak;\n\n\t\t \t\t\tcase 1:\n\t\t \t\t\t$caracterEspecial = \"¥\";\n\t\t \t\t\tbreak;\n\n\t\t \t\t\tcase 2:\n\t\t \t\t\t$caracterEspecial = \"Œ\";\n\t\t \t\t\tbreak;\n\n\t\t \t\t\tcase 3:\n\t\t \t\t\t$caracterEspecial = \"ø\";\n\t\t \t\t\tbreak;\n\n\t\t \t\t\tcase 4:\n\t\t \t\t\t$caracterEspecial = \"þ\";\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\n\t\t \t\t$resultado = str_replace ($busq , $caracterEspecial . $busq . \"œ\", $resultado);\n\n\t\t \t\tif($enBucle<4){\n\t\t \t\t\t$enBucle = $enBucle + 1;\n\t\t \t\t}else{\n\t\t \t\t\t$enBucle = 0;\n\t\t \t\t}\n\n\t\t \t}\n\n\n\t\t \t$resultado = str_replace(\"œ\", \"</span>\" , $resultado);\n\t\t \t$resultado = str_replace(\"Š\", \"<span class='b_0'>\" , $resultado);\n\t\t \t$resultado = str_replace(\"¥\", \"<span class='b_1'>\" , $resultado);\n\t\t \t$resultado = str_replace(\"Œ\", \"<span class='b_2'>\" , $resultado);\n\t\t \t$resultado = str_replace(\"ø\", \"<span class='b_3'>\" , $resultado);\n\t\t \t$resultado = str_replace(\"þ\", \"<span class='b_4'>\" , $resultado);\n\n\t\t\treturn $resultado;\n\t\t \t//return utf8_encode($resultado) ;\n\n\n\t\t }", "title": "" }, { "docid": "f4a83f2ffe71bd8e617dab5388781fe4", "score": "0.57709366", "text": "function cl_rhsuspensaopag() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsuspensaopag\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "53f123e9224e5b18445cebbb46232796", "score": "0.57649595", "text": "function cl_acordoempempenho() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acordoempempenho\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "58a4ad4f4c49fb9d45068a90ef2348fa", "score": "0.5763512", "text": "function cl_alunotransfturma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunotransfturma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "cc81ac3a92a50648123a178d45a05c9c", "score": "0.5758001", "text": "function cl_benstransforigemdestino() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"benstransforigemdestino\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e283cabad24af6d889b926188c30f114", "score": "0.57448083", "text": "public function bloco_9_ecd(){\n $this->abertura_bloco_9();\n $this->registros_arq();\n $this->encerramento_bloco_9();\n $this->encerramento_arquivo_digital();\n}", "title": "" }, { "docid": "3e1acba57213796715568c83d46afdd6", "score": "0.57405025", "text": "function post_papoo()\n\t{\n\t}", "title": "" }, { "docid": "6c7a5c404a8dc163d177d00a79aaafd1", "score": "0.573888", "text": "public function parametrizarProg()\r\n\t {\r\n\t \t\r\n\t }", "title": "" }, { "docid": "8ec4f1e649407d0d62ca87bf8fb81766", "score": "0.5738163", "text": "function me_nasobeni(&$hodnota, $klic, $nasobitel){ //klice jsme museli uvest i kdyz ho vubec nepouzijeme a to kvuli tomu aby sel zadat $nasobitel\n\t\t$hodnota *= $nasobitel;\n }", "title": "" }, { "docid": "c8199076b1dd45c4eeb2ac6a55d627cc", "score": "0.57325786", "text": "public function gazi() {\n echo \"<br>Gazim!\";\n }", "title": "" }, { "docid": "2e70e10feedc6c7f2ff412e355a0cc6c", "score": "0.573136", "text": "function zasli_email($od, $komu, $predmet, $obsah){\n\n\tif(!$od):\n\t\t$od=\"[email protected]\";\n\tendif;\n\tif(!$komu): \n\t\t$komu=\"[email protected]\";\n\tendif;\n\n\t\n\t$headers = \"From: TCweb <\".$od.\">\";\n\t\t\n\t$headers.=\"\\nReply-To: \".$od;\n\t$headers.=\"\\nReturn-Path: [email protected]\";\n\t\n\t\n\n\t$title_email=\"TCweb\";\n\n\t\n\t//$predmet=iconv(\"windows-1250\",\"utf-8\",$predmet);\n\tif($predmet):\n\t\t$predmet='=?UTF-8?B?'.base64_encode($predmet).'?=';\n\tendif;\n\t\n\t$obsah_cisty_text=strip_tags(str_replace(\"</p>\",\"\\n\\r\",$obsah));\n\n\t//////zasl�n� mailu u�ivateli\n\t\t$hlavicka=\"<!DOCTYPE HTML>\n\t\t\t<html lang=\\\"cs\\\"><head>\".PHP_EOL.\"\n\t\t\t<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\".PHP_EOL.\"\n\t\t\t<title>\".htmlspecialchars($title_email).\"</title>\".PHP_EOL.\"\n <style type=\\\"text/css\\\">\".PHP_EOL.\"\n\t\t\tbody {\n\t\t\t\tmargin:0; background-color: #FFFFFF;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\t.text {\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 13px;\n\t\t\t\ttext-align: justify;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t}\".PHP_EOL.\"\n\t\t\t\n\t\t\t.text-b{\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 14px;\n\t\t\t\ttext-align: justify;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t}\".PHP_EOL.\"\n\t\t\t\n\t\t\t.text-grey{\n\t\t\t\tcolor: #4a4949;\n\t\t\t\tFONT-SIZE: 11px;\n\t\t\t\ttext-align: justify;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t}\".PHP_EOL.\"\n\t\t\t\n\t\t\t.text-grey2{\n\t\t\t\tcolor: #8f8f8f;\n\t\t\t\tFONT-SIZE: 13px;\n\t\t\t\ttext-align: justify;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta:link {\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t\tTEXT-DECORATION: underline;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta:visited {\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t\tTEXT-DECORATION: underline;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta:hover {\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t\tTEXT-DECORATION: none;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta:active {\n\t\t\t\tcolor: #262626;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Verdana;\n\t\t\t\tTEXT-DECORATION: none;\n\t\t\t}\".PHP_EOL.\"\n\t\t\t\n\t\t\t\n\t\t\ta.odkaz:link {\n\t\t\t\tcolor: #2995b0;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Arial;\n\t\t\t\tTEXT-DECORATION: none;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta.odkaz:visited {\n\t\t\t\tcolor: #2995b0;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Arial;\n\t\t\t\tTEXT-DECORATION: none;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta.odkaz:hover {\n\t\t\t\tcolor: #2995b0;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Arial;\n\t\t\t\tTEXT-DECORATION: underline;\n\t\t\t}\".PHP_EOL.\"\n\n\t\t\ta.odkaz:active {\n\t\t\t\tcolor: #2995b0;\n\t\t\t\tFONT-SIZE: 12px;\n\t\t\t\tFONT-FAMILY: Arial;\n\t\t\t\tTEXT-DECORATION: underline;\n\t\t\t}\".PHP_EOL.\"\n \t\t\t</style>\n\t\t\t</head>\n\t\t\n\t\t\t<body>\n \t\t\t<center>\".PHP_EOL.\"\n\t\t\t\t<table border=\\\"0\\\" cellpadding=\\\"0\\\" width=\\\"98%\\\" cellspacing=\\\"0\\\" class=\\\"text\\\">\".PHP_EOL.\"\n\t\t\t\t <tr>\n\t\t\t\t\t<td width=\\\"100%\\\" bgcolor=\\\"#ffffff\\\"><br>\".PHP_EOL;\n\n\n\t\t$zapati=\"\";\n\n\t\t\n\t\t$zapati.=\"<br><br><br>Hemeos, LLC<br>\n\t\tD��insk� 477, 109 00 Praha 10<br>\n\t\tI�: 26488931, DI�: CZ26488931\n\t\t<br>\".PHP_EOL.\"\n\t\t\n\t\t<br><br>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\".PHP_EOL.\"\n \t\t\t</center>\n\t\t\t</body>\n\n\t\t\t</html>\";\n\n\t\t//$obsah_cisty_text=iconv(\"windows-1250\",\"utf-8\",$obsah_cisty_text);\n\t\t$txt = $hlavicka.$obsah.$zapati;\n\t\t//$txt=iconv(\"windows-1250\",\"utf-8\",$txt);\n\t\t\n\t\t\n\t\t// boundary \n\t\t$semi_rand = md5(time()); \n\t\t$mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n\t \n\t\t// headers for attachment \n\t\t$headers .= \"\\nMIME-Version: 1.0\\n\" . \"Content-Type: multipart/alternative;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n\t \n\t\t// multipart boundary \n\t\t$message = \"--{$mime_boundary}\\n\" . \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\n\" .\n\t\t\"Content-Transfer-Encoding: 7bit\\n\\n\" . $obsah_cisty_text . \"\\n\\n\"; \n\t\t\n\t\t$message .= \"--{$mime_boundary}\\n\" . \"Content-Type: text/html; charset=\\\"utf-8\\\"\\n\" .\n\t\t\"Content-Transfer-Encoding: 7bit\\n\\n\" . $txt . \"\\n\\n\"; \n\n\t\t\n\t\t$message .= \"--{$mime_boundary}--\";\n\t\t//$returnpath = \"-f\" . $od;\n\t\t\n\t\t\n\t\t//echo $od.\"<br>\";\t\n\t\t//echo $predmet.\"<br>\";\t\n\t\t//echo $komu.\"<br>\";\t\n\t\t//echo $txt;\n\t\t\n\t\t//$komu_utf=iconv(\"windows-1250\",\"utf-8\",$komu);\n\t\t\n\t\t$navrat = mail($komu, $predmet, $message, $headers); \n\t\t//$navrat = mail($komu, $predmet, $message, $headers, $returnpath); \n\n\t\t\n\t\tif($_SERVER['HTTP_HOST']==\"127.0.0.1\"):\n\t\t\t$navrat=1;\n\t\tendif;\n\t\t\n\t\t//ulozit adresu kam bylo odeslano\n\t\tif($navrat):\n\t\t\tmysql_query(\"INSERT INTO emaily_log (email, text, datum) VALUES\n\t\t\t('\".mysql_real_escape_string($komu).\"',\n\t\t\t'\".mysql_real_escape_string($obsah).\"',\n\t\t\tCURRENT_TIMESTAMP)\");\n\t\tendif;\n\t\t\n\t\t\n\treturn $navrat;\n\n}", "title": "" }, { "docid": "04e45d08a20c621029f6343f0696ea06", "score": "0.5730212", "text": "function TipoIndicador() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n } elseif ($O=='L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getTipoIndicador; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,null,null,'REGISTROS');\r\n $RS = SortArray($RS,'nome','asc');\r\n } elseif (!(strpos('AEV',$O)===false)) {\r\n // Recupera os dados do endereço informado\r\n $sql = new db_getTipoIndicador; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_chave,null,null,'REGISTROS');\r\n foreach ($RS as $row) {$RS = $row; break;}\r\n $w_chave = f($RS,'chave');\r\n $w_cliente = f($RS,'cliente');\r\n $w_nome = f($RS,'nome');\r\n $w_ativo = f($RS,'ativo');\r\n } \r\n Cabecalho();\r\n head();\r\n if (!(strpos('IAEP',$O)===false)) {\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n if (!(strpos('IA',$O)===false)) {\r\n Validate('w_nome','Nome','1','1','4','30','1','1');\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='E') {\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ShowHTML(' if (confirm(\\'Confirma a exclusão deste registro?\\')) ');\r\n ShowHTML(' { return (true); }; ');\r\n ShowHTML(' { return (false); }; ');\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('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\"document.Form.'.$w_troca.'.focus()\";');\r\n } elseif (!(strpos('IA',$O)===false)) {\r\n BodyOpen('onLoad=\"document.Form.w_nome.focus()\";');\r\n } elseif ($O=='E') {\r\n BodyOpen('onLoad=\"document.Form.w_assinatura.focus()\";');\r\n } else {\r\n BodyOpen('onLoad=\"this.focus()\";');\r\n } \r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\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><a accesskey=\"I\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&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(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" 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>Nome</td>');\r\n ShowHTML(' <td><b>Ativo</td>');\r\n ShowHTML(' <td><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=3 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\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,'nome').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_ativo').'</td>');\r\n ShowHTML(' <td align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"title=\"Alterar\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"title=\"Excluir\">EX</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n } \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)) {\r\n $w_Disabled=' DISABLED ';\r\n } \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_chave\" value=\"'.$w_chave.'\">');\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><table border=0 width=\"100%\" cellspacing=0 cellpadding=0><tr valign=\"top\">');\r\n ShowHTML(' <td colspan=3><b><u>N</u>ome:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nome.'\"></td>'); \r\n ShowHTML(' <tr valign=\"top\">');\r\n MontaRadioSN('<b>Ativo?</b>',$w_ativo,'w_ativo');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"LEFT\"><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\"><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 ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&O=L&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\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 ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape(); \r\n}", "title": "" }, { "docid": "bf285b8425cce84cc0e2c08693a304c8", "score": "0.5727201", "text": "function cl_transfescolarede() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"transfescolarede\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f4a82d7d5ec1baf46ebbf202b537936c", "score": "0.5723149", "text": "function afficher_arbre($id_noeud_racine, $id_ul = NULL) {\r\n\t\t\r\n\tglobal $LEA_URL;\t\t\r\n\tglobal $les_eva_noeuds ;\r\n\t\t\t\t\t\t\t\t\r\n\t$src_img_arbre = $LEA_URL.\"themes/\".$_SESSION['options_lea']['LEA_THEME'].\"/images/picto_arbre.png\";\t\t\t\t\t\t\t\t\t\t\t\r\n\t\r\n\t$cgood = false;\r\n\tfor ($x=0; $x < count($les_eva_noeuds); $x++ ) {\r\n\t\tif ($les_eva_noeuds[$x]->id_noeud_parent == $id_noeud_racine) {\r\n\t\t\t$cgood = true;\r\n\t\t}\t\t\r\n\t}\r\n \t//ballayage de l'arbre\r\n \tif($cgood){\r\n\t \techo\"\r\n<br/><br/><ul>\";\r\n\t\tfor ($x=0; $x < count($les_eva_noeuds); $x++ ) {\r\n\t\t\tif ($les_eva_noeuds[$x]->id_noeud_parent == $id_noeud_racine) {\r\n\t\t\t\t$id_li = randomkeys(20);\r\n\t\t\t\t// \r\n\t\t\t\tif( $les_eva_noeuds[$x]->type == \"feuille\") {\r\n\t\t\t\t\techo \"\r\n\t<li class='feuille'>\";progressbar($les_eva_noeuds[$x]->progression );\t\t\t\r\n\t\t\t\t\techo '\r\n\t\t<a class =\"lienfeuille\">&nbsp;</a>';\r\n\t\t\t\t\techo $les_eva_noeuds[$x]->libelle;\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t<li class='branche'>\";progressbar($les_eva_noeuds[$x]->progression );\r\n\t\t\t\t\techo '\r\n\t\t<a class =\"lienbranche\">&nbsp;</a>';\r\n\t\t\t\t\techo\"<b>\".$les_eva_noeuds[$x]->libelle.\"</b>\";\r\n\t\t\t\t}//fin if == feuille\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tafficher_arbre($les_eva_noeuds[$x]->id_noeud,$id_li);\t\t\t\r\n\t\t\t echo \"\r\n\t</li>\";\t \r\n\t \t\t}//fin if == $id_noeud_racine\r\n\t\t}//fin for\r\n\t \techo\"\r\n</ul>\"; \r\n \t}\r\n}", "title": "" }, { "docid": "e98954143c532ef3472036885796ff6a", "score": "0.5721967", "text": "public static function bienvenido2(){\n echo \" bienvenidos de nuevo \" . Pagina::$url;\n \n }", "title": "" }, { "docid": "0800f644f5cfe9df1d8d0ce382bdb25a", "score": "0.5718852", "text": "function print_con_carro($deci_esto='') {\n // imprime un mensaje con salto de carro\n print ($deci_esto.chr(10));\n}", "title": "" }, { "docid": "4c826ada00985ba51ce2d6ace3bdeaca", "score": "0.57174194", "text": "public function dibujarPantalla( ) {\n$this->activarPantalla();\n $this->enviarComando();\n\n }", "title": "" }, { "docid": "6e51eeb2e85ef1916f64bcad1fd66527", "score": "0.5717018", "text": "public function saludar();", "title": "" }, { "docid": "2202d46e2336fba0053dd307bc56c7f9", "score": "0.57163227", "text": "public function DetilTagihan()\n {\n }", "title": "" }, { "docid": "c902fcde70ad1bb59a9705c7378d7698", "score": "0.57111216", "text": "function cl_sau_encaminhanulado() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_encaminhanulado\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "772d43b301081d07c5aed70573ff04b0", "score": "0.5696172", "text": "public function obrisi_termin(){\r\n if(!isset($_GET['termin']))\r\n header(\"Location = ?controller=admin&action=index\");\r\n require_once 'models/zahtev.php';\r\n require_once 'models/termin.php';\r\n Zahtev::obrisiSve($_GET['termin']);\r\n Termin::obrisi($_GET['termin']);\r\n header(\"Location: ?controller=admin&action=upravljaj_terminima\");\r\n exit();\r\n }", "title": "" }, { "docid": "b35fa84bad6e18c359a6464dde0822d8", "score": "0.5693455", "text": "function ThnPrcTutup() {\r\n $thn = $_REQUEST['tahun'];\r\n $next = NextTahun($thn, $_SESSION['prid'], $_SESSION['prodi']);\r\n if (empty($next))\r\n echo ErrorMsg(\"Tahun Akademik Belum Dibuat\",\r\n \"Untuk menutup tahun akademik <font size=+1>$thn</font> Anda harus terlebih dahulu\r\n membuat tahun akademik baru setelahnya.<br />\r\n Setelah ada tahun akademik selanjutnya, maka proses tutup tahun baru dapat dilakukan.\r\n <hr size=1 color=silver>\r\n Pilihan: <a href='?mnux=tahun'>Kembali</a>\");\r\n else \r\n echo Konfirmasi(\"Konfirmasi Pemrosesan\",\r\n \"Anda akan menutup tahun akademik <font size=+1>$thn</font>.<br />\r\n Data hutang mahasiswa akan ditransfer ke: <font size=+1>$next[TahunID]</font>\r\n ($next[Nama]).\r\n <hr size=1 color=silver>\r\n Pilihan: <a href='?mnux=tahun&gos=PrcTutup&tahun=$thn&tahun1=$next[TahunID]&prid=$next[ProgramID]&prodi=$next[ProdiID]'>Lanjutkan Proses</a> |\r\n <a href='?mnux=tahun'>Kembali</a>\");\r\n}", "title": "" }, { "docid": "c94a4e0cc5a4b4aed7abcecd37bc40f4", "score": "0.56924254", "text": "abstract function locomover();", "title": "" }, { "docid": "49aa4286de145516b007f067cd9ec9a6", "score": "0.5681341", "text": "function pp_gbe_porte_plume_barre_pre_charger($barres) {\r\n//\t$barre = &$barres['edition']; // insertion dans la barre d'edition !!\r\n\t$barre = &$barres['forum']; // insertion dans la barre des forum ? (a tester)\r\n\r\n//\t$barre->ajouterApres('grpCaracteres', //old//\r\n//\t\tarray(\r\n//\t\t\t'id' => 'sepChrGbe', //old//\r\n//\t\t\t'separator' => '---------------', //old//\r\n//\t\t\t'display' => false, //old//\r\n//\t\t) //old//\r\n//\t); //old//\r\n\t$barre->cacher('grpCaracteres'); //new//\r\n//\t$barre->ajouterApres('sepChrGbe', //old//\r\n\t$barre->ajouterApres('grpCaracteres', //new//\r\n\t\tarray(\r\n\t\t\t'id' => 'lstChrGbe',\r\n\t\t\t'name' => _T('barre_outils:barre_inserer_caracteres'),\r\n\t\t\t'className' => 'lstChrGbe',\r\n\t\t\t'openWith' => '<multi>[[!['. \"Indiquez le code ISO-2 de la nouvelle langue :\\n- ajg n&#596; ajagb&egrave; \\n en for english \\n- ewe na e&#651;egb&egrave; \\n- fr pour fran&ccedil;ais \\n- fon nu f&#596;ngb&egrave; \\n- gen n&#603; g&#603;&#771;gb&egrave; \\n- etc.\" .']!]]',\r\n\t\t\t'closeWith' => '</multi>',\r\n//\t\t\t'selectionType' => 'word',\r\n\t\t\t'display' => true,\r\n\t\t\t'dropMenu' => array(\r\n//= caracteres latins modifies utilises par langues africaines et IPA\r\n\t\t\t\tarray( /// d-afro\r\n\t\t\t\t\t'id' => 'chr_u0256',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0256'),\r\n\t\t\t\t\t'className' => 'chr_u0256',\r\n\t\t\t\t\t'replaceWith' => '&#598;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// D-afro\r\n\t\t\t\t\t'id' => 'chr_u0189',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0189'),\r\n\t\t\t\t\t'className' => 'chr_u0189',\r\n\t\t\t\t\t'replaceWith' => '&#393;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// e-afro\r\n\t\t\t\t\t'id' => 'chr_u025b',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u025b'),\r\n\t\t\t\t\t'className' => 'chr_u025b',\r\n\t\t\t\t\t'replaceWith' => '&#603;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// E-afro\r\n\t\t\t\t\t'id' => 'chr_u0190',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0190'),\r\n\t\t\t\t\t'className' => 'chr_u0190',\r\n\t\t\t\t\t'replaceWith' => '&#400;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// f-scrip\r\n\t\t\t\t\t'id' => 'chr_u0192',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0192'),\r\n\t\t\t\t\t'className' => 'chr_u0192',\r\n\t\t\t\t\t'replaceWith' => '&#402;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// F-script\r\n\t\t\t\t\t'id' => 'chr_u0191',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0191'),\r\n\t\t\t\t\t'className' => 'chr_u0191',\r\n\t\t\t\t\t'replaceWith' => '&#401;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// gamma\r\n\t\t\t\t\t'id' => 'chr_u0263',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0263'),\r\n\t\t\t\t\t'className' => 'chr_u0263',\r\n\t\t\t\t\t'replaceWith' => '&#611;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg','ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// Gamma\r\n\t\t\t\t\t'id' => 'chr_u0194',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0194'),\r\n\t\t\t\t\t'className' => 'chr_u0194',\r\n\t\t\t\t\t'replaceWith' => '&#404;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg','ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// eng\r\n\t\t\t\t\t'id' => 'chr_u014b',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u014b'),\r\n\t\t\t\t\t'className' => 'chr_u014b',\r\n\t\t\t\t\t'replaceWith' => '&#331;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg','ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// Eng\r\n\t\t\t\t\t'id' => 'chr_u014a',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u014a'),\r\n\t\t\t\t\t'className' => 'chr_u014a',\r\n\t\t\t\t\t'replaceWith' => '&#330;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg','ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// o-afro\r\n\t\t\t\t\t'id' => 'chr_u0254',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0254'),\r\n\t\t\t\t\t'className' => 'chr_u0254',\r\n\t\t\t\t\t'replaceWith' => '&#596;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// O-afro\r\n\t\t\t\t\t'id' => 'chr_u0186',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0186'),\r\n\t\t\t\t\t'className' => 'chr_u0186',\r\n\t\t\t\t\t'replaceWith' => '&#390;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// v-script\r\n\t\t\t\t\t'id' => 'chr_u028b',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u028b'),\r\n\t\t\t\t\t'className' => 'chr_u028b',\r\n\t\t\t\t\t'replaceWith' => '&#651;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// V-script\r\n\t\t\t\t\t'id' => 'chr_u01b2',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u01b2'),\r\n\t\t\t\t\t'className' => 'chr_u01b2',\r\n\t\t\t\t\t'replaceWith' => '&#434;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ewe'),\r\n\t\t\t\t),\r\n//= caracteres diacritiques (accents Unicode)\r\n\t\t\t\tarray( /// tilda = nasalisation\r\n\t\t\t\t\t'id' => 'chr_u0303',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0303'),\r\n\t\t\t\t\t'className' => 'chr_u0303',\r\n\t\t\t\t\t'replaceWith' => '&#771;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg','ewe'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// accent aigu = ton montant\r\n\t\t\t\t\t'id' => 'chr_u0301',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0301'),\r\n\t\t\t\t\t'className' => 'chr_u0301',\r\n\t\t\t\t\t'replaceWith' => '&#769;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// accent circonflexe = ton ascendant-descendant\r\n\t\t\t\t\t'id' => 'chr_u0302',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0302'),\r\n\t\t\t\t\t'className' => 'chr_u0302',\r\n\t\t\t\t\t'replaceWith' => '&#770;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// accent grave = ton descendant\r\n\t\t\t\t\t'id' => 'chr_u0300',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0300'),\r\n\t\t\t\t\t'className' => 'chr_u0300',\r\n\t\t\t\t\t'replaceWith' => '&#768;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// caron = ton descendant-ascendant\r\n\t\t\t\t\t'id' => 'chr_u030c',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u030c'),\r\n\t\t\t\t\t'className' => 'chr_u030c',\r\n\t\t\t\t\t'replaceWith' => '&#780;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// macron = ton mi-moyen\r\n\t\t\t\t\t'id' => 'chr_u0304',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0304'),\r\n\t\t\t\t\t'className' => 'chr_u0304',\r\n\t\t\t\t\t'replaceWith' => '&#772;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('ajg'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// trema = son de langues coloniales\r\n\t\t\t\t\t'id' => 'chr_u0308',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0308'),\r\n\t\t\t\t\t'className' => 'chr_u0308',\r\n\t\t\t\t\t'replaceWith' => '&#776;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('deu','eng','esp','fra','ita','por'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// cedille = specifique langues europeennes\r\n\t\t\t\t\t'id' => 'chr_u00c7',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_c_cedille_maj'),\r\n\t\t\t\t\t'className' => 'chr_u00c7',\r\n\t\t\t\t\t'replaceWith' => '&Ccedil;',\r\n\t\t\t\t\t'display' => true,\r\n//\t\t\t\t\t'lang' => array('cpf','fr'),\r\n\t\t\t\t),\r\n//= caracteres ligaturees (second dans precedant)\r\n\t\t\t\tarray( /// ae = ash\r\n\t\t\t\t\t'id' => 'chr_u00e6',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_ea'),\r\n\t\t\t\t\t'className' => 'chr_u00e6',\r\n\t\t\t\t\t'replaceWith' => '&aelig;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t\t'lang' => array('cpf','fr'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// AE = Ash\r\n\t\t\t\t\t'id' => 'chr_u00c6',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_ea_maj'),\r\n\t\t\t\t\t'className' => 'chr_u00c6',\r\n\t\t\t\t\t'replaceWith' => '&AElig;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t\t'lang' => array('cpf','fr'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// oe = ethel\r\n\t\t\t\t\t'id' => 'chr_u0153',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_eo'),\r\n\t\t\t\t\t'className' => 'chr_u0153',\r\n\t\t\t\t\t'replaceWith' => '&oelig;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t\t'lang' => array('fr'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// OE = Ethel\r\n\t\t\t\t\t'id' => 'chr_u0152',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_eo_maj'),\r\n\t\t\t\t\t'className' => 'chr_u0152',\r\n\t\t\t\t\t'replaceWith' => '&OElig;',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t\t'lang' => array('fr'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// z dans s\r\n\t\t\t\t\t'id' => 'chr_u00df',\r\n\t\t\t\t\t'name' => _T('Eszet'),\r\n\t\t\t\t\t'className' => 'chr_u00df',\r\n\t\t\t\t\t'replaceWith' => '&#223;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t\t'lang' => array('de'),\r\n\t\t\t\t),\r\n//= caracteres latins modifies utilises par des alphabets europeens\r\n\t\t\t\tarray( /// eth\r\n\t\t\t\t\t'id' => 'chr_u00f0',\r\n\t\t\t\t\t'name' => _T('eth'),\r\n\t\t\t\t\t'className' => 'chr_u00f0',\r\n\t\t\t\t\t'replaceWith' => '&eth;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// Eth\r\n\t\t\t\t\t'id' => 'chr_u00d0',\r\n\t\t\t\t\t'name' => _T('Eth'),\r\n\t\t\t\t\t'className' => 'chr_u00d0',\r\n\t\t\t\t\t'replaceWith' => '&Eth;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// o slash\r\n\t\t\t\t\t'id' => 'chr_u00f8',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0256'),\r\n\t\t\t\t\t'className' => 'chr_u00f8',\r\n\t\t\t\t\t'replaceWith' => '&oslash;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// O slash\r\n\t\t\t\t\t'id' => 'chr_u00d8',\r\n\t\t\t\t\t'name' => _T('pp_gbe:u0256'),\r\n\t\t\t\t\t'className' => 'chr_u00d8',\r\n\t\t\t\t\t'replaceWith' => '&Oslash;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// thorn\r\n\t\t\t\t\t'id' => 'chr_u00fe',\r\n\t\t\t\t\t'name' => _T('Thorn'),\r\n\t\t\t\t\t'className' => 'chr_u00fe',\r\n\t\t\t\t\t'replaceWith' => '&thorn;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// Thorn\r\n\t\t\t\t\t'id' => 'chr_u00de',\r\n\t\t\t\t\t'name' => _T('Thorn'),\r\n\t\t\t\t\t'className' => 'chr_u00de',\r\n\t\t\t\t\t'replaceWith' => '&Thorn;',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t),\r\n//= fonctions de changement de casse\r\n\t\t\t\tarray( /// tout en majuscules\r\n\t\t\t\t\t'id' => 'fcn_uppercase',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_gestion_cr_changercassemajuscules'),\r\n\t\t\t\t\t'className' => '2uppercase',\r\n\t\t\t\t\t'replaceWith' => 'function(markitup) { return markitup.selection.toUpperCase() }',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t\t'selectionType' => 'word',\r\n//\t\t\t\t\t'lang' => array('de','eo','en','es','fr','it','pt'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// tout en minuscules\r\n\t\t\t\t\t'id' => 'fcn_2lowercase',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_gestion_cr_changercasseminuscules'),\r\n\t\t\t\t\t'className' => 'fcn_2lowercase',\r\n\t\t\t\t\t'replaceWith' => 'function(markitup) { return markitup.selection.toLowerCase() }',\r\n\t\t\t\t\t'display' => true,\r\n\t\t\t\t\t'selectionType' => 'word',\r\n//\t\t\t\t\t'lang' => array('de','eo','en','es','fr','it','pt'),\r\n\t\t\t\t),\r\n\t\t\t\tarray( /// debut de mots en majuscule\r\n\t\t\t\t\t'id' => 'fcn_2titlecase',\r\n\t\t\t\t\t'name' => _T('barre_outils:barre_gestion_cr_changercassetitres'),\r\n\t\t\t\t\t'className' => 'fcn_2titlecase',\r\n\t\t\t\t\t'replaceWith' => 'function(markitup) { return markitup.selection.toTitleCase() }',\r\n\t\t\t\t\t'display' => false,\r\n\t\t\t\t\t'selectionType' => 'word',\r\n//\t\t\t\t\t'lang' => array('de','eo','en','es','fr','it','pt'),\r\n\t\t\t\t),\r\n//\r\n\t\t\t), // end drop-menu\r\n\t\t) // end group\r\n\t);\r\n\treturn $barres;\r\n}", "title": "" }, { "docid": "9c3de5488ac6bedf8fbfb2088fecb1b7", "score": "0.56565374", "text": "public function alterar(){\n\t}", "title": "" }, { "docid": "ee502e21138e2dbb919848536d91754d", "score": "0.56523174", "text": "function cariPosisi($batas){\nif(empty($_GET[halproduk])){\n\t$posisi=0;\n\t$_GET[halalat]=1;\n}\nelse{\n\t$posisi = ($_GET[halalat]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "54c78b2aa0c832adddc7c2d9f28be04b", "score": "0.56507814", "text": "function TrovaLettera ($lettera, $parola, $scelte, $alfabeto) {\r\n $alfabeto = array_flip ($alfabeto);\r\n $lettera = substr ($lettera, 0, 1);\r\n $lettera = strtr ($lettera, $alfabeto);\r\n $scelte.= $lettera;\r\n if (ereg ($lettera, $parola)) {\r\n $controllo = true;\r\n }\r\n else {\r\n $controllo = false;\r\n }\r\n $risposta = array ($scelte, $controllo);\r\n return $risposta;\r\n}", "title": "" }, { "docid": "bb34d7a5c8b26b8036b4259eb7e33247", "score": "0.56488", "text": "function lagreEndring() {\n $email = $_SESSION['email'];\n $tilkobling = kobleTil(); //opprett tilkobling til db\n $fnavn = mysql_real_escape_string($_POST['fnavn']);\n $enavn = mysql_real_escape_string($_POST['enavn']);\n $ny_Epost = mysql_real_escape_string($_POST['email']); \n $bildefil = $_POST['bValg'];\n $cId = $_POST['idCampus'];\n $fId = $_POST['idFag'];\n $aarskull = $_POST['aarskull'];\n //er e-post endret og hvis den er, finnes ny e-post fra før?\n $sjekkEmail = feilEMail(true, $email, $ny_Epost); //henter ut feilmeldinger (hvis det er noen) \n \n if (empty($fnavn) || empty($enavn) || empty($ny_Epost)) { //er navn/e-post blanket ut/tomt ut?\n return false; //tomme felt(er), send feilmelding\n } else if (strlen($fnavn) < 2 ||strlen($enavn) < 3) { //er fornavn/etternavn for kort?\n return false; //for kort fornavn/etternavn, send feilmelding \n } else if (!empty($sjekkEmail)) { //er e-post ok?\n return false; //feil i e-post, send feilmelding \t \t \n } else { //alt ok, oppdater profil\n //først renskes feltene for mulig mysql-kode (siden feltene ikke har max-length) \n $fb = mysql_real_escape_string($_POST['fb']);\n $ms = mysql_real_escape_string($_POST['ms']);\n $hs = mysql_real_escape_string($_POST['hs']);\n $sAbout = mysql_real_escape_string($_POST['omMeg']); \n //deretter renskes feltene for mulig html-kode (siden feltene ikke har max-length)\n $fb = rensHtmlUTF8($fb, 3); \n $ms = rensHtmlUTF8($ms, 3); \n $hs = rensHtmlUTF8($hs, 3);\n $sAbout = rensHtmlUTF8($sAbout, 3); \n //så sjekkes det om feltene har verdi \n $fb = isNull($fb); \n $ms = isNull($ms); \n $hs = isNull($hs); \n $sAbout = isNull($sAbout);\n //til slutt om linkene starter på http://\n $fb = harHTTP($fb);\n $ms = harHTTP($ms);\n $hs = harHTTP($hs);\n if ($aarskull == \"Intet valgt\") { //sjekker årskull er satt \n $update_sql = \"UPDATE tblStudent \"; \n $update_sql .= \"SET sFornavn = '$fnavn', sEtternavn = '$enavn', \";\n $update_sql .= \"sEpost = '$ny_Epost', scid = $cId, sfid = $fId, \";\n $update_sql .= \"sProfilBilde='$bildefil' \";\n $update_sql .= \"WHERE sEpost = '$email';\"; \n } else { // alle feltene er fylt ut\n $update_sql = \"UPDATE tblStudent \"; \n $update_sql .= \"SET sFornavn = '$fnavn', sEtternavn = '$enavn', \";\n $update_sql .= \"sEpost = '$ny_Epost', sFaceBook = '$fb', \";\n $update_sql .= \"sMySpace = '$ms', sHjemmeside = '$hs', scid = $cId, \";\n $update_sql .= \"sfid = $fId, sProfilBilde='$bildefil', \";\n $update_sql .= \"sAarskull = $aarskull, sAbout = '$sAbout' \";\n $update_sql .= \"WHERE sEpost = '$email';\"; \n } // if($aarskull == \"Intet valgt\")\n //echo $update_sql;\n mysql_query($update_sql,$tilkobling); \n mysql_close($tilkobling); //lukker tilkobling til db\n $_SESSION['email'] = $ny_Epost; //setter brukers innlogging på nytt i tilfelle e-post ble endret \n return true; //profil ble oppdatert\n } //if (empty($fnavn) || empty($enavn)) \n }", "title": "" }, { "docid": "179e1709aac5333179576af9e16fed65", "score": "0.5647805", "text": "function cl_issnotaavulsacanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issnotaavulsacanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d6f85fa27180241e48e1233d638fde83", "score": "0.5644305", "text": "public function oceni(){\r\n require_once 'models/termin.php';\r\n $_POST['sport'] = 'termini u kojima ucestvujes';\r\n self::$termini = Termin::dohvatiSveMojeNeaktivnePrihvaceneIKreirane($_SESSION['username']);\r\n if(isset($_GET['termin'])){\r\n require_once 'models/korisnik.php';\r\n self::$korisnici = Korisnik::dohvatiSveKojeNisamOcenio($_SESSION['username'], $_GET['termin']);\r\n }\r\n require_once 'views/admin/header.php';\r\n require_once 'views/ocene.php';\r\n require_once 'views/footer.php';\r\n }", "title": "" }, { "docid": "9e3d4414573613ed219353edd336645f", "score": "0.5643503", "text": "function cl_orcfontes() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcfontes\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "94ebe51cd36a15eb2cbb4d43ac6d0d1d", "score": "0.5641632", "text": "function accueil() {\n\t\trequire (\"modele/connectBD.php\");\n\t\t$idn = $_SESSION['profil']['NomClient'];\n\t\trequire (\"modele/vehiculeBD.php\");\n\t\t$Vehicule = vehiculesMisLocationBD($idn);\n\t\trequire (\"vue/client/accueil.tpl\");\n\t}", "title": "" }, { "docid": "db3a04aad6cde812f6d34ee477a30c44", "score": "0.5639902", "text": "function devolucion($id_compra){\n \n echo \"Se ha devuelto el dinero de la compra {$id_compra} al usuario\";\n \n }", "title": "" }, { "docid": "db3a04aad6cde812f6d34ee477a30c44", "score": "0.5639902", "text": "function devolucion($id_compra){\n \n echo \"Se ha devuelto el dinero de la compra {$id_compra} al usuario\";\n \n }", "title": "" }, { "docid": "db7a22a7bb43d11544031dccbd9d0900", "score": "0.563429", "text": "function tinhChuVi()\n {\n }", "title": "" }, { "docid": "c900d49ef4a4cb86ccb4ec271ac97a54", "score": "0.56330496", "text": "public function seDivertir()\n {\n echo 'Soirée foot et bières<br>';\n }", "title": "" }, { "docid": "fd213e239595360329efd35559ccbb9d", "score": "0.5630453", "text": "function ExibeFatura($p_cliente,$p_fatura,$p_nr_fatura) {\r\n extract($GLOBALS,EXTR_PREFIX_SAME,'l_');\r\n if (Nvl($p_nr_fatura,'')=='') {\r\n $l_string='&nbsp;';\r\n } else {\r\n $l_string .= '<a target=\"fatura\" class=\"hl\" HREF=\"'.$conRootSIW.'mod_pd/gr_conciliacao.php?par=VISUAL&w_cliente='.$p_cliente.'&p_fatura='.$p_fatura.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$p_tp.'&SG=\" title=\"Clique para exibir os dados desta pessoa!\">'.$p_nr_fatura.'</a>';\r\n }\r\n return $l_string;\r\n}", "title": "" }, { "docid": "7cbd6d7e2d76363ec6205ec6993d168d", "score": "0.5629606", "text": "public function inconclusos(){\n\n\t}", "title": "" }, { "docid": "5f676e2e74c047d5e57837516082d075", "score": "0.56276184", "text": "function cl_cancdebitossusp() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cancdebitossusp\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f48175ca638c2d6e799e4f7cf0cd2794", "score": "0.56241363", "text": "public function DA_ConsultarPrefacturaUfeg();", "title": "" } ]
265da5691ba7d7a3c69fa2f7e2c3d531
loads a function from a class
[ { "docid": "b4632d5c005c0fe32459252a6738f827", "score": "0.0", "text": "public function loadFunction($fName, $vars)\n\t{\n\t try {\n\t if ($this->controller != null && method_exists($this->controller, $fName)) {\n\t echo json_encode([TRUE, $this->controller->{$fName}($vars)]);\n\t } else if (method_exists($this->defaultController, $fName)) {\n\t echo json_encode([TRUE, $this->defaultController->{$fName}($vars)]);\n\t } else {\n\t throw new \\Exception();\n\t }\n\t } catch (\\Exception $e) {\n\t echo json_encode([FALSE, $e->getMessage()]);\n\t }\n\t}", "title": "" } ]
[ { "docid": "4547072e98b356f609eee61c7c960093", "score": "0.6563325", "text": "function loadClass($class){\n\t\trequire $class . '.php';\n\t}", "title": "" }, { "docid": "031b955bfb9f9dcb7554e039d0069750", "score": "0.6560773", "text": "function loader($class) {\n $class_file = DIR . DS . $class . '.php';\n if(file_exists($class_file)){\n require_once($class_file);\n } else {\n foreach( unserialize(AUTOLOAD_CLASSES) as $path){\n $class_file = $path . DS . $class . '.php';\n if(file_exists($class_file)) require_once($class_file);\n }\n }\n\n}", "title": "" }, { "docid": "a038df2b2286d02de5f26e2b12bc7ac2", "score": "0.6497113", "text": "function loadClass($class)\n{\n\trequire_once '../class/'.$class.'.php';\n}", "title": "" }, { "docid": "181cd851cacc888e7b0d586ddc73a2ef", "score": "0.6413694", "text": "function __autoload($class){\n \n require(\"$class.php\");\n\n\n \n}", "title": "" }, { "docid": "8ef9c41a1ec8c4154f331d022b5b1bd4", "score": "0.6387161", "text": "function load() {\n \tif(!empty($this->_object_name)) {\n\t\t\t// Trim off the end (if exists) so we can instantiate it by class name, not filename.\n\t\t\t$this->_object_name = str_replace(\".class.php\", \"\", $this->_object_name);\n\n\t\t\t$name = explode(\"/\", $this->_object_name);\n\t\t\tif(!isset($name[0]) or !isset($name[1])) {\n\t\t\t\tthrow new exception(\"Missing the full class path for \" . $this->_object_name);\n\t\t\t}\n\t\t\t\n\t\t\trequire_once($this->_object_name . \".class.php\");\n\t\n\t\t\t$call_list = \"\\$name[1]\";\n\t\t\tif(isset($this->_object_parameters)) {\n\t\t\t\t$call_list .= \",\";\n\t\t\t\tforeach($this->_object_parameters as $key=>$parameter) {\n\t\t\t\t\t$call_list .= \"\\$this->_object_parameters['{$key}'],\";\n\t\t\t\t}\n\t\t\t\t$call_list = trim($call_list, \",\");\n\t\t\t}\n\t\t\t\n\t\t\teval(\"\\$this->_object =& base_info::factory($call_list);\");\n\t\t\tif ($this->_object_id) {\n\t\t\t\t$this->_object->load($this->_object_id);\n\t\t\t}\n \t}\n\n \t$this->build();\n }", "title": "" }, { "docid": "4c838a84699a2a4e4911ab622711cb4b", "score": "0.63499254", "text": "public function load($className);", "title": "" }, { "docid": "2b04325968c388a793bf2c7acb64ea49", "score": "0.6317344", "text": "private function classLoad(string $class)\n {\n $classParts = explode('\\\\', $class);\n $name = $classParts[count($classParts) - 1];\n \n foreach ($this->locators as $cb) {\n // Pass name without namespace as first argument, and full qualified name as second argument.\n $file = $cb[0]->{$cb[1]}($name, $class);\n if ($file != null) {\n require $file;\n return;\n }\n }\n }", "title": "" }, { "docid": "470f2de6fc9d2c790e56cd1fc29e99a8", "score": "0.62801903", "text": "private function loadClass($class){\n $path =str_replace('\\\\','/',$class).'.php';\n if(file_exists($path)){\n require_once $path;\n }\n}", "title": "" }, { "docid": "6490ac707d58177cd18bcd6064ec72ed", "score": "0.6264486", "text": "function &loadClass($class ,$data = null ,$instantiate = TRUE){\n\tstatic $objects = array();\n\tif($data){\n\t\t$class_key = md5($class . '_' . md5(serialize($data)));\n\t}else{\n\t\t$class_key = $class;\n\t}\n\t// Does the class exist? If so, we're done...\n\tif(isset($objects[$class_key])){\n\t\treturn $objects[$class_key];\n\t}\n\trequire_once ROOT_PATH . '/libraries/' . $class . '.php';\n\t\n\tif($instantiate == FALSE){\n\t\t$objects[$class_key] = TRUE;\n\t\treturn $objects[$class_key];\n\t}\n\t\n\t$name = 'VIP_' . $class;\n\tif($data){\n\t\t$objects[$class_key] = & instantiate_class(new $name($data));\n\t}else{\n\t\t$objects[$class_key] = & instantiate_class(new $name());\n\t}\n\treturn $objects[$class_key];\n}", "title": "" }, { "docid": "173223e25ced2f572d9fe303cbe0e67c", "score": "0.62191755", "text": "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\r\n }", "title": "" }, { "docid": "173223e25ced2f572d9fe303cbe0e67c", "score": "0.62191755", "text": "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\r\n }", "title": "" }, { "docid": "6bdf63d60619322003a06c4361115417", "score": "0.6213161", "text": "function __autoload($class)\n{\n require \"class.$class.php\";\n}", "title": "" }, { "docid": "fef2705b405346862ac93aa5e1bfa6d8", "score": "0.61993104", "text": "public function load(){\n\nspl_autoload_register(array($this,'loadClass'));\n}", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "0bf105ff61561b1f6a2b13c41fda961d", "score": "0.6176785", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "title": "" }, { "docid": "728bb84373cd12a2174851845262b922", "score": "0.6128896", "text": "function __autoload($class) \n{\n\trequire($class . '.php');\n}", "title": "" }, { "docid": "25c13377b2cf10c4762c21d1e2008d72", "score": "0.6123451", "text": "public static function auto_load($class){\n\t\ttry{\n\t\t\t\t$data = Socket_Instance::find_class($class, self::$_paths);\n\t\t\t\t$code = \n\t\t\t\t\t'class '.$class.' extends Socket_Instance\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprotected static $_class=\"'.$class.'\";\n\t\t\t\t\t\t\tfunction __construct(){\n\t\t\t\t\t\t\t\t$args = func_get_args();\n\t\t\t\t\t\t\t\tparent::__construct(self::$_class,$args);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstatic function __callStatic($func, $args){\n\t\t\t\t\t\t\t\treturn self::_rpc_call(self::$client, \n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\"class\" => self::$_class, \n\t\t\t\t\t\t\t\t\t\t\t\"func\" => $func, \n\t\t\t\t\t\t\t\t\t\t\t\"args\" => $args, )\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}\n\t\t\t\t\t}';\n\t\t\t\teval($code);\n\t\t\t\treturn true;\n\t\t}catch(Exception $ex){\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9055cdada46dc478f9540e5546c4958a", "score": "0.6112559", "text": "function dmili_registerFunction($class) {\n if ( 0 !== strpos( $class, 'dmili_' ) ) {\n return;\n }\n require_once(\"classes/class.$class.php\");\n}", "title": "" }, { "docid": "feb250b7973a874cb33d1e67664ea95d", "score": "0.6092622", "text": "function __autoload($class)\n{\n\trequire_once $class . '.php';\n}", "title": "" }, { "docid": "08a2e91ee47753285a8e47d286b1072c", "score": "0.6086298", "text": "public function load($path)\n\t{\n\t\t$this->import($path);\n\t\t\n\t\t$ex=explode('.',$path);\n\t\t$count=count($ex);\n\t\t\t\n\t\treturn $this->method=new $ex[$count-1];\n\t}", "title": "" }, { "docid": "474906de4a7d5c374688090c9a07cda8", "score": "0.60565627", "text": "function load($class)\n{\n $path = \"library\".DIRECTORY_SEPARATOR;\n $fileName = '';\n $lastNamespacePosition = strrpos($class,'\\\\');\n if($lastNamespacePosition)\n {\n //echo $class . \"</br>\";\n $namespace = substr($class,0,$lastNamespacePosition);\n $class = substr($class,$lastNamespacePosition+1);\n $fileName = $namespace . DIRECTORY_SEPARATOR;\n }\n $fileName .= $class . \".php\";\n //echo $path.$fileName;\n require $path.$fileName;\n\n}", "title": "" }, { "docid": "444e23783c088aa58fbce1e1051c33ab", "score": "0.6044275", "text": "function __autoload($class){\n\t// require \"classes/first.php\"; demo\n\trequire \"classes/\".$class.\".php\";\n}", "title": "" }, { "docid": "76c10a43e71391204016cc8b8d8d0e97", "score": "0.60441613", "text": "function my_autoloader($class){\n\t$classfilename = strtolower($class);\n\tinclude dirname(__DIR__) . \"/class/\" . $classfilename . \".class.php\";\n\n}", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" }, { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.60081935", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a2743c33cee60d6354bf81382ac5f73a", "score": "0.0", "text": "public function index()\n\t{\n\t\ttry {\n\t\t\treturn response(ProductResource::collection(Product::all(), 200));\n\t\t} catch (QueryException $exception) {\n\t\t\treturn response()->json([\n\t\t\t\t'status_code' => 500,\n\t\t\t\t'errors' => 'DataBase problem'\n\t\t\t], 500);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "66dba62b6171d79d179d2efe10c0caba", "score": "0.7474012", "text": "public function index()\n\t{\n\t\t// Paginate resource resutls\n\t\t$results = $this->paginate();\n\n\t\t// If results found add asset to make tables responsive\n\t\t$results->total();\n\n\t\t// Create header links for sorting by column\n\t\t$links = (object) link_to_sort_by($this->resource->getVisibleLabels());\n\n\t\t// Set the route for the return button\n\t\t$returnRouteName = replace_last_segment($this->prefix);\n\n\t\t// Add data to the view\n\t\t$view = view('resource.index', compact(['results', 'links', 'returnRouteName']));\n\n\t\t// Add data to the layout\n\t\t$this->layout->title = $this->resource->plural();\n\t\t$this->layout->subtitle = ($results->lastPage() > 1) ? sprintf(_('Page %d/%d'), $results->currentPage(), $results->lastPage()) : _('Index');\n\n\t\t// Return layout + view\n\t\treturn $this->layout($view);\n\t}", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74558926", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74558926", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "725058cd65108ac80a78fe0051c949b4", "score": "0.74056053", "text": "public function lists()\n\t{ \n\t\t$input \t = $this->getListRequest();\t\t\n\t\t$resources = $this->resourceRepository->find($input['take'], $input['skip'], $input['sort'], $input['filter']);\n\t\t$total = $this->resourceRepository->count($input['filter']);\n\n\t\treturn $this->makeListResponse($resources, $total);\n\t}", "title": "" }, { "docid": "870d86aa3e5336ed0150f4b1a79d3bc6", "score": "0.7393579", "text": "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.7376527", "text": "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}", "title": "" }, { "docid": "fc2792e1b13ff38e0c9384e5367be91c", "score": "0.7355237", "text": "public function actionList()\n {\n return $this->render('list');\n }", "title": "" }, { "docid": "143d9a58e87ac1f21fc152d696ad25d6", "score": "0.7270571", "text": "public function index()\n {\n $catalog_lists = Catalog::paginate(GlobalEnum::PerPage);\n\n if ($catalog_lists->total()) {\n return $this->ok('', CatalogResource::collection($catalog_lists)->response()->getData(true));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "393e0d0bda703c386c7b465265bed633", "score": "0.71700025", "text": "public function indexAction()\n {\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($filter);\n\n //Api controllers inherit from the shopware_controllers api rest.\n //It extends the enlight_action_controller,but\n //overrides predispatch and postdispatch method through which it defines\n //details regarding views,setting headers and json_encoding the results from the resources\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "915fb596a541fe3490b48ffd04162d2e", "score": "0.7157326", "text": "public function listAction()\n {\n $page = (int) $this->params()->fromRoute('page', 1);\n return $this->forward()->dispatch($this->getRouteIdentifierPrefix(), array('action' => 'index', 'page' => $page));\n }", "title": "" }, { "docid": "6c72516079b466368fa3fffe94f8ae35", "score": "0.7132192", "text": "function index() {\n render(\"list\");\n }", "title": "" }, { "docid": "d9b48afdd79e90cf917b6d111ca6416b", "score": "0.71214974", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(Cache::get('pagination', 10));\n\n return view('resources.index')->with(compact('resources'));\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71065784", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.7105842", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "90a1f4f6b697ee3ec0f4fa576dd38523", "score": "0.70987135", "text": "public function index()\n {\n return view('resources', ['resources' => Resource::orderBy('name', 'asc')->get(), 'listings' => RentResource::whereDate('start_time', '=', Carbon::today()->toDateString())->orderBy('start_time', 'asc')->get() ]);\n }", "title": "" }, { "docid": "ba6dd0e8295ef2a549fdf27a9cd12661", "score": "0.70092845", "text": "public function listAction()\n\t{\n\t\t$params = ['page' => 'page-catalog-list'];\n\n\t\tforeach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name )\n\t\t{\n\t\t\t$params['aiheader'][$name] = Shop::get( $name )->header();\n\t\t\t$params['aibody'][$name] = Shop::get( $name )->body();\n\t\t}\n\n\t\treturn Response::view( Shop::template( 'catalog.list' ), $params )\n\t\t\t->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) );\n\t}", "title": "" }, { "docid": "79651e14a4b964194c02d9ee700a9ad5", "score": "0.7008064", "text": "public function list(): void\n {\n $list = $this->mysql->select($this->getListQuery());\n $this->page->show($this->getListPageTemplate(), ['list' => $list]);\n }", "title": "" }, { "docid": "5f679e4189acdce779f6ef9e23a350f9", "score": "0.7002417", "text": "public function actionList()\n {\n $pagination = $this->setPagination('article');\n \n $list = $pagination['recordList'];\n $pages = $pagination['pages'];\n\n return $this->render('list',['list' => $list,'pages' => $pages]);\n }", "title": "" }, { "docid": "904740a092ed938ccd50ca494c286c30", "score": "0.6971105", "text": "public function list()\r\n\t\t{\r\n\t\t\t// Page title\r\n\t\t\t$this->title = 'Pathways list';\r\n\r\n\t\t\t// Function parameter\r\n\t\t\t$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();\r\n\r\n\t\t\t// Load models\r\n\t\t\t$settings_model = $this->load_model('settings-model');\r\n\t\t\t$pathway_model = $this->load_model('pathway-model');\r\n\r\n\t\t\t/** Load files from view **/\r\n\r\n\t\t\t// Load the template definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/template_config.php';\r\n\r\n\t\t\t// Load the template head section\r\n\t\t\trequire ABSPATH . '/views/_includes/template_start.php';\r\n\r\n\t\t\t// Load the page initial definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/page_head.php';\r\n\r\n\t\t\t// Load the page itself\r\n\t\t\trequire ABSPATH . '/views/pathway_module/pathway_list-view.php';\r\n\r\n\t\t\t// Load the page footer\r\n\t\t\trequire ABSPATH . '/views/_includes/template_end.php';\r\n\r\n\t\t}", "title": "" }, { "docid": "bc75e71d755fa3c285f90da23f029065", "score": "0.6960341", "text": "public function listingAction()\n {\n /** @var Factory $Factory */\n $Factory = $this->get('factory');\n\n /** @var Product[] $Products */\n $Products = $Factory->getAllProducts();\n\n return $this->render(\n 'ACAShopBundle:Products:list.html.twig',\n array(\n 'Products' => $Products\n )\n );\n }", "title": "" }, { "docid": "bdcd442e256866ea4c741c1ff1cc3685", "score": "0.69404685", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->_display();\n }", "title": "" }, { "docid": "cffe60b04946e2b283ae38e3049adc3f", "score": "0.6937386", "text": "public function listAction()\n {\n if (!$this->service) {\n throw new \\RuntimeException('No CRUD service defined');\n }\n\n $label = (isset($this->label)) ? $this->label : '';\n \n $service = $this->getServiceLocator()->get($this->service);\n\n $this->trigger(CrudEvent::EVENT_LIST_PRE);\n\n $where = $this->parseWhere($this->getRequest());\n $order = $this->params()->fromQuery('order', array());\n\n $perPage = $service::INDEX_LIMIT;\n\n $page = ($this->params()->fromQuery('page', 1) -1);\n \n $list = $service->getList($where, $order, ($page * $perPage), $perPage);\n\n $count = $service->getCount($where);\n\n $this->trigger(CrudEvent::EVENT_LIST_POST, $list);\n\n $currentQuery = $this->params()->fromQuery();\n unset($currentQuery['page']);\n\n return $this->loadView(\n 'zucchi-admin/crud/list', \n array(\n 'resource' => $this->resource,\n 'list' => $list,\n 'count' => $count,\n 'page' => $page+1,\n 'currentQuery' => http_build_query($currentQuery),\n 'pages' => ceil($count/$perPage),\n 'listFields' => $this->listFields,\n 'metadata' => $service->getMetaData(),\n 'where' => $where,\n 'order' => $order,\n 'label' => $label,\n\n )\n );\n }", "title": "" }, { "docid": "d033fdb664b5308858d97fa62eaec1dd", "score": "0.69198", "text": "public function showResourcesList(array $data);", "title": "" }, { "docid": "26f8fdc71a4939e7422fb301f2c7eb6b", "score": "0.6913209", "text": "public function index()\n {\n $questions = Question::latest()->paginate(10);\n\n return QuestionResource::collection($questions)->additional(['result' => 1, 'message' => 'Retrieved.']);\n }", "title": "" }, { "docid": "9614c14c55791e230f2a0558a1a13ab5", "score": "0.6894226", "text": "public function index() {\n $arrObjResource = Resource::latest()->paginate(self::INT_LIMIT);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4f3eab1a65aa0d6cf0ac4845abdf26ac", "score": "0.6890257", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "e4d514bd62d1c63ab8647f831833ec4f", "score": "0.6884965", "text": "public function index()\n {\n \n return $this->list();\n \n }", "title": "" }, { "docid": "227cc9dea5d541678d4dfd2730fdac56", "score": "0.6873991", "text": "public function index()\n {\n $queryBuilder = QueryBuilder::for(Repository::enabled())\n ->allowedFilters([\n 'name',\n 'license',\n 'description',\n AllowedFilter::exact('author.name'),\n 'author.display_name',\n AllowedFilter::exact('tags.name'),\n 'tags.category.name',\n ])\n ->allowedSorts([\n 'name',\n 'stargazers',\n 'last_push',\n 'author.name',\n ])\n ->defaultSort('-stargazers')\n ->with('author', 'tags', 'tags.category');\n // Paginate if request has a page parameter\n if (request()->has('page')) {\n return RepositoryFullResource::collection($queryBuilder->jsonPaginate(100));\n } else {\n return RepositoryFullResource::collection($queryBuilder->get());\n }\n }", "title": "" }, { "docid": "85415f9379a58cfef9a5550ad415fc13", "score": "0.6872194", "text": "public function index()\n {\n return StatusResource::collection(\n Status::latest()->paginate(10)\n );\n }", "title": "" }, { "docid": "9bdc4409374aa0ca956ab945dfb3719d", "score": "0.6855925", "text": "public function listAction(){\r\n\t\t\t\r\n\t\t\t//$totalItem \t\t\t\t\t= $this->_model->countItem($this->arrParams, null);\r\n\t\t\t//$this->setPagination(array(\"totalItemPerPage\" => 5, \"pageRange\" => 2));\r\n\t\t\t//$this->_view->pagination \t= new Pagination($totalItem, $this->_pagination);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_view->nameCategory \t= $this->_model->getNameCategory($this->arrParams, array(\"task\" => \"get-name-category\"));\r\n\t\t\t$this->_view->_listBook\t\t= $this->_model->infoItem($this->arrParams, null);\r\n\r\n\r\n\t\t\t$this->_view->_title = \"<title>List</title>\";\r\n\t\t\t$this->_view->render(\"book/list\");\r\n\t\t}", "title": "" }, { "docid": "728f8e03f8b5006e5477454a725a1745", "score": "0.68477666", "text": "public function index()\n {\n return response(EntryList::getAll(), 200);\n }", "title": "" }, { "docid": "27835938400657712b507591c21e8655", "score": "0.683614", "text": "public function actionIndex()\n\t{\n\t\t$objects = self::apiRequest();\n\t\t\n\t\t$this->render('index',array(\n\t 'objects'=>$objects,\n\t 'page'=>$this->pNumber\n\t ));\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.6828214", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "ddc72035c6eee5bda438fcd2d80fe704", "score": "0.6821888", "text": "public function index() {\n\t\t$resources = Resource::with(array('projects' => function($query) {\n\t\t\t$query->orderBy('updated_at','desc');\n\t\t}))->take(10)->get();\n\t\treturn View::make('resource/index', compact('resources'));\n\t}", "title": "" }, { "docid": "d773e5fd60f9ab29f11ae0739ce3ee4a", "score": "0.68207675", "text": "public function index( ) {\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\n\t\t$this->all_rows = $this->model->order($this->get_order())->page($this->this_page,$this->list_limit);\n\t\tif(!$this->all_rows) $this->all_rows=array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "cf0df3ff4d7be7a54e874c2996c82e4e", "score": "0.68180424", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Applications\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all applications allowed access via API\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/applications/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => array('button', 'float_right')))\n\t\t\t\t\t\t\t\t);\n\t\t$this->datagrid->setConfig ( OauthClients::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "7dd3e647ccd9b808f98f8f06413992bc", "score": "0.6814981", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('r_scenarios')->order('r_scenario_id desc');\r\n \r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n \r\n $oMySearchEngine->findWordOn(array('r_scenario_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_scenario_id' => array('operator' => 'eql'),\r\n 'r_scenario_actif' => array('operator' => 'eql'),\r\n 'r_scenario_libelle' => array('operator' => 'like')\r\n ));\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n \r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Handle pagination\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "a422edadfd877c23034b14eb7c872f20", "score": "0.68024427", "text": "public function index()\n {\n // Get Students\n\n $students = Student::paginate(10); \n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "8fb097585964e814f54986427cb4f2a5", "score": "0.6801124", "text": "public function listAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n $this->_helper->viewRenderer->setViewScriptPathSpec(\"server/list.phtml\");\n $this->_helper->serverTester->listAction($this->_serverClass, $this);\n }", "title": "" }, { "docid": "9eac380992aafa51fd5f8cad7dd703c0", "score": "0.67919636", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.resource.index');\n\t}", "title": "" }, { "docid": "5d12cb46b97d3119f7b5023b68501a38", "score": "0.6788743", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $altinvs = $em->getRepository('SGIBundle:Altinv')->findAll();\n\n return $this->render('altinv/list.html.twig', array(\n 'altinvs' => $altinvs,\n ));\n }", "title": "" }, { "docid": "971c5bf5ae183faa04c5c48cbd18c860", "score": "0.6784632", "text": "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 }", "title": "" }, { "docid": "009c68f22edb5d32fe04a4694c775ca1", "score": "0.67773366", "text": "public function indexAction() {\n $this->render('list', array(\n 'entries' => $this->newsRepository->getAll(array('date' => 'DESC'))\n ));\n }", "title": "" }, { "docid": "f942ddab63eeccb58e9b51ecacb7adee", "score": "0.67761296", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $result) = Resource_Service_Attribute::getList($page, $perpage,array('at_type' => 1,'status' => 1));\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t}", "title": "" }, { "docid": "1cda64db2e68c557b90cdabeccaba33f", "score": "0.675991", "text": "public function index()\n {\n //\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "183389798fc3f84d25abd7fc3486c685", "score": "0.67536837", "text": "function index()\n\t\t{\n\t\t\tif($this->AJAXCall)\n\t\t\t\texit;\n\t\t\t\n\t\t\t$this->_generate_listing(false);\n\t\t}", "title": "" }, { "docid": "117edb0c09e0fdcb587db5412ef18996", "score": "0.67518383", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TicketswapUserBundle:Users')->find(1);\n $listings = $em->getRepository('TicketswapListingBundle:Listings')->findBy(['user' => $user]);\n\n return $this->render('listings/index.html.twig', array(\n 'listings' => $listings,\n ));\n }", "title": "" }, { "docid": "a0016ac4bfda3ac0418505813ba2e862", "score": "0.67345333", "text": "public function indexAction()\n {\n if ( ! $this->getUser()) {\n return $this->redirect($this->generateUrl('user_sign_in'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BWBlogBundle:Resource')->findBy(array(\n 'user' => $this->getUser(),\n ), array(\n 'created' => 'DESC',\n ));\n $resources = new ArrayCollection($entities);\n\n return $this->render('BWBlogBundle:Resource:index.html.twig', array(\n 'entities' => $entities,\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "c6af5753a45a23a4039724edd2030d18", "score": "0.6731502", "text": "public function index()\n {\n $data = array(\n 'objects' => $this->instituicaoBo->list_all(),\n 'title' => 'Instituição',\n 'heading' => 'Lista de',\n );\n\n $this->load->view('/instituicao/list_instituicao.html.php', $data);\n }", "title": "" }, { "docid": "274943ce909ef8e9f446ec40976ee886", "score": "0.6731468", "text": "public function listAction()\n {\n $all = $this->rss->findAll();\n \n $this->theme->setTitle(\"Visa alla RSS-flöden\");\n $this->views->add('rss/list-all', [\n 'feeds' => $all,\n 'title' => \"Visa alla RSS-flöden\",\n ], 'main');\n \n $this->views->add('rss/rss-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "ed091402879b52de0ec1b21125fb6df3", "score": "0.6728043", "text": "public function index()\n {\n //Get Products\n $products = Product::paginate(100);\n \n //Return collection of products as resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "0ee391ae331b2e93b8a1c88e428dfb9a", "score": "0.6726314", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $rentals = $em->getRepository('SGIBundle:Rental')->findAll();\n\n return $this->render('rental/list.html.twig', array(\n 'rentals' => $rentals,\n ));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67259544", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.67225957", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b10432984ae1b667b192f3f5d3985a4c", "score": "0.6715505", "text": "public function showList()\n {\n //var_dump($this->post);\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "ff3e5f5bb761df19ee88cd46c9c44f75", "score": "0.6711798", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Partners - '.APP_NAME;\n $this->global['pageMenu'] = 'List Partners';\n $this->global['contentHeader'] = 'List Partners';\n $this->global['contentTitle'] = 'List Partners';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a82e643c16a81545d59c105f6fd9019e", "score": "0.6710891", "text": "public function index()\n {\n return PlaylistResource::collection(Playlist::with('tracks')->paginate());\n }", "title": "" }, { "docid": "9c3a8017fadc1446e144ef2847a75de3", "score": "0.6704848", "text": "public function index()\n {\n return PlaylistResource::collection(\\App\\Playlist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "da46f30f701104b01168396ab42fd3e4", "score": "0.6700174", "text": "public function actionList()\n\t{\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax'\n\t\t]);\n\t}", "title": "" }, { "docid": "1c6e0baa6678b891bebbc943f9480efa", "score": "0.67001444", "text": "public function indexAction()\r\n\t{\r\n\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t $totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t $configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\t\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->slbGroup = $this->_model->itemInSelectBox($this->_arrParam);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "8fdc346d2ae73862487e8562ba0d2f8e", "score": "0.66981", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->book ? $this->book->title . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.66964006", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695788", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "6302f4af4daf8199c6e51ccba9683ada", "score": "0.6693826", "text": "public function index()\n {\n $flights = Resources::all();\n return view('admin.resource.view', compact('flights'));\n }", "title": "" }, { "docid": "ce01e387a99bc334b00eed748a6952cf", "score": "0.6692683", "text": "public function index()\n {\n return $this->respondWithPaginatedCollection(SmartBin::paginate(), $this->smartBinTransformer);\n }", "title": "" }, { "docid": "a852cb19289ccd3ae31b2b0e5320aea1", "score": "0.6691365", "text": "public function index()\n {\n Gate::authorize('view', 'products');\n $product = Product::paginate();\n\n return ProductResource::collection($product);\n }", "title": "" }, { "docid": "d8835f9930d0f9c4f3c53749e67962c3", "score": "0.6685522", "text": "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "title": "" }, { "docid": "d69e4f0b4187ff68e97b4e7a5d09ad96", "score": "0.66809165", "text": "public function list()\n {\n }", "title": "" }, { "docid": "a656fd3c504977ccfaf035cdddd42150", "score": "0.6680881", "text": "public function listAction() : void {\n $this -> view -> assignMultiple([\n 'server' => $this -> serverRepository -> findAll()\n ]);\n }", "title": "" }, { "docid": "af48da44bf6d55a059ab53c7dd12c14e", "score": "0.6678854", "text": "public function index()\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resources = $this->repository->filter()->cast();\n\n return $this->responder->ok()->withData($resources)->send();\n }", "title": "" }, { "docid": "88a8d702b1375b13dc358eb9e6dfdb8e", "score": "0.66782534", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Tickets list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the tickets.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/tickets/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\n\t\t$this->datagrid->setConfig ( Tickets::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "a9f952d5e07e7d6d7e049c37f8d2fa2e", "score": "0.6677417", "text": "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $contact = new Contact();\n $results = $contact->getContact4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "title": "" }, { "docid": "fcbdc058a31d41050a367e7b15d55776", "score": "0.6674006", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminMongoOdmEvents::PRE_LIST);\n\n $fields = $this->document['list']['fields'];\n $paginator = $this->mongoOdmFindAll($this->document['class'], $this->request->query->get('page', 1), $this->document['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n $this->dispatch(EasyAdminMongoOdmEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n // RESTRICTED_ACTIONS 'delete_form_template' => $this->createDeleteForm($this->document['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<DocumentName>Template', ['list', $this->document['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d25f4e517682766596d2c16eca86c7fa", "score": "0.6673046", "text": "public function index()\n {\n return view('resource.index',['resources'=>Resource::all()]);\n }", "title": "" }, { "docid": "f6d989efb8c8e985bb96c0559d9bde67", "score": "0.6672984", "text": "public function index()\n\t{\n $listings = Listing::paginate(3);\n return response( $listings,200);\n\t}", "title": "" }, { "docid": "561ee0fde098e9e4a73a2a5669089034", "score": "0.66718674", "text": "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "2a6023a5396366a36aac2f066e03181d", "score": "0.667153", "text": "public function index()\n {\n $playlists = Playlist::query()\n ->with('author')\n ->latest()\n ->paginate(16);\n return PlaylistResource::collection($playlists);\n }", "title": "" }, { "docid": "f16b067e8febaf73c982ac35e0e11cd0", "score": "0.6659197", "text": "public function index()\n {\n return ActionResource::collection(Action::paginate(5));\n }", "title": "" }, { "docid": "ca2f35e9a4c5b25c7b81f82a26bdc119", "score": "0.66565573", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "36f38270af9227d848d8bfe2fc2fb2f6", "score": "0.6650898", "text": "public function index()\n\t{\n\t\t$resources = $this->repository->getResources();\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.index', compact(['resources', 'menuTab']));\n\t}", "title": "" }, { "docid": "842b9bbe43e49f877c207858fd6dd962", "score": "0.6649764", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Products list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the products.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/products/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Products::grid () )->datagrid ();\n\t}", "title": "" }, { "docid": "7654a7b909673402548e3c1d711a6d3b", "score": "0.66464126", "text": "public function list()\n {\n $data = array(\n 'title' => 'Laporan Vclaim',\n 'class_name' => $this->class,\n 'route_name' => $this->routes\n );\n\n $data['contents'] = 'contents/laporan/' . $this->class . '/index';\n $this->load->view('master', $data);\n\n }", "title": "" }, { "docid": "165ffb7039a9dcc6c1d81e1ca64483e4", "score": "0.6645607", "text": "public function index()\n {\n // Get books\n\t $books = Book::orderBy('created_at', 'desc')->paginate(5);\n\n\t return BookResource::collection($books);\n }", "title": "" }, { "docid": "6aae86ba51583240c8fe0f141159a841", "score": "0.6643945", "text": "public function index()\n {\n $accountDetail = AccountDetail::all()->sortBy('id');\n return AccountDetailResource::collection($accountDetail);\n }", "title": "" }, { "docid": "10a2b9d6812eccfed7ddcd2d5f7a7eb0", "score": "0.6640503", "text": "public function index()\n {\n $sub_localization_model = SubLocalization::on();\n $this->addUserFilteringToDataFetch($sub_localization_model, 'name', 'where', ['name', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'description', 'where', ['description', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'localization_id', 'where', ['localization_id', '=']);\n\n return BaseResource::collection($sub_localization_model->get());\n }", "title": "" }, { "docid": "6d76de53bb869e73d429cbb2f319f520", "score": "0.6639051", "text": "public function index(Request $request)\n {\n $resources = Resource::where('status', 1);\n\n $request_append = array();\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $resources = $resources->where('name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('source_name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('description', 'LIKE', '%' . $query_string . '%');\n }\n\n \n\n $resources = $resources->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n return View('resources.show-resources', compact('resources'));\n }", "title": "" }, { "docid": "d768f601d0b3a2a45a883075e9bd74fa", "score": "0.6638999", "text": "public function index()\n {\n $products = Product::latest()->paginate();\n\n return $this->respond(ProductResource::collection($products));\n }", "title": "" }, { "docid": "b2f9c5d65d641e65a8807637650b4e37", "score": "0.66339254", "text": "public function index()\n {\n $limit = 0;\n $list_obj = Collection::where('status', 1)->orderBy('created_at', 'DESC')->paginate($limit);\n return view('admin.collection.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.66336197", "text": "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}", "title": "" }, { "docid": "1863deff5f71e623d3df5630ccdabb09", "score": "0.66327924", "text": "public function indexAction()\n {\n $this->_initAction();\n $this->_title('Items');\n $this->renderLayout();\n }", "title": "" }, { "docid": "fbca53bf6960e73cbc1141408c860e37", "score": "0.662936", "text": "function index()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_historialModel->getHistorial();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "fc175898bd7c35e91f0a34b68f176c7f", "score": "0.6628597", "text": "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "title": "" }, { "docid": "da5a6a8e08d78cfa23a7671fa0667dac", "score": "0.6626584", "text": "public function listingAction(){\n if (LoginHelper::isAdmin()){\n $this->view->render('doctor/list', Doctor::all());\n }else{\n Router::redirect('home', '<p class=\"alert alert-danger\">You are not authorized</p>');\n }\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.66262406", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" } ]
03409a9bd66fb7ba311e696228184967
Store a new userinterest in the storage. param Illuminate\Http\Request $request return Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector
[ { "docid": "d2b07ef2dddcde434844da4aea19cddc", "score": "0.7986927", "text": "public function store (Request $request)\n {\n try {\n\n $data = $this->getData ($request);\n\n Userinterest::create ($data);\n\n return redirect ()->route ('userinterests.userinterest.index')\n ->with ('success_message', 'Userinterest was successfully added!');\n\n } catch (Exception $exception) {\n\n return back ()->withInput ()\n ->withErrors (['unexpected_error' => 'Unexpected error occurred while trying to process your request!']);\n }\n }", "title": "" } ]
[ { "docid": "0b5bcfc1d1145a9ee9059cb7d144406d", "score": "0.68260056", "text": "public function store(IncorporarInstitucionRequest $request)\n {\n $institucion = Institucion::create($request->all()); \n session(['mensaje' => 'Institución agregada con éxito.']);\n LogSistema::registrarAccion('Institución agragada: '.convertirArrayAString($institucion->toArray()));\n return redirect()->route('mantenedor_estudio_institucion');\n }", "title": "" }, { "docid": "f822ac20555207f9c2ebcb77e0e3ad24", "score": "0.6778742", "text": "public function store(Request $request)\n {\n\n // $data = $this->validateRequest($request);\n // unset($data['name'], $data['email'], $data['username']);\n // $imagePath = $data['image']->store('uploads/profiles', 'public');\n // $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n // $image->save();\n // Auth::user()->profile()->create([\n // 'bio' => $data['bio'],\n // 'website' => $data['website'],\n // 'phone' => $data['phone'],\n // 'gender' => $data['gender'],\n // 'image' => $imagePath,\n // ]);\n // $user_id = Auth::id();\n // return redirect(\"/profile/$user_id\");\n }", "title": "" }, { "docid": "98ed589f121a159341625a85af1e44e2", "score": "0.6765992", "text": "public function store(Request $request)\n {\n glpi_profile::create($request->all());\n return redirect()->route('profile.index')->with(['success' => 'Élément modifié']);\n }", "title": "" }, { "docid": "6e2ad0d5a8bbaebfac1c573e41da0b22", "score": "0.6712298", "text": "public function store(Request $request)\n {\n $rating = new Rating;\n $rating->userId = auth()->user()->id;\n $rating->business_id = $request->business_id;\n $rating->rating = $request->rating;\n $rating->description = $request->description;\n $rating->save();\n return redirect()->route('directory');\n }", "title": "" }, { "docid": "f23d56123391a5fc5ffacfee6fde34dc", "score": "0.66872007", "text": "public function store(Request $request)\n {\n DB::table('history_log')->insert(\n array('user'=>Auth::user()->name,'history_type'=>'stored','path'=>url()->current())\n );\n $request->validate([\n 'incentive_name'=>'required'\n ]);\n\n $incentive = new ErpSalaryIncentive();\n $incentive->incentive_name = $request->get('incentive_name');\n\n $result = $incentive->save();\n if($result) {\n return redirect('/incentive')->with('message-success', 'Incentive has been added.');\n } else {\n return redirect('/incentive')->with('message-success', 'Something went wrong.');\n }\n }", "title": "" }, { "docid": "a1fa905cb5ebea7f91e78ac9c429d62f", "score": "0.667402", "text": "public function store(Request $request)\n {\n // user photo uploaded\n // if upload file is exist\n if ($request->hasFile('photo')) {\n $extension = $request->file('photo')->getClientOriginalExtension();\n $imageName = microtime(true).'.'.$extension;\n $destinationPath = 'upload/';\n $request->file('photo')->move($destinationPath, $imageName);\n\n $user_id = $request->input('user');\n $user = User::find($user_id);\n $user->photo = $imageName;\n $user->update();\n\n $user_id = Auth::id();\n $message = 'Uploaded Profile Photo.';\n Activity::saveActivity($user_id, $message);\n\n Session::flash('success_msg', 'Successfully uploaded photo');\n return redirect('profile');\n }\n return redirect('profile');\n }", "title": "" }, { "docid": "fe39f2d62152872708d8017beb888f98", "score": "0.6672962", "text": "public function store(Request $request)\n {\n $institucion = new instituciones();\n $institucion->nombre = $request[\"nombre\"];\n $institucion->dir = $request[\"direccion\"];\n $institucion->mapa = $request[\"mapa\"];\n $institucion->escudo = Imagenes::uploadImage($this->ruta,$request->file('foto'),$institucion->nombre);\n $institucion->activo = true;\n $institucion->save();\n\n return redirect()->back()->with(\n [\"message\"=>[\"clase\"=>\"success\",\"mensaje\"=>\"Institución Creada\"]]\n );\n }", "title": "" }, { "docid": "0c3ae64123abe1aeb751e82f00f6efc7", "score": "0.6672048", "text": "public function store(Request $request)\n {\n //\n $filling_array = array(\n 'followerid'=>Auth::user()->id,\n 'user_id' => $request->user_id,\n 'status' => $request->status,\n 'is_favourite' =>'0');\n \n Follower::create($filling_array);\n return \\Redirect::back()->withSuccess( 'Details Successfully updated' );\n }", "title": "" }, { "docid": "68b4ce310645a2c30ab8e568a8af2e8a", "score": "0.6640491", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'description' => 'required',\n ]);\n $note= new Note($request->all());\n $note->user_id = $request->user_id;\n $note->visit_id = $request->visit_id;\n $note->student_id = $request->student_id;\n $note->save();\n return Redirect('/afterLogin');\n }", "title": "" }, { "docid": "92987730323845fa8e841406e73926c8", "score": "0.66275287", "text": "public function store(Request $request)\n {\n return redirect()->route('profile.index');\n }", "title": "" }, { "docid": "74c1df99e23b0c940ed08efdd2d0b95c", "score": "0.6626813", "text": "public function store(Request $request)\n\n {\n $existSkills = DB::table('skill_social_auth')\n ->where('social_auth_id','=',Auth::user()->user_id)\n ->where('skill_id','=',$request->input('skill_id'))\n ->first();\n\n if(is_null($existSkills)){\n\n Auth::user()->skills()\n ->attach($request->input('skill_id'),[\n 'level_id' => $request->input('level_id'),\n 'working_years' => $request->input('working_years')\n ]\n );\n\n return redirect('skills');\n\n }else{\n\n return redirect('skills');\n\n }\n }", "title": "" }, { "docid": "146c7e7c8719313fbd35195535299f85", "score": "0.66103345", "text": "public function store(Request $request)\n {\n $interviewee = new Interviewee;\n \n\n $interviewee-> intfname = $request->intfname;\n $interviewee-> intmname = $request->intmname;\n $interviewee-> intlname = $request->intlname;\n $interviewee-> intrelation = $request->intrelation;\n $interviewee-> intaddress = $request->intaddress;\n $interviewee-> intemail = $request->intemail;\n $interviewee-> intdob = $request->intdob;\n $interviewee-> intcontactno = $request->intcontactno;\n $interviewee-> intgender = $request->intgender;\n $interviewee-> intcivilstatus = $request->intcivilstatus;\n $interviewee->save();\n\n return redirect('interviewees');\n }", "title": "" }, { "docid": "4cefafee865b600b271663ab67ef7ee6", "score": "0.6596148", "text": "public function store(Request $request)\n {\n // $store = new User;\n // Storage::put('public/img/users/', $request->file('src'));\n // $store->src = $request->file('src')->hashName();\n // $store->name = $request->name;\n // $store->email = $request->email;\n // $store->name = $request->name;\n // $store->name = $request->name;\n // $store->function = $request->function;\n // $store->save();\n // return redirect()->back();\n }", "title": "" }, { "docid": "26dac833cdc207898268e4f630190cea", "score": "0.65905523", "text": "public function store(Request $request)\n {\n $follow = new Follow();\n $follow->currentUserId = $request->currentUserId;\n $follow->followsUserId = $request->followsUserId;\n $follow->reviewId = $request->reviewId;\n $follow->itemId = $request->itemId;\n $follow->save();\n return redirect(\"/\");\n }", "title": "" }, { "docid": "e815d4827c8a4e9ff90b8b16a0422f96", "score": "0.65882343", "text": "public function store(Request $request)\n {\n Rate::create($request->all());\n return back()->with('success','Done');\n }", "title": "" }, { "docid": "c2bb649a7390e01c1877d637e6b14725", "score": "0.6586302", "text": "public function store(Request $request)\n {\n $this->press = new PressAndNew;\n $this->check($request)\n ->setProps($request)\n ->uploadPicture($request)\n ->save();\n return back()->with('success','Data Inserted');\n }", "title": "" }, { "docid": "1744257ecf1568a71ff3142c2605a128", "score": "0.6586086", "text": "public function updateinterests (Request $request)\n {\n try {\n\n if ($user = Auth::user ()) {\n\n $user_id = Auth::user ()->id;\n $data = $this->getinterset ($request);\n $data['user_id'] = $user_id;\n $userinterest = Userinterest::where ('user_id', '=', $user_id)->where ('topic_id', '=', $data['topic_id'])->first ();\n if ($userinterest) {\n $userinterest->update ($data);\n } else {\n\n $userinterest = Userinterest::create ($data);\n\n }\n\n return redirect ()->route ('practice.disciplinepractice', [$userinterest->id]);\n } else {\n\n if (session ()->has ('grade_id')) {\n\n session ()->forget ('grade_id');\n\n }\n $data = $this->getinterset_forguset ($request);\n\n session (['language_id' => $data['language_id']]);\n session (['discipline_id' => $data['discipline_id']]);\n session (['exercise_type' => 1]);\n session (['topic_id' => $data['topic_id']]);\n if ($request->has ('grade_id')) {\n if ($data['grade_id'] <> null) session (['grade_id' => $data['grade_id']]);\n\n }\n\n\n return redirect ()->route ('guest.guestpractice');\n\n }\n\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request!']);\n }\n }", "title": "" }, { "docid": "01b7499e58d0d399636bde233d467a0a", "score": "0.6574783", "text": "public function store(Request $request)\n {\n if( $storage = Storage::create( $request->all() ) )\n {\n foreach ($request->storage_items as $item) \n {\n $storage->item()->attach($item);\n }\n return redirect()->back();\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "0ae2ef4b8eca0d525a76ea277c798fb3", "score": "0.65700465", "text": "public function store(Request $request)\n {\n $user = User::where('email', $request->data_token->email)->first();\n $user_id = $user->id;\n $this->setIds($user_id,$request->recipe_id);\n return response()->json([\"Success\" => \"guardado en favoritos\"], 200);\n }", "title": "" }, { "docid": "8f909c2390d9aae266a616006666c1ab", "score": "0.65464354", "text": "public function store(Request $request)\n {\n Imunisasi::create($request->all());\n return redirect()->back();\n }", "title": "" }, { "docid": "8b7c37af8a145e8c7eaa4d06b1bbd3fe", "score": "0.6539658", "text": "public function store(Request $request)\n {\n JobProfile::create([\n 'name' => $request['name'],\n 'importance' => $request['importance'],\n ]);\n\n return redirect()->route('jobProfiles.index');\n }", "title": "" }, { "docid": "5ab5d6057e19c00ae15e08a058e71cc3", "score": "0.6531383", "text": "public function store(Request $request)\n {\n $validationparams = $this->controllerFunction->setfieldvalidation($this->module, $request, \"\\App\\Http\\Controllers\\site\\\\\");\n $this->validate($request, $validationparams);\n\n $_request = $request->all();\n unset($_request['_token'], $_request['attachment']);\n $current_user = $this->controllerFunction->getcurrent_user(Auth()->id());\n $_request['user_profileid'] = $current_user['user_profileid'];\n $attachment = ($request->attachment) ? array('attachment' => $request->attachment) : [];\n\n $response = $this->controllerFunction->store($this->module, new \\Illuminate\\Http\\Request($_request, $_request, [], [], $attachment));\n return back()->with('success', 'You have just created one ' . $this->module['modulename']);\n }", "title": "" }, { "docid": "1079a83559b57f93e33af9d492221728", "score": "0.6528696", "text": "public function store(Request $request)\n {\n $user = User::find($request->followed_id);\n \\Auth::user()->follow($user);\n return back();\n }", "title": "" }, { "docid": "fdaa6aab3ddac1e5afe2d1f35e60db9c", "score": "0.6519184", "text": "public function store(Request $request)\n {\n //\n $data = $request->all();\n \n //Note::create($data);\n //Create a note base data\n $note = Note::create([\n 'notebook_id' => $request->notebook_id\n ]);\n //Created a linked entry record with an secifiy note\n NoteRecord::create([\n 'title' => $request->title,\n 'body' => $request->body,\n 'note_id' => $note->id\n ]);\n\n return redirect()->route('notebooks.show',$request->notebook_id);\n }", "title": "" }, { "docid": "cde31517b7c941cb703b195f7f837161", "score": "0.65103805", "text": "public function store(Request $request)\n {\n $user_id = $request->user()->id;\n $countlike = LikeReview::where('user_id', '=', $user_id)->where('review_id', '=', $request->input('review_id'))->count();\n if($countlike == 0){\n try {\n\n $likereview = new LikeReview;\n $likereview->user_id = $request->user()->id;\n $likereview->review_id = $request->input('review_id');\n $likereview->save();\n return redirect()->back();\n }catch(\\Illuminate\\Database\\QueryException $errors) {\n return \"error\";\n }\n }\n else{\n $likeReview = LikeReview::where('user_id', '=', $user_id)->where('review_id', '=', $request->input('review_id'))->get()[0];\n $this->destroy($likeReview);\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "01973ee5325098c79631a03984541377", "score": "0.6509939", "text": "public function store(Request $request)\n {\n $specialite =new Specialite([\n \"specialite\" => $request->get(\"specialite\"),\n \"promo_id\" => $request->get(\"promo_id\"),\n ]);\n $specialite->save();\n return redirect('specialite');\n\n }", "title": "" }, { "docid": "5daa236b17ee5895ccbb325cf97fede0", "score": "0.6496976", "text": "public function store(Request $request) { \n $obra_social = new ObraSocial($request->all());\n $obra_social->save(); \n Session::flash('message', 'Se ha registrado una nueva obra social.');\n return redirect()->route('obras_sociales.index');\n }", "title": "" }, { "docid": "20c3e891b138a8cceff2694bded2c927", "score": "0.64913", "text": "public function store(Request $request)\n {\n if($photo = Collaborator::setPhoto($request->photo_up))\n $request->request->add(['photo' => $photo]);\n $collaborator = Collaborator::create($request->all());\n $notification = 'El colaborador se ha registrado correctamente.';\n return redirect('/collaborators')->with(compact('notification'));\n }", "title": "" }, { "docid": "28a5da03895ecb98d20c5a89b7a500d7", "score": "0.6485753", "text": "public function store(Request $request)\n {\n $this->repository->create($request);\n return redirect(route('thenews.index'));\n }", "title": "" }, { "docid": "18f06d66c41ddb4bdc1b6e875677f72b", "score": "0.6484852", "text": "public function store(Request $request)\n {\n //Validate form\n $this ->Validate($request , array(\n // 'question' =>'required| max:300'\n ));\n //Store database\n $information = new information;\n $information->company_name = $request->company_name;\n $information->email = $request->email;\n $information->website_url = $request->website_url;\n $information->contact_number = $request->contact_number;\n $information->mobile_number = $request->mobile_number;\n $information->location = $request->location;\n $information->facebook_url = $request->facebook_url;\n $information->twitter_url = $request->twitter_url;\n $information->instagram = $request->instagram;\n $information->save();\n //Redirect Other page\n return redirect()->route('information.index',$information->id);\n // return redirect()->route('home');\n }", "title": "" }, { "docid": "cefa454ae7228d59efc6097e3e51f0d9", "score": "0.648389", "text": "public function store(Request $request)\n {\n $favourite = new MyFavourite();\n $favourite->product_type = $request->Input('product_type');\n $favourite->product_id = $request->Input('product_id');\n $favourite->consumer_id = Auth::id();\n $favourite->save();\n\n if($request->Input('product_type') == 'part'){\n return redirect()->route('find.part.details', ['partId' => $request->Input('product_id')]);\n }\n else{\n return redirect()->route('find.car.details', ['carId' => $request->Input('product_id')]);\n }\n }", "title": "" }, { "docid": "fd7e149935d437ea6dd816682de21ab5", "score": "0.64808625", "text": "public function store(Request $request)\n {\n \t$this->validate($request, [\n \t\t'photo' => 'required|mimes:jpg,jpeg,png,bmp,gif'\n \t]);\n\n try {\n \tPhoto::upload(\n \t\tnew UserPhoto($request->file('photo')),\n auth()->user()->id\n \t); \n }\n\n catch (UserPhotoLimitException $e) {\n return redirect()->back()->withErrors(['photo' => 'You can only have 4 photos.']);\n }\n\n return redirect()->back();\n }", "title": "" }, { "docid": "4fe0009c6608b7b428ad6ace52f1b0a4", "score": "0.64791197", "text": "public function store(Request $request)\n {\n //here we can save the new data\n \n }", "title": "" }, { "docid": "565497bdd68a787f260f228b68511e49", "score": "0.64612466", "text": "public function store(Request $request)\n {\n Skill::create(request(['name', 'isTechnology', 'proficiency', 'iconPath']));\n return redirect('/home');\n }", "title": "" }, { "docid": "4e93723a63fffb19aaa6283b68711500", "score": "0.64369977", "text": "public function store(UserRequest $request)\n {\n if($request->hasFile('signature')){\n $url = $request->file('signature')->store('public/signatures');\n $picture = Picture::create([\n 'original_name' => $request->file('signature')->getClientOriginalName(),\n 'url' => str_replace('public/', '', $url)\n ]);\n $request->merge(['picture_id' => $picture->id]);\n }\n $request->merge(['password' => bcrypt($request->input('password'))]);\n $user = User::create($request->all());\n session()->flash('flash_message', 'Se ha agregado el usuario: '.$user->username);\n return redirect('usuarios');\n }", "title": "" }, { "docid": "3eaa5475e1f397ec5ad65b003928201a", "score": "0.6436207", "text": "public function store(UserRequest $request)\n {\n\n $request->persist();\n return redirect()->route('user')->with('sucess','Criado com sucesso.');\n }", "title": "" }, { "docid": "c72e9cafda01ddc96fdee23972b31ce1", "score": "0.64230597", "text": "public function store(Request $request)\n {\n //Add new note\n $user = Auth::user()->id;\n $note = new Note($request->all());\n\n $note->user_id = $user;\n $note->save();\n return back()->with('message', 'Note Added Successfully!!');\n\n \n }", "title": "" }, { "docid": "568950a7323dc4fc4d37b8548664797c", "score": "0.64212406", "text": "public function store(IndividualStoreRequest $request)\n {\n $data = $request->all();\n \n $this->repository->updateKpi($data);\n $this->repository->addKpi($data, $this->currentPeriod->year);\n \n return redirect(route('frontend.auth.individual.index'));\n }", "title": "" }, { "docid": "d2e44e5a7252f3ac0a13999b2bf7ba19", "score": "0.6408662", "text": "public function store( VisitorRequest $request ) {\n\t\t$user = Sentinel::registerAndActivate( $request->all() );\n\n\t\t$role = Sentinel::findRoleBySlug( 'visitor' );\n\t\t$role->users()->attach( $user );\n\n\t\t$user = User::find( $user->id );\n\t\tif ( $request->hasFile( 'image_file' ) != \"\" ) {\n\t\t\t$file = $request->file( 'image_file' );\n\t\t\t$extension = $file->getClientOriginalExtension();\n\t\t\t$picture = str_random( 10 ) . '.' . $extension;\n\n\t\t\t$destinationPath = public_path() . '/uploads/avatar/';\n\t\t\t$file->move( $destinationPath, $picture );\n\t\t\tThumbnail::generate_image_thumbnail( $destinationPath . $picture, $destinationPath . 'thumb_' . $picture );\n\t\t\t$user->picture = $picture;\n\t\t\t$user->save();\n\t\t}\n\t\t$user->update( $request->except( 'password', 'image_file' ) );\n\n\t\t$visitor = new Visitor();\n\t\t$visitor->user_id = $user->id;\n\t\t$visitor->save();\n\n\t\t$visitor->visitor_no = Settings::get( 'visitor_card_prefix' ) . $visitor->id;\n\t\t$visitor->save();\n\n\t\tCustomFormUserFields::storeCustomUserField( 'visitor', $user->id, $request );\n\n\t\treturn redirect( '/visitor' );\n\t}", "title": "" }, { "docid": "4ad04c22a39f18f99114d8af400d008e", "score": "0.64084166", "text": "public function store(Request $request)\n {\n try {\n $request['uuid'] = uniqid();\n YouthInfo::create($request->all());\n return redirect()->back()->with(\"success\", \"Youth info created successfully\");\n } catch (\\Exception $ex) {\n return redirect()->back()->with(\"error\", \"Something went wrong\");\n }\n }", "title": "" }, { "docid": "f7621df5cae8e2a70328dfca87f6b94b", "score": "0.64020234", "text": "public function store(Request $request)\n {\n $now = Carbon::now();\n $file_name = time() . '.' . $request->file->getClientOriginalName();\n $request->file->storeAs('public', $file_name);\n $path = 'http://127.0.0.1:8000/storage/' . $file_name;\n \n $param = [\n 'post_id' => $request->spot_id,\n 'user_id' => $request->user_id,\n 'path' => $path,\n 'created_at' => $now,\n 'updated_at' => $now,\n ];\n\n DB::table('best_tricks')->insert($param);\n return response()->json([\n 'message' => 'BestTrick created successfully',\n 'data' => $param\n ], 200);\n }", "title": "" }, { "docid": "f0c23e5f8be49021ad7700c8e672824b", "score": "0.6400494", "text": "public function store(ExiRequest $request)\n {\n try {\n $image = $this->imageUploader($request->file('image'));\n\n Exibition::create(array_merge($request->all(), ['image' => $image]));\n return redirect(route('exibition.index'));\n }\n catch (Exception $e){\n\n }\n\n }", "title": "" }, { "docid": "4187acf6c9792c6f43c15de027f36c3f", "score": "0.63978535", "text": "public function store(Request $request)\n {\n $aturan_tsukamoto = AturanTsukamoto::create([\n 'kode' => strtoupper($request->kode),\n 'penyakit_id' => $request->input('penyakit_id'),\n ]);\n\n $aturan_tsukamoto->gejala()->attach($request->input('himpunan_id'));\n\n\n return redirect()->route('aturan-tsukamoto.index');\n \n }", "title": "" }, { "docid": "7fc71fa9e56bd504c707d4ca18cb8228", "score": "0.6396028", "text": "public function store(Request $request)\n {\n //make new rent with book and user\n Rent::create([\n 'book_id' => $request->book_id,\n 'user_id' => $request->user_id,\n 'rent_at' => $request->rent_at,\n 'return_at' => $request->return_at,\n 'status' => 'pending',\n ]);\n Book::where('id', $request->book_id)->decrement('sum', 1);\n\n return redirect(route('rents.index'))->with('status', 'Rent created!');\n }", "title": "" }, { "docid": "af5b9de893b82df9927ec5a977710217", "score": "0.6391934", "text": "public function store(Request $request)\n {\n $object = new Like($request->all());\n try {\n $result = $object->save();\n } catch(\\Exception $e) {\n dd($e);\n $result = 0;\n }\n if($object->id > 0) {\n $response = ['op' => 'Create', 'r' => $result, 'id' => $object->id];\n return back()->withInput();\n } else {\n return back()->withInput()->with(['error' => 'algo ha fallado']);\n } \n }", "title": "" }, { "docid": "ef030786b66d7dbc54ea7a71b0fb7569", "score": "0.6391894", "text": "public function store(Request $request)\n {\n //\n $userProfile = new userProfile();\n $userProfile->userName = Auth::user()->userName ;\n $userProfile->fName= $request['fName'];\n $userProfile->lName= $request['lName'];\n $userProfile->profileSummary= $request['profileSummary'];\n $userProfile->city= $request['city'];\n $userProfile->state= $request['state'];\n $userProfile->country= $request['country'];\n // $userProfile->profileImg= $request['profileImg'];\n\n $userProfile->save();\n return redirect('/');\n }", "title": "" }, { "docid": "00735629c8398fc1321622ef491e6bbb", "score": "0.6391059", "text": "public function store(Request $request)\n {\n $request -> validate([\n 'nom' => ['required'],\n 'prenom' => ['required'],\n 'age' => ['required'],\n 'date_naissance' => ['required'],\n 'email' => ['required'],\n 'mot_passe' => ['required'],\n 'photo_profile' => ['required'],\n 'role_id' => ['required']\n ]);\n\n $table = new User;\n\n $table -> nom = $request -> nom;\n $table -> prenom = $request -> prenom;\n $table -> age = $request -> age;\n $table -> date_naissance = $request -> date_naissance;\n $table -> email = $request -> email;\n $table -> mot_passe = $request -> mot_passe;\n $table -> photo_profile = $request -> file(\"photo_profile\") -> hashName();\n $table -> role_id = $request -> role_id;\n\n $table -> save();\n\n $request -> file(\"photo_profile\") -> storePublicly(\"image\", \"public\");\n\n return redirect() -> route('users.index') -> with('message', 'User créé');\n\n }", "title": "" }, { "docid": "7868d50a4452694684aa06a7fc0f5977", "score": "0.63889277", "text": "public function store(Request $request)\n {\n $asignaturas = Asignatura::create([\n 'codigo' => $request->get('codigoAsignatura'),\n 'nombre' => $request->get('nombreAsignatura'),\n 'descripcion' => $request->get('descripcionAsignatura')\n ]);\n //$asignaturas = Asignatura::all(); \n return redirect()->route('docente.asignatura.index');\n }", "title": "" }, { "docid": "d5aa2748c873ea083d1e6b61dceaec26", "score": "0.6388167", "text": "public function store(Request $request)\n {\n \n $profesor=Profesor::create($request->all());\n \n return redirect()->route('profesors.index')\n ->with('info','Profesor guardado con exito');\n }", "title": "" }, { "docid": "d94657d83da73c4dc03fa29edd463d6d", "score": "0.63830906", "text": "public function store(UserRequest $request)\n {\n $user = new User;\n $auth_id = Auth::id();\n\n $user->user_id = $auth_id;\n $user->name = $request->name;\n $user->img_name = $request->img_name;\n $user->password = $request->password;\n $user->occupation = $request->occupation;\n $user->email = $request->email;\n $user->self_introduction= $request->self_introduction;\n $user->post = $request->post;\n $user->favorite = $request->favorite;\n $user->save();\n\n \n return redirect('users');\n }", "title": "" }, { "docid": "11e708b7fc9ab640f55c562e95b7ba3c", "score": "0.638206", "text": "public function store(Request $request)\n {\n $mad = $this->requestValidation();\n $mad[\"user_id\"] = auth()->user()->id;\n // dd($mad);\n\n $review = Review::create($mad);\n\n $this->storeImage($review);\n\n return redirect('home')->with('message', 'Review was successfully posted.');\n }", "title": "" }, { "docid": "6b3dc47d9727feb5619ee36f57cb99c5", "score": "0.6378561", "text": "public function store(Request $request)\n {\n $sociallinks = new Sociallinks;\n $sociallinks->facebook = $request->facebook;\n $sociallinks->twitter = $request->twitter;\n $sociallinks->linkdin = $request->linkdin;\n $sociallinks->instagram = $request->instagram;\n $sociallinks->github = $request->github;\n $sociallinks->behance = $request->behance;\n $sociallinks->save();\n\n $notification = array(\n 'message' => 'Socail Links Add Successfully.',\n 'alert-type' => 'success'\n );\n\n // Toastr Alert\n return back()->with($notification);\n }", "title": "" }, { "docid": "e42a43dbb38893d4f705652d4ce7bc79", "score": "0.63759476", "text": "public function store(Request $request)\n {\n $this->bR->createExample($request);\n return redirect()->route('examples.index');\n }", "title": "" }, { "docid": "875494d716e9ab3be0d6bb537b9a8599", "score": "0.6374825", "text": "public function store(StoreInstitution $request)\n {\n $institution = Institution::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('institution.index');\n }", "title": "" }, { "docid": "b763c44c7f76d8b2ef150c9a85a761d1", "score": "0.63731176", "text": "public function store(Request $request)\n {\n\n $observation = Observation::create($request->all());\n\n\n return redirect()->route('sessions.index', $observation->sesion_id)\n ->with('info','Observación Guardado con exito');\n }", "title": "" }, { "docid": "63b4d4a8c6102753c5dfe267f7f1257e", "score": "0.6371181", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|unique:ingredients|max:50',\n ]);\n Ingredient::create([\n 'name' => $request->name,\n ]);\n\n $old_route = session('old_route') ? session('old_route') : route('admin.ingredients.index');\n\n session()->forget('old_route');\n\n return redirect($old_route)->with('success', \"'$request->name' Inserted Successfully\");\n }", "title": "" }, { "docid": "9d0d7be2fb3544be3187f022ae9925bc", "score": "0.6369291", "text": "public function store(SocialRequest $request)\n {\n\n $data = $request->getData();\n Social::create($data);\n return redirect('jobseeker/social');\n }", "title": "" }, { "docid": "4ead9c52abad660cbe3e9b5993141ed7", "score": "0.6365174", "text": "public function store(Request $request)\n {\n //\n $data = $request->all();\n Nilai::create($data);\n return redirect('nilai');\n }", "title": "" }, { "docid": "9663a2e98960afe18065523d97a8d434", "score": "0.6364596", "text": "public function store(Request $request)\n {\n //usuario logueado\n $user = Auth::user();\n $id = $user->id;\n\n $target_income = $request->input('target_income');\n $date_income = $request->input('date_income');\n $description_income = $request->input('description_income');\n $price_income = $request->input('price_income');\n\n $otherincome = new otherincome();\n $otherincome->user_id = $id;\n $otherincome->target_income = $target_income;\n $otherincome->date_income = $date_income;\n $otherincome->description_income = $description_income;\n $otherincome->price_income = $price_income;\n\n $otherincome->save();\n\n return redirect()->route('ingreso')->with(['message' => 'Ingreso guardado correcatemente']); \n }", "title": "" }, { "docid": "4803664077a591357da69dae82f8f0e6", "score": "0.6361422", "text": "public function store(Request $request)\n {\n $request->session()->forget('user');\n\n $user = new User();\n\n $user->name = $request->name;\n $user->login = $request->login;\n $user->cod_privilege = 1;\n $user->password = Hash::make($request->password);\n $user->email = $request->email;\n\n $user->save();\n\n Helper::createSessionUser($user, $request);\n return redirect()->route('professorPersonalData');\n\n }", "title": "" }, { "docid": "e11a5be64f1e78421eb0237de0c3900b", "score": "0.6359125", "text": "public function store(Request $request)\n {\n $ikan = new Ikan();\n $ikan->ikan = $request->ikan;\n $ikan->save();\n return redirect('ikan');\n }", "title": "" }, { "docid": "ed910a4cb5f6927e814b1b7e326240ef", "score": "0.635766", "text": "public function store(Request $request)\n {\n //\n $userid = $request->userid;\n $select_product = $request->select_product;\n $basket_key = $request->token_basket;\n\n\n DB::table('basket')->insert([\n 'b_user_id' => $userid,\n 'product_id' => $select_product,\n 'basket_id' => $basket_key\n ]);\n return redirect('/');\n }", "title": "" }, { "docid": "738e8804b330fae98de8e9c1381af7de", "score": "0.6355528", "text": "public function store(Request $request)\n {\n $ingrediente = new Ingrediente($request->all());\n $ingrediente->save();\n \n Flash::warning('El ingrediente '. $ingrediente->name . ' ha sido creado con exito');\n return redirect()->route('admin.ingredientes.index');\n }", "title": "" }, { "docid": "49584a6d702111e980f774b85854f95c", "score": "0.6355387", "text": "public function store(Request $request,Payment $payment)\n {\n \n\n \n $payments = $payment->create([\n 'user_id' => $request->user_id,\n 'fst'=> $request->fst,\n 'mega' => $request->mega,\n 'dossier' => $request->dossier,\n 'type' => $request->type\n \n ]);\n \n\n // }\n\n //$students->add($payment);\n\n \n return redirect()->back();\n }", "title": "" }, { "docid": "6d4d4b071fe2097136cb290e4b3e8385", "score": "0.6353746", "text": "public function store(Request $request)\n {\n //\n\t\t$UserBefriend=$request->input('UserBefriends');\n\t\t$UserBefriended=$request->input('User');\n\t\t\n\t\t$NewBefriend=new Befriend;\n\t\t$NewBefriend->userbefriends_id=$UserBefriend;\n\t\t$NewBefriend->user_id=$UserBefriended;\n\t\t$NewBefriend->save();\n\t\t\n\t\treturn redirect()->back();\n }", "title": "" }, { "docid": "f1aee87a94a2b2b8bf8e598d3aedfc80", "score": "0.6352577", "text": "public function store(Request $request)\n {\n \n $asignatura = new Asignatura();\n $asignatura->nombre = $request->input('nombre');\n $asignatura->codigo = $request->input('codigo');\n $asignatura->id_user = Auth::user()->id; \n $asignatura->save();\n return redirect()->route('asignatura.edit', $asignatura->id)->with('info','Asignatura guardado con exito');\n }", "title": "" }, { "docid": "ace804bd3212d584f5f60888c211cd65", "score": "0.6346959", "text": "public function store(Request $request)\n {\n request()->validate(Favorito::$rules);\n\n $favorito = Favorito::create($request->all());\n\n return redirect()->route('favoritos.index')\n ->with('success', 'Favorito created successfully.');\n }", "title": "" }, { "docid": "9a5c9de2d58661d54e13ef71ff95c62a", "score": "0.63468206", "text": "public function store(Request $request)\n\t{\n\t\tDB::table('partai')->insert([\n\t\t\t'nama_partai' => $request->nama_partai,\n\t\t\t'foto' => $request->foto,\n\t\t\t'keterangan' => $request->keterangan\n\t\t]);\n\t\t// alihkan halaman ke halaman partai\n\t\treturn redirect('/partai');\n\t}", "title": "" }, { "docid": "50346d6fc262b7fec1c11c1fcc725d41", "score": "0.6341788", "text": "public function storePhoto(Request $request)\n {\n $this->validate($request,Photo::$rules);\n $this->galerieRepository->storePhoto($request);\n return redirect()->back();\n }", "title": "" }, { "docid": "dee4bbba200e1f9fb4dd2ed411a7cf77", "score": "0.6340796", "text": "public function store(Request $request)\n {\n //Recibir datos\n //Valido datos\n //Guardar en DB\n //Redireccionar\n return redirect('/ingredientes');\n }", "title": "" }, { "docid": "a8c4543e4fa7884778606b272830db18", "score": "0.6340722", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate($this->validationRules());\n // mass assignment\n $validatedData['picture'] = $request->picture->store('uploads','public');\n \n $etudiant = Etudiant::create($validatedData);\n\n return redirect()->route('etudiants.show', $etudiant)->with('storeEtudiant', \"Etudiant has been added successfuly\");\n }", "title": "" }, { "docid": "99685158c435d46b5903a84ffcab219e", "score": "0.634063", "text": "public function store(Request $request)//insert student info at DB\n {\n $image = $request->file('image')->store('public');\n\n $input_data = [\n 'name' => $request->name,\n 'email' => $request->email,\n 'image' => $image,\n ];\n\n Student::create($input_data);\n\n return redirect('/')->with('Student Registration Successful');\n }", "title": "" }, { "docid": "25ffd4b300997144c40535cacc16ed66", "score": "0.6339887", "text": "public function store(Request $request)\n {\n $recommend = new Recommend();\n $recommend->branch = $request->branch;\n $recommend->teacher = $request->teacher;\n $recommend->recommend = $request->recommend;\n $recommend->notes = $request->notes;\n $recommend->date = $request->date;\n\n $recommend->save();\n return back();\n }", "title": "" }, { "docid": "5fd316c15a7372361cba6e4bf319c67f", "score": "0.63369524", "text": "public function store(Request $request)\n {\n $data = [\n 'entryUser' => auth()->id(),\n ];\n $data += $request->validate($this->rules());\n $image = request()->file('question_photo');\n $question_photo = $image ? $image->store('experts') : 'images/default.jpg';\n\n Expert::create(compact('question_photo') + $data);\n\n return back()->with('success', 'تم انشاء السؤال بنجاح');\n }", "title": "" }, { "docid": "4e6ca4d40d67c94ae2ca4542555a09d9", "score": "0.6336166", "text": "public function store(Request $request)\n {\n $id = $request->suggestion_id;\n $like = new LikeSuggestion();\n $like->user_id = Auth::user()->id;\n $like->suggestion_id = $id;\n if($request->state == \"J'aime!\")\n $like->isLiking = 1;\n else\n $like->isLiking = 0;\n $like->save();\n return redirect(route('suggestionBox.show', $id));\n }", "title": "" }, { "docid": "d796c45bd29f4558664b910b199e8eb2", "score": "0.6335982", "text": "public function store(Request $request)\n {\n $password = Hash::make($request['password']);\n $name = $request['name'];\n $email =$request['email'];\n $role_id =$request['role_id'];\n $stockrole_id =$request['stockrole_id'];\n\n $user = new User();\n $user->name = $name;\n $user->password = $password;\n $user->email = $email;\n $user->role = $role_id;\n $user->stock_request_role = $stockrole_id;\n $user->push();\n return redirect('/users');\n }", "title": "" }, { "docid": "d342fafd07f2c52d22fa21c9c83a1041", "score": "0.6334018", "text": "public function store(Request $request)\n {\n enseignent::create($request->all());\n return redirect()->route('enseignent.index')->with('message','enseignent ajoutée avec succée');\n }", "title": "" }, { "docid": "6c3362a822cf978e44751fc55d2d77a8", "score": "0.6330733", "text": "public function store(Request $request)\n {\n $user = JWTAuth::parseToken()->authenticate();\n $like = Favourite::where('post_id', '=', $request->post_id)->where('user_id','=',$user->id)->first();\n if (empty($like)){\n $favourite = Favourite::add($request, $user);\n $fav = Favourite::where('id','=',$favourite->id)->with('user','post.owner')->first();\n $notification = new Notification();\n $notification->notifier = $fav->post->owner->id;\n $notification->event_user = $user->id;\n $notification->content = 'Like your post';\n $notification->type = '';\n $notification->save();\n $notification = Notification::where('id','=',$notification->id)->with(['notifier','event_user'])->first();\n $count = Notification::where([['notifier','=',$user->id],['seen' ,'=', 0]])->count();\n event(new Notifications($notification));\n event(new NotificationCount($count,$user));\n return response($favourite, 201);\n }else{\n $like->delete();\n $data = ['message' => 'unlike','like' => $like];\n return response($data,201);\n }\n\n }", "title": "" }, { "docid": "85b5b1b36d3d8eab9eccd4c1bb9db907", "score": "0.6329334", "text": "public function store(Request $request)\n {\n if (count(Membership::all()) <= 0) {\n $membership_id = 1;\n } else {\n $membership_lastID = Membership::getMembershipLastID();\n $membership_id = $membership_lastID[0]->membership_id + 1;\n }\n \n $membership_name = $request->membership_name;\n $membership_type = $request->membership_type;\n $membership_startDate = $request->membership_startDate;\n $membership_endDate = $request->membership_endDate;\n $outlet_id = Auth::user()->outlet_id;\n\n\n Membership::setMembership(\n $membership_id,\n $membership_name,\n $membership_type,\n $membership_startDate,\n $membership_endDate,\n $outlet_id\n );\n \n return back()->with('debitCreditNoteAdded');\n }", "title": "" }, { "docid": "9e8793aa2f03aa9fd6c6a682154fe4c8", "score": "0.6327431", "text": "public function store(Request $request)\n {\n try {\n \\DB::beginTransaction();\n $inputs = $request->all();\n $inputs['activated'] = true;\n $name = explode('@', $inputs['email']);\n $name = $name[0];\n $inputs['name'] = $name;\n\n $user = \\App\\Models\\User::create($inputs);\n $inputs['user_id'] = $user->id;\n $vps = \\App\\Models\\Pin::create($inputs);\n\n array_push($this->messages, 'Pin has been addedd.');\n $status = 1;\n session()->flash('flash', [\n 'status' => $status,\n 'messages' => $this->messages,\n 'class' => config(\"app.alart.class.{$status}\"),\n 'header' => config(\"app.alart.header.{$status}\")\n ]);\n\n \\DB::commit();\n return redirect()->route('pin.index');\n } catch (\\Exception $e) {\n $status = 0;\n array_push($this->messages, 'Something went wrong');\n session()->flash('flash', [\n 'status' => 0,\n 'messages' => $this->messages,\n 'class' => config(\"app.alart.class.{$status}\"),\n 'header' => config(\"app.alart.header.{$status}\")\n ]);\n\n \\DB::rollBack();\n return back();\n }\n }", "title": "" }, { "docid": "b79fed3c5b3b6f90740fe079b0683d05", "score": "0.6326299", "text": "public function store(Request $request)\n {\n try {\n $insumo = new Insumo();\n $insumo->nombre = $request->nombre;\n $insumo->descripcion = $request->descripcion;\n $insumo->precio = $request->precio;\n $insumo->medida = $request->medida;\n $insumo->save();\n\n alert()->success('Insumo agregado correctamente', 'Agregado');\n\n return redirect()->route('insumoindex');\n } catch (Exception $e) {\n return \"Fatal error - \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "42d4fedc7c9e6f539bd0f8f699316040", "score": "0.6324793", "text": "public function store(Request $request)\n {\n $user = new enter_estimit_value;\n\n $user->estim_num=Input::get('textNum');\n $user->estim_name=Input::get('textName');\n $user->hebrow_text=Input::get('hebrow_text');\n\n if($user->save()){\n session()->flash(\"notif\",\"تم ادخال قيمة التخمين بنجاح \");\n }else{\n session()->flash(\"notif\",\"لم يتم ادخال قيمة التخمين لحدوث خطأ في الادخال\");\n\n }\n return redirect()->to('addEstimatevalue');\n\n }", "title": "" }, { "docid": "13d6f5c1e1c3f4cf99ed96b34f8d5b6b", "score": "0.63233453", "text": "public function store(Request $request)\n {\n try {\n $data = $request->only('name', 'email','password', 'avatar', 'address', 'phone', 'status');\n\n if ($request->hasFile('avatar')) {\n $request->avatar->store(config('site.user.image'));\n\n $data['avatar'] = $request->avatar->hashName();\n }\n\n $this->userRepository->create($data);\n\n return redirect()->route('user.index');\n\n } catch (Exception $e) {\n\n return redirect()->back();\n }\n\n }", "title": "" }, { "docid": "ffef4df84ac30e87a0ff4b867fba2b88", "score": "0.6322904", "text": "public function store(Request $request)\n {\n \n $requestData = $request->all();\n \n Nilai::create($requestData);\n\n Session::flash('flash_message', 'Nilai added!');\n\n return redirect('admin/nilai');\n }", "title": "" }, { "docid": "7a9a45f5a2a524653f693fdbb8454ed6", "score": "0.63177586", "text": "public function store(Request $request)\n {\n\n $this->validate($request, [\n 'follow_id' => 'required|max:255',\n ]);\n\n $request->user()->follows()->create([\n 'follow_id' => $request->follow_id,\n ]);\n\n \\FeedManager::followUser($request->user()->id, $request->follow_id);\n\n return redirect('/users');\n }", "title": "" }, { "docid": "64a3157366b6c67c2fcbd9b38efe6267", "score": "0.6317593", "text": "public function store(Request $request)\n {\n $livroSaotome = new LivroSaotome;\n $livroSaotome->titulo = $request->titulo;\n $livroSaotome->autor = $request->autor;\n $livroSaotome->isbn = $request->isbn;\n $livroSaotome->save();\n # return redirect(\"/livrossaotome/{$livroSaotome->id}\");\n return redirect(\"/livrossaotome\");\n }", "title": "" }, { "docid": "a00e59ead4c917092ee2217420ec6a0b", "score": "0.6315741", "text": "public function store(Request $request)\n {\n try {\n $this->user->store($request);\n\n flash('Tambah User berhasil!')->success();\n return redirect()->route('user.index');\n }\n catch (\\Exception $exception) {\n flash($exception->getMessage())->error();\n return redirect()->back();\n }\n\n \n }", "title": "" }, { "docid": "797e42fe705c9d4cf7855a890243a754", "score": "0.6312481", "text": "public function store(Request $request)\n {\n $profile = UserProfile::where(['user_id' => Auth::guard('web')->user()->id])->firstOrFail();\n\n $profile['first_name'] = $request->input('firstName');\n $profile['last_name'] = $request->input('lastName');\n\n if ($request->file('avatar')) {\n // $profile->clearMediaCollection('user_avatars');\n $profile['avatar_id'] = $profile->addMediaFromRequest('avatar')->toMediaCollection('user_avatars')->id;\n }\n\n $profile->save();\n\n redirect()->route('profile');\n }", "title": "" }, { "docid": "7147e21406ec3304b142a5e2ec749d92", "score": "0.63075656", "text": "public function store(Request $request)\n {\n $user = User::add($request->all());\n return redirect()->route('admini.users.index');\n }", "title": "" }, { "docid": "989e95f8b88aec38d7d80e35f71c2a2a", "score": "0.6305978", "text": "public function store(Request $request)\n {\n $user_info = Auth::user();\n\n if(is_null($user_info)){\n \treturn redirect('/login');\n }\n $this->validate($request, [\n 'date' => 'Required',\n 'supplier' => 'Required',\n 'invoice' => 'Required']);\n Expense::create($request->all() + ['user_id' => $user_info->id]);\n $expense_id = Expense::orderBy('id', 'DESC')->pluck('id')->first();\n \n return redirect('expenseitemadd?expense_id=' . $expense_id);\n }", "title": "" }, { "docid": "8fb8ace45ef3cd5c41807f88a9a7dfe8", "score": "0.6302472", "text": "public function store(Request $request)\n {\n Pantry::create($request->all());\n return redirect()->back()->with('status_success','Nuevo Registro');\n }", "title": "" }, { "docid": "2f12f45f7af4b11b02a08f5e8dbd3092", "score": "0.6301484", "text": "public function store(Request $request)\n {\n $detalle_imp_retencion = new detalle_imp_retencion($request-> all());\n $detalle_imp_retencion->save();\n \\Alert::success('', 'El detalle_imp_retencion ha sido registrado con exito !')->persistent('Close');\n // return redirect()->route('detalle_imp_retencion.index');\n return back();\n }", "title": "" }, { "docid": "e19f25f6883ca30a1d4101e28bf28aeb", "score": "0.6300197", "text": "public function store(Request $request)\n {\n $input = request()->except(['_token', 'action', '_method']);\n $input['created_by'] = auth()->user()->id;\n $input['updated_by'] = auth()->user()->id;\n $input['status'] = 0;\n $data = Promotion::create($input);\n return redirect(route('promotion.index'))->with('success', 'Item added succesfully');\n }", "title": "" }, { "docid": "e1c39d570bd337adb2d2b6ecfac0129e", "score": "0.62960976", "text": "public function store(Request $request)\n {\n $notebook = Notebook::create($request->only(['notebookName', 'notebookContents', 'project_id']));\n return redirect('/home?selected=' . $request->get('project_id'));\n }", "title": "" }, { "docid": "05aec20c721879f29465045c3dd4c4c1", "score": "0.62959313", "text": "public function store(Request $request)\n {\n try{ \n $user = Sentinel::registerAndActivate($request->all());\n return redirect()->back()->with(['success'=>'Students Added Successfully']);\n }catch (QueryException $e){\n return redirect()->back()->with(['error'=>'Email Allready Exist.']);\n }\n }", "title": "" }, { "docid": "8a6509ab6468b052e1d04fbef9ae2601", "score": "0.6295539", "text": "public function store(Request $request)\n {\n $profile = new Profile;\n \n $profile->create($request->all());\n\n return redirect()->route('profile.index');\n }", "title": "" }, { "docid": "f7c383e88be745b21cb9d2f35b51ba70", "score": "0.629513", "text": "public function store(Request $request)\n {\n $data = $request->except(['_token']);\n\n if($request->has('profile')){\n $suffix = $request->file('profile')->extension();\n\n $name = uniqid(\"img_\").'.'.$suffix;\n\n $dir = './uploads/series/'.date('Y-m-d');\n\n $request->file('profile')->move($dir,$name);\n\n $data['profile'] = trim($dir.'/'.$name,'.');\n\n if (DB::table('series')->insert($data)) {\n return redirect('admin/series')->with('msg','添加成功');\n }else{\n return redirect('admin/series')->with('msg','添加失败');\n }\n }else{\n return redirect('admin/series')->with('msg','添加失败');\n }\n\n }", "title": "" }, { "docid": "26935255dd1af6c895d871bf4028e5a9", "score": "0.6291339", "text": "public function store(Request $request)\r\n {\r\n $input = $request->all();\r\n $input['user_id']= Auth::user()->id;\r\n $account = Account::create($input);\r\n\r\n return redirect()->route('accounts.index');\r\n }", "title": "" }, { "docid": "74f4e42208758554dc6991bf274e1309", "score": "0.62827593", "text": "public function store(Request $request)\n {\n if(Gate::allows('student.create', Student::class)){\n $student =new Student;\n if($request->picture != null){\n request()->validate([\n 'picture' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n $imageName = time().'.'.request()->picture->getClientOriginalExtension();\n request()->picture->move(public_path('/img_student/'), $imageName);\n $student -> picture = $imageName;\n }\n $student -> first_name = $request -> get('first_name');\n $student -> last_name = $request -> get('last_name');\n $student -> gender = $request -> get('gender');\n $student -> year = $request -> get('year');\n $student -> user_id = $request ->get('user_id');\n $student -> province = $request -> get('province');\n $student -> class = $request -> get('class');\n $student -> student_id = $request -> get('student_id');\n $student -> save();\n return redirect('/home');\n }else{\n return \"you are not addmin\";\n }\n }", "title": "" }, { "docid": "a0a27217a4943325513f8bd0600a4779", "score": "0.62792546", "text": "public function store(Request $request)\n {\n student::create(Request::all());\n \n\n Session::flash('flash_message', 'Data successfully added!');\n \n return redirect()->back(); \n }", "title": "" } ]
23a948be7be383a4f88eb39b2813f3a0
Update the pending user's role id. Invitations are handled in one database table, so one function can handle both.
[ { "docid": "2b3eeec97d052a3ca7f9c78f5b6995ce", "score": "0.71681195", "text": "function updatePendingRole(){\n\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t$output = '';\n\ttry{\n\t\tif(empty($_POST['invitationId'])){\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'invitationId\\'] is empty.');\n\t\t}elseif(empty($_POST['type'])){\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'type\\'] is empty.');\n\t\t}elseif(empty($_POST['typeId'])){\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'typeId\\'] is empty.');\n\t\t}elseif(!isset($_POST['newRoleId'])){//The newRoleId may be zero, so check that the value isset rather than empty.\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'newRoleId\\'] is not set.');\n\t\t}\n\t\tif($_POST['type'] == 'list'){\n\t\t\t$type = 'list';\n\t\t\t$listInfo = getListInfo($_SESSION['userId'],$_POST['typeId']);\n\t\t\t$role = $listInfo['listRoleId'];\n\t\t}else{\n\t\t\t$type = 'folder';\n\t\t\t$folderInfo = getFolderInfo($_SESSION['userId'],$_POST['typeId']);\n\t\t\t$role = $folderInfo['folderRoleId'];\n\t\t}\n\t\t//Verify the user has a sufficient role to delete invitations.\n\t\tif(empty($role) || $role < 3){\n\t\t\tthrow new Adrlist_CustomException('Your role does not allow you to edit this ' . $_POST['type'] . '.','');\n\t\t}\n\t\t//Update the roleId.\n\t\t$stmt = $Dbc->prepare(\"UPDATE\n\tinvitations\nSET\n\t{$type}RoleId = ?\nWHERE\n\tinvitationId = ?\nLIMIT 1\");\n\t\t$params = array($_POST['newRoleId'],$_POST['invitationId']);\n\t\t$stmt->execute($params);\n\t\t$rowCount = $stmt->rowCount();\n\t\tif(empty($rowCount)){\n\t\t\tpdoError(__LINE__, $stmt, $params, true);\n\t\t}\n\t\t//Get the id of the folder or list to pass to the buildUser functions.\n\t\t$getIdQuery = $Dbc->prepare(\"SELECT\n\t{$type}Id AS '{$type}Id'\nFROM\n\tinvitations\nWHERE\n\tinvitationId = ?\");\n\t\t$getIdQuery->execute(array($_POST['invitationId']));\n\t\t$row = $getIdQuery->fetch(PDO::FETCH_ASSOC);\n\t\tif($type == 'folder'){\n\t\t\t$_POST['folderId'] = $row['folderId'];\n\t\t\t//We will not update user's role id for all of the folder's lists. That occurs when the pending user creates an account.\n\t\t\t$returnThis['buildUsers'] = buildFolderUsers();\n\t\t}else{\n\t\t\t$_POST['listId'] = $row['listId'];\n\t\t\t$returnThis['buildUsers'] = buildListUsers();\n\t\t}\n\t\tif(MODE == 'updatePendingRole'){\n\t\t\t$success = true;\n\t\t\t$message .= 'Updated';\n\t\t}\n\t}catch(Adrlist_CustomException $e){\n\t}catch(PDOException $e){\n\t\terror(__LINE__,'','<pre>' . $e . '</pre>');\n\t}\n\tif(MODE == 'updatePendingRole'){\n\t\treturnData();\n\t}\n}", "title": "" } ]
[ { "docid": "08774332862b8c9719940ed86d2a5f3d", "score": "0.64255553", "text": "function bbp_profile_update_role($user_id = 0)\n{\n}", "title": "" }, { "docid": "eb96380fd3df6936e148d6cf069b784c", "score": "0.6075453", "text": "function bbp_set_user_role($user_id = 0, $new_role = '')\n{\n}", "title": "" }, { "docid": "b702444ec085c348c9ebd4ffb7ce7c27", "score": "0.6011173", "text": "function bbp_user_add_role_on_invite($user_id = '', $role = '', $newuser_key = '')\n{\n}", "title": "" }, { "docid": "1af2a1de3c74d8cd7e39f268244ccd52", "score": "0.59559995", "text": "function update_userinrole($iduserinrole,$params)\n {\n $this->db->where('iduserinrole',$iduserinrole);\n return $this->db->update('userinrole',$params);\n }", "title": "" }, { "docid": "6c52d7b70f024aa6a9a935c0dea7b266", "score": "0.5877505", "text": "public function testUpdateInvite()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->put($this->url('invites/1'), [\n 'message' => 'Okay, do not come anymore'\n ]);\n\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "2a73a84c5d4f767d31236a80d84298a6", "score": "0.58694327", "text": "public function update(Request $request, $id)\n {\n //Check that current user isn't editing themselves\n if( Auth::user()->id == $id){\n return redirect()->route('admin.users.index')->with('warning', 'You are not allowed to edit yourself.');\n }\n $roleid = request('roles');\n if($roleid != '4')\n {\n $rolecount = User::whereHas('roles', function($q){$q->whereIn('roles.id', [request('roles')]);})->get()->count();\n if($rolecount>=1)\n {\n $roleuser = User::whereHas('roles', function($q){$q->whereIn('roles.id', [request('roles')]);})->get();\n $user = User::find($id);\n // $holder = $roleuser()->pluck('email');\n \n return redirect()->route('admin.users.index')->with('error', substr($roleuser->pluck('email'),2,-2).' already have this role'); \n }\n }\n $user = User::find($id);\n $user->roles()->sync($request->roles);\n \n\n\n return redirect()->route('admin.users.index')->with('success', $user->email.' has been updated.');\n \n }", "title": "" }, { "docid": "42b36ab517941337ae8511594f2acc0c", "score": "0.5849821", "text": "public function setInactive()\r\n {\r\n $res = 0;\r\n \r\n // update user status in user table\r\n $this -> isactive = 0;\r\n // save changes to DB\r\n $this -> save();\r\n $token = random_text(5);\r\n \r\n // Add user to user_pending table; \r\n \r\n //connect to db\r\n $db = DBConn::dbConnection(); \r\n if (!$db) {\r\n exit (\"Error: Unable to connect to database server\");\r\n }\r\n \r\n try {\r\n //insert user data to user_pending\r\n $st = $db->prepare(\"INSERT INTO usereg.user_pending\r\n (userid, token)\r\n VALUES (:userid, :token)\");\r\n \r\n $st->bindParam(':userid', $this->userid, PDO::PARAM_INT);\r\n $st->bindParam(':token', $token, PDO::PARAM_STR);\r\n \r\n $res = (int) $st->execute();\r\n }\r\n catch (Exception $e) {\r\n //log error\r\n logError($e);\r\n } \r\n return $res;\r\n }", "title": "" }, { "docid": "3e287477249a1500c91c59c718ac0e8d", "score": "0.57671756", "text": "public function testUpdateInviteWithCreatedUser()\n {\n\n $response = $this->loginAs($this->createUser([ 'email' => '[email protected]' ]))\n ->put($this->url('invites/1'), [\n 'message' => 'Okay, do not come anymore'\n ]);\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "648d206ed59d7de0a61fb623fed8e11d", "score": "0.5763553", "text": "public static function assignRoleToUser($user_id,$role_id);", "title": "" }, { "docid": "7b6f3e94df933df70f844569fb103951", "score": "0.57220244", "text": "private static function update($trip_user_id, $role) {\n\n\t\t$data = array(\"user_role\" => $role);\n\t\treturn Database::obtain()->update(\"trip_users\", $data, \"trip_user_id = $trip_user_id\");\n\t}", "title": "" }, { "docid": "c312540e7e266882c9a62fc7fa5f99ab", "score": "0.5714364", "text": "function update_invitation_status($fbId) {\n\t$check_for_invited_friends = Zzinvitefriends::model()->findByAttributes(array('fbid'=>$fbId,'zzinvitefriends_status'=>'invited'));\n\tif(isset($check_for_invited_friends)) {\n\t\t$check_for_invited_friends->zzinvitefriends_status = 'accepted';\n\t\t$check_for_invited_friends->save();\n\t}\n}", "title": "" }, { "docid": "49dc1cb397dfddc7c24a100826267d1a", "score": "0.5695247", "text": "public function update_user($id)\n {\n $user = User::findOrFail($id);\n $newRole = 0;\n $name = '';\n if($user->role->id == 1){\n $newRole = 2;\n $name = 'Admin';\n }else{\n $newRole = 1;\n $name = 'Customer';\n }\n $user->update(['role_id' => $newRole]);\n return redirect('dashboard')->withSuccess('User Role Updated to '.$name.' Successfully');\n }", "title": "" }, { "docid": "f17600576d83e40173768e5eb5b2df77", "score": "0.5683695", "text": "public static function _bulkUserRoleEdit() {\n\t\tif ( ! empty( $_GET[ stripslashes( __CLASS__ ) . '-nonce' ] ) && wp_verify_nonce(\n\t\t\t\tfilter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-nonce', FILTER_SANITIZE_STRING ),\n\t\t\t\t__FILE__ . get_current_user_id() . __CLASS__\n\t\t\t)\n\t\t) {\n\t\t\t$addRole = filter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-add-role', FILTER_SANITIZE_STRING );\n\t\t\t$removeRole = filter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-remove-role', FILTER_SANITIZE_STRING );\n\t\t\t$userIds = array_map( 'absint', (array) filter_input( INPUT_GET, 'users', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ) );\n\n\t\t\tif ( ! empty( $userIds ) && ( ! empty( $addRole ) || ! empty( $removeRole ) ) ) {\n\t\t\t\t// Loop through all selected users and verify current user can edit them.\n\t\t\t\tforeach ( $userIds as $userId ) {\n\t\t\t\t\t// Verify user has permission to promote the user\n\t\t\t\t\tif ( ! current_user_can( 'promote_user', $userId ) ) {\n\t\t\t\t\t\twp_die( sprintf(\n\t\t\t\t\t\t/* Translator note: %d is the user ID that cannot be edited. */\n\t\t\t\t\t\t\tesc_html__( 'You can\\'t edit user with ID %d', 'dfwood-wp-multiple-roles' ),\n\t\t\t\t\t\t\t$userId\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the user doesn't already belong to the blog, bail.\n\t\t\t\t\tif ( is_multisite() && ! is_user_member_of_blog( $userId ) ) {\n\t\t\t\t\t\twp_die(\n\t\t\t\t\t\t\t'<h1>' . esc_html__( 'Cheatin&#8217; uh?', 'dfwood-wp-multiple-roles' ) . '</h1>' .\n\t\t\t\t\t\t\t'<p>' . esc_html__( 'One of the selected users is not a member of this site.', 'dfwood-wp-multiple-roles' ) . '</p>',\n\t\t\t\t\t\t\t403\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Verify the user isn't trying to promote themselves, prevents accidental loss of privileges.\n\t\t\t\t\tif ( get_current_user_id() === $userId ) {\n\t\t\t\t\t\twp_die( esc_html__( 'You are not allowed to edit your own user role(s)!', 'dfwood-wp-multiple-roles' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we make it here, then there are no known issues adding/removing requested roles.\n\t\t\t\t// We are doing a second loop to avoid updating any users if we can't update all of them.\n\t\t\t\tforeach ( $userIds as $userId ) {\n\t\t\t\t\t$user = get_userdata( $userId );\n\n\t\t\t\t\tif ( ! empty( $addRole ) ) {\n\t\t\t\t\t\t$user->add_role( $addRole );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $removeRole ) ) {\n\t\t\t\t\t\t$user->remove_role( $removeRole );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Go back to the users page, ensure our GET args are cleared out and show confirmation message.\n\t\t\t\twp_safe_redirect( add_query_arg( 'update', 'promote', admin_url( 'users.php' ) ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bfdbb7d4da8ec93d713bfee9cec36f21", "score": "0.5609883", "text": "public function update_user_role()\n {\n $id = $this->input->post('role_id');\n $user_role = $this->input->post('user_type');\n $permissions = $this->input->post('permissions');\n $permissions = implode(',', $permissions);\n $data = array(\n 'user_role' => $user_role,\n 'user_permissions' => $permissions\n );\n $this->User_model->update_user_role($id, $data);\n $this->session->set_flashdata('SUCCESSMSG', 'Update Successfully');\n redirect('userrights/userrights_edit/' . $id);\n }", "title": "" }, { "docid": "fde39209dee7b4dec516558cb14699f4", "score": "0.5581901", "text": "public function change_status(Request $request, $id)\n {\n try{\n $rules = [\n 'approval_status' => 'required'\n ];\n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n return back()\n ->withInput()\n ->withErrors($validator);\n }\n $User = User::find(base64_decode($id));\n $User->name = $request->name;\n $User->email = $request->email;\n $User->phone = $request->phone;\n $User->approval_status = $request->approval_status;\n // generate ticket id\n if ($User->ticket_id == '') {\n $this->ticket_id = $this->generateTicketId();\n $User->ticket_id = $this->ticket_id;\n }\n $User->save();\n if($User){\n flash()->success('User data updated successfully');\n return redirect()->action('UserController@index', ['role'=> 'all']);\n }\n }\n catch(\\ErrorException$ex){\n flash()->error($ex->getMessage());\n return redirect()->action('UserController@index', ['role' => 'all']);\n }\n }", "title": "" }, { "docid": "fc3ec7adbcae185f15b7894f2bb1ba60", "score": "0.5581347", "text": "function changeRole(){\n \n global $REQUEST;\n \n //check if anybody is logged in\n if(!isset($_SESSION['isLogged']) || $_SESSION['isLogged'] === false ) {\n return array(\"success\"=>false,\"message\"=>\"Nobody is Logged In\");\n }\n \n //check if logged user on server is the same as logged user in coockies\n if(!isset($REQUEST['id'],$_SESSION['userId'],$_SESSION['role']) || empty($REQUEST['id']) || \n empty($_SESSION['userId']) || $REQUEST['id'] !== $_SESSION['userId'] ){\n return array(\"success\"=>false,\"message\"=>\"Logged User cannot be determined!\");\n }\n \n //check if logged user is admin\n if($_SESSION['role'] !== 'admin'){\n return array(\"success\"=>false,\"message\"=>\"Only admin can change roles!\");\n }\n \n //check if all required fields was provided from UI\n if(!isset($REQUEST['targetUserId'],$REQUEST['role']) || empty($REQUEST['targetUserId']) || empty($REQUEST['role'])){\n return array(\"success\"=>false,\"message\"=>\"Missing required fileds!\");\n }\n \n //check new role\n if($REQUEST['role'] !== 'admin' && $REQUEST['role'] !== 'user' ){\n return array(\"success\"=>false,\"message\"=>\"New role is not valid!\");\n }\n \n $REQUEST['last_modified'] = $this->currentDate; //create last-modified field and assign current date to it\n $dbResult = $this->userModel->updateRole($REQUEST); //call update role method which provides access to DB\n \n //process DB response\n if($dbResult['rowsAffected'] == 1){\n return array(\"success\"=>true,\"message\"=>\"Role changed successfully!\");\n }else if($dbResult['rowsAffected'] == 0){\n return array(\"success\"=>false,\"message\"=>\"Role could not be changed!\",\"error\"=>$dbResult['error']);\n }else{\n return array(\"success\"=>false,\"message\"=>\"Something bad happend.Probably more than 1 Role changed!\");\n }\n \n }", "title": "" }, { "docid": "e0091e86d951975d2e97ee7c1772803c", "score": "0.55784434", "text": "public function updateRole(Request $request, $id)\n {\n $input = $request->all();\n $user = User::findOrFail($id);\n if (isset($input['isAdmin'])){\n $user->role = 1;\n }else{\n $user->role = 0;\n }\n $user->save();\n if ($user){\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "38f6eacdbfea62c1d2a315d3de1e4b70", "score": "0.55687565", "text": "public function inviteUser()\n\t{\n\t\t$input = Input::All();\n\n\t\t$userTo = User::where('email', '=', $input['email'])->first();\n\n\t\tif(!empty($userTo)){\n\t\t\t$emailOwner = new User;\n\t\t\t$emailOwner = $emailOwner->getUserFullname($userTo->id);\n\n\t\t\t$lang_resource = Lang::get('notifications.sendInvitationEmailExists.danger', array('name' => $emailOwner) );\n\t\t\t$notification['red'] = $lang_resource;\n\t\t\treturn Redirect::route('user.create')->with('notification', $notification);\n\t\t}\n\n\t\t$data['email'] = $input['email'];\n\t\t$data['subject'] = \"You we're invited to join CartCMS!\";\n\n\t\t$user = Auth::user();\n\t\t$rankName = $user->getRankName($input['rank']);\n\n\n\t\tif($input['email'] != ''){\n\t\t\t$message['email'] = $data['email'];\n\t\t\t$message['welcome'] = \"tiganiii\";\n\t\t\t$message['rank'] = $rankName;\n\t\t\t$message['token'] = str_random(40);\n\t\t\tMail::send('emails.welcome', $message, function($message) use ($data)\n\t\t\t{\n\t\t\t $message->to($data['email'])->subject($data['subject']);\n\t\t\t});\n\n\t\t\t$PendingUser = new PendingUser;\n\t\t\t$PendingUser->email = $data['email'];\n\t\t\t$PendingUser->register_token = $message['token'];\n\t\t\t$PendingUser->account_rank = $input['rank'];\n\t\t\t$PendingUser->creator_user_id = Auth::user()->id;\n\t\t\t$PendingUser->save();\n\n\t\t\t$lang_resource = Lang::get('notifications.sendInvitation.success', array('name' => Auth::user()->first_name, 'email' => $input['email'], 'rank' => $rankName) );\n\t\t\t$notification['green'] = $lang_resource;\n\t\t\treturn Redirect::route('user.create')->with('notification', $notification);\n\t\t}\n\n\t\t$lang_resource = Lang::get('notifications.sendInvitation.danger', array('name' => Auth::user()->first_name) );\n\t\t$notification['red'] = $lang_resource;\n\t\treturn Redirect::route('user.create')->with('notification', $notification);\n\t}", "title": "" }, { "docid": "56dd73bee834f3f4a8c704d2ef1b337d", "score": "0.55209404", "text": "public function update($id)\n\t{\n\t\ttry\n\t\t{\n\n\t\t\t$rows = DB::table('invitations')->where('token_id', $id)->get();\n\t\t\t\n\t\t\t/*Insert user*/\n\t\t\t$user = new User;\n\t\t\t$pass = str_random(7);\n\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$user->email \t= $row->email;\n\t\t\t\t$user->password = Hash::make($pass);\n\t\t\t\t$user->status \t= 1;\n\t\t\t\t$user->role_id = $row->role_id;\n\n\t\t\t\t//$validator = Validator::make($row, User::$rules_token);\n\n\t\t\t\t//if ($validator->fails()) \n\t\t\t\t\t\n\t\t\t\t//\treturn Redirect::to('/')->with('notice', 'Error, correo electrónico existente.');//throw new Exception($validator->messages());\n\t\t\t\t\n\t\t\t\t//else \n\n\t\t\t\t\t$user->save();\n\t\t\t}\n\t\t\t/*End insert user*/\n\t\t} \n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t//return Redirect::to('/')->with('notice', 'Error, correo electrónico existente.');\n\t\t\tLog::error($ex->getMessage());\n\t\t}\n\t\t\n\t\treturn Redirect::to('/')->with('notice', 'Tu contraseña es: '.$pass);\n\t}", "title": "" }, { "docid": "4def03ecd07ce6caa831b31d8ba8c7d7", "score": "0.5506064", "text": "public function editUser(Request $request) {\n $user = User::where('user_token', $request->token)->first();\n\n $user->fill($request->all());\n\n // Check if company was provided.\n if($request->company_id) {\n if($request->company_id > 0) {\n $user->role = 2;\n $user->company_id = $request->company_id;\n $user->status = 2;\t// No resume for Recruiter\n }\n else {\n $user->role = 1;\n $user->company_id = NULL;\n }\n }\n else if($request->resume && $user->company_id == NULL) {\n \t$user->status = 0;\n }\n try {\n $user->save();\n return Response::json([\n \"status\" => \"OK\",\n \"response\" => \"User data updated.\",\n \"message\" => $user\n ], 200);\n }\n catch(QueryException $e) {\n return Response::json([\n \"status\" => \"OK\",\n \"response\" => \"Update failed.\",\n \"message\" => \"An account under this email address has already been created.\"\n ], 400);\n }\n }", "title": "" }, { "docid": "a33b2902a277da80066b3af69c858659", "score": "0.550599", "text": "public function updateRoles()\n\t{\n\t\t$this->db->select(\"userroles.*\");\n\t\t$this->db->from(\"userroles\");\n\t\t$this->db->where(\"userroles.userID=\",$this->userID);\n\t\t$roles = $this->db->get();\n\t\t\n\t\tif($roles->num_rows())\n\t\t{\n\t\t\tforeach($roles->result() as $role) {\n\t\t\t\t$this->userrole_model->id = $role->id;\n\t\t\t\t$this->userrole_model->deleteRecord();\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->saveRoles();\n\t}", "title": "" }, { "docid": "623da4061af39cabf4d8296ad5f77a22", "score": "0.5490646", "text": "public function changeRole($data)\n {\n try {\n if (isset($data['iduser']) && ctype_digit((string)$data['iduser'])) {\n $query = '\n UPDATE\n ad_users\n SET\n idrole=?\n WHERE\n iduser = ?;\n ';\n $this->_db->executeQuery($query, array($data['idrole'], $data['iduser']));\n } else {\n $query = '\n INSERT INTO\n `ad_users` (`idrole`)\n VALUES (?);\n ';\n $this->_db\n ->executeQuery(\n $query,\n array(\n $data['idrole'])\n );\n\n }\n } catch (Exception $e) {\n echo 'Caught exception: ' . $e->getMessage() . \"\\n\";\n }\n }", "title": "" }, { "docid": "07c1ff64ac51f55ece5a6ca7784cc5ea", "score": "0.54615587", "text": "public function updateProcess(Request $request, $id) {\n try {\n if (!Sentinel::hasAccess('users.roles')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n// dd($request->permission);\n $role = Sentinel::findRoleById($id);\n $role->name = $request->name;\n $role->slug = str_slug($request->name, '');\n $role->permissions = array();\n $role->save();\n //remove permissions which have not been ticked\n //create and/or update permissions\n if (!empty($request->permission)) {\n foreach ($request->permission as $key) {\n $role->updatePermission($key, true, true)->save();\n }\n }\n\n\n Flash::success(\"Role Successfully Saved\");\n return redirect('admin/users/roles');\n } catch (Exception $ex) {\n Flash::warning($ex->getMessage());\n return redirect()->back()->withInput();\n }\n }", "title": "" }, { "docid": "0285f4ed0e7ec38182830ce1503d0705", "score": "0.545986", "text": "function update_role($role, $user, $job, $kwds) {\n $role = mysqli_real_escape_string($this->connection, $role); \n $user = mysqli_real_escape_string($this->connection, $user); \n $job = mysqli_real_escape_string($this->connection, $job); \n $kwds = mysqli_real_escape_string($this->connection, $kwds); \n return $this->query(\"UPDATE role SET user_id='$user', job_id='$job', kwds_id='$kwds' WHERE role_id='$role'\");\n }", "title": "" }, { "docid": "48d0291cd2ed26e95032b75971b3ad6c", "score": "0.5459682", "text": "public function AjaxRole(Request $requests){\n\n $user = User::Where('id', $requests->id)->update(\n [\n \n \"user_role\" => $request->user_roles\n ]\n );\n\n }", "title": "" }, { "docid": "21a377f20421e9c634be16f058432341", "score": "0.5456974", "text": "public function update(Request $request, $id)\n {\n $role = Role::find($id);\n foreach ($role->users as $user) {\n if($user->id>1)\n $user->roles()->detach($id);\n }\n $inputs = $request->all();\n if(isset($inputs[\"users\"])) {\n foreach ($inputs[\"users\"] as $user_id) {\n $user = User::find($user_id);\n $user->roles()->attach($id);\n }\n }\n return back()->with(\"success\",\"Permissions Successfully Updated\");\n }", "title": "" }, { "docid": "7d1eed546b3b1a2a2092eec7c56473c9", "score": "0.545286", "text": "public function update(Request $request)\n {\n $user_id = $request['id'];\n $role = $request['role'];\n\n DB::table('role_user')\n ->where('user_id', $user_id)\n ->update(['role_id' => $role]);\n return redirect('role')->with(['success'=> 'User role update successfully.']);\n // return Response::json(array('success' => 1,'message'=>'User role update successfully.','data' => []));\n }", "title": "" }, { "docid": "c4219db8dbb1603fdd7d041aa002fc48", "score": "0.54483604", "text": "public function editStatusUser()\n {\n $user_id = $_GET['id'];\n $status = $_POST['statusUser'];\n $this->model->changeStatus($user_id, $status);\n\n // Redirect to the users page\n Router::redirectTo('listUsers');\n exit();\n }", "title": "" }, { "docid": "da433f1eeecb0ba3d43ceb69265dd6a5", "score": "0.5445881", "text": "public function changeRole($project_id, $user_id, $is_owner)\n {\n return $this->db\n ->table(self::TABLE)\n ->eq('project_id', $project_id)\n ->eq('user_id', $user_id)\n ->update(array('is_owner' => (int) $is_owner));\n }", "title": "" }, { "docid": "a733cda6d98d491c80fd7f356df5a5de", "score": "0.5435226", "text": "public function update(Request $request,$id)\n {\n $title \t\t\t = \tarray('pageTitle' => 'Edit User');\n if(isset($_POST['submit'])){\n $this->validate($request,[\n 'entity'=>'required',\n 'company'=>'required',\n 'turnover'=>'required',\n 'name'=>'required',\n 'email'=>'required', \n 'mobile'=>'required', \n ]); \n \n $password=CommonFunction::createPassword(6);\n $data=array(\n 'entity'=>$request->entity,\n 'company'=>$request->company,\n 'turnover'=>$request->turnover,\n 'name'=>$request->name,\n 'email'=>$request->email,\n 'mobile'=>$request->mobile,\n // 'password'=>Hash::make($password),\n // 'password_val'=>$password ,\n // 'otp'=>rand(1001,9999),\n 'brand'=>$request->brand,\n 'website'=>$request->website,\n 'insta'=>$request->insta,\n 'user_ip'=>$request->user_ip,\n // 'created_at' =>date('Y-m-d H:i:s'),\n );\n $update=User::where('id',$id)->update($data);\n\n $roleExist=DB::table('user_role')->select('*')->where('user_id',$id)->first();\n if(empty($roleExist)){\n DB::table('user_role')->insert(['user_id'=>$id,'role_id'=>$request->role_id]);\n }else{\n DB::table('user_role')->where('user_roleId',$roleExist->user_roleId)->update(['role_id'=>$request->role_id]);\n }\n if($update){\n return redirect('admin/users')->with('message','User Updated Successfully');\n }else{\n return redirect()->back()->with('message','Something went wrong');\n } \n }else{\n $users = User::select('users.*','user_role.role_id')->join('user_role','user_role.user_id','=','users.id')->where('users.id',$id)->first();\n return view('admin.user.edit',$title,compact('users','id'));\n } \n }", "title": "" }, { "docid": "3b8f6a964f0e9a7f11365555ff34a6cf", "score": "0.5434069", "text": "function updateById($rqid, $act){\r\n $act = $act == 'accept' ? 1 : -1;\r\n\r\n $this->db->where('id', $rqid);\r\n $this->db->set('approve', $act);\r\n $this->db->update('requests');\r\n\r\n //insert the recode to accounts table\r\n if( $act == 1 ){//act == 1, -1 : Accept, Reject\r\n\r\n $row = $this->getRequestById($rqid);\r\n\r\n $data = [\r\n 'firstname' =>$row['firstname'], \r\n 'lastname' =>$row['lastname'], \r\n 'email' =>$row['email'], \r\n 'password' => $row['password'], \r\n 'confirmpassword' => $row['confirmpassword'], \r\n 'postalcode' => $row['postalcode'], \r\n 'file_upload' => $row['file_upload'],\r\n 'file_ok' => $row['file_ok'],\r\n 'type' => $row['type'], \r\n 'link' => $row['link'], \r\n 'info' => $row['info'],\r\n 'role' => $row['role'],\r\n 'type' => $row['type'],\r\n 'rid' => $row['id'],\r\n 'pay_plan' => $row['pay_plan'],\r\n ];\r\n\r\n $this->db->insert('accounts', $data);\r\n }\r\n\r\n //remove the requests row\r\n // $this->db->where('id', $rqid);\r\n // $this->db->delete('requests');\r\n\r\n return $this->findAll();\r\n }", "title": "" }, { "docid": "9b9acfa4908ef3412ce058425ebe9eb6", "score": "0.5423873", "text": "function update_loggedin_user_status($fbId,$email) {\n\t// marking the status as active and updating his email address if the user in presend in database \n\t$check_for_user_existence = Zzuser::model()->findByAttributes(array('user_fbid'=>$fbId,'zzuser_status'=>'invited'));\n\tif(isset($check_for_user_existence)) {\n\t\t$check_for_user_existence->user_email = $email;\n\t\t$check_for_user_existence->user_handle = $email;\n\t\t$check_for_user_existence->zzuser_status = 'active';\n\t\t$check_for_user_existence->save();\n\t}\n}", "title": "" }, { "docid": "65c1e3b917c0e19ec1c3414612d97a63", "score": "0.54117054", "text": "public function edit($userId){\n\n $loungeUser = $this->LoungeUser->find('first', array(\n 'contain' => array(\n 'User'\n ),\n 'conditions' => array(\n 'LoungeUser.user_id' => $userId\n )\n ));\n\n if(empty($loungeUser)){\n $this->_setFlash('This user does not exist or is not a member of this lounge');\n $this->redirect('/people');\n }\n\n $this->set(array(\n 'loungeUser' => $loungeUser,\n 'roles' => LoungeUser::$roles,\n 'relationships' => LoungeUser::$relationships\n ));\n \n if($this->request->is('put')){\n \n $this->LoungeUser->id = $loungeUser['LoungeUser']['id'];\n $result = $this->LoungeUser->save(\n $this->request->data,\n true,\n array(\n 'user_relationship',\n 'user_role'\n )\n );\n\n if($result){\n $this->_setFlash('User membership updated', 'success');\n $this->redirect('/people');\n }\n else {\n $this->setFlash($this->LoungeUser->validationErrorsAsString());\n }\n }\n else {\n $this->request->data = $loungeUser;\n }\n }", "title": "" }, { "docid": "fcc990ee04cd39b07d6066191b9d480a", "score": "0.54073805", "text": "public function update($user_id, Request $request) {\n $this->validate($request, ['countries' => 'required', 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required|email', 'password' => 'required|min:7', 'retype_password' => 'required|min:7|same:password',\n\n ]);\n\n list($role, $roleName) = explode('-', $request->roll);\n\n $roleID = \\Config::get('constants.' . strtoupper($roleName));\n\n $user = User::where('email', '=', $request->email)->where('id', '<>', $user_id)->first();\n\n if($request->password != $request->retype_password) {\n return Redirect::back()->withErrors('New password and conformed password does not match');\n }\n if($user === NULL) {\n\n $user = User::where('id', $user_id)->first();\n $user->first_name = $request->first_name;\n $user->last_name = $request->last_name;\n $user->email = $request->email;\n $user->country = $request->countries;\n if(!empty($request->get('password'))) {\n $user->password = bcrypt($request->password);\n }\n $user->user_type = $roleID;\n $user->username = $request->first_name . ' ' . $request->last_name;\n $user->display_name = $request->first_name . ' ' . $request->last_name;\n $user->save();\n $user = User::find($user->id);\n $user->roles()->sync([$role]);\n $settingRepo = new SettingsRepository();\n $settingRepo->updateUserPermissaions($user, $request->permissions);\n return redirect()->route('admin.users');\n } else {\n \\Session::flash('errorMessage', 'This email already exist try another one..');\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "4acbc4b1e9af916a5929dce3d0d6082f", "score": "0.53802425", "text": "public function update(Request $request, $id=\"\")\n {\n //\n $input = $request->all();\n $validator = Validator::make($input, [\n 'firstname' =>'required',\n 'lastname' =>'required',\n 'email' => 'required',\n 'username' => 'required'\n ]);\n if ($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput();\n }\n\n $user = !empty($id) ? \\Toddish\\Verify\\Models\\User::find($input['id']) : $id;\n $role =\\Toddish\\Verify\\Models\\Role::find($input['role_id']);\n\n $user->firstname = $input['firstname'];\n $user->lastname = $input['lastname'];\n $user->phone = $input['phone'];\n $user->username = $input['username'];\n $user->email = $input['email'];\n $user->verified = $input['verified'];\n $user->disabled = $input['disabled'];\n\n // $user->created_by_id = \\Auth::user()->id;\n //$user->created_by = \\Auth::user()->firstname .\" \".\\Auth::user()->lastname;\n try{\n if($user->update()){\n\n $user->roles()->sync([$role->id]);\n\n /* \\DB::table('dblogs')->insert(\n ['user_id' => \\Auth::user()->id, 'post_id' => $user->id,\"description\"=>\"A new user has been committed to data store\",\"action\"=>\"New user created awaits approval action\",\n \"post_type\"=>\"user\",\"operator\"=>\\Auth::user()->firstname .\" \". \\Auth::user()->lastname,\"created_at\"=>date('Y-m-d H:i:s')]\n );*/\n \\Session::flash(\"success_message\",\"New User Record Updated Successfully\");\n return \\Redirect::back();\n }\n }catch(\\Illuminate\\Database\\QueryException $e){\n \\Session::flash(\"error_message\",$e->getMessage());\n return \\Redirect::back();\n }catch(\\PDOException $e){\n \\Session::flash(\"error_message\",$e->getMessage());\n return \\Redirect::back();\n }catch(\\Exception $e){\n \\Session::flash(\"error_message\",$e->getMessage());\n return \\Redirect::back();\n }\n //}\n }", "title": "" }, { "docid": "8379b80c9c43b2ca8c19182b550da4fc", "score": "0.5379411", "text": "public function update(Request $request, User $user)\n {\n $configUser = config('appAdditional.users');\n $userTypes = $configUser['roles'];\n $userTypes = array_filter($userTypes, function ($item) {\n return !(boolean)$item['noEdit'];\n });\n\n if ($request->filled('role')) {\n $requestRole = (int) $request->input('role');\n if (array_search($requestRole, array_column($userTypes, 'key'), true) === false) {\n return redirect()->back()->withErrors(['Invalid role']);\n }\n //validation\n\n $commission = $request->input('commission');\n\n if (!is_numeric($commission)) {\n return redirect()->back()->withErrors(['Invalid commission']);\n }\n\n if ($commission < 0 or $commission > 100) {\n return redirect()->back()->withErrors(['Invalid commission']);\n }\n\n if ($request->input('role') == 0) {\n $commission = 0;\n }\n\n if ($request->input('confirmation_required') == 1) {\n $user->confirmation_required = 1;\n } else {\n $user->confirmation_required = 0;\n }\n\n //email confirm\n $emailConfirmed = ($request->filled('email_confirmed')) ? 1 : 0;\n $user->email_confirmed = $emailConfirmed;\n\n $user->commission = $commission;\n $user->role = $request->input('role');\n\n $user->save();\n if ($user->role == 1 or $user->role == 3) {\n $this->setAgentKoef($user, $commission);\n }\n\n //block user\n $block = ($request->filled('block')) ? 1 : 0;\n $blockUser = ModernExtraUsers::where('user_id', $user->id)\n ->where('code', 'block')->first();\n //might use update or create but i use this way\n if (is_null($blockUser)) {\n ModernExtraUsers::create([\n 'user_id' => $user->id,\n 'code' => 'block',\n 'value' => $block,\n ]);\n $oldStatus = 'open';\n } else {\n ModernExtraUsers::where('user_id', $user->id)\n ->where('code', 'block')->update([\n 'value' => $block,\n ]);\n }\n\n $oldStatus = $block ? 'open' : 'block';\n $newStatus = $block ? 'block' : 'open';\n\n event(new AccountStatusEvent($user, $oldStatus, $newStatus));\n\n if ($block === 1) {\n //to do necessary update this code for all drivers etc\n //to do middleware where mark active\n DB::table('sessions')\n ->where('user_id', $user->id)\n ->delete();\n }\n }\n\n return redirect()->back()->with('msg', 'User was updated!');\n }", "title": "" }, { "docid": "dd6321699dc867b2e6f473b79fa06cb5", "score": "0.5378786", "text": "function um_set_requested_user( $user_id ) {\r\n\tUM()->user()->target_id = $user_id;\r\n}", "title": "" }, { "docid": "9ad4fd2791749ecc799c2d2a2c8711e4", "score": "0.53704876", "text": "public function updateMembers(Request $request){\n $role = new Hashids();\n $id = $role->decode($request->role)[0];\n $role = Role::findOrFail($id);\n $role->users()->sync($request->users);\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "60263084e434f8a19af7d26beb259d04", "score": "0.53597695", "text": "public function update(Request $request)\n {\n //assign user role\n $assignUserRole=Profile::findOrFail($request->id);\n $assignUserRole->role_id = $request->roleId;\n $assignUserRole->updated_at = date('Y-m-d H:i:s'); \n $assignUserRole->save();\n \n return $assignUserRole;\n }", "title": "" }, { "docid": "e19716374d1f3510540796bab7865253", "score": "0.53540814", "text": "public function updateRole($id, Request $request)\r\n {\r\n if(\\Auth::user()->can('user.admin')){\r\n /* Check role deleted befor update */\r\n $roleIds = $request->get('roleIds', []);\r\n $countRole = RoleModel::whereIn('id', $roleIds)->count();\r\n if($countRole != count($roleIds)) {\r\n return new JsonResponse(['status' => 0, 'message' => 'One of roles is deleted']);\r\n }\r\n\r\n /* Check has user */\r\n $user = UserModel::find($id);\r\n if(empty($user)){\r\n abort('User not found');\r\n }\r\n\r\n /* Update role of user */\r\n $status = $user->roles()->sync($roleIds);\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "9b8b2a892e1a9dacdf6b8055c456e024", "score": "0.5353565", "text": "public function update(Request $request,$id)\n {\n\n\n // dd($request);\n // =====================\n $role = User::find($id);\n $role->name=$request->input('name');\n $role->email=$request->input('email');\n $role->password=$request->input('password');\n $role->save();\n $role->roles()->sync($request->roles);\n \n return redirect('admin/ruler')->with('success', 'users created successfully');\n }", "title": "" }, { "docid": "0cd441f96a531e23f314ad229269b45f", "score": "0.5350723", "text": "public function updateMembers(Request $request, $id)\n {\n // and then change users role to employee\n if ($request -> has('members')) {\n $users=User::find($request->members);\n $project->users()->attach($users);\n\n // save the new role in Data base (and the role for employee is 2 )\n foreach ($users as $user) {\n $user -> role_id = 2;\n $user -> save();\n }\n }\n }", "title": "" }, { "docid": "9733fb59180a8830dc6bb32bbcec3fb9", "score": "0.5349002", "text": "public function update(\\App\\Http\\Requests\\RoleUser $request)\n {\n // create when not exists\n $user_id = request('user_id');\n RoleUser::updateOrCreate(['user_id' => $user_id], $request->except(['_token', 'name']));\n return redirect('RoleUser/index');\n }", "title": "" }, { "docid": "8ac81e4d2530ac25cf6539a586bcc019", "score": "0.5344523", "text": "public function update(Request $request, $id) {\n $data = $request->all();\n $rules = array(\n 'role_name' => 'required|unique:tbl_role,role_name,' . $id . ',id,app_id,' . $data['client'],\n 'role_privilage' => 'required',\n 'status' => 'required',\n );\n $validator = Validator::make($data, $rules);\n\n // process the login\n if ($validator->fails()) {\n return redirect('admin/role/' . $id . '/edit')->withErrors($validator)->withInput();\n } else {\n $role = Role::findOrFail($id);\n $role->role_name = $data['role_name'];\n $role->status = $data['status'];\n $role->updated_by = Auth::user()->id;\n $role->save();\n\n $rolePrivileges = Role::getRolePrivilegesId($id);\n\n if ($data['role_privilage'] != $rolePrivileges) {\n /* Delete role privilege */\n DB::table('tbl_role_privilage')\n ->where('role_id', '=', $id)\n ->delete();\n foreach ($data['role_privilage'] as $key => $privilege) {\n /* Insert role privilege */\n $privilages[$key]['role_id'] = $id;\n $privilages[$key]['privilege_id'] = $privilege;\n $privilages[$key]['created_at'] = date('Y-m-d H:i:s');\n $privilages[$key]['created_by'] = Auth::user()->id;\n }\n DB::table('tbl_role_privilage')->insert($privilages);\n }\n // redirect\n $request->session()->flash('alert-success', 'Role successfully updated!');\n return redirect('admin/role');\n }\n }", "title": "" }, { "docid": "57ef5424e14305fe9edc73698a16bba1", "score": "0.5338919", "text": "public function set_role( $args, $assoc_args ) {\n\t\t$user = $this->get_user_id_from_identifier( $assoc_args['user-id'] );\n\n\t\t// Role fallback.\n\t\t$role = $assoc_args['role'];\n\t\tif ( ! in_array( $role, $this->forum_roles(), true ) ) {\n\t\t\t$role = 'participant';\n\t\t}\n\n\t\tif ( is_string( bbp_set_user_role( $user->ID, $role ) ) ) {\n\t\t\t\\WP_CLI::success( 'New role for user set successfully.' );\n\t\t} else {\n\t\t\t\\WP_CLI::error( 'Could not set new role for user.' );\n\t\t}\n\t}", "title": "" }, { "docid": "3f3d3f0259ee59d06b6dfebdbd4803ea", "score": "0.5317845", "text": "public function update(Request $request, $id) {\n\n $user = User::whereId($id)->first();\n if (empty($user)) {\n\n return redirect(route('admin.users.index'));\n }\n $array = $request->all();\n if(!empty($input['password'])){ \n $array['password'] = bcrypt($array['password']);\n }else{\n $array = array_except($array,array('password')); \n }\n unset($array['password_confirmation']);\n unset($array['_token']);\n unset($array['_method']);\n $user->update($array);\n DB::table('role_user')->where('user_id',$id)->delete();\n foreach ($request->input('roles') as $key => $value) {\n $user->attachRole($value);\n }\n\n return redirect()->route('admin.users.index')->with('success','User created successfully');\n }", "title": "" }, { "docid": "bd4136a98837e6e0e51c7fa075e05725", "score": "0.5283192", "text": "public function update($id)\n\t{\n\t\t$user = User::find($id);\n\t\t$role = Role::find(Input::get('role'));\n\t\t$user->name = Input::get('name');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = bcrypt(Input::get('password'));\n\t\t$user->roles()->detach();\n\t\t$user->roles()->attach($role);\n\t\t$user->save();\n\t\tSession::flash('success', 'User was successful updated!');\n\t\treturn redirect('admin/users');\n\t}", "title": "" }, { "docid": "f1387a6245dfb38ed988647d6a701868", "score": "0.527906", "text": "public function inActive($id, $data)\n {\n $user = $this->model()->findOrFail($id);\n \n $user->update([\n 'status' => config('blog.user.status.inactive'),\n 'block_reason' => $data,\n ]);\n }", "title": "" }, { "docid": "1ff9539e00cd57be1ac5b801d6c27210", "score": "0.52761984", "text": "public function update(Request $request, $id)\n {\n if (Gate::allows('isAdmin')) {\n $this->validate($request, [\n\n 'email' => 'required|email|unique:users,email,' . $id,\n 'contact_number' => 'required|numeric|unique:users,contact_number,' . $id,\n\n 'name' => 'required',\n 'active' => 'required',\n\n 'password' => 'required|string|min:6|confirmed',\n\n ]);\n $user = User::findOrfail($id);\n\n $user->email = $request->email;\n $user->name = $request->name;\n $user->contact_number = $request->contact_number;\n $user->password = Hash::make($request->password);\n\n $user->active = $request->active;\n\n $user->save();\n $user->roles()->detach();\n\n $roles = Role::whereIn('name', $request->role)->get();\n $user->roles()->attach($roles);\n $address = \"Please Insert Your Contact Address\";\n\n foreach ($user->roles()->get() as $role) {\n if ($role->name === 'teacher') {\n if (Teacher::where('userid', $user->id)->first() === null) {\n $user->addTeacher($user->id, $address);\n }\n }\n\n if ($role->name === 'doctor') {\n if (Doctor::where('userid', $user->id)->first() === null) {\n $user->addDoctor($user->id, $address);\n }\n }\n\n if ($role->name === 'parent') {\n if (ParentInfo::where('userid', $user->id)->first() === null) {\n $mothername = \"Insert Mother Name\";\n\n $user->addParent($user->id, $address, $mothername);\n }\n }\n }\n\n // if (!empty($user)) {\n // Mail::send('useremail', [\"data\" => $request], function ($message) use ($user) {\n // $message->to($user->email)->subject('Update Login Info');\n // $message->from('[email protected]', 'Day Care Center');\n // });\n // }\n return $user;\n }\n }", "title": "" }, { "docid": "f7ac3be652d7f2028b76776a9d756a73", "score": "0.5269274", "text": "public function update(Request $request, $id)\n {\n $user = User::findOrFail($id);\n if ($user->role_id == 1) {\n return redirect('home');\n }\n $user->user_etat = !$user->user_etat;\n $user->save();\n if ($user->role_id == 2) {\n if ($casse_id = $user->casse_id) {\n $casse_users = User::where('casse_id', $casse_id)->where('user_id', '<>', $user->user_id)->update(['user_etat' => $user->user_etat]);\n }\n }\n if ($user->user_etat == true) {\n $status = \"unblocked\";\n } else {\n $status = \"blocked\";\n }\n return redirect(route('users.index'))->with('success', \"User Successfully $status\");\n }", "title": "" }, { "docid": "66e05fa83d58d629c793932fc02f2a2b", "score": "0.5267442", "text": "public function update(Request $request, User $user)\n {\n /* return $request->all(); */\n $role = Role::findOrFail($request->role_id); \n $old_role = Role::findOrFail($request->old_role_id);\n $user->name = $request->name;\n $user->email = $request->email; \n $user->save();\n $user->removeRole($old_role);\n $user->assignRole($role); \n return redirect()->route('admin.user.index');\n }", "title": "" }, { "docid": "c0d0f84097a01c9a792d9cf63d7a0ec1", "score": "0.52560306", "text": "public function user_role_bulk_change()\n {\n }", "title": "" }, { "docid": "3d28ee00d44c1d85515de7bd7f9c9e3f", "score": "0.5252852", "text": "public function update($id, Request $request) {\n $user = \\App\\User::find($id);\n // print_r($request->all()) ; die();\n $validation = Validator::make($request->all(), [\n 'username' => 'required|unique:users,username,'.$user->id,\n 'email' => 'required',\n ]);\n if ($validation->fails()) {\n return \\Redirect()->back()->withErrors($validation)->withInput();\n }\n\n $input = $request->all();\n\n \n\n if ($input['password']) {\n $input['password'] = bcrypt($input['password']);\n }else{\n $input['password'] = $user->password;\n }\n $user->fill($input)->save();\n\t\t\n if ($request->get('role_user')) {\n\t\t\t$user->detachRoles($user->roles);\n\t\t\t$user->roles()->attach($input['role_user']);\n }\n Session::flash('flash_message', 'User updated successfully!');\n // return redirect()->back();\n return redirect('user/member');\n }", "title": "" }, { "docid": "f98ac32babe46b2c5eae2d44cb5843fb", "score": "0.525282", "text": "function assignRole($role);", "title": "" }, { "docid": "1a81a3cba2a67cfa1202a61b3e30b103", "score": "0.52495605", "text": "public function update(Request $request, Permits $permiso)\n {\n\n $id = [$permiso->id]; \n \n $iduser = auth()->user()->id;\n $permitstatus=intval($request->permitstatus_id);\n\n $permiso = [$permitstatus , $iduser, $id[0]];\n\n\n DB::select('CALL updPermiso (?,?,?)',$permiso);\n\n\n return redirect()->route('permiso.index')->with('status_success','Permiso Actualizado Existosamente');\n \n }", "title": "" }, { "docid": "690a9a82f0fcdc75566c013ed7cf94da", "score": "0.5242096", "text": "public function update(Request $request, $id)\n {\n $result=array(\n \"status\" => 'ERROR',\n \"message\" => '',\n \"data\" => array()\n );\n\n $continueUpdate=true;\n $changeUser = User::find($id);\n if($changeUser->email != $request->input('email'))\n {\n $auxUser = User::whereRaw(\"UPPER(TRIM(email)) = UPPER(TRIM('\".$request->input('email').\"')) AND id<>\".$id);\n if($auxUser)\n {\n $continueUpdate=false;\n }\n }\n //the new email doesnt exists --> modify the user information\n if($continueUpdate)\n {\n $changeUser->email = $request->input('email');\n $changeUser->name = $request->input('name');\n if($request->input('password')!='12345678')\n {\n $changeUser->password = bcrypt($request->input('password'));\n }\n if(strlen($request->input('role_id'))>0)\n {\n $changeUser->role_id = $request->input('role_id');\n }\n $changeUser->save();\n\n Log::info('Customer updated by '.Auth::user()->name.' :: '.$changeUser);\n\n\n //check if permissions changed\n $new_permissions = $request->input('permissions');\n $old_permissions_temp = $changeUser->permissions;\n $old_permissions=[];\n foreach($old_permissions_temp as $permission)\n {\n array_push($old_permissions,$permission->id);\n }\n Log::info('new permission :: '.json_encode($new_permissions));\n Log::info('old permission :: '.json_encode($old_permissions));\n\n //delete removed permissions\n $to_delete = array_diff($old_permissions, $new_permissions);\n foreach($to_delete as $oneDelete)\n {\n DB::table('permission_user')\n ->where('user_id',$request->input('userId'))\n ->where('permission_id',$oneDelete)\n ->delete();\n }\n\n //add new permissions\n $to_add = array_diff($new_permissions, $old_permissions);\n foreach($to_add as $oneAdd)\n {\n DB::table('permission_user')->insert([\n 'user_id' => $request->input('userId'),\n 'permission_id' => $oneAdd\n ]);\n }\n\n $result['status'] = 'SUCCESS';\n $result['data']= $changeUser;\n }else{\n $result['status'] = 'ERROR';\n $result['message']= __('Email is already used');\n }\n\n return response($result, 200);\n }", "title": "" }, { "docid": "a886552c33a878bfd663bbe00e4a3086", "score": "0.5242082", "text": "public function update(Request $request, $id)\n {\n $user_r = User::find($id);\n $user_r->name = $request->get('name');\n $user_r->email = $request->get('email');\n $user_r->approved = $request->get('approved');\n $user_r->role_id = $request->get('role');\n\n $user_r->save();\n return redirect('userrights')->with('message', 'Done!');\n }", "title": "" }, { "docid": "3b1b742b5263cdcd0b4797b7c5b42721", "score": "0.52415997", "text": "public function update($id, Request $request)\n {\n \t$this->validate($request, ['name' => 'required', 'role' => 'required', 'offices' => 'required']);\n \t$data = $request->except('password');\n \ttry {\n $user = User::findOrFail($id);\n if(Auth::user()->profile->organization->id == $user->profile->organization->id){\n $user->update($data);\n $user->profile->active = $request->active;\n $user->profile->save();\n $user->roles()->detach();\n $user->offices()->detach();\n $user->assignRole($request->role);\n foreach ($request->offices as $office) {\n $user->addUserTo(Office::findOrFail($office));\n }\n Session::flash('alert-success', 'Actualizado con exito!');\n }\n else{\n return view('errors.404');\n }\n } \n catch (\\Illuminate\\Database\\QueryException $e) {\n Session::flash('alert-danger', 'Error al actualizar en la BD!');\n }\n return redirect('customer/users');\n}", "title": "" }, { "docid": "d6e61126a3ef55f041da0f6b781c2f91", "score": "0.5238266", "text": "public function update($id,Request $request){\n //TODO : check if role_id change to add to fcm corresponding group and remove from old \n try{\n $user = User::findOrFail($id);\n }\n catch(ModelNotFoundException $e){\n return JsonResponse::exception($e);\n }\n $user->fill($request->all());\n $user->save();\n return Controller::responseJson(200, \"L'utilisateur a bien été mis à jour\" , User::find($user->id));\n }", "title": "" }, { "docid": "bf704bdbc32b2a910c42727bbcfe55be", "score": "0.52377063", "text": "public function update(Request $request, $id)\n {\n try {\n\n if( Auth::user()->can('user-edit') ){\n\n $this->validate($request, [\n 'username' => 'required',\n 'email' => 'required|email|unique:users,email,'.$id,\n 'password' => 'same:password-confirm',\n 'firstname' => 'required',\n 'lastname' => 'required'\n ]);\n\n $input = $request->all();\n if(!empty($input['password'])){ \n $input['password'] = Hash::make($input['password']);\n }else{\n $input = array_except($input,array('password')); \n }\n\n $user = User::find($id);\n $user->update($input);\n DB::table('role_user')->where('user_id',$id)->delete();\n\n if($request->input('roles') != null ){\n foreach ($request->input('roles') as $key => $value) {\n $user->attachRole($value);\n } \n }\n\n return redirect()->route('user-management.index')\n ->with('success','User updated successfully');\n\n }else{\n return response()->json( array( 'code' => 403, 'message' => \"You don't have permission to execute this function\" ), 403 );\n }\n\n } catch (Exception $e) {\n return response()->json( array( 'code' => 500, 'message' => $e ), 500 );\n }\n \n }", "title": "" }, { "docid": "cf071ba248fef66aa4c1ee2743357d48", "score": "0.52372247", "text": "public function update_user() {\r\n \r\n }", "title": "" }, { "docid": "c915053f5a47e3126da34d9597b7e701", "score": "0.5234063", "text": "function approvePendingEvent($id){\n\t\t$arr=array(\n\t\t\t'active'\t=> 1,\n\t\t\t'pending'\t=> 0\n\t\t);\n\t\t$this->db->where('ID',$id);\n\t\t$this->db->update('events',$arr);\n\t}", "title": "" }, { "docid": "1ef19ad9ae172055273f59b2ffdf19d7", "score": "0.5233059", "text": "public function updated(RoleUser $roleUser)\n {\n dd(\"Updated\");\n }", "title": "" }, { "docid": "255527059d0c937028221c46bc94db55", "score": "0.52289826", "text": "public function inviteMember($userId, $originatorUserId)\n {\n\n $membership = $this->getMembership($userId);\n\n if ($membership != null) {\n\n // User is already member\n if ($membership->status == RoomMembership::STATUS_MEMBER) {\n return;\n }\n\n // User requested already membership, just approve him\n if ($membership->status == RoomMembership::STATUS_APPLICANT) {\n $membership->addMember(Yii::app()->user->id);\n return;\n }\n\n // Already invite, reinvite him\n if ($membership->status == RoomMembership::STATUS_INVITED) {\n // Remove existing notification\n RoomInviteNotification::remove($userId, $this->getOwner());\n }\n } else {\n $membership = new RoomMembership;\n }\n\n\n $membership->room_id = $this->getOwner()->id;\n $membership->user_id = $userId;\n $membership->originator_user_id = $originatorUserId;\n\n $membership->status = RoomMembership::STATUS_INVITED;\n $membership->invite_role = 0;\n $membership->admin_role = 0;\n $membership->share_role = 0;\n\n $membership->save();\n\n RoomInviteNotification::fire($originatorUserId, $userId, $this->getOwner());\n }", "title": "" }, { "docid": "d0d0688e6688f515cecbd97b275117d1", "score": "0.522307", "text": "public function edit_user($id)\n {\n Session::put('url.intended', URL::previous());\n\n $pageTitle = 'Edit User Information';\n $data = User::where('id',$id)->first();\n $user_role = Role::where('id', $data->role_id)->first();\n\n $roles = Role::where('title', '!=', 'super-admin')->get(['id', 'title'])->toArray();\n\n $role_user = RoleUser::where('users_id',$data->id)->first();\n\n //set data\n $action_name = 'Edit user ';\n $action_url = 'user/edit/{id}';\n $action_detail = @\\Auth::user()->username.' '. 'Edit user :: '.@$id;\n $action_table = 'users';\n //store into user_activity table\n #ActivityLogs::set_users_activity($action_name, $action_url, $action_detail, $action_table , $this->current_market_place->id, $this->local_ip);\n\n return view('user::users.update', [\n 'pageTitle'=>$pageTitle,\n 'data' => $data,\n 'user_role'=>$user_role,\n 'roles'=>$roles,\n 'role_user' => $role_user\n ]);\n\n }", "title": "" }, { "docid": "4a56412538dd419cdbb91f4ea8aacb54", "score": "0.52178496", "text": "function update_roles($data, $id) {\n\t\t\t\n\t $this->db->where('id', $id);\n\t $result = $this->db->update('roles', $data); \n\t \n\t return $result;\n\t}", "title": "" }, { "docid": "741c8da07c58be32ac70330824723fb9", "score": "0.5217322", "text": "public function roleUserAction(): void {\n\n if ( $this->isConnected() ){\n if (isset($_GET['id'])){\n $user = new Users();\n $d = $user->getOneBy([\"id\"=>$_POST['id']]);\n\n $this->pdo->query(\"UPDATE Users SET role=\".$_POST['role'].\" WHERE id=\".$_GET['id']);\n header(\"Location: /userDetail?id=\".$_GET['id']);\n exit();\n }\n header(\"Location: /users\");\n exit();\n\n }else{\n header(\"Location: /connexion\");\n exit();\n\n }\n }", "title": "" }, { "docid": "36787ab373ed559f807638713d1c90e7", "score": "0.52112514", "text": "public function update()\n {\n $queryRoleMenu = RoleMenu::where(\n 'role_id', Auth::user()->role_id\n )->where('menu_link', 'accounting/trial-balance')->whereHas('role', function($role){\n $role->where('status', 1);\n })->first();\n\n if ($queryRoleMenu == null){\n return false;\n } else {\n return $queryRoleMenu->update == 1;\n }\n }", "title": "" }, { "docid": "ecef8ee377d318dde8267ed8a6112143", "score": "0.5206004", "text": "function updateUserTeam()\n {\n if($_SESSION['company_admin_email'] != $_SESSION['user_email']){\n return;\n }\n \n $user_email = $_GET['email'];\n $team_id = $_GET['team_id'];\n \n //Cannot update the company admin\n if($user_email == $_SESSION['company_admin_email']){\n return;\n }\n \n require_once(\"Model/UserModel.php\");\n $UserModel = new UserModel();\n $UserModel->updateUserTeam($user_email, $team_id, $_SESSION['company_id']);\n }", "title": "" }, { "docid": "d55b8e37aae7eedc7dbdad0f27206bff", "score": "0.52036697", "text": "public function manageRole($userId)\n {\n $this->currentlyManagingRole = true;\n $this->managingRoleFor = Jetstream::findUserByIdOrFail($userId);\n $this->currentRole = $this->managingRoleFor->teamRole($this->team)->key;\n }", "title": "" }, { "docid": "03f75c2c6eb123ca951cd10527bb4c88", "score": "0.52020293", "text": "public function current_role_id()\n {\n return $this->role_id;\n }", "title": "" }, { "docid": "46e3f9fd59e9ac0d44c18ac135d8024a", "score": "0.5195696", "text": "function update(){\n \t$data = array('_id'=>session_id());\n \t$data['user_id'] = (int) Set::extract('Auth.User.id',$_SESSION);\n \t$data['membership_id'] = (int) Set::extract('Auth.Membership.id',$_SESSION);\n \treturn $this->save($data);\n }", "title": "" }, { "docid": "09a4427ed1cfb48d44f74ef60dbbe41f", "score": "0.51850045", "text": "public function getUserRoleIdAction ( )\n {\n // specify the needed classes\n $this->view->role = $this->getModel('User')->fromSession()->getRoleId();\n\n }", "title": "" }, { "docid": "fed50705a6e241d3acce8a0d60956470", "score": "0.5177796", "text": "public function updatestatus(Request $request,$id)\n {\n $user = User::find($request->id);\n // echo \"<pre>\";print_r($id . 'ID' .$request->id);exit;\n // echo \"<pre>\";print_r($user->status);\n // $user->status = $request->status;\n $status = $user->status;\n $successMessage = \"\";\n // echo \"<pre>\";print_r($status == 1);exit; \n if($status == 1)\n {\n $Reg = User::where('id', $id)->update(['status'=> 0]);\n $successMessage = 'User Inactived successfully.'; \n }\n else\n {\n $Reg = User::where('id', $id)->update(['status'=> 1]);\n $successMessage = 'User Active successfully.'; \n \n }\n return response()->json(['success' => 1,'message'=> $successMessage]);\n\n \n\n }", "title": "" }, { "docid": "28fc5e7d5c51c23fbbfcec0202660710", "score": "0.51761144", "text": "public function set_pending(){\r\n\t\t\r\n\t\t/* Get arguments */\r\n\t\t$args = $this->_args;\r\n\t\tif (empty($args)){\r\n\t\t\treturn $this->_redirect('/'.strtolower($this->_getType('plural')));\r\n\t\t}\r\n\t\t\r\n\t\t/* Set status */\r\n\t\t$itemId = array_shift($args);\r\n\t\t$itemsModel = $this->getModel('newitems');\r\n\t\t$success = $itemsModel->setStatus($itemId, false);\r\n\t\t\r\n\t\t/* Message */\r\n\t\tif ($success){\r\n\t\t\tMessages::addMessage($this->_getType('singular').' #'.$itemId.' set to \"<code>pending</code>\"');\r\n\t\t} else {\r\n\t\t\tMessages::addMessage($this->_getType('singular').' #'.$itemId.' was not changed.', 'error');\r\n\t\t}\r\n\t\t\r\n\t\t/* Redirect to details page */\r\n\t\treturn $this->_redirect('/'.strtolower($this->_getType('plural')).'/details/'.$itemId);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "469b5a83ecac9019ef892203d5db442d", "score": "0.5173081", "text": "public function update(Request $request, $id)\n {\n $user= User::where(['users.role_id'=>User::TYPE_VOLUNTEER,'users.id'=>$id])->first();\n $this->validate($request,[\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255','unique:users,email,'.$user->id],\n 'contact_number' => ['required', 'max:20'],\n 'city' => ['required', 'string', 'max:100'],\n 'address' => ['required', 'string', 'max:100'],\n 'activeStatus_id'=>'required'\n\n ]);\n\n $data=array(\n 'name' => $request->input('name'),\n 'email' => $request->input('email'),\n 'contact_number' => $request->input('contact_number'),\n 'city' => $request->input('city'),\n 'address' => $request->input('address'),\n 'organization_id' => Auth::user()->organization_id,\n 'activeStatus_id'=>$request->input('activeStatus_id')\n );\n\n User::where('id',$id)->update($data);\n return redirect('dashboard/volunteers')->with('success', 'Done Volunteer is successfully updated!!');\n }", "title": "" }, { "docid": "21b344b00b72b51b68c1e5f2b19d3b59", "score": "0.5167915", "text": "public function update(UserRequest $request,$id)\n {\n $user = Admin::find($id);\n\n $user->name = $request->name;\n\n if(isset($request->password)){\n $user->password = $request->password;\n }\n\n $user->save();\n\n $roleName = $user->getRoleNames()->toArray();\n \n $result = array_diff($roleName,$request->roles);\n\n if($result){\n foreach($roleName as $role){\n $user->removeRole($role);\n }\n }\n\n if($request->roles){\n foreach($request->roles as $role){\n $user->assignRole($role);\n }\n }\n\n return response()->json(['msg'=>'User Updated Successfully!'], 200);\n }", "title": "" }, { "docid": "320de2056c390090e72653162ae7ef88", "score": "0.5165452", "text": "public function update_user(Requests\\UserRequest $request, $id)\n {\n if($this->isPostRequest())\n {\n #date_default_timezone_set(\"Asia/Dacca\");\n $input = Input::all();\n $user_model = User::findOrFail($id);\n\n /*\n * Input data\n */\n $input_data = [\n 'username'=>$input['username'],\n 'email'=>$input['email'],\n 'first_name'=>$input['first_name'],\n 'last_name'=>$input['last_name'],\n 'type'=>$input['type'],\n 'market_place_id'=>$input['market_place_id'],\n 'roles_id'=>$input['roles_id'],\n 'status'=>$input['status'],\n 'remember_token' => str_random(10),\n 'csrf_token'=>str_random(10),\n ];\n\n\n DB::beginTransaction();\n try{\n //store to users table\n $user_model->update($input_data);\n\n if(isset($_POST['roles_id'])){\n\n DB::table('roles_users')\n ->where('users_id',$user_model->id)\n ->delete();\n\n $role_model = new RoleUser();\n $role_model->roles_id = $_POST['roles_id'];\n $role_model->users_id = $user_model->id;\n $role_model->status = 'active';\n $role_model->save();\n }\n\n DB::commit();\n Session::flash('message', \"Successfully Updated\");\n #\\App\\Http\\Helpers\\UserLogFileHelper::log_info('update-user', 'Successfully Updated!', ['Username:'.@$input['username']]);\n\n return redirect()->route('user.lists');\n\n }catch ( Exception $e ){\n //If there are any exceptions, rollback the transaction\n DB::rollback();\n Session::flash('error', $e->getMessage());\n #\\App\\Http\\Helpers\\UserLogFileHelper::log_error('update-user', 'error!'.$e->getMessage(), ['Username:'.@$input['username']]);\n }\n }\n\n\n //set data\n $action_name = 'Store User Data ';\n $action_url = 'user';\n $action_detail = @\\Auth::user()->username.' '. 'Store User Data :: ';\n $action_table = 'users';\n //store into user_activity table\n #ActivityLogs::set_users_activity($action_name, $action_url, $action_detail, $action_table , $this->current_market_place->id, $this->local_ip);\n\n return redirect()->back()->withInput();\n }", "title": "" }, { "docid": "f541fb420d0389371815a00507052a53", "score": "0.51653004", "text": "public function statusAction()\n {\n $roleRow = new Admin_Model_DbRow_Role($this->dbRole->find($this->checkRoleIdParam()));\n\n IF($roleRow->get('id')) {\n $roleRow->set('enabled', $roleRow->get('enabled', 0) == 1 ? 0 : 1);\n $this->dbRole->update($roleRow->toDbArray(array('enabled')), $roleRow->get('id'));\n }\n \n $this->_redirect('admin/role/index');\n }", "title": "" }, { "docid": "a0fdf190a3db3e4f64aacb10b77ad98e", "score": "0.5163985", "text": "public function update(Request $request, $id)\n {\n // dd($request);\n if(Client::where('user_id', '=', $id)->update(['status_affiliate' => $request->status])){\n\n $user = User::find($id);\n //Actualizar estado\n if ($request->status == 1) {\n $user->update(['role_id' => 3 ]);\n }\n //correo de aceptación de afiliación\n try {\n // $status = $request->status == 1 ? 'aceptada' : 'rechazada';\n if ($request->status == 1 ) {\n $template = \"site.mail.accept-affiliate\";\n }else{\n $template = \"site.mail.denied-affiliate\";\n }\n Mail::send($template,array(\n 'first_name' => $user->first_name,\n 'last_name' => $user->last_name\n ), function($message) use ($user) {\n $message->from('[email protected]', 'I-SEE Affiliation');\n $message->to($user->email, $user->first_name);\n $message->subject('ESTADO DE SOLICITUD DE AFILIACIÓN');\n });\n } catch (Exception $e) {\n $request->session()->flash('status', 'Actualizado. Problemas en el envío de correo');\n }\n $request->session()->flash('status', 'Actualizado');\n }else{\n $request->session()->flash('status', 'Error');\n }\n return back();\n }", "title": "" }, { "docid": "ebccefece0f95bc441f26eb1d29caef7", "score": "0.5162086", "text": "public function edit_user_role($role_id)\n {\n if (user_role('141') == true) {}\n $data['title'] = display('user_list');\n $data['user_role'] = $this->User_model->get_user_role($role_id);\n $this->db->select('id,title');\n $data['modules'] = $this->db->get('all_modules')->result_array();\n $data['content'] = $this->load->view('edit_user_role', $data, true);\n $this->load->view('layout/main_wrapper', $data);\n }", "title": "" }, { "docid": "c1d42a6d9aa0a4122c6b107e21ef2362", "score": "0.51575845", "text": "function bbp_edit_user_blog_role()\n{\n}", "title": "" }, { "docid": "6c4640cf9d93b8d48bd5c471f23fe698", "score": "0.5157545", "text": "public function send_main_when_user_role_changes( $user_id, $new_role ) {\n $site_url = get_bloginfo( 'wpurl' );\n $user_info = get_userdata( $user_id );\n $to = $user_info->user_email;\n $subject = sprintf( esc_html__( 'Role changed: %s', 'wpbit4bytes' ), $site_url );\n $message = sprintf( esc_html__( 'Hello %1$s, your role has changed on %2$s. Congratulations, you are now an %3$s.', 'wpbit4bytes' ), $user_info->display_name, $site_url, $new_role );\n wp_mail( $to, $subject, $message );\n }", "title": "" }, { "docid": "2fd8495d121a74dfec0cb28788bc99b1", "score": "0.51572716", "text": "function rejectUser($user_id){\r\n $reject_user_query = \"UPDATE users SET status = 'REJECTED' WHERE user_id = '$user_id'\";\r\n return $this->query($reject_user_query);\r\n }", "title": "" }, { "docid": "86d154067438fb6a864874e99c4aaa34", "score": "0.5156064", "text": "function updateFolderRole(){\n\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t$output = '';\n\ttry{\n\t\tif(empty($_POST['userId'])){\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'userId\\'] is empty.');\n\t\t}elseif(empty($_POST['folderId'])){\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'folderId\\'] is empty.');\n\t\t}elseif(!isset($_POST['newRoleId'])){//The newRoleId may be zero, so check that the value with isset() rather than empty().\n\t\t\tthrow new Adrlist_CustomException('','$_POST[\\'newRoleId\\'] is not set.');\n\t\t}\n\t\tif(distributeRoles($_SESSION['userId'],$_POST['userId'],array($_POST['folderId']=>$_POST['newRoleId']),false) === true){\n\t\t\t$message .= 'Updated';\n\t\t\t$returnThis['buildFolderUsers'] = buildFolderUsers();\n\t\t}\n\t\tif($_POST['newRoleId'] < 3){\n\t\t\t//Delete pending shares started by this user for lists in this folder when their role is reduced below Manager (3).\n\t\t\t$deletePendingSharesStmt = $Dbc->prepare(\"DELETE FROM\n\t\tinvitations\n\tWHERE\n\t\tsenderId = ? AND\n\t\tlistId IN (SELECT listId FROM lists WHERE folderId = ?)\");\n\t\t\t$deletePendingSharesStmt->execute(array($_POST['userId'],$_POST['folderId']));\n\t\t}\n\t\t$success = MODE == 'updateFolderRole' ? true : $success;\n\t}catch(Adrlist_CustomException $e){\n\t}catch(PDOException $e){\n\t\terror(__LINE__,'','<pre>' . $e . '</pre>');\n\t}\n\tif(MODE == 'updateFolderRole'){\n\t\treturnData();\n\t}\n}", "title": "" }, { "docid": "c82db1062a1ad2859f96360d1ea67e6b", "score": "0.5149459", "text": "public function update(Request $request, $id)\n {\n\t\t$user = User::find($id);\n\t\t$user->roles()->sync($request->roles);\n\t\treturn redirect()->route('user-control.index');\n }", "title": "" }, { "docid": "3e4ddedc794a681729c3d376d020e671", "score": "0.5145377", "text": "public function assignRole($user, $role);", "title": "" }, { "docid": "ff284cb84cabb77a78ccdbd0b675ecdd", "score": "0.5145178", "text": "public function update(Request $request, User $user)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'email' => 'required',\n ]);\n\n $adminRoles = DB::table('role_user')->where('role_id', 1)->get();\n $currentRole = DB::table('role_user')->where('user_id', $request->user_id)->get();\n if ($currentRole->count() != 0\n && $currentRole[0]->role_id == 1\n && $adminRoles->count() == 1\n && $request->role_id != 1) {\n return redirect()->route('users.index');\n }\n if ($currentRole->count() != 0) {\n //У пользователя есть активные роли - мы их удаляем\n DB::table('role_user')->where('user_id', $request->user_id)->delete();\n }\n $currentRole = DB::table('role_user')->insert(['user_id' => $request->user_id, 'role_id' => $request->role_id]);\n $user->update($request->all());\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "8d080b445b4749d1630dfe397bb04167", "score": "0.5140543", "text": "public function update(Request $request, $id)\n {\n $role = Role::find($id);\n $role_check = Role::where('description', '=', Input::get('description'))->get()->first();\n\n if ($role_check && $role_check->id != $id)\n return Redirect::route('role.edit', [$id])->withInput()->with('danger', 'User role already exists');\n\n if(Input::get('createRole') == null && Input::get('updateRole') == null && Input::get('deleteRole') == null &&\n Input::get('addUser') == null && Input::get('updateUser') == null && Input::get('deleteUser') == null &&\n Input::get('addCountry') == null && Input::get('addCompany') == null && Input::get('addDept') == null &&\n Input::get('addTeam') == null && Input::get('addEmployeeType') == null && Input::get('addLeaveType') == null &&\n Input::get('updateCountry') == null && Input::get('updateCompany') == null && Input::get('updateDept') == null &&\n Input::get('updateTeam') == null && Input::get('updateEmployeeType') == null && Input::get('updateLeaveType') == null &&\n Input::get('deleteCountry') == null && Input::get('deleteCompany') == null && Input::get('deleteDept') == null &&\n Input::get('deleteTeam') == null && Input::get('deleteEmployeeType') == null && Input::get('deleteLeaveType') == null &&\n Input::get('addEmployee') == null && Input::get('updateEmployee') == null && Input::get('deleteEmployee') == null &&\n Input::get('attReg') == null && Input::get('leaveCreate') == null && Input::get('leaveUpdate') == null &&\n Input::get('settings') == null && Input::get('reports') == null)\n return Redirect::route('role.edit', [$id])->withInput()->with('warning', 'At least one user function must be selected!');\n\n $role->description = Input::get('description');\n\n if ($role->update())\n {\n $function = Functions::where('description', 'like', '%' . 'eate User R' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('createRole') !== 'on')\n $function->delete();\n } else {\n if (Input::get('createRole') == 'on')\n $this->addFunction($role->id, 'Create User Role');\n }\n $function = Functions::where('description', 'like', '%' . 'date User R' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateRole') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateRole') == 'on')\n $this->addFunction($role->id, 'Update User Role');\n }\n $function = Functions::where('description', 'like', '%' . 'lete User R' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteRole') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteRole') == 'on')\n $this->addFunction($role->id, 'Delete User Role');\n }\n $function = Functions::where('description', 'like', '%' . 'd User')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addUser') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addUser') == 'on')\n $this->addFunction($role->id, 'Add User');\n }\n $function = Functions::where('description', 'like', '%' . 'date User')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateUser') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateUser') == 'on')\n $this->addFunction($role->id, 'Update User');\n }\n $function = Functions::where('description', 'like', '%' . 'lete User')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteUser') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteUser') == 'on')\n $this->addFunction($role->id, 'Delete User');\n }\n\n $function = Functions::where('description', 'like', '%' . 'd Coun' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addCountry') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addCountry') == 'on')\n $this->addFunction($role->id, 'Add Country');\n }\n $function = Functions::where('description', 'like', '%' . 'd Comp' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addCompany') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addCompany') == 'on')\n $this->addFunction($role->id, 'Add Company');\n }\n $function = Functions::where('description', 'like', '%' . 'd Depa' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addDept') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addDept') == 'on')\n $this->addFunction($role->id, 'Add Department');\n }\n $function = Functions::where('description', 'like', '%' . 'd Team')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addTeam') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addTeam') == 'on')\n $this->addFunction($role->id, 'Add Team');\n }\n $function = Functions::where('description', 'like', '%' . 'd Employee T' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addEmployeeType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addEmployeeType') == 'on')\n $this->addFunction($role->id, 'Add Employee Type');\n }\n $function = Functions::where('description', 'like', '%' . 'd Leave' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addLeaveType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addLeaveType') == 'on')\n $this->addFunction($role->id, 'Add Leave Type');\n }\n $function = Functions::where('description', 'like', '%' . 'date Coun' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateCountry') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateCountry') == 'on')\n $this->addFunction($role->id, 'Update Country');\n }\n $function = Functions::where('description', 'like', '%' . 'date Comp' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateCompany') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateCompany') == 'on')\n $this->addFunction($role->id, 'Update Company');\n }\n $function = Functions::where('description', 'like', '%' . 'date Depa' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateDept') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateDept') == 'on')\n $this->addFunction($role->id, 'Update Department');\n }\n $function = Functions::where('description', 'like', '%' . 'date Team')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateTeam') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateTeam') == 'on')\n $this->addFunction($role->id, 'Update Team');\n }\n $function = Functions::where('description', 'like', '%' . 'date Employee T' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateEmployeeType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateEmployeeType') == 'on')\n $this->addFunction($role->id, 'Update Employee Type');\n }\n $function = Functions::where('description', 'like', '%' . 'date Leave' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateLeaveType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateLeaveType') == 'on')\n $this->addFunction($role->id, 'Update Leave Type');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Coun' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteCountry') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteCountry') == 'on')\n $this->addFunction($role->id, 'Delete Country');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Comp' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteCompany') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteCompany') == 'on')\n $this->addFunction($role->id, 'Delete Company');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Depa' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteDept') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteDept') == 'on')\n $this->addFunction($role->id, 'Delete Department');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Team')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteTeam') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteTeam') == 'on')\n $this->addFunction($role->id, 'Delete Team');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Employee T' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteEmployeeType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteEmployeeType') == 'on')\n $this->addFunction($role->id, 'Delete Employee Type');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Leave' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteLeaveType') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteLeaveType') == 'on')\n $this->addFunction($role->id, 'Delete Leave Type');\n }\n $function = Functions::where('description', 'like', '%' . 'd Employee')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('addEmployee') !== 'on')\n $function->delete();\n } else {\n if (Input::get('addEmployee') == 'on')\n $this->addFunction($role->id, 'Add Employee');\n }\n $function = Functions::where('description', 'like', '%' . 'date Employee')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('updateEmployee') !== 'on')\n $function->delete();\n } else {\n if (Input::get('updateEmployee') == 'on')\n $this->addFunction($role->id, 'Update Employee');\n }\n $function = Functions::where('description', 'like', '%' . 'lete Employee')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('deleteEmployee') !== 'on')\n $function->delete();\n } else {\n if (Input::get('deleteEmployee') == 'on')\n $this->addFunction($role->id, 'Delete Employee');\n }\n $function = Functions::where('description', 'like', '%' . 'egist' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('attReg') !== 'on')\n $function->delete();\n } else {\n if (Input::get('attReg') == 'on')\n $this->addFunction($role->id, 'Attendance Register');\n }\n $function = Functions::where('description', 'like', '%' . 'ture' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('leaveCreate') !== 'on')\n $function->delete();\n } else {\n if (Input::get('leaveCreate') == 'on')\n $this->addFunction($role->id, 'Capture Leave');\n }\n $function = Functions::where('description', 'like', '%' . 'ppro' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('leaveUpdate') !== 'on')\n $function->delete();\n } else {\n if (Input::get('leaveUpdate') == 'on')\n $this->addFunction($role->id, 'Approve Leave');\n }\n $function = Functions::where('description', 'like', '%' . 'ttin' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('settings') !== 'on')\n $function->delete();\n } else {\n if (Input::get('settings') == 'on')\n $this->addFunction($role->id, 'Settings');\n }\n $function = Functions::where('description', 'like', '%' . 'port' . '%')\n ->where('role_id', '=', $role->id)->first();\n if ($function) {\n if (Input::get('reports') !== 'on')\n $function->delete();\n } else {\n if (Input::get('reports') == 'on')\n $this->addFunction($role->id, 'View Reports');\n }\n // update all the users using that role\n $users = User::where('role_id', '=', $role->id)->get();\n foreach ($users as $user)\n {\n $user->createRole = 'N'; $user->updateRole = 'N'; $user->DeleteRole = 'N';\n $user->addUser = 'N'; $user->updateUser = 'N'; $user->DeleteUser = 'N';\n $user->addCountry = 'N'; $user->updateCountry = 'N'; $user->DeleteCountry = 'N';\n $user->addCompany = 'N'; $user->updateCompany = 'N'; $user->DeleteCompany = 'N';\n $user->addDept = 'N'; $user->updateDept = 'N'; $user->DeleteDept = 'N';\n $user->addTeam = 'N'; $user->updateTeam = 'N'; $user->DeleteTeam = 'N';\n $user->addEmployeeType = 'N'; $user->updateEmployeeType = 'N'; $user->DeleteEmployeeType = 'N';\n $user->addLeaveType = 'N'; $user->updateLeaveType = 'N'; $user->DeleteLeaveType = 'N';\n $user->addEmployee = 'N'; $user->updateEmployee = 'N'; $user->DeleteEmployee = 'N';\n $user->attReg = 'N'; $user->leaveCapture = 'N'; $user->leaveApprove = 'N';\n $user->settings = 'N'; $user->reportView = 'N';\n\n $functions = Functions::where('role_id', '=', $role->id)->get();\n foreach ($functions as $function) {\n if ($function->description == 'Create User Role')\n $user->createRole = 'Y';\n if ($function->description == 'Update User Role')\n $user->updateRole = 'Y';\n if ($function->description == 'Delete User Role')\n $user->deleteRole = 'Y';\n if ($function->description == 'Add User')\n $user->addUser = 'Y';\n if ($function->description == 'Update User')\n $user->updateUser = 'Y';\n if ($function->description == 'Delete User')\n $user->deleteUser = 'Y';\n if ($function->description == 'Add Country')\n $user->addCountry = 'Y';\n if ($function->description == 'Add Company')\n $user->addCompany = 'Y';\n if ($function->description == 'Add Department')\n $user->addDept = 'Y';\n if ($function->description == 'Add Team')\n $user->addTeam = 'Y';\n if ($function->description == 'Add Employee Type')\n $user->addEmployeeType = 'Y';\n if ($function->description == 'Add Leave Type')\n $user->addLeaveType = 'Y';\n if ($function->description == 'Add Employee')\n $user->addEmployee = 'Y';\n if ($function->description == 'Update Country')\n $user->updateCountry = 'Y';\n if ($function->description == 'Update Company')\n $user->updateCompany = 'Y';\n if ($function->description == 'Update Department')\n $user->updateDept = 'Y';\n if ($function->description == 'Update Team')\n $user->updateTeam = 'Y';\n if ($function->description == 'Update Employee Type')\n $user->updateEmployeeType = 'Y';\n if ($function->description == 'Update Leave Type')\n $user->updateLeaveType = 'Y';\n if ($function->description == 'Update Employee')\n $user->updateEmployee = 'Y';\n if ($function->description == 'Delete Country')\n $user->deleteCountry = 'Y';\n if ($function->description == 'Delete Company')\n $user->deleteCompany = 'Y';\n if ($function->description == 'Delete Department')\n $user->deleteDept = 'Y';\n if ($function->description == 'Delete Team')\n $user->deleteTeam = 'Y';\n if ($function->description == 'Delete Employee Type')\n $user->deleteEmployeeType = 'Y';\n if ($function->description == 'Delete Leave Type')\n $user->deleteLeaveType = 'Y';\n if ($function->description == 'Delete Employee')\n $user->deleteEmployee = 'Y';\n if ($function->description == 'Attendance Register')\n $user->attReg = 'Y';\n if ($function->description == 'Capture Leave')\n $user->leaveCapture = 'Y';\n if ($function->description == 'Approve Leave')\n $user->leaveApprove = 'Y';\n if ($function->description == 'Settings')\n $user->settings = 'Y';\n if ($function->description == 'View Reports')\n $user->reportView = 'Y';\n }\n $user->update();\n }\n return Redirect::route('roles')->with('success', 'Successfully updated user role!');\n } else\n return Redirect::route('role.edit', [$id])->withInput()->withErrors($role->errors());\n }", "title": "" }, { "docid": "88bfaed94a947675744f90b35e99c21a", "score": "0.5135553", "text": "public function testUpdate(){\n $roleId = DB::table('roles')->first()->id;\n $this->visit('/setting/roles/edit/'.$roleId)\n ->see('Update role and permission')\n ->type('TEST44','roleName')\n ->press('btnUpdate')\n ->seePageIs('/setting/roles');\n }", "title": "" }, { "docid": "a7ee85579bac989ef1b529ccd439aebc", "score": "0.5134154", "text": "public function run()\n {\n \n DB::table('users')\n ->where('id', 1)\n ->update([\n 'role_id' => 3\n ]);\n }", "title": "" }, { "docid": "57d08a7936b73d7f50a2037f5be15fd8", "score": "0.51340026", "text": "public function update(UserPermissionCreate $request, $id)\n {\n// dd($id,$request->all());\n $role = Role::whereId($id)->update($request->except(['_token','_method','check']));\n if ($role){\n $ids = $request->check;\n PermissionRole::where('role_id',$id)->delete();\n if($ids){\n foreach ($ids as $item){\n PermissionRole::create([\n 'role_id' => $id,\n 'permission_id' => $item,\n ]);\n }\n }\n return redirect()->back()->with('success','Группа пользователей успешно обновлена!');\n }\n else{\n return redirect()->back()->with('error','Произошла непредвиденная ошибка!');\n }\n }", "title": "" }, { "docid": "e6a8116a3a1acee305db1820264234dd", "score": "0.5132665", "text": "function bbp_notice_edit_user_pending_email()\n{\n}", "title": "" }, { "docid": "f5760fe6d7ee60b1489ce517f8527b40", "score": "0.5126014", "text": "public function approveUninvited($respondentId)\n {\n $respondent = $this->Respondents->get($respondentId);\n $respondent->approved = 1;\n $result = $this->Respondents->save($respondent);\n if ($result) {\n $this->dispatchUninvitedEvent(true, $respondent);\n }\n $this->set([\n 'success' => (bool)$result,\n ]);\n $this->viewBuilder()->setLayout('blank');\n $this->render(DS . 'Client' . DS . 'Respondents' . DS . 'approve_uninvited');\n }", "title": "" }, { "docid": "a6316182bb33064cb7959c9bb14cfc0d", "score": "0.5123079", "text": "public function getRoleId()\n {\n return 'user' . $this->getId();\n }", "title": "" }, { "docid": "b89e2b2ef6846be12e70dc29d09270ac", "score": "0.51205796", "text": "public function update(UserRequest $request, $id)\n {\n //\n $user = User::findOrFail($id);\n $data = $request->all();\n $user->update($data);\n\n $user->detachRoles();\n $user->attachRole($data['role']);\n return redirect('backend/users')->with('message','User Updated Successfully');\n }", "title": "" }, { "docid": "ea9740a98c145f2168d67a19994af026", "score": "0.51188713", "text": "public function ReadDashboardChangeRole()\n {\n $check = Reviewer::where('id_user', Auth::user()->id)->first();\n if(@$check->email == NULL){\n return redirect(route('unauthorized.read'));\n }else{\n $user = User::find(Auth::user()->id);\n if($user->role == 2){\n $user->role = 3;\n }else{\n $user->role = 2;\n }\n $user->save();\n return back();\n }\n }", "title": "" }, { "docid": "582dd954a542e3e410743f05ccba4141", "score": "0.5117162", "text": "public function update_user() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n // Check if data was submitted\n if ( $this->input->post() ) {\n \n // Add form validation\n $this->form_validation->set_rules('first_name', 'First Name', 'trim');\n $this->form_validation->set_rules('last_name', 'Last Name', 'trim');\n $this->form_validation->set_rules('email', 'Email', 'trim|valid_email|required');\n $this->form_validation->set_rules('proxy', 'Proxy', 'trim');\n $this->form_validation->set_rules('role', 'Role', 'integer');\n $this->form_validation->set_rules('user_id', 'User ID', 'integer');\n $this->form_validation->set_rules('status', 'Status', 'integer');\n $this->form_validation->set_rules('plan', 'Plan', 'integer');\n \n // Get data\n $first_name = $this->input->post('first_name');\n $last_name = $this->input->post('last_name');\n $password = $this->input->post('password');\n $email = $this->input->post('email');\n $role = $this->input->post('role');\n $user_id = $this->input->post('user_id');\n $status = $this->input->post('status');\n $plan = $this->input->post('plan');\n $proxy = $this->input->post('proxy');\n \n // The admin can't changes this role or status\n if ( $this->user_id == $user_id ) {\n \n $role = 1;\n $status = 1;\n \n }\n \n // Check form validation\n if ( $this->form_validation->run() == false ) {\n \n display_mess(16);\n \n } else {\n \n if ( $this->user->check_email($email, $user_id) == true ) {\n \n // Check if the email address are present in our database\n display_mess(57);\n \n } else {\n \n $r = 0;\n if ( $this->user->updateuser($user_id, $first_name, $last_name, $email, $password, $role, $status, $plan, $proxy) ) {\n \n $this->user->delete_user_option($user_id, 'nonpaid');\n \n display_mess(58);\n $r++;\n \n }\n \n if ( $r == 0 ) {\n \n if ( $proxy ) {\n \n if ( $this->user->update_proxy($user_id, $proxy) ) {\n \n display_mess(58);\n \n } else {\n \n display_mess(59);\n \n }\n \n } else {\n \n display_mess(59);\n \n }\n \n }\n \n }\n \n }\n \n }\n \n }", "title": "" }, { "docid": "7fe8fbb8fdb0b4638d1432ed83b7c328", "score": "0.5114728", "text": "public function edit($id)\n {\n\n $currentUser = User::find($id)->role_id;\n $rolesPluck= (Role::pluck('role','id'));\n $approvals = ['0'=> 'NotApproved'] + ['1'=> 'Approved'];\n $roles = [$currentUser => $rolesPluck[$currentUser]] + Role::pluck('role','id')->toArray();\n $user_r = User::findOrFail($id);\n return view('userrights.edit')->with(compact('user_r'))->with(compact('roles'))->with(compact('approvals'));\n }", "title": "" }, { "docid": "30b6a4021393aa1d80b794339c160e9b", "score": "0.51129466", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name'=> 'required|max:100',\n 'email'=> 'required|email|max:120|unique:users,email,'.$id,\n 'password'=> 'required|confirmed|min:6',\n 'roles'=> 'required'\n ]);\n\n $update = User::find($id);\n $update->name = $request->name;\n $update->email = $request->email;\n $update->password = $request->password;\n\n if (!empty($update['password'])) {\n $update['password'] = Hash::make($update['password']);\n } else {\n $update = array_except($update['password']);\n }\n\n $update->save();\n DB::table('role_user')->where('user_id',$id)->delete();\n\n\n foreach ($request->input('roles') as $key => $value) {\n $update->attachRole($value);\n }\n\n return redirect()->route('users.index')->with('success', 'User berhasil diupdate');\n }", "title": "" } ]
7499cc208c6bb94180680a63dc6e089f
Set the IP address to resolve.
[ { "docid": "2c5a452adc4319703553e526fac4ba67", "score": "0.5366601", "text": "public function setIp(string $ip = null): static\n {\n $this->ip = $ip;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "7e947d88c8bd03311981d5fdd9ccfb68", "score": "0.70067817", "text": "function set_ip($ip='') {\n $this->_DNSBL_check->ip = $ip;\n }", "title": "" }, { "docid": "ace9747fa8776401728965412448b9e8", "score": "0.6877732", "text": "public function setIP($ip);", "title": "" }, { "docid": "c9f65e463659f93670b2071b9197e19a", "score": "0.68263924", "text": "public function setIp()\n\t{\n\t\t$this->ip_address = Request::getClientIp();\n\t}", "title": "" }, { "docid": "5608622aa61bc6f1222fa9c261cf25ed", "score": "0.6752127", "text": "public function setIp($ip);", "title": "" }, { "docid": "ed9cb1b71c0e75d5b982fc49b5948f84", "score": "0.67121625", "text": "public function setIp(?string $ip): void\n {\n $this->ip = $ip;\n }", "title": "" }, { "docid": "ccf6a28be3e7c01ba5f1076c12ab3a37", "score": "0.6665606", "text": "function setIP() {\n $exec = exec(\"hostname\"); //the \"hostname\" is a valid command in both windows and linux\n $hostname = trim($exec); //remove any spaces before and after\n $ip = gethostbyname($hostname); //resolves the hostname using local hosts resolver or DNS\n $this->data['User']['ip'] = $ip;\n }", "title": "" }, { "docid": "431489f0d8d598ae3759c57ba3d80fa3", "score": "0.65585923", "text": "public function setIpAddress(?string $value): void {\n $this->getBackingStore()->set('ipAddress', $value);\n }", "title": "" }, { "docid": "2d73a5358192a9059ff786483c8b031e", "score": "0.6527176", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n }", "title": "" }, { "docid": "2d73a5358192a9059ff786483c8b031e", "score": "0.6527176", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n }", "title": "" }, { "docid": "f88d485c646e6f194e985d1794af6866", "score": "0.6519972", "text": "public function setIPAddress($IPAddress) { $this->ipAddress = ip2long($IPAddress); }", "title": "" }, { "docid": "744276fe1d35057bd72da2e9379f604c", "score": "0.62849814", "text": "public function setIPAddress($addr = true)\n {\n if ($addr === true) {\n $addr = $_SERVER['REMOTE_ADDR'];\n }\n\n $this->set('IPAddress', $addr);\n return $this->getIPAddress();\n }", "title": "" }, { "docid": "b53ba5605f275d4b59e3eacafc1430fd", "score": "0.6147548", "text": "public function setCheckIp($check)\n\t{\n\t\t$this->checkIp = $check;\n\t}", "title": "" }, { "docid": "5927c2f6b9e01814eb00301e24e41125", "score": "0.61353546", "text": "private function setIP($ip)\n {\n $sql = \"UPDATE usuarios SET ip = :ip WHERE id = :id\";\n $sql = $this->pdo->prepare($sql);\n $sql->bindValue(':ip', $ip);\n $sql->bindValue(':id', $this->id);\n $sql->execute();\n }", "title": "" }, { "docid": "f81209bc10424563c561ed190d5aa9b4", "score": "0.6027376", "text": "public function setIp($ip)\n {\n $this->statHandlerObject->setIp($ip);\n }", "title": "" }, { "docid": "3c65e71a7c939e917e5c65a70afa3a6d", "score": "0.60034835", "text": "public function setClientIp($ip);", "title": "" }, { "docid": "6320241f7b7dd72b2cb4ea414314eecf", "score": "0.597157", "text": "public function setFakeIp($fakeIp)\n {\n if (!is_string($fakeIp)) {\n throw new InvalidArgumentException('The geocoder fake IP must be a string value.');\n }\n\n $this->fakeIp = $fakeIp;\n }", "title": "" }, { "docid": "305965e44953660a0c148d2a1ff54e0f", "score": "0.59426814", "text": "protected function setHostIPAddressInEnv()\n {\n $host_ip = ProjectX::clientHostIP();\n $project_root = ProjectX::projectRoot();\n\n $this->taskWriteToFile(\"$project_root/.env\")\n ->append()\n ->regexReplace('/HOST_IP_ADDRESS=.*/', \"HOST_IP_ADDRESS={$host_ip}\")\n ->appendUnlessMatches('/HOST_IP_ADDRESS=.*/', \"\\nHOST_IP_ADDRESS={$host_ip}\")\n ->run();\n\n return $this;\n }", "title": "" }, { "docid": "71e15fd69b19929db4bdf5f9c0c82789", "score": "0.59215665", "text": "public function setRemoteAddress($value)\n {\n $this->remoteaddr = $value;\n return $this;\n }", "title": "" }, { "docid": "fc5dd5456b4ad64c5097799fe198b66f", "score": "0.5893034", "text": "public function setIp($ip) {\n$this->fields[\"ip\"] = $ip;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "2098c9403bfd3bc405558ab42eb37625", "score": "0.5890263", "text": "public function setIP ($ra_ip) {\n\t\t$this->ra_ip = $ra_ip;\n\t}", "title": "" }, { "docid": "6abfcee558ee81151b741a173f442d60", "score": "0.5878233", "text": "static public function ip__resolve($ip)\n\t{\n\t\tif(self::ip__validate($ip)){\n\t\t\t$url = gethostbyaddr($ip);\n\t\t\tif($url)\n\t\t\t\treturn $url;\n\t\t}\n\t\treturn $ip;\n\t}", "title": "" }, { "docid": "552793c77ef22b5c4ad2eccb87e4a6d8", "score": "0.58612114", "text": "public function setClientIP($value) {\n\t\t$this->ClientIP = $value;\n\t}", "title": "" }, { "docid": "6fa6f6e6b58e2782f484c49eff66c1a9", "score": "0.5846299", "text": "public function mapIpAddress($ip = NULL);", "title": "" }, { "docid": "2e404888acc003980595d0eead47c7ef", "score": "0.5843843", "text": "public function parseIp(): void\n {\n $this->type = self::TYPE_STRING;\n $this->example = $this->faker->ipv4;\n }", "title": "" }, { "docid": "05d0e27684557dc1f8a61624f87db7c2", "score": "0.5842595", "text": "public function ip($ip = null){\n\t\tif(0 === func_num_args())\n\t\t\treturn $this->ip;\n\t\t$this->ip = $ip;\n\t}", "title": "" }, { "docid": "b165665a8c520fbc0e8cf5613a7fd7d9", "score": "0.5840016", "text": "public function setIPHint(array $hints) : void\n {\n $this->IPHint = $hints;\n }", "title": "" }, { "docid": "d0641f0796e30a037ec29d20cd2f3541", "score": "0.58212346", "text": "function M_SetIP(&$conn, $host, $port)\n{\n\tif ($host == \"localhost\")\n\t\t$conn['host'] = \"127.0.0.1\";\n\telse\n\t\t$conn['host'] = $host;\n\t$conn['port'] = $port;\n\t$conn['method'] = M_CONN_IP;\n\treturn true;\n}", "title": "" }, { "docid": "9854dff47ff2da32651048bf92270263", "score": "0.58207405", "text": "function setIpaddress($ipaddress)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->ipaddress = $ipaddress;\n\t}", "title": "" }, { "docid": "f6eac14f147744fe12f6a4241a64cdb6", "score": "0.5808232", "text": "public function setIpAddress($ipAddress) {\n $this->tracker_settings[\"ip\"] = $ipAddress;\n }", "title": "" }, { "docid": "6529638b38ca83acc79ddf3b7ad54f49", "score": "0.57785743", "text": "public function setIp($ipAddress)\n {\n $this->data = explode(\".\", $ipAddress);\n }", "title": "" }, { "docid": "cd5ae9d94c2d3d87ff0a58292e6f0f00", "score": "0.5765638", "text": "public function setIP(string $iP) : self\n {\n $this->initialized['iP'] = true;\n $this->iP = $iP;\n return $this;\n }", "title": "" }, { "docid": "da50216f933d779fee04ec6c08a6a591", "score": "0.57376695", "text": "public function setAddress($value)\n\t{\n\t\t$this->address = $value;\n\t}", "title": "" }, { "docid": "80454cb89eaf322add8db5fb7d2c5ce7", "score": "0.5719505", "text": "public function setIp($ip)\n {\n $this->ip = (string)$ip;\n\n return $this;\n }", "title": "" }, { "docid": "e493ae310c15056e835cab76cad1bd0c", "score": "0.5701764", "text": "public function setIP($ip)\n\t{\n\t\tif($this->num_datapoints >= 15)\n\t\t{\n\t\t\tthrow new RequestException('Maximum number of data points to query reached for request instance');\n\t\t}\n\n\t\tif($this->response !== NULL)\n\t\t{\n\t\t\tthrow new RequestException('Cannot modify a request already sent');\n\t\t}\n\n\t\t/**\n\t\t * Validation will check for reserved or private IP ranges\n\t\t *\n\t\t * Validation will fail on the following IP ranges:\n\t\t * 0.0.0.0/8\n\t\t * 10.0.0.0/8\n\t\t * 169.254.0.0/16\n\t\t * 172.16.0.0/12\n\t\t * 192.0.2.0/24\n\t\t * 192.168.0.0/16\n\t\t * 224.0.0.0/4\n\t\t * FC* (IPv6)\n\t\t * FD* (IPv6)\n\t\t */\n\t\tif(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 & FILTER_FLAG_IPV6 & FILTER_FLAG_NO_PRIV_RANGE & FILTER_FLAG_NO_RES_RANGE) === false)\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Invalid IP address supplied');\n\t\t}\n\n\t\t$this->ip[] = $ip;\n\t\t$this->num_datapoints++;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0350dd7d6d62f70d86b1c21498c935ea", "score": "0.56970036", "text": "public function setAddress($value)\n {\n $this->address = $value;\n }", "title": "" }, { "docid": "000bddfce822e4286493fc389eca2611", "score": "0.5687", "text": "public function updateIP(InputParser $input);", "title": "" }, { "docid": "13a0041b1173522b7e3ddd9ecb3c7ecf", "score": "0.5678252", "text": "function setClientIP() {\n\t\t$proxy = null;\n\t\t$ip = null;\n\t\t\n\t\tif(isset($_SERVER['HTTP_CLIENT_IP'])) $ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\telseif(isset($_SERVER['REMOTE_ADDR'])) $ip = $_SERVER['REMOTE_ADDR'];\n\t\telse $ip = null;\n\t\t\n\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$proxy = $ip;\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t\t\n\t\t// Only set the IP and ProxyIP if none currently set\n\t\tif(!$this->IP) $this->IP = $ip;\n\t\tif(!$this->ProxyIP) $this->ProxyIP = $proxy;\n\t}", "title": "" }, { "docid": "5c049c199f2b44890893a96987b77a3e", "score": "0.56599814", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n return $this;\n }", "title": "" }, { "docid": "5c049c199f2b44890893a96987b77a3e", "score": "0.56599814", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n return $this;\n }", "title": "" }, { "docid": "d9abfc10d5ef4aa3597a6d43773a8762", "score": "0.56435037", "text": "public function resolveAddress(string $address);", "title": "" }, { "docid": "f67ea78696f69b30301c337a2b7dae72", "score": "0.5624054", "text": "protected function setAddress(string $address)\n {\n if (empty($address)) {\n throw new InvalidArgumentException('Empty IPv4 address given');\n }\n if (false === filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n throw new InvalidArgumentException(\"Invalid IPv4 address, given: {$address}\");\n }\n $this->address = $address;\n }", "title": "" }, { "docid": "f540efed6e7ec548e4927e2e221cee19", "score": "0.56095505", "text": "public function setAddress($addr) {\n\t\t$this->address = $addr;\n\t}", "title": "" }, { "docid": "9d3b581a7011c3060225c0fbd5b7344b", "score": "0.55930585", "text": "public function getIp()\n {\n $default = '192.168.56.' . mt_rand(10,240);\n $this->setSetting('ip', CLI::getLine('Please fill in the local IP of your devbox', $default));\n }", "title": "" }, { "docid": "ae330ef228f975d44b23ebb2d3f4c845", "score": "0.5572087", "text": "public function setAddress($val)\n {\n $this->_propDict[\"address\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fca3d43975bbe76e2e9216bce6023522", "score": "0.55228215", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n\n return $this;\n }", "title": "" }, { "docid": "fca3d43975bbe76e2e9216bce6023522", "score": "0.55228215", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n\n return $this;\n }", "title": "" }, { "docid": "fca3d43975bbe76e2e9216bce6023522", "score": "0.55228215", "text": "public function setIp($ip)\n {\n $this->ip = $ip;\n\n return $this;\n }", "title": "" }, { "docid": "b418479960a3b8e1e375e3300f9238b6", "score": "0.5501549", "text": "public function setPublicAddress(?string $value): void {\n $this->getBackingStore()->set('publicAddress', $value);\n }", "title": "" }, { "docid": "6179b38a5074edb492c9ced3534785ac", "score": "0.549773", "text": "public function setAddress($address);", "title": "" }, { "docid": "c8a98fbf23659e915d8caf5bfe7d804e", "score": "0.5466347", "text": "public function setAddress(string $address): void\n {\n $this->address = strval(preg_replace('#^(//+)#', '/', $address));\n }", "title": "" }, { "docid": "06e112c3bb83d7222faa74572ff5306b", "score": "0.54440856", "text": "public function setIp($ind, $ip) {\n\t\tif ($ind < 0 || $ind >= count($this->users)) {\n\t\t\tthrow DTException('setIp failed. invalid index: ' . $ind);\n\t\t}\n\t\t$this->ips[$ind] = $ip;\n\t}", "title": "" }, { "docid": "a52abcf9ee1e5e70c605884709d77175", "score": "0.54122657", "text": "public function setIp($var)\n {\n GPBUtil::checkString($var, True);\n $this->ip = $var;\n\n return $this;\n }", "title": "" }, { "docid": "e83f2d2bc479be2b37281485eda3289b", "score": "0.5404235", "text": "public function setAddressSrc( /*string*/$Address );", "title": "" }, { "docid": "e3516b98ec6908d29ce023893859fce0", "score": "0.53968084", "text": "private function getIpAddress()\n\t{\n\t\tif($this->ipAddress !== null) \n\t\t$this->ipAddress = '172.16.140.89';\n\t\treturn $this->ipAddress;\n\n\t}", "title": "" }, { "docid": "2362fb001c68e232a2170e788bf7d4fc", "score": "0.5391419", "text": "public function setAdresse($new){\r\n $this->adresse = $new;\r\n }", "title": "" }, { "docid": "241d317b7203aaee585bf06bfbc0fcdb", "score": "0.5386814", "text": "public function setDestinationServiceIp($val)\n {\n $this->_propDict[\"destinationServiceIp\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fbf3d23eecb1757aee59a58e0bd6c57d", "score": "0.53824353", "text": "public function trackIPAddress(bool $track = true): self\n {\n $this->trackIPAddress = $track;\n\n return $this;\n }", "title": "" }, { "docid": "7bbff23e7be71cfbe29ee01e3c43cb31", "score": "0.5340626", "text": "function long2ip ($proper_address) {}", "title": "" }, { "docid": "5c1bfdc21c5e3f42c59dd96a58988b5f", "score": "0.53203887", "text": "public function setFieldIpAddress($fieldIpAddress)\n {\n $this->fieldIpAddress = (string) $fieldIpAddress;\n }", "title": "" }, { "docid": "b51bb3257f9b21da186bb7d810ec1a15", "score": "0.53100336", "text": "public function setAddress(SVZ_Solutions_Generic_Address $address)\n {\n $this->address = $address;\n }", "title": "" }, { "docid": "74b12105b02fc0d8ce9ca9b1e5675c99", "score": "0.5305111", "text": "public function setAddress(string $address) {\n\t\t$this->address = $address;\n\t}", "title": "" }, { "docid": "fcbcc88242fdf5949411b4c2baed54ec", "score": "0.53007084", "text": "public function setCheckIp($a_check_ip)\n\t{\n\t\tif (in_array(strtolower($a_check_ip), array('','0','off','false')))\n\t\t{\n\t\t\t$this->check_ip = false;\n\t\t}\n\t\telseif (in_array(strtolower($a_check_ip), array('1','on','true')))\n\t\t{\n\t\t\t$this->check_ip\t= true;\n\t\t}\n\t}", "title": "" }, { "docid": "732e47606e2f86e5f7d6b9ef53d6f938", "score": "0.5287522", "text": "function setAddress($new_address)\n {\n $this->address = $new_address;\n }", "title": "" }, { "docid": "90cf3c31f1e1a8512699de3a8764f9e4", "score": "0.52723235", "text": "public function setRobotAddress($_address)\n {\n\n }", "title": "" }, { "docid": "e5dd722a070ecd61a04f7fbd2c5299ef", "score": "0.5270427", "text": "public function setHost( $val ) {\n $this->_host = $val;\n }", "title": "" }, { "docid": "8ef6b9279976f394aa84219fa7b3b090", "score": "0.5269815", "text": "function setAddress($address=null){\r\n if($address)\r\n $this->address = $adress;\r\n }", "title": "" }, { "docid": "4306426ee4e87ec7872624ff07bd4de2", "score": "0.52221394", "text": "public function ip(string $ip): Builder\n {\n $this->args[] = '--ip';\n $this->args[] = $ip;\n return $this;\n }", "title": "" }, { "docid": "4657df8c23dc3377ebfd0b3bfbda4869", "score": "0.52210766", "text": "public function beforeSave()\n {\n $ip = getenv('REMOTE_ADDR');\n $this->owner->{$this->column} = (isset($ip) && !empty($ip))?$ip:'0.0.0.0';\n }", "title": "" }, { "docid": "c87e66d3c84a7695917649217f4e2eea", "score": "0.5220358", "text": "protected function resolveIpAddress(): string\n {\n $ipAddressResolver = Config::get('moderation.resolver.ip_address');\n\n if (is_subclass_of($ipAddressResolver, IpAddressResolver::class)) {\n return call_user_func([$ipAddressResolver, 'resolve']);\n }\n\n throw new ModerationException('Invalid IpAddressResolver implementation');\n }", "title": "" }, { "docid": "1d1dbb2dd76455e29b727eae67eda842", "score": "0.5218004", "text": "public function ip(string $ip = null): self\n {\n if ($ip === '') {\n throw new InvalidArgumentException('IP cannot be empty.');\n }\n\n return $this->set(['cip' => $ip]);\n }", "title": "" }, { "docid": "42b6f3ab646d802b8123350e75826f54", "score": "0.52132726", "text": "public function ip(): self\n {\n $this->addTest(\n __FUNCTION__,\n func_get_args(),\n function (string $value) {\n if (!filter_var($value, FILTER_VALIDATE_IP)) {\n throw new InvalidStringException('todo');\n }\n }\n );\n\n return $this;\n }", "title": "" }, { "docid": "0855a01c60a7a48ba3c94f5f739c7b90", "score": "0.5193419", "text": "public function __construct($fakeIp)\n {\n $this->setFakeIp($fakeIp);\n }", "title": "" }, { "docid": "482d5846f13f8b8824ffc60477565993", "score": "0.51910126", "text": "public function setAddress($address){\n $this->address = $address;\n }", "title": "" }, { "docid": "2128d66108dc9558666bf919a06f1732", "score": "0.5188712", "text": "public function setIPs(array $ips): void {\n $this->overwriteParts($this->ips, $ips, [$this, \"addIP\"]);\n }", "title": "" }, { "docid": "3ac703489b5c0396a0ab2bdb98401c73", "score": "0.51880246", "text": "public function setPosicionAddr($data)\n {\n\n if ($this->_posicionAddr != $data) {\n $this->_logChange('posicionAddr');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_posicionAddr = $data;\n } else if (!is_null($data)) {\n $this->_posicionAddr = (string) $data;\n } else {\n $this->_posicionAddr = $data;\n }\n return $this;\n }", "title": "" }, { "docid": "e712750df479c1168954a9daceed6e5d", "score": "0.5178098", "text": "public function setClientIp(string $ip)\n {\n return $this->setData('client.ip', $ip);\n }", "title": "" }, { "docid": "2e5e5ce27dee0520d22d3c0b6aac4b3e", "score": "0.5176244", "text": "public function address($ip4 = null);", "title": "" }, { "docid": "b81c126f08cc00f380d6b6e29a4047b2", "score": "0.5174446", "text": "private function setIPAddress(Host $entity)\n {\n $repository = $this\n ->getDoctrine()\n ->getRepository('Grupo3TallerUNLPHostBundle:IPAddress')\n ;\n $ipAddress = $repository->findOneBy(array(\n 'field1' => $entity->getIpAddressField1(),\n 'field2' => $entity->getIpAddressField2(),\n 'field3' => $entity->getIpAddressField3(),\n 'field4' => $entity->getIpAddressField4(),\n ));\n if (!$ipAddress) {\n $ipAddress = new IPAddress();\n $ipAddress->setField1($entity->getIpAddressField1());\n $ipAddress->setField2($entity->getIpAddressField2());\n $ipAddress->setField3($entity->getIpAddressField3());\n $ipAddress->setField4($entity->getIpAddressField4());\n $this->getDoctrine()->getManager()->persist($ipAddress);\n } else {\n $host = $this\n ->getDoctrine()\n ->getRepository('Grupo3TallerUNLPHostBundle:Host')\n ->findOneByIpAddress($ipAddress->getId())\n ;\n\n if ($host && $host->getId() != $entity->getId()) {\n return false;\n }\n }\n $entity->setIpAddress($ipAddress);\n return true;\n }", "title": "" }, { "docid": "5a093f1907d1cf53f6bb3b3383c7bd46", "score": "0.5173331", "text": "public static function bootIpAddress()\n {\n static::creating(function ($model) {\n $model->forceFill([\n $model->getIpAddressField() => $model->getIpAddress()\n ]);\n });\n }", "title": "" }, { "docid": "6633b3a4c408f9e1e5fab5e840a07c0f", "score": "0.51731575", "text": "protected function addIpAddresses()\n {\n foreach ($this->ipAddresses as $ipAddress) {\n $this->addIpAddress($ipAddress);\n }\n }", "title": "" }, { "docid": "0c50bef774dcdaabfa8280907b367047", "score": "0.5166676", "text": "public function setAddress($address)\n {\n $this->_address = $address;\n }", "title": "" }, { "docid": "eae86bcbc11cce54d2f4a424c97a7a49", "score": "0.51628023", "text": "public function setAddress($newAddress) {\n\t\t$this->address = Filter::filterString($newAddress, \"Restaurant address\", 128);\n\t}", "title": "" }, { "docid": "d0642943d2a0980e28c214bd80e3855e", "score": "0.516236", "text": "public function __construct($ip)\n {\n $this->ip = $ip;\n }", "title": "" }, { "docid": "47a7299659b2a8016a21834a5d90e967", "score": "0.51553273", "text": "public function setClientIpAddress($val)\n {\n $this->_client_ip_address = $val;\n\n return $this;\n }", "title": "" }, { "docid": "cef008c2fe64c9bb3198cbaccbdde96b", "score": "0.51314557", "text": "function placeholder_ip()\n{\n return '123.45.6.4';\n}", "title": "" }, { "docid": "ebc8f6f47273d1ff463b669577d7b248", "score": "0.51213396", "text": "protected function resolveListenAddress()\n {\n return \"0.0.0.0:{$this->tunnel->getServerPort()}\";\n }", "title": "" }, { "docid": "18361860070e787c6547943aba7a1a6f", "score": "0.51193625", "text": "public function setValue($value)\n {\n // Initialize\n $this->_Value = null;\n\n // Check argument type\n if ($value instanceof \\Foundation\\Type\\Complex\\CIp) {\n // Already an IP: nothing to do\n $this->_Value = $value->getValue();\n return $this;\n }\n // Other types: cast to string\n elseif ($value instanceof \\Foundation\\Type\\Simple\\CString || $value instanceof \\Foundation\\Type\\Complex\\CHostname) {\n $value = $value->getValue();\n } else {\n $value = is_string($value) ? trim($value) : '';\n }\n\n // Validate argument value\n if (strlen($value) > 1) {\n // Ipv6 or IPv4\n $this->_Value = filter_var($value, FILTER_VALIDATE_IP);\n if (false === $this->_Value) {\n // Not an IPv6 address or \"octet dotted\" IPv4 address.\n // Maybe an \"octal dotted\", \"hex dotted\" or \"binary dotted\" IPv4 address\n $this->_Value = $this->filterIPv4Special($value);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "77b242d339b0c66bebe50b2dc71d3539", "score": "0.51141137", "text": "function addIpAddress(){\n $remoteIp = new RemoteAddress();\n $remoteIp = $remoteIp->getIpAddress();\n return $remoteIp;\n}", "title": "" }, { "docid": "1ca5113c03efb3b6f545ccc2f4dde387", "score": "0.5101415", "text": "public function setAddress($address) {\n\t\t$this->address = $address;\n\t}", "title": "" }, { "docid": "628d2046b329e1ad831ef330c01e5eda", "score": "0.5098556", "text": "final public static function inet() {}", "title": "" }, { "docid": "8968defdd32961c671cae32c5eae3914", "score": "0.50832736", "text": "public function setAddress($address) {\n $this->address = $address;\n }", "title": "" }, { "docid": "66e3135d354915b4c9768a8ff071a6e0", "score": "0.5080104", "text": "public function setIpAddress($ip_address)\n {\n $this->ip_address = $ip_address;\n\n return $this;\n }", "title": "" }, { "docid": "ea6e3f027c62739e3438f415c2b94f39", "score": "0.50647414", "text": "public function setAddress($value = NULL){\n\t\t\tif(empty($value['addr1']) || is_null($value['addr1'])){\n\t\t\t\t$this->addr1 = NULL;\n\t\t\t}else{\n\t\t\t\t$this->addr1 = ucwords(strtolower($value['addr1']));\n\t\t\t}\n\n\t\t\tif(empty($value['addr2']) || is_null($value['addr2'])){\n\t\t\t\t$this->addr2 = NULL;\n\t\t\t}else{\n\t\t\t\t$this->addr2 = ucwords(strtolower($value['addr2']));\n\t\t\t}\n\n\t\t\tif(empty($value['city']) || is_null($value['city'])){\n\t\t\t\t$this->city = NULL;\n\t\t\t}else{\n\t\t\t\t$this->city = ucwords(strtolower($value['city']));\n\t\t\t}\n\n\t\t\tif(empty($value['state']) || is_null($value['state'])){\n\t\t\t\t$this->state = NULL;\n\t\t\t}else{\n\t\t\t\t$this->state = $value['state'];\n\t\t\t}\n\n\t\t\tif(empty($value['postcode']) || is_null($value['postcode'])){\n\t\t\t\t$this->postcode = NULL;\n\t\t\t}else{\n\t\t\t\t$this->postcode = $value['postcode'];\n\t\t\t}\n\n\t\t\tif(empty($value['country']) || is_null($value['country'])){\n\t\t\t\t$this->country = NULL;\n\t\t\t}else{\n\t\t\t\t$this->country = $value['country'];\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "b8fb8a860db169e15bbfd63b0b9d8814", "score": "0.50607705", "text": "function handleCDNRemoteAddressing() {\n if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];\n }\n}", "title": "" }, { "docid": "fb1555a7419175bf826b4bf50bd6476e", "score": "0.50580186", "text": "public static function expandIp($str){\n if (strlen($str) == 16 OR strlen($str) == 4 ){\n return inet_ntop(pack(\"A\".strlen($str), $str));\n }\n return false;\n }", "title": "" }, { "docid": "30bf6b23db6449dd2ff3c0665fad9f62", "score": "0.5047978", "text": "public function setSmdpPlusServerAddress(?string $value): void {\n $this->getBackingStore()->set('smdpPlusServerAddress', $value);\n }", "title": "" }, { "docid": "185b127a95534edb6da7101b47ae94eb", "score": "0.5033147", "text": "public function setClientIp($ip)\n {\n $this->_ip = $ip;\n return $this;\n }", "title": "" }, { "docid": "2e672b5d51fb1518460a2a1d16d53112", "score": "0.50269866", "text": "public function setAddress($address)\n {\n $this->address = $address;\n }", "title": "" }, { "docid": "3ed3b97fa362af4a9334fbfa86536c72", "score": "0.502687", "text": "function SetAddress($id, $address){\n\t}", "title": "" }, { "docid": "62f2db2ef75ce400259904175d363e03", "score": "0.5023391", "text": "public function resolveServer(string $ipAddress , $port);", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "69f4783706305bf958d20f4fc17c28a8", "score": "0.0", "text": "public function boot()\n {\n /*if (Schema::hasTable('messages')) {\n $unreadMessage = 0;\n $messages = Message::where('seen', 0)->get();\n if ($messages->count() > 0) {\n foreach ($messages as $row) {\n $unreadMessage++;\n }\n }\n view()->share('unreadMessage', $unreadMessage);\n }*/\n\n if (Schema::hasTable('page_contents')) {\n $checkIfPageContentIsEmpty = false;\n $checkPageContent = Page_content::all();\n if($checkPageContent->count() <= 0){\n $checkIfPageContentIsEmpty = true;\n }\n \n $web_details = Page_content::orderBy('updated_at', 'desc')->first();\n view()->share('web_details', $web_details);\n view()->share('checkIfPageContentIsEmpty', $checkIfPageContentIsEmpty);\n }\n\n // carousel\n if (Schema::hasTable('carousels')) {\n $carouselCounter = 0;\n $carouselEmpty = false;\n $carousels = Carousel::all();\n if ($carousels->count() <= 0) {\n $carouselEmpty = true;\n }\n\n $carousels = Carousel::orderBy('created_at', 'desc')->paginate(3);\n $fCarousel = Carousel::orderBy('created_at', 'desc')->paginate(1)->first();\n view()->share('carouselCounter', $carouselCounter);\n view()->share('carousels', $carousels);\n view()->share('fCarousel', $fCarousel);\n view()->share('carouselEmpty', $carouselEmpty);\n }\n\n // logo\n if (Schema::hasTable('logo')) {\n $logoEmpty = false;\n $logos = Logo::all();\n if ($logos->count() <= 0) {\n $logoEmpty = true;\n }\n\n $publicLogo = Logo::orderBy('created_at', 'desc')->paginate(1)->first();\n view()->share('publicLogo', $publicLogo);\n view()->share('logoEmpty', $logoEmpty);\n }\n\n // schoolname\n if (Schema::hasTable('schoolname')) {\n $schoolnameEmpty = false;\n $schoolnames = School::all();\n if ($schoolnames->count() <= 0) {\n $schoolnameEmpty = true;\n }\n\n $publicSchoolname = School::orderBy('created_at', 'desc')->paginate(1)->first();\n view()->share('publicSchoolname', $publicSchoolname);\n view()->share('schoolnameEmpty', $schoolnameEmpty);\n }\n\n // about\n if (Schema::hasTable('about')) {\n $aboutEmpty = false;\n $abouts = About::all();\n if ($abouts->count() <= 0) {\n $aboutEmpty = true;\n }\n\n $publicAbout = About::orderBy('created_at', 'desc')->paginate(1)->first();\n view()->share('publicAbout', $publicAbout);\n view()->share('aboutEmpty', $aboutEmpty);\n }\n\n Schema::defaultStringLength(191);\n \n }", "title": "" } ]
[ { "docid": "65e1897cca1d42c9dfa7e256f73059f1", "score": "0.77400774", "text": "protected function bootstrapAppServices(): void\n {\n /** @var \\Shore\\Framework\\Config $config */\n $config = $this->get(static::SERVICE_CONFIG);\n\n $services = $config->get('services', []);\n\n foreach ($services as $name => $service) {\n $this->register($name, $service);\n }\n }", "title": "" }, { "docid": "a953862c06144eec0a374cc3d6b2e3a0", "score": "0.7500909", "text": "public function initServices(): void\n {\n $loader = new SlimAppServiceLoader($this->containerBuilder);\n $loader->load();\n }", "title": "" }, { "docid": "a526ff606d24c8fa24764d0f3f80965d", "score": "0.74234164", "text": "public function boot()\n {\n foreach ($this->applicationServices as $interface => $service) {\n $this->app->bind($interface, $service);\n }\n }", "title": "" }, { "docid": "a10a50fdfacd0d62675b2189ff9b2ec3", "score": "0.7401033", "text": "public function boot()\n {\n foreach ($this->services as $service) {\n $service = new $service($this);\n $service->boot();\n }\n }", "title": "" }, { "docid": "985371a9d852380e92d1c26a29324440", "score": "0.7381968", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n $this->app->loadDeferredProviders();\n }", "title": "" }, { "docid": "c0d8c9b776eb6238199b836bbe22d91e", "score": "0.7209902", "text": "public function boot()\n {\n $dependecies = config('services-repositories');\n foreach ($dependecies as $dependecy) {\n $this->bindClasses($dependecy);\n }\n }", "title": "" }, { "docid": "2ae0af9e8eef5c05ee22acab06dea4a2", "score": "0.72000235", "text": "public function boot()\n {\n $this->app->singleton(CovidDataService::class, CovidDataServiceImpl::class);\n $this->app->singleton(OtpVerificationService::class, OtpVerificationServiceImpl::class);\n $this->app->singleton(PlasmaService::class, PlasmaServiceImpl::class);\n }", "title": "" }, { "docid": "645984425f903dbc7e9d5d3f20463fba", "score": "0.7150992", "text": "public function boot(): void\n {\n $this->loadTranslationsFrom(__DIR__ . '/Infra/Resources/lang', ':lc:package');\n $this->loadViewsFrom(__DIR__ . '/Infra/Resources/views', ':lc:package');\n $this->loadMigrationsFrom(__DIR__ . '/Infra/Database/Migrations');\n $this->loadRoutesFrom(__DIR__ . '/Infra/Routes/api.php');\n $this->loadRoutesFrom(__DIR__ . '/Infra/Routes/web.php');\n\n foreach (:uc:packageAutoWireServiceProvider::boot() as $contract => $class) {\n $this->app->bind($contract, $class);\n }\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n // Attach Package Console Kernel\n $this->app->booted(function () {\n (new Kernel())->schedule(app(Schedule::class));\n });\n }", "title": "" }, { "docid": "4808d2bffff5e046d3cc49aba9936a29", "score": "0.71462375", "text": "public function boot()\n {\n if (\\App::isLocal()) {\n $this->registerServiceProviders();\n $this->registerFacadeAliases();\n }\n }", "title": "" }, { "docid": "e8ed5a31a2732cfe1d2a68b4c4da178c", "score": "0.7145517", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "20a41bbc80194c76233b7b04081c0b41", "score": "0.7128625", "text": "public function boot()\n {\n $this->package('airavata/iam_admin_services');\n }", "title": "" }, { "docid": "740b3ba2d71e6b2dfa283694b522220d", "score": "0.71201175", "text": "public function boot()\n {\n $router = $this->app['router'];\n $router->pushMiddlewareToGroup('web', ServiceMiddleware::class);\n\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'service');\n $this->loadViewsFrom(resource_path('/views/vendors/service'), 'service');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/Adaa'),\n __DIR__.'/../resources/views' => resource_path('views/vendors/service'),\n ], 'Adaa');\n\n $this->commands([\n MigrateStatusCommand::class,\n ]);\n }", "title": "" }, { "docid": "a2dc2c604fc32f14cba58eee68d1b627", "score": "0.71116483", "text": "public function boot()\n {\n // Using app to load and rgister config.\n }", "title": "" }, { "docid": "605819fe9042106ee07ae3e4e85250e5", "score": "0.71036786", "text": "public function boot() {\n if (env('production')) {\n error_reporting(0);\n } else {\n error_reporting(E_ALL ^ E_NOTICE);\n \\Debugbar::enable();\n }\n\n app()->singleton(BreadcrumbsService::class, function ($app) {\n return new BreadcrumbsService();\n });\n \n Paginator::defaultView('vendor.pagination.default');\n }", "title": "" }, { "docid": "cc6b3527797869f9bb0e208deefbc555", "score": "0.7082232", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "219f37f7695bca1ac7a4c3e0a14a2701", "score": "0.70567733", "text": "public function boot()\n {\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthServiceImpl();\n });\n $this->app->bind(BlogService::class, function ($app) {\n return new BlogServiceImpl();\n });\n $this->app->bind(CategoryService::class, function ($app) {\n return new CategoryServiceImpl();\n });\n $this->app->bind(TagService::class, function ($app) {\n return new TagServiceImpl();\n });\n $this->app->bind(CommentService::class, function ($app) {\n return new CommentServiceImpl();\n });\n }", "title": "" }, { "docid": "6ae4980df34378b3a00c8c5bfe52e3c2", "score": "0.70427245", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ServiceMakeCommand::class\n ]);\n }\n }", "title": "" }, { "docid": "375e20e4f66429580c26c92cec8d1d5e", "score": "0.7011949", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "375e20e4f66429580c26c92cec8d1d5e", "score": "0.7011949", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "375e20e4f66429580c26c92cec8d1d5e", "score": "0.7011949", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "7b2580b64441548a0a1052165130e47f", "score": "0.7011273", "text": "public function bootstrap()\n {\n if (method_exists($this->app, 'bootstrapWith')) {\n $this->app->bootstrapWith($this->bootstrappers);\n }\n }", "title": "" }, { "docid": "26704f960a7c4f4050976653f7a86b86", "score": "0.6992603", "text": "public function boot()\n {\n $this->app->singleton(DragonPayService::class, function ($app) {\n return new DragonPayService();\n });\n\n $this->mergeConfigFrom(__DIR__ . '/../../../../config/laravel.php', 'dragonpay');\n\n $this->loadMigrationsFrom(__DIR__ . '/../../../../migrations');\n }", "title": "" }, { "docid": "7540f923bdd353f4916aa394a17a2292", "score": "0.6988632", "text": "public function boot(): void\n {\n $this->registerMiddleware();\n $this->configureRateLimiting();\n $this->registerPolicies();\n $this->registerEvents();\n $this->registerRoutes();\n $this->registerChannels();\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'messenger');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "ad115a7c0fbb1dbe297dde511bbf15e5", "score": "0.69533503", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'lws');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'lws');\n $this->loadMigrationsFrom(__DIR__.'/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "d138ae42c55476acc12d6521601b2dc1", "score": "0.69522524", "text": "public function boot()\n {\n $this->app->bind(PostcodeServiceInterface::class, PostcodeService::class);\n $this->app->bind(FranchiseServiceInterface::class, FranchiseService::class);\n $this->app->bind(ContractFinanceServiceInterface::class, ContractFinanceService::class);\n $this->app->bind(SmsServiceInterface::class, MessageMediaService::class);\n $this->app->bind(EmailServiceInterface::class, PostmarkService::class);\n }", "title": "" }, { "docid": "7682104683a1c72b4c1bdc2d1ad7e720", "score": "0.6948129", "text": "public function boot()\n\t{\n\t\t// Register classes and commands\n\t\t$this->app = $this->bindClasses($this->app);\n\t\t$this->app = $this->bindScm($this->app);\n\t\t$this->app = $this->bindCommands($this->app);\n\n\t\t// Add commands to Artisan\n\t\tforeach ($this->commands as $command) {\n\t\t\t$this->commands($command);\n\t\t}\n\t}", "title": "" }, { "docid": "b77700a2c7b94cef7a4d8a345c8a10db", "score": "0.6932989", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n PresetCommand::macro('docker', function ($command) {\n try {\n DockerPreset::install();\n } catch (AlreadyInstalledException $e) {\n $command->warn('It seems the Docker preset was already installed in this project.');\n $command->warn('Skipped.');\n return;\n }\n $command->info('Docker preset scaffolding installed successfully.');\n $command->info(<<<EOF\nMake sure you update your .env file with the required envs:\n\nDOCKER_APP_PORT=80\nDOCKER_DB_PORT=3306\nDOCKER_TEST_DB_PORT=3307\n\nThen you should be able to:\n\n - Install composer dependencies with:\n docker-compose run --rm app composer install\n - Boot the application: \n docker-compose up -d\n\nEOF\n );\n });\n\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('docker-preset.php'),\n ], 'config');\n }\n }", "title": "" }, { "docid": "ffcc92442de4baca464316a6366d1314", "score": "0.69127077", "text": "public function boot()\n {\n $this->publishes([\n __DIR__.'/../config/azure-cognitive-services-ui.php' => config_path('azure-cognitive-services-ui.php'),\n ]);\n\n // Database migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Routes\n if(config('azure-cognitive-services-ui.general.enable_routes',true) === true) {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n }\n\n // Views\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'azure-cognitive-services-ui');\n\n // Console commands\n if ($this->app->runningInConsole()) {\n $this->commands([\n AcsLpgTrainingStatus::class, // acs:updateLpgTrainingStatus {force?}\n AcsSyncLpgFromAzure::class, // acs:updateLpgTrainingStatus {force?}\n ]);\n }\n }", "title": "" }, { "docid": "e93e5a2545e544a9ffbc772396ab2431", "score": "0.690455", "text": "public function boot()\n {\n Log::pushProcessor(new ContainerRoleProcessor());\n\n date_default_timezone_set('America/New_York');\n if ($this->app->environment('production')) {\n config(['backpack.base.skin' => 'skin-blue']);\n }\n\n if ($this->app->environment('local', 'demo')) {\n config(['backpack.base.logo_lg' => '<b>ClinGen</b> - '.$this->app->environment()]);\n }\n\n if (config('app.url_scheme')) {\n URL::forceScheme(config('app.url_scheme'));\n }\n\n $this->app->bind(ValidGeneSymbolRule::class, ValidHgncGeneSymbol::class);\n\n $this->app->bind(ClientInterface::class, function () {\n return new Client();\n });\n\n $this->registerActionsAsCommands();\n }", "title": "" }, { "docid": "c9b96f480ca717f7742e2e5dc35c3e57", "score": "0.68957466", "text": "public function boot()\n {\n $this->bootRoutes();\n $this->bootResources();\n $this->bootMigrations();\n $this->bootPublishing();\n $this->bootDirectives();\n $this->bootComponents();\n }", "title": "" }, { "docid": "ca8316b05bcc7b29325187b0fccdf2e7", "score": "0.6893173", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');\n }\n\n if (! $this->app->configurationIsCached()) {\n $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'microboard');\n }\n\n $this->registerResources();\n }", "title": "" }, { "docid": "32661fbbb485013b9234bac0d126b573", "score": "0.6874853", "text": "public function boot()\n {\n $this->app->bind(\n \\App\\Contracts\\ConfigFileContract::class,\n \\App\\Services\\ConfigFile\\BasicConfigFile::class\n );\n $this->app->bind(\n \\App\\Contracts\\GridsContract::class,\n \\App\\Services\\Grids\\LeftRightGrids::class\n );\n $this->app->bind(\n \\App\\Contracts\\ServerManagerContract::class,\n \\App\\Services\\ServerManager\\ClientServerManager::class\n );\n $this->app->bind(\n \\App\\Contracts\\ServerProviderContract::class,\n \\App\\Services\\ServerProvider\\LinodeServerProvider::class\n );\n $this->app->bind(\n \\App\\Contracts\\VoiceServerContract::class,\n \\App\\Services\\VoiceServer\\DiscordVoiceServer::class\n );\n }", "title": "" }, { "docid": "b7c0f158c2de0ecec075e52544193de2", "score": "0.68704015", "text": "public function boot()\n {\n HorizonConfigTagsService::boot();\n }", "title": "" }, { "docid": "bcb18de84e377e470459bf869e75fde4", "score": "0.6867912", "text": "public function boot()\n {\n // Autoload most of the Containers and Ship Components\n $this->runLoadersBoot();\n\n // load all service providers defined in this class\n parent::boot();\n\n // Solves the \"specified key was too long\" error, introduced in L5.4\n Schema::defaultStringLength(191);\n\n // Registering custom validation rules\n $this->extendValidationRules();\n }", "title": "" }, { "docid": "354764fd63f411e87946031b1c796b66", "score": "0.6846958", "text": "public function boot()\n {\n //Bind Service\n $this->app->bind(UserService::class, function()\n {\n $user = new User();\n $user_repo = new MySqlUserRepository($user);\n\n return new UserService($user_repo);\n });\n\n $this->app->bind(RoleService::class, function()\n {\n $role = new Role();\n $role_repo = new MySqlRoleRepository($role);\n\n return new RoleService($role_repo);\n });\n\n $this->app->bind(MessageService::class, function()\n {\n $message = new Message();\n $message_repo = new MySqlMessageRepository($message);\n\n return new MessageService($message_repo);\n });\n\n $this->app->bind(NotificationService::class, function()\n {\n $notification = new Notification();\n $notification_repo = new MySqlNotificationRepository($notification);\n\n return new NotificationService($notification_repo);\n });\n\n //Bind Repository\n $this->app->bind(UserRepository::class, function()\n {\n $user = new User();\n\n return new MySqlUserRepository($user);\n });\n\n $this->app->bind(RoleRepository::class, function()\n {\n $role = new Role();\n\n return new MySqlRoleRepository($role);\n });\n\n $this->app->bind(UserRolesRepository::class, function()\n {\n $user_roles = new UserRoles();\n\n return new MySqlUserRolesRepository($user_roles);\n });\n\n $this->app->bind(MessageRepository::class, function()\n {\n $message = new Message();\n\n return new MySqlMessageRepository($message);\n });\n\n $this->app->bind(MessageDetailRepository::class, function()\n {\n $message_detail = new MessageDetail();\n\n return new MySqlMessageDetailRepository($message_detail);\n });\n\n $this->app->bind(NotificationRepository::class, function()\n {\n $notification = new Notification();\n\n return new MySqlNotificationRepository($notification);\n });\n }", "title": "" }, { "docid": "487a33b283b5ac9dfeecc8a76ea1293a", "score": "0.6845267", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'e200');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'e200');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "9d902814ca4c8e331398cabca156d1c8", "score": "0.68442684", "text": "public function boot()\n {\n require __DIR__ . '/Support/helper.php';\n\n if ($this->app->runningInConsole()) {\n $this->registrConsole();\n $this->registerPublishing();\n $this->loadMigrationsFrom(\n __DIR__.'/../database/migrations'\n );\n }\n\n $this->registerRoutes();\n $this->mergeConfigFrom(\n __DIR__ . '/../config/currency.php', 'currency'\n );\n }", "title": "" }, { "docid": "d52820cf5dc39c10db814f08012ad9d9", "score": "0.6840047", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ScaffoldingInstallCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "2c992d0bd2d1a30c6e7f20ebf04ea86b", "score": "0.6838888", "text": "public function boot()\n {\n $mgmtServer = SiteConfig::whereParameter('mgmtServer')->first();\n $apiKey = SiteConfig::whereParameter('apiKey')->first();\n $secretKey = SiteConfig::whereParameter('secretKey')->first();\n\n\n // Endpoint, API Key, Secret Key\n try {\n $this->cloudstack = new CloudStackClient($mgmtServer->data, $apiKey->data, $secretKey->data);\n } catch (\\Exception $e) {\n $this->cloudstack = ['error' => $e->getMessage()];\n }\n }", "title": "" }, { "docid": "9ad06933cc06685bf28f0784829fcfc0", "score": "0.6837013", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Repository::class,\n Service::class,\n File::class,\n View::class,\n Resource::class,\n Controller::class\n ]);\n }\n }", "title": "" }, { "docid": "9b2e0ff3136dac21af99973d3e7213cc", "score": "0.6836688", "text": "public function boot()\n {\n // First we bootstrap configurations\n $this->bootstrapConfigs();\n\n $this->bootstrapViews();\n $this->publishAssets();\n $this->bootstrapValidator();\n }", "title": "" }, { "docid": "43488c5703f4b94009cad07a438bc8e9", "score": "0.6807719", "text": "public function boot()\n {\n $this->strapEvents();\n $this->strapRoutes();\n $this->strapHelpers();\n $this->strapCommands();\n }", "title": "" }, { "docid": "30a770f00f541d8ddb958e9bb4129218", "score": "0.6807386", "text": "public function boot()\n {\n // use this if your package has views\n $this->loadViewsFrom(realpath(dirname(__DIR__, 1) . '/resources/views'), 'swarovsky-subscriptions');\n\n // use this if your package has lang files\n $this->loadTranslationsFrom(dirname(__DIR__, 1) . '/resources/lang', 'swarovsky-subscriptions');\n\n // use this if your package has routes\n $this->setupRoutes($this->app->router);\n $this->loadMigrationsFrom(dirname(__DIR__, 1).'/migrations');\n\n /*\n $this->mergeConfigFrom(\n dirname(__DIR__, 1).'/config/swarovsky-core.php', 'swarovsky-core'\n );\n */\n }", "title": "" }, { "docid": "1e428da86d9cd7117d64b5382862bee3", "score": "0.6796689", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n AppName::class\n ]);\n }\n }", "title": "" }, { "docid": "2d7148c4b9ed553c81d6df3ce12a1cb9", "score": "0.6793287", "text": "public function boot()\r\n\t{\r\n\t\t$this->package('darsain/console');\r\n\r\n\t\t//Include the routes\r\n\t\tinclude_once __DIR__ . '/../../routes.php';\r\n\t\t//Include helper file\r\n\t\tinclude_once __DIR__ . '/../../helpers.php';\r\n\t}", "title": "" }, { "docid": "7bc2ca8684201594d28eca8dd2010dcc", "score": "0.6790511", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishesConfig();\n $this->publishesMigrations();\n }\n }", "title": "" }, { "docid": "fc8070a1370d4e42e1c85c5a726614bd", "score": "0.679049", "text": "public function boot(): void\n {\n $this->configure();\n $this->offerPublishing();\n $this->registerEvents();\n $this->registerServices();\n $this->registerCommands();\n $this->registerFrontend();\n $this->defineAssetPublishing();\n $this->registerLogger();\n }", "title": "" }, { "docid": "0d780d6b9ca15a79d5d024d7a33e0767", "score": "0.67861885", "text": "public function boot()\n {\n $this->publishes([\n __DIR__.'/../resources/config/serviceman.php' => config_path('serviceman.php'),\n ]);\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n Commands\\MakeService::class,\n Commands\\MakeServiceCommand::class,\n Commands\\MakeServiceHandler::class,\n Commands\\MakeServiceMiddleware::class,\n ]);\n }\n }", "title": "" }, { "docid": "40279e6dc46dc3127365e872a0ae4416", "score": "0.67836696", "text": "public function boot()\n {\n Facade::setHttpClient($this->app['coreapi\\Utilities\\Http\\Curl\\HttpClient']);\n ExceptionHandler::setCircuitBreaker($this->app['coreapi\\Utilities\\Http\\CircuitBreaker\\CircuitBreaker']);\n }", "title": "" }, { "docid": "cbfdc7b8f236cb0013bf7de317b7bd70", "score": "0.67822045", "text": "public function boot()\n {\n $kernel = $this->app->make(Kernel::class);\n $kernel->pushMiddleware(SchoolService::class);\n\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'school');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'school');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n }", "title": "" }, { "docid": "06a9ddbba271b697443b7a250615319e", "score": "0.6781005", "text": "public function boot()\n {\n if (true === $this->booted) {\n return;\n }\n\n // init container\n $this->initializeContainer();\n\n // init bundles\n $this->initializeBundles();\n\n foreach ($this->getBundles() as $bundle) {\n if ($bundle instanceof ContainerAwareInterface) {\n $bundle->setContainer($this->container);\n }\n\n $bundle->boot();\n }\n\n $this->booted = true;\n\n $this->initializeMiddleware();\n }", "title": "" }, { "docid": "df993a437a5d79c53ecb18d07cd385d9", "score": "0.6778282", "text": "public function boot()\n {\n $this->middlewares();\n }", "title": "" }, { "docid": "07d6760cbe893aeed4a54ef8b6254dae", "score": "0.67732817", "text": "public function boot()\n {\n // registering the contract\n $this->app->bind(ImageManageContract::class, function ($app, $parameters) {\n if (isset($parameters['service'])) {\n $imageServices = new Collection([\n SelfHostedImageService::NAME => SelfHostedImageService::class,\n ImgbbImageService::NAME => ImgbbImageService::class,\n ]);\n\n return app($imageServices[$parameters['service']]);\n }\n });\n }", "title": "" }, { "docid": "04627c147d654dd45fe98c6c3740de76", "score": "0.6773225", "text": "public function boot()\n {\n $this->bootBladeDirective();\n $this->bootViewComposer();\n }", "title": "" }, { "docid": "175c92e03c9071ee2b3ab6259b3278ae", "score": "0.6772187", "text": "public function boot()\n {\n // Load views\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'Install');\n\n // Load translations\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'Install');\n\n // Load helper\n if (\\File::exists(__DIR__ . '/../../helper/helper.php')) {\n include __DIR__ . '/../../helper/helper.php';\n }\n\n $this->registerPolices();\n }", "title": "" }, { "docid": "49a67f947f333f90592b09c993106059", "score": "0.67710763", "text": "public function boot()\n {\n $this->registerMiddleware();\n\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'kubis');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'agegate');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "586ed20de09e374ed9d00306c73b3113", "score": "0.6766397", "text": "public function boot()\n\t{\n\t\t// load autoload from package composer.json\n\t\trequire $this->app->basePath() . '/workbench/syscover/pulsar-core/vendor/autoload.php';\n\n // register routes\n $this->loadRoutesFrom($this->app->basePath() . '/workbench/syscover/pulsar-core/src/routes/api.php');\n\n // register views\n $this->loadViewsFrom($this->app->basePath() . '/workbench/syscover/pulsar-core/src/resources/views', 'core');\n\n // register config files\n $this->publishes([\n $this->app->basePath() . '/workbench/syscover/pulsar-core/src/config/pulsar-core.php' => config_path('pulsar-core.php')\n ]);\n\n // register translations\n $this->loadTranslationsFrom($this->app->basePath() . '/workbench/syscover/pulsar-core/src/resources/lang', 'core');\n }", "title": "" }, { "docid": "958254ded3bda51c5f5b0e1f1387c487", "score": "0.6752585", "text": "public function boot()\n {\n $this->addConsoleUtils();\n\n $this->addCollectionMacro();\n\n $this->addCustomMappers();\n }", "title": "" }, { "docid": "534020f639f9c27d9e3eafb8aeebc797", "score": "0.6740694", "text": "public function boot()\n {\n Spark::details($this->details);\n\n Spark::sendSupportEmailsTo($this->sendSupportEmailsTo);\n\n if (count($this->developers) > 0) {\n Spark::developers($this->developers);\n }\n\n if (count($this->admins) > 0) {\n Spark::admins($this->admins);\n }\n\n if (count($this->roles) > 0) {\n Spark::useRoles($this->roles);\n }\n\n if ($this->usesTwoFactorAuth) {\n Spark::useTwoFactorAuth();\n }\n\n if ($this->usesApi) {\n Spark::useApi();\n }\n\n Spark::tokensCan($this->tokensCan);\n\n Spark::byDefaultTokensCan($this->byDefaultTokensCan);\n\n $this->booted();\n\n if (Spark::billsUsingBraintree()) {\n $this->configureBraintree();\n }\n }", "title": "" }, { "docid": "94ca82121de6ac6ac58cac59b213aad2", "score": "0.67393875", "text": "public function boot()\n {\n// $this->app->register(AssetsServiceProvider::class);\n// $this->app->register(MenuServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerLibraries();\n\n }", "title": "" }, { "docid": "efbfc7e64613bdbfc13587e2fe3f938d", "score": "0.6735546", "text": "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.map.baidu.com/location/ip',\n 'query' => [\n 'ak' => $this->config('key'),\n 'coor' => $this->config('coor'),\n ],\n ]);\n }", "title": "" }, { "docid": "e3235ab47516ecaebd45a6bbb71af0bc", "score": "0.6726162", "text": "public function boot()\n {\n \\Laravel\\Scout\\Builder::mixin(new BaseBuilderMixin());\n\n $this->app->extend(EngineManager::class, function (EngineManager $obj) {\n return $obj->extend('xunsearch', function () {\n return new XunSearchEngine(\n $this->app->make(ClientFactory::class, [\n 'config' => $this->app['config']['xunsearch']\n ])\n );\n });\n });\n }", "title": "" }, { "docid": "9265955ec33d2c3deef4b14b97846fe9", "score": "0.67178655", "text": "public function boot()\n\t{\n\t\t$this->package('palmabit/catalog');\n\n // include filters\n require __DIR__ . \"/../../filters.php\";\n // include routes.php\n require __DIR__ . \"/../../routes.php\";\n // include view composers\n require __DIR__ . \"/../../composers.php\";\n // include custom validators\n require __DIR__ . \"/../../validators.php\";\n // various includes\n require __DIR__ . \"/../../includes.php\";\n\n $this->bindRepositories();\n\t}", "title": "" }, { "docid": "6b605a2c2a41ecdc1e575d7523e61b9d", "score": "0.67124957", "text": "public function boot ()\n {\n container('juicer.cache')->extend('wordpress', function ($app) {\n global $wpdb;\n return container('juicer.cache')->repository(new WordPressStore($wpdb->prefix.'juicer_'));\n });\n }", "title": "" }, { "docid": "c5763c8d4577c843111ab3296c71c0e0", "score": "0.6705841", "text": "public function boot()\n {\n require __DIR__ . '/../vendor/autoload.php';\n\n $this->setupRoutes($this->app->router);\n }", "title": "" }, { "docid": "402b749d7add4be23583eb092fed1b5c", "score": "0.66998345", "text": "public function boot(): void\n {\n $loader = AliasLoader::getInstance();\n $loader->alias('PackageBuilder', PackageBuilderFacade::class);\n\n $this->app->singleton('engine', function ()\n {\n return new PackageBuilder();\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n PackageCreateCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "152fb10d8d2d08202739c420cdf0c3e0", "score": "0.66995335", "text": "public function boot()\n {\n Nova::script('here-api-map-tool', __DIR__ . '/../dist/js/tool.js');\n Nova::style('here-api-map-tool', __DIR__ . '/../dist/css/tool.css');\n }", "title": "" }, { "docid": "c7212b0ea698139a888f0471cc51adc3", "score": "0.6690939", "text": "public function boot() {\n }", "title": "" }, { "docid": "ddc5f671de5e45c644174db1a2a4594f", "score": "0.6688457", "text": "public function boot()\n {\n // app()->singleton('App\\Services\\Myself', function ($app) {\n // $myself = new Myself();\n // return $myself;\n // });\n }", "title": "" }, { "docid": "f0d9a392fe630e84812adeb7e2431c25", "score": "0.6687141", "text": "public function boot()\n {\n $dotEnv = \\Dotenv\\Dotenv::create(__DIR__ . '../..');\n $dotEnv->safeLoad();\n $dotEnv->required(['GITLAB_TOKEN'])->notEmpty();\n\n /** @var Container $container */\n $container = $this->getContainer();\n\n $container->add('SLACK_WEBHOOK_URL', getenv('SLACK_WEBHOOK_URL'));\n $container->add('SLACK_CHANNEL', getenv('SLACK_CHANNEL'));\n $container->add('GITLAB_TOKEN', getenv('GITLAB_TOKEN'));\n $container->add('GITLAB_URL', (getenv('GITLAB_URL') ? getenv('GITLAB_URL') : 'https://gitlab.com'));\n }", "title": "" }, { "docid": "5f47674acde8c03baa45e7e11a3c8b5a", "score": "0.66758645", "text": "public function boot(): void\n {\n $source = __DIR__ . '/../../config/prometheus.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => base_path('config/prometheus.php')], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('prometheus');\n }\n\n $this->mergeConfigFrom($source, 'prometheus');\n\n $this->loadRoutes();\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
7e44b9c2166443a9cdeae8949191063d
//////////////News Management Ends////////////// ///////////////Faqs Management //////////////////
[ { "docid": "140e88b5aec3fae82f40e7ed6ccc1ed6", "score": "0.5995631", "text": "public function admin_faqsList() \r\n\t{\r\n\t\t$cond=array();\r\n\t\t$this->admin_check_login();\r\n\t\t$this->loadModel('Faq');\r\n\t\t\r\n\t\tif(isset($this->request->data['Faq']))\r\n\t\t{\t\t\t\t\t\r\n\t\t\t$this->Session->write('FaqSearch',$this->request->data['Faq']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\r\n\t\t\t$this->request->data['Faq']=$this->Session->read('FaqSearch');\t\t\r\n\t\t}\t\t\r\n\t\tif(isset($this->request->data['Faq']))\t\t\t\t\r\n\t\t{\t\t\t\r\n\t\t\tif(isset($this->request->data['Faq']['question']) and !empty($this->request->data['Faq']['question']))\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t$cond['Faq.question LIKE']=\"%\".$this->request->data['Faq']['question'].\"%\";\r\n\t\t\t}\t\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t$conditions = array(\r\n\t\t\t'Faq.id !=' => BOOL_FALSE,\r\n\t\t\t'Faq.is_deleted' => BOOL_FALSE\r\n\t\t);\r\n\t\t$conditions=array_merge($conditions,$cond);\t\t\r\n\t\t\r\n\t\t$this->Paginator->settings = array(\r\n\t\t\t'Faq' => array(\r\n\t\t\t\t'conditions' => $conditions,\r\n\t\t\t\t'order' => array('Faq.id' => 'DESC'),\r\n\t\t\t\t'limit' => PAGINATION_LIMIT,\r\n\t\t\t\t'recursive' =>-1\r\n\t\t));\r\n\t\t$faqs_list = $this->Paginator->paginate('Faq');\r\n\t\t$this->set(compact('faqs_list'));\t\r\n }", "title": "" } ]
[ { "docid": "ffd650122d6a121539553a9648963719", "score": "0.6511145", "text": "public function faq() {\n $this -> load -> model('front/contentmodel', '', TRUE);\n\n //Get active parent categories to be displayed that contain active not deleted products\n $data['categories'] = $this -> categories;\n\n //Get all active categories to be displayed that contain active not deleted products\n $data['all_categories'] = $this -> all_categories;\n\n // Get FAQ text\n $data['faq_text'] = $this -> contentmodel -> get_content(FAQ);\n\n $this -> template -> front_view('front/faq', $data, 1);\n }", "title": "" }, { "docid": "2c35544e25eef2febb748845a31acfd8", "score": "0.63704556", "text": "function faq(){\n $this->admin->start_session();\n if(!$this->admin->is_loggedin())\n {\n redirect('admin/home/login');\n }\n $this->data[\"all_faq\"] = $this->event_model->display_faq();\n //$this->data[\"all_course\"] = $this->course_model->get_course();\n $this->load->view('admin/add-faq', $this->data);\n }", "title": "" }, { "docid": "2cc5cf9605b2e66d704d75d7afe17b97", "score": "0.61878246", "text": "public function faq()\n\t\t{\n\t\t\t$this->load->model('profilemodel');\n\t\t $data['result'] = $this->profilemodel->getAllFaqData();\n\t\t\t$this->load->view('profile/faq', $data);\n\t\t\n\t\t}", "title": "" }, { "docid": "cd7f9bdf351be723a35ce72edfc05a45", "score": "0.6072929", "text": "function newFaq(){\r\n\t\tif($this->Session->user('users_statut')==\"admin\"){\r\n\t\t\t$this->loadBean('FaqBean');\r\n\t\t\t$id=$this->FaqBean->getFaqs_id();\r\n\t\t\t$faqs=new FaqBean(); \t\t\r\n\t\t\t$d['faq']=$faqs;\r\n\t\t\t$this->set($d);\r\n\t\t\t$this->render('newFaq'); }\r\n\t\telse {\r\n\t\t\t$this->Session->setFlash('Vous devez être administrateur pour accéder à cette page','error');\r\n\t\t\t$this->redirect('');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fc560c95c2fcace6b57b3f8713ccd038", "score": "0.59957355", "text": "function faq_list()\n\t{\n\t\t$page_data['page_name']\t\t=\t'faq_list';\n\t\t$page_data['page_title']\t=\t'Administrar preguntas frecuentes';\n\t\t$this->load->view('backend/index', $page_data);\n\t}", "title": "" }, { "docid": "b2e18e3e00845ef4e23157b67f736f44", "score": "0.5962504", "text": "public function faqs() \n\t{\n\t\t$faqs\t\t=\t$this->Faq->find ('all');\n\t\t//pr ($faqs);die;\n\t\t$response = array ('success'=>1,'message'=>'success.');\n\t\tif (!empty($faqs)) {\n\t\t\tforeach($faqs as $info) {\n\t\t\t\t$response['data'][]\t=\tarray(\n\t\t\t\t\t'faq_id'\t\t\t=> $info['Faq']['id'],\n\t\t\t\t\t'title'\t\t\t\t=> $info['Faq']['title'],\n\t\t\t\t\t'description'\t=> @$info['Faq']['description'],\n\t\t\t\t\t'date'\t\t\t\t=> @$info['Faq']['date'],\n\t\t\t\t);\n\t\t\t}\n\t\t\techo json_encode ($response);exit;\n\t\t}\n\t\t$response = array ('success'=>0,'message'=>'data not found.');\n\t\techo json_encode($response);exit;\n\t}", "title": "" }, { "docid": "d49e4ecc4beecfbd853c5c2f8304dfaa", "score": "0.59458745", "text": "public function faq()\n\t{ \n $this->code_image();\n if(DB::table('generalsettings')->find(1)->is_faq == 0){\n return redirect()->back();\n }\n $faqs = DB::table('faqs')->orderBy('id','desc')->get();\n\t\treturn view('front.faq',compact('faqs'));\n\t}", "title": "" }, { "docid": "693d0c81b430f436689f3ce78829aefb", "score": "0.58911294", "text": "public function getWebDesginFaqs()\n\n {\n $this->checkPermission(4);\n\n $pageTitle = \"All Web Design FAQS\";\n\n // model\n $webDesignFaqs = $this->webDesignFAQModel->getAllWebDesignFaqs();\n\n // view\n include (WEBINTY_VIEWS.'/admin/header.html');\n include (WEBINTY_VIEWS.'/admin/menu.html');\n include (WEBINTY_VIEWS.'/admin/nav.html');\n include (WEBINTY_VIEWS.'/admin/webDesignFaqs.html');\n }", "title": "" }, { "docid": "816ce15b74550024dc03d396655419bf", "score": "0.58567214", "text": "function faqs() {\n $this->load->view('documentation\\faqs');\n }", "title": "" }, { "docid": "ad1fc3a034c5e88e497f5c423f5acc6b", "score": "0.58533657", "text": "function add_faqs(){ \n\t\tinclude(\"db.php\");\n\t\tif (isset($_POST['add_faqs'])) {\n\t\t\t$ques=$_POST['ques'];\n\t\t\t$ans=$_POST['ans'];\n\n\t\t\t$check=$con->prepare(\"select * from faqs where ques='$ques'\");\n\t\t\t$check->setFetchMode(PDO:: FETCH_ASSOC);\n\t\t\t$check->execute();\n\t\t\t$count=$check->rowCount();\n\n\t\t\tif ($count==1) {\n\t\t\t\techo \"<script>alert('FAQs Already Added')</script>\";\n\t\t\t\techo \"<script>window.location('index.php?FAQs','_self')</script>\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$add_cat=$con->prepare(\"insert into faqs(ques,ans)values('$ques','$ans')\");\n\n\t\t\t\tif ($add_cat->execute()) {\n\t\t\t\t\techo \"<script>alert('FAQs Successfully Added')</script>\";\n\t\t\t\t\techo \"<script>window.location('index.php?faqs','_self')</script>\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo \"<script>alert('FAQs not Successfully Added')</script>\";\n\t\t\t\t\techo \"<script>window.location('index.php?faqs','_self')</script>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "3f37d9f49776c0a21f1f84ffdea0f094", "score": "0.5825458", "text": "public function faqAction() {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sugg_admin_main', array(), 'module_suggestion_faq');\n }", "title": "" }, { "docid": "a91305f585728ce1a97223dbb5cd3fa5", "score": "0.579489", "text": "public function category_faq()\n {\n if (!$this->Owner) {\n $this->session->set_flashdata('warning', lang('access_denied'));\n redirect('welcome');\n }\n $this->data['error'] = validation_errors() ? validation_errors() : $this->session->flashdata('error');\n $bc = array(array('link' => base_url(), 'page' => lang('home')), array(\n 'link' => site_url('system_settings'),\n 'page' => lang('system_settings')\n ), array('link' => '#', 'page' => \"CMS Faq POS\"));\n $meta = array('page_title' => 'Category Faq POS', 'bc' => $bc);\n $this->page_construct('settings/category_faq', $meta, $this->data);\n }", "title": "" }, { "docid": "8dd1f2b97a57f62a34a7245d0a41847d", "score": "0.5773844", "text": "public function index()\n {\n //\n return view('admin.af-login.cmsManagement.faqs.index');\n }", "title": "" }, { "docid": "845f5a03a02dc7dfcfe507dd830fb05b", "score": "0.5771511", "text": "function murrietamusicstudio_faqs() {\n\t\t$args = array(\n\t\t\t\"labels\" => array(\n\t\t\t\t\"name\" => __( \"FAQs\" ),\n\t\t\t\t\"singular_name\" => __( \"FAQ\" )\n\t\t\t),\n\t\t\t\"description\" => __( \"Description\", \"murrietamusicstudio\" ),\n\t\t\t\"public\" => true,\n\t\t\t\"publicly_queryable\" => true,\n\t\t\t\"rewrite\" => array( \"slug\" => \"faqs\" ),\n\t\t\t\"show_ui\" => true,\n\t\t\t\"menu_position\" => 30\n\t\t);\n\t\t\n\t\t\n\t\tregister_post_type( \"faqs\", $args);\n\t}", "title": "" }, { "docid": "57e2c26affa072d478dfa7f8b3e7c7bf", "score": "0.5769687", "text": "public function actionFaqFeedback()\n {\n $faqFeedBacks = Yii::$app->db_prod->createCommand(\"SELECT * FROM faq_feed_backs\")->queryAll();\n foreach ($faqFeedBacks as $faqFeedBack) {\n if ($this->faqFeedbackExists($faqFeedBack['faq_feed_backs_id'])) {\n continue;\n }\n\n $this->migrateFaqFeedback($faqFeedBack);\n }\n\n return null;\n }", "title": "" }, { "docid": "c400f613af2487976c8223279d3f9af8", "score": "0.5673786", "text": "public function show(FAQ $fAQ)\n {\n //\n }", "title": "" }, { "docid": "03f5dd321489018047adf46cae38f920", "score": "0.56723356", "text": "public function actionFaqs()\n {\n $this->redirect(array('/faq/'), true, 301);\n }", "title": "" }, { "docid": "16d5c60671e7c6b4c46ad4755a547fce", "score": "0.56712294", "text": "public function actionFaq() {\n\t\t// renders the view file 'protected/views/index/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render ( 'faq' );\n\t}", "title": "" }, { "docid": "d777657e37c86ba2dd821677a7f2b6a8", "score": "0.56365955", "text": "public function create_new_faq_article() {\n \n // Create Faq Article\n (new MidrubBaseAdminCollectionSupportHelpers\\Faq)->create_new_faq_article();\n \n }", "title": "" }, { "docid": "b839a0846a4c46e58b951edce25a0f89", "score": "0.55958676", "text": "function getAllNews(){\n\n}", "title": "" }, { "docid": "a6a5b6baa6aeee6ce5084d87fdc1f0b0", "score": "0.5585413", "text": "public function news_feed() {\n\t\t$this->load->model('BusinessModel');\n\t\t$this->data['posts_data'] = $this->BusinessModel->getmypost($this->businessId);\n\t\t$this->showPage('news_feed', $this->data);\n\t}", "title": "" }, { "docid": "2a7bff09d55004b37737a4d7236643e3", "score": "0.5583687", "text": "public function faq_index(){\n $pageTitle = \"FAQ's \";\n $data = Faq::latest('id')->get();\n return View::make('admin.faq.index', compact('data','pageTitle'));\n }", "title": "" }, { "docid": "8cb20f23f674299ddc3ebff456da7732", "score": "0.5582788", "text": "function fn_add_faq($faq_data, $faq_message)\n{\n\tif (fn_check_availible_thread($faq_data['thread_id'])) {\n\t\t$object = fn_faq_get_object_by_thread($faq_data['thread_id']);\n\t\tif (empty($object)) {\n\t\t\tfn_set_notification('E', __('error'), __('cant_find_thread'));\n\t\t\treturn array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['redirect_url'] . $suffix);\n\t\t}\n\t\t$approve = Registry::get('addons.altteam_faq.approve_customer_message');\n\t\tif (AREA == 'A' || $approve == 'Y') {\n\t\t\t$faq_data['status'] = 'A';\n\t\t}\n\t\tif (empty($faq_data['faq_id'])) { //если новый вопрос\n\t\t\tif (!empty($faq_message['message'])) {\n //FIXME, ADD status set check @ 2014/06/29\n\t\t\t\t$faq_data['status'] = isset($faq_data['status']) ? $faq_data['status'] : 'A';\n\t\t\t\t$faq_message['faq_id']=db_query('INSERT INTO ?:faq_data ?e', $faq_data);\n\t\t\t\t$faq_message['type'] = 'Q';\n\n\t\t\t\tfn_insert_new_message($faq_message, $faq_message['faq_id']);\n\n\t\t\t\tif (AREA == 'C') {\n\t\t\t\t\tfn_set_notification('N', __('Notice'), __('submitted_question'));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (fn_check_faq_id_by_thread_id($faq_data['faq_id'], $faq_data['thread_id'])) {\n\n PC::debug($faq_message, 'fn_add_faq');\n\n\t\t\t\tfn_insert_new_message($faq_message, $faq_data['faq_id']);\n //FIXME, check status first @2014/06/30\n\t\t\t\tif (isset($faq_data['status']) == 'A') {\n\t\t\t\t\tfn_send_answer_email($faq_message, $faq_data['faq_id']);\n\t\t\t\t}\n\n\t\t\t\tif (AREA == 'C') {\n\t\t\t\t\tfn_set_notification('N', __('Notice'), __('submitted_answer'));\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (AREA == 'C') {\n\t\t\t\t\tfn_set_notification('E', __('error'), __('not_submitted_answer'));\n\t\t\t\t}\n//\t\t\t\tdie('fn_check_faq_id_by_thread_id = false');\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (AREA == 'C') {\n\t\t\tfn_set_notification('E', __('error'), __('not_submitted_answer'));\n\t\t}\n//\t\tdie('missing thread_id');\n\t}\n}", "title": "" }, { "docid": "02af40521c9fdcf0036eb85593643605", "score": "0.5581013", "text": "function faq(){\n\t\t$this->layout = 'comman';\n\t\t$faqData = $this->Question->find('all', array('conditions' => array('Question.status' => 1)));\n\t\t$totalHelpCount = count($this->Help->find('all'));\n\t\t$this->set('totalHelpCountt',$totalHelpCount);\n\t\t\t\tforeach($faqData as $key=>$val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$helpCount=count($val['Help']);\n\t\t\t\t\t\t\t$vals[$key]['Count']=$helpCount;\n\t\t\t\t\t\t\t$vals[$key]['id']=$val['Question']['id'];\n\t\t\t\t\t\t\t$vals[$key]['title']=$val['Question']['title'];\n\t\t\t\t\t\t\t$vals[$key]['question']=$val['Question']['question'];\n\t\t\t\t\t\t\t$vals[$key]['answer']=$val['Question']['answer'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_multisort($vals, SORT_DESC, $faqData);\n\t\t\t\t\t\t$this->set('faq',$vals);\n\t\t\t\t\t\t//pr($vals);die('here');\n\t\t\t\t\t}", "title": "" }, { "docid": "7f30a19f04afdc935799806e1d7804cc", "score": "0.5579065", "text": "public function myPostsAction()\n {\n $this->confirmSession();\n Tag::prependTitle('My News');\n $this->showNews(['userId' => $this->session->get('user')['id']]);\n }", "title": "" }, { "docid": "b2a8a956eeed969e2f450fbefb88fd60", "score": "0.55657375", "text": "function __construct() {\r\n\t\t$this->_model = new FaqModel();\r\n\t\t\r\n\t\tif (isset ( $_POST [\"submitfaq\"] ) && isset ( $_POST [\"categorie_id\"] ) && isset ( $_POST [\"vraag\"] ) && isset ( $_POST [\"antwoord\"] )) {\r\n\t\t\t$faq = new Faq ();\r\n\t\t\t$faq->vraag = $_POST [\"vraag\"];\r\n\t\t\t$faq->antwoord = $_POST [\"antwoord\"];\r\n\t\t\t$faq->header = $_POST [\"categorie_id\"];\r\n\t\t\t$faq->id = $_POST [\"id\"];\r\n\t\t\tif (! $this->_model->saveFaq ( $faq, true )) {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=noSuccess' );\r\n\t\t\t} else {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=Success' );\r\n\t\t\t}\r\n\t\t\t$faqs = $this->_model->getFaqs ();\r\n\t\t}\r\n\t\t\r\n\t\tif (isset ( $_POST [\"deletefaq\"] )) {\r\n\t\t\t$id = $_POST [\"id\"];\r\n\t\t\tif ($this->_model->deleteFaq ( $id )) {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=Success' );\r\n\t\t\t} else {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=noSuccess' );\r\n\t\t\t}\r\n\t\t\t$faqs = $this->_model->getFaqs ();\r\n\t\t}\r\n\t\t\r\n\t\tif (isset ( $_POST [\"nieuwcat\"] )) {\r\n\t\t\t$faq = new Faq ();\r\n\t\t\t$faq->header = $_POST [\"nieuwecategorie\"];\r\n\t\t\t$faq->icon = $_POST [\"icon\"];\r\n\t\t\tif ($this->_model->insertCategorie ( $faq )) {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=Success' );\r\n\t\t\t} else {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=noSuccess' );\r\n\t\t\t}\r\n\t\t\t$categorieen = $this->_model->getCategories ();\r\n\t\t}\r\n\t\t\r\n\t\tif (isset ( $_POST [\"nieuwfaq\"] )) {\r\n\t\t\t$faq = new Faq ();\r\n\t\t\t$faq->vraag = $_POST [\"nieuwvraag\"];\r\n\t\t\t$faq->antwoord = $_POST [\"nieuwantwoord\"];\r\n\t\t\t$faq->header = $_POST [\"nieuwcategorie\"];\r\n\t\t\tif ($this->_model->saveFaq ( $faq, false )) {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=Success' );\r\n\t\t\t} else {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=noSuccess' );\r\n\t\t\t}\r\n\t\t\t$faqs = $this->_model->getFaqs ();\r\n\t\t}\r\n\t\tif (isset ( $_POST [\"deletecategorie\"] )) {\r\n\t\t\t$categorie_id = $_POST [\"categorie_id\"];\r\n\t\t\tif ($this->_model->deleteCategorie ( $categorie_id )) {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=Success' );\r\n\t\t\t} else {\r\n\t\t\t\theader ( 'location: ../../../admin.php?controller=editfaq&action=noSuccess' );\r\n\t\t\t}\r\n\t\t\t$categorieen = $this->_model->getCategories ();\r\n\t\t\t$faqs = $this->_model->getFaqs ();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b4576be1755eeada30f26de3c5fe0c63", "score": "0.5551971", "text": "public function index()\n\t{\n\n\t\t//Get limit to calculate pagination \n\t\t$limit = ( Input::get( 'limit', '50' ) );\n\n\t\t//If not numeric set it to the default limit\n\t\t$limit = ( !is_numeric( $limit ) || $limit < 1 ) ? 50 : $limit;\n\n\t\t//Get page\n\t\t$page = ( Input::get( 'page', '1' ) );\n\t\t$page = ( !is_numeric( $page ) ) ? 1 : $page;\n\n\t\t//Calculate offset\n\t\t$offset = ( $page * $limit ) - $limit;\n\n\t\t//If page is greter than one show a previous link\n\t\tif( $page > 1 )\n\t\t{\n\t\t\t$previous = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$previous = false;\n\t\t}\n\n\t\t//Find total number to put in header\n\t\t$count = Faq::all()->count();\n\n\t\t//If the count is greater than the highest number of items displayed show a next link\n\t\tif( $count > ( $limit * $page ) )\n\t\t{\n\t\t\t$next = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$next = false;\n\t\t}\n\n\t\t$faqs = Faq::take( $limit )->skip( $offset )->get();\n\n\t\t$return[ 'faqs' ] = [ ];\n\n\t\tforeach( $faqs as $faq )\n\t\t{\n\n\t\t\t$current = [ ];\n\n\t\t\t$current[ 'faqId' ] = $faq->faq_id;\n\t\t\t$current[ 'faqQuestion' ] = $faq->faq_question;\n\t\t\t$current[ 'faqAnswer' ] = $faq->faq_answer;\n\n\t\t\t$return[ 'faqs' ][] = $current;\n\t\t}\n\n\t\t$status_code = 200;\n\n\t\t//If next is true create next page link\n\t\tif( $next )\n\t\t{\n\t\t\t$return[ 'next' ] = \"http://\" . $_ENV['URL'] . \"/faq/?\" . http_build_query( [ \"limit\" => $limit, \"page\" => $page + 1 ] );\n\t\t}\n\n\t\tif( $previous )\n\t\t{\n\t\t\t$return[ 'previous' ] = \"http://\" . $_ENV['URL'] . \"/faq/?\" . http_build_query( [ \"limit\" => $limit, \"page\" => $page - 1 ] );\n\t\t}\n\n\t\t$response = Response::make( $return, $status_code );\n\n\t\t$response->header( 'X-Total-Count', $count );\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9d9e29c41ba557e7079726dcaaf42e55", "score": "0.5544316", "text": "public function index(){\n $where = array(\n \"status_faq\" => 0\n );\n $data[\"faq\"] = $this->M_crud->selectJeenFaq($where);\n $this->load->view(\"req/head-open\");\n $this->load->view(\"req/styles/cart-css\");\n $this->load->view(\"req/head-close\");\n $this->load->view(\"req/menu\");\n $this->load->view(\"req/audio\");\n /*--------------------------------------*/\n $this->load->view(\"mainpages/faq\",$data);\n /*--------------------------------------*/\n $this->load->view(\"req/close\");\n }", "title": "" }, { "docid": "0f1d3cbf4537b302a3776167f3c9ac31", "score": "0.553774", "text": "public function index()\n {\n $data['MainMenus'] = MenuSystem::where('menu_system_part', 'Faqs')->with('MainMenu')->first();\n $data['Menus'] = MenuSystem::ActiveMenu()->get();\n // $data['QuestionCategory'] = QuestionCategory::where('ques_category_status', '1')->get();\n $data['Language'] = Language::where('languages_status', '1')->get();\n // return $data;\n if (Helper::CheckPermissionMenu('Faqs', '1')) {\n return view('admin.Faqs.faqs', $data);\n } else {\n return redirect('admin/');\n }\n }", "title": "" }, { "docid": "cbc34f452ffbcd14f9d1cd3ff2c75f4e", "score": "0.5525228", "text": "public function faqs($id){\n $nombre=Manuales::find($id)->nombre;//nombre Del Manual\n $contenedorSecciones= new OrganizadorFaq($id);\n $nombreSecc=$contenedorSecciones->secciones();\n $faqs=$contenedorSecciones->faqs();\n return view('plataforma.cliente.faqs',compact('id','nombre','nombreSecc','faqs'));\n }", "title": "" }, { "docid": "1274b58b505e16e6023fb48736508319", "score": "0.55234885", "text": "function AddNewNews()\n\t\t{\n\t\t global $_CONF;\n\t\t\t$this->AffiliateAuthenticate();\n\t\t\t\n\t\t\t$loggedInAffiliate = $_SESSION['username'];\n\t\t\t$affID = $this->oModel->getAffiliateID($loggedInAffiliate);\n\t\t\t\n\t\t\t//die(\"AddNewContent\");\n\t\t\t//$oArticle\t= new Article();\n\n\t\t\t$this->oModel->mBillContent->article_title \t\t\t= \thtmlentities(trim($_REQUEST['title']), ENT_QUOTES);\n\t\t\t$this->oModel->mBillContent->article_type\t\t\t=\ttrim($_REQUEST['article_type']);\n\t\t\t\n\t\t\t\t\n\t\t\t$this->oModel->mBillContent->affiliate_comment\t\t=\thtmlentities(trim($_REQUEST['affiliate_comment']), ENT_QUOTES);\n\t\t\t$this->oModel->mBillContent->created\t\t\t\t=\tdate('Y-m-d');\n\t\t\n\t\t\t\n\t\t\t// Apply Validations Here \n\t\t\t$this->oView->article = $this->oModel->mBillContent;\t\n\t\t\t\n\t\t\t/*\t\n\t\t\tif(!empty($_REQUEST['pdf_name'])){\n\t\t\t\t\n\t\t\t\t//FILE UPLOAD \t\t\t\t\t\t\t\n\t\t\t\t$uploadpath\t\t=\t$_CONF['UploadDoc'];\n\t\t\t\t$tmp_file_name \t= \t $uploadpath.$_REQUEST['pdf_name'];\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tif(file_exists($tmp_file_name))\n\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t$pdf_name \t= explode(\".\",$_REQUEST['pdf_name']);\n\t\t\t\t\t$pdf_name_ext\t= $pdf_name[count($pdf_name)-1];\n\t\t\t\t\t\n\t\t\t\t\t$art_id = $this->oModel->addAffiliateNews($affID);\n\t\t\t\t\t\t\n\t\t\t\t\tif($art_id) \n\t\t\t\t\t{\t\t\n\t\t\t\t\t\t$new_pdf_name\t= $_CONF['UploadDoc'].$art_id.\"_article_attachement.\".$pdf_name_ext;\n\t\t\t\t\t\t$old_pdf_name\t=\t$tmp_file_name;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->oModel->mBillContent->support_file \t= $art_id.\"_article_attachement.\".$pdf_name_ext;\n\t\t\t\t\t\t$this->oModel->mBillContent->id \t\t\t= \t$art_id;\t\t\t\t\t\t\n\t\t\t\t\t\t$rs_banner = $this->oModel->updateAffiliateArticle($this->oModel->mBillContent);\n\t\t\t\t\t\t\n\t\t\t\t\t\t@rename($old_pdf_name, $new_pdf_name);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$msg = \"Article added successfully.\";\n\n\t\t\t\t\t\tif($this->oModel->mBillContent->article_type == 'news')\t{\n\t\t\t\t\t\t\t$msg = \"News added successfully.\";\n\t\t\t\t\t\t} else if($this->oModel->mBillContent->article_type == 'bulletin')\t{\n\t\t\t\t\t\t\t$msg = \"Bulletin added successfully.\";\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=AffiliateDashboard&msg=\".$msg.\"'</script>\";\n\t\t\t\t\t\tdie();\t\t\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//$msg = \"Server error, please try again.\";\n\t\t\t\t\t\t$msg = \"server_error.\";\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$msg = \"Only pdf files(max size 5MB) can be uploaded.\";\t\t\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$art_id = $this->oModel->addAffiliateNews($affID);\n\t\t\t\tif($art_id) {\n\t\t\t\t\n\t\t\t\t\t$msg = \"Article added successfully.\";\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=AffiliateDashboard&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//$msg = \"Server error, please try again.\";\n\t\t\t\t\t$msg = \"server_error.\";\t\t\t\t\t\t\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\tif(isset($_FILES) && !empty($_FILES['bill_name']['name'])){\n\t\t\t\t\n\t\t\t\t//FILE UPLOAD \t\t\t\t\t\t\t\t\t\n\t\t\t\t$tmp_file_name\t\t= \t$_FILES['bill_name']['tmp_name'];\t\t\t\t\t\t\n\t\t\t\t$uploadpath\t\t\t=\t$_CONF['UploadDoc'];\t\t\t\t\t\n\t\t\t\t$max_size\t\t\t=\t5242880; //in bytes = 5 MB\n\t\t\t\t$file_type \t\t\t=\t$_FILES['bill_name']['type'];\t\t\t\t\t\n\t\t\t\t$ext_allowed\t\t=\tarray('application/pdf');\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$isValidFileType \t=\t$this->checkFileType($ext_allowed, $file_type);\t\t\t\t\t\t\n\t\t\t\t$file_size\t\t\t= \tfilesize($filepath);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tif($isValidFileType && ($file_size < $max_size) ) \n\t\t\t\t{\t\t\t\n\t\t\t\t\t$temp\t\t= session_id();\t\t\t\n\t\t\t\t\t$LogoName \t= explode(\".\",$_FILES['bill_name']['name']);\n\t\t\t\t\t$LogoExt\t= $LogoName[count($LogoName)-1];\n\t\t\t\t\t$file_name_path\t= $uploadpath.$temp.'.'.$LogoExt;\n\t\t\t\t\n\t\t\t\t\t$result = move_uploaded_file($tmp_file_name, $file_name_path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($result) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t$art_id = $this->oModel->addAffiliateNews($affID);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($art_id) \n\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t$newBannerName\t= $_CONF['UploadDoc'].$art_id.\"_article_attachement.\".$LogoExt;\n\t\t\t\t\t\t\t$oldLogoName\t=\t$_CONF['UploadDoc'].$temp.\".\".$LogoExt;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->oModel->mBillContent->support_file \t= $art_id.\"_article_attachement.\".$LogoExt;\n\t\t\t\t\t\t\t$this->oModel->mBillContent->id \t\t\t= \t$art_id;\t\t\t\t\t\t\n\t\t\t\t\t\t\t$rs_banner = $this->oModel->updateAffiliateArticle($this->oModel->mBillContent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(rename($oldLogoName, $newBannerName)) {\n\t\t\t\t\t\t\t\tunlink($oldLogoName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$msg = \"Article added successfully.\";\n\n\t\t\t\t\t\t\tif($this->oModel->mBillContent->article_type == 'news')\t{\n\t\t\t\t\t\t\t\t$msg = \"News added successfully.\";\n\t\t\t\t\t\t\t} else if($this->oModel->mBillContent->article_type == 'bulletin')\t{\n\t\t\t\t\t\t\t\t$msg = \"Bulletin added successfully.\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=AffiliateDashboard&msg=\".$msg.\"'</script>\";\n\t\t\t\t\t\t\tdie();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//$msg = \"Server error, please try again.\";\n\t\t\t\t\t\t\t$msg = \"server_error.\";\t\t\t\t\t\t\n\t\t\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t} else {\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$msg = \"File uploading failed due to some technical reason. Please try later.\";\n\t\t\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$msg = \"Only pdf files(max size 5MB) can be uploaded.\";\t\t\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$art_id = $this->oModel->addAffiliateNews($affID);\n\t\t\t\tif($art_id) {\n\t\t\t\t\n\t\t\t\t\t$msg = \"Article added successfully.\";\n\n\t\t\t\t\tif($this->oModel->mBillContent->article_type == 'news')\t{\n\t\t\t\t\t\t$msg = \"News added successfully.\";\n\t\t\t\t\t} else if($this->oModel->mBillContent->article_type == 'bulletin')\t{\n\t\t\t\t\t\t$msg = \"Bulletin added successfully.\";\n\t\t\t\t\t} \n\n\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=AffiliateDashboard&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//$msg = \"Server error, please try again.\";\n\t\t\t\t\t$msg = \"server_error.\";\t\t\t\t\t\t\n\t\t\t\t\techo \"<script>location='index.php?stage=affiliates&mode=SubmitNewContent&msg=\".$msg.\"'</script>\";\n\t\t\t\t\tdie();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "8bed50d457c5b014c2ce5529c3748f53", "score": "0.55050087", "text": "public function index()\n {\n $post = faqs::where('isActive',1)->get();\n return view('Faqs.index',compact('post'));\n }", "title": "" }, { "docid": "fc23e177b7218156fe0828970a876adf", "score": "0.5495169", "text": "public function getFaq()\n {\n //\n $faqs = Faq::orderBy('id')->paginate(5);\n return view('camecafe.faqs.faq')->with('faqs', $faqs);\n }", "title": "" }, { "docid": "231541b227e5fc13f1605938924d6cf5", "score": "0.5480748", "text": "public function faqs()\n {\n return view('static.faq');\n }", "title": "" }, { "docid": "207f66b3fcd708bd1ac6701e9dea559d", "score": "0.5470293", "text": "public function index()\n\t{\n\t\t$q = Input::get('q');\n\t\t$news = NewsItem::with('feed')\n\t\t\t ->where('title', 'LIKE', \"%$q%\")\n\t\t\t ->orWhere('intro', 'LIKE', \"%$q%\")\n\t\t\t ->orderBy('date', 'desc')\n\t\t\t\t->paginate(50);\n\t\treturn view('admin.news', ['news' => $news, 'query' => $q]);\n\t}", "title": "" }, { "docid": "8fb154a84e54d76b1951c7bee2736178", "score": "0.54673463", "text": "function index() {\r\n\t\t$administratorId = $this->Session->read('administrator.id');\r\n\t\t$this->indexRelatedNews($administratorId);\r\n\t}", "title": "" }, { "docid": "71c80ad6a023b1af03b21a502c35b0cb", "score": "0.546301", "text": "public function index()\r\n {\r\n $data['faqs'] = Faq::latest()->get();\r\n return view('admin.faq.index', $data);\r\n }", "title": "" }, { "docid": "add288dc6728645007181956364b2eb5", "score": "0.54607236", "text": "public function getFAQsLists() {\n //get admin id from session \n $admin_id = Session::get('bio_admin_id');\n if($admin_id == \"\"){\n return Redirect::to('/backend');\n }\n $data = DB::table('tbl_faqs')->orderBy('id')->get();\n return view('admin.manage-faqs')->with('data', $data);\n }", "title": "" }, { "docid": "334d8329ee86f8a0291fd2fb395ba18b", "score": "0.54550683", "text": "public function index()\n {\n //\n abort_if(Gate::denies('faq_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $faqs = FAQ::get();\n return view('admin.faqs.index', compact('faqs'));\n }", "title": "" }, { "docid": "0cdbed446df88ff26f047fe73ecf5f83", "score": "0.5437005", "text": "public function index() #/news/\n\t{\n\t\t$this->article();\n\t}", "title": "" }, { "docid": "25f1c0618a8672629cd0438e97dde8e2", "score": "0.5434233", "text": "public function index()\n {\n $faqs = Faq::with('faqCategory')->get();\n $faq_categories = FaqCategory::orderBy('name', 'asc')->get();\n return view('backend.cms.faqs.faqs', compact('faqs', 'faq_categories'));\n }", "title": "" }, { "docid": "9f6e079b80f547b4325cd2e4c33b46e6", "score": "0.5432539", "text": "public function faq($enc_type)\r\r\n {\r\r\n try\r\r\n {\r\r\n\t\t\t\r\r\n\t\t\t$s_type = decrypt($enc_type);\r\r\n\t\t\t\r\r\n\t\t\t$this->load->model('faq_model','mod_faq');\r\r\n\t\t\t// fetch the question answer\r\r\n\t\t\t$s_lang_query = \" And n.i_status=1 \";\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t//echo\t$s_lang_query ;\r\r\n\t\t\tif($s_type==1)\t\t// buyers faq\r\r\n\t\t\t{\r\r\n\t\t\t $this->data['breadcrumb'] = array(addslashes(t('Buyer FAQ'))=>'');\r\r\n\t\t\t $this->i_footer_menu = 3;\r\r\n\t\t\t $this->s_meta_type = 'faq_buyer';\t\r\r\n $s_where = ' WHERE n.i_user_type='.$s_type; \r\r\n $faq_list = $this->mod_faq->fetch_multi($s_where);\r\r\n $this->data['faq_list'] = $faq_list;\r\r\n $this->data['arr_cat'] = $this->db->ARR_CATEGORY['BUYER_FAQ'];\r\r\n \r\r\n\t\t\t $this->render('home/buyer_faq');\r\r\n\t\t\t}\t\t\t\r\r\n\t\t\tif($s_type==2)\t\t// tradesman faq\r\r\n\t\t\t{\r\r\n\t\t\t $this->data['breadcrumb'] = array(addslashes(t('Tradesman FAQ'))=>'');\r\r\n\t\t\t\t$this->i_footer_menu = 6;\r\r\n\t\t\t $this->s_meta_type = 'faq_tradesman';\t\t\t\r\r\n\t\t\t $s_where = ' WHERE n.i_user_type='.$s_type; \r\r\n $faq_list = $this->mod_faq->fetch_multi($s_where);\r\r\n $this->data['faq_list'] = $faq_list;\r\r\n $this->data['arr_cat'] = $this->db->ARR_CATEGORY['TRADESMAN_FAQ'];\r\r\n\t\t\t $this->render('home/tradesman_faq');\r\r\n\t\t\t}\r\r\n\t\t\t//$this->render(); \r\r\n\t\t}\r\r\n catch(Exception $err_obj)\r\r\n {\r\r\n show_error($err_obj->getMessage());\r\r\n } \t \r\r\n }", "title": "" }, { "docid": "a264aaab836f7bf4d7963aa0e13a1ffe", "score": "0.5430701", "text": "public static function getNewsList()\n {\n \n }", "title": "" }, { "docid": "32b132020f6dd81e313999b3f1b41d2d", "score": "0.54300946", "text": "public function Newsfeed_details($user_id,$newsfeed_id)\r\t{\r\t\t\t$assets_url = $this->config->item(\"assets_url\").\"newsfeed/\";\r\t\t\t$assets_gallery_url = $this->config->item(\"assets_url\").\"gallery/\";\r\r\t\t\r\t\t\t$update_sql = \"UPDATE news_feed SET view_count = view_count+1 WHERE id ='$newsfeed_id'\";\r \t\t$update_view_count = $this->db->query($update_sql);\r\t\t\t\r\t\t\t$query = \"SELECT * FROM news_feed WHERE id = $newsfeed_id\";\r\t\t\t$resultset = $this->db->query($query);\r\t\t\tif($resultset->num_rows()>0) {\r\t\t\t\tforeach ($resultset->result() as $rows)\r\t\t\t\t{\r\t\t\t\t\t$newsfeed_id = $rows->id;\r\t\t\t\t\t$nf_cover_image = $assets_url.$rows->nf_cover_image;\r\t\t\t\t\t\r\t\t\t\t\t\t$query1 = \"SELECT * FROM nf_likes_history WHERE user_id ='$user_id' AND nf_id = '$newsfeed_id'\";\r\t\t\t\t\t\t$resultset1 = $this->db->query($query1);\r\t\t\t\t\t\tif($resultset1->num_rows()>0) {\r\t\t\t\t\t\t\t$l_status = 'Y';\r\t\t\t\t\t\t}else {\r\t\t\t\t\t\t\t$l_status = 'N';\r\t\t\t\t\t\t}\r\t\t\t\t\t\t \r\t\t\t\t\t$news_result[] = array(\r\t\t\t\t\t\t\"newsfeed_id\" => $rows->id,\r\t\t\t\t\t\t\"nf_profile_type\" => $rows->nf_profile_type,\r\t\t\t\t\t\t\"title_ta\" => $rows->title_ta,\r\t\t\t\t\t\t\"title_en\" => $rows->title_en,\r\t\t\t\t\t\t\"description_ta\" => $rows->description_ta,\r\t\t\t\t\t\t\"description_en\" => $rows->description_en,\r\t\t\t\t\t\t\"news_date\" => $rows->news_date,\r\t\t\t\t\t\t\"nf_cover_image\" => $nf_cover_image,\r\t\t\t\t\t\t\"nf_video_token_id\" => $rows->nf_video_token_id,\r\t\t\t\t\t\t\"gallery_status\" => $rows->gallery_status,\r\t\t\t\t\t\t\"view_count\" => $rows->view_count,\r\t\t\t\t\t\t\"likes_count\" => $rows->likes_count,\r\t\t\t\t\t\t\"share_count\" => $rows->share_count,\r\t\t\t\t\t\t\"comments_count\" => $rows->comments_count,\r\t\t\t\t\t\t\"status\" => $rows->status,\r\t\t\t\t\t\t\"like_status\" => $l_status\r\t\t\t\t\t);\r\t\t\t\t}\r\t\t\t}\r\r\t\t\t$img_query = \"SELECT * FROM nf_image_gallery WHERE nf_id = '$newsfeed_id' \";\r\t\t\t$img_res = $this->db->query($img_query);\r\t\t\t$image_count = $img_res->num_rows();\r\t\t\t\r\t\t\tif($img_res->num_rows()>0) {\r\t\t\t\tforeach ($img_res->result() as $rows)\r\t\t\t\t{\r\t\t\t\t\t$gallery_url = $assets_gallery_url.$rows->nf_image;\r\t\t\t\t\t\r\t\t\t\t\t$image_result[] = array(\r\t\t\t\t\t\t\"gallery_id\" => $rows->id,\r\t\t\t\t\t\t\"gallery_url\" => $gallery_url\r\t\t\t\t\t);\r\t\t\t\t}\r\t\t\t}else {\r\t\t\t\t$image_result = array();;\r\t\t\t}\t\t\t\r\t\t\t$response = array(\"status\" => \"Success\", \"msg\" => \"News Details\", \"news_result\" =>$news_result, \"image_count\" =>$image_count, \"image_result\" =>$image_result);\r\t\t\t\t\t\r\t\treturn $response;\r\t}", "title": "" }, { "docid": "f05cbdd810eb04613e062f776a41a946", "score": "0.54281557", "text": "function frontpageFeeds($frontpage = 1, $action = 'front_yes')\n\t{\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to '.$action ) );\n\t\t}\n\t\t$model = &FGFactory::getFeedModel();\n\t\tif(!$model->frontpage($cid, $frontpage)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\t\t$this->setRedirect( 'index.php?option=com_feedgator&task=feeds' );\n\t}", "title": "" }, { "docid": "959cdbfe65468f11506f973571cb7500", "score": "0.54256666", "text": "public function index()\n {\n $faqs = Faq::all();\n return view('admin.faq.index')->with([\n 'faqs' => $faqs,\n ]);\n }", "title": "" }, { "docid": "63d2070ceb010fb968aff0045c3aeb01", "score": "0.5419681", "text": "public function indexAction()\n {\n $this->getResponse()->setHeader(\"Content-Type\", 'application/rss+xml; charset=UTF-8', true);\n\n $id = Bigace_Config::get(\"news\", \"root.id\");\n $lang = Bigace_Config::get(\"news\", \"default.language\");\n\n $ir = new Bigace_Item_Request(_BIGACE_ITEM_MENU, $id);\n $ir->setLanguageID($lang)\n ->setReturnType(\"Bigace_News_Item\")\n ->setOrderBy(\"valid_from\")\n ->setOrder('DESC')\n ->setLimit(0, 10);\n\n $this->view->NEWS = new Bigace_Item_Walker($ir);\n\n // for correct date formatting required!\n setlocale(LC_TIME, \"en_EN\");\n\n $type = $this->getRequest()->getParam('type', null);\n\n switch($type) {\n case Zend_Feed_Writer::TYPE_ATOM_ANY:\n case Zend_Feed_Writer::TYPE_RSS_ANY:\n break;\n \tdefault:\n \t\t$type = Zend_Feed_Writer::TYPE_ATOM_ANY;\n \t\tbreak;\n }\n $url = 'news/feed/index/';\n if ($type !== null) {\n $url .= $type . '/';\n }\n\n $this->view->FEED_FULL = false;\n $this->view->FEED_URL = LinkHelper::url($url);\n $this->view->FEED_TYPE = $type;\n }", "title": "" }, { "docid": "48c771a4bb42b357baafd454ca8587dd", "score": "0.54019415", "text": "function display_faqs_listing( $title_dev_faqs_listing_records, $page_link, $pageno )\n\t{\n\t\tif( $title_dev_faqs_listing_records != false )\n\t\t{\n\t\t\t$sr = ($pageno * RECORDS_PER_PAGE) - RECORDS_PER_PAGE +1;\n\t\t\tfor( $i = 0; $i < count( $title_dev_faqs_listing_records ); $i++ )\n\t\t\t{\n\t\t\t\t$faq_id = $title_dev_faqs_listing_records[$i]['faq_id'];\n\n\t\t\t\t$status = $title_dev_faqs_listing_records[$i]['faq_status'] == 1 ? \"<a href='\".$page_link.\"&amp;faq_id=\".$faq_id.\"&amp;action=change_status' title='In Active'><span class='active'><img src='images/active.png' alt='Active' border='0'></span></a>\" : \"<a class='inactive' href='\".$page_link.\"&amp;faq_id=\".$faq_id.\"&amp;action=change_status' title='Active'><span class='inactive'><img src='images/inactive.png' alt='Inactive' border='0'></span></a>\";\n\t\t\t\t\n\t\t\t\t$edit_link = \"<a class='mislink' href='index.php?module_name=faq_management&amp;file_name=add_faq&amp;faq_id=\".$faq_id.\"&amp;tab=faq' title='Edit'><img src='images/edit.png' alt='Edit' border='0'></a>\";\n\n\t\t\t\t$delete_link = \"<a title='Delete' class='mislink' href='javascript:void(0);' onclick='javascript: if( confirm(\\\"Are you sure to delete this record?\\\") ) { window.location= \\\"\".$page_link.\"&amp;action=delete&amp;faq_id=\".$faq_id.\"\\\"; }'><img src='images/delete.png' alt='Delete' border='0'></a>\";\n\t\t\t\t\n\t\t\t\t$answer = $this -> remove_html_tags( $title_dev_faqs_listing_records[$i]['answer'] );\n\t\t\t\t$answer = strlen( $answer ) > 200 ? substr( $answer, 0, 200).\"...\" : $answer;\n\t\t\t\t\n\t\t\t\t$class = $i % 2 == 0 ? \"class='even_row'\" : \"class='odd_row'\";\n\t\t\t\t$title_dev_faqs_listing .= '<tr '.$class.'>\n\t\t\t\t\t\t\t\t\t<td>'.$sr.'</td>\n\t\t\t\t\t\t\t\t\t<td>'.$title_dev_faqs_listing_records[$i]['question'].'</td>\n\t\t\t\t\t\t\t\t\t<td>'.$answer.'</td>\n\t\t\t\t\t\t\t\t\t<td align=\"center\">'.$status.'</td>\n\t\t\t\t\t\t\t\t\t<td align=\"center\">'.$edit_link.'</td>\n\t\t\t\t\t\t\t\t\t<td align=\"center\">'.$delete_link.'</td>\n\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t$sr++;\n\t\t\t}\t//\tEnd of For Loooooooooop\n\t\t}\t//\tEnd of if( $title_dev_faqs_listing_records != false )\n\t\telse\n\t\t{\n\t\t\t$title_dev_faqs_listing = '<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"6\" class=\"bad-msg\" align=\"center\">No Question/Answer Found*</td>\n\t\t\t\t\t\t\t\t</tr>';\n\t\t}\n\t\treturn $title_dev_faqs_listing;\n\t}", "title": "" }, { "docid": "14e7e2ddae82d85f24e58024dfef745c", "score": "0.53900623", "text": "public function index()\n {\n $faqs = Faq::latest()->paginate(10);\n return view('faqs.index',compact('faqs'))\n ->with('i', (request()->input('page', 1) - 1) * 10);\n }", "title": "" }, { "docid": "cfdc022e97a93037cfcfba23fd4eff08", "score": "0.5388827", "text": "public function index()\n {\n return view('admin.faqs.index');\n }", "title": "" }, { "docid": "df0fc41fac951ed9349f5a9d6e31f13a", "score": "0.5382054", "text": "public function list_faqs_master() {\n $user_id = $this->session->userdata('admin_user_id');\n $user_name = $this->session->userdata('user_name');\n if (empty($user_id) || empty($user_name)) {\n\n redirect('login');\n exit;\n }\n $data = array();\n ##--------------- pagination start ----------------##\n // init params\n $params = array();\n if(!empty($this->input->get('page_limit'))){\n $limit_per_page = $this->input->get('page_limit');\n }else{\n $limit_per_page = $this->config->item('pageLimit');\n }\n \n $this->config->set_item('pageLimit', $limit_per_page);\n $start_index = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n $srch_string = $this->input->get('search');\n if (empty($srch_string)) {\n $srch_string = '';\n }\n $total_records = $this->Consumer_model->get_total_faqs_master_all($srch_string);\n\n if ($total_records > 0) {\n // get current page records\n $params['userListing'] = $this->Consumer_model->get_list_faqs_master_all($limit_per_page, $start_index, $srch_string);\n \n // build paging links\n $params[\"links\"] = Utils::pagination('consumer/list_faqs_master/', $total_records);;\n }\n ##--------------- pagination End ----------------##\n\n $user_id = $this->session->userdata('admin_user_id');\n $this->load->view('list_faqs_master_tpl', $params);\n }", "title": "" }, { "docid": "3d5a6c6f5f6e3168e5261dd11171de7c", "score": "0.5368558", "text": "public function index() {\n //$faqs = FaqTopic::with('faqs')->get();\n $faqs = Faq::with('faqTopic')->orderBy('faqs.id', 'desc')->get();\n return $faqs->isEmpty() ? $this->success(null, 'NO_RECORD_FOUND') : $this->success($faqs);\n }", "title": "" }, { "docid": "54cc3ab54925f4960bf398e7df8b3d65", "score": "0.5358002", "text": "public static function show_latest_news() {\n\t\tself::show_message( self::$admin_notice, 'info', 'latest-news' );\n\t}", "title": "" }, { "docid": "e417cc104bbc42f42747aaca6d8639a4", "score": "0.5352677", "text": "function AffiliateNews()\n\t\t{\n\t\t\t$this->AffiliateAuthenticate();\n\t\t\t\n\t\t\t/* permissions */\t\t\t\n\t\t\t\n\t\t\t$this->oView->affiliate_content_news_view \t= false; \t\t\t\n\t\t\t$this->oView->affiliate_content_news_edit \t= false; \t\t\t\n\t\t\t$this->oView->affiliate_content_news_delete \t= false; \t\t\t\n\t\t\t\n\t\t\tif( $this->aModel->checkSpecificAccessPermission(\"Affiliate Content\",\"News\",\"View\") )\n\t\t\t\t$this->oView->affiliate_content_news_view = true;\t\t\t\t\n\t\t\tif( $this->aModel->checkSpecificAccessPermission(\"Affiliate Content\",\"News\",\"Modify Own Content\") )\n\t\t\t\t$this->oView->affiliate_content_news_edit = true;\t\t\t\t\n\t\t\tif( $this->aModel->checkSpecificAccessPermission(\"Affiliate Content\",\"News\",\"Delete\") )\n\t\t\t\t$this->oView->affiliate_content_news_delete = true;\t\t\t\t\t\n\t\t\t\n\t\t\t/** permissions **/\n\t\t\t\n\n\t\t\t//View Alerts Added Affiliate Articles \t\n\t\t\t$loggedInAffiliate = $_SESSION['username'];\n\t\t\t$affID = $this->oModel->getAffiliateID($loggedInAffiliate);\n\n\t\t\t$this->oView->affiliateVoteAlerts = $this->oModel->getAffiliateNews($affID, \"\", \"\");\n\t\t\t$this->oView->AffiliateNews();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.53448", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.53448", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "0588099b1a6fe57a53d4d09abe7759c7", "score": "0.5329052", "text": "public function delete_faq_articles() {\n \n // Delete Faq Articles\n (new MidrubBaseAdminCollectionSupportHelpers\\Faq)->delete_faq_articles();\n \n }", "title": "" }, { "docid": "84d5262e961bc6be6e517d1d0a665ac2", "score": "0.53253406", "text": "function faq_delete()\n {\n $this->admin->start_session();\n if(!$this->admin->is_loggedin())\n {\n redirect('admin/home/login');\n }\n //$this->course_model->delete_testimonial($testimonial_id);\n $this->event_model->faq_delete_status = 1;\n $faq_id=$this->input->post('faq_id');\n $this->event_model->delete_faq($faq_id);\n $this->session->set_flashdata('message', 'Faq deleted successfully');\n redirect('admin/home/faq');\n }", "title": "" }, { "docid": "245ce6cf8e78873e566c0d5e1754b470", "score": "0.53227603", "text": "public static function displayFaq()\n {\n $data['ajaxUrl'] = '' . _BASE_URL_ . 'asideAjax';\n return parent::loadTemplate('faq', $data);\n }", "title": "" }, { "docid": "d08b315f411d80b2314ae7d03cb5f80b", "score": "0.53159606", "text": "public function faq()\r\n\t{\r\n\t\t// Data array to be used in views\r\n\t\t$data = array(\r\n\t\t\t'class' => 'login',\r\n\t\t\t'title' => 'Frequently Asked Questions',\r\n\t\t);\r\n\r\n\t\t// Load views\r\n\t\t$this->load->view('templates/header', $data);\r\n\t\t$this->load->view('pages/account/faq', $data);\r\n\t\t$this->load->view('templates/footer-nav-login', $data);\r\n\t\t$this->load->view('templates/footer', $data);\r\n\t}", "title": "" }, { "docid": "6dfd0e7256e786a7a4c6d47f9fc84818", "score": "0.53146744", "text": "function get_active_faqs( $limit = \"\" )\n\t{\n\t\t$limit = $limit != \"\" ? \" LIMIT 0, \".$limit : \"\";\n\t\t$q = \"SELECT * FROM title_dev_faqs WHERE faq_status = 1 ORDER BY addeddate DESC\".$limit;\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r != false )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "e9e661dafa56504ee597b65d9b98bf9a", "score": "0.53130364", "text": "function faqs_init() {\n $labels = array(\n 'name' => _x( 'Faqs', 'post type general name' ),\n 'singular_name' => _x( 'Faqs', 'post type singular name' ),\n 'add_new' => _x( 'Añadir nuevo', 'Faq' ),\n 'add_new_item' => __( 'Añadir nuevo Faq' ),\n 'edit_item' => __( 'Editar Faq' ),\n 'new_item' => __( 'Nuevo Faq' ),\n 'view_item' => __( 'Ver Faq' ),\n 'search_items' => __( 'Buscar Faq' ),\n 'not_found' => __( 'No se han encontrado Faqs' ),\n 'not_found_in_trash' => __( 'No se han encontrado Faqs en la papelera' ),\n 'parent_item_colon' => ''\n );\n \n // Creamos un array para $args\n $args = array( 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n );\n \n register_post_type( 'faqs', $args ); /* Registramos y a funcionar */\n}", "title": "" }, { "docid": "89990ac1aa71d374607786434dea6dd4", "score": "0.5306604", "text": "public function index()\n {\n $orderField = ($this->request->has('field')) ? $this->request->input('field') : self::ID;\n $orderType = ($this->request->has('type')) ? $this->request->input('type') : self::ID;\n $query = $this->model->orderBy($orderField, ($orderType) ? 'asc' : 'desc');\n if ($this->request->has('query')) {\n $query = $query\n ->search($this->request->input('search'))\n ->orderBy('created_at', 'DESC');\n }\n $listData = $query->paginate($this->perpages);\n return view('administrator.faqs.faqs.index', ['data' => $listData]);\n }", "title": "" }, { "docid": "3fb03bab4bb45ffe691c1320eca40686", "score": "0.5299765", "text": "public function editNewsArticleAction()\n {\n $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);\n $author = filter_input(INPUT_POST, 'author', FILTER_SANITIZE_STRING);\n $date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);\n $newsFeedHeading = filter_input(INPUT_POST, 'newsFeedHeading', FILTER_SANITIZE_STRING);\n $newsFeedSubHeading1 = filter_input(INPUT_POST, 'newsFeedSubHeading1', FILTER_SANITIZE_STRING);\n $newsFeedSubHeading2 = filter_input(INPUT_POST, 'newsFeedSubHeading2', FILTER_SANITIZE_STRING);\n $newsFeedParagraph1 = filter_input(INPUT_POST, 'newsFeedParagraph1', FILTER_SANITIZE_STRING);\n $newsFeedParagraph2 = filter_input(INPUT_POST, 'newsFeedParagraph2', FILTER_SANITIZE_STRING);\n\n\n $newsFeed = new NewsFeed();\n echo $id;\n $newsFeed->setId($id);\n echo $author;\n $newsFeed->setAuthor($author);\n echo $date;\n $newsFeed->setDate($date);\n echo $newsFeedHeading;\n $newsFeed->setNewsFeedHeading($newsFeedHeading);\n echo $newsFeedSubHeading1;\n $newsFeed->setNewsFeedSubHeading1($newsFeedSubHeading1);\n echo $newsFeedSubHeading2;\n $newsFeed->setNewsFeedSubHeading2($newsFeedSubHeading2);\n echo $newsFeedParagraph1;\n $newsFeed->setNewsFeedParagraph1($newsFeedParagraph1);\n echo $newsFeedParagraph2;\n $newsFeed->setNewsFeedParagraph2($newsFeedParagraph2);\n\n $updateSuccess = NewsFeed::update($newsFeed);\n\n\n if ($updateSuccess) {\n $this->adminNewsAction(\"showAllNewsItems\");\n }//end if success\n\n else {\n $message_heading = 'Database News Item Creation Error ';\n $mainMessage = print_r($newsFeed, true);\n require_once __DIR__ . '/../templates/includes/src/message.php';\n }//end else error\n }", "title": "" }, { "docid": "40a3388dd7d4fb5e002de05e41f4e54b", "score": "0.5295496", "text": "public function show(News $news)\n {\n\n }", "title": "" }, { "docid": "22cd5e0cf7e8cc0ff574c69e5bce373d", "score": "0.5292938", "text": "public function actionFaqAdd()\n {\n $this->redirect(array('/faq/add/'), true, 301);\n }", "title": "" }, { "docid": "1e9947288949933e2d8bdc9a2ab1d84d", "score": "0.5283556", "text": "public function listFAQ() {\n\t\t$AppPage = AppPageFactory::getInstance();\n\t\t$pages = $AppPage->getAll(true);\n\t\t$faq_pages = $pages->findByCallbackMethod('ownFAQ', array());\n\t\t$data = array();\n\t\t\n\t\tforeach ($faq_pages as $faq_page) {\n\t\t\t$collection = $faq_page->getFAQ();\n\t\t\t$collection = $collection->getCollection();\n\t\t\t$iterator = $collection->getIterator();\n\t\t\t\n\t\t\twhile ( $iterator->valid() ) {\n\t\t\t\t$faq_element = $iterator->current();\n\t\t\t\tarray_push($data, $faq_element->getData());\n\t\t\t\t$iterator->next();\n\t\t\t}\n\t\t\tunset($collection);\n\t\t\tunset($iterator);\n\t\t}\n\t\t$this->set('pages', $data);\n\t}", "title": "" }, { "docid": "479113b854a218ad3371ee86590c4ee0", "score": "0.5282041", "text": "public function index()\n\t{\n /*Create Breadcumb*/\n $this->make_bread->add('FAQs', '', 0);\n $arrData['breadcrumb'] = $this->make_bread->output();\n /*Create Breadcumb*/\n\n $arrData['faqlist'] = $this->master->view_record();\n return load_view(\"Faq/view\",$arrData);\n\t}", "title": "" }, { "docid": "c8ea8da0c894aea6e4be064cde48b299", "score": "0.52753574", "text": "public function getGeneralFaqs(){\n $query = $this->query()\n ->where('issystem', 1)\n ->orderBy('rank', 'asc')\n ->paginate(20);\n return $query;\n }", "title": "" }, { "docid": "fd4182f539baaab4d8ca1746e1cd1281", "score": "0.52654135", "text": "function FormFeed(){}", "title": "" }, { "docid": "e61f0103cc59d5a133fb2cc8ceb0cd05", "score": "0.5260563", "text": "public function createNewsArticleAction()\n {\n $author = filter_input(INPUT_POST, 'author', FILTER_SANITIZE_STRING);\n $date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);\n $newsFeedHeading = filter_input(INPUT_POST, 'newsFeedHeading', FILTER_SANITIZE_STRING);\n $newsFeedSubHeading1 = filter_input(INPUT_POST, 'newsFeedSubHeading1', FILTER_SANITIZE_STRING);\n $newsFeedSubHeading2 = filter_input(INPUT_POST, 'newsFeedSubHeading2', FILTER_SANITIZE_STRING);\n $newsFeedParagraph1 = filter_input(INPUT_POST, 'newsFeedParagraph1', FILTER_SANITIZE_STRING);\n $newsFeedParagraph2 = filter_input(INPUT_POST, 'newsFeedParagraph2', FILTER_SANITIZE_STRING);\n\n\n $newsFeed = new NewsFeed();\n $newsFeed->setAuthor($author);\n $newsFeed->setDate($date);\n $newsFeed->setNewsFeedHeading($newsFeedHeading);\n $newsFeed->setNewsFeedSubHeading1($newsFeedSubHeading1);\n $newsFeed->setNewsFeedSubHeading2($newsFeedSubHeading2);\n $newsFeed->setNewsFeedParagraph1($newsFeedParagraph1);\n $newsFeed->setNewsFeedParagraph2($newsFeedParagraph2);\n\n $insertSuccess = NewsFeed::insert($newsFeed);\n\n\n if ($insertSuccess) {\n $this->adminNewsAction(\"showAllNewsItems\");\n }//end if success\n\n else {\n $message_heading = 'Database News Item Creation Error ';\n $mainMessage = print_r($newsFeed, true);\n require_once __DIR__ . '/../templates/includes/src/message.php';\n }//end else error\n }", "title": "" }, { "docid": "1731ad114f3357ad25e84ec5a704680c", "score": "0.52603734", "text": "function ciniki_web_faqGet($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'faq_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'FAQ'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'checkAccess');\n $rc = ciniki_web_checkAccess($ciniki, $args['tnid'], 'ciniki.web.faqGet'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki);\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'timeFormat');\n $time_format = ciniki_users_timeFormat($ciniki);\n\n //\n // Get the main information\n //\n $strsql = \"SELECT ciniki_web_faqs.id, \"\n . \"ciniki_web_faqs.category, \"\n . \"ciniki_web_faqs.flags, \"\n . \"ciniki_web_faqs.question, \"\n . \"ciniki_web_faqs.answer \"\n . \"FROM ciniki_web_faqs \"\n . \"WHERE ciniki_web_faqs.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_web_faqs.id = '\" . ciniki_core_dbQuote($ciniki, $args['faq_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.web', array(\n array('container'=>'faqs', 'fname'=>'id', 'name'=>'faq',\n 'fields'=>array('id', 'category', 'flags', 'question', 'answer')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['faqs']) ) {\n return array('stat'=>'ok', 'err'=>array('code'=>'ciniki.web.133', 'msg'=>'Unable to find question'));\n }\n $faq = $rc['faqs'][0]['faq'];\n\n return array('stat'=>'ok', 'faq'=>$faq);\n}", "title": "" }, { "docid": "3f773cdc7f62f442f8fe8dafe479858b", "score": "0.525116", "text": "function get_all_faqs( $limit = \"\" )\n\t{\n\t\t$limit = $limit != \"\" ? \" LIMIT 0, \".$limit : \"\";\n\t\t$q = \"SELECT * FROM title_dev_faqs ORDER BY addeddate DESC\".$limit;\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r != false )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "950fb91131a5e7adc03efc11a0c3f405", "score": "0.52454615", "text": "function tech_faq() {\n $labels = array(\n 'name' => _x( 'FAQ', 'post type general name' ),\n 'singular_name' => _x( 'FAQ', 'post type singular name' ),\n 'add_new' => _x( 'Add New', 'book' ),\n 'add_new_item' => __( 'Add New FAQ' ),\n 'edit_item' => __( 'Edit FAQ' ),\n 'new_item' => __( 'New FAQ Items' ),\n 'all_items' => __( 'All FAQ\\'s' ),\n 'view_item' => __( 'View FAQ' ),\n 'search_items' => __( 'Search FAQ' ),\n 'not_found' => __( 'No FAQ Items found' ),\n 'not_found_in_trash' => __( 'No FAQ Items found in the Trash' ), \n 'parent_item_colon' => '',\n 'menu_name' => 'FAQs'\n );\n $args = array(\n 'labels' => $labels,\n 'description' => 'Holds FAQ specific data',\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type'=> 'post',\n 'has_archive' => true,\n 'hierarchical' => true,\n 'menu_position' => 20,\n 'supports' => array( 'title', 'editor', 'thumbnail'),\n 'menu_icon' => 'dashicons-info', // Icon Path\n );\n\n register_post_type( 'faq', $args ); \n\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'FAQ Categories', 'taxonomy general name' ),\n 'singular_name' => _x( 'FAQ Category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search FAQ Categories' ),\n 'all_items' => __( 'All FAQ Category' ),\n 'parent_item' => __( 'Parent FAQ Category' ),\n 'parent_item_colon' => __( 'Parent FAQ Category:' ),\n 'edit_item' => __( 'Edit FAQ Category' ),\n 'update_item' => __( 'Update FAQ Category' ),\n 'add_new_item' => __( 'Add New FAQ Category' ),\n 'new_item_name' => __( 'New FAQ Category Name' ),\n 'menu_name' => __( 'FAQ Category' ),\n );\n \n register_taxonomy('faq_cat',array('faq'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'faq_cat' ),\n ));\n}", "title": "" }, { "docid": "62cc02a68be725baf09c1a09de09e0fe", "score": "0.5238874", "text": "public function funcNewsmore($request)\n {\n $query = $this->model_news\n ->select('id', 'name', 'info' , 'nameru', 'inforu' ,'image', 'click', 'created_at')\n ->offset(($request->more*3)+6)\n ->limit(3)\n ->orderBy('id', 'desc');\n return $query->get();\n }", "title": "" }, { "docid": "59051d8218ca8af0085030afa328c61d", "score": "0.5236145", "text": "public function show(FaqCategory $faqCategory)\n {\n //\n }", "title": "" }, { "docid": "a0b212df54c150e4df3863b67bba54b7", "score": "0.5235448", "text": "function fn_get_latest_faqs($limit = 10)\n{\n $sql = \"SELECT a.message_id, a.ip_address, a.name, a.message, a.status, a.timestamp, a.type, b.faq_id, b.thread_id, c.object_id, c.thread_id, c.object_type \";\n $sql .= \"FROM ?:faq_messages as a \";\n $sql .= \"LEFT JOIN ?:faq_data as b ON a.faq_id = b.faq_id LEFT JOIN ?:faq as c ON b.thread_id = c.thread_id \";\n $sql .= \"ORDER BY a.timestamp DESC LIMIT ?i\";\n\t$latest_faqs = db_get_array($sql, $limit);\n\tforeach ($latest_faqs as $key => $message_container) {\n\t\t$latest_faqs[$key]['object_data'] = fn_get_faq_object_data($message_container['object_id'], $message_container['object_type'], DESCR_SL);\n\t}\n\treturn $latest_faqs;\n}", "title": "" }, { "docid": "4acf16e211511ab592db347c5095b9d3", "score": "0.5221015", "text": "public function faq()\n\t{\n\t\t$this->load->view('home/faq');\n }", "title": "" }, { "docid": "eed62709a0f6281420e7946c7ee301d1", "score": "0.5220939", "text": "public function cms_faq_pos()\n {\n if (!$this->Owner) {\n $this->session->set_flashdata('warning', lang('access_denied'));\n redirect('welcome');\n }\n $this->data['error'] = validation_errors() ? validation_errors() : $this->session->flashdata('error');\n $bc = array(array('link' => base_url(), 'page' => lang('home')), array(\n 'link' => site_url('system_settings'),\n 'page' => lang('system_settings')\n ), array('link' => '#', 'page' => \"CMS Faq POS\"));\n $meta = array('page_title' => 'CMS Faq POS', 'bc' => $bc);\n $this->page_construct('settings/cms_faq_pos', $meta, $this->data);\n }", "title": "" }, { "docid": "24c74537c383e399d869c1ee0a15b880", "score": "0.52195257", "text": "function theme_forum_topic_list() {\n // This function is never used; see the corresponding template file instead.\n}", "title": "" }, { "docid": "975148e8e2b063230e0dd7ddb360cf8b", "score": "0.52183396", "text": "function get_newslist() {\n\tinclude_once(\"db.inc.php\");\n$db=new DB();\n$db->open();\n\techo'<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\">\n <tr> \n <td width=\"59%\"><div align=\"center\">Name</div></td> \n <td colspan=\"2\"><div align=\"center\">Action</div></td>\n </tr>';\n\t\t$query = \"SELECT * FROM Sitenews\";\n\t\t$result = $db->query($query);\n\t\t$num_results = $db->numRows($result);\n\t\t\n\n\t\tfor ($i=0; $i <$num_results; $i++)\n\t\t{\n\t\t\t$row = $db->fetchArray($result);\necho'<tr> <td><li>';\n\t\t\techo $row['title'];\n \t\techo'</li></td>';\t\t\t\t\n\t\t\t\techo'<td width=\"16%\">\n\t\t\t\t<a href=\"delnews.php?news=';\n\t\t\t\techo $row['title'];\n\t\t\t\techo'\">Delete<img src=\"../images/admin/delete.png\" border=\"0\" width=\"16\" height=\"16\"></a></td>';\t\t\t\t\n\t\t\t\techo '<td width=\"25%\">';\n\t\t\t\techo'<a href=\"ednews.php?news=';\n\t\t\t\techo $row['title'];\n\t\t\t\techo '\">Edit<img src=\"../images/admin/edit.png\" border=\"0\" width=\"16\" height=\"16\">';\n\t\t\t\techo '</a></td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}", "title": "" }, { "docid": "cc9269cbb123a2130d9624292352b9bc", "score": "0.5218224", "text": "function theme_forum_list() {\n // This function is never used; see the corresponding template file instead.\n}", "title": "" }, { "docid": "1f41d846b5992d396862e7b847e5e12a", "score": "0.52180564", "text": "public function load_all_faq_articles() {\n \n // Load Faq Articles\n (new MidrubBaseAdminCollectionSupportHelpers\\Faq)->load_all_faq_articles();\n \n }", "title": "" }, { "docid": "5a9589a39b59bad3d1af199c4f337561", "score": "0.52066886", "text": "public function action_index() {\n\n\t\t// Create an instance of the News Model\n\t\t$plugin_model = new Model_News();\n\n\t\t//Load Javascript\n\t\t$this->template->scripts[] = '<script src=\"'. URL::get_engine_plugin_assets_base('news') .'js/news_list.js\"></script>';\n\n $user = Auth::instance()->get_user();\n\t\t// Load the body here.\n\t\t$this->template->body = View::factory(\n\t\t\t'admin/list_news',\n\t\t\tarray('news' => $plugin_model->get_all_items_admin(null, $user['role_id']))\n\t\t);\n $this->template->body->plugin = Model_Plugin::get_plugin_by_name('news');\n\t}", "title": "" }, { "docid": "ba786f30718e7cb5aafd1077c7ee1595", "score": "0.5201515", "text": "public function run()\n {\n //\n $faqs=[[1,'How to purchase Products','just buy it'],[2,'how to trust brands','just do it'],[3,'how to checkout','just do it']];\n\n for($i=0;$i<3;$i++) {\n \tFaq::create([\n \t\t'faq_category_id'=>$faqs[$i][0],\n \t\t'question'=>$faqs[$i][1],\n \t\t'answer'=>$faqs[$i][2]\n \t]);\n }\n }", "title": "" }, { "docid": "85b242752658adb6d034542d2c769c35", "score": "0.51895225", "text": "public function show(NewsItem $newsItem)\n {\n //\n }", "title": "" }, { "docid": "32e93547ac019f9096de71d8ea655a44", "score": "0.51869136", "text": "public function getNews() {\n\t $postsPerPage = 5;\n \t \n\t if(!isset($_GET['page'])) {\n \t\t\t$page = 1;\n \t\t} else {\n \t\t\t$page = (int)$_GET['page'];\n \t\t}\n \n \t\t$bottom = (($page * $postsPerPage) - $postsPerPage);\n \t\t$i = 0;\n \t\t$articles = $this->worker->getNews();\n \t\tforeach ($articles As $article) {\n\t\t if ($i >= $bottom && $i < ($bottom + $postsPerPage)) {\n\t\t echo \"<div class='newsItem'><h4>\" . $article->title . \"</h4>\";\n echo \"<h6>\" . date(\"l F j<\\s\\up>S</\\s\\up>, Y\", strtotime($article->post_date)) . \"</h6>\";\n echo $this->truncate(htmlspecialchars_decode($article->content), 500, \"...\", false, true);\n echo \"<p><a class='btn' href='news.php?id=\" . $article->id . \"'>View details &raquo;</a></p><hr /></div>\";\n }\n\t\t $i++; \n \t\t}\n \t\t\n \t\techo \"<div class='newsItem'><ul id='pagination-freebie'><li><ul class='pagination dark'>\";\n \t// Count number of posts to determine how many pages are required\n \t$totalPages = ceil(count($articles) / $postsPerPage);\n \n if ($totalPages > 1) {\n if ($page > 1) {\n \t\t\t$prev = ($page - 1);\n \t\t\tif ($page > 2) {\n \t\t\techo \"<li class='prev'><a href=\\\"index.php?page=1\\\">&lt;&lt;</a></li>\";\n \t\t\t}\n \t\t echo \"<li class='prev'><a href=\\\"index.php?page=$prev\\\">Prev</a></li>\";\n \t\t}\n \t\t\t\n \t\tfor($i = 1; $i <= $totalPages; $i++) {\n \t\t if ($page == $i) {\n\t\t echo \"<li><a href='#'>$i</a></li>\";\n \t\t } else {\n \t\t\t if ($i > ($page - 2) && $i < ($page + 2)) {\n\t\t\t echo \"<li><a href=\\\"index.php?page=$i\\\">$i</a></li>\";\n \t\t\t }\n \t\t\t}\n \t\t}\n \t\t\t\t\n \t\tif ($page < $totalPages) {\n \t\t $next = ($page + 1);\n \t\t echo \"<li class='next'><a href=\\\"index.php?page=$next\\\">Next</a></li>\";\n \t\t if ($page < ($totalPages - 1)) {\n\t\t echo \"<li class='next'><a href=\\\"index.php?page=$totalPages\\\">&gt;&gt;</a></li>\";\n \t\t }\n \t\t}\n \t}\n \techo \"</ul></li></ul></div>\";\n\t\t}", "title": "" }, { "docid": "c0b5c81569e97cd57a9c502adafcdafa", "score": "0.517746", "text": "function fn_get_faqs_data($thread_id = 0, $page = 0)\n{\n\t$condition = '1';\n\tif (!empty($thread_id)) {\n\t\t$condition .= db_quote(\" AND thread_id = ?i\", $thread_id);\n\t} else {\n\t\treturn false;\n\t}\n\n\t$thread_data = db_get_row(\"SELECT type, object_type FROM ?:faq WHERE ?p\", $condition);\n\tif ($thread_data['type'] == 'D') {\n\t \treturn false;\n\t}\n\n//\t$page = $_REQUEST['page'];\n\n\t$condition .= (AREA == 'A') ? '' : \" AND ?:faq_data.status = 'A' AND ?:faq_messages.status = 'A'\";\n\n//\t$params['total_items'] = db_get_field(\"SELECT COUNT(*) FROM ?:faq_data WHERE ?p\", $condition);\n//\t$limit = db_paginate($page, '10');\n\n\t$join = \"LEFT JOIN ?:faq_messages ON ?:faq_messages.faq_id = ?:faq_data.faq_id\";\n\n\t$faq_ids = db_get_fields(\"SELECT ?:faq_data.faq_id FROM ?:faq_data $join WHERE ?p ORDER BY ?:faq_messages.timestamp DESC \", $condition);\n\n\n\n\tforeach ($faq_ids as $f_id => $faq_id) {\n\t\t$faq_data[$faq_id] = fn_get_faq_data($faq_id);\n\t}\n\treturn $faq_data;\n}", "title": "" }, { "docid": "0c3977a7fa071c22a74633ef36d21796", "score": "0.517595", "text": "public function faq()\n {\n return view('faq');\n }", "title": "" }, { "docid": "72521720ab48673355cd47c25a9dc263", "score": "0.5175751", "text": "public function create()\n {\n return view('faqs.create');\n }", "title": "" }, { "docid": "6620509fb029267f1a8da8cf2bc97b49", "score": "0.5173112", "text": "public function faqAction(){\n $faqTypes = FaqType::select(\"*\")->get();\n return view(\"/public/pages/faq\", compact(\"faqTypes\"));\n }", "title": "" }, { "docid": "de10cff38bc96140e98db04a673e1494", "score": "0.5164107", "text": "function feed_detail()\n\t{\n\t\t$fid = intval(v('fid'));\n\t\tif( $fid < 1 ) return info_page(__('FEED_LOAD_ERROR_RETRY'));\n\n\t\t$params = array();\n\t\t$params['fid'] = $fid;\n\t\t\n\t\tif($content = send_request( 'feed_detail' , $params , token() ))\n\t\t{\n\t\t\t$data = json_decode($content , 1);\n\t\t\tif( intval($data['error_code']) != 0 ) \n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn render( $data , 'ajax' , 'raw' );\n\t\t}\n\n\t\treturn info_page(__('FEED_LOAD_ERROR_RETRY'));\n\n\t\t\n\t}", "title": "" }, { "docid": "bc90943742c5f583262510855367a315", "score": "0.5156456", "text": "public function index()\n {\n $faqs = Faq::orderBy('updated_at', 'desc')->paginate(10);\n\n return view('faqs.index', compact('faqs'));\n }", "title": "" }, { "docid": "975c66489179979d07107a9c60ef3d6e", "score": "0.5151585", "text": "public function faq()\n {\n return view('backend.lead.faq');\n }", "title": "" }, { "docid": "4ad7034e2388445d829f5584e632af64", "score": "0.5142468", "text": "function show_faq()\n{\n $q=\"SELECT * FROM `\".TblModFaq.\"` WHERE status='a' AND lang_id=\"._LANG_ID.\"\";\n $res = $this->Right->db_Query( $q );\n //echo '<br> q='.$q.' $res='.$res.' $this->Right->result='.$this->Right->result; \n if (!$this->Right->result) return false;\n if (!$res) return false;\n $rows = $this->Right->db_GetNumRows();\n //echo '<br> rows='.$rows;\n if ($rows==0) {\n echo '<table border=\"0\" cellpadding=5 cellspacing=0 width=\"100%\">\n <tr><td>� ��������� �� ������ ������ ���� ������� ����������...</td></tr>\n </table>';\n return false;\n }\n ?>\n <h1 style=\"padding-left:20px;\"><img src=\"images/design/arrow_1.gif\"/>&nbsp;&nbsp;&nbsp;FAQ - ����� ���������� ������� � ����������� �������.</H1>\n <table border=\"0\" cellpadding=3 cellspacing=5>\n <?\n for($i_num=0; $i_num<$rows; $i_num++){\n $row = $this->Right->db_FetchAssoc();\n echo '<tr><td align=\"left\" class=\"news\"><h2>'.$this->Msg->show_text('_FLD_FAQ_QUESTION').': '.stripslashes($row['question']).'</h2></td></tr>';\n echo '<tr><td align=\"left\"><h2>'.$this->Msg->show_text('_FLD_FAQ_ANSWER').':</h2><div class=\"sprshort\"> '.stripslashes($row['answer']).'</div></td></tr>';\n ?><tr><td width=\"100%\"><hr style=\"border:none; background-image:url(images/design/hr.gif); background-repeat: repeat-x; width:98%;\"/></td></tr><?\n }\n ?>\n </table>\n <?\n return true;\n}", "title": "" }, { "docid": "ed02acddf90366713ffb9c8d61ed04e7", "score": "0.51406", "text": "public function faq() {\n return view('user.faq');\n }", "title": "" }, { "docid": "cf3245665c4d5f3ae9f112d3a99152a0", "score": "0.5107616", "text": "function faq_create()\n\t{\n\t\tif (isset($_POST) && !empty($_POST))\n\t\t{\n\t\t\t$data['question']\t\t=\t$this->input->post('question');\n\t\t\t$data['answer']\t\t\t=\t$this->input->post('answer');\n\t\t\t$this->db->insert('faq', $data);\n\t\t\tredirect(base_url().'index.php?admin/faq_list' , 'refresh');\n\t\t}\n\t\t$page_data['page_name']\t\t=\t'faq_create';\n\t\t$page_data['page_title']\t=\t'Create faq';\n\t\t$this->load->view('backend/index', $page_data);\n\t}", "title": "" }, { "docid": "50b0124fb2be30084405e1e7f50c9a11", "score": "0.5104009", "text": "public function getArticleLinks($info) {\n $shorturls = System::getVar('shorturls', false);\n \n $shop_id = $_REQUEST['shop_id']; \n \n //echo $shop_id; exit;\n // Allowed to comment?\n if (ModUtil::available('EZComments') && $info['allowcomments'] == 1) {\n if ($shorturls) {\n $comment = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'], 'shop_id'=>$shop_id ,'from' => $info['from'], 'urltitle' => $info['urltitle'], '__CATEGORIES__' => $info['categories']), null, 'comments'));\n } else {\n $comment = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'] , 'shop_id'=>$shop_id), null, 'comments'));\n }\n } else {\n $comment = '';\n }\n\n // Allowed to read full article?\n if (SecurityUtil::checkPermission('News::', \"{$info['cr_uid']}::{$info['sid']}\", ACCESS_READ)) {\n if ($shorturls) {\n $fullarticle = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'],'shop_id'=>$shop_id,'from' => $info['from'], 'urltitle' => $info['urltitle'], '__CATEGORIES__' => $info['categories'])));\n } else {\n $fullarticle = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'] , 'shop_id'=>$shop_id)));\n }\n } else {\n $fullarticle = '';\n }\n\n // Link to topic if there is a topic\n if (!empty($info['topicpath'])) {\n $topicField = $this->getTopicField();\n // check which variable to use for the topic\n if ($shorturls) {\n $searchtopic = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'view', array('prop' => $topicField, 'cat' => $info['topicpath'])));\n } else {\n $searchtopic = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'view', array('prop' => $topicField, 'cat' => $info['topicid'])));\n }\n } else {\n $searchtopic = '';\n }\n\n // Link to all the categories\n $categories = array();\n if (!empty($info['categories']) && is_array($info['categories']) && $this->getVar('enablecategorization')) {\n // check which variable to use for the category\n if ($shorturls) {\n $field = 'path_relative';\n } else {\n $field = 'id';\n }\n $properties = array_keys($info['categories']);\n foreach ($properties as $prop) {\n $categories[$prop] = DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'view', array('prop' => $prop, 'cat' => $info['categories'][$prop][$field])));\n }\n }\n\n // Set up the array itself\n if ($shorturls) {\n $links = array('category' => DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'view', array('prop' => 'Main', 'cat' => $info['catvar']))),\n 'categories' => $categories,\n 'permalink' => DataUtil::formatForDisplayHTML(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'], 'shop_id'=>$shop_id ,'from' => $info['from'], 'urltitle' => $info['urltitle'], '__CATEGORIES__' => $info['categories']), null, null, true)),\n 'comment' => $comment,\n 'fullarticle' => $fullarticle,\n 'searchtopic' => $searchtopic,\n 'print' => DataUtil::formatForDisplay(ModUtil::url('News', 'user', 'display', array('sid' => $info['sid'], 'shop_id'=>$shop_id ,'from' => $info['from'], 'urltitle' => $info['urltitle'], '__CATEGORIES__' => $info['categories'], 'theme' => 'Printer'))),\n 'commentrssfeed' => DataUtil::formatForDisplay(ModUtil::url('EZComments', 'user', 'feed', array('mod' => 'News', 'objectid' => $info['sid']))),\n 'commentatomfeed' => DataUtil::formatForDisplay(ModUtil::url('EZComments', 'user', 'feed', array('mod' => 'News', 'objectid' => $info['sid']))));\n } else {\n $links = array('category' => DataUtil::formatForDisplay(ModUtil::url('ZSELEX', 'user', 'view', array('prop' => 'Main', 'cat' => $info['catvar']))),\n 'categories' => $categories,\n 'permalink' => DataUtil::formatForDisplayHTML(ModUtil::url('ZSELEX', 'user', 'display', array('sid' => $info['sid'] , 'shop_id'=>$shop_id), null, null, true)),\n 'comment' => $comment,\n 'fullarticle' => $fullarticle,\n 'searchtopic' => $searchtopic,\n 'print' => DataUtil::formatForDisplay(ModUtil::url('News', 'user', 'display', array('sid' => $info['sid'], 'shop_id'=>$shop_id ,'theme' => 'Printer'))),\n 'commentrssfeed' => DataUtil::formatForDisplay(ModUtil::url('EZComments', 'user', 'feed', array('mod' => 'News', 'objectid' => $info['sid']))),\n 'commentatomfeed' => DataUtil::formatForDisplay(ModUtil::url('EZComments', 'user', 'feed', array('mod' => 'News', 'objectid' => $info['sid']))));\n }\n\n return $links;\n }", "title": "" }, { "docid": "64dcb5514b44af36a816f6988cc49ff2", "score": "0.5098948", "text": "function NewsDelete()\n\t\t{\n\t\t\t$res = $this->oModel->deleteAffiliateContent($_REQUEST['id']);\n\t\t\t$msg = \"Article deleted successfully.\";\n\t\t\t$mode='AffiliateDashboard';\n\t\t\t\n\t\t\tif($_REQUEST['type']=='news')\n\t\t\t{\n\t\t\t\t$mode='AffiliateNews';\n\t\t\t\t$msg = \"News deleted successfully.\";\n\t\t\t}\t\n\t\t\telse if($_REQUEST['type']=='bill')\n\t\t\t{\n\t\t\t//\t$mode='';\n\t\t\t//\t$msg = \"News deleted successfully.\";\n\t\t\t}\n\t\t\telse if($_REQUEST['type']=='petition')\n\t\t\t{\n\t\t\t\t//$mode='Petitions';\n\t\t\t}\n\t\t\telse if($_REQUEST['type']=='bulletin')\n\t\t\t{\n\t\t\t\t$mode='AffiliateBulletin';\n\t\t\t\t$msg = \"Bulletin deleted successfully.\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<script>location='index.php?stage=affiliates&mode=\".$mode.\"&msg=\".$msg.\"'</script>\";\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "f8b90df91985697025ab5b925baf3a9e", "score": "0.5097492", "text": "public function indexAction() \r\n {\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n if (!Engine_Api::_()->core()->hasSubject('forum')) \r\n {\r\n return $this->setNoRender();\r\n }\r\n\t\t\r\n // Get subject and check auth\r\n $subject = Engine_Api::_()->core()->getSubject();\r\n if (!$subject->authorization()->isAllowed($viewer, 'view')) {\r\n return $this->setNoRender();\r\n }\r\n\t\t$table = Engine_Api::_() -> getItemTable('ynforum_announcement');\r\n\t\t$select = $table -> select() -> where(\"forum_id = ?\", $subject -> getIdentity()) -> where(\"highlight = 1\");\r\n\t\t$announcement = $table -> fetchRow($select -> limit(1));\r\n\t\t$this -> view -> announcement = $announcement;\r\n\t\t$this -> view -> forum = $subject;\r\n\t\t$this -> view -> viewer = $viewer;\r\n\t\tif(!$subject -> checkPermission($viewer ,'forum', 'ynannoun.edit') && \r\n\t\t!$subject -> checkPermission($viewer ,'forum', 'ynannoun.create')\r\n\t\t&& !$announcement)\r\n\t\t{\r\n\t\t\treturn $this->setNoRender();\r\n\t\t}\r\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "0be105eac30659768ad5d6b067aef10d", "score": "0.0", "text": "public function saveMultipleLevels()\n\t{\n\t\t$input = Request::all();\n\t\t$rules = EstimateLevel::getCreateRules();\n\t\t$validator = Validator::make($input, $rules);\n\n if( $validator->fails()){\n\t\t\treturn ApiResponse::validation($validator);\n\t\t}\n\n DB::beginTransaction();\n\t\ttry {\n\t\t\t$estimateLevels = $this->service->saveMultipleTypes($input['types']);\n\t\t\tDB::commit();\n\n return ApiResponse::success([\n\t\t\t\t'message' => trans('response.success.saved',['attribute' => 'Estimate Levels']),\n\t\t\t\t'data' => $this->response->collection($estimateLevels, new EstimateLevelsTransformer)['data']\n\t\t\t]);\n\t\t}catch(\\Exception $e) {\n\t\t\tDB::rollback();\n\n return ApiResponse::errorInternal(trans('response.error.internal'),$e);\n\t\t}\n }", "title": "" } ]
[ { "docid": "45903628ff69251019708b230944f6f0", "score": "0.6915523", "text": "public function store(StoreResourceRequest $request)\n {\n\n $data = $request->input();\n\n if ( empty($data['teacher_id']) ) {\n $data['teacher_id'] = null;\n }\n\n DB::transaction(function() use ($request, $data)\n {\n $resource = Resource::create($data);\n $uploadedFile = $request->file('file');\n\n $type = $uploadedFile->getClientOriginalExtension();\n $name = $resource->generateResourceName();\n $path = $resource->generateResourcePath();\n\n Storage::put(\"{$path}.{$type}\", file_get_contents($uploadedFile->getRealPath()));\n\n $file = File::create([\n 'resource_id' => $resource->id,\n 'name' => $name,\n 'type' => $type,\n 'url' => \"{$path}.{$type}\"\n ]);\n\n if ( !$resource || !$file ) {\n return redirect()->back()->with('error', 'Failed :( Try Again!');\n }\n });\n\n return redirect()\n ->route('home')\n ->with('info', 'Resource Uploaded. Pending of revision.');\n }", "title": "" }, { "docid": "3142727ee8880b6b9792726e4513dca0", "score": "0.680377", "text": "public function store()\n {\n $validation = new $this->resourceRequestValidation;\n $this->validate(request(), $validation->rules());\n DB::beginTransaction();\n try {\n $store = $this->repository->eloquentCreate($this->resourceCreateRequestInputs);\n if ($store) {\n Session::flash(\"success\", \" [ \". (!is_array($store->name) && $store->name ? $store->name : $store->name_val) .\" ] \" . __(\"main.session_created_message\"));\n } else {\n Session::flash(\"danger\", __(\"main.session_falid_created_message\"));\n }\n DB::commit();\n } catch (Exception $e) {\n DB::rollback();\n Session::flash(\"danger\", $e->getMessage());\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "8a450d988729c270cfacfb2daffbda8e", "score": "0.6761625", "text": "public function store(ResourceCreateRequest $request)\n {\n Resource::create([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'cat_id' => $request->input('category'),\n 'link' => $request->input('url'),\n 'user_id' => Auth::user()->id\n ]);\n return redirect(route('index'))->with('status', 'Resource Created Successfully');\n }", "title": "" }, { "docid": "a15cea6cc2c6f1b34e41fa10dc7a85e9", "score": "0.6512059", "text": "public function save()\n {\n $this->_storage->modify($this->id, $this->toHash(true));\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "2013cf53419c1746030f01635e54fbc5", "score": "0.6349437", "text": "public function storeAndNew()\n {\n $this->storeAndNew = true;\n $this->store();\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
5fb07d77585fe7d03c0af889a23b51cc
checkout the cart total price for payment
[ { "docid": "fab2da0da689706cfbe823b7b16edd1a", "score": "0.0", "text": "public function checkout($amount){\n return view('pages.checkout',['amount'=>$amount]);\n }", "title": "" } ]
[ { "docid": "765ec6052da285f04831e45b7438ff05", "score": "0.73767483", "text": "private function calculateTotalPrice()\n {\n $totalPrice = 0;\n $totalDiscount = 0;\n $cartItems = $this->cart->getCartItems();\n /** @var CartItem $item */\n foreach ($cartItems as $item) {\n $item->calculatePrice();\n $totalPrice += $item->getOriginalPrice();\n $totalDiscount += $item->getDiscountPrice();\n }\n $this->cart->setOriginalTotalPrice($totalPrice);\n $this->cart->setTotalDiscount($totalDiscount);\n $this->cart->setActualTotalPrice($this->cart->getOriginalTotalPrice() - $totalDiscount);\n }", "title": "" }, { "docid": "db8af8a943a9d8d61811ffbd43041b9a", "score": "0.725311", "text": "function get_cart_total() {\n\t\treturn jigoshop_price(self::$cart_contents_total);\n\t}", "title": "" }, { "docid": "81ea1088d1d6a2bf10a63a226d5e3f7a", "score": "0.72061634", "text": "function getCartTotalPrice(){\n //call 'getUserFullCart()' to fetch add to cart data\n $cartArray=getUserFullCart();\n\n // Total cart price //\n $totalCartPrice=0;\n foreach($cartArray as $list){\n $totalCartPrice=$totalCartPrice+($list['qty']*$list['price']);\n }\n // ================ //\n return $totalCartPrice;\n }", "title": "" }, { "docid": "e38e565567416995c5fce6e0e388a84c", "score": "0.7055053", "text": "private function __checkTotalAmount(){\r\n $priceTotal = array();\r\n foreach($this->session->get('cart_item') as $key=>$value){\r\n $priceTotal[] = $value['price'] * $value['qty'];\r\n }\r\n return array_sum($priceTotal);\r\n }", "title": "" }, { "docid": "5bedb35199c350d5532029e7a81c1840", "score": "0.69420975", "text": "function totalprice() {\n\t\tif( ! $this->session->userdata('cur_sign'))\n\t\t{\n\t\t\t$data['sign'] = 'AU$';\n\t\t\t$data['cur_val'] = 1;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//echo $this->session->userdata('cur_val');\n\t\t\t$data['sign'] = $this->session->userdata('cur_sign');\n\t\t\t$data['cur_val'] = $this->session->userdata('cur_val');\n\t\t}\n\t\t\n\t\t$cur = $this->System_model->get_currency();\n\t\t\n\t\t$data['usa'] = $cur['usa'];\n\t\t$data['eur'] = $cur['eur'];\n\t\t$data['gbp'] = $cur['gbp'];\n\t\t$data['jpy'] = $cur['jpy'];\n\t\t\n\t\t\n\t\t$session_id = $this->session->userdata('session_id');\n\t\t$cart = $this->Cart_model->all($session_id);\n\t\t$total = 0;\n\t\t\n\t\t$total_weight=0;\n\t\t$total_volume=0;\n\t\t$total_items=0;\n\t\t$prods=array();\n\t\t$cats=array();\n\t\t$gift_card=0;\n\t\t$gift_avail=0;\n\t\tforeach($cart as $item) {\n\t\t\tif($item['product_id']==11){$gift_card=$gift_card+$item['price'];$gift_avail=1;}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$total += $item['price']*$item['quantity'];\n\t\t\t\t$total_items += $item['price']*$item['quantity'];\n\t\t\t\t$weight= $this->Product_model->identify($item['product_id']);\n\t\t\t\t$total_weight=$total_weight+($weight['weight']*$item['quantity']);\n\t\t\t\t$total_volume=$total_volume+($weight['volume']*$item['quantity']);\n\t\t\t\t$prods[]=$item['product_id'];\n\t\t\t\t$categories=$this->Category_model->identify_category_all($item['product_id']);\n\t\t\t\tforeach($categories as $ctp)\n\t\t\t\t{\n\t\t\t\t\tif(!in_array($ctp['category_id'],$cats))\n\t\t\t\t\t{\n\t\t\t\t\t\t$cats[]=$ctp['category_id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$mtot=$item['price']*$item['quantity'];\n\t\t$user = $this->session->userdata('userloggedin');\n\t\t$customer = $this->Customer_model->identify($user['customer_id']); \n\t\t//$user = $this->session->userdata('userloggedin');\n\t\t//$customer = $this->Customer_model->identify($user['customer_id']); \n\t\t$customer_id = $customer['id'];\n\t\t\n\t\t\n\t\t\n\t\t/*if($customer['membership_status']==2){$vtotal=$total_items*(5/100);}\n\t\tif($customer['membership_status']==3){$vtotal=$total_items*(10/100);}\n\t\t*/\n\t\t\n\t\t# Tax second\n\t\tif($this->session->userdata('store_pickup')){\n\t\t\t$tax = $this->_get_store_pickup_tax();\n\t\t}else{\n\t\t\t$tax = $this->System_model->get_tax_country($_POST['country_id']);\n\t\t}\n\t\tif ($tax) { \n\t\t\tif (!$tax['included']) { \n\t\t\t\t\n\t\t\t\t$total = $total + $total * $tax['value']/100; \n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t# Discount first\n\t\tif($_POST['code'] != \"\") {\n\t\t\t$code=$_POST['code'];\n\t\t\t$coupon = $this->System_model->check_coupon_code($_POST['code']);\t\t\t\n\t\t\t$conds = $this->System_model->get_coupon_condition($coupon['id']);\n\t\t\t\n\t\t\t$pass=0;\n\t\t\tif($coupon['expirary']==1)\n\t\t\t {\t\t\n\t\t\t\t if(count($this->Order_model->identify_promotioncode($code,$customer_id))==0){$pass=1;}\n\t\t\t }\n\t\t\t if($coupon['expirary']==2)\n\t\t\t {\t\t\n\t\t\t\t //if(count($this->Order_model->identify_promotioncode($code,$customer_id))==0){}\n\t\t\t\t if($this->System_model->check_coupon_period_cond($code,$coupon['from_date'],$coupon['to_date'],date('Y-m-d')))\n\t\t\t\t {$pass=1;}\n\t\t\t }\n\t\t\t if($coupon['expirary']==3)\n\t\t\t {\t\t\n\t\t\t\t$pass=1;\n\t\t\t\t //if(count($this->Order_model->identify_promotioncode($code,$customer_id))==0){}\n\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\tif($coupon && count($conds)==0 && $pass==1){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif($total_items >= $coupon['condition'] && $total_items > 0) {\n\t\t\t\t\t\tif($coupon['type'] == 1) { // Percentage\n\t\t\t\t\t\t\t$discount = $total_items * $coupon['value'] / 100;\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$discount = $coupon['value'];\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$total = $total - $discount;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$couponcond = $this->System_model->get_coupon_cond($code);\t\n\t\t\t\t$cop = $this->System_model->get_coupon($couponcond['id_coupon']);\n\t\t\t\tif($couponcond && $cop['actived']==1){\n\t\t\t\t\t\t\t\n\t\t\t\t//Uif($couponcond){\n\t\t\t\t\t$total_price_disc=0;\n\t\t\t\t\t$true=0;\n\t\t\t\t\t$conds=$this->System_model->get_coupon_condition($couponcond['id_coupon']);\t\n\t\t\t\t\t\n\t\t\t\t\tif(count($conds)==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($conds as $cd)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($cd['type']==3)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($cd['cond_prod']=='in')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['products']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$result =array_intersect($prods,$temp);\t\n\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$true=1;\n\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(in_array($item['product_id'],$temp))\n\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += $item['price']*$item['quantity'];\n\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\telse\n\t\t\t\t\t\t\t\tif($cd['cond_prod']=='out')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['products']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$result =array_diff($prods,$temp);\t\n\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$true=1;\n\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(in_array($item['product_id'],$temp))\n\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += $item['price']*$item['quantity'];\n\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\tif($cd['type']==1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($total>=$cd['value'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$true=1;\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\tif($cd['type']==2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($cd['cond_cat']=='in')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['categories']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$result =array_intersect($cats,$temp);\t\n\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$true=1;\n\t\t\t\t\t\t\t\t\t\t$count=$result;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\n\t\t\t\t\t\t\t\t\t\t\t$skip=0;\n\t\t\t\t\t\t\t\t\t\t\t$prods[]=$item['product_id'];\n\t\t\t\t\t\t\t\t\t\t\t$categories=$this->Category_model->identify_category_all($item['product_id']);\n\t\t\t\t\t\t\t\t\t\t\tforeach($categories as $ctp)\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(in_array($ctp['category_id'],$temp)&&$skip==0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cats[]=$ctp['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += $item['price']*$item['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$skip=1;\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\telse\n\t\t\t\t\t\t\t\tif($cd['cond_cat']=='out')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['categories']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$result =array_diff($cats,$temp);\t# to know how many that \n\t\t\t\t\t\t\t\t\t$ots=1;\n\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$true=1;\n\t\t\t\t\t\t\t\t\t\t//$trues=$trues+1;\n\t\t\t\t\t\t\t\t\t\t//$count=count($result);\n\t\t\t\t\t\t\t\t\t\t$tag=0;\n\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$prods[]=$item['product_id'];\n\t\t\t\t\t\t\t\t\t\t\t$skip=0;\n\t\t\t\t\t\t\t\t\t\t\t$tag=0;\n\t\t\t\t\t\t\t\t\t\t\t$categories=$this->Category_model->identify_category_all($item['product_id']);\n\t\t\t\t\t\t\t\t\t\t\tforeach($categories as $ctp)\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(in_array($ctp['category_id'],$temp))\n\t\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$skip=1;$tag=1;\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\tif($tag==0){\n\t\t\t\t\t\t\t\t\t\t\t\t//$cats[]=$ctp['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += ($item['price']*$item['quantity']);\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\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}\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\tif($cd['type']==4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(count($prods)>=$cd['value'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$true=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\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$trues=1;\n\t\t\t\t\t\t$nums=count($conds);\n\t\t\t\t\t\tif(count($conds)>2 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($conds as $cd)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($cd['type']==3)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($cd['cond_prod']=='in')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['products']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$result =array_intersect($prods,$temp);\t\n\t\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$trues=$trues+1;\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\n\t\t\t\t\t\t\t\t\tif($cd['cond_prod']=='out')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['products']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$result =array_diff($prods,$temp);\t\n\t\t\t\t\t\t\t\t\t\tif(count($result)>0)\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$trues=$trues+1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($cd['type']==1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($total>=$cd['value'])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//$true=1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$trues=$trues+1;\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\tif($cd['type']==2)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($cd['cond_cat']=='in')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['categories']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$result =array_intersect($cats,$temp);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(count($result)>0)\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//$true=1;\n\t\t\t\t\t\t\t\t\t\t\t$trues=$trues+1;\n\t\t\t\t\t\t\t\t\t\t\t$count=count($result);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\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$prods[]=$item['product_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t$skip=0;\n\t\t\t\t\t\t\t\t\t\t\t\t$categories=$this->Category_model->identify_category_all($item['product_id']);\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($categories as $ctp)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($ctp['category_id'],$temp) && $skip==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cats[]=$ctp['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += $item['price']*$item['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$skip=1;\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\t\n\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\telse\n\t\t\t\t\t\t\t\t\tif($cd['cond_cat']=='out')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$temp=array();\n\t\t\t\t\t\t\t\t\t\t$temp=explode(',',$cd['categories']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$result =array_diff($cats,$temp);\t# to know how many that \n\t\t\t\t\t\t\t\t\t\t$ots=1;\n\t\t\t\t\t\t\t\t\t\tif(count($result)>0)\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//$true=1;\n\t\t\t\t\t\t\t\t\t\t\t$trues=$trues+1;\n\t\t\t\t\t\t\t\t\t\t\t$count=count($result);\n\t\t\t\t\t\t\t\t\t\t\t$tag=0;\n\t\t\t\t\t\t\t\t\t\t\tforeach($cart as $item) {\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$prods[]=$item['product_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t$skip=0;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag=0;\n\t\t\t\t\t\t\t\t\t\t\t\t$categories=$this->Category_model->identify_category_all($item['product_id']);\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($categories as $ctp)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($ctp['category_id'],$temp))\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$skip=1;$tag=1;\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\tif($tag==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t//$cats[]=$ctp['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_price_disc += ($item['price']*$item['quantity']);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($cd['type']==4)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(count($prods)>=$cd['value'])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//$true=1;\n\t\t\t\t\t\t\t\t\t\t$trues=$trues+1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\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\tif($trues==$nums)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$true=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($true==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($total_price_disc>0 || $ots==1){$total1=$total_price_disc;}else{$total1=$total;}\n\t\t\t\t\t\t//$total1=$total;\n\t\t\t\t\t\t$coupon = $this->System_model->get_coupon($couponcond['id_coupon']);\n\t\t\t\t\t\t$code=$coupon['code'];\n\t\t\t\t\t\tif($coupon['expirary']==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->System_model->check_coupon_period_cond($code,$coupon['from_date'],$coupon['to_date'],date('Y-m-d')))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t if($coupon['type'] == 1) { // Percentage\n\t\t\t\t\t\t\t\t\t\t$discount = $total1 * $coupon['value'] / 100;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif($ots==1 && $total_price_disc>0){$discount = $coupon['value'];}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tif($ots==0){$discount = $coupon['value'];}\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 $total = $total - $discount;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($coupon['expirary']==1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(count($this->Order_model->identify_promotioncode($code,$user['customer_id']))==0)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif($coupon['type'] == 1) { // Percentage\n\t\t\t\t\t\t\t\t\t\t$discount = $total1 * $coupon['value'] / 100;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif($ots==1 && $total_price_disc>0){$discount = $coupon['value'];}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tif($ots==0){$discount = $coupon['value'];}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t $total = $total - $discount;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($coupon['expirary']==3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($coupon['type'] == 1) { // Percentage\n\t\t\t\t\t\t\t\t\t\t$discount = $total1 * $coupon['value'] / 100;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif($ots==1 && $total_price_disc>0){$discount = $coupon['value'];}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tif($ots==0){$discount = $coupon['value'];}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t $total = $total - $discount;\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\tif($total <= 0){$total=0;}\n\t\t\n\t\t\n\t\t# Shipping last\n\t\t\n\t\t# if pick up at store by pass this step\n\t\t$cost = 0;\n\t\tif(!$this->session->userdata('store_pickup')){\n\t\t\t\n\t\t\t$method = $this->System_model->get_shipping($_POST['method_id']);\n\t\t\t\n\t\t\t//$method2 = $this->System_model->get_shipping_v2($_POST['method_id']);\n\t\t\t$cost=0;\n\t\t\t$weight_cost=0;\n\t\t\tif($method['price_type']==2){$first_cost=$method['price_value']; $cost = $method['price_value'];}\n\t\t\t\n\t\t\tif($method['price_type']==1){$cost_weight=$method['price_value']; $weight_cost=$cost_weight*$total_weight; $cost=$weight_cost;}\n\t\t\t\n\t\t\tif($method['price_type']==3){$cost_weight=$method['price_value']; $weight_cost=$cost_weight*$total_volume; $cost=$weight_cost;}\n\t\t\t\n\t\t\t$cost = $cost+$method['base_rate'];\n\t\t\t\n\t\t\t$conditions = $this->System_model->get_shipping_conditions($method['id']);\n\t\t\tforeach($conditions as $condition) {\n\t\t\t\tif ($total >= $condition['condition']) {\n\t\t\t\t\t$cost = $condition['price'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif($gift_avail==1 && $total==0){$cost=0;}\n\t\t$total = $total + $cost + $gift_card;\n\t\tif ($total < 0)\n\t\t{\n\t\t $total = 0;\n\t\t}\n\t\n\t\tprintf('%01.2f ',$total*$data['cur_val']);\n\t}", "title": "" }, { "docid": "cd43f8c42e7953f3027e49f7b0977503", "score": "0.68947995", "text": "function total($cart){\n\t$sum=0;\n\n\tfor($i=0;$i<count($cart);$i++){\n\t\t\n\t\t/*Since the price might change depending on which day it is, and a cart is saved permamentely on a user, i didnt want to send\n\t\tthe calculated price to the cart database, since the user might checkout on a day when that price isnt valid. \n\t\tTherefor we wanna calculate the price when we check the sum in the cart so it's up to date, but when we check the sum for\n\t\tan order we want to calculate the actual prices we've sent to the database*/\n\t\tif(!empty($_SESSION['order_id'])){\n\t\t\t$price = $cart[$i][\"price\"];\n\t\t} else {\n\t\t\t$price = priceCalculator($cart[$i][\"price\"]);\n\t\t}\n\t\t$sum+= $cart[$i][\"quantity\"] * $price;\t\t\n\t}\n\treturn number_format($sum,2);\n}", "title": "" }, { "docid": "e615f43a84e14bb2f93e50f5693982c9", "score": "0.6887662", "text": "function total_price()\n{\n\n\t$total = 0;\n\n\tglobal $con;\n\n\n\tif (isset($_SESSION['customer_id'])) {\n\n\t\t$customer_id = $_SESSION['customer_id'];\n\n\n\n $sql = \"select p.*, pd.name as product_name, st.price as product_price from product_item p\njoin cart c on p.cart_id = c.id\njoin product pd on pd.id = p.product_id\njoin store_item st on st.product_id = pd.id\nwhere c.customer_id = '$customer_id' and c.status = 'active'\";\n $result = mysqli_query($con, $sql);\n\n $items = array();\n\n while ($rows = mysqli_fetch_array($result)) {\n $item = new ProductItem(\n $rows[\"id\"],\n $rows[\"product_id\"],\n $rows[\"cart_id\"],\n $rows[\"quantity\"],\n $rows[\"product_name\"],\n $rows[\"product_price\"]);\n array_push($items, $item);\n }\n foreach ($items as $item) {\n $total += $item->quantity * $item->product_price;\n }\n\n\n\t}\n\n\techo $total . \"(руб)\";\n}", "title": "" }, { "docid": "b1fbc253e21187d0973387169b6b2e87", "score": "0.6880004", "text": "public function myproductcheckout() {\n\t\tif ($this->session->has_userdata('cart_data')) {\n\t\t\tif (!empty($_SESSION['cart_data'])) {\n\t\t\t\tif ($this->session->has_userdata('userinfo')) {\n\t\t\t\t\t$cart = $_SESSION['cart_data'];\n\t\t\t\t\t$total = 0;\n\t\t\t\t\tforeach ($cart as $cart_item) {\n\t\t\t\t\t\t$total = $total + $cart_item['sub_total'];\n\t\t\t\t\t}\n\t\t\t\t\t$data['full_total'] = $total;\n\t\t\t\t\t$this->load->view('customer_views/new_checkout', $data);\n\t\t\t\t} else {\n\t\t\t\t\treturn redirect('ezimba/login');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn redirect('ezimba/allproducts');\n\t\t\t}\n\t\t} else {\n\t\t\treturn redirect('ezimba/allproducts');\n\t\t}\n\t}", "title": "" }, { "docid": "fa341c731019b2c1e1132a1e63d205c7", "score": "0.6870861", "text": "public function totalCart() : float\n {\n //$cart = $this->session->get('cart', []);\n $cart = $this->cart();\n $totalCart = 0;\n foreach ($cart as $key => $value) {\n $totalCart += $value['amount']['priceNetAllTaxes'] * $value['qty'];\n }\n return $totalCart;\n }", "title": "" }, { "docid": "7e6a173a4da59a63f17eac3864d6552f", "score": "0.6727011", "text": "public function getTotalPrice(){\r\n $totalPrice = 0;\r\n // var_dump($_SESSION['addToCartItem']);\r\n if(!empty($_SESSION['addToCartItem'])){\r\n \r\n \r\n foreach($_SESSION['addToCartItem'] as $item){\r\n $itemPrice = $this->books_model->getPriceById($item['id']);\r\n // var_dump($itemPrice[0]['price']); \r\n $totalItemPrice = $itemPrice[0]['price'] * $item['quantity']; \r\n \r\n $totalPrice += $totalItemPrice; \r\n }\r\n }\r\n else{\r\n $totalPrice = 0;\r\n }\r\n return $totalPrice;\r\n }", "title": "" }, { "docid": "38b6f935b05c66d02b4c7d2d836753a9", "score": "0.67164403", "text": "public function total() {\n\n if (!empty($this->cart_list)) { //if Cart is not empty\n foreach ($this->cart_list as $cart_product_obj) {\n \n $cart_product = $cart_product_obj->cart_product;\n\n $total = 0;\n if ($cart_product->group_units > 1 && $cart_product_obj->product_count > 1) {//if grouped price is given and product count is greater than one\n $total = (intval($cart_product_obj->product_count % $cart_product->group_units) * $cart_product->price_per_unit) + (intval($cart_product_obj->product_count / $cart_product->group_units) * $cart_product->group_price);\n } else {\n $total = ($cart_product->price_per_unit * $cart_product_obj->product_count);\n }\n\n $this->cart_total += $total;\n }\n }\n\n return number_format($this->cart_total,2);\n }", "title": "" }, { "docid": "d2dcf1d9738e218152e34c63e20982ff", "score": "0.67077595", "text": "public function setTotalPriceOfOrder(){\n $dph = (1 + $this->orderDetail['dph'] / 100);\n $data = $this->databaseConn->select(\"SELECT SUM(`price` * `count`) as sum, SUM(ROUND(`price` * $dph, 2) * `count`) as sum_dph FROM `shop_item` WHERE `id_shop_order`=?\", \n array( $this->orderDetail['id_shop_order'] ));\n $this->orderDetail['total_price'] = $data[0]['sum'];\n $this->orderDetail['total_price_dph'] = $data[0]['sum_dph'];\n }", "title": "" }, { "docid": "fddf06246ed1d9262bbb8dff980f9c2d", "score": "0.66862273", "text": "protected function calculatetotal(){\n\t\t$total = $this->UnitPrice() * $this->Quantity;\n\t\t$this->extend('updateTotal',$total);\n\t\t$this->CalculatedTotal = $total;\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "5cd6ed3eb22430c1ef29fb8c18046991", "score": "0.6670811", "text": "public function total() {\n $price = 49.99;\n\n \treturn $this->quantity * $price;\n }", "title": "" }, { "docid": "21e82ed71aeb869a00a5e452fa54e588", "score": "0.6666461", "text": "public function testTotalAmount()\n {\n $cart = new ApplePayCart();\n $cart->addItem('', '', 3, 10);\n $cart->addShipping('My Shipping 1', 3.49);\n\n $this->assertEquals(33.49, $cart->getAmount());\n }", "title": "" }, { "docid": "a7c0c34008163f7a20fbe3c8f5b0134b", "score": "0.6647991", "text": "public function execPayment($cart) {\n\n global $cookie, $smarty;\n $invoiceAddress = new Address(intval($cart->id_address_invoice));\n $customerPag = new Customer(intval($cart->id_customer));\n $currencies = Currency::getCurrencies();\n $currency = $this->getCurrency();\n\t\t$this_path_ssl = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8') . __PS_BASE_URI__ . 'modules/' . $this->name . '/';\n \n foreach ($currencies as $key => $currency)\n $smarty->assign(\n\t\tarray(\n\t\t 'imgBanner' => $this->getBanner(),\n\t\t 'total' => number_format(Tools::convertPrice($cart->getOrderTotal(true, 3), $currency), 2, '.', ''),\n\t\t 'this_path_ssl' => $this_path_ssl\n\t\t)\n\t );\n\n Tools::redirect($this_path_ssl.'/validation.php');\n //return $this->display(__file__, 'confirm.tpl');\n }", "title": "" }, { "docid": "c042e54541157de6ebc20973a2369322", "score": "0.6639866", "text": "public function getTotal_price()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "79a6653032235995d156acbd0356befa", "score": "0.66264683", "text": "public function getTotal() {\n // todo: add discount\n $shippingPrice = 0;\n if($this->shippingOption) {\n $shippingPrice = $this->shippingOption->price;\n }\n\n $discount = 0;\n if($this->discount) {\n $discount = $this->discount->discountPercentage;\n }\n\n $totalPrice = session('cart')->getTotalPrice();\n $totalPriceWithDiscount = $totalPrice - ($totalPrice / 100 * $discount);\n\n return number_format($totalPriceWithDiscount + $shippingPrice, 2);\n }", "title": "" }, { "docid": "57ea57b7c3e8c2f1eed818ef9cbb684a", "score": "0.66143256", "text": "public function Price()\n\t\t{\n\t\t\t$price = $this->totalprice;\n\t\t\tif ($this->checkbox == 'checked')\n\t\t\t{\n\t\t\t\t$price += 20;\n\t\t\t\treturn $price;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$price += 0;\n\t\t\t\treturn $price;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "73b5bafbbd3d9bea1b7bfb68d41ea8b7", "score": "0.6611387", "text": "private function calculateTotalAddon()\n\t{\n\t\t$cartProducts = $this->cart->getProducts();\n\t\t$totalAddon = 0;\n\t\tforeach($cartProducts AS $product)\n\t\t{\n\t\t\t$addonPrice =0 ;\n\t\t\t/*if(isset($this->session->data['wrapping'][$product['product_id']]))\n\t\t\t{\n\t\t\t\t$addonPrice += $this->session->data['wrapping'][$product['product_id']]['price'];\n\t\t\t}\n\t\t\tif(isset($this->session->data['greeting'][$product['product_id']]))\n\t\t\t{\n\t\t\t\t$addonPrice += $this->session->data['greeting'][$product['product_id']]['price'];\n\t\t\t}*/\n\t\t\tif(isset($this->session->data['addOnPrice'][$product['product_id']]))\n\t\t\t{\n\t\t\t\t$addonPrice += $this->session->data['addOnPrice'][$product['product_id']];\n\t\t\t}\n\t\t\t$totalAddon += $addonPrice;\n\t\t}\n\t\t$this->session->data['totalAddOnPrice'] = $totalAddon;\n\t}", "title": "" }, { "docid": "9655fce0988274e842efa6d940745be1", "score": "0.6611383", "text": "public function cartValue() {\n $total = 0;\n foreach( $this->_items as $item) {\n $total += $item->price;\n }\n return $total;\n }", "title": "" }, { "docid": "44a19abd3ecfa94749578790bd5bec3f", "score": "0.6602157", "text": "function updateTotalPrice($conn) {\n\n\t// Get shopping cart array\n\t$cart = getCart($conn);\n\n\t// Count the total price of all items\n\t$total = 0;\n\tforeach($cart as $item) {\n\t\t$total += ($item['price'] * $item['quantity']);\n\t}\n\t$_SESSION[\"total_price\"] = $total;\n\n}", "title": "" }, { "docid": "67036a266809413486d7bfe05f22da5e", "score": "0.6589321", "text": "public function calculerTotal()\r\n\t{\r\n\t\t$this->setTotal(($this->getQuantite())*($this->getPrix()));\r\n\t}", "title": "" }, { "docid": "6c49893e102d582d0fd3b2d23af79434", "score": "0.6567505", "text": "function calculateCartTotalPrice() : float\n{\n global $products;\n\n $total = 0;\n\n foreach (getCartItems() as $item) {\n $total += $item['count'] * $products[$item['id']]['price'];\n }\n\n return $total;\n}", "title": "" }, { "docid": "284c5edd8e28bf0de2df925a0e5172b1", "score": "0.6562005", "text": "public function getTotalPrice()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "aef28738a5e8d48c09e8ab06a1eb00c3", "score": "0.6540489", "text": "function total_price(){\r\n $total=0;\r\n for($i = 0; $i < count($_SESSION['cart']['product']); $i++)\r\n {\r\n $total += $_SESSION['cart']['quantity'][$i] * $_SESSION['cart']['price'][$i];\r\n }\r\n $_SESSION['total_price'] = $total;\r\n return $total;\r\n}", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6539446", "text": "public function getTotalPrice();", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6539446", "text": "public function getTotalPrice();", "title": "" }, { "docid": "8572d753b9ee41a0af58f1e06184a9c9", "score": "0.65323114", "text": "public function seTotal(Product $product)\n {\n $this->total = $this->total + $product->price;\n }", "title": "" }, { "docid": "4eea4a2da07beb9f12078503f91c7067", "score": "0.64813113", "text": "public function woo_calculate_price($cart_object) {\r\n\t \r\n\t\tglobal $wpdb, $lumise;\r\n\t\t\r\n if( !WC()->session->__isset( \"reload_checkout\" )) {\r\n $woo_ver = WC()->version;\r\n\r\n foreach ($cart_object->cart_contents as $key => $value) {\r\n\t\t\t\t\r\n\t\t\t\tif( isset($value['lumise_data']) ){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cart_item_data = $lumise->lib->get_cart_data( $value['lumise_data'] );\r\n\r\n\t\t\t\t\t$lumise_price = (\r\n\t\t\t\t\t\tisset($cart_item_data['price']) && \r\n\t\t\t\t\t\tisset($cart_item_data['price']['total'])\r\n\t\t\t\t\t) ? floatVal($cart_item_data['price']['total']) : 0;\r\n\r\n\t\t\t\t\tif(isset($cart_item_data['options']) && isset($cart_item_data['attributes'])){\r\n\t\t\t\t\t\t// fix bug package option price\r\n\t\t\t\t\t\t$arrOption = (array)$cart_item_data['options'];\r\n\t\t\t\t\t\t$arrAttribute = (array)$cart_item_data['attributes'];\r\n\t\t\t\t\t\tforeach ($arrOption as $indexListChoice => $valueListChoice) {\r\n\t\t\t\t\t\t\tforeach ($arrAttribute as $keyListOption => $valueListOption) {\r\n\t\t\t\t\t\t\t\t$arrValueListOption = (array)$valueListOption;\r\n\t\t\t\t\t\t\t\tif( \r\n\t\t\t\t\t\t\t\t\t$indexListChoice == $arrValueListOption['id'] \r\n\t\t\t\t\t\t\t\t\t&& $arrValueListOption['type'] == 'quantity' \r\n\t\t\t\t\t\t\t\t\t&& isset($arrValueListOption['values']) \r\n\t\t\t\t\t\t\t\t\t&& isset($arrValueListOption['values']['package_options']) \r\n\t\t\t\t\t\t\t\t){\r\n\t\t\t\t\t\t\t\t\tforeach ($arrValueListOption['values']['package_options'] as $keyPackageOption => $valuePackageOption) {\r\n\t\t\t\t\t\t\t\t\t\t$arrValuePackageOption = (array)$valuePackageOption;\r\n\t\t\t\t\t\t\t\t\t\tif( $valueListChoice == $arrValuePackageOption['value']){\r\n\t\t\t\t\t\t\t\t\t\t\t$lumise_price += (doubleval($arrValuePackageOption['value']) * doubleval($arrValuePackageOption['price']));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$lumise_price = $lumise->apply_filters('add-custom-price-limuse-data', $lumise_price, $cart_item_data);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$lumise_qty = isset($cart_item_data['qty']) ? intval($cart_item_data['qty']) : 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( version_compare( $woo_ver, '3.0', '<' ) ) {\r\n\t\t\t $cart_object->cart_contents[$key]['data']->price = $lumise_price/$lumise_qty; // Before WC 3.0\r\n\t\t\t } else {\r\n\t\t\t\t\t\t$cart_object->cart_contents[$key]['data']->price = $lumise_price/$lumise_qty; // Before WC 3.0\r\n\t\t\t $cart_object->cart_contents[$key]['data']->set_price( $lumise_price/$lumise_qty ); // WC 3.0+\r\n\t\t\t }\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cart_object->cart_contents[$key]['quantity'] = $lumise_qty;\r\n\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$product_id = $value['product_id'];\r\n\t\t\t\t\t$product_base_id = $this->get_base_id($product_id);\r\n \r\n\t\t\t\t\tif ($product_base_id != null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$is_product_base = $lumise->lib->get_product($product_base_id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($is_product_base != null) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$cms_template = get_post_meta($product_id, 'lumise_design_template', true );\r\n\t\t\t\t\t\t\t$product = wc_get_product($product_id);\r\n\t\t\t\t\t\t\t$template_price = 0;\r\n\t\t\t\t\t\t\t$template_stages = array();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tisset($cms_template) && \r\n\t\t\t\t\t\t\t\t!empty($cms_template) && \r\n\t\t\t\t\t\t\t\t$cms_template != '%7B%7D'\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$cms_template = json_decode(urldecode($cms_template), true);\r\n\t\t\t\t\t\t\t\t$templates = array();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tforeach ($cms_template as $s => $stage){\r\n\t\t\t\t\t\t\t\t\t$template_stages[$s] = $stage['id'];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(!in_array($stage['id'], $templates)){\r\n\t\t\t\t\t\t\t\t\t\t$templates[] = $stage['id'];\r\n\t\t\t\t\t\t\t\t\t\t$template = $lumise->lib->get_template($stage['id']);\r\n\t\t\t\t\t\t\t\t\t\t$template_price += ($template['price'] > 0)? $template['price'] : 0;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$price = $product->get_price();\r\n\t\t\t\t\t\t\t\t$total_price = 0;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ( version_compare( $woo_ver, '3.0', '<' ) ) {\r\n\t\t\t\t\t\t $total_price = $cart_object->cart_contents[$key]['data']->price = $price + $template_price; // Before WC 3.0\r\n\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t $cart_object->cart_contents[$key]['data']->set_price( $price + $template_price ); // WC 3.0+\r\n\t\t\t\t\t\t\t\t\t$total_price = $price + $template_price;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(!isset($value['lumise_incart'])){\r\n\t\t\t\t\t\t\t\t\t//push item to lumise_cart\r\n\t\t\t\t\t\t\t\t\t$data = array(\r\n\t\t\t\t\t\t\t\t\t\t'product_id' => $product_base_id,\r\n\t\t\t\t\t\t\t\t\t\t'product_cms' => $product_id,\r\n\t\t\t\t\t\t\t\t\t\t'product_name' => $product->get_name(),\r\n\t\t\t\t\t\t\t\t\t\t'template' => $lumise->lib->enjson($template_stages),\r\n\t\t\t\t\t\t\t\t\t\t'price' => array(\r\n\t\t\t\t\t\t\t\t 'total' => $total_price,\r\n\t\t\t\t\t\t\t\t 'attr' => 0,\r\n\t\t\t\t\t\t\t\t 'printing' => 0,\r\n\t\t\t\t\t\t\t\t 'resource' => 0,\r\n\t\t\t\t\t\t\t\t 'base' => $total_price\r\n\t\t\t\t\t\t\t\t ),\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$item = $lumise->lib->cart_item_from_template($data, null);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(is_array($item)){\r\n\t\t\t\t\t\t\t\t\t\t$item['incart'] = true;\r\n\t\t\t\t\t\t\t\t\t\t$lumise->lib->add_item_cart($item);\r\n\t\t\t\t\t\t\t\t\t\t$cart_object->cart_contents[$key]['lumise_incart'] = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\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\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \r\n }\r\n \r\n }\r\n\r\n }", "title": "" }, { "docid": "102e534b9ad79e600b80f48739235938", "score": "0.6475291", "text": "function calculate_total_value(){\n\n $cookie_name = 'ShoppingCart';\n $totalValue = 0;\n\n if(isset($_COOKIE[$cookie_name])) {\n\n // inclui funções de manipulação do banco\n include_once(\"functions_db.php\");\n\n // Caso o carrinho contenha livros\n $cart = unserialize($_COOKIE[$cookie_name]);\n\n foreach($cart as $book){\n\n $book = unserialize($book);\n\n $totalValue = $totalValue + ($book[1]*get_book_price($book[0]));\n\n }\n\n return $totalValue;\n\n } else {\n\n // Caso o carrinho esteja vazio\n return 0;\n\n }\n\n }", "title": "" }, { "docid": "79337b4201e2fe70557fe78fe8e57927", "score": "0.64697766", "text": "public function getTotalPrice()\r\n\t{\r\n\t\t$price = 0;\r\n\t\tforeach ($this->items as $item) {\r\n\t\t\t$price = $price + $item->price;\r\n\t\t}\r\n\t\treturn $price;\r\n\t}", "title": "" }, { "docid": "838849e685d237d75895745e1e0cc921", "score": "0.6454819", "text": "public function calculateBasketPrice() : float\n {\n $totalPrice=0.0;\n\n if(!$this->user->isLoggedIn()) { //provadi se pokud neni uzivatel prihlasen - session\n if (!isset($this->section->basket)) {\n $this->section->basketPrice = 0.0;\n return 0.0;\n }\n\n if (!unserialize($this->section->basket)) {\n $this->section->basketPrice = 0.0;\n return 0.0;\n }\n\n $basket = unserialize($this->section->basket);\n\n $keyIds = null;\n\n foreach ($basket as $basketKey => $basketValue) {\n $keyIds[] = $basketKey;\n }\n\n $selObjArr = $this->em->getProductRepository()->findBy(['id' => $keyIds]);\n\n $prices = null;\n\n foreach($selObjArr as $selObj){\n $prices[$selObj->getId()] = $selObj->getPrice();\n }\n\n foreach ($basket as $basketKey => $basketValue) {\n $totalPrice += ($prices[$basketKey] * $basketValue);\n }\n }\n else{ //provadi se pokud je uzivatel prihlasen\n $order = $this->em->getOrderOpen($this->user->getId());\n $totalPrice = $this->em->getOrderPrice($order);\n }\n\n $this->section->basketPrice = $totalPrice;\n $this->presenter->template->basketPrice = $totalPrice;\n\n return $totalPrice;\n }", "title": "" }, { "docid": "9b21fdf1f6eab6c484affac35c9c6ad1", "score": "0.64455426", "text": "public function calculateItemTotal() {\n $total = $this->quantity * $this->price;\n //echo \"total \" . $total . \"<br />\";\n \n return $total;\n }", "title": "" }, { "docid": "f7f86b35294881d27a3792e137f08e06", "score": "0.64434963", "text": "function subtotal($cart) {\r\n $cart = $this->explode_cart($cart);\r\n \r\n $subtotal = 0;\r\n \r\n foreach ($cart as $item) {\r\n $item_total = $item['price'];\r\n \r\n foreach ($item['options'] as $option) {\r\n $option_total = $option['price'];\r\n $option_total *= $option['quantity'];\r\n \r\n $item_total += $option_total; \r\n }\r\n \r\n $item_total *= $item['quantity'];\r\n \r\n $subtotal += $item_total;\r\n }\r\n \r\n return $subtotal;\r\n \r\n }", "title": "" }, { "docid": "39b058a20265142038ca7661a7679735", "score": "0.6431614", "text": "function total_price(){\n\t\n $ip_add = $GLOBALS['emailid'];\n\tglobal $db;\n $sessionid = $GLOBALS['sessionid'];\n if($ip_add == \"Guest\"){\n $sel_price = \"select * from cart where sessionid = '$sessionid' and emailid = 'Guest'\";\n }\n else{\n $sel_price = \"select * from cart where emailid = '$ip_add'\"; \n }\n\t\n $total = 0;\n\n $run_price = mysqli_query($db, $sel_price);\n\twhile($record = mysqli_fetch_array($run_price)){\n\t\t\n\t\t$pro_id = $record['p_id'];\n\t\t\n\t\t$pro_price = \"select * from products where product_id='$pro_id'\";\n\t\t\n\t\t$run_pro_price = mysqli_query($db, $pro_price);\n\t\t\n\t\twhile($p_price=mysqli_fetch_array($run_pro_price)){\n\t\t\t\n\t\t\t$product_price = array($p_price['product_price'] * $record['qty']);\n\t\t\t\n\t\t\t\n\t\t\t$values = array_sum($product_price);\t\n\n\n\t\t\t$total += $values;\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\techo $total;\n\t\n}", "title": "" }, { "docid": "daab4b53807badd0ed7155c57860200d", "score": "0.64274526", "text": "private function calculatePrice($product)\n {\n return $product->purchasePrice * ($product->vat + 1);\n }", "title": "" }, { "docid": "26111aeda7a856f900a2840eeeff0d9b", "score": "0.6422842", "text": "protected function updateTotal()\n {\n $total = 0;\n\n foreach ($this->products as $product) {\n $total += $product->getUnitPrice();\n }\n\n $this->total = $total;\n }", "title": "" }, { "docid": "1b642ce29ad3a77f78ffd352ef5a8d4d", "score": "0.641793", "text": "function get_total() {\n\t\treturn jigoshop_price(self::$total);\n\t}", "title": "" }, { "docid": "d823f6cb7c86ef8d78a35582fd609142", "score": "0.64145666", "text": "public function getTotalPrice()\n {\n return $this->totalPrice;\n }", "title": "" }, { "docid": "3e1a304764c4d15cee24a480e4d3b3bb", "score": "0.64112175", "text": "public function update_cart_price_checkout( $cart ) {\n if ( is_admin() && ! defined( 'DOING_AJAX' ) )\n return;\n\n // Avoiding hook repetition (when using price calculations for example | optional)\n if ( did_action( 'woocommerce_before_calculate_totals' ) >= 2 )\n return;\n\n // Loop through cart items\n foreach ( $cart->get_cart() as $cart_item ) {\n $cart_item['data']->set_price( 0 );\n }\n }", "title": "" }, { "docid": "68cd5d79f711eaa193be4180a34ebb3b", "score": "0.6403661", "text": "public function calculatePaymentTotal(SupplierOrderInterface $order): float;", "title": "" }, { "docid": "4ebcd60817238f7d2ed832f6fb317039", "score": "0.63962156", "text": "function total_price(){\n\t\tglobal $db;\n\t\t$ip_add=getRealIpAddr();\n\t\t$total=0;\n\t\t$sel_price=\"select * from cart where ip_add='$ip_add'\";\n\t\t\n\t\t$run_price=mysqli_query($db,$sel_price);\n\t\twhile($record=mysqli_fetch_array($run_price)){\n\t\t\t$pro_id=$record['p_id'];\n\t\t\t$pro_price=\"select * from products where product_id='$pro_id'\";\n\t\t\t$run_pro_price=mysqli_query($db,$pro_price);\n\t\t\t\n\t\twhile($p_price=mysqli_fetch_array($run_pro_price)){\n\t\t\t$product_price=array($p_price['product_price']);\n\t\t\t\n\t\t\t$values=array_sum($product_price);\n\t\t\t$total+=$values;\n\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\techo $total;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "85be74648c0d4476c780b4e4e44f58a8", "score": "0.63916785", "text": "public function getCartablePrice();", "title": "" }, { "docid": "0ebc875a8830695d83d3b86bccd08691", "score": "0.63897026", "text": "public function getTotalOfOrder()\n {\n // get store name from session\n $storeName = session()->get('store-name');\n $store = $this->storeService()->getStoreWithName($storeName);\n\n $session = session()->get('cart.'.$store['name'].'.orders');\n\n if (!empty($session)) {\n // Get the total price of product\n foreach ($session as $orders) {\n $price = str_replace(',', '', $orders['sale_price']);\n $total[] = $price * $orders['qty'];\n }\n\n $total = array_sum($total);\n\n // Update the total\n if (Session::has('cart.'.$store['name'].'.total')) {\n Session::forget('cart.'.$store['name'].'.total');\n }\n\n Session::push('cart.'.$store['name'].'.total', number_format($total, 2));\n }\n else {\n Session::forget('cart.'.$store['name'].'.total');\n $total = 0;\n }\n\n\n return number_format($total, 2);\n }", "title": "" }, { "docid": "1af0ddaf0f6e98c4695ef749b7e1ed58", "score": "0.6386749", "text": "public function getFinalTotalPrice() {\n return $this->getProductPrice() + $this->getFare() + $this->getOtherCost() + $this->getDiscount();\n }", "title": "" }, { "docid": "2262d7d694a557687fcee1aa4b2df629", "score": "0.63812625", "text": "public static function total_price_cart( $content ) {\n\t\t$content[ 'wr_total_price' ] = WC()->cart->get_cart_subtotal();\n\t\t$content[ 'wr_count_item' ] = WC()->cart->get_cart_contents_count();\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "b4b10acd933a55a95d6b4f54afed0275", "score": "0.63678294", "text": "function total_price()\n{\n global $db_connect;\n $ip_add = getRealUserIp();\n\n $total =0;\n\n $select_cart = \"SELECT * FROM cart WHERE ip_add = '$ip_add'\";\n\n $run_cart = $db_connect->query($select_cart);\n\n while($record = $run_cart->fetch(PDO::FETCH_BOTH))\n {\n $pro_id = $record['p_id'];\n $pro_qty = $record['qty'];\n $get_price = \"SELECT * FROM products WHERE product_id = '$pro_id'\";\n\n $run_price = $db_connect->query($get_price);\n\n while($row_price = $run_price->fetch(PDO::FETCH_BOTH))\n {\n $sub_total = $row_price['product_price']*$pro_qty;\n $total += $sub_total;\n }\n\n\n\n\n }\n echo\"$\".$total;\n}", "title": "" }, { "docid": "ed2ce589ef2430fc5ed92c662d4e434e", "score": "0.63663644", "text": "public function totalQuantity() : float\n {\n //$cart = $this->session->get('cart', []);\n $cart = $this->cart();\n $quantity = 0;\n foreach ($cart as $value) {\n $quantity += $value['qty'];\n }\n return $quantity;\n }", "title": "" }, { "docid": "ff7a5f723890c19fdf8009d1a9fb85d1", "score": "0.63649124", "text": "public function getTotalPrice()\n\t{\n\t\treturn $this->totalPrice;\n\t}", "title": "" }, { "docid": "ff7a5f723890c19fdf8009d1a9fb85d1", "score": "0.63649124", "text": "public function getTotalPrice()\n\t{\n\t\treturn $this->totalPrice;\n\t}", "title": "" }, { "docid": "ede7a2feb0d3ce5f4b7a730b6b4b5378", "score": "0.63433814", "text": "public function getTotal()\r\n {\r\n return $this->product->finalPrice * $this->quantity;\r\n }", "title": "" }, { "docid": "d1524cc57c2412346feb6a705fa88174", "score": "0.6342698", "text": "public function calculatePrice() {\n }", "title": "" }, { "docid": "5ad1190bc7f4ad0b1bb9ded366271eb6", "score": "0.634155", "text": "function updateshippingcost() {\n\t\tif( ! $this->session->userdata('cur_sign'))\n\t\t{\n\t\t\t$data['sign'] = 'AU$';\n\t\t\t$data['cur_val'] = 1;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//echo $this->session->userdata('cur_val');\n\t\t\t$data['sign'] = $this->session->userdata('cur_sign');\n\t\t\t$data['cur_val'] = $this->session->userdata('cur_val');\n\t\t}\n\t\t\n\t\t$cur = $this->System_model->get_currency();\n\t\t\n\t\t$data['usa'] = $cur['usa'];\n\t\t$data['eur'] = $cur['eur'];\n\t\t$data['gbp'] = $cur['gbp'];\n\t\t$data['jpy'] = $cur['jpy'];\n\t\t\n\t\t\n\t\t$session_id = $this->session->userdata('session_id');\n\t\t$cart = $this->Cart_model->all($session_id);\n\t\t$total = 0;\n\t\t$total_weight=0;\n\t\t$total_volume=0;\n\t\t$cost=0;\n\t\t$gift_card=0;\n\t\tforeach($cart as $item) {\n\t\t\tif($item['product_id']!=11)\n\t\t\t{\n\t\t\t\t$total += $item['price']*$item['quantity'];\n\t\t\t\t$weight= $this->Product_model->identify($item['product_id']);\n\t\t\t\t$total_weight=$total_weight+($weight['weight']*$item['quantity']);\n\t\t\t\t$total_volume=$total_volume+($weight['volume']*$item['quantity']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$gift_card=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($_POST['code'] != \"\") {\n\t\t\t$coupon = $this->System_model->check_coupon_code($_POST['code']);\n\t\t\t\n\t\t\tif($total >= $coupon['condition'] && $total > 0) {\n\t\t\t\tif($coupon['type'] == 1) { // Percentage\n\t\t\t\t\t$discount = $total * $coupon['value'] / 100;\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$discount = $coupon['value'];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t//\t$total = $total - $discount;\n\t\t\t}\n\t\t}\n\t\t\n\t\t# if store pick up by pass shipping calculation\n\t\tif($this->session->userdata('store_pickup')){\n\t\t\tprintf('%01.2f ',0);return;\n\t\t}else{\n\t\t\n\t\t\t$method = $this->System_model->get_shipping($_POST['method_id']); // weight cost\n\t\t\t//$method2 = $this->System_model->get_shipping_v2($_POST['method_id']); // flat _rate\n\t\t\t$first_cost=0;\n\t\t\t$cost_weight=0;\n\t\t\t$weight_cost=0;\n\t\t\tif($method['price_value'] && $method['price_type']==2 )\n\t\t\t{\n\t\t\t\t$first_cost=$method['price_value'];\n\t\t\t\t$cost=$first_cost;\n\t\t\t}\n\t\t\tif($method['price_value'] && $method['price_type']==1)\n\t\t\t{\n\t\t\t\t$cost_weight=$method['price_value'];\n\t\t\t\t$weight_cost=$cost_weight*$total_weight;\n\t\t\t\t$cost = $weight_cost;\n\t\t\t}\n\t\t\tif($method['price_value'] && $method['price_type']==3)\n\t\t\t{\n\t\t\t\t$cost_weight=$method['price_value'];\n\t\t\t\t$weight_cost=$cost_weight*$total_volume;\n\t\t\t\t$cost = $weight_cost;\n\t\t\t\t\n\t\t\t}\n\t\t\t$cost = $cost+$method['base_rate'];\t\n\t\t\t\n\t\t\t$conditions = $this->System_model->get_shipping_conditions($method['id']);\n\t\t\tforeach($conditions as $condition) {\n\t\t\t\tif ($total >= $condition['condition']) {\n\t\t\t\t\t$cost = $condition['price'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($gift_card==1 && $total==0){$cost=0;}\n\t\t\t//$cost=$cost+$weight_cost+$first_cost;\n\t\t\t\n\t\t\t\n\t\t\t//$cost = $cost/1.1;\t\t\n\t\t\t\n\t\t\t$s = '';\n\t\t\tif ($method['price_type'] == 2) {\n\t\t\t\t$s = 'Flat rate';\n\t\t\t}\n\t\t\telse if ($method['price_type'] == 1) {\n\t\t\t\t\t\n\t\t\t\t$s ='Weight rate';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$s ='Volume rate';\n\t\t\t}\n\t\t}\n\t\t\n\t\t//printf('(%s) %s%01.2f ',$s,$data['sign'],$cost*$data['cur_val']);\n\t\tprintf('%01.2f ',$cost*$data['cur_val']);\n\t}", "title": "" }, { "docid": "2972d0b1a8f7057ff21c3315cc053fa8", "score": "0.6335729", "text": "function get_cart_subtotal() {\n\n\t\tif (get_option('jigoshop_display_totals_tax')=='excluding' || ( defined('JIGOSHOP_CHECKOUT') && JIGOSHOP_CHECKOUT )) :\n\n\t\t\tif (get_option('jigoshop_prices_include_tax')=='yes') :\n\n\t\t\t\t$return = jigoshop_price(self::$subtotal - self::$tax_total);\n\n\t\t\telse :\n\n\t\t\t\t$return = jigoshop_price(self::$subtotal);\n\n\t\t\tendif;\n\n\t\t\tif (self::$tax_total>0) :\n\t\t\t\t$return .= __(' <small>(ex. tax)</small>', 'jigoshop');\n\t\t\tendif;\n\t\t\treturn $return;\n\n\t\telse :\n\n\t\t\tif (get_option('jigoshop_prices_include_tax')=='yes') :\n\n\t\t\t\t$return = jigoshop_price(self::$subtotal);\n\n\t\t\telse :\n\n\t\t\t\t$return = jigoshop_price(self::$subtotal + self::$tax_total);\n\n\t\t\tendif;\n\n\t\t\tif (self::$tax_total>0) :\n\t\t\t\t$return .= __(' <small>(inc. tax)</small>', 'jigoshop');\n\t\t\tendif;\n\t\t\treturn $return;\n\n\t\tendif;\n\n\t}", "title": "" }, { "docid": "91fb15f6117c89b0fd1f680feb104c07", "score": "0.633335", "text": "public static function calculate_totals() {\n\n\t\t$_tax = &new jigoshop_tax();\n\n\t\tself::$total = 0;\n\t\tself::$cart_contents_total = 0;\n\t\tself::$cart_contents_total_ex_tax = 0;\n\t\tself::$cart_contents_weight = 0;\n\t\tself::$cart_contents_count = 0;\n\t\tself::$cart_contents_tax = 0;\n\t\tself::$tax_total = 0;\n\t\tself::$shipping_tax_total = 0;\n\t\tself::$subtotal = 0;\n\t\tself::$subtotal_ex_tax = 0;\n\t\tself::$discount_total = 0;\n\t\tself::$shipping_total = 0;\n\t\tself::$cart_dl_count = 0;\n\t\tself::$cart_contents_total_ex_dl = 0; /* for table rate shipping */\n\t\t\n\t\tif ( ! count( self::$cart_contents ) ) :\n\t\t\tself::clear_cache(); /* no items, make sure applied coupons and session data reset, nothing to calculate */\n\t\t\treturn;\n\t\tendif;\n\t\tforeach (self::$cart_contents as $cart_item_key => $values) :\n\t\t\t$_product = $values['data'];\n\t\t\tif ($_product->exists() && $values['quantity']>0) :\n\n\t\t\t\tself::$cart_contents_count = self::$cart_contents_count + $values['quantity'];\n\t\t\t\t\n\t\t\t\t// If product is downloadable don't apply to product\n\t\t\t\tif( $_product->product_type == 'downloadable' ) {\n\t\t\t\t\tself::$cart_dl_count = self::$cart_dl_count + $values['quantity'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// If product is downloadable don't apply to weight\n\t\t\t\t\tself::$cart_contents_weight = self::$cart_contents_weight + ($_product->get_weight() * $values['quantity']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$total_item_price = $_product->get_price() * $values['quantity'] * 100; // Into pounds\n\n\t\t\t\tif ( get_option('jigoshop_calc_taxes')=='yes') :\n\n\t\t\t\t\tif ( $_product->is_taxable() ) :\n\n\t\t\t\t\t\t$rate = $_tax->get_rate( $_product->data['tax_class'] );\n\n\t\t\t\t\t\tif (get_option('jigoshop_prices_include_tax')=='yes') :\n\n\t\t\t\t\t\t\t$tax_amount = $_tax->calc_tax( $total_item_price, $rate, true );\n\n\t\t\t\t\t\telse :\n\n\t\t\t\t\t\t\t$tax_amount = $_tax->calc_tax( $total_item_price, $rate, false );\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\tif (get_option('jigoshop_prices_include_tax')=='yes' && jigoshop_customer::is_customer_outside_base() && defined('JIGOSHOP_CHECKOUT') && JIGOSHOP_CHECKOUT ) :\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Our prices include tax so we need to take the base tax rate into consideration of our shop's country\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * Lets get the base rate first\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t$base_rate = $_tax->get_shop_base_rate( $_product->data['tax_class'] );\n\n\t\t\t\t\t\t\t// Calc tax for base country\n\t\t\t\t\t\t\t$base_tax_amount = round($_tax->calc_tax( $total_item_price, $base_rate, true ));\n\n\t\t\t\t\t\t\t// Now calc tax for user county (which now excludes tax)\n\t\t\t\t\t\t\t$tax_amount = round($_tax->calc_tax( ($total_item_price-$base_tax_amount), $rate, false ));\n\n\t\t\t\t\t\t\t// Finally, update $total_item_price to reflect tax amounts\n\t\t\t\t\t\t\t$total_item_price = ($total_item_price - $base_tax_amount + $tax_amount);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendif;\n\n\t\t\t\tendif;\n\n\t\t\t\t$total_item_price \t\t\t= $total_item_price / 100; // Back to pounds\n\t\t\t\t$tax_amount \t\t\t\t= ( isset($tax_amount) ? $tax_amount : 0 ) / 100; // Back to pounds\n\n\t\t\t\tself::$cart_contents_tax = self::$cart_contents_tax + $tax_amount;\n\n\t\t\t\tself::$cart_contents_total = self::$cart_contents_total + $total_item_price;\n\t\t\t\tif( $_product->product_type <> 'downloadable' ) {\n\t\t\t\t\tself::$cart_contents_total_ex_dl = self::$cart_contents_total_ex_dl + $total_item_price;\n\t\t\t\t}\n\t\t\t\tself::$cart_contents_total_ex_tax = self::$cart_contents_total_ex_tax + ($_product->get_price_excluding_tax() * $values['quantity']);\n\t\t\t\t\n\t\t\t\t// Product Discounts for specific product ID's\n\t\t\t\tif (self::$applied_coupons) foreach (self::$applied_coupons as $code) :\n\t\t\t\t\t$coupon = jigoshop_coupons::get_coupon($code);\n\t\t\t\t\tif ( jigoshop_coupons::is_valid_product($code,$values) ) {\n\t\t\t\t\t\tif ( $coupon['type']=='fixed_product' )\n\t\t\t\t\t\t\tself::$discount_total += ( $coupon['amount'] * $values['quantity'] );\n\t\t\t\t\t\telse if ( $coupon['type']=='percent_product' )\n\t\t\t\t\t\t\tself::$discount_total += (( $values['data']->get_price() / 100 ) * $coupon['amount']);\n\t\t\t\t\t}\n\t\t\t\tendforeach;\n\n\t\t\tendif;\n\t\tendforeach;\n\t\t\n\t\t// Cart Shipping\n\t\tif (self::needs_shipping()) jigoshop_shipping::calculate_shipping(); else jigoshop_shipping::reset_shipping();\n\t\t\n\t\tself::$shipping_total = jigoshop_shipping::get_total();\n\n\t\tself::$shipping_tax_total = jigoshop_shipping::get_tax();\n\n\t\tself::$tax_total = self::$cart_contents_tax;\n\n\t\t// Subtotal\n\t\tself::$subtotal_ex_tax = self::$cart_contents_total_ex_tax;\n\t\tself::$subtotal = self::$cart_contents_total;\n\n\t\t// Cart Discounts\n\t\tif (self::$applied_coupons) foreach (self::$applied_coupons as $code) :\n\t\t\tif ( $coupon = jigoshop_coupons::get_coupon($code) ) :\n\n\t\t\t\tif ($coupon['type']=='fixed_cart') :\n\t\t\t\t\tself::$discount_total = self::$discount_total + $coupon['amount'];\n\t\t\t\telseif ($coupon['type']=='percent') :\n\t\t\t\t\tself::$discount_total = self::$discount_total + ( self::$subtotal / 100 ) * $coupon['amount'];\n\t\t\t\telseif ($coupon['type']=='fixed_product' && sizeof($coupon['products'])==0) :\n\t\t\t\t\t// allow coupons for all products without specific product ID's entered\n\t\t\t\t\tself::$discount_total = self::$discount_total + ($coupon['amount'] * self::$cart_contents_count);\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\tendforeach;\n\n\t\t// Total\n\t\tif (get_option('jigoshop_prices_include_tax')=='yes') :\n\t\t\tself::$total = self::$subtotal + self::$shipping_tax_total - self::$discount_total + jigoshop_shipping::get_total();\n\t\telse :\n\t\t\tself::$total = self::$subtotal + self::$tax_total + self::$shipping_tax_total - self::$discount_total + jigoshop_shipping::get_total();\n\t\tendif;\n\n\t\tif (self::$total < 0) self::$total = 0;\n\t}", "title": "" }, { "docid": "ab0ba4a08871d54c94ff090fda31ca26", "score": "0.633217", "text": "public function getTotalPrice()\n {\n $total_price = $this->getPrice();\n foreach($this->getExtras() as $_extra) {\n $total_price += $_extra->getPrice();\n }\n return $total_price;\n }", "title": "" }, { "docid": "cffc9b24dbd37e8eb7959fdaf5a8cef0", "score": "0.6327659", "text": "public function testProductAmount()\n {\n $cart = new ApplePayCart();\n $cart->addItem('', '', 3, 10);\n $cart->addItem('', '', 1, 20);\n\n $this->assertEquals(50, $cart->getProductAmount());\n }", "title": "" }, { "docid": "466e3f746ef8c94233d7af99d64ddbe1", "score": "0.63219804", "text": "public function pay(){\n $user_id = Auth::user()->id;; // El usuario loggeado\n Cart::session($user_id);\n $total = 0;\n foreach (Cart::getContent() as $ticket){\n if ($ticket->id != 0){\n $total += $ticket->price;\n }\n }\n // Asignar el total al recibo de esta compra\n // $recibo = Receipt::find(Cart::get(0)->price);\n // $recibo->receipt_ammount = $total;\n // $recibo->save();\n return view('pay', compact('total'));\n }", "title": "" }, { "docid": "1c1a975dd8c4f365c136147deae3fa62", "score": "0.63192075", "text": "function total_items()\n {\n return $this->contents['cart_amount'];\n }", "title": "" }, { "docid": "527f6d6cd8a3bd679a9e1a3ee357b82e", "score": "0.6313489", "text": "public function gettotalprice()\n\t{\n\t\t\n\t\t$productid=Input::get('productid');\n\t\t$cellstock=DB::table('tbl_service_pros')->where('product_id','=',$productid)->get()->toArray();\n\t\t$celltotal=0;\n\t\tforeach($cellstock as $cellstocks)\n\t\t{\n\t\t\t$cell_stock=$cellstocks->quantity;\n\t\t\t$celltotal += $cell_stock;\t\t\n\t\t}\t\n\t\t$stockdata=DB::table('tbl_stock_records')\n\t\t\t\t\t\t->join('tbl_products','tbl_stock_records.product_id','=','tbl_products.id')\n\t\t\t\t\t\t->join('tbl_purchase_history_records','tbl_products.id','=','tbl_purchase_history_records.product_id')\n\t\t\t\t\t\t->join('tbl_purchases','tbl_purchase_history_records.purchase_id','=','tbl_purchases.id')\n\t\t\t\t\t\t->where('tbl_products.id','=',$productid)\n\t\t\t\t\t\t->get()->toArray();\n\t\t\t\t\n\t\t\t\t$total=0;\n\t\t\t\tif(!empty($stockdata))\n\t\t\t\t{\n\t\t\t\t\tforeach($stockdata as $stockdatas)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$total += $stockdatas->qty;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t$Currentstock = $total - $celltotal;\n\t\t\t\n\t\t\t$qty = Input::get('qty');\n\t\t\tif($qty > $Currentstock )\n\t\t\t\t{\n\t\t\t\t\techo 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$price = Input::get('price');\n\t\t\t\t\t$total = $qty * $price;\n\t\t\t\t\techo $total;\n\t\t\t\t}\n\t\t\t\t\n\t}", "title": "" }, { "docid": "4a18ab4e591626542eef61e5da7cfb5f", "score": "0.6308827", "text": "public function cash_delivery(){\n\t\t$this->load->model('checkout_m');\n\t\t//$pay_mode = $this->input->post('pay_mode');\n\t\t$ip_data = $this->input->ip_address();\n\t\t$date = time();\n\t\tif(isset($this->session->userdata['logged_in']['user_id']) && $this->session->userdata['logged_in']['user_id'] != \"\"){\n\t\t\t$data['user_id'] = $this->session->userdata['logged_in']['user_id'];\n\t\t}else{\n\t\t\t$data['user_id'] = \"\";\n\t\t}\n\t\tif($data['user_id'] != \"\"){\n\t\t\t$data['fetch_prod_data'] = $this->checkout_m->cart_info($data['user_id'],$ip_data);\n\t\t\t\n\t\t\tif(!empty($data['fetch_prod_data'])){\n\t\t\t\t$amount_array = array();\n\t\t\t\t$quantity_array = array();\n\t\t\t\t$gst_tax_array_each_product = array();\n\t\t\t\t$original_cost = array();\n\t\t\t\t$gst_tax = array();\n\t\t\t\t$total_payable = array();\n\t\t\t\tforeach($data['fetch_prod_data'] AS $key=>$each_cart_data){\n\t\t\t\t\t$amount_array[] = $each_cart_data->price;\n\t\t\t\t\t$quantity_array[] = $each_cart_data->qty;\n\t\t\t\t\t$gst_tax_array_each_product[] = $each_cart_data->raw_gst_rate;\n\n\t\t\t\t\t$original_cost[] = ($each_cart_data->price * $each_cart_data->qty);\n\t\t\t\t\t$gst_tax[] = ($each_cart_data->raw_gst_rate * ($each_cart_data->price * $each_cart_data->qty)/100);\n\t\t\t\t\t$total_payable[] = ($each_cart_data->price * $each_cart_data->qty) - ($each_cart_data->raw_gst_rate * ($each_cart_data->price * $each_cart_data->qty)/100);\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$data['total_each_mat_price'] = array_sum($amount_array);\n\t\t\t\t$data['total_each_mat_qty'] = array_sum($quantity_array);\t\n\t\t\t\t$data['total_each_material_tax'] = array_sum($gst_tax_array_each_product);\t\n\t\t\t\t$data['total_amount'] = array_sum($original_cost);\n\t\t\t\t$data['gst_tax'] = array_sum($gst_tax);\n\t\t\t\n\t\t\t\t$data['total_payable'] = array_sum($total_payable);\n\t\t\t\t\n\n\t\t\t\tforeach($data['fetch_prod_data'] AS $key=>$each_cart_data){\n\t\t\t\t\t\n\t\t\t\t\tif($data['fetch_prod_data'][$key]->product_type == 'readymade'){\n\t\t\t\t\t\t$prod_data = $this->checkout_m->prod_data($each_cart_data->product_id);\n\t\t\t\t\t\t$product_name = $prod_data->product_name;\n\t\t\t\t\t}else if($data['fetch_prod_data'][$key]->product_type == 'customised'){\n\t\t\t\t\t\t$fetch_cat_name = $this->checkout_m->cat_data($each_cart_data->raw_category);\n\t\t\t\t\t\t$product_name = 'customised'.' '.$fetch_cat_name->category_name;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$cart_data = array(\n\t\t\t\t\t\t'product_id'=> $each_cart_data->product_id,\n\t\t\t\t\t\t'product_name'=>$product_name,\n\t\t\t\t\t\t'product_image' => $each_cart_data->design_image,\n\t\t\t\t\t\t'user_id' => $data['user_id'],\n\t\t\t\t\t\t'purchase_type'=>'customer',\n\t\t\t\t\t\t'purchaser_email'=>$this->session->userdata['logged_in']['email'],\n\t\t\t\t\t\t'supplier_name'=>$each_cart_data->raw_added_by,\n\t\t\t\t\t\t'product_price' =>$total_payable[$key],\n\t\t\t\t\t\t'order_amount' =>$original_cost[$key],\n\t\t\t\t\t\t'order_qty'=>$each_cart_data->qty,\n\t\t\t\t\t\t'payment_status'=> 'pending',\n\t\t\t\t\t\t'delivery_status'=> 'Yet To Be Shipped',\n\t\t\t\t\t\t'order_status'=> 'pending',\n\t\t\t\t\t\t'payment_method'=>'cod',\n\t\t\t\t\t\t'order_date'=>$date\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$insert_order = $this->checkout_m->order_place($cart_data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($insert_order){\n\t\t\t\t\t$remove_from_cart = $this->checkout_m->remove_cart_order_place($data['user_id']);\n\t\t\t\t\tforeach($data['fetch_prod_data'] AS $key=>$each_cart_data){\n\t\t\t\t\t\t$raw_id = $each_cart_data->raw_id;\n\t\t\t\t\t\t$updated_quantity = $each_cart_data->raw_quantity - $each_cart_data->qty;\n\n\t\t\t\t\t\t$quant_data = array(\n\t\t\t\t\t\t\t'raw_quantity' => $updated_quantity\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$update_quantity = $this->checkout_m->update_quant($quant_data,$raw_id);\n\t\t\t\t\t}\n\t\t\t\t\tredirect('thank_you');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e2ce3ce6b2287749b9f142712f6a55e3", "score": "0.6305005", "text": "public function cartCheckout(){\n \t$this->stripeAuthCheck();\n\n \tif(!Session::has('cart')){\n \t\treturn view('stripe.stripeUser.stripeCheckOut');\n \t}\n \t$oldCart = Session::get('cart');\n \t$cart = new StripePay($oldCart);\n \t$total = $cart->totalPrice;\n \treturn view('stripe.stripeUser.stripeCheckOut', ['products'=>$cart->items, 'total' => $total]);\n }", "title": "" }, { "docid": "bf9de38d2d7829bbc4e7b84284efcdf2", "score": "0.62957823", "text": "private function calculateTotal()\n\t{\n\t\t// Totals\n\t\t$total_data = array();\t\t\n\t\t\n\t\t$this->load->model('setting/extension');\t\t\n\t\t$total = 0;\n\t\t/*if(isset($this->session->data['totalAddOnPrice']))\n\t\t{\n\t\t\t$total = $this->session->data['totalAddOnPrice'] ;\n\t\t}\t*/\n\t\t$taxes = $this->cart->getTaxes();\n\t\t// Display prices\n\t\tif (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {\n\t\t\t\t$sort_order = array(); \n\t\t\t\t\n\t\t\t\t$results = $this->model_setting_extension->getExtensions('total');\n\t\t\t\t\n\t\t\t\tforeach ($results as $key => $value) {\n\t\t\t\t\t$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_multisort($sort_order, SORT_ASC, $results);\n\t\t\t\t\n\t\t\t\tforeach ($results as $result) {\n\t\t\t\t\tif ($this->config->get($result['code'] . '_status')) {\n\t\t\t\t\t\t$this->load->model('total/' . $result['code']);\n\t\t\t\n\t\t\t\t\t\t$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sort_order = array(); \n\t\t\t\t \n\t\t\t\t\tforeach ($total_data as $key => $value) {\n\t\t\t\t\t\t$sort_order[$key] = $value['sort_order'];\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tarray_multisort($sort_order, SORT_ASC, $total_data);\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$totalStr = '';\n\n\t\tforeach ($total_data as $total) { \n\t $totalStr .= '<tr><td class=\"right\"><b>'.$total['title'].'</b></td><td class=\"right\">'.$total['text'].'</td></tr>';\n\t\t if($total['code'] == 'sub_total')\n\t\t {\n\t\t\t \tif(isset($this->session->data['totalAddOnPrice']))\n\t\t\t\t{\n\t\t \t\t\t$this->intCartSubTotal = $total['value'] - $this->session->data['totalAddOnPrice'];\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->intCartSubTotal = $total['value'];\n\t\t\t\t}\n\t\t }\n\t\t if($total['code'] == 'total')\n\t\t {\n\t\t \t\tif(isset($this->session->data['totalAddOnPrice']))\n\t\t\t\t{\n\t\t\t\t\t$this->intCartTotal = $this->intCartSubTotal + $this->session->data['totalAddOnPrice'] ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->intCartTotal = $this->intCartSubTotal;\n\t\t\t\t}\n\t\t\t\t\n\t\t \t\t\n\t\t }\n\t }\n\t\t \t\n\t\treturn $totalStr;\n\t}", "title": "" }, { "docid": "4bfafd84e186ae5e1305ab0479fc4ccf", "score": "0.6291996", "text": "function extra_price_add_custom_price( $cart ) {\n if ( is_admin() && ! defined( 'DOING_AJAX' ) )\n return;\n\n if ( did_action( 'woocommerce_before_calculate_totals' ) >= 2 )\n return;\n\n foreach ( $cart->get_cart() as $cart_item ) {\n if( isset($cart_item['custom_data']['new_price']) )\n $cart_item['data']->set_price( (float) $cart_item['custom_data']['new_price'] );\n }\n }", "title": "" }, { "docid": "eb604098092cf986d11006069319b78d", "score": "0.6275071", "text": "function total_price(){\r\n\t\r\n\t\t$total = 0;\r\n\t\t\r\n\t\tglobal $con; \r\n\t\t\r\n\t\t$ip = getIp(); \r\n\t\t\r\n\t\t$sel_price = \"select * from cart where ip_add='$ip'\";\r\n\t\t\r\n\t\t$run_price = mysqli_query($con, $sel_price); \r\n\t\t\r\n\t\twhile($p_price=mysqli_fetch_array($run_price)){\r\n\t\t\t\r\n\t\t\t$pro_id = $p_price['p_id']; \r\n\t\t\t\r\n\t\t\t$pro_price = \"select * from products where product_id='$pro_id'\";\r\n\t\t\t\r\n\t\t\t$run_pro_price = mysqli_query($con,$pro_price); \r\n\t\t\t\r\n\t\t\twhile ($pp_price = mysqli_fetch_array($run_pro_price)){\r\n\t\t\t\r\n\t\t\t$product_price = array($pp_price['product_price']);\r\n\t\t\t\r\n\t\t\t$values = array_sum($product_price);\r\n\t\t\t\r\n\t\t\t$total +=$values;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\techo \"$\" . $total;\r\n\t\t\r\n\t\r\n\t}", "title": "" }, { "docid": "89bb4a2fd86cc2aa07f36ceaccb58837", "score": "0.6268763", "text": "public function total()\n\t{\n\t\treturn $this->price * $this->quantity;\n\t}", "title": "" }, { "docid": "00dbe87d759a7b0b572cbe45e407b4fb", "score": "0.62642604", "text": "public function setTotalPriceFromAmount()\n {\n $this->totalPrice = $this->getTotalPriceFromAmount();\n }", "title": "" }, { "docid": "e8955c7a2a363fda753a2afe1cf8f938", "score": "0.62608653", "text": "public function calculateTotalPrice()\n {\n $totalPrice = 0;\n foreach($this->orderItems as &$orderItem)\n {\n $totalPrice += $orderItem->actualPrice;\n }\n return number_format($totalPrice, '2', ',', '.');\n }", "title": "" }, { "docid": "a6f3e24a663c9d1cb88f322d9b8af41a", "score": "0.6245441", "text": "public function totalCartWT() : float\n {\n //$cart = $this->session->get('cart', []);\n $cart = $this->cart();\n $totalCartWT = 0;\n foreach ($cart as $key => $value) {\n $totalCartWT += $value['amount']['priceNet'] * $value['qty'];\n }\n return $totalCartWT;\n }", "title": "" }, { "docid": "2c9ee8694ce607aa31850fec79be055c", "score": "0.6225817", "text": "public function getTotalPrice()\n {\n return $this->_sumTotalsData('totalprice');\n }", "title": "" }, { "docid": "586d9b210f0bbbe0862e8c0d4706a218", "score": "0.6222561", "text": "public static function getCartCost(){\n\t\t$cost = 0;\n\t\tforeach(parent::$shoppingCart as $product_id => $products):\n\t\t\tforeach($products as $product):\n\t\t\t\t$cost += ($product['quantity'] * get_field('base_price', $product_id));\n\t\t\tendforeach;\n\t\tendforeach;\n\t\treturn $cost;\n\t}", "title": "" }, { "docid": "b26b5eda4ae1cca2da16f16d3adc8e56", "score": "0.62202233", "text": "public function cart_checkout_item()\n\t{\n\t\tif(!$this->UserID){\n\t\t\turl::redirect(PATH.\"prodicts/cart.html\");\n\t\t}\n\t\tif($this->session->get('count') == 0){\n\t\t\turl::redirect(PATH.\"prodicts/cart.html\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tforeach($_SESSION as $key=>$value) \n {\n if(($value && $key=='product_cart_id'.$value)){ \n $deal_id = $_SESSION[$key];\n $item_qty = $this->input->post($key);\t\n $this->session->set('product_cart_qty'.$deal_id,$item_qty);\n $this->session->set('shipping_name',$this->input->post('shipping_name'));\n $this->session->set('shipping_address1',$this->input->post('address1'));\n $this->session->set('shipping_address2',$this->input->post('address2'));\n $this->session->set('shipping_checkbox',$this->input->post('shipping_checkbox'));\n $this->session->set('shipping_country',$this->input->post('country'));\n $this->session->set('shipping_state',$this->input->post('state'));\n $this->session->set('shipping_city',$this->input->post('city'));\n $this->session->set('shipping_postal_code',$this->input->post('postal_code'));\n $this->session->set('shipping_phone',$this->input->post('phone'));\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\t\n $this->deals_payment_deatils = $this->payment_products->get_product_payment_details($deal_id);\n foreach($this->deals_payment_deatils as $UL){\n if($UL->shipping == \"5\"){\n /* Aramex amount calculation start */ \n\t\t\t\t\t\t\t\t\t\t\n $countryurl = url::title($this->input->post('country'));\n $getcountrydata = $this->payment_products->getcountrydata($countryurl);\n $country_code = $getcountrydata->current()->country_code;\n // $address_status = common::address_verification($this->input->post('address1'), $this->input->post('address1'), $this->input->post('postal_code'), $country_code,\"\");\n \n // if($address_status->HasErrors != \"1\"){\n // $city_name = common::address_verification($this->input->post('address1'), $this->input->post('address1'), $this->input->post('postal_code'), $country_code,\"dfd\");\n //$user_city = $city_name->SuggestedAddresses->Address->City; \n $user_city = \"\";\n $rates_calculator = common::shipping_rates_calculator($UL->weight, $UL->length, $UL->width, $UL->height, $user_city , $country_code);\n $aramex_CurrencyCode = $rates_calculator->TotalAmount->CurrencyCode;\n $aramex_Value = $rates_calculator->TotalAmount->Value;\n $this->session->set('aramex_currencycode'.$deal_id,$aramex_CurrencyCode);\n $this->session->set('aramex_value'.$deal_id,$aramex_Value);\n // }\n /* Aramex amount calculation end */ \n }\n }\n }\n }\n \n\t\t$this->get_cart_products_list = $this->payment_products->get_cart_products();\n\t\t$this->shipping_address = $this->payment_products->get_user_data_list();\n\t\t//echo kohana::debug($_SESSION); exit;\n\t\t$this->user_referral_balance = $this->payment_products->get_user_referral_balance_details();\n\t\t$this->template->content = new View(\"themes/\".THEME_NAME.\"/products/cart_checkout\");\n\n\t}", "title": "" }, { "docid": "652108cc68095bab624607db1a679a9c", "score": "0.62149626", "text": "public function getTotalProductPrice()\n {\n return (float)$this->price;\n }", "title": "" }, { "docid": "4fa5caac3d058e7a9116818552792d7a", "score": "0.6208505", "text": "public function getPriceBasket(){\n if (isset($_SESSION['basket']))\n {\n $total = 0;\n foreach($_SESSION['basket']['product'] as $product){\n $total += $product->priceProduct * $product->qteProduct;\n }\n return $total;\n }\n }", "title": "" }, { "docid": "a8ea4f3bb6166fa531e2f8ea72da7d0a", "score": "0.6208417", "text": "function total_price(){\r\n\t$total_price=0;\r\n\tglobal $con;\r\n\t$ip=getIp();\r\n\t$sel_price=\"SELECT * FROM cart WHERE ip_add='$ip'\";\r\n\t$run_price=mysqli_query($con, $sel_price);\r\n\t\r\n\twhile ($pro_price=mysqli_fetch_array($run_price)){\r\n\t\t\r\n\t\t$pro_id=$pro_price['p_id'];\r\n\t\t$pro_qty=$pro_price['qty'];\r\n\t\t$pro_price=\"SELECT * FROM products WHERE product_id='$pro_id'\";\r\n\t\t\r\n\t\t$run_pro_price=mysqli_query($con,$pro_price);\r\n\t\t\r\n\t\twhile($row_p_price=mysqli_fetch_array($run_pro_price)){\r\n\t\t\t$pro_price=$row_p_price['product_price'];\r\n\t\t\tif($pro_qty>1){\r\n\t\t\t\t$pro_price=$pro_price*$pro_qty;\r\n\t\t\t}\r\n\t\t\t$total_price=$total_price+$pro_price;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\techo \"Rs \", $total_price;\r\n}", "title": "" }, { "docid": "08f17ac9e653830c2a3b5fa9efab5d8b", "score": "0.6205909", "text": "function UnitPrice() {\n\t\tif($this->Order()->IsCart()){\n\t\t\t$buyable = $this->Buyable();\n\t\t\t$unitprice = ($buyable) ? $buyable->sellingPrice() : $this->UnitPrice;\n\t\t\t$this->extend('updateUnitPrice',$unitprice);\n\t\t\treturn $this->UnitPrice = $unitprice;\n\t\t}\n\t\treturn $this->UnitPrice;\n\t}", "title": "" }, { "docid": "856c739960cda69cc3e5a265517fee67", "score": "0.6203239", "text": "public function getTotalPrice()\n {\n return $this->totalPrice instanceof CentPrecisionMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice;\n }", "title": "" }, { "docid": "458a29e25d760a1c3a64d29ca817026e", "score": "0.619582", "text": "function cart_total_it($type)\r\n {\r\n $carted = $this->cart->contents();\r\n $ret = 0;\r\n if (count($carted) > 0) {\r\n foreach ($carted as $items) {\r\n $ret += $items[$type] * $items['qty'];\r\n }\r\n return $ret;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "8f707899753db6a10dbafddb3134a13e", "score": "0.61883616", "text": "public function total()\n {\n return ($this->count * $this->cateringMenu->price) + ($this->delivery ? 150 : 0);\n }", "title": "" }, { "docid": "0438f20a242c56b145f402f6d7852ef6", "score": "0.61855847", "text": "function calculate_cart_totals(){\n // Si no hay productos aun pero el carrito si existe ya\n if(!isset($_SESSION['car']) || empty($_SESSION['car']['products'])) {\n $car_totals =\n [\n 'subtotales' => 0,\n 'shipment' => 0,\n 'total' => 0\n ];\n return $car_totals;\n }\n \n // Calcular los totales según los products en carrito\n $subtotal = 0;\n $shipment = SHIPPING_COST;\n $total = 0;\n\n // Si ya hay productos hay que sumar las cantidades\n foreach ($_SESSION['car']['products'] as $p) {\n $_total = floatval((int)$p['cantidad'] * (float)$p['precio']);\n $subtotal = floatval($subtotal + $_total);\n }\n\n $total = floatval($subtotal + $shipment); \n $car_totals =\n [\n 'subtotal' => $subtotal,\n 'shipment' => $shipment,\n 'total' => $total\n ];\n return $car_totals;\n}", "title": "" }, { "docid": "8e218dccd46ade3f88ab6425af5ec93e", "score": "0.61791945", "text": "public function pay () {\n\t\t$rc = false;\n\t\tif (\\JambageCom\\Div2007\\Utility\\CompatibilityUtility::isLoggedIn()) {\n//\t\t\t$whereGeneral = '(fe_users_uid=\"'.$GLOBALS['TSFE']->fe_user->user['uid'].'\" OR fe_users_uid=0) ';\n\n\t\t\t$creditpointsTotal = $this->getBasketTotal();\n\n\t\t\tif ($creditpointsTotal) {\n\t\t\t\t$fieldsArrayFeUsers = [];\n\t\t\t\t$fieldsArrayFeUsers['tt_products_creditpoints'] = $GLOBALS['TSFE']->fe_user->user['tt_products_creditpoints'] - $creditpointsTotal;\n\t\t\t\tif ($fieldsArrayFeUsers['tt_products_creditpoints'] < 0) {\n\t\t\t\t\t$fieldsArrayFeUsers['tt_products_creditpoints'] = 0;\n\t\t\t\t\t$rc = $GLOBALS['TSFE']->fe_user->user['tt_products_creditpoints'];\n\t\t\t\t}\n\t\t\t\tif ($GLOBALS['TSFE']->fe_user->user['tt_products_creditpoints'] != $fieldsArrayFeUsers['tt_products_creditpoints']) {\n\t\t\t\t\t$GLOBALS['TSFE']->fe_user->user['tt_products_creditpoints'] = $fieldsArrayFeUsers['tt_products_creditpoints']; // store it also for the global FE user data\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users', 'uid=' . intval($GLOBALS['TSFE']->fe_user->user['uid']), $fieldsArrayFeUsers);\n\t\t\t\t\t$rc = $creditpointsTotal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $rc;\n\t}", "title": "" }, { "docid": "338a32fcd3490e10dd967e1a6f6d5094", "score": "0.6176539", "text": "public function getTotalAmount() {\n $invoiceposkus = $this->invoicePoskus;\n $totalskuprice = 0;\n\n foreach($invoiceposkus as $invoiceposku){\n if($invoiceposku->activ == 1){\n if($this->iddept0->idlocation == 1){\n $totalskuprice += ($invoiceposku->shipqty * (ComSpry::calcSkuCost($invoiceposku->idsku)));\n\n }else{\n $locationstocks = Deptskulog::model()->findByAttributes(array('idsku'=>$invoiceposku->idsku,'iddept'=>$this->idlocation,'po_num'=>$invoiceposku->idpo));\n if (isset($locationstocks))\n $totalskuprice += ($invoiceposku->shipqty * ($locationstocks->pricepp));\n\n }\n }\n }\n\n if(!empty($totalskuprice)){\n return(round($totalskuprice ,2));\n }\n }", "title": "" }, { "docid": "6e0550b7511c75f25aa5e9bddbe06b35", "score": "0.61760724", "text": "function get_cart_shipping_total() {\n\t\tif ( jigoshop_shipping::get_label() ) :\n\t\t\tif (jigoshop_shipping::get_total()>0) :\n\n\t\t\t\tif (get_option('jigoshop_display_totals_tax')=='excluding') :\n\n\t\t\t\t\t$return = jigoshop_price(jigoshop_shipping::get_total());\n\t\t\t\t\tif (self::$shipping_tax_total>0) :\n\t\t\t\t\t\t$return .= __(' <small>(ex. tax)</small>', 'jigoshop');\n\t\t\t\t\tendif;\n\t\t\t\t\treturn $return;\n\n\t\t\t\telse :\n\n\t\t\t\t\t$return = jigoshop_price(jigoshop_shipping::get_total() + jigoshop_shipping::get_tax());\n\t\t\t\t\tif (self::$shipping_tax_total>0) :\n\t\t\t\t\t\t$return .= __(' <small>(inc. tax)</small>', 'jigoshop');\n\t\t\t\t\tendif;\n\t\t\t\t\treturn $return;\n\n\t\t\t\tendif;\n\n\t\t\telse :\n\t\t\t\treturn __('Free!', 'jigoshop');\n\t\t\tendif;\n\t\tendif;\n\t}", "title": "" }, { "docid": "eccee1631f33b398a5ea9acc3a121617", "score": "0.61757815", "text": "protected function getOrderSumPrice() {\n\t\t$sum = 0;\n\t\t$cart = $this->session->get('cart');\n\t\t$products = $this->getCartProducts();\n\t\t\n\t\tforeach ($products as $product) {\n\t\t\t$sum += $cart[$product->getId()] * $product->getPrice();\n\t\t}\n\t\t\n\t\treturn $sum;\n\t}", "title": "" }, { "docid": "3a06d55e25d0ecfff074f09cff6ac2a5", "score": "0.61719435", "text": "protected function calculateTotal(Order $order)\n {\n $total = 0;\n foreach ($order->orderProducts as $op) {\n $total += (float)$op->unit_price * (float)$op->quantity;\n }\n\n $order->sub_total = $total;\n $order->total = $total - $order->discount;\n $order->save();\n }", "title": "" }, { "docid": "27340c9c10136415d7313a35e26b63cc", "score": "0.61538064", "text": "public function total()\n {\n return $this->priceRule->calculateTotal($this->goods);\n }", "title": "" }, { "docid": "25c7bfcbafeaf0e095ce777aac964116", "score": "0.6149471", "text": "public function getPrice(){\r\n return $this->price ? $this->price : $this->getTotal();\r\n }", "title": "" }, { "docid": "15faf5b3ff2653ecfb0e880b464ba58c", "score": "0.6148871", "text": "public function get_cart_total_price( $shipping = true )\n {\n global $obj_bwec_shipping;\n\n $products_in_cart = $this->get_products();\n $checkout_value = 0;\n\n foreach ( (array)$products_in_cart as $product )\n $checkout_value = $checkout_value + ( _bwec_get_product_real_price( $product->ID )*$product->cart_quantity );\n\n if ( $shipping ) {\n $shipping = $obj_bwec_shipping->calculate_shipping( $checkout_value );\n if ( !empty( $shipping ) )\n $checkout_value = $checkout_value + $shipping['valor'];\n }\n\n return $checkout_value;\n }", "title": "" }, { "docid": "319d8c5dca4186579e97f39dee8fba0a", "score": "0.6143136", "text": "function total_price(){\r\n\t\t\t$total = 0;\r\n\t\t\t$values = 0;\r\n\t\t\t$subtotal=0;\r\n\t\t\tglobal $conn;\r\n\t\t\t$ip = getIp();\r\n\t\t\t$sel_price = \"SELECT cart_pro_id, cart_ip_add, cart_qty FROM tbl_cart WHERE cart_ip_add ='$ip'\";\r\n\t\t\t$pre_price = mysqli_query($conn,$sel_price);\r\n\t\t\t$i = 0;\r\n\t\t\twhile($pro_price = mysqli_fetch_array($pre_price)){\r\n\t\t\t\t$pro_id = $pro_price['cart_pro_id'];\r\n\t\t\t\t$qty = $pro_price['cart_qty'];\r\n\t\t\t\t$pro_price = \"SELECT * FROM tbl_product WHERE product_id = '$pro_id'\";\r\n\t\t\t\t$pre_pro_price = mysqli_query($conn,$pro_price);\r\n\t\t\t\twhile($p_pro_price = mysqli_fetch_array($pre_pro_price)){\r\n\t\t\t\t\t$product_price = array($p_pro_price['product_price']);\r\n\t\t\t\t\t$product_id = $p_pro_price['product_id'];\r\n\t\t\t\t\t$product_title = $p_pro_price['product_title'];\r\n\t\t\t\t\t$product_image = $p_pro_price['product_image'];\r\n\t\t\t\t\t$single_price = $p_pro_price['product_price'];\r\n\t\t\t\t\t $values = array_sum($product_price);\r\n\r\n\t\t\t\t\t$subtotal =$values*$qty;\r\n\t\t\t\t\t$total+=$subtotal;\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\techo $total;\r\n\r\n}", "title": "" }, { "docid": "5e0da0cfb4cb33efd173173567b90ee2", "score": "0.61413085", "text": "public function handler_wc_calculate_totals( $total, WC_Cart $obj_wc_cart )\n\t{\n\t\t//\tignore cart\n\t\tif ( ! is_checkout() && ! defined( 'WOOCOMMERCE_CHECKOUT' ) )\n\t\t{\n\t\t\treturn $total;\n\t\t}\n\n\t\t//\tskip, if all disabled\n\t\tif( ! $this->options[self::OPT_ENABLE_ALL] )\n\t\t{\n\t\t\treturn $total;\n\t\t}\n\n\t\tif( ! $this->request_data_loaded)\t\n\t\t{\n\t\t\t$this->load_request_data();\n\t\t}\n\t\t\n\t\t\t\t//\tallows to skip adding total fees by third party\n\t\tif( ! apply_filters( 'wc_add_fees_cart_before_add_total_fee', true, $obj_wc_cart ))\n\t\t{\n\t\t\treturn $total;\n\t\t}\n\t\t\n\t\t// Grand Total as calculated by WC - other plugins may change total value at this point:\n\t\t// \n\t\t//\tDiscounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit)\n\t\t\n\t\t$cart_discount_total = version_compare( WC()->version, '2.3', '>=') ? 0 : $obj_wc_cart->discount_total;\n\t\t$total_incl_tax = max( 0, round( $obj_wc_cart->cart_contents_total + $obj_wc_cart->tax_total + $obj_wc_cart->shipping_tax_total + $obj_wc_cart->shipping_total - $cart_discount_total + $obj_wc_cart->fee_total, $obj_wc_cart->dp ) );\n\n\t\t//\ttax_total includes tax of fees but not shipping tax, therefore add it\n\t\t$total_tax = round( $obj_wc_cart->tax_total + $obj_wc_cart->shipping_tax_total, $obj_wc_cart->dp );\n\t\t$total_excl_tax = round( $total_incl_tax - $total_tax, $obj_wc_cart->dp );\n\t\t\n\t\t$cart_tax = ( version_compare ( WC()->version, '2.3', '>=' ) ) ? new WC_Tax() : $obj_wc_cart->tax;\n\t\t$fee_total = $this->calculate_gateway_fee_total( $cart_tax, $obj_wc_cart->prices_include_tax, $total_excl_tax, $total_incl_tax );\n\t\tif( ! isset( $fee_total ) )\n\t\t{\n\t\t\treturn $total;\n\t\t}\n\t\t\n\t\t$this->add_fee_to_cart( $fee_total, $obj_wc_cart );\n\t\t\n\t\t$obj_wc_cart->fee_total += $fee_total->amount_no_tax;\n\t\t$fee_sum_tax = 0.0;\n\t\t\n\t\tif( $fee_total->taxable )\n\t\t{\n\t\t\tif( isset( $fee_total->tax_amount ) )\n\t\t\t{\n\t\t\t\t$obj_wc_cart->tax_total += $fee_total->tax_amount;\n\t\t\t\t$fee_sum_tax += $fee_total->tax_amount;\n\t\t\t}\n\n\t\t\t$taxes = isset( $fee_total->taxes) ? $fee_total->taxes : array();\n\n\t\t\t\t\t// Tax rows - merge the totals we just got\n\t\t\tforeach ( array_keys( $obj_wc_cart->taxes + $taxes ) as $key ) \n\t\t\t{\n\t\t\t\t$obj_wc_cart->taxes[ $key ] = ( isset( $taxes[ $key ] ) ? $taxes[ $key ] : 0 ) + ( isset( $obj_wc_cart->taxes[ $key ] ) ? $obj_wc_cart->taxes[ $key ] : 0 );\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$total += $fee_total->amount_no_tax + $fee_sum_tax;\n\t\t\n\t\treturn $total;\t\n\t}", "title": "" }, { "docid": "a20bd5d2bd1325a74e201ddaa11a2718", "score": "0.61401516", "text": "public function total()\n {\n $totalAmount = 0;\n\n foreach ($this->items as $item) {\n $totalAmount += $item['total_price'];\n }\n\n $totalAmount = $this->promotion->applyPromo($this->items, $totalAmount);\n\n return $this->helper->formatPrice($totalAmount);\n }", "title": "" }, { "docid": "57754f5c6230c783f812caa52f567e0a", "score": "0.61290365", "text": "public function getTotalPrice() {\n $invoiceposkus = $this->invoicePoskus;\n $totalskuprice1 = array();\n $totalskuprice2 = array();\n $movement = false;\n \n foreach($invoiceposkus as $invoiceposku){\n if($invoiceposku->activ == 1){\n if($invoiceposku->movements==1){\n $movement = true;\n $deptskulog = Deptskulog::model()->findByAttributes(array('idsku' => $invoiceposku->idsku, 'iddept' => $invoiceposku->idinvoice0->idlocation, 'po_num' => $invoiceposku->idinvoice0->idpo), 'pricepp > 0');\n \n if (isset($deptskulog))\n $totalskuprice1[] = $invoiceposku->shipqty * $deptskulog->pricepp;\n }\n else if($invoiceposku->movements==2){\n $deptskulog = Deptskulog::model()->findByAttributes(array('idsku' => $invoiceposku->idsku, 'iddept' => $invoiceposku->idinvoice0->idlocation, 'po_num' => $invoiceposku->idinvoice0->idpo), 'pricepp > 0');\n \n if (isset($deptskulog))\n $totalskuprice2[] = $invoiceposku->shipqty * $deptskulog->pricepp;\n }\n }\n }\n \n if(!empty($totalskuprice1) && $movement){\n return(round(array_sum($totalskuprice1) ,2));\n }\n else if(!empty($totalskuprice2) && !$movement){\n return(round(array_sum($totalskuprice2) ,2));\n }\n }", "title": "" }, { "docid": "5bd9e4fcc49af1e9eae987c11d51fd32", "score": "0.6117431", "text": "public function cartSubTotal(ShoppingCart $cart): float\n {\n $contents = $cart->getCartContents();\n $total = 0;\n foreach ($contents as $v) {\n $total += $this->calcItem($v->getItemPrice());\n }\n return $total;\n }", "title": "" }, { "docid": "fbcba4c2d2cf82f79eeb14dcd089fb94", "score": "0.6113802", "text": "public function getPriceTotalFrom()\n {\n }", "title": "" }, { "docid": "762346c6aa1ceed8da9b439141eab268", "score": "0.61109316", "text": "public function getPayPrice()\n {\n return $this->pay_price;\n }", "title": "" }, { "docid": "783a195735c1adc508bbd100c419ef84", "score": "0.610241", "text": "function total_price(){\n \n global $db;\n \n $ip_add = getRealIpUser();\n \n $total = 0;\n \n $select_cart = \"select * from cart where ip_add='$ip_add'\";\n \n $run_cart = mysqli_query($db,$select_cart);\n \n while($record=mysqli_fetch_array($run_cart)){\n \n $pro_id = $record['p_id'];\n \n $product_qty = $record['qty'];\n \n $get_price = \"select * from products where product_id='$pro_id'\";\n \n $run_price = mysqli_query($db,$get_price);\n \n while($row_price=mysqli_fetch_array($run_price)){\n \n $sub_total = $row_price['product_price']*$product_qty;\n \n $total += $sub_total;\n \n }\n }\n\n echo \"RM \" . $total; \n}", "title": "" }, { "docid": "921ab5d45e6a8c051a6984d6fc388155", "score": "0.6080214", "text": "public function subTotal()\n {\n return $this->items->sum(function($cart) {\n return $cart->item->price() * $cart->qty;\n });\n }", "title": "" }, { "docid": "eceb8cca581f63f3bf15c22141371870", "score": "0.6080213", "text": "function Total() {\n\t\tif($this->Order()->IsCart()){ //always calculate total if order is in cart\n\t\t\treturn $this->calculatetotal();\n\t\t}\n\t\treturn $this->CalculatedTotal; //otherwise get value from database\n\t}", "title": "" }, { "docid": "b6aa6b8e100c428e8c346f247170e357", "score": "0.60770065", "text": "public function total() {\n $products = $this->session->get('products');\n $total = 0;\n\n foreach($products as $product) {\n $total += $product->getPrice();\n }\n\n return $total;\n }", "title": "" }, { "docid": "c424d0578cb5e3d0a5fe211d6b6d3bbb", "score": "0.60740095", "text": "private function calculateTotalPaid()\n {\n $totalPaid = new Money(0, $this->getCurrency());\n\n foreach ($this->expenditureItems as $expenditureItem) {\n $totalPaid = $totalPaid->add($expenditureItem->getAmountPaid());\n }\n\n $this->totalPaid = $totalPaid->getAmount();\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "1ff3c0510b435eb2776fa254cc80eb52", "score": "0.0", "text": "public function run()\n {\n factory(App\\Models\\Growlogs\\Growlog::class, 60)->create()->each(function ($u) {\n // $u->stages()->sync([1 => ['stage_start' => true],2,3,4]);\n factory(App\\Models\\Growlogs\\GrowlogDay::class,random_int(10,40))->create([\n 'growlog_id' => $u->id,\n ])->each(function ($u){\n if($u->id!=null){\n factory(App\\Models\\Growlogs\\GrowlogDayText::class,random_int(1,2))->create([\n 'growlog_day_id' => $u->id,\n ]);\n factory(App\\Models\\Growlogs\\GrowlogDayImage::class,random_int(1,4))->create([\n 'growlog_day_id' => $u->id,\n ]);\n }\n\n\n });\n\n\n });\n }", "title": "" } ]
[ { "docid": "1dcddd9fc4f2fbc62e484166f7f3332c", "score": "0.802869", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('roles')->truncate();\n DB::table('role_user')->truncate();\n\n // SEEDS\n $this->call(RolesTableSeeder::class);\n\n // FACTORIES\n /*\n factory(App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(App\\Post:class)->make());\n });*/\n\n //$roles = factory(App\\Role::class, 3)->create();\n\n $users = factory(User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(Post::class)->make());\n $user->roles()->attach(Role::findOrFail(rand(1, 3)));\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n }", "title": "" }, { "docid": "6242c83182914af1dca6a8760034eb1d", "score": "0.8013324", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ross = User::create([\n 'email' => '[email protected]',\n 'name' => 'Ross Bartlett',\n 'password' => Hash::make('password')\n ]);\n\n $dyl = User::create([\n 'email' => '[email protected]',\n 'name' => 'Dylan Gordon',\n 'password' => Hash::make('password')\n ]);\n\n Interest::create([\n 'user_id'=>$ross->id,\n 'interest'=>'Calgary Flames'\n ]);\n Interest::create([\n 'user_id'=>$ross->id,\n 'interest'=>'Rugby'\n ]);\n\n Like::create([\n 'user_id'=>$ross->id,\n 'item'=>'rVynOFlmK_Q',\n 'platform'=> 0 //youtube\n ]);\n\n\n }", "title": "" }, { "docid": "189174cea9e9e7145c489e18fd0089a4", "score": "0.79804534", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "6d65d81db98c4e3d10f6aa402d6393d9", "score": "0.79774004", "text": "public function run()\n {\n if (App::environment() == 'production') {\n exit(\"You shouldn't run seeds on production databases\");\n }\n\n DB::table('roles')->truncate();\n\n Role::create([\n 'id' => 3,\n 'name' => 'Root',\n 'description' => 'God user. Access to everything.'\n ]);\n\n Role::create([\n 'id' => 2,\n 'name' => 'Administrator',\n 'description' => 'Administrator user. Many privileges.'\n ]);\n\n Role::create([\n 'id' => 1,\n 'name' => 'Guest',\n 'description' => 'Basic user.'\n ]);\n\n }", "title": "" }, { "docid": "b0c4f271872f35f165325de519bb487f", "score": "0.7976992", "text": "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "37a0b6a3e76804710ff7c9469eab40c2", "score": "0.79632276", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n factory(App\\User::class, 1)->create();\n factory(App\\Supplier::class, 10)->create();\n $categories = factory(App\\Category::class, 5)->create();\n \t$categories->each(function ($category) {\n factory('App\\SubCategory', 2)->create(['category_id' => $category->id]);\n });\n factory(App\\Warehouse::class, 5)->create();\n factory(App\\Employee::class, 10)->create();\n factory(App\\Customer::class, 10)->create();\n factory(App\\Income::class, 10)->create();\n factory(App\\Expense::class, 10)->create();\n factory(App\\Product::class, 20)->create();\n factory(App\\Purchase::class, 5)->create();\n factory(App\\Sale::class, 5)->create();\n }", "title": "" }, { "docid": "c8b0d4df0b00483f5e354b9b76b4f370", "score": "0.7955267", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Réén Pock',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456')\n ]);\n factory(Category::class, 5)->create();\n factory(Product::class, 100)->create()->each(function($product){\n for ($i=0; $i < 3; $i++) { \n $product->categories()->attach(Category::inRandomOrder()->first()->id);\n }\n });\n }", "title": "" }, { "docid": "810e2984e6eded128ac32a3c06fe3e23", "score": "0.7949612", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "title": "" }, { "docid": "338cba437c44387add3ca68b7433a1d6", "score": "0.794459", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "title": "" }, { "docid": "33dbfbc00700305306745acd24e39069", "score": "0.7938189", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "title": "" }, { "docid": "ff581332117c5a8ceb165939e5861a64", "score": "0.79368967", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "a3350553b93dfb0209ddf6ddfd533d8d", "score": "0.79337025", "text": "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "title": "" }, { "docid": "fa8f6aeb20ad773ecabd02bb875a6c88", "score": "0.79219097", "text": "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('sections')->truncate();\n\n Section::create([\n 'id' => 1,\n 'name' => 'Lifestyle Habits',\n 'description' => 'This section focuses on lifestyle and habits of a patient']);\n Section::create([\n 'id' => 2,\n 'name' => 'Family History',\n 'description' => 'This section focuses on medical history of family of a patient']);\n Section::create([\n 'id' => 3,\n 'name' => 'Complaints',\n 'description' => 'This section deals with recent complaints of pateint']);\n Section::create([\n 'id' => 4,\n 'name' => 'Clinical Examination',\n 'description' => 'This section deals with various clinical reports of a patient']);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "d683182ec8b2d791dddbb2f54ba8f8b3", "score": "0.7919681", "text": "public function run()\n {\n //Assign dummy Roles for users with in UsersTableSeeder\n DB::table('roles')->insert([\n 'title' => 'Admin',\n ]);\n\n DB::table('roles')->insert([\n 'title' => 'Employee',\n ]);\n\n //assigned user a Role\n DB::table('role_user')->insert([\n 'role_id' => '1',\n 'user_id' => '1',\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => '2',\n 'user_id' => '2',\n ]);\n\n $faker = Faker::create();\n foreach (range(3, 20) as $index) {\n DB::table('role_user')->insert([\n 'role_id' => rand(1, 2),\n 'user_id' => $index,\n ]);\n }\n }", "title": "" }, { "docid": "22408a54239aeef49683358b8f38db07", "score": "0.7906679", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // create categories\n \t$categories = factory('App\\Category', 10)->create();\n // create posts\n $posts = factory('App\\Post', 50)->create();\n // fore each post, populate 1-3 cates\n $posts->each(function ($post) use ($categories) {\n \t$post->categories()->attach(\n \t\t$categories->random(rand(1, 3))->pluck('id')->toArray()\n \t);\n });\n }", "title": "" }, { "docid": "64ddc727eef6e28c29db4c4be58c3578", "score": "0.78924936", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "title": "" }, { "docid": "4f1d5d37635c3d5345f27254da911e96", "score": "0.78846294", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 15; $i++) {\n \\App\\Article::create([\n 'title' => $faker->sentence,\n 'content' => $faker->paragraphs($nb = 4, $asText = true),\n 'author' => $faker->name,\n 'num_views' => $faker->randomNumber($nbDigits = 4),\n 'publish_state' => $faker->boolean,\n 'publish_date' => ($faker->dateTimeThisYear($max = 'now'))->format('c')\n ]);\n }\n }", "title": "" }, { "docid": "b993bdb17f6322a43f700f6d1f5b1006", "score": "0.7882899", "text": "public function run()\n {\n // Trunkate the databse so we don;t repeat the seed\n DB::table('roles')->delete();\n\n Role::create(['name' => 'root']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'supervisor']);\n Role::create(['name' => 'officer']);\n Role::create(['name' => 'user']);\n }", "title": "" }, { "docid": "3c219ba37518a110e693986f93eb9e5e", "score": "0.7877671", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('roles')->insert([\n 'name' => 'prof',\n 'display_name' => 'professor',\n 'description' => 'Perfil professor',\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Marcos André',\n 'email' => '[email protected]',\n 'password' => bcrypt('marcos123'),\n 'first_login' => 0,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('professores')->insert([\n 'nome' => 'Marcos André',\n 'matricula' => '12.3456-7',\n 'data_nascimento' => '1969-11-30',\n 'user_id' => 1,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('role_user')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "e78ec24a86879882dd348d32e57ca04d", "score": "0.7877498", "text": "public function run()\n {\n /* factory(\\App\\Models\\Category::class, 5)->create()->each(function ($category) {\n factory(\\App\\Models\\Category::class, random_int(0, 3))->create(['parent_id' => $category->id]);\n });\n\n factory(App\\Models\\User::class, 10)->create()->each(function ($user) {\n factory(App\\Models\\Post::class, random_int(0, 10))->create(['user_id' => $user->id])->each(function ($post) {\n $post->postContent()->save(factory(PostContent::class)->make());\n });\n });\n\n DB::table('users')->where('id', 1)->update(['user_name' => 'tiny', 'email' => '[email protected]', 'locked_at' => null]);\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(TypesTableSeeder::class);*/\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "5b880595ea5798cabac1baebe896e5e7", "score": "0.7871811", "text": "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "title": "" }, { "docid": "17dca3224f1ceff9e07014643cc0ecc7", "score": "0.78660107", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /* role seeder */\n DB::table('roles')->insert([\n 'id' => 1,\n 'title' => 'Customer',\n ]);\n\n DB::table('roles')->insert([\n 'id' => 2,\n 'title' => 'Seller',\n ]);\n\n \n /* seller category seeder */\n factory(App\\SellerCategory::class, 10)->create();\n\n /* user seeder */\n factory(App\\User::class, 20)->create();\n\n /* request seeder */\n factory(App\\Request::class, 10)->create();\n }", "title": "" }, { "docid": "900d2a6c98a63207bb98e4476f29b982", "score": "0.7853861", "text": "public function run()\n {\n DB::table('users')->truncate();\n DB::table('roles')->truncate();\n\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'name' => 'admin'\n ]);\n Role::create([\n 'name' => 'author'\n ]);\n Role::create([\n 'name' => 'user'\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('test12345'),\n 'role' => 1\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => bcrypt('test12345'),\n ]);\n \n $this->call([\n DishCategorySeeder::class,\n DishesSeeder::class\n ]);\n }", "title": "" }, { "docid": "d7bb625a9812b9cb6a9362070a5950ee", "score": "0.7852421", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Add Company\n $company = Company::create([\n 'name' => 'IAPP',\n 'employee_count' => 100,\n 'size' => 'Large'\n ]);\n\n $secondCompany = Company::create([\n 'name' => 'ABC',\n 'employee_count' => 20,\n 'size' => 'Small'\n ]);\n\n // Add user\n $general_user = User::create([\n 'name' => 'Shayna Sylvia',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'street' => '9 Mill Pond Rd',\n 'city' => 'Northwood',\n 'state' => 'NH',\n 'zip' => '03261',\n 'company_id' => $company->id,\n 'type' => 'admin'\n ]);\n\n // Add Challenge\n $challenge = Challenge::create([\n 'name' => 'Conquer the Cold 2018',\n 'slug' => 'conquer',\n 'start_date' => '2018-11-01',\n 'end_date' => '2018-12-31',\n 'type' => 'Individual',\n 'image_url' => '/images/conquer-the-cold-banner.png'\n ]);\n }", "title": "" }, { "docid": "b33aa01f2832813762ccbfb3d2d3532d", "score": "0.7846495", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(5)->create();\n $this->call(MenuCategoryTableSeeder::class);\n $this->call(AttributeTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n \\App\\Models\\Product::factory(50)->create();\n \\App\\Models\\AttributeProduct::factory(500)->create();\n \n // Circles\n $this->call(CircleTableSeeder::class);\n\n // Top Products\n $this->call(TopProductTableSeeder::class);\n\n // Random Products\n $this->call(RandomProductTableSeeder::class);\n }", "title": "" }, { "docid": "b6032e82ff7748213ddc30ee53d1f11b", "score": "0.7830752", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('roles')->insert(\n [\n [\n 'title' => 'Директор',\n 'name' => 'Director',\n 'parent_id' => '0'\n ],\n [\n 'title' => 'Зам директор',\n 'name' => 'Deputy director',\n 'parent_id' => '1'\n ],\n [\n 'title' => 'Начальник',\n 'name' => 'Director',\n 'parent_id' => '2'\n ],\n [\n 'title' => 'ЗАм начальник',\n 'name' => 'Deputy сhief',\n 'parent_id' => '3'\n ],\n [\n 'title' => 'Работник',\n 'name' => 'Employee',\n 'parent_id' => '4'\n ]\n ]);\n\n\n $this->call(departmentsTableSeeder::class);\n $this->call(employeesTableSeeder::class);\n }", "title": "" }, { "docid": "f72b073f1562b517a5cbd8caadf6f8b1", "score": "0.78215635", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1, 50) as $index) {\n\n Category::create([\n 'title' => $faker->jobTitle,\n ]);\n }\n }", "title": "" }, { "docid": "16547d5faa64dc71264cbf37cd0a5a22", "score": "0.7819104", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "title": "" }, { "docid": "7e80466dc8005ac35863dfc3e5c7c169", "score": "0.7817918", "text": "public function run()\n {\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => Hash::make('adminadmin'),\n ]);\n\n Genre::factory(5)->create();\n Classification::factory(5)->create();\n Actor::factory()->count(50)->create();\n Director::factory(20)->create();\n Movie::factory(30)->create()->each(function ($movie) {\n $movie->actors(['actorable_id' => rand(30, 50)])->attach($this->array(rand(1, 50)));\n });\n Serie::factory(10)->create();\n Season::factory(20)->create();\n Episode::factory(200)->create()->each(function ($episode) {\n $episode->actors(['actorable_id' => rand(15, 30)])->attach($this->array(rand(1, 50)));\n });\n }", "title": "" }, { "docid": "c621382a9007bb3f312489ab7da81f56", "score": "0.7814175", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('user_roles')->delete();\n\n $roles = [\n ['id' => 1, 'name' => 'Director'],\n ['id' => 2, 'name' => 'Chair'],\n ['id' => 3, 'name' => 'Secretary'],\n ['id' => 4, 'name' => 'Faculty'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('user_roles')->insert($roles);\n }", "title": "" }, { "docid": "405076a95a7f251d6fa3259dc0d9fb6a", "score": "0.7811153", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n // factory(Category::class, 25)->create();\n factory(Category::class, 10)->create();\n factory(Post::class, 50)->create();\n factory(Video::class, 5)->create();\n }", "title": "" }, { "docid": "40a0e12ed745bd76bf6ddbc9fe97e1a8", "score": "0.78103507", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert([\n // 'name' => 'employee',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('roles')->insert([\n // 'name' => 'admin',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('units')->insert([\n // 'name' => 'kg',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'litre',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'dozen',\n // ]);\n }", "title": "" }, { "docid": "7c1b3b143dd76d76cb8edbf417f06a8e", "score": "0.7806364", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // create 6 users\n // User::factory(1)->create()->each(function ($user){\n\n // // create 15 posts for each user\n // $post = Post::factory(1)->create()->each(function ($post){\n // // /create 5 comments for each post\n // $comment = Comment::factory(1)->make();\n // $post->comments()->saveMany($comment);\n // });\n // $user->posts()->saveMany($post);\n // }); \n \n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Post::truncate();\n Comment::truncate();\n User::factory(10)->create();\n Post::factory(50)->create();\n Comment::factory(100)->create();\n // Enable it back\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n \n }", "title": "" }, { "docid": "3a3dbeb16bee414c118c000c37fbbdf7", "score": "0.7802872", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "title": "" }, { "docid": "84a2fe5ce7256b53cae2bd09c99e6aaf", "score": "0.7802348", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "title": "" }, { "docid": "b2a340012128cdc0ce9898ea0cc3c209", "score": "0.77989215", "text": "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "title": "" }, { "docid": "48fe7d1d0d33106e3241378b6668a775", "score": "0.7796966", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 50)->create();\n factory(Post::class, 500)->create();\n factory(Category::class, 10)->create();\n factory(Tag::class, 150)->create();\n factory(Image::class, 1500)->create();\n factory(Video::class, 500)->create();\n factory(Comment::class, 1500)->create();\n }", "title": "" }, { "docid": "461c8a228780b7db8fef36082242e109", "score": "0.7795819", "text": "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "title": "" }, { "docid": "706ff7ec69aebe11396b7ff7e05d374c", "score": "0.77862066", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "d807dce754ed136319cb37b9a9be6494", "score": "0.77856374", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Localizacao::class, 5)->create();\n factory(Estado::class, 2)->create();\n factory(Tamanho::class, 4)->create();\n factory(Cacifo::class, 20)->create();\n factory(Cliente::class, 10)->create();\n factory(UserType::class, 2)->create();\n factory(User::class, 8)->create();\n factory(Encomenda::class, 25)->create();\n factory(LogCacifo::class, 20)->create();\n\n foreach (Encomenda::all() as $encomenda) {\n $user = User::all()->random();\n DB::table('encomenda_user')->insert(\n [\n 'user_id' => $user->id,\n 'encomenda_id' => $encomenda->id,\n 'user_type' => $user->tipo_id,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n );\n }\n\n }", "title": "" }, { "docid": "4a8a5f2d0bf57a648aa039d994ba098c", "score": "0.7780426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $spec = [\n [\n 'name'=>'Dokter Umum',\n 'title_start'=> 'dr.',\n \"title_end\"=>null,\n ],[\n 'name'=>\"Spesialis Kebidanan Kandungan\",\n 'title_start'=>\"dr.\",\n 'title_end'=>\"Sp.OG\",\n ],[\n \"name\"=>\"Spesialis Anak\",\n \"title_start\"=>\"dr.\",\n \"title_end\"=>\"Sp.A\",\n ],[\n \"name\"=>\"Spesialis penyakit mulut\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>\"Sp.PM\"\n ],[\n \"name\"=>\"Dokter Gigi\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>null,\n ]\n ];\n\n DB::table(\"specializations\")->insert($spec);\n\n \n factory(User::class, 10)->create([\n 'type'=>\"doctor\",\n ]);\n factory(User::class, 10)->create([\n 'type'=>\"user\",\n ]);\n factory(Message::class, 100)->create();\n }", "title": "" }, { "docid": "e9a395588cf010ce0bc08d6b3e36927d", "score": "0.7777486", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "title": "" }, { "docid": "b32c8e0e5988bd2cbc8f9b3c1069084f", "score": "0.7775103", "text": "public function run()\n {\n //這邊用到集合 pluck() 將全部User id取出並轉為陣列,如 [1,2,3,4,5]\n $user_ids = User::all()->pluck('id')->toArray();\n\n //同上\n $topic_id = Topic::all()->pluck('id')->toArray();\n\n //取Faker 實例化\n $faker = app(Faker\\Generator::class);\n\n //生成100筆假數據\n $posts = factory(Post::class)->times(100)\n ->make()->each(function ($post,$index) use ($user_ids,$topic_id,$faker)\n {\n //用User id隨機取一個並賦值\n $post->user_id = $faker->randomElement($user_ids);\n //用Topic id隨機取一個並賦值\n $post->topic_id = $faker->randomElement($topic_id);\n });\n //將數據轉為陣列在插入資料庫\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "0ac3bd79ccafd183f64a83daa8e8b734", "score": "0.77742934", "text": "public function run()\n {\n //\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'level' => 'admin',\n 'password' => Hash::make('12345678'),\n ]);\n\n factory(App\\User::class, 9)->create([\n 'password' => Hash::make('12345678')\n ]);\n\n factory(App\\Author::class, 10)->create();\n\n factory(App\\Book::class, 10)->create();\n\n $author = App\\Author::all();\n\n App\\Book::all()->each(function ($book) use ($author) { \n $book->author()->attach(\n $author->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n \n }", "title": "" }, { "docid": "10bba340ceff4aa7654e77f3264df8b2", "score": "0.7765202", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "e4a3f3c54eb1dbfbeaf14daf25634bfc", "score": "0.7762492", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "title": "" }, { "docid": "0350e1fc9ed9c9553317db568c12e5ba", "score": "0.77623445", "text": "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "title": "" }, { "docid": "80029eda94306be7dd06321a86e96e4f", "score": "0.77621746", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "title": "" }, { "docid": "2f5b59082890fe6ed7dc8f5c50b7611e", "score": "0.77610433", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // seed users\n factory(\\App\\User::class, 1)->create(['name' => 'test', 'email' => '[email protected]', 'password' => bcrypt('test')]);\n factory(\\App\\User::class, 50)->create();\n\n // seed channels\n factory(\\App\\Channel::class, 20)->create();\n\n // seed threads\n factory(\\App\\Thread::class, 10)->create();\n\n // seed replies\n factory(\\App\\Reply::class, 10)->create();\n\n\n }", "title": "" }, { "docid": "7124f0c07efbf29272763999a735a94f", "score": "0.77606887", "text": "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "title": "" }, { "docid": "5c8214e2d3c221fbe38a112c0256f06f", "score": "0.7759768", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'role' => 1,\n 'email' => '[email protected]',\n 'password' => '$2y$10$UT2JvBOse3.6uuElsmqDpOhvp8d5PkoRdmbIHDMwOJmr226GRrmKe',\n ]);\n\n DB::table('programs')->insert([\n ['name' => 'Ingeniería de sistemas'],\n ['name' => 'Ingeniería electrónica'],\n ['name' => 'Ingeniería industrial'],\n ['name' => 'Diseño gráfico'],\n ['name' => 'Psicología'],\n ['name' => 'Administración de empresas'],\n ['name' => 'Negocios internacionales'],\n ['name' => 'Criminalística'],\n ]);\n }", "title": "" }, { "docid": "6f031bf4bd571edf71627cb6a09568cd", "score": "0.77596676", "text": "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "title": "" }, { "docid": "2290f88bd069e9499c0321a79bda7083", "score": "0.7759102", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('filials')->insert([\n 'nome' => 'Filial 1',\n 'endereco' => 'Endereco, 1',\n 'bairro' => 'Bairro',\n 'cidade' => 'Cidade',\n 'uf' => 'ES',\n 'inscricao_estadual' => 'ISENTO',\n 'cnpj' => '00123456000178'\n ]);\n DB::table('users')->insert([\n 'name' => 'Vitor Braga',\n 'data_nascimento' => '1991-03-16',\n 'sexo' => 'M',\n 'cpf' => '12345678900',\n 'endereco' => 'Rua Luiz Murad, 2',\n 'bairro' => 'Vista da Serra',\n 'cidade' => 'Colatina',\n 'uf' => 'ES',\n 'cargo' => 'Desenvolvedor',\n 'salario' => '100.00',\n 'situacao' => '1',\n 'password' => bcrypt('123456'),\n 'id_filial' => '1'\n ]);\n }", "title": "" }, { "docid": "b8c622da980d0f20206cf3c497b69940", "score": "0.7754705", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n Role::truncate();\n User::truncate();\n DB::table('category_posts')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Post::flushEventListeners();\n Comment::flushEventListeners();\n Game::flushEventListeners();\n Newsletter::flushEventListeners();\n Client::flushEventListeners();\n // $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n // factory(User::class, 50)->create();\n $this->call(BannersTableSeeder::class);\n $this->call(BasicsTableseeder::class);\n $this->call(SocialsTableseeder::class);\n $this->call(ContactInformationsTableseeder::class);\n $this->call(ClientsTableseeder::class);\n $this->call(AboutsTableseeder::class);\n $this->call(ContactusSeeder::class);\n $this->call(NewslettersSeeder::class);\n $this->call(GamesSeederTable::class);\n $this->call(PagesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);\n $this->call(CategoryPostsTableSeeder::class);\n $this->call(GalleriesTableSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n \n }", "title": "" }, { "docid": "81e5569fa61ad16b28597151ca8922ab", "score": "0.7731372", "text": "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n $user = App\\User::pluck('id')->toArray();\n $data = [];\n\n for ($i = 1; $i <= 100; $i++) {\n $title = $faker->sentence(rand(4, 10)); // astuce pour le slug\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($user),\n ]);\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "c74d696e8998a24c61e719b8157653fa", "score": "0.772796", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "title": "" }, { "docid": "3d873be91ed6d1da3295d915f287cf94", "score": "0.77274096", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //Seeding the database\n \\DB::table('authors')->insert([\n [\n 'name' => 'Diane Brody',\n 'occupation' => 'Software Architect, Freelancer',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'name' => 'Andrew Quentin',\n 'occupation' => 'Cognitive Scientist',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publications')->insert([\n [\n 'title' => 'AI Consciousness Level',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Book',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'title' => 'Software Architecture for the experienced',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Report of a conference',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publication_authors')->insert([\n [\n 'publication_id' => 1,\n 'author_id' => 2\n ],\n [\n 'publication_id' => 2,\n 'author_id' => 1\n ]\n ]);\n }", "title": "" }, { "docid": "aee9f58c36821ccc960ba32ca0f7c676", "score": "0.77264154", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Kategorija::class, 10)->create();\n factory(App\\Proizvod::class, 50)->create();\n\n foreach(Proizvod::all() as $proizvod)\n {\n $proizvod->kategorije()->sync(kategorija::pluck('id')->random(rand(1,5)));\n $proizvod->save();\n }\n }", "title": "" }, { "docid": "2ecfbbe58300fc8debd0410b17f21e9d", "score": "0.771693", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('users')->insert([\n 'name' => 'Demo',\n 'phone' => '0737116001',\n 'email' => '[email protected]',\n 'password' => Hash::make('demo'),\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'slug' => 'admin',\n ]);\n\n\n DB::table('roles')->insert([\n 'name' => 'user',\n 'slug' => 'user',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'manager',\n 'slug' => 'manager',\n ]);\n\n DB::table('roles_users')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "01970702dcc3d254417ea716f48f61ba", "score": "0.77157193", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(ProductsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n // DB::table('orders')->insert([\n // 'name' => 'Tran Minh Luan',\n // 'address' => 'So 19, duong 13',\n // 'number' => '0163375305',\n // 'products' => 'lamp'\n // ]);\n //$this->call(OrdersTableSeeder::class);\n }", "title": "" }, { "docid": "603a2ad87e835d00866a742b9f5d2a52", "score": "0.77141565", "text": "public function run()\n {\n $users = User::factory()->count(10)->create();\n\n $categoriesNames = [\n 'Programación',\n 'Desarrollo Web',\n 'Desarrollo Movil',\n 'Inteligencia Artificial',\n ];\n $collection = collect($categoriesNames);\n $categories = $collection->map(function ($category, $key){\n return Category::factory()->create(['name' => $category]);\n });\n\n Post::factory()\n ->count(10)\n ->make()\n ->each(function($post) use ($users, $categories){\n $post->author_id = $users->random()->id;\n $post->category_id = $categories->random()->id;\n $post->save();\n });\n \n $user = User::factory()->create();\n $user->name = 'Jesús Ramírez';\n $user->email = '[email protected]';\n $user->password = Hash::make('jamon123');\n $user->save();\n }", "title": "" }, { "docid": "006d108790ce64b4ef4a883f12760a4c", "score": "0.77140933", "text": "public function run()\n {\n $this->call(GenreSeeder::class);\n \\App\\Models\\User::factory(20)->create();\n \\App\\Models\\User::factory()->create([\n 'username' => 'admin',\n 'name' => 'Admin User',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', //password\n 'is_admin' => true\n ]);\n \\App\\Models\\Movie::factory(100)->create();\n \\App\\Models\\Review::factory(1000)->create();\n \\App\\Models\\Celeb::factory(100)->create();\n \\App\\Models\\CelebMovie::factory(500)->create();\n \\App\\Models\\GenreMovie::factory(200)->create();\n \\App\\Models\\MovieUser::factory(100)->create();\n }", "title": "" }, { "docid": "b775152e814ada39237f6d02a27c5392", "score": "0.77140456", "text": "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "title": "" }, { "docid": "49da62fe0218d7ae61e34a8c8728ab7e", "score": "0.771243", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "67228a7edb1e67f6bdd0b8d19bb2b59a", "score": "0.7705309", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n for ($i = 0; $i <= 100; $i++) {\n DB::table('posts')->insert([\n 'published' => 1,\n 'title' => $faker->sentence(),\n 'body' => $faker->text(500),\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "deefe59dca3f24e874dfffb1bb15beeb", "score": "0.7704354", "text": "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "title": "" }, { "docid": "c3bf798056554c74cc9ea30b5654cf7d", "score": "0.7704061", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "title": "" }, { "docid": "cb57daba0c53f155a9c942af3dc024bd", "score": "0.7703433", "text": "public function run()\n {\n // 指令::php artisan db:seed --class=day20180611_campaign_event_table_seeder\n // 第一次執行,執行前全部資料庫清空\n $now_date = date('Y-m-d h:i:s');\n // 角色\n DB::table('campaign_event')->truncate();\n DB::table('campaign_event')->insert([\n // system\n ['id' => '1', 'keyword' => 'reg', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '2', 'keyword' => 'order', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '3', 'keyword' => 'complete', 'created_at' => $now_date, 'updated_at' => $now_date],\n ]);\n }", "title": "" }, { "docid": "cf7fcb1fe5570ba6a475aaf00815d6f6", "score": "0.7701871", "text": "public function run()\n {\n\n //SEEDING MASTER DATA\n $this->call([\n BadgeSeeder::class,\n AchievementSeeder::class\n ]);\n\n //SEEDING FAKER DATA\n Lesson::factory()\n ->count(20)\n ->create();\n\n Comment::factory()->count(2)->create();\n\n }", "title": "" }, { "docid": "36020ec2fbcaf681814118ed22133007", "score": "0.77008796", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "title": "" }, { "docid": "b44c7d8fac5a941c491e731eceea38f2", "score": "0.76985973", "text": "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "title": "" }, { "docid": "09fe947dea0cf1a8047d0c9bb4bf806d", "score": "0.76984954", "text": "public function run()\n {\n // gọi tới file UserTableSeeder nếu bạn muốn chạy users seed\n // $this->call(UsersTableSeeder::class);\n // gọi tới file PostsTableSeeder nếu bạn muốn chạy posts seed\n $this->call(PostsTableSeeder::class); \n // gọi tới file CategoriesTableSeeder nếu bạn muốn chạy categories seed\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostTagsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(ProjectTableSeeder::class);\n }", "title": "" }, { "docid": "ada5d5fc3637b7a815b289340c1ad5fe", "score": "0.76982635", "text": "public function run()\n {\n $users = $this->getSeedUsers();\n $size = count($users);\n for ($i = 0; $i < $size; $i++) {\n DB::table('users')->insert($users[$i]);\n }\n\n $court = $this->getSeedCourt();\n DB::table('courts')->insert($court);\n\n $reserves = $this->getSeedReserves();\n $size = count($reserves);\n for ($i = 1; $i <= $size; $i++) {\n DB::table('reserves')->insert($reserves[$i]);\n }\n\n }", "title": "" }, { "docid": "980af6960bda0fc5e03df83c2b9e41cc", "score": "0.7698196", "text": "public function run()\n {\n // $categories = factory(App\\Category::class, 10)->create();\n\n $categories = ['Appetizers', 'Beverages', 'Breakfast', 'Detox Water', 'Fresh Juice', 'Main Course', 'Pasta', 'Pizza', 'Salad', 'Sandwiches', 'Soups', 'Special Desserts', 'Hot Drinks', 'Mocktails', 'Shakes', 'Water and Softdrinks'];\n foreach( $categories as $category )\n { \n Category::create([\n 'name' => $category\n ]);\n }\n\n $categories = Category::all();\n\n foreach( $categories as $category )\n {\n factory(App\\Menu::class, 10)->create([\n 'category_id' => $category->id\n ]);\n }\n \t\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "eae1af9587a5c752d73027a3d713fa13", "score": "0.76964504", "text": "public function run()\n {\n User::firstOrCreate([\n 'email' => '[email protected]'\n ], [\n 'name' => 'admin',\n 'password' => Hash::make('admin'),\n ]);\n\n $users =\\App\\Models\\User::factory(1)->create();\n $schools =\\App\\Models\\School::factory(10)->create();\n $employee = \\App\\Models\\Employee::factory(100)->make(['school_id' => null])->each(function ($employee) use($schools){\n $employee->school_id = $schools->random()->id;\n $employee->save();\n\n });\n }", "title": "" }, { "docid": "45367153bbaff6732338651be0b5630f", "score": "0.7696405", "text": "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "title": "" }, { "docid": "1a75d4c49ea06f308772e6345b798116", "score": "0.7695935", "text": "public function run()\n {\n //metodo para eiminar una carpeta en storage antes de ejecutar loos seeders\n Storage::deleteDirectory('posts');\n //metodo para crear una carpeta en storage antes de ejecutar loos seeders\n Storage::makeDirectory('posts');\n\n //llamar al seeder de rolSeeder quiere decir el de roles\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Tag::factory(8)->create();\n $this->call(PostSeeder::class);\n \n }", "title": "" }, { "docid": "1c93783c2ea23b1bcf0fcecb87e597a1", "score": "0.7693655", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('planeta')->insert([\n\n 'name'=>'Jupiter',\n 'peso'=>'1321'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Saturno',\n 'peso'=>'6546'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Urano',\n 'peso'=>'564564'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'netuno',\n 'peso'=>'5213'\n \n ]);\n }", "title": "" }, { "docid": "cdec075ee5f589f68df7d8e373f800d0", "score": "0.76934415", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n for ($i=0; $i<100; $i++) {\n $faker = Faker\\Factory::create();\n \\App\\Models\\Agencies::create([\n 'name'=>$faker->name\n ]);\n }\n\n for ($i=0; $i<100000; $i++){\n $faker = Faker\\Factory::create();\n \\App\\Models\\User::create([\n 'first_name'=>$faker->firstName,\n 'last_name'=>$faker->lastName,\n 'email'=>$faker->email,\n 'agencies_id'=>$faker->numberBetween(1,10)\n ]);\n }\n\n }", "title": "" }, { "docid": "016c973d20f43327498477b8b0832042", "score": "0.7692694", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "title": "" }, { "docid": "9c0db96925dc1f490c921bb00a04e003", "score": "0.7691264", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "title": "" }, { "docid": "7cfbc2c0b0ca1e8d2a8048e9780086c8", "score": "0.7690576", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "1b46fa2a96790281813264fc3f8288b5", "score": "0.76882726", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "title": "" }, { "docid": "3cd1f7a4183660348d9343661c46ac18", "score": "0.7687553", "text": "public function run()\n {\n Eloquent::unguard();\n\n $path = 'resources/sql/seed.sql';\n DB::unprepared(file_get_contents($path));\n $manager = new User();\n $manager->username = 'root';\n $manager->email = '[email protected]';\n $manager->password_hash = bcrypt('rootroot');\n $manager->date = '1920-01-01';\n $manager->user_role = 'Manager';\n $manager->id_image = 81;\n $manager->save();\n $user = new User();\n $user->username = 'johndoe';\n $user->email = '[email protected]';\n $user->address = 'John Doe Village';\n $user->password_hash = bcrypt('johndoe');\n $user->date = '1920-01-01';\n $user->user_role = 'Customer';\n $user->id_image = 81;\n $user->security_question = 'Socks';\n $user->save();\n $wishlist = new Wishlist();\n $wishlist->name = 'Favorites';\n $wishlist->id_user = $user->id;\n $wishlist->save();\n\n $this->command->info('Database seeded!');\n }", "title": "" }, { "docid": "98c57ab9dc9353ad077141992a0dd327", "score": "0.7687021", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n $this->call(GenreSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n Schema::enableForeignKeyConstraints();\n \n // create an admin user with email [email protected] and password secret\n User::truncate();\n User::create(array('name' => 'Administrator',\n 'email' => '[email protected]', \n 'password' => bcrypt('secret'),\n 'role' => 1)); \n }", "title": "" }, { "docid": "bba2ff1a30d0719e1aa8364f25fac587", "score": "0.7686844", "text": "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "title": "" }, { "docid": "39bb4261d54256e6189d729e7893cf92", "score": "0.7685065", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "title": "" }, { "docid": "6f4cd475360e7bf0d5a1fe2752972955", "score": "0.76846963", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(KategoriSeeder::class);\n $this->call(UsersTableSeeder::class);\n $roles = \\App\\Models\\Role::all();\n \\App\\Models\\User::All()->each(function ($user) use ($roles){\n // $user->roles()->saveMany($roles);\n $user->roles()->attach(\\App\\Models\\Role::where('name', 'admin')->first());\n });\n // \\App\\Models\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 2))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "05fe3186975dd67e97302afe2c8d7e44", "score": "0.7683827", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "title": "" }, { "docid": "54370a0836434e352058b6fa0c527ca2", "score": "0.7678287", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "title": "" }, { "docid": "202189ac5e6ae1c3d158da4dfad00e74", "score": "0.767549", "text": "public function run()\n {\n\t\t\tProject::truncate();\n\t\t\t\n\t\t\tfactory(Project::class, 20) -> create();\n\t\t\t/*$faker = Faker::create('en_US');\n\n\t\t\tfor($i = 0; $i < 10; $i++){\n\t\t\t\tProject::create([\n\t\t\t\t\t'title' => $faker -> name\n\t\t\t\t\t$table->string('title');\n\t\t\t\t\t$table->string('comment');\n\t\t\t\t\t$table->integer('min_price');\n\t\t\t\t\t$table->integer('max_price');\n\t\t\t\t\t$table->integer('category_id');\n\t\t\t\t\t$table->integer('user_id');\n\t\t\t\t\t$table->boolean('delete_flg');\n\t\t\t\t])\n\t\t\t}*/\n }", "title": "" }, { "docid": "4c4d418f65a57b515570be7482a92877", "score": "0.76726556", "text": "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "title": "" }, { "docid": "619d6d0bb4a4cea6758274cbd4639711", "score": "0.76711684", "text": "public function run()\n {\n // Use the factory to create a Faker\\Generator instance.\n $faker = \\Faker\\Factory::create('en_NG');\n\n /**\n * Loop through and insert the dummy data into the users table\n */\n for ($i = 0; $i < 10; $i++) {\n Interest::create([\n 'interest_description' => $faker->word(7),\n 'interest_name' => $faker->sentence(5)\n ]);\n }\n }", "title": "" }, { "docid": "2e8c9674b5b47271246bd3c5d33867fc", "score": "0.7670721", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n\n $faker = Factory::create();\n $users = array_merge(\n factory(User::class, 9)->create()->toArray(),\n factory(User::class, 1)->create(['role_id' => Role::where('name', 'admin')->first()->id])->toArray()\n );\n $categories = factory(Category::class, 6)->create()->toArray();\n\n foreach ($users as $user) {\n /** @var Post $posts */\n $posts = factory(Post::class, rand(1, 5))->create(['user_id' => $user['id']]);\n\n foreach ($posts as $post) {\n $post->categories()->attach([\n $faker->randomElements($categories)[0]['id'],\n $faker->randomElements($categories)[0]['id'],\n ]);\n\n factory(Comment::class, rand(1, 5))->create([\n 'post_id' => $post['id'],\n 'user_id' => $user['id'],\n ]);\n }\n }\n }", "title": "" }, { "docid": "9f18c5c0d91d41c0a8c01c0872701c3c", "score": "0.76674765", "text": "public function run()\n {\n //Trucates exising records to start from scratch\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n User::create([\n 'username'=> \"[email protected]\",\n 'email' => \"[email protected]\",\n 'password'=>bcrypt(\"[email protected]\")\n ]);\n\n DB::table(\"activations\")->insert([\n 'user_id'=>1,\n 'code'=>'4rxpG9JWnDDTv3SNUHjsC3RsUwhlZgez',\n 'completed'=> 1,\n 'completed_at'=>Carbon::now(),\n 'created_at'=> Carbon::now(),\n 'updated_at'=> Carbon::now()\n ]);\n\n\n }", "title": "" }, { "docid": "b8a2d239e166712dd77165697867a5de", "score": "0.76674277", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n// Task::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 20; $i++) {\n Task::create([\n 'name' => $faker->name,\n 'status' => $faker->randomElement($array = array ('to-do','doing','done')),\n 'description' => $faker->paragraph,\n 'start' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'end' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'assignee' => $faker->randomElement(User::pluck('id')->toArray()),\n 'assigner' => $faker->randomElement(User::pluck('id')->toArray()),\n ]);\n }\n }", "title": "" }, { "docid": "861976ea353841a1120d5e19df4f5651", "score": "0.7667395", "text": "public function run()\n {\n // $this->call(GroupsTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n // $this->call(AdminsTableSeeder::class);\n // $this->call(SellersTableSeeder::class);\n\n $this->call(AboutsTableSeeder::class);\n // $this->call(AdvertisesTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n $this->call(HowToshopsTableSeeder::class);\n $this->call(HowTosellsTableSeeder::class);\n $this->call(OfficialPartnersTableSeeder::class);\n $this->call(OurActivitiesTableSeeder::class);\n $this->call(PaymentsTableSeeder::class);\n $this->call(RefundsTableSeeder::class);\n $this->call(SellerStoriesTableSeeder::class);\n $this->call(WithdrawalsTableSeeder::class);\n\n // factory(App\\User::class,5)->create();\n // factory(App\\Model\\Product::class,50)->create();\n // factory(App\\Model\\Review::class,300)->create();\n }", "title": "" }, { "docid": "06f416db2b8ef80c81b9ff3ec0e65217", "score": "0.7661292", "text": "public function run()\n {\n $this->call([\n ContentSeeder::class,\n MetadataSeeder::class,\n// CategorySeeder::class,\n SliderSeeder::class,\n UserSeeder::class,\n ]);\n// factory('App\\Termination',10)->create();\n// factory('App\\Subcategory',10)->create();\n// factory('App\\Closure',10)->create();\n// factory('App\\Capacity',10)->create();\n $this->call(ContentsTableSeeder::class);\n $this->call(SlidersTableSeeder::class);\n }", "title": "" }, { "docid": "30dac972abaa34409e5f3917314fcb65", "score": "0.7659881", "text": "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "title": "" }, { "docid": "e508532bee1083b015a68a8047e78ca6", "score": "0.76597446", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Dominic',\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Kira',\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Less',\n ]);\n }", "title": "" }, { "docid": "c5a6368cf4078a0a4d8b652f1ce43194", "score": "0.7657722", "text": "public function run()\n {\n // Create roles\n $this->call(RoleTableSeeder::class);\n // Create example users\n $this->call(UserTableSeeder::class);\n // Create example city\n $this->call(CitiesTableSeeder::class);\n // Create example restaurant type\n $this->call(RestaurantsTypesSeeder::class);\n // Create example restaurant\n $this->call(RestaurantsSeeder::class);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "dd673eaa16d90ac2f372085b1c5c9e88", "score": "0.0", "text": "public function run()\n {\n User::create([\n 'nom'=>'SEIDOU Fadel',\n 'email'=>'[email protected]',\n 'email_verified_at' => Carbon\\Carbon::now(),\n 'password'=>bcrypt('fadel123')\n ]);\n\n User::create([\n 'nom'=>'MENOU Gael',\n 'email'=>'[email protected]',\n 'email_verified_at' => Carbon\\Carbon::now(),\n 'password'=>bcrypt('gael123')\n ]);\n }", "title": "" } ]
[ { "docid": "520d3a91ddad10619dacf1b7197c5aec", "score": "0.7992309", "text": "public function run()\n {\n DB::table('users')->insert([\n 'id' => 1,\n 'name' => 'Usuário',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n DB::table('empresas')->insert([\n 'nome' => 'Empreendimentos S.A.',\n 'telefone' => '11900001111',\n 'endereco' => 'Rua Qualquer',\n 'cep' => '00000-000',\n 'cnpj' => '00.000.000/0000-00',\n 'user_id' => 1\n ]);\n\n $faker = Faker::create();\n foreach (range(1,5) as $i){\n DB::table('fornecedores')->insert([\n 'nome' => $faker->name,\n 'email' => $faker->email,\n 'mensalidade' => mt_rand( 0, $faker->numberBetween(100, 1000) ) / 10,\n 'user_id' => 1\n ]);\n }\n }", "title": "" }, { "docid": "9d32f8ff8b6ed1c924761b8262ce875e", "score": "0.7979011", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n\t factory(App\\Models\\Person::class , 10)->create(); \n\t factory(App\\Models\\Company::class , 10)->create(); \n\t factory(App\\Models\\Account::class , 10)->create(); \n factory(App\\Models\\Tag::class , 10)->create();\n factory(App\\Models\\Customer::class , 10)->create();\n factory(App\\Models\\Project::class , 10)->create();\n factory(App\\Models\\Domain::class , 3)->create();\n\n foreach (['Watermark', 'Filter', 'Optimize'] as $index) {\n DB::table('processes')->insert([\n 'name' => $index, \n 'class' => $index,\n ]);\n }\n\n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 1,\n ]);\n \n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 2,\n ]);\n\n DB::table('process_tag')->insert([\n 'process_id' => 2, \n 'tag_id' => 3,\n ]);\n\n }", "title": "" }, { "docid": "e3f2301106fd912254f1c33890600754", "score": "0.7965865", "text": "public function run()\n {\n //Create faker instance\n $faker = \\Faker\\Factory::create();\n //Flush the table before recreate\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::table('chapters')->truncate();\n \\App\\Chapter::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n foreach (range(1,5) as $number) {\n \\App\\Chapter::create([\n 'chapter' => $faker->word,\n 'subject_id'=> rand(1,3),\n ]);\n }\n }", "title": "" }, { "docid": "9e7127cb6c71143fb79c04b4fee8ad17", "score": "0.7947972", "text": "public function run()\n {\n /**\n * Seed Users Table\n */\n DB::table('users')->insert([\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role_id' => Config::get('constants.roles.administrator'),\n 'created_at' => Carbon::now()\n ],\n [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => Hash::make('johndoe'),\n 'role_id' => Config::get('constants.roles.user'),\n 'created_at' => Carbon::now()\n ],\n ]);\n\n /**\n * Seed Roles Table\n */\n DB::table('roles')->insert([\n [\n 'display_name' => 'Administrator',\n 'description' => 'System Admin',\n 'created_at' => Carbon::now()\n ],\n [\n 'display_name' => 'User',\n 'description' => 'Can access expenses',\n 'created_at' => Carbon::now()\n ],\n ]);\n }", "title": "" }, { "docid": "37ee2d6976618f232b9fc479d5b57a06", "score": "0.79219735", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n \n Post::insert([\n [\n 'id' => 1,\n 'title' => 'post 1',\n 'content' => 'post content 1'\n ], \n [\n 'id' => 2,\n 'title' => 'post 2',\n 'content' => 'post content 2'\n ],\n [\n 'id' => 3,\n 'title' => 'post 3',\n 'content' => 'post content 3'\n ],\n [\n 'id' => 4,\n 'title' => 'post 4',\n 'content' => 'post content 4'\n ],\n [\n 'id' => 5,\n 'title' => 'post 5',\n 'content' => 'post content 5'\n ],\n [\n 'id' => 6,\n 'title' => 'post 6',\n 'content' => 'post content 6'\n ],\n [\n 'id' => 7,\n 'title' => 'post 7',\n 'content' => 'post content 7'\n ]\n ]);\n \n }", "title": "" }, { "docid": "341ec9573f9443b609a2c9e8c0a90413", "score": "0.79130584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \tfactory(App\\User::class)->create();\n factory(App\\Client::class, 40)->create();\n factory(App\\Driver::class, 20)->create();\n factory(App\\Guide::class, 20)->create();\n factory(App\\Vehicle::class, 30)->create();\n factory(App\\Order::class, 80)->create();\n factory(App\\Invoice::class, 160)->create();\n factory(App\\DriverSchedule::class, 50)->create();\n factory(App\\GuideSchedule::class, 50)->create();\n factory(App\\VehicleSchedule::class, 50)->create();\n\n\n // Seed driver_order table\n\n $orders = App\\Order::all();\n $drivers = App\\Driver::all();\n $guides = App\\Guide::all();\n $vehicles = App\\Vehicle::all();\n\n $this->seedManyToMany($drivers, $orders);\n $this->seedManyToMany($guides, $orders);\n $this->seedManyToMany($vehicles, $orders);\n }", "title": "" }, { "docid": "c455dbfa0c734909206ed15084e64a1d", "score": "0.79043716", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n\n DB::table('categories')->delete();\n //insert some dummy records\n DB::table('categories')->insert(array(\n array('name'=>'groenten','pic'=>'groenten.png'),\n array('name'=>'vlees','pic'=>'vlees.png'),\n array('name'=>'fruit','pic'=>'fruit.png'),\n array('name'=>'snacks','pic'=>'snacks.png'),\n array('name'=>'drinken','pic'=>'drinken.png')\n\n ));\n }", "title": "" }, { "docid": "ec53d7f325471d31c8d4b9ef320da423", "score": "0.7899056", "text": "public function run()\n {\n $this->call(LanguageTableSeeder::class);\n $this->call(SkillsTableSeeder::class);\n\n// factory(\\App\\Skill::class, 1000)->create();\n\n factory(\\App\\User::class, 20)->create()->each(function($user) {\n $user->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 25)));\n $user->languages()->saveMany(\\App\\Language::all()->random(rand(1, 10)));\n $user->save();\n });\n\n factory(\\App\\Question::class, 50)->create()->each(function($question) {\n $question->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 5)));\n $question->save();\n });\n\n factory(\\App\\Answer::class, 50)->create();\n factory(\\App\\Vote::class, 80)->create();\n }", "title": "" }, { "docid": "b29caf34b66d3312d3383baca3e725cf", "score": "0.7895579", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Set::class, 3)->create()->each(function ($set) {\n $setProducts = factory(\\App\\Product::class, 30)->make();\n\n $set->products()->saveMany($setProducts);\n });\n factory(\\App\\Category::class, 3)->create();\n\n }", "title": "" }, { "docid": "88258f9f401554ae03712d5c26de4e86", "score": "0.7895573", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index) {\n Product::create([\n 'title' => $faker->name ,\n 'description' => $faker->text ,\n 'price' => $faker->numberBetween(10, 100),\n ]);\n }\n }", "title": "" }, { "docid": "c5ca42e038468200777d2f68273e9f74", "score": "0.78889793", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"Jovan\",\n 'password' => Hash::make(\"12121212\"),\n 'email' => \"[email protected]\"\n ]);\n\n DB::table('users')->insert([\n 'name' => \"Pera\",\n 'password' => Hash::make(\"123123123\"),\n 'email' => \"[email protected]\"\n ]);\n\n $faker = Faker::create();\n for ($i = 0; $i < 10; $i++) {\n DB::table('posts')->insert([\n 'title' => $faker->text(40),\n 'content' => $faker->sentence(10),\n 'user_id' => $faker->numberBetween(1, 2)\n ]);\n }\n }", "title": "" }, { "docid": "3b2875053d0fe7dd172affc98ba741cd", "score": "0.7887539", "text": "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n\n\n DB::table('users')->insert([\n 'name' => 'Juste',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n foreach (range(0, 10) as $_ ) {\n \n DB::table('posts')->insert([\n 'town' => $faker->city(),\n 'capacity' => 20,\n 'code' =>'P-'.rand(1,99),\n ]);\n }\n\n foreach (range(1, 50) as $_ ) {\n DB::table('parcels')->insert([\n 'weight' => mt_rand(111, 15999)/100,\n 'phone' => '+37069'.rand(100000, 999999),\n 'info' => $faker->text(400),\n 'post_id' => rand(1, 11)\n ]);\n }\n\n\n }", "title": "" }, { "docid": "b07e3ee3c4b1736184933db829b4a9bc", "score": "0.7875372", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n App\\Role::create([\n 'name' => 'Administrador',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Edil',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Ciudadano',\n 'description' => 'no se'\n ]);\n\n\n App\\Locality::create([\n 'name' => 'Puente Aranda',\n 'city_id' => 495,\n ]);\n\n\n App\\Entity::create([\n 'name' => 'Administracion del sistema',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\Entity::create([\n 'name' => 'Entidad 1',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\User::create([\n 'name' => 'Oscar',\n 'email' => '[email protected]',\n 'password' => bcrypt('oscar123'),\n 'last_name' => 'Amado',\n 'entity_id' => 1,\n 'rol_id' => 1,\n 'document' => '1022445546',\n ]);\n\n }", "title": "" }, { "docid": "385bfd731a375a2d4ef0c36d568c50e1", "score": "0.7869675", "text": "public function run()\n {\n //Clears database\n DB::table('users')->delete();\n DB::table('settings')->delete();\n\n //Seeds database\n factory(User::class,\"admin\", 1)->create();\n factory(User::class, 10)->create();\n factory(Setting::class, 1)->create();\n }", "title": "" }, { "docid": "6e77cc4bd37ebe82a97b96bf3dec7bab", "score": "0.78611064", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('item')->insert([\n 'title' => $faker->name,\n 'description' => $faker->realText($maxNbChars = 200, $indexSize = 2),\n 'id_model' =>$faker->numberBetween(1,69),\n 'id_province' =>$faker->numberBetween(1,96),\n 'id_brand' =>$faker->numberBetween(1,79),\n 'id_user' =>$faker->numberBetween(1,7),\n\t 'created_at' => $faker->dateTimeBetween($startDate = '-1 months', $endDate = 'now'),\n 'status' => $faker->randomElement(array('New', 'Active', 'Inactive')),\n\t ]);\n }\n }", "title": "" }, { "docid": "10380f0624cacc8ec438ce737cd5a23c", "score": "0.78547347", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \\App\\Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n \\App\\Review::create([\n 'user_id' => $faker->randomElement(\\App\\User::all()->pluck('id')->toArray()),\n 'restaurant_id' => $faker->randomElement(\\App\\Restaurant::all()->pluck('google_places_id')->toArray()),\n 'review_text' => $faker->paragraph,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "7b08efa0e8b289b221b37a9f42fcbab6", "score": "0.7841034", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(VideosTableSeeder::class);\n\n factory(App\\Models\\User::class, 5)->create()->each(function ($i) {\n $i->interests()\n ->saveMany(\n factory(App\\Models\\Interest::class, rand(1, 5))->make()\n );\n });\n }", "title": "" }, { "docid": "4d8a3e194e5213b07ba6e1f01065371a", "score": "0.7839545", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::create(array('first_name' => 'George','last_name' => 'Petrou', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1234')));\n User::create(array('first_name' => 'Nick','last_name' => 'Jones', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1235')));\n User::create(array('first_name' => 'Ryan','last_name' => 'Giggs', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1236')));\n Roles::create(array('role' => 'admin','user_id' => 1));\n Roles::create(array('role' => 'user','user_id' => 2));\n Roles::create(array('role' => 'user','user_id' => 3));\n }", "title": "" }, { "docid": "bc912a8c1dddc8fa40444c9031b40718", "score": "0.7833102", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'admin',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahed',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'hasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahedhasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jh',\n 'email' => '[email protected]'\n ],\n \n [\n 'name' => 'jahedd',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jb',\n 'email' => '[email protected]'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "32f8a9675ac74c00bb4974c472281dba", "score": "0.78212416", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Customer::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n Customer::create([\n 'full_name' =>$faker->name,\n 'cin' =>$faker->word,\n 'phone' => $faker->e164PhoneNumber ,\n 'email' =>$faker->Email, \n // 'user_id' =>$i+1, \n 'workspace_id' =>1, \n ]);\n }\n }", "title": "" }, { "docid": "7390b50b8fae46f7555e0eaf084fd3ef", "score": "0.7808098", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => str_random(10),\n // 'email' => str_random(10).'@gmail.com',\n // 'password' => bcrypt('secret'),\n // ]);\n for($count=1;$count<=3; $count++ ){\n\t DB::table('users')->insert([\n\t 'name' => 'admin'.$count,\n\t 'email' => 'admin'.$count.'@gmail.com',\n\t 'password' => bcrypt('admin'),\n\t 'admin'\t=>1,\n\t ]);\n }\n // DB::table('projects')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'open',\n // 'category' => 'Web',\n // ]); \n // DB::table('tasks')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'in progress',\n // 'category' => 'Front-End',\n // 'project_id'=>1\n // ]);\n // DB::table('task_user')->insert([\n // \t'task_id' => 1,\n // \t'user_id'\t=> 1,\n\n // \t]);\n }", "title": "" }, { "docid": "4d4c9c609f68448903976a4c7b76bb72", "score": "0.7806439", "text": "public function run() {\n $this->call(CountriesSeeder::class);\n $this->call(CastsTableSeeder::class);\n $this->call(MoviesSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 'ADMIN'\n ]);\n DB::table('ratings')->insert(\n [\n 'user_id' => 1,\n 'movie_id' => 1,\n 'rating_value' => 5\n ]\n );\n }", "title": "" }, { "docid": "39cab0ab1b75aec77c6b02db375756d1", "score": "0.78046244", "text": "public function run()\n {\n /*$this->call([\n //LanguageTableSeeder::class,\n UsersTableSeeder::class\n ]);*/\n\n //create dummy data for cashflow\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n\n DB::table('cashflow')->insert([\n 'name' => $faker->sentence(6, true),\n 'description' => $faker->text,\n 'flow_type' => $faker->randomElement(array ('1','2')),\n 'amount' => $faker->numberBetween(1000, 9000),\n 'created_at' => $faker->dateTimeThisYear('now', 'UTC') \n ]);\n }\n }", "title": "" }, { "docid": "249635981f4ce9205eb86a95422d00e1", "score": "0.780388", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionSeeder::class);\n factory(Tag::class, 20)->create();\n Permission::where('slug', 'manage-users')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n ]);\n Permission::where('slug', 'manage-articles')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n Role::where('slug', 'editor')->first()->id,\n ]);\n $this->call(UserSeeder::class);\n factory(User::class, 2)->create()->each(function($user) {\n $user->articles()->saveMany(factory(Article::class, (int) rand(10, 20))->make());\n $user->news()->saveMany(factory(News::class, (int) rand(10, 20))->make());\n });\n $this->call(EntryTagTableSeeder::class);\n $this->call(CommentTableSeeder::class);\n }", "title": "" }, { "docid": "11218f98139c57a6846510c7c4c15a64", "score": "0.7792779", "text": "public function run()\n {\n $faker = FakerFactory::create();\n\n # php artisan migrate:refresh --seed\n $bob = new App\\User();\n $bob->name = \"Bob\";\n $bob->email = \"[email protected]\";\n $bob->password = bcrypt(\"123456\");\n $bob->save();\n\n $alice = new App\\User();\n $alice->name = \"Alice\";\n $alice->email = \"[email protected]\";\n $alice->password = bcrypt(\"123456\");\n $alice->save();\n\n for($i=0; $i<20; $i++) {\n $comment = new App\\Comment();\n $comment->comment = $faker->paragraph;\n $comment->post_id = rand(1, 10);\n $comment->user_id = rand(1, 2);\n $comment->save();\n }\n\n for($i=0; $i<10; $i++) {\n $post = new App\\Post();\n $post->title = $faker->sentence;\n $post->body = $faker->paragraph;\n $post->category_id = rand(1, 5);\n $post->save();\n }\n\n for($i=0; $i<5; $i++) {\n $category = new App\\Category();\n $category->name = ucwords( $faker->word );\n $category->save();\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "0abeef674742d2ee575c2285b0a63e54", "score": "0.7787808", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //seta = 0\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n //Cidades \n DB::table('cidades')->truncate();\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"1\",\n 'cidade_nome' => \"Cuiabá\",\n ]);\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"2\",\n 'cidade_nome' => \"Várzea Grande\",\n ]);\n\n\n //Planos \n DB::table('planos')->truncate();\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"1\",\n 'plano_nome' => \"Silver\",\n 'plano_vantagens' => \"Para controle financeiro de quem trabalha sozinho\",\n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Gold\",\n 'plano_vantagens' => \"Melhor opção para quem quer crescer e receber mais rápido.\", \n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Platium\",\n 'plano_vantagens' => \"Mais notas e boletos para sua empresa.\",\n ]);\n\n\n }", "title": "" }, { "docid": "e1d4f0e4e0b4cd624b555f00f69d8386", "score": "0.77772784", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //----DATOS REALES DE PRUEBA---------\n $this->call(CitySeeder::class);\n $this->call(SucursaleSeeder::class);\n $this->call(StateSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(RoleSeeder::class);\n\n //-----DATOS FALSOS DE PRUEBA--------\n //User::factory(10)->create();\n Product::factory(5)->create();\n Group::factory(5)->create();\n Modifier::factory(20)->create();\n //Sale::factory(20)->create();\n }", "title": "" }, { "docid": "5636dd7cb3d474c1bf2462b273b361ff", "score": "0.7776227", "text": "public function run()\n {\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('categories')->truncate();\n\n\n //seeding the data\n\n User::factory()->count(1)->create();\n\n Category::factory()->count(10)->create()->each(function($category){\n $category->products()->saveMany(Product::factory(Product::class)->count(5)->create());\n });\n\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "a8dfa675e6ffec96b1dd6192fd68b3a2", "score": "0.7773381", "text": "public function run()\n {\n \t// Crear Seeder\n \t// php artisan make:seeder MiniSkillsTableSeeder\n\n \t// Ejecutar\n \t//php artisan db:seed --class=MiniSkillsTableSeeder\n \t//\n \t/*\n \tDB::table('mini_skills')->insert([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1,\n\t 'created_at' => now(),\n\t 'updated_at' => now()\n ]);\n */\n \n \n\n \tMiniSkill::create([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1\n ]);\n }", "title": "" }, { "docid": "e09eb1651561e63be4b2b1e9c41c333c", "score": "0.7773278", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\Admin', 1)->create();\n factory('App\\Membre', 10)->create();\n factory('App\\Psychologue', 10)->create();\n factory('App\\Blog', 10)->create();\n factory('App\\Statut', 10)->create();\n factory('App\\Discussion', 10)->create();\n }", "title": "" }, { "docid": "fc4ebf94d0a8bf8e90abe65163ca460c", "score": "0.7771095", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n // factory(App\\User::class, 5)->create()->each(function ($u) {\n // \t$u->laporan()->saveMany(factory(App\\Laporan::class, 5)->make());\n // });\n // factory(App\\Dospem::class, 2)->create();\n // factory(App\\Pemlap::class, 2)->create();\n // factory(App\\Instansi::class, 2)->create();\n }", "title": "" }, { "docid": "afcd93274839927545e6c2a6489c97b4", "score": "0.7770071", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker=Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('posts')->insert([\n 'title'=>$faker->text(30),\n 'body'=>$faker->text(300)\n ]);\n }\n }", "title": "" }, { "docid": "b9f891c56a6dcdf4ec65f847082d6389", "score": "0.7767168", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 5) as $index) {\n DB::table('articles')->insert(\n [\n 'name' => $faker->unique()->word,\n 'user_id' => 1,\n 'title' => $faker->words(3, true),\n 'text' => $faker->text(1000),\n 'rank' => $faker->randomNumber(),\n 'enabled' => $faker->boolean(true),\n 'created_at' => $faker->date(),\n 'updated_at' => $faker->date(),\n ]\n );\n }\n }", "title": "" }, { "docid": "f908dcf673136d275768a26e1ed8f43d", "score": "0.77664644", "text": "public function run()\n {\n /*\n // Seed with a database querry.\n DB::table('users')->insert([\n 'name' => Person::firstNameMale(),\n 'email' => str_random(10) . '@' . str_random(5) . '.com',\n 'password' => bcrypt('secret'),\n 'date_birth' => DateTime::unixTime(),\n 'telephone' => PhoneNumber::phoneNumber(),\n 'address' => Address::streetSuffix() . $this->delimiter . Address::buildingNumber() . $this->address_delimiter .\n Address::postcode() . $this->delimiter . Address::citySuffix() . $this->address_delimiter .\n Address::country(),\n 'nationality' => Miscellaneous::countryCode(),\n 'work_permit' => str_random(1),\n 'driver_permit' => 'yes',\n ]);\n */\n\n //Seeding with a factory.\n // No relationships are made.\n factory(App\\User::class,5)->create();\n /*\n // Seed and attach relationships to each user;\n factory(App\\User::class,5)->create()->each(function($u){\n $u->templates()->save(factory(App\\Template::class)->make());\n // Cannot continue as the foreign key integrities are not respected afterwards.\n $u->cvs()->save(factory(App\\Cv::class)->make());\n $u->sections()->save(factory(App\\Section::class)->make());\n $u->skills()->save(factory(App\\Skill::class)->make());\n $u->hobbies()->save(factory(App\\Hobby::class)->make());\n $u->jobs()->save(factory(App\\Work::class)->make());\n $u->languages()->save(factory(App\\Language::class)->make());\n $u->educations()->save(factory(App\\Education::class)->make());\n });\n */\n }", "title": "" }, { "docid": "40ca19c7f708ecdfdcd4af8c02d83f2f", "score": "0.7763925", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(AdminTableSeeder::class);\n // factory(App\\Admin::class, 50)->create();]\n factory(App\\Model\\Artist::class, 15)->create();\n factory(App\\Model\\Category::class, 20)->create();\n factory(App\\Model\\Album::class, 20)->create();\n factory(App\\Model\\Song::class, 50)->create();\n }", "title": "" }, { "docid": "78fa4e7ae6998de91422744dcdef4f25", "score": "0.7762454", "text": "public function run()\n { \n \n /* factory(App\\Resource::class, 10000)->create();\n factory(App\\Work::class, 50)->create();\n factory(App\\Cost::class, 500)->create();\n factory(App\\Refwork::class, 50)->create();\n factory(App\\Refresource::class, 200)->create(); */\n\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n \n }", "title": "" }, { "docid": "480eecd886ef3ee8fb2edf36add7a6e6", "score": "0.7761692", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(RoleUserTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n// factory('App\\User', 15)->create();\n factory('App\\Article', 6)->create();\n $this->call(ArticlesTableSeeder::class);\n $this->call(ArticleCategoryTableSeeder::class);\n\n }", "title": "" }, { "docid": "43e31086667a15be4100b3788e32525a", "score": "0.77574366", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n DB::table('users')->insert([\n [\"role_id\" => 1, \"name\" => 'Admin 1', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 1, \"name\" => 'Admin 2', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 2, \"name\" => 'John Doe', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"john12345\")],\n [\"role_id\" => 2, \"name\" => 'Ji Eun', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"jieun12345\")],\n ]);\n }", "title": "" }, { "docid": "c5a55e8cf6dced6dcea94dbb4eb4d4fe", "score": "0.7746799", "text": "public function run()\n {\n $this->seed('EntryTypesTableSeeder');\n\t\t$this->seed('TaxonomyTableSeeder');\n\t\t$this->seed('RolesTableSeeder');\n\t\t$this->seed('SettingsTableSeeder');\n\t\t$this->seed('PagesTableSeeder');\n\t\t$this->seed('MenuTableSeeder');\n }", "title": "" }, { "docid": "84eb153850f1545b5a2f9529a74ca3bb", "score": "0.77438354", "text": "public function run()\n {\n Author::factory(10)->create();\n Book::factory(10)->create();\n Relation::factory(10)->create();\n $this->call([\n UserSeeder::class,\n RelationSeeder::class\n ]);\n }", "title": "" }, { "docid": "1159542e19a2f9f8712ba8239cdba0c8", "score": "0.7737536", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $categories = [\n 'Acheter et vendre','Autos et véhicules','Immobilier','Services','Animaux','Locations de vacances','Communauté'\n ];\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 7; $i++) {\n Category::create([\n 'name' => $categories[$i]\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n }", "title": "" }, { "docid": "d2d80f7d460efe018a3f140847e1a279", "score": "0.7736746", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Dejar nulo las claves foraneas\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n //Me ayudara para que los eventos al comienzo no se activen\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $catidadUsuarios = 200;\n $cantidadCategorias = 30;\n $cantidadProductos = 500;\n $cantidadTransacciones = 1000;\n\n factory(User::class,$catidadUsuarios)->create();\n factory(Category::class,$cantidadCategorias)->create();\n\n factory(Product::class,$cantidadProductos)->create()->each(\n function($producto){\n //random (colleccion)\n $categorias=Category::all()->random(mt_rand(1,5))->pluck('id');\n $producto->categories()->attach($categorias);\n }\n );\n\n factory(Transaction::class, $cantidadTransacciones)->create();\n }", "title": "" }, { "docid": "b71b6c9d43290ee575ba0a2222937224", "score": "0.77361274", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users=App\\User::pluck('id')->toArray();//permet de retourner les id de la table et les stock dans une table\n \n for ($i = 1; $i <= 100 ; $i++) {\n array_push($data, [\n 'name'=>$faker->sentence,\n 'body'=>$faker->realText(2000) ,\n 'user_id'=>$faker->randomElement($users),\n 'published_at'=>$faker->datetime(),\n\n ]);\n }\n Article::insert($data);\n }", "title": "" }, { "docid": "9d2e1f29bfaf34564e90f02a58e8ad3b", "score": "0.7735335", "text": "public function run()\n {\n \t\n \tDB::table('profissao')->insert([\n 'descricao' => 'Professor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Aluno'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Engenheiro'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Agricultor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Outro'\n ]);\n\n\n DB::table('perfil')->insert([\n 'descricao' => 'Administrador'\n ]);\n\n DB::table('perfil')->insert([\n 'descricao' => 'Registrador'\n ]);\n \n $this->call(ModelosTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(PluviometrosSeeder::class); \n }", "title": "" }, { "docid": "de46177ac0fa0a295c6ae2ab0fba4901", "score": "0.77335644", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(Course::class, 10)->create()->each(function($course){\n $course->episodes()->saveMany(factory(Episode::class,10)->make());\n });\n }", "title": "" }, { "docid": "5c50c6331a8da5e7c37b7e78f795a900", "score": "0.77317315", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '123123'\n ]);\n\n Security::create(['code' => 'helloworld']);\n Security::create(['code' => 'welcomehere']);\n }", "title": "" }, { "docid": "5594e3238793cf289d046986c5f56d58", "score": "0.7730125", "text": "public function run() {\n // \\App\\Models\\User::factory(10)->create();\n// $this->call(ArticlesTableSeeder::class);\n// $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and\n // let's hash it before the loop, or else our seeder\n // will be too slow.\n $password = Hash::make('netireki');\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 10; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "bad0c06d6cc426f60d248d0caa0771bb", "score": "0.7729789", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(AssessmentSeeder::class);\n DB::table('users')->insert([\n\n [\n 'name' => 'Admin 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 2',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 3',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ]\n\n ]);\n }", "title": "" }, { "docid": "b330d291de9fbd392f253311a96f3c6d", "score": "0.7729711", "text": "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n // \\App\\Models\\Article::factory(5)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Topic::factory(5)->create();\n // \\App\\Models\\Tag::factory(5)->create();\n // $this->call(ArticleCategorySeeder::class);\n // $this->call(ArticleTopicSeeder::class);\n $this->call(RegionSeeder::class);\n }", "title": "" }, { "docid": "2e159f4e54504bdde9f62ecdf35810ee", "score": "0.7727038", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User',50)->create();\n factory('App\\Post',50)->create();\n factory('App\\Profile',50)->create();\n factory('App\\Category',3)->create();\n \n $posts = factory(App\\Post::class)->create();\n\n factory(Comment::class, 30)->create([\n 'post_id' => $posts->id\n ]);\n\n $comment = Comment::first();\n\n factory(Comment::class, 20)->create([\n 'post_id' => $posts->id,\n 'comment_id' => $comment->id,\n ]);\n\n }", "title": "" }, { "docid": "bad3760d584e717874b4137c76409e6b", "score": "0.7725", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('roles')->insert([\n 'name' => 'SUPERUSER',\n ]);\n\n DB::table('contractors')->insert([\n 'name' => 'MY ENTERPRISE',\n ]);\n\n DB::table('projects')->insert([\n 'name' => 'PROJECT EXAMPLE',\n 'datestart' => now()->format('Y-m-d H:i:s'),\n 'dateFinish' => now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'SUPERUSER',\n 'user' => 'superuser',\n 'email' => '[email protected]',\n 'password' => Hash::make('IdonSoft'),\n 'role_id' => '1',\n 'contractor_id' => '1',\n ]);\n\n DB::table('permits')->insert([\n 'user_id' => '1',\n 'create_folio' => '1',\n 'create_dailyreport' => '1',\n 'create_note' => '1',\n 'create_comment' => '1',\n 'print_dailyreport' => '1',\n 'print_note' => '1',\n 'print_folio' => '1',\n 'edit_sequence' => '1',\n ]);\n \n }", "title": "" }, { "docid": "d6c8622705e47deae5dda1c458f83e8a", "score": "0.77246106", "text": "public function run()\n {\n DB::table('dias')->insert([\n // Para que los tres tipos de roles puedan darse,\n // Poner php artisan migrate:fresh --seed para hacer la migración del seed\n // primero php artisan db:seed --class=RolesTableSeeder\n // y luego php artisan db:seed --class=UsersTableSeeder\n // finalmente php artisan db:seed --class=DiasTableSeeder\n [\n 'nombre' => 'Lunes'\n ],\n [\n 'nombre' => 'Martes'\n ],\n [\n 'nombre' => 'Miercoles'\n ],\n [\n 'nombre' => 'Jueves'\n ],\n [\n 'nombre' => 'Viernes'\n ],\n [\n 'nombre' => 'Sabado'\n ],\n [\n 'nombre' => 'Domingo'\n ]\n ]);\n }", "title": "" }, { "docid": "7c1039e8faa671c62b7faf41b7d53536", "score": "0.7719805", "text": "public function run()\n {\n Model::unguard();\n Category::where('id', '<=', '5')->delete();\n $data = [\n ['name' => '汽车'],\n ['name' => '游戏'],\n ['name' => '影视'],\n ['name' => '社会'],\n ['name' => '政治'],\n ];\n foreach ($data as $d) {\n Category::create($d);\n }\n factory(Content::class, 1000)->create();\n // $this->call(\"OthersTableSeeder\");\n }", "title": "" }, { "docid": "bbdcb34cad1d7381d781f85b5830c22f", "score": "0.7719252", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->depeartmntTableSeed();\n// $this->designationTableSeed();\n /**\n * Run the database seeds.\n *\n * @return void\n */\n\n }", "title": "" }, { "docid": "7d13b7cccd5ea1d589bdc8b1ce81b63f", "score": "0.7714948", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\User::class)->create();\n\n // factory(Student::class,50)->create()->each(function($student)\n // {\n // $student->educationalQualification()->save(factory(Parents::class)->make());\n // $student->educationalQualification()->save(factory(Payment::class)->make());\n // $student->educationalQualification()->save(factory(Guardian::class)->make());\n // $student->educationalQualification()->save(factory(EQ::class)->make());\n // });\n }", "title": "" }, { "docid": "1506f1139a748a04763396e2ad86ef7a", "score": "0.77111006", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(Category::class,10)->create();\n factory(ProductType::class,20)->create();\n // factory(Product::class,150)->create();\n $this->call(ProductSeeder::class);\n\n }", "title": "" }, { "docid": "b84407b90ecd0da0f136c70b54b6b0f0", "score": "0.77108926", "text": "public function run()\n {\n /// Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n $category_names = array('Category One', 'Category Two');\n foreach($category_names as $name) {\n Category::create([\n 'name' => $name,\n 'price_mod' => $faker->randomFloat($nbMaxDecimals = 2, $min = -2, $max = 10.0),\n ]);\n }\n }", "title": "" }, { "docid": "510b6a95b0bda8150598fcfcd5e0fa41", "score": "0.7709317", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n factory(\\App\\User::class,100)->create();\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\Product::class,30)->create()->each(\n function ($product) {\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class,10)->create();\n\n }", "title": "" }, { "docid": "2f62f5093b8e26beb38831e5bdf29130", "score": "0.7709224", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('employees')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('12345678')\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "c31a689ff9ae8523f84c6d76cbc5c3ea", "score": "0.7706925", "text": "public function run()\n {\n $user = [\n 'name' => 'Heru Trijaya',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n $user = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n \\App\\Models\\Author::factory(10)->create();\n \\App\\Models\\Book::factory(10)->create();\n }", "title": "" }, { "docid": "5b9bc9e211e20662e2eb7209dd7f3c70", "score": "0.77040267", "text": "public function run()\n {\n Student::factory(10)->create();\n Post::factory(10)->create();\n Category::factory(10)->create();\n Category_Post::factory(10)->create();\n Comment::factory(10)->create();\n // $this->call([\n // TableFirst::class,\n // SubjectTableSeeder::class,\n // ThuanSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "134a3a3db82b46df656b48877e3819ce", "score": "0.770128", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n // Seed the Time Zones\n //$this->call(TimeZonesTableSeeder::class);\n\n // Seed the Languages\n $this->call(LanguagesTableSeeder::class);\n\n // Seed the countries\n $this->call(CountriesTableSeeder::class);\n\n // Seed the setting table\n $this->call(SettingsTableSeeder::class);\n\n // Seed the company & company translation\n //$this->call(CompanySeeder::class);\n\n // Seed Brand table\n //$this->call(BrandSeeder::class);\n\n // Seed Vehicle table\n //$this->call(VehicleSeeder::class);\n\n // Seed dealership group table\n //$this->call(GroupSeeder::class);\n\n // Seed Dealership table\n //$this->call(DealershipSeeder::class);\n\n // Seed Event type table\n //$this->call(EventTypeSeeder::class);\n\n // Seed Event table\n //$this->call(EventSeeder::class);\n\n // Seed Region table\n //$this->call(RegionSeeder::class);\n\n // Seed Brand Dealership table\n //$this->call(BrandDealershipSeeder::class);\n\n\n // Seed User table\n $this->call(UserSeeder::class);\n\n // Seed Guest table\n// $this->call(GuestSeeder::class);\n }", "title": "" }, { "docid": "c9cd9baaee4f0804b80ef0f6ae5ccbb6", "score": "0.7700862", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Ceci',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Emmanuel',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Fabián Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'A'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Santiago Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n }", "title": "" }, { "docid": "cf80c34d1b3a3ce834cad902d96a49ae", "score": "0.769638", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n $this->call(DicRegionsTableSeeder::class);\n $this->call(DicCitiesTableSeeder::class);\n $this->call(AdCategoriesTableSeeder::class);\n Adverts::factory()->count(100)->create();\n }", "title": "" }, { "docid": "d95416047e958fc5cae8011cf9c8b698", "score": "0.76955074", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 20; $i++) { \n \tPost::create([\n \t\t'title'=> $faker->sentence,\n \t\t'body'=> implode('',$faker->sentences(4))\n \t\t]);\n }\n }", "title": "" }, { "docid": "8d26d80f703923cebce1f22a4b67618a", "score": "0.7695338", "text": "public function run()\n {\n\n //Make roles and permissions\n\t Role::create(['name' => 'user']); // normal register user\n\t Role::create(['name' => 'owner']); // owner club user\n\t Role::create(['name' => 'manager']); // portal manager\n\t Role::create(['name' => 'admin']); // admin with full permission\n\n //Start other seeders.\n $this->call([\n MusicTypesTableSeeder::class,\n\t VoivodeshipsTableSeeder::class,\n\t CitiesTableSeeder::class,\n UsersTableSeeder::class,\n\t ClubsTableSeeder::class,\n\t EventsTableSeeder::class,\n\t UserSettingsSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "58e1005fcab19ab4f45f7567ad4fbe32", "score": "0.76925015", "text": "public function run()\n {\n //factory(App\\Category::class, 5)->create();\n $this->call(PageSeeder::class);\n $this->call(TagSeeder::class);\n $this->call([\n CategorySeeder::class,\n ProductCategorySeeder::class,\n ProductTagSeeder::class,\n RelationshipSeeder::class,\n \n ]);\n factory(App\\Comment::class, 200)->create();\n factory(App\\User::class, 25)->create();\n //factory(App\\ProductCategory::class,5)->create();\n factory('App\\Post',50)->create();\n factory('App\\Product',80)->create();\n }", "title": "" }, { "docid": "07d21e2f0b22563e12932cf198047658", "score": "0.76895857", "text": "public function run()\n {\n $faker = Faker::create();\n $products = c2a(Product::lists('id'));\n $users = c2a(User::lists('id'));\n\n foreach (range(1, 20) as $index) {\n Topic::create([\n 'title' => $faker->sentence(6),\n 'slug' => $faker->name,\n 'product_id' => $faker->randomElement($products),\n 'user_id' => $faker->randomElement($users),\n 'keywords' => $faker->sentence,\n 'description' => $faker->sentence(10),\n 'content' => $faker->sentence(100),\n 'page_view_count' => rand(10, 3059),\n 'vote_count' => rand(0, 199),\n 'reply_count' => rand(0, 100)\n ]);\n }\n\n }", "title": "" }, { "docid": "454fbceec11c7288d6d51c17b75dacd8", "score": "0.768884", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class, 1)->create([\n 'email' => '[email protected]',\n 'role' => \\App\\User::ROLE_ADMIN\n ]);\n\n factory(\\App\\User::class, 1)-> create([\n 'email' => '[email protected]'\n ]);\n\n $this->call(PostTableSeeder::class);\n $this->call(TbSinproAdminPermissaoSeeder::class);\n// factory(\\App\\Post::class, 20)->create();\n\n }", "title": "" }, { "docid": "201732e6ba9e0b6eef969d5379841fde", "score": "0.7688003", "text": "public function run()\n {\n //factory(\\App\\Models\\User::class, 10)->create();\n\n $users = \\App\\Models\\Role::all()->pluck('id')->toArray();\n\n /**\n * Creating seeder for every role\n */\n for ($i = 1; $i < (sizeof($users)); $i++) {\n DB::table('users')->insert([\n\n 'name' => 'Janko',\n 'email' => 'janko' . $i . '@gmail.com',\n 'surname' => 'Mrkvicka',\n 'password' => bcrypt('test123'),\n 'email_verified_at' => now(),\n 'id_role' => $users[$i - 1],\n 'created_at' => now(),]);\n }\n\n }", "title": "" }, { "docid": "d0ebc0b2fe28ccfde9a1ac80f9ebf4ad", "score": "0.7687522", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(MissionTableSeeder::class);\n factory(App\\Models\\Mission::class, 20)->create();\n factory(App\\Models\\Project::class, 20)->create();\n factory(App\\Models\\News::class, 20)->create();\n factory(App\\Models\\Event::class, 20)->create();\n }", "title": "" }, { "docid": "2603f00e40c258c840226bb9122a174d", "score": "0.76871914", "text": "public function run() {\n $this->call(AppConfigSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(TopicTableSeeder::class);\n $this->call(BankTableSeeder::class);\n $this->call(ProvinceTableSeeder::class);\n\n // factory(App\\Product::class, 100)\n // ->create()\n // ->each(function ($product) {\n // $product->fees()->saveMany(factory(App\\ProductFee::class, 3)->create([\n // 'product_id' => $product->id,\n // ]));\n // });\n }", "title": "" }, { "docid": "869949cd0ca1c0b3e62d490a128b7a0b", "score": "0.76862925", "text": "public function run()\n {\n $this->call(ReputationsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(PublishersTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(BooksTableSeeder::class);\n // $this->call(UserImagesTableSeeder::class);\n // $this->call(BookImagesTableSeeder::class);\n // $this->call(AuthorImagesTableSeeder::class);\n // $this->call(ScoresTableSeeder::class);\n\n $this->call(AuthorBookTableSeeder::class);\n $this->call(BookTagTableSeeder::class);\n // $this->call(RoleUserTablerSeeder::class);\n\n // factory(App\\User::class, 35)->create();\n\n // factory(App\\Score::class, 100)->create();\n\n factory(App\\Review::class, 35)->create();\n\n // factory(App\\ReviewResponse::class, 35)->create();\n\n $this->call(SocialMediasTableSeeder::class);\n }", "title": "" }, { "docid": "0e51afc722eeda1b1ce5a397b6fed9ba", "score": "0.768627", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\ItemCondition::factory(10)->create();\n\n $this->call([\n PrimaryCategorySeeder::class,\n SecondaryCategorySeeder::class,\n // ItemConditionSeeder::class,\n ]);\n\n DB::table('users')->insert([\n 'name' => 'root',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'remember_token' => Str::random(10),\n 'password' => Hash::make('11111111'),\n ]);\n }", "title": "" }, { "docid": "989db8f23e2aa4fc9b9956c2987e7b19", "score": "0.7683997", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create('en_GB');\n\n \\App\\User::create([\n 'name' => env('ADMIN_NAME', ''),\n 'email' => env('ADMIN_EMAIL', ''),\n 'email_verified_at' => now(),\n 'password' => bcrypt(env('ADMIN_PASSWORD', '')),\n 'role' => 'admin',\n 'created_at' => now(),\n ]);\n\n // Added seed of random UK address data for ease\n for ($i = 0; $i < 10; $i++) \n {\n \\App\\Restaurant::create([\n 'name' => $faker->name,\n 'street' => $faker->streetName,\n 'city' => $faker->city,\n 'postcode' => $faker->postcode\n ]);\n }\n }", "title": "" }, { "docid": "ec07eb0122812cf17ee5e1ceaae51aeb", "score": "0.7680055", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n factory(Subscriber::class, 2)->create();\n factory(Shop::class, 10)->create();\n factory(Music::class, 10)->create();\n factory(Video::class, 2)->create();\n\n }", "title": "" }, { "docid": "51a1f86bae6860c0a7c4877c0fefde5c", "score": "0.7679082", "text": "public function run()\n {\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n Companies::create([\n 'name' => 'Mark Zuckenberg',\n 'email' => '[email protected]',\n 'website' => 'https://www.facebook.com/'\n ]);\n\n Companies::create([\n 'name' => 'Kevin Systrom',\n 'email' => '[email protected]',\n 'website' => 'https://www.instagram.com/'\n ]);\n\n // Companies::factory(5)->create();\n\n Employees::factory(20)->create();\n }", "title": "" }, { "docid": "68c5a5f69b2f6ff14c735017c7d3ac07", "score": "0.76764464", "text": "public function run()\n {\n $this->call([\n ItemSeeder::class,\n PropertySeeder::class,\n ItemPropertiesSeeder::class,\n\n ]);\n /*\n \\App\\Models\\Item::factory(10)->create();\n \\App\\Models\\Property::factory(10)->create();\n \\App\\Models\\ItemProperties::factory(10)->create();\n */\n \\App\\Models\\User::create([\n 'name' => 'simple',\n 'email' => '[email protected]',\n 'password' =>Hash::make('simple'),\n ]);\n \n\n\n }", "title": "" }, { "docid": "040547254a75eaa4c796f44c64dd6435", "score": "0.76729816", "text": "public function run()\n {\n $user_ids = ['1','2','3','4','5'];\n\n\t\t$faker = app(Faker\\Generator::class);\n\n $posts = factory(Post::class)->times(50)->make()->each(function ($post) use ($faker, $user_ids) {\n $post->user_id = $faker->randomElement($user_ids);\n });\n\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "bd269fc9c6211e950f76f57cd2214618", "score": "0.7667866", "text": "public function run()\n {\n\n $data = [\n ['name'=>'Computer Science'],\n ['name'=>'Pharmacy'],\n ['name'=>'Psychology'],\n ['name'=>'Medicine'],\n ['name'=>'Dentistry'],\n\n ];\n $faker = Faker::create();\n foreach($data as $d){\n DB::table('faculties')->insert([\n 'name' => $d['name'],\n 'description' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "b8157e614e83d25d500f4d94dffc10e8", "score": "0.7666764", "text": "public function run()\n {\n m_dosens::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n m_dosens::create([\n 'body' => $faker-> paragraph,\n 'id'=> $faker -> rand(),\n 'nama_dosen'=> $faker -> sentence,\n 'matkul'=> $faker -> sentence,\n 'ruang kelas' => $faker -> sentence,\n $table->timestamps(),\n ]);\n }\n }", "title": "" }, { "docid": "f3ec341e6252123b6f3f5aacac2d5793", "score": "0.7665906", "text": "public function run()\n {\n \\App\\Models\\Address::factory(20)->create(); // php artisan db:seed --class=AddressSeeder\n \\App\\Models\\User::factory(15)->create(); // php artisan db:seed --class=UserSeeder\n \\App\\Models\\Admin::factory(4)->create(); // php artisan db:seed --class=AdminSeeder\n \\App\\Models\\Client::factory(16)->create(); // php artisan db:seed --class=ClientSeeder\n \\App\\Models\\Unit::factory(5)->create(); // php artisan db:seed --class=UnitSeeder\n \\App\\Models\\Category::factory(13)->create(); // php artisan db:seed --class=CategorySeeder\n \\App\\Models\\Market::factory(20)->create(); // php artisan db:seed --class=MarketSeeder\n \\App\\Models\\Product::factory(30)->create(); // php artisan db:seed --class=ProductSeeder\n // \\App\\Models\\Rating::factory(10)->create(); // php artisan db:seed --class=RatingSeeder\n // \\App\\Models\\Price::factory(30)->create(50); // php artisan db:seed --class=PriceSeeder\n }", "title": "" }, { "docid": "e6df187fdede5a2fd76c7dced952e9f5", "score": "0.7664288", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('Admin')\n ]);\n Author::factory(30)->create()->each(function($author){\n $volumes = Volum::factory(10)->make();\n $author->volums()->saveMany($volumes);\n });\n\n }", "title": "" }, { "docid": "ffe63233202bdd209cfbffd2e2f07ebd", "score": "0.7661084", "text": "public function run()\n {\n Author::factory(50)->create();\n Books::factory(100)->create();\n $this->call(UserTableSeeder::class);\n $this->call(ShelveTableSeeder::class);\n $this->call(ShelveBookSeeder::class);\n }", "title": "" }, { "docid": "c184051466e0849a143a12cd08517914", "score": "0.7660858", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // DB::table('socios')->insert(['nombre'=>'pepe','dni'=>'12345678','direccion'=>'por ahi 222','nacimiento'=>'2020-10-10','email'=>'[email protected]','telefono'=>'456798456','url'=>'www.google.com']);\n // DB::table('socios')->insert(['nombre'=>'juan','dni'=>'12332378','direccion'=>'por allk 222','nacimiento'=>'2010-10-10','email'=>'[email protected]','telefono'=>'223242434','url'=>'www.google1.com']);\n \\App\\Models\\Estado::factory(3)->create();\n \\App\\Models\\Socios::factory(10)->create();\n //$this->call(SociosSeeder::class);\n }", "title": "" }, { "docid": "d200dedc6a0dba3a8fcc4d5cb3b5af61", "score": "0.76599014", "text": "public function run()\n {\n /* $this->call(UsersTableSeeder::class);\n $this->call(CollectoinsTableSeeder::class);\n $this->call(Extra_itemsTableSeeder::class);\n $this->call(AdditionalsTableSeeder::class);*/\n\n\n DB::table('roles')-> insert([\n [\n 'name' => 'Admin',\n 'alias' => 'admin',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'name' => 'User',\n 'alias' => 'user',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ]\n ]);\n\n\n }", "title": "" }, { "docid": "bb85cd62424281e6a7862cad3a9b9b5a", "score": "0.76592153", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'luoyinghao',\n 'email' => '[email protected]',\n 'group_id' => 1,\n 'status' => 1,\n 'password' => bcrypt('123456'),\n ]);\n\n DB::table('pet')->insert([\n 'name' => 'default',\n 'nick' => '弹幕娘',\n 'user_id' => 1,\n ]);\n\n DB::table('user_pet')->insert([\n 'user_id' => 1,\n 'pet_id' => 1,\n 'exp' => 1,\n ]);\n\n DB::table('event')->insert([\n 'sender' => '系统',\n 'sender_id' => 0,\n 'action' => 7,\n 'target' => 0,\n 'target_type' => 'announce',\n 'content' => '这是通告,通告听到了吗?听到了请回答,听到了请回答',\n 'type' => 'remind',\n 'receiver' => 0,\n 'is_read' => 1,\n 'time' => date('Y-m-d H:i:s')\n ]);\n\n }", "title": "" }, { "docid": "a5ce77c3e99f12ab19018d9164fdffc8", "score": "0.76588374", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $directors=factory(App\\Director::class)->times(7)->create();\n $movies=Movie::all();\n\n foreach ($movies as $oneMovies) {\n $oneMovies->director()->associate($directors->random(1)->first()->id);\n $oneMovies->save();\n }\n\n }", "title": "" }, { "docid": "5340b733c0c35d4a0890dae51ca9f01e", "score": "0.76565367", "text": "public function run()\n {\n $this->truncateUserTables();\n\n \\App\\Models\\User::firstOrCreate([\n 'name' => 'Admin User',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin1123'),\n ]);\n\n $faker = Faker::create();\n\n foreach (range(1, 25) as $index) {\n \\App\\Models\\Student::create([\n 'fullname' => $faker->firstname,\n 'roll' => $index,\n 'propic' => null,\n ]);\n }\n }", "title": "" }, { "docid": "d26cbbf9444f51683da0101c8bae9147", "score": "0.76557153", "text": "public function run()\n {\n //create a known demo user\n User::factory()->create([\n 'email' => '[email protected]'\n ]);\n\n $this->call([\n UserTableSeeder::class,\n ]);\n\n Quiz::factory()->count(20)->create()->each(function($c) {\n $c->mcqs()->saveMany(\n MCQ::factory()->count(random_int(10,50))->create()\n );\n });\n }", "title": "" }, { "docid": "a48cd5bbd88c4d067c54457c50be726c", "score": "0.7654323", "text": "public function run()\n {\n $this->truncateTables([\n 'users',\n 'images',\n 'likes',\n 'comments'\n ]);\n \n User::factory(10)->create();\n Image::factory(10)->create();\n Like::factory(10)->create();\n Comment::factory(10)->create();\n\n $this->call([\n UserSeeder::class,\n ]);\n }", "title": "" }, { "docid": "786ba8399b50f481be52bd7398718a58", "score": "0.7653478", "text": "public function run()\n {\n //$this->call(CitySeeder::class);\n \n City::factory(12)->create();\n $this->call(VehicleSeeder::class);\n \n //$this->call(TelephoneSeeder::class);\n \n Telephone::factory(50)->create();\n Rental::factory(100)->create();\n\n }", "title": "" }, { "docid": "e6f06365d22e1b28b3bd14b58444dc04", "score": "0.765216", "text": "public function run()\n {\n\n $faker = Faker::create();\n\n foreach(range(1,10) as $index){\n DB::table('iis_interpret')->insert([\n 'name' => $faker->sentence(3, true),\n 'members' => $faker->sentence(3, true),\n 'genre' => $faker->randomElement($array = array ('pop','rock','rap', 'metal', 'punk')),\n 'publisher' => $faker->word(),\n 'image' => $faker->imageUrl($width = 1280, $height = 720),\n 'description' => $faker->paragraph(2),\n 'formed_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'created_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'updated_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now')\n ]);\n }\n\n }", "title": "" }, { "docid": "c8e097995b44d3b77d7922d45d3e7d18", "score": "0.7651468", "text": "public function run()\n {\n Model::unguard();\n\n // https://gist.github.com/isimmons/8202227\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n Category::truncate();\n Post::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = factory(App\\Category::class, 30)->create();\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($categories) {\n $user->posts()->saveMany(factory(App\\Post::class, 50)->create()->each(function($post) use ($categories) {\n $post->categories()->sync($categories->random(3)->pluck('id')->all());\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "b95080596763428b065e5fbdb7fdf0c5", "score": "0.7650348", "text": "public function run()\n {\n $faker \t= Factory::create('id_ID');\n \t$data \t= [];\n \tforeach (range(1,50) as $i) {\n \t\t$data[] = [\n \t\t\t'title' \t\t=> 'Beli Deposit',\n \t\t\t'content'\t\t=> 'Membeli deposit sebesar 50000',\n \t\t\t'user_id'\t\t=> '38',\n \t\t\t'created_at'\t=> $faker->datetime,\n \t\t\t'updated_at'\t=> now(),\n \t\t];\n \t}\n \tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \tDB::table('activities')->truncate();\n \tDB::table('activities')->insert($data);\n }", "title": "" }, { "docid": "4caecf4e2dbd3c5accb7ad81244e8ae2", "score": "0.76480365", "text": "public function run()\n {\n // seed of perfis\n DB::table('perfis')->insert([\n [\n 'id' => 1,\n 'name' => 'admin',\n 'display_name' => 'Administrador',\n 'description' => 'Perfil de administrador',\n ],\n [\n 'id' => 2,\n 'name' => 'usuario',\n 'display_name' => 'Usuario',\n 'description' => 'Perfil do Usuario que aloca e compra imoveis.',\n ],\n ]);\n\n /**\n * Adicionar a permissao para os usurios da seed\n */\n DB::table('usuarios_perfis')->insert([\n [\n 'usuario_id' => 1,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 2,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 3,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 4,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 5,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 6,\n 'perfil_id' => 2\n ],\n ]);\n }", "title": "" }, { "docid": "4ac022527ef235783677bc6ef115503d", "score": "0.7646797", "text": "public function run()\n {\n $this->call(BlogArticlesCategoriesTableSeeder::class);\n $this->call(ProductsCategoriesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(BlogEventsCategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n factory(\\App\\Models\\User::class, 50)->create();\n factory(\\App\\Models\\BlogEvent::class, 50)->create();\n factory(\\App\\Models\\BlogArticle::class, 50)->create();\n\n }", "title": "" }, { "docid": "4f4496d20543369fd27d03bb58fe3133", "score": "0.76465297", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n $user = User::find(1);\n\n $topics = factory(Topic::class)->times(rand(100, 200))->make()->each(function ($topic) use ($faker, $user) {\n $topic->user_id = 1;\n $topic->category_id = 1;\n $topic->is_excellent = rand(0, 1) ? 'yes' : 'no';\n });\n Topic::insert($topics->toArray());\n }", "title": "" }, { "docid": "8945612ec7a49f0f1852938590417f44", "score": "0.76462865", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('items')->insert([\n ['name' => '1 More E1001 Triple Driver IEM'],\n ['name' => '1 More E1001 Triple Driver IEM (Demo)'],\n ['name' => '1 More Piston Fit'],\n ['name' => 'ALO Litz MMCX 2.5'],\n ['name' => 'ATH-AR1iS'],\n ['name' => 'ATH-DSR7BT Black'],\n ['name' => 'ATH-LS50iS Black'],\n ['name' => 'ATH-LS70iS Black'],\n ]);\n }", "title": "" }, { "docid": "8494dc0b48ead42c5e9f8183bb5471d3", "score": "0.76458687", "text": "public function run()\n {\n \\App\\User::truncate();\n $faker = Faker\\Factory::create();\n for($i=0;$i<50;$i++){\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'lastName' => $faker->lastName,\n 'email' => $faker->email,\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'user',\n 'password' => bcrypt('secret'),\n ]);\n }\n DB::table('users')->insert([\n 'name' => 'Sample',\n 'lastName' => 'Example',\n 'email' => \"[email protected]\",\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'admin',\n 'password' => bcrypt('secret'),\n ]);\n }", "title": "" }, { "docid": "68bf7d23d85baec30f2ba67a6fa4e4b6", "score": "0.764581", "text": "public function run()\n {\n $this->studentSkillsSeeder();\n $this->studentTagsSeeder();\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "61ff63be9d9a75aa08d36493061308fe", "score": "0.0", "text": "public function store(Request $request)\n {\n $param = $this->processFormData($request);\n\n $this->servicegroupManager->register($param);\n\n return redirect()->route('admin.servicegroups.index');\n }", "title": "" } ]
[ { "docid": "7e42fedef6bb33a605a9a912390eb1f7", "score": "0.72865677", "text": "public function store($data, Resource $resource);", "title": "" }, { "docid": "151a5a15a7c013546a09c2e74ab5ea61", "score": "0.7145327", "text": "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "title": "" }, { "docid": "5123f91023f684f97559dacd499fac58", "score": "0.71325725", "text": "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "a7fa3d3c4d35681d03532a282b2ef7d8", "score": "0.6640912", "text": "public function createStorage();", "title": "" }, { "docid": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "28d08bba4784cf6d55e31bc6ddef8362", "score": "0.652643", "text": "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "5c131d35165031041eaca6bb37ecf0c2", "score": "0.64490104", "text": "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "5088b0baaac4342bc47aa7ee8b774852", "score": "0.63736665", "text": "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
82b36a308f8c9aa1e8af3be11f3c6dc6
/ This function will check if the passed token matches the token stored in $_SESSION. First we get token name from our config file and then use this name to get the token stored in the $_SESSION array, and we need to check if this token name actually exists in $_SESSION, if so, then we need also to check if it matches the user generated token. If the two conditions go right, then we need to delete this session from $SESSION and return true, otherwise return false
[ { "docid": "8b4f1b2cd20b2c10c540d413be24b22c", "score": "0.73927546", "text": "public static function check($token, $type) {\n $tokenName = Config::get(\"session/tokens/$type\");\n\n if(Session::exists($tokenName) && $token === Session::get($tokenName)) {\n Session::delete($tokenName);\n return true;\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "c6ea7cdb57864379683f1a9f25542ff7", "score": "0.8132583", "text": "public static function check($token)\n {\n $tokenName = Config::get('session/token_name');\n\n if(Session::exists($tokenName) && $token === Session::get($tokenName))\n {//above checks if the token name received from get exists and if the same as current session tokenName\n Session::delete($tokenName);\n return true;\n }\n return false;\n\n }", "title": "" }, { "docid": "1f90b109219b84aefe7b09fa9c6b17db", "score": "0.8056838", "text": "public static function check($token){\r\r\n\t\t$tokenName = Config::get('session/token_name');\r\r\n\r\r\n\t\tif (Session::exists($tokenName) && $token === Session::get($tokenName)){\r\r\n\t\t\tSession::delete($tokenName);\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\r\r\n\t\treturn false;\r\r\n\t}", "title": "" }, { "docid": "a1373dc329511c73f3d824acc21c741d", "score": "0.80536497", "text": "public static function check($token) {\n\t\techo 'token === (shows old token for some reason)' . $token . '<br/>';\n\t\t$tokenName = Config::get('session/token_name');\n\t\techo 'tokenName === ' . $tokenName . '<br/>';\n\t\t$a = Session::exists($tokenName);\n\t\techo 'session exists === ' . $a . '<br/>';\n\t\t$b = Session::get($tokenName);\n\t\techo 'session name === ' . $b . '<br/>';\n\t\t//echo Input::get('token');\n\t\tif(Session::exists($tokenName) && $token === Session::get($tokenName)) {\n\t\t\tSession::delete($tokenName);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8ed3a8de96a657b44bcf073e8856729e", "score": "0.7580698", "text": "function checkToken($token = null)\n\t{\n\t\tif ($token === null)\n\t\t{\n\t\t\t$token = $this->mgToken;\n\t\t}\n\n\t\tif ($_SESSION['mg-token'] === $token)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$_SESSION['mg-token'] = $token;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b4dd7bed47c009e9cba237f6baafbb59", "score": "0.753034", "text": "public function compareTokens($token) {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n if (isset($_SESSION['token']) && !empty($_SESSION['token'])) {\n if ($_SESSION['token'] === $token) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "6c21c80baeccf2ab028c061641af9524", "score": "0.74664277", "text": "public static function fnDoesTokensMatch($token){\n return (($token == $_SESSION['token']) && ($_SESSION['token_generated_at'] + self::$_tokenExpireTime) > time());\n }", "title": "" }, { "docid": "2b0ed40b3ef676a0340f106a6059856d", "score": "0.74568594", "text": "function _checkToken() {\n\t\tif ($this->session->userdata('token') === $this->input->post('token')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f5c0b000450d803a1695497b7986928b", "score": "0.74296945", "text": "public function isTokenMatch() {\n if(!empty($_COOKIE['token']) && !empty($_POST['token'])) {\n return $this->grabCookie('token') == $_POST['token'] ? $_POST['token'] == $_SESSION['token'] : false;\n }\n return false;\n }", "title": "" }, { "docid": "38f3acea42d8d0c2e079fdbbd636c6ed", "score": "0.7381336", "text": "function checkValidToken($token)\n\t{\n\t\t\n\t\tif(Yii::app()->session['fToken'] == $token){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "860d29058bb490f32055d1035222800f", "score": "0.7285414", "text": "public static function validate($token)\n {\n /** Get the token from the session. */\n $sessionToken = Config::get('session/session_token');\n \n /** Check passed token against the version stored in the session. */\n if(Session::exists($sessionToken) && $token === Session::get($sessionToken)) {\n Session::delete($sessionToken);\n \n return true;\n }\n }", "title": "" }, { "docid": "2435b7a8b8fae5597f1b67f20017dec2", "score": "0.71136546", "text": "function checkToken()\n{\n $okay = !empty($_POST['token']) && htmlspecialchars($_POST['token']) == $_SESSION['token'];\n $_SESSION['token'] = NULL; // Use the token only one time, like a candom.\n return $okay;\n}", "title": "" }, { "docid": "19aa442580d6cd274b6e65c60130977c", "score": "0.7036859", "text": "public static function checkToken($token)\n {\n $session = DSession::load();\n\n return ($token === $session[ self::SESSION_KEY ]);\n }", "title": "" }, { "docid": "1f2068da57bb59f3e55f94751381dc48", "score": "0.6964522", "text": "public function verifyToken($token)\n {\n if ($this->httpRequest->getSession('token') == $token) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "883f7ae21ff98b75bdfbf147a7ed2522", "score": "0.6872724", "text": "public static function verifyToken( $token )\n\t{\n\t\tif ( !isset( $_SESSION['token'] ) )\n\t\t{\n\t\t\tself::generateToken();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ( Database::samePassword( $_SESSION['token'] , $token ) === true );\n\t}", "title": "" }, { "docid": "07df30dae25a13e3555c8a4cb3ab6c22", "score": "0.68466157", "text": "private function _checkSession() {\n if (file_exists($this->config['sessionFile'])) {\n $this->session = json_decode(file_get_contents($this->config['sessionFile']), true);\n }\n\n if (!$this->session || (time() >= $this->session['expires_at'])) {\n return $this->_sessionToken();\n }\n\n return true;\n }", "title": "" }, { "docid": "5db3145010d70c2e132f912b26bea1e9", "score": "0.68292004", "text": "private function tokenCompare()\n {\n if (isset($_POST['FormSimple_form']['token'])\n && $this->tokenGet() === $_POST['FormSimple_form']['token']\n ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "dce5dff12fab559eda4d037659e33f81", "score": "0.67888486", "text": "public function checkToken($token){\n\t\n\t\t/* \n\t\t* checking age of token\n\t\t* deleting the value of expired token \n\t\t*/\n\t\t$i = 0;\n\t\t\n\t\tforeach($_SESSION['lss'] as $key => $value):\n\n\t\t\tif(!empty($value['time'])):\n\t\t\t\n\t\t\t\tif (strtotime($value['time']) <= strtotime(date('Y-m-d H:i:s'))):\n\t\t\t\t\n\t\t\t\t\tunset($_SESSION['lss'][$i]);\n\t\t\t\t\t\n\t\t\t\telseif ($token == $value['token']):\n\t\t\t\t\n\t\t\t\t$lastToken = $value['token'];\n\t\t\t\t\n\t\t\t\tunset($_SESSION['lss'][$i]);\n\t\t\t\t\t\t\t\t\n\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\tendif;\n\t\t\n\t\t$i++;\n\t\t\n\t\tendforeach;\n\t\t\t\t\n\t\t$_SESSION['lss'] = array_values($_SESSION['lss']);\n\n\t\treturn $lastToken;\n\t\t\n\t\t//return defFunction::search($_SESSION['lss'],\"token\",$token);\n\t\t\t\t\n\t}", "title": "" }, { "docid": "4d48877164d9aefb04f86bb8440c3c47", "score": "0.6759745", "text": "private function _tokenIsUnique($token) {\n\t\t$unique = true;\n\t\t$sql = \"SELECT token\n\t\t\tFROM `user_sessions`\n\t\t\tWHERE token = '\" . db_input($token) . \"'\";\n\t\t$query = db_query($sql);\n\t\tif($query->num_rows > 0) {\n\t\t\t$unique = false;\n\t\t}\n\t\treturn $unique;\n\t}", "title": "" }, { "docid": "e06630a591d71018b6ccd9fcd2027ed9", "score": "0.67433524", "text": "public function verifyToken($token)\n\t{\n\t\tif (!isset($_SESSION[$this->uid. '_expiry'])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$expiry = $_SESSION[$this->uid. '_expiry'];\n\n\t\t// Invalidate if expired\n\t\tif (time() > $expiry) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Set status to true if CSRF has not expired and matches session\n\t\t$verified = ($token === $this->makeHash($expiry, $this->uid, $this->action));\n\t\tunset($_SESSION[$this->uid. '_expiry']);\n\n\t\treturn $verified;\n\t}", "title": "" }, { "docid": "e56447d944dad2955fcf4b8899478ada", "score": "0.67087907", "text": "function _token_check($str)\n\t{\n\t\t$session_token = $this->session->userdata(\"token\");\n\t\t$this->session->unset_userdata(\"token\");\n\t\t\n\t\tif (empty($session_token) || $session_token != $str ) \n\t\t{\n\t\t\treturn '<li>The form cannot be posted twice, please re-enter new data</li>';\t\t\n\t\t} \n\t\telse\n\t\t{\t\t\t\t\n\t\t\treturn FALSE;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "e1d0197206d6ab80dfd5b1f5e4cb2d26", "score": "0.67007816", "text": "private function checkExistingToken() {\n if (!empty($this->google_session['token'])) return true;\n $token_repo = $this->manager->getRepository(GoogleTokenStorage::class);\n $last_token = $token_repo->getLastToken();\n\n if (!$last_token) {\n $this->logger->info('Have not found an existing token');\n return false;\n }\n $this->logger->info('Found token of '.print_r($last_token->getToken(),true));\n try {\n $this->google->setAccessToken($last_token->getToken());\n $this->youtube = new Google_Service_YouTube($this->google);\n $this->google_session['token'] = $last_token->getToken();\n $this->session->set('google',$this->google_session);\n return true;\n } catch (\\Exception $e) {\n try {\n $refresh_token = $last_token->getToken()['refresh_token'];\n $this->logger->info('Trying to refresh token with '.$refresh_token);\n $token = $this->google->refreshToken($refresh_token);\n $this->google_session['token'] = $token;\n $this->google->setAccessToken($token);\n $this->youtube = new Google_Service_YouTube($this->google);\n $this->storeToken($token);\n return true;\n } catch (\\Exception $e) {\n $this->logger->error('Failed to refresh token with'.$e->getMessage());\n }\n }\n return false;\n\n }", "title": "" }, { "docid": "600be810779db72293360023c551b0da", "score": "0.6676283", "text": "public static function check($token)\n {\n return $token === Session::get(Config::SESSION_TOKEN) and !empty($token);\n }", "title": "" }, { "docid": "3cedd554d28bcd151a46e52c998c16bc", "score": "0.66578966", "text": "function verifyFormToken($form) {\n \tif(!isset($_SESSION[$form.'_token'])) { \n \t\treturn false;\n }\n \t\n \t// check if the form is sent with token in it\n \tif(!isset($_POST['token'])) {\n \t\treturn false;\n }\n \t\n \t// compare the tokens against each other if they are still the same\n \tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n \t\treturn false;\n }\n \t\n \treturn true;\n }", "title": "" }, { "docid": "42b05b2667f9969d9eb1666a471e6a9c", "score": "0.6637814", "text": "function check_token($array='post')\n\t{\n\t\tswitch($array){\n\t\t\tcase 'get':\n\t\t\t\tif(isset($_SESSION['sec_token']) && isset($_GET['sec_token']) && $_SESSION['sec_token'] === $_GET['sec_token'])\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\tcase 'post':\n\t\t\t\tif(isset($_SESSION['sec_token']) && isset($_POST['sec_token']) && $_SESSION['sec_token'] === $_POST['sec_token'])\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn false;\n\t\t\tdefault:\n\t\t\t\tif(isset($_SESSION['sec_token']) && isset($array) && $_SESSION['sec_token'] === $array)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false; //just in case, don't let anything slip\n\t}", "title": "" }, { "docid": "1f1b18b6eb02650ccb793dd502990d51", "score": "0.66146606", "text": "function tokenIsValid($token) {\n\t$query = query(\"SELECT * FROM sessions WHERE sid='{$token}'\");\n\tif(num_rows($query)==0) return FALSE;\n\telse return TRUE;\n}", "title": "" }, { "docid": "8e2e525b2203244a9f3de929803b14e7", "score": "0.65995705", "text": "protected function hasSessionToken()\n {\n return $this->session->has('twitter.oauth_token') && $this->session->has('twitter.oauth_token_secret');\n }", "title": "" }, { "docid": "b73709638da87cc902e7aea0ebd30aa1", "score": "0.6555872", "text": "private function tokenComparison(string $token): bool\n {\n $userAuthToken = app('cache')->get('users:' . $this->auth->user()->id . ':auth_token');\n if (!$userAuthToken) return false;\n\n return hash_equals($userAuthToken, $token);\n }", "title": "" }, { "docid": "3719a8121113f2049053c1dbabe6718a", "score": "0.65521663", "text": "function has_token_on_session_storage() {\n if (isset($this->accessToken)) return true;\n return false;\n }", "title": "" }, { "docid": "c35f687df8f32fd1d1c6545c3eb127c8", "score": "0.6545639", "text": "public function verificaToken($token) {\n $conexao = new classeConexao();\n $resultado = $conexao::fetchuniq(\"SELECT * FROM tb_sessao WHERE tb_sessao_token = '{$token}'\");\n\n if(count($resultado)>0) {\n\n $idSessao = md5( uniqid( mt_rand(), true ) );\n $expire = ( time() + ( 30 * 24 * 3600 ) ); // O cookie não deve ser eterno.\n $cookieToken = array(\n 'i' => $idSessao,\n 't' => $token\n );\n return true;\n }\n else {\n unset($_COOKIE['auth']);\n return false;\n }\n }", "title": "" }, { "docid": "68547741c037c8279ee5491c7ed6474a", "score": "0.6536975", "text": "public static function validate_session($token)\n\t{\n\t\t$con = Database::connect();\n\t\t\n\t\t$st = $con->prepare(\"SELECT user_id FROM \" . Database::tb('session') . \n\t\t\t\" WHERE token = ? AND expires_at > NOW()\");\n\n\t\t$st->bind_param('s', $token);\n\n\t\t$st->execute() or\t\t\t\t\n\t\t\tdie('Database#validate_session error 1: ' . $con->error);\t\t\n\t\t\n\t\t$st->bind_result($user_id);\n\t\t\n\t\tif($st->fetch())\n\t\t\t$result = Database::get_user_name($user_id);\n\t\telse\n\t\t\t$result = false;\n\n\t\t$st->close();\n\t\tDatabase::disconnect($con);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a5d5f4afc9d48a50da4296b2d2fb90ba", "score": "0.6526783", "text": "public static function checkToken($token) {\n\t\treturn $token == CookieManager::getToken();\n\t}", "title": "" }, { "docid": "459e176cc453a2db16edfb43c2b87661", "score": "0.6492815", "text": "public function validate( $token ) {\r\n\t\t\t//already validated this load?\r\n\t\t\tif( $this->validated )\r\n\t\t\t\treturn true;\r\n\t\t\t//no token?\r\n\t\t\tif( !isset( $_SESSION['fd_core_token'] ) ) return false;\r\n\t\t\t//get return\r\n\t\t\t$return = ( $token == $_SESSION['fd_core_token'] );\r\n\t\t\t//kill session, remove token\r\n\t\t\tunset( $_SESSION['fd_core_token'] );\r\n\t\t\t//return good?\r\n\t\t\tif( $return )\r\n\t\t\t\t$this->validated = true;\r\n\t\t\t//return\r\n\t\t\treturn $return;\r\n\t\t}", "title": "" }, { "docid": "2d7f29ca5e213b2589101ecd5b55953c", "score": "0.64579636", "text": "function verifyFormToken($form) {\n \tif(!isset($_SESSION[$form.'_token'])) { \n \t\treturn \"a\";\n }\n \t\n \t// check if the form is sent with token in it\n /*\tif(!isset($_POST['token'])) {\n \t\treturn \"b\";\n }*/\n \t\n \t// compare the tokens against each other if they are still the same\n /*\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n \t\treturn \"c\";\n }*/\n \t\n \treturn \"d\";\n }", "title": "" }, { "docid": "5b04909758a0868476862585f9af2140", "score": "0.6438863", "text": "public static function csrfTokenCheck($id,$token){\n\t\tif(isset(self::$sessionData['csrf'][$id])){\n\t\t\tif($token === self::$sessionData['csrf'][$id]){\n\t\t\t\tunset(self::$sessionData['csrf'][$id]);\n\t\t\t\tself::sync();\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "716c68b8ab8e101460195084ea9658eb", "score": "0.6408377", "text": "public function verifyToken(string $token)\n {\n if (!hash_equals($token, $_SESSION['token'])) {\n die(\"Request forgery detected\");\n }\n return true;\n }", "title": "" }, { "docid": "acfa183a21049252a25195c7fa405e46", "score": "0.6380868", "text": "protected function checkToken()\n {\n //Following if used for testimoniallink\n if (!Auth::check())\n {\n if (Input::get('houseid', -1) != -1) {\n $houseid = Input::get('houseid');\n session(['houseid' > $houseid]);\n }\n\n //Check of token\n if (Input::get('remember_token')) {\n $customer = Customer::where('remember_token', Input::get('remember_token'))->first();\n if ($customer)\n {\n Auth::loginUsingId($customer->id);\n return Input::get('redirectTo');\n }\n else {\n session(['redirectTo' => Input::get('redirectTo')]);\n return redirect('\\login')->withInput();\n }\n }\n }\n }", "title": "" }, { "docid": "896626197d1ab226c0b728b8d1586d76", "score": "0.63614154", "text": "public static function check_csrf_token()\n {\n $token = Session::get(self::$csrf_key);\n\n if (count($_POST))\n {\n $post_token = $_POST[self::$csrf_key];\n if ($post_token === NULL)\n {\n return false;\n }\n unset($_POST[self::$csrf_key]);\n\n if (strcmp($token, $post_token) !== 0)\n {\n return false;\n }\n // Compared successfully - clear old token\n $token = NULL;\n }\n\n if ($token === NULL)\n {\n Session::set(self::$csrf_key, self::new_token());\n }\n return true;\n }", "title": "" }, { "docid": "fbbf0643f5a28b260cc4a100131ca486", "score": "0.63507336", "text": "function validate($form_token) {\r\n\t\tif(!isset($_SESSION['security_token'])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// CHECK IF FORM TOKEN IS PRESENT\r\n\t\tif(!isset($form_token)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// COMPARE BOTH TOKENS TO SEE IF THEY MATCH\r\n\t\tif($_SESSION['security_token'] !== $form_token) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "45263ffe50efdd8b8c4a563ebb739ce9", "score": "0.6350314", "text": "public function Token_Exists($token)\n\t{\n\t\t$query = '\n\t\t\tSELECT \n\t\t\t\tcount(*) as cnt \n\t\t\tFROM \n\t\t\t\tcondor_admin.tokens\n\t\t\tWHERE \n\t\t\t\ttoken=\\''.$this->sql->Escape_String($token).'\\'\n\t\t\t AND \n\t\t\t\tcompany_id='.$this->company_id;\n\t\t$res = $this->sql->Query($query);\n\t\t$row = $res->Fetch_Object_Row();\n\t\treturn ($row->cnt == 1);\n\t}", "title": "" }, { "docid": "7d415b717bdc0a9de0c62f145bee009c", "score": "0.6334282", "text": "private function validateTokenField($postData)\n\t{\n\t\tif(array_key_exists('form_token', $postData))\n\t\t{\n\t\t\tif(isset($_SESSION['_token']) && ($_SESSION['_token'] == $postData['form_token']))\n\t\t\t{\n\t\t\t\tunset($_SESSION['_token']); //remove the token once it's been used, making it invalid for reuse\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new SecurityException(\"Invalid token\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new SecurityException(\"Token not set\");\n\t\t}\n\t}", "title": "" }, { "docid": "f361df5e83a8d1e64bfd3a8317aade9a", "score": "0.62749374", "text": "public function hasToken()\n {\n $token = $this->token;\n $expires = $this->tokenExpires;\n if (!empty($expires) && !is_numeric($expires)) {\n $expires = strtotime($expires);\n }\n\n return !empty($token) && time() < $expires;\n }", "title": "" }, { "docid": "84ea558df73bdc35a7edcd63699d354e", "score": "0.626126", "text": "public function mataSessao($token) {\n $conexao = new classeConexao();\n $resultado = $conexao::exec(\"DELETE FROM tb_sessao WHERE tb_sessao_token = '{$token}'\");\n\n unset($_COOKIE['auth']);\n return true;\n }", "title": "" }, { "docid": "3809cc330d05c2dafc43275117ba08e7", "score": "0.6260305", "text": "final public function has(string $token) : bool\n {\n $verifier = $this->hash($token);\n return $this->hasSession($verifier);\n }", "title": "" }, { "docid": "6df82f1054de632ab584b3f7f2fb4d18", "score": "0.6235937", "text": "public function checkToken(string $token) : bool\n {\n try {\n $this->forgetYourPasswordDao->getUserByToken($token);\n } catch (TokenNotFoundException $e) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "9a4cebfb7f24f17d974091a30cbad316", "score": "0.6226503", "text": "public function hasToken(): bool\n {\n $token = $this->getParameter('token');\n\n $expires = $this->getTokenExpires();\n if (!empty($expires) && !is_numeric($expires)) {\n $expires = strtotime($expires);\n }\n\n return !empty($token) && time() < $expires;\n }", "title": "" }, { "docid": "1055bba501cfa745ff3c4dd1dc46e959", "score": "0.6208576", "text": "function f_app_form_id_token_check($arg_form_id_token) \n {\n GLOBAL $session;\n \n //cekojme nese tokeni ekziston -------------------------------------------------------------------------------------------\n $token_count = 0;\n \n $sql = \"SELECT count(*) as token_count \n FROM phi_form_token \n WHERE ID_S = '\".ValidateVarFun::f_real_escape_string($session->Vars[\"uni\"]).\"' AND\n form_id_token = '\".ValidateVarFun::f_real_escape_string($arg_form_id_token).\"'\n \";\n $rs = WebApp::execQuery($sql);\n IF (!$rs->EOF())\n {\n $token_count = $rs->Field(\"token_count\");\n }\n //cekojme nese tokeni ekziston -------------------------------------------------------------------------------------------\n\n IF ($token_count == 1)\n {\n $token_ekziston = \"Y\";\n\n //FSHIME TOKENIN -----------------------------------------------------------------------------------------------------\n $sql_del = \"DELETE \n FROM phi_form_token \n WHERE ID_S = '\".ValidateVarFun::f_real_escape_string($session->Vars[\"uni\"]).\"' AND\n form_id_token = '\".ValidateVarFun::f_real_escape_string($arg_form_id_token).\"'\n \";\n WebApp::execQuery($sql_del);\n //FSHIME TOKENIN -----------------------------------------------------------------------------------------------------\n }\n ELSE\n {\n $token_ekziston = \"N\";\n }\n\n RETURN $token_ekziston;\n }", "title": "" }, { "docid": "fa5e6588f3057dc64b497601596ff877", "score": "0.6207741", "text": "private function _sessionToken() {\n $response = $this->_request($this->config['endpoint'] . '/users/' . $this->config['username'] . '/login', array(\n 'password' => $this->config['password']\n ), array(), 'post');\n if ( $response['status'] != 200 ) { return false; }\n $data = json_decode($response['body'], true);\n if (!$data) { return false; }\n\n $this->session = array(\n 'expires_at' => time() + 3600,\n 'token' => $data['session']\n );\n file_put_contents($this->config['sessionFile'], json_encode($this->session));\n return true;\n }", "title": "" }, { "docid": "0355c70535bf027fd64de6695d433c30", "score": "0.6196379", "text": "function verifyLogin($token, $flaq = true)\n{\n\n if(getUserBySession($token))\n {\n if($flaq)\n {\n modifySessionValidity($token);\n setSessionCookie($token);\n }\n return true;\n }\n else\n {\n popSession($token);\n }\n\n if($flaq)\n {\n destroySessionCookie();\n }\n\n return false;\n}", "title": "" }, { "docid": "714e7640aa0f195f11686264ea2780ba", "score": "0.61892176", "text": "public static function isValid($token) {\n $timeout = (int) Config::get('auth')->jwtExpires;\n Database::executeQuery((new Select(UserToken::$dbTable))->cols('id','timestamp')->where('token','=',$token));\n if ($timeout > 0) {\n if (Database::changed()) {\n $dbToken = Database::fetchOne();\n if (($dbToken['timestamp'] + $timeout) > time()) {\n return true;\n } else {\n Database::executeQuery((new Delete(UserToken::$dbTable))->where('id','=',$dbToken['id']));\n return false;\n }\n } else {\n return false;\n }\n } else {\n return Database::changed();\n }\n }", "title": "" }, { "docid": "a3ce536be6de959981e53907090f45c8", "score": "0.6165063", "text": "function validateCookie($token)\n{\t\n\t$this->deleteExpiredCookies();\n\t$resultsDb = (array)$this->db->select('token')\n\t\t\t\t\t\t\t\t->from('logintoken')\n\t\t\t\t\t\t\t\t->where('token',$token)\n\t\t\t\t\t\t\t\t->get()->row();\n\n\tif(isset($resultsDb['token']) && $resultsDb['token']==$token){\t\t\t\n\t\treturn TRUE;\t\n\t}\n\n\treturn FALSE; //return FALSE if the user is not the same\n\n}", "title": "" }, { "docid": "22cf61ea2d83f032b373a60d5ea7838f", "score": "0.61650145", "text": "public function testVerifyTokenOverSameSessions(): void\n {\n \\session_start();\n\n $provider = new SynchronizerTokenProvider(storageSize: 5);\n $this->assertInstanceOf(SynchronizerTokenProvider::class, $provider);\n\n //genetate a token\n $token = $provider->getToken();\n $this->assertTrue($provider->validate($token));\n\n \\session_write_close();\n\n // restart the session\n \\session_start();\n\n $providerRestartedSession = new SynchronizerTokenProvider(storageSize: 5);\n $this->assertTrue($providerRestartedSession->validate($token));\n\n \\session_destroy();\n }", "title": "" }, { "docid": "f040e3c80e47e0f0a0e469783b3093d4", "score": "0.61498034", "text": "function checkToken($pToken, $pageName, $clearToken = 1) {\n\t$tokenName = $pageName . \"_ptk\";\n\tif($pToken === $_COOKIE[$tokenName] && !empty($_COOKIE[$tokenName]) && !empty($pToken)) {\n\t\tif($clearToken === 1)\n\t\t\tsetCookie($tokenName, \"\");\n\t\treturn TRUE;\n\t}\n\tif($clearToken === 1)\n\t\tsetCookie($tokenName, \"\");\n\treturn FALSE;\n}", "title": "" }, { "docid": "88ef458f5600a90955c2b653e07c0262", "score": "0.6142992", "text": "private function matchAppToken($token=''){\n\t\tif($token!=''){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d6494cf92fa0b6ff2f6ef2cd0cda1920", "score": "0.6137098", "text": "public function verifyToken($token);", "title": "" }, { "docid": "e6a7068001ae7374d671333111a77751", "score": "0.6129903", "text": "function recover_session_by_token($token)\n {\n\t\t$data = openssl_decrypt($token, 'AES-256-CBC', $this->manifest['session_key'], 0, $this->manifest['session_iv']);\n\t\t$data = explode('.', $data);\n if (!isset($data[2])) {\n return false;\n }\n $user_id = $data[1];\n $create_at = $data[2];\n return $this->retrieve_user_data($user_id);\n }", "title": "" }, { "docid": "71ede6a41b0911d0f18d98b6843d0351", "score": "0.611563", "text": "private function deleteToken() {\n\t\t$clientID = (int)$this->app->getClientId();\n\t\ttry {\n\t\t\t$query = \"DELETE FROM #__jmap_google WHERE id = \" . $clientID;\n\t\t\t$this->_db->setQuery ( $query )->execute();\n\t\t\t\n\t\t\t// Store logged in status in session\n\t\t\t$session = JFactory::getSession();\n\t\t\t$session->clear('jmap_ga_authenticate');\n\t\t} catch ( JMapException $e ) {\n\t\t\t$this->app->enqueueMessage ( $e->getMessage (), $e->getErrorLevel () );\n\t\t\treturn false;\n\t\t} catch ( Exception $e ) {\n\t\t\t$jmapException = new JMapException ( $e->getMessage (), 'error' );\n\t\t\t$this->app->enqueueMessage ( $jmapException->getMessage (), $jmapException->getErrorLevel () );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ebda94bc112333c13b8c20eb7820d376", "score": "0.6105906", "text": "function _verificaToken($formulario, $send){\n\t\tif(!isset($_SESSION[CLIENTE][$formulario.'_token'])){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!isset($send) or empty($send)){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(isset($_SESSION[CLIENTE][$formulario.'_token']) and $_SESSION[CLIENTE][$formulario.'_token'] !== $send){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2df5051ef4dbb2d83e2fdcf791e72878", "score": "0.609786", "text": "public function validateRequest()\n {\n if (! isset($this->session[$this->sessionTokenLabel])) {\n // CSRF Token not found\n return false;\n }\n\n if (! empty($this->post[$this->formTokenLabel])) {\n // Let's pull the POST data\n $token = $this->post[$this->formTokenLabel];\n } else {\n return false;\n }\n\n if (! \\is_string($token)) {\n return false;\n }\n\n // Grab the stored token\n if ($this->hmac_ip !== false) {\n $expected = $this->hMacWithIp($this->session[$this->sessionTokenLabel]);\n } else {\n $expected = $this->session[$this->sessionTokenLabel];\n }\n\n return \\hash_equals($token, $expected);\n }", "title": "" }, { "docid": "d2c0c4ee390a214c0c627a1abca8e60d", "score": "0.60922664", "text": "public function testVerifyTokenOverDifferentSessions(): void\n {\n \\session_start();\n\n $provider = new SynchronizerTokenProvider(storageSize: 5);\n $this->assertInstanceOf(SynchronizerTokenProvider::class, $provider);\n\n //genetate a token\n $token = $provider->getToken();\n $this->assertTrue($provider->validate($token));\n\n \\session_destroy();\n\n // start the new session\n \\session_start();\n\n $providerNewSession = new SynchronizerTokenProvider(storageSize: 5);\n $this->assertFalse($providerNewSession->validate($token));\n\n \\session_destroy();\n }", "title": "" }, { "docid": "8246305504587ffc73ddafccb2285e89", "score": "0.6083045", "text": "function check_login() {\r\n\t\tif((isset($_SESSION['token_id']) && !empty($_SESSION['token_id'])) && (isset($_SESSION['name_id']) && !empty($_SESSION['name_id']))) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a7cc95d6c94426faa752b6eb19be4a27", "score": "0.6075802", "text": "public function validateToken($username, $token){\n try {\n $sth = $this->dbh->prepare(\"SELECT COUNT(s.*) AS count FROM session s JOIN user u USING (mid) WHERE u.username=:username AND s.token=:token AND s.expires>NOW()\");\n $sth->bindValue(\":username\", $username);\n $sth->bindValue(\":token\", $token);\n $sth->execute();\n $row = $sth->fetch(\\PDO::FETCH_ASSOC);\n if ( (int)$row['count'] != 1 ){\n return false;\n }\n $sth->closeCursor();\n } catch ( \\PDOException $e ){\n throw new DatabaseException(__CLASS__ . \" \" . __METHOD__ . \" \" . $e->getMessage(), \"20\");\n }\n return true;\n }", "title": "" }, { "docid": "c42b3b67aa079afdb30cfee83754514b", "score": "0.60750884", "text": "public function validateToken(string $token): bool\n\t{\n\t\treturn hash_equals($this->token, $token);\n\t}", "title": "" }, { "docid": "1243f5c5f8c448168a7515a711e8c6f6", "score": "0.606226", "text": "public function validate($token)\n {\n return $token === $this->get();\n }", "title": "" }, { "docid": "ea22760c02ab5d4ce57b0c923f609a51", "score": "0.60586673", "text": "public function logout() {\n\t\tif ($this->isLoggedIn()) {\n\t\t\t$storing = strtolower($this->getProp('authentication', 'storing'));\n\t\t\t\n\t\t\tif ($storing == \"cookie\") {\n\t\t\t\t\n\t\t\t\t$token_id = @$_COOKIE[$this->getProp('cookie', 'token_id', 'name')];\n\t\t\t\t$login_token = @$_COOKIE[$this->getProp('cookie', 'login_token', 'name')];\n\t\t\t\t\n\t\t\t\t// unset cookies\n\t\t\t\tif (!$this->setCookie('login_token', null, -1) || !$this->setCookie('token_id', null, -1))\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t} else if ($storing == \"session\") {\n\t\t\t\t\n\t\t\t\t$token_id = @$_SESSION['token_id'];\n\t\t\t\t$login_token = @$_SESSION['login_token'];\n\t\t\t\t\n\t\t\t\t// destroy session\n\t\t\t\t$this->closeSession(true);\n\t\t\t\t\n\t\t\t} else\n\t\t\t\tthrow new ConfigurationException(\"[authentication] => [storing]\", \"Invalid storing type for login credentials: \".$storing);\n\n\t\t\t// null-check the values\n\t\t\tif ($token_id == null || $login_token == null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t// add row selectors\n\t\t\t$this->db->where(\n\t\t\t\t$this->getProp('table', 'login_tokens', 'col_id'),\n\t\t\t\t$token_id\n\t\t\t);\n\t\t\t\n\t\t\t$this->db->where(\n\t\t\t\t$this->getProp('table', 'login_tokens', 'col_token'),\n\t\t\t\t$login_token\n\t\t\t);\n\t\t\t\n\t\t\t// set logout timestamp\n\t\t\t$r = $this->db->update(\n\t\t\t\t$this->getProp('table', 'login_tokens', 'name'),\n\t\t\t\tarray(\n\t\t\t\t\t'logged_out' => $this->db->now()\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t// if the result is not set, the login token could not be found although the user is logged in\n\t\t\tif (!$r)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4c8148ff16ca267f9fc6e8a24df90bd9", "score": "0.6049539", "text": "function registration_randomizer_is_valid_token($token, $time, $req = null) {\n\t$diff = (int)((time() - $time)/60); // Difference in minute\n\t$cutoff = (int)elgg_get_plugin_setting('reg_token_valid', 'registration_randomizer', 5); // Cutoff in minute\n\n\tif($diff <= $cutoff) {\n\t\treturn $token === registration_randomizer_generate_token($time, $req);\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "26ed93308ac90f294dc4ac46043916b3", "score": "0.6044868", "text": "static public function checkToken($fct=GPC_AJAX, $token='token')\n {\n if(!isset($_REQUEST[$token])) $_REQUEST[$token]='';\n if($fct!='' && !isset($_REQUEST[$fct])) $_REQUEST[$fct]='';\n\n if($_REQUEST[$token]==get_pwg_token()) return(true);\n\n if($fct!='') $_REQUEST[$fct]='';\n return(false);\n }", "title": "" }, { "docid": "4403e71db633797ea9888a074f121e16", "score": "0.603918", "text": "public function hasToken($token)\n\t{\n\t\t$roles = $this->getRoles();\n\t\t\n\t\t// Depending on the active customer or account(s) and the roles the active user /\n\t\t// application has, there are 3 possible ways to check whether the current actor has a token:\n\t\t// [1] The roles do not provide enough information and more specific tokens should be\n\t\t// retrieved. See shouldCheckMyTokens() for more information when this is the case\n\t\t// [2] There are no active account(s), check global or customer-specific tokens\n\t\t// [3] There is at least one active account (but [1] does not hold, check account-specific\n\t\t// tokens\n\t\t\n\t\tif ($this->shouldCheckMyTokens($roles))\n\t\t{\n\t\t\treturn $this->checkMyTokens($token);\n\t\t}\n\t\telseif (!$this->hasAccounts())\n\t\t{\n\t\t\treturn $this->checkNonAccountHasToken($roles, $token);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->checkAccountHasToken($roles, $token);\n\t\t}\n\t}", "title": "" }, { "docid": "04dcf1897663e3dd38cf1e864b75604c", "score": "0.6037188", "text": "function checkSession(){\n\tif(isset($_SESSION['login']) && $_SESSION['login'] == 1) {\n\t\tif(isset($_SESSION['user_id'], $_SESSION['user_name'], $_SESSION['verification_string'])){\n\t\t\t$user_id = $_SESSION['user_id'];\n\t\t\t$verification_string = $_SESSION['verification_string'];\n\t\t\t$user_browser = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t\n\t\t\t$new_ver = hash('sha512', $user_id.$user_browser);\n\t\t\tif($verification_string == $new_ver){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "cb3817e8a43b2bd35b152658e724b955", "score": "0.6030557", "text": "function hasValidToken($user, $device_id, $token) {\n\n\t\t$token_query = \"select authtoken from tokens where user='$user' and device_id='$device_id' and authtoken='$token' and expires >= now()\";\n\t\tif (db_getValue($token_query) != NULL)\n\t\t\treturn TRUE;\n\t\telse\n\t\t\treturn FALSE;\n\n\t}", "title": "" }, { "docid": "b8bf1944d8bebf48d155831e3faea46b", "score": "0.6029402", "text": "public function checkValidSession()\n {\n if ($this->app['session']->get('user')) {\n $this->currentuser = $this->app['session']->get('user');\n if ($database = $this->getUser($this->currentuser['id'])) {\n // Update the session with the user from the database.\n $this->currentuser = array_merge($this->currentuser, $database);\n } else {\n // User doesn't exist anymore\n $this->logout();\n\n return false;\n }\n if (!$this->currentuser['enabled']) {\n // user has been disabled since logging in\n $this->logout();\n\n return false;\n }\n } else {\n // no current user, check if we can resume from authtoken cookie, or return without doing the rest.\n $result = $this->loginAuthtoken();\n\n return $result;\n }\n\n $key = $this->getAuthToken($this->currentuser['username']);\n\n if ($key != $this->currentuser['sessionkey']) {\n $this->app['logger.system']->error(\"Keys don't match. Invalidating session: $key != \" . $this->currentuser['sessionkey'], array('event' => 'authentication'));\n $this->app['logger.system']->info(\"Automatically logged out user '\" . $this->currentuser['username'] . \"': Session data didn't match.\", array('event' => 'authentication'));\n $this->logout();\n\n return false;\n }\n\n // Check if user is _still_ allowed to log on.\n if (!$this->isAllowed('login') || !$this->currentuser['enabled']) {\n $this->logout();\n\n return false;\n }\n\n // Check if there's a bolt_authtoken cookie. If not, set it.\n if (empty($_COOKIE['bolt_authtoken'])) {\n $this->setAuthtoken();\n }\n\n return true;\n }", "title": "" }, { "docid": "2c5ff2226ca8b9af9ea2b534fccf4e08", "score": "0.60281986", "text": "public static function validateToken($token)\n {\n return ($token == config('loap.mock.token'));\n }", "title": "" }, { "docid": "b85476dfe221bcbf69a4551a7577055d", "score": "0.60265625", "text": "public function verify(\\Psecio\\Gatekeeper\\AuthTokenModel $token = null)\n {\n if (!isset($this->data[$this->tokenName])) {\n return false;\n }\n\n if ($token === null) {\n $tokenParts = explode(':', $this->data[$this->tokenName]);\n $token = $this->getById($tokenParts[0]);\n }\n\n if ($token === false) {\n return false;\n }\n\n $user = $token->user;\n $userToken = $token->token;\n\n // Remove the token (a new one will be made later)\n $this->datasource->delete($token);\n\n if (\\Psecio\\Gatekeeper\\Gatekeeper::hash_equals($this->data[$this->tokenName], $token->id.':'.hash('sha256', $userToken)) === false) {\n return false;\n }\n\n $this->setup($user);\n return $user;\n }", "title": "" }, { "docid": "29c282b0ae0ad8cb7603c70a9d3f93ca", "score": "0.6025336", "text": "public function hasToken()\n {\n return isset($_COOKIE[static::CSRF_KEY]);\n }", "title": "" }, { "docid": "70ced0e6987c232a350415c742a25ea5", "score": "0.6024638", "text": "public function isAuthenticated(){\n\t\tif( ISSET($_SESSION[$this->session_string]['access_token']) ){\n\t\t\t# Has an access token but could be expired\n\t\t\tif( ISSET($_SESSION[$this->session_string]['expires']) ){\n\t\t\t\t# Determine if token has expired\n \t$expires = $_SESSION[$this->session_string]['expires'];\n\t $current = time();\n\t if( $expires >= $current ){\n\t $this->token = $_SESSION[$this->session_string]['access_token'];\n\t return TRUE;\n\t } else {\n\t \t# Since token is expired, reset and try again\n\t\t\t\t\t$this->clear_login_state();\n\t \treturn FALSE;\n\t }\n\t\t\t} else {\n\t\t\t\t# No expiration set, so reset and try again\n\t\t\t\t$this->clear_login_state();\n\t\t\t\treturn false;\n\t\t\t}\n }\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b54c38e4bf996f3acc7091b4464263fb", "score": "0.6006137", "text": "public static function validToken($token, $value = '', $skip_anonymous = FALSE) {\n $user = \\Drupal::currentUser();\n return (($skip_anonymous && $user->id() == 0) || ($token == FaqAskHelper::getToken($value)));\n }", "title": "" }, { "docid": "09cbf34e5a3615e5689607e851b69ab4", "score": "0.60001695", "text": "public function checkToken()\n\t{\n\t\t$fromSession = (SpoonSession::exists('csrf_token')) ? SpoonSession::get('csrf_token') : '';\n\t\t$fromGet = SpoonFilter::getGetValue('token', null, '');\n\n\t\tif($fromSession != '' && $fromGet != '' && $fromSession == $fromGet) return;\n\n\t\t// clear the token\n\t\tSpoonSession::set('csrf_token', '');\n\n\t\t$this->redirect(\n\t\t\tBackendModel::createURLForAction(\n\t\t\t\t'index',\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tarray(\n\t\t\t\t 'error' => 'csrf'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "52970bea6d35030c7fd6d83dbc0b2726", "score": "0.5940907", "text": "public function check_valid_token($token)\n {\n $result = $this->ci->auth->check_valid_token($token);\n if ($result) {\n return true;\n }\n redirect(\"v1/expires\");\n }", "title": "" }, { "docid": "339316ddbae6548dffb0123ad4d1859b", "score": "0.5939084", "text": "public function isTokenExist()\n {\n return (bool)$this->getToken();\n }", "title": "" }, { "docid": "6d7b513ccfedc3bc93ac7ec38ae6bb43", "score": "0.59377694", "text": "function check_token($token, $timestamp, $user, $CFG){\r\n\r\n\t//TODO ONLY FOR THE CRIF PILOT\r\n\tinclude($CFG->dir.\"tokenkey.php\");\r\n\r\n\t$key = $KEY->tokenkey;\r\n\t$token_ok = false;\r\n\t$msg = null;\r\n\r\n\r\n\t$right_now = time();\r\n\t$elapsed_time = $right_now - $timestamp;\r\n\r\n\r\n\t//the token should not be older than one hour\r\n\tif ($elapsed_time < -3600) {\r\n\t\t$msg = \"_TOKEN_ERROR_MSG_1_0\";\r\n\t} else if ($elapsed_time > 3600) {\r\n\t\t$msg = '_TOKEN_ERROR_MSG_2_0';\r\n\t} else {\r\n\t\t//let's check if the token was created with the valid key\r\n\t\t$local_token = md5($timestamp . $user . $key);\r\n\t\tif ($local_token != $token) {\r\n\t\t\t$msg = '_TOKEN_ERROR_MSG_3_0';\r\n\t\t} else {\r\n\t\t\t$token_ok = true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn array($token_ok,$msg);\r\n}", "title": "" }, { "docid": "2c7939f55e67b3a6d46359b05fc6b052", "score": "0.5928186", "text": "public function checkTokenStatus()\n { \n $header_details = getallheaders();\n $token_exists = array_key_exists('token', $header_details);\n $token = array_get($header_details, 'token');\n if ((!$token_exists) || (empty($token))) {\n throw new SSOInvalidTokenException();\n }\n //Token field has some value\n $record = $this->client_security_service->getClientSecurityDetails();\n $access_token = $record->token;\n $expired_at = $record->expired_at;\n $security_id = $record->security_id;\n \n if ($token != $access_token) {\n throw new SSOInvalidTokenException();\n }\n \n if (($token == $access_token) && (time() > $expired_at) ){\n throw new SSOTokenExpiredException();\n }\n $this->client_security_service->updateTokenExpirtDate((int)$security_id, time() + 300, time());\n }", "title": "" }, { "docid": "e5533fb75762af0e1600b09a32681f9a", "score": "0.5902679", "text": "public function has_token($token)\n\t{\n\t\t$q = $this->db\n\t\t\t\t ->where('token', $token)\n\t\t\t\t ->limit(1)\n\t\t\t\t ->get($this->table);\n\n\t\tif( $q->num_rows() )\n\t\t\treturn TRUE;\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "71526a723e8ab15182b66db18125caa2", "score": "0.5902403", "text": "protected static function isTokenUnique(DAO $dbc, string $token): bool\n {\n $authentication_table = static::$authenticationTable;\n $reset_token_column = static::$resetTokenColumn;\n $query = \"SELECT COUNT(*) thenum FROM $authentication_table WHERE $reset_token_column = :token\";\n $result = $dbc->query($query, ['params' => [':token' => $token]])->toArray();\n if (count($result) > 0 && $result[0]['thenum'] < 1) return true;\n return false;\n }", "title": "" }, { "docid": "8bc481cc524eaf061141019385a48fe8", "score": "0.5892416", "text": "public function validateToken(string $token) : bool\n {\n if (is_string($cookieToken = $this->getToken()) && is_string($token)) {\n return Hasher::checkHash($cookieToken, $token);\n }\n\n return false;\n }", "title": "" }, { "docid": "eaa5bf09cf9908629b43b9e848410674", "score": "0.5888266", "text": "private static function checkFormTokens() : void\n {\n $expired = false;\n\n if (!isset($_SESSION['token']) || !isset($_POST['f_token'])) {\n $expired = true;\n } elseif ($_SESSION['token'] != $_POST['f_token']) {\n $expired = true;\n } else if (time() - (int)$_SESSION['token_time'] > $_ENV['TOKEN_EXPIRATION_SECONDS']) {\n $expired = true;\n }\n\n // When not an Ajax call render 'bad-tokens' view\n // If it is an Ajax call then return JSON string\n if ($expired === true) {\n if (!self::ajax()) {\n die(View::render('errors/bad-tokens.view'));\n } else {\n die(json_encode([\n 'success' => false,\n 'message' => \"Formulier verlopen, refresh en probeer opnieuw.\",\n ]));\n }\n }\n \n if (isset($_POST['f_token'])) {\n unset($_POST['f_token']);\n }\n }", "title": "" }, { "docid": "9a7b5df126c167d1cbd388c02e0ab413", "score": "0.58782494", "text": "private function checkToken(array $token): bool\n {\n //Est-ce que l'id du token et l'id de l'utilisateur\n //est dans le token ?\n if (!isset($token[\"data\"]->id_user, $token[\"jti\"])) {\n return false;\n }\n\n\n //Est-ce que le token (postman) est enregistré en DB ?\n $db = new MyPDO();\n $sql = \"SELECT id_user FROM login WHERE\n id_user = :id_user AND\n jti = :jti\";\n\n\n $sth = $db->prepare($sql);\n $sth->bindValue(\":id_user\", $token[\"data\"]->id_user, PDO::PARAM_INT);\n $sth->bindValue(\":jti\", $token[\"jti\"], PDO::PARAM_STR);\n $sth->execute();\n\n $res = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n\n //si mon token est en DB, je dis ok, true\n //sinon je dit il ya un problème, false\n if ($sth && $sth->rowCount() == 1) {\n return true;\n\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8deb739cbd03fc784b0098c96192a141", "score": "0.58704597", "text": "public function validaToken() {\n $res = strcmp($this->token, md5(\" \"));\n if ($res == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "a9353b9a53f0c3f9bf69d92b4a807684", "score": "0.5865867", "text": "function delete($name) {\n\t\tif ($this->check($name)) {\n\t\t\tif (in_array($name, $this->watchKeys)) {\n\t\t\t\ttrigger_error(sprintf(__('Deleting session key {%s}', true), $name), E_USER_NOTICE);\n\t\t\t}\n\t\t\t$this->__overwrite($_SESSION, Set::remove($_SESSION, $name));\n\t\t\treturn ($this->check($name) == false);\n\t\t}\n\t\t$this->__setError(2, sprintf(__(\"%s doesn't exist\", true), $name));\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8468bbc60f005f0ff500e06c61bee0c8", "score": "0.58495295", "text": "function token_used($token){\r\n GLOBAL $con;\r\n $sql = \"SELECT token from user_token WHERE token= '\" . $token . \"'\";\r\n $result = mysqli_query($con, $sql);\r\n $row = mysqli_fetch_assoc($result);\r\n if($row){\r\n //token found\r\n return(true);\r\n }\r\n else{\r\n return(false);\r\n }\r\n}", "title": "" }, { "docid": "3a8da2b9eb0ffd12afeadd6b52ac7db8", "score": "0.58482593", "text": "public function checkToken($token, $comment) {\n $value = \\GraphQL\\getCommentEditTokenValue($comment);\n return $token === $value;\n }", "title": "" }, { "docid": "5bb87c1bd4ee4ae1dcca3493fd5a5b7f", "score": "0.5840104", "text": "public function deAuthenticate($token) {\n\t\t$query = $this->getDBConnection()->prepare(\n 'DELETE FROM ' . self::TABLE_TOKEN . ' WHERE token=?');\n\n\t\t$query->bind_param('s', $token);\n\t\t$queryResponse = $query->execute();\n\t\t$query->close();\n\t\t\n\t\tif (!$queryResponse) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f3aaae9b183565a17b614c00a0457fe4", "score": "0.5831727", "text": "public function tokenExists( CanResetPasswordContract $user, $token )\n\t{\n\t\treturn $this->tokens->exists( $user, $token );\n\t}", "title": "" }, { "docid": "6258d1207a36a2d6b44f4829a59ee1c3", "score": "0.5828849", "text": "public function exists(PNToken $token)\n\t{\n\t\t$tokenSignature = serialize($token);\n\n\t\treturn isset($this->tokens[$tokenSignature]);\n\t}", "title": "" }, { "docid": "2efa6026a53fbc38c8a5fef26693b233", "score": "0.5823246", "text": "public function validateCSRFToken(string $token) : bool {\n $valid = hash_equals($_SESSION[\"CSRFToken\"], $token);\n \n if(!$valid){\n $message = MESSAGE_INVALID_CSRF_TOKEN;\n $this->pushOneTimeMessage(USER_ALERT, $message);\n }\n \n return $valid;\n }", "title": "" }, { "docid": "16ca4f13ba359f65d7ff43244714307e", "score": "0.5813799", "text": "public function isSavedTokenReusable(): bool\n {\n $tokenData = $this->getTokenData();\n if ($tokenData === null) {\n return false;\n }\n\n return $this->dateTimeHelper->isWithinPast60Min((int)$tokenData[0]);\n }", "title": "" }, { "docid": "f78fc031c9a49518a7a40e5b4b687879", "score": "0.5813561", "text": "public function deleteToken($token)\n {\n $tokenModel = new \\Psecio\\Gatekeeper\\AuthTokenModel($this->datasource);\n $token = $this->datasource->find($tokenModel, array('token' => $token));\n if ($token !== false) {\n return $this->datasource->delete($token);\n }\n return false;\n }", "title": "" }, { "docid": "3bb3121c3cae830c362a26e524d95f4f", "score": "0.58122236", "text": "private function validateSession()\n {\n if (\n $this->session->get('accessTokenMessenger', '') !== '' && $this->session->get('messengerUrl', '') !== ''\n && !is_null($this->session->get('accessTokenMessenger', '')) && !is_null($this->session->get('messengerUrl', ''))\n && $this->session->get('accessTokenMessengerExpiration', 0) > $this->currentTime + 10\n ) {\n\n $this->accessToken = $this->session->get('accessTokenMessenger');\n $this->messengerUrl = $this->session->get('messengerUrl');\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "908d74fd242309e4da85e148647e1130", "score": "0.58062726", "text": "protected function checkToken($options = array()) {\n\n\t\t// handle expiration\n\t\t$expiration = $this->getSession('access_token_time') + $this->getSession('access_token_expires') - 1;\n\t\tif($expiration != -1 && time() >= $expiration) {\n\t\t\t$this->setSession(null);\n\t\t\treturn $this->login();\n\t\t}\n\n\t\treturn (boolean) $this->getSession('access_token');\n\n\t}", "title": "" }, { "docid": "4fb28bbf40cf3b8631a2871c6ed8ae62", "score": "0.5797668", "text": "function isTokenExist($admin){\n $query = \"Select * from admin_token where admin_token_ref='{$admin}'\" ; \n $res =mysqli_query($this->connection , $query) ;\n $count =mysqli_num_rows($res) ;\n if($count==1){\n return true ;\n }\n return false ; \n }", "title": "" }, { "docid": "880230c04935647f96d993d57e6b3474", "score": "0.57974696", "text": "public function delete()\n\t{\n\t\tparent::delete();\n\t\t$file = $this->getTokenFilePath();\n\t\treturn file_exists($file) && @unlink($file);\n\t}", "title": "" }, { "docid": "a0edd767285e4a7e10260c3bf7eae537", "score": "0.5796054", "text": "public function isStored()\n {\n if (isset($_SESSION['token'])) {\n return true;\n }\n\n return false;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "d9deea11ee4e9db97d361236e7829b84", "score": "0.0", "text": "public function create()\n {\n $teamsId = Team::where('successful', '1')->pluck('employee_id');\n $availableTeams = Employee::whereNotIn('id', $teamsId)->get();\n return view('admin.projects.create')->with('availableTeams', $availableTeams);\n }", "title": "" } ]
[ { "docid": "65c7e51c557119c4523c305976c470bc", "score": "0.80575514", "text": "public function create()\n {\n return view('Admin.acl.resource.form');\n }", "title": "" }, { "docid": "bb87b5e7b03ebf8127b27e4ff14ee77c", "score": "0.7914315", "text": "public function create()\n {\n return view('Backend/Resources/addResource');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "2378dd3b14ed3946fdc33fe245647ae5", "score": "0.75997573", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "ee18d6d904526a51f41375d0bd093040", "score": "0.75147605", "text": "public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "14707811f9cdd58dcd07e882041856bc", "score": "0.74805194", "text": "public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ecbbca86f1ca5794847773f086d5685e", "score": "0.7357543", "text": "public function create()\n {\n return view('backend.client.formcreate');\n }", "title": "" }, { "docid": "e24406181475135438d05ab2d48d4b36", "score": "0.73556155", "text": "public function create()\n\t{\n\t\treturn view('form');\n\t}", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "517ede7d413126a1373684f8f17be2b9", "score": "0.7247568", "text": "public function create()\n {\n return view('clothing.form');\n }", "title": "" }, { "docid": "5016b1af29a2cdfd8f026421109d1142", "score": "0.7241239", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "1e688bba9a7b271c2e7c26eb773383da", "score": "0.72305965", "text": "public function create()\n {\n //\n\n return view(\"student.form\");\n }", "title": "" }, { "docid": "1e47d9942ad3c42b28df121849c0197e", "score": "0.7225282", "text": "public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "fabe91e71192c05e656f9056b41ad668", "score": "0.72117", "text": "public function showCreateForm()\n {\n return view('admin.accounts.create');\n }", "title": "" }, { "docid": "e816b62a64c3324cff6ccbc00e52514b", "score": "0.7202654", "text": "public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }", "title": "" }, { "docid": "a0f86f0603cbb921b500dd4fcb6185e6", "score": "0.71805054", "text": "public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }", "title": "" }, { "docid": "942a0a16c384247567b37ebeddf71971", "score": "0.7151351", "text": "public function create()\n {\n return view('Backend.student.new');\n }", "title": "" }, { "docid": "dc9ff50878e23f55a66dade7c29e9693", "score": "0.71423906", "text": "public function create()\n {\n return view('admin.trucks.forms.create');\n }", "title": "" }, { "docid": "b7f809ca4143f6da6ac8746ef0099f3a", "score": "0.71369606", "text": "public function create()\n {\n return view('backend.students.student-form-add');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.71342736", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "871ecf60820ab50a5032377d975fc622", "score": "0.71342325", "text": "public function create()\n {\n return view('admin.ProviderCreateForm');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71315765", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "1e082bee3084311021ae31460c5c0e39", "score": "0.7127698", "text": "public function create()\n {\n return view('forms.books.create');\n }", "title": "" }, { "docid": "fa54f02550ef87c9f8f5a27d06c382de", "score": "0.71258074", "text": "public function create() {\n return view('resources.edit');\n }", "title": "" }, { "docid": "33732dfef72a6d8b9b06cc792789e6df", "score": "0.71213603", "text": "public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "d70c1ea684023a020e3557813873c2ca", "score": "0.70956016", "text": "public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "a5962b732b317d8491e1cd29bddb79a5", "score": "0.7095086", "text": "public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "4b38db6737bb3fb8f108037fd62385fc", "score": "0.70905846", "text": "public function create()\n {\n return view('enterprise.new');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "0ed27c8268deedd7d778400898a3117f", "score": "0.7051436", "text": "public function create()\n\t{\n return View::make('clerks.create');\n\t}", "title": "" }, { "docid": "991f766d6ac0e5a6f0b81f6a7483c64a", "score": "0.7049206", "text": "public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }", "title": "" }, { "docid": "9954664a9c6b9b3ab69721566e0199bc", "score": "0.7044138", "text": "public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "47df4583b4b1b0f104234ead33b0b361", "score": "0.7041365", "text": "public function create() {\n return view(\"ir.create\");\n }", "title": "" }, { "docid": "23ef4c6aae4638b7258db6105822d281", "score": "0.70397395", "text": "public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }", "title": "" }, { "docid": "7bbb0d78cadef3c44a577d92d50a3e67", "score": "0.70380855", "text": "public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }", "title": "" }, { "docid": "45f9c7429c98bc848636cf3e3af4a0b7", "score": "0.70367175", "text": "public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}", "title": "" }, { "docid": "4d21f7c9cf42b4d85338aca053e91032", "score": "0.70324284", "text": "public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }", "title": "" }, { "docid": "3be30800c76364ece9bf10bfffd9d576", "score": "0.7022247", "text": "public function create()\n {\n return view('penerbit.form');\n }", "title": "" }, { "docid": "5210b9361957c963c05861d35648076b", "score": "0.70178825", "text": "public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }", "title": "" }, { "docid": "804a6ca9dad7489200cc1f28102b0473", "score": "0.7002272", "text": "public function create()\n {\n return view('admin.restaurents.create');\n }", "title": "" }, { "docid": "e3189bc5490f564078b663c86cd3b554", "score": "0.69995284", "text": "public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }", "title": "" }, { "docid": "27a713091aa62f5f81eb6b7a09310814", "score": "0.6997733", "text": "public function create()\n {\n return view('project.form');\n }", "title": "" }, { "docid": "76ecd9f94330c8bff719dad38ac5e742", "score": "0.69919205", "text": "public function create()\n {\n return view('forms.newPoetry');\n }", "title": "" }, { "docid": "75773cfa50c8a890d093cd7b4128f44b", "score": "0.6984025", "text": "public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }", "title": "" }, { "docid": "c3119b97c0e321666818c6fe3e6116b4", "score": "0.697933", "text": "public function create()\n {\n return view($this->viewRoute.'.form');\n }", "title": "" }, { "docid": "7a36d29ededb118e48dc1f2b35700e81", "score": "0.697282", "text": "public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }", "title": "" }, { "docid": "986fd11f3e8bfa985b902a8006b7d306", "score": "0.6968721", "text": "public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "8ced93e50c35698f25fcb388d463e032", "score": "0.6958418", "text": "public function create()\n {\n return view(\"pages.daftar.form\");\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "5225b1fd92184a478b2b9762321d1c23", "score": "0.69497955", "text": "public function create()\n {\n return view('hiperbolica.create');\n }", "title": "" }, { "docid": "593fbba523a02dd32ffe7ecf4fd50435", "score": "0.6946303", "text": "public function create()\n {\n return view('admin.site.form');\n }", "title": "" }, { "docid": "5700bb5603b363af554c788e226eff17", "score": "0.6945535", "text": "public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "12fd2eae40d48367c7e6d8331f5ead34", "score": "0.69429785", "text": "public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}", "title": "" }, { "docid": "c7310471f43f53eaf4b8eff6831b36d3", "score": "0.6939984", "text": "public function create()\n {\n return view('linhas.create');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "6339cf25fff656067a9eaf3d5b7efb2a", "score": "0.6938875", "text": "public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }", "title": "" }, { "docid": "517e8eef100389973418652d54a823b1", "score": "0.69366604", "text": "public function create()\n {\n //no create view as ther create form is on the index page\n }", "title": "" }, { "docid": "9dc7ce932c1b23a833528346de52d671", "score": "0.69311243", "text": "public function create()\n {\n return view('admin.electrician.add');\n }", "title": "" }, { "docid": "a44e07047efd0e153e9c966db5bdabd0", "score": "0.69306445", "text": "public function create()\n {\n return view('dashboard.student.studentForm');\n }", "title": "" }, { "docid": "0b0f0931a087bfbc6677280f914ebfda", "score": "0.69298023", "text": "public function create()\n {\n return view('hocsinh.add');\n }", "title": "" }, { "docid": "8c2948fcee8393ed6a20bf84afb9cc88", "score": "0.6928795", "text": "public function create()\n {\n return view('manage.add');\n }", "title": "" }, { "docid": "1ba5eb9946214bea84f1480b6feabe1f", "score": "0.69276893", "text": "public function create()\n {\n return view('bspyl-form');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "5ed8a37a585288e035b28ed478757c41", "score": "0.6921601", "text": "public function create()\n {\n return view('elonlars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "9a0129f9c2c01a078afcdd438cc75b1f", "score": "0.69172627", "text": "public function create()\n {\n return view('vestiti.form');\n }", "title": "" }, { "docid": "92274cb7faf3de5d13f627815b8f4ba2", "score": "0.69144803", "text": "public function create()\n {\n\n //\n\n return view('addinformation');\n\n }", "title": "" }, { "docid": "8a7c33d5844900cbaaaebde7aa21e4dd", "score": "0.6911652", "text": "public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }", "title": "" }, { "docid": "b43d8bd2e5fa832f2b86d77c64e5ad10", "score": "0.69116175", "text": "public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }", "title": "" }, { "docid": "d6d7c0a46ec7af65d934ca4831a12435", "score": "0.6911027", "text": "public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "d0a17dffa7cd331b95da26311bfaf458", "score": "0.69106084", "text": "public function create()\n {\n return view('backend.actions.create');\n }", "title": "" }, { "docid": "bf90fc181239c9ee309df9b686f918de", "score": "0.69096845", "text": "public function create()\n {\n return view('kontraktor::create');\n }", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "2b077d4213a9e74657f7368e00d5d96e", "score": "0.69072443", "text": "public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}", "title": "" }, { "docid": "8cfed7c03b1c2f9d9fc6996ae61ff1e3", "score": "0.6906446", "text": "public function create()\n {\n return view('admin.users.forms.create');\n }", "title": "" }, { "docid": "12c04608837ced3906ffa6fd0839aefc", "score": "0.6904492", "text": "public function create()\n {\n // return view('formname.create');\n }", "title": "" }, { "docid": "6fe9753acadb65e60f24f2784b8c57e8", "score": "0.6903352", "text": "public function create()\n {\n return view('showCreate');\n }", "title": "" }, { "docid": "be0ad6355f1cd2d306c6632b0178efe9", "score": "0.69000477", "text": "public function create()\n {\n return view('comuni.add');\n }", "title": "" }, { "docid": "1b96ed3b5237de2d9b8b93a0082346de", "score": "0.6898089", "text": "public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}", "title": "" }, { "docid": "c05139fcffc8ed34edf664b1dcababe1", "score": "0.6897515", "text": "public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "8f937ad7c5f9325dd1c12c02346f01a1", "score": "0.6897389", "text": "public function create()\n {\n return view('Job.form');\n }", "title": "" }, { "docid": "c6e630a8785e77f2934d7509a0426ed1", "score": "0.68941396", "text": "public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f8dbbd8eb79b47b7dd8cbe07d9f8aa6c", "score": "0.68926984", "text": "public function create()\n {\n \n return view('falta.create'\n );\n }", "title": "" }, { "docid": "9d3fa77955670de89373a055d00ff3f2", "score": "0.68926096", "text": "public function create()\n {\n return view('terapis.create');\n }", "title": "" }, { "docid": "3ff70187ad516bfc1251de194f42b7f8", "score": "0.6892582", "text": "public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }", "title": "" }, { "docid": "ee157e1835fe293cefd0eceeafc16825", "score": "0.68916535", "text": "public function create()\n {\n return view('question.new');\n }", "title": "" }, { "docid": "eaeda1b26ca65d0dd32dbeb43e442328", "score": "0.6891185", "text": "public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}", "title": "" } ]
6b9ea17da99e7ed007692388d3d87508
Obtiene los datos del usuario
[ { "docid": "3020466e22e63fbd3ea9a14b6b9b21f4", "score": "0.0", "text": "public function get($data){\n $this->db->from('user');\n $this->db->where($data);\n return $this->db->get()->result();\n }", "title": "" } ]
[ { "docid": "e6cf90af150635fe79e4ccdcfc92f356", "score": "0.7566591", "text": "public function getDataUsers(){\n $this->query = 'select * from usuarios';\n $this->get_results_from_query();\n return $this->rows;\n }", "title": "" }, { "docid": "2e3a1df1c03273c2b0b95b3e3ec7b018", "score": "0.75494766", "text": "public function getUsuarios(){\n\t\t$bd = new DBConnection();\n\t\t$conexao = $bd->getConexao();\n\n\t\t$sql = \"select * from usuarios\";\n\t\t$resultado = $conexao->query($sql); //executa a consulta criada\n\n\t\t$usuarios = $resultado->fetchAll(PDO::FETCH_ASSOC);\n\t\t$listaUsuarios = [];\n\t\tforeach ($usuarios as $usuario) {\n\t\t\t$listaUsuarios[] = new Usuario($usuario['id'], $usuario['nome'], $usuario['sobrenome'], $usuario['estado'],\n $usuario['cidadeorigem'],$usuario['datanasc'], $usuario['email'],$usuario['senha'],$usuario['foto']);\n }\n\t\t}", "title": "" }, { "docid": "0ea89a23225000372c052c4a23e06b9f", "score": "0.7434298", "text": "public function getUserData(){\n $sql = \"select * from user where id = \".$this->getId();\n $query = $this->conn->prepare($sql);\n $query->execute();\n $userDbData = $query->fetchAll(PDO::FETCH_OBJ)[0];\n $this->setUserData($userDbData);\n \n }", "title": "" }, { "docid": "909237dfff5f31d20cadcb132aaad1c6", "score": "0.740059", "text": "public function usuarios(){\n\t\t$usuarios = new Usuario();\n\t\t$usuarios->search_clause = '1';\n\t\t$this->usuarios = $usuarios->read('id,email,nombre');\n\t\t$usuariosjson = [];\n\t\tforeach ($this->usuarios as $usuario) {\n\t\t\t$usuario_tmp = null;\n\t\t\t$usuario_tmp->id = $usuario->id; \n\t\t\t$usuario_tmp->email = $usuario->email; \n\t\t\t$usuario_tmp->nombre = $usuario->nombre; \n\t\t\tarray_push($usuariosjson, $usuario_tmp);\n\n\t\t}\n\t\techo json_encode($usuariosjson);\n\t\tif($this->get('id') == 'archivo'){\n\t\t\tfile_put_contents($this->config->document_root.'datos.json',json_encode($usuariosjson));\n\t\t}\n\t}", "title": "" }, { "docid": "9cc2d175f75e3e61bbfa22228ee3e6ca", "score": "0.7371311", "text": "public function getAllUsers() {\r\n $sql_leer = \"SELECT * FROM usuarios\";\r\n $sentencia_leer = $this->db->prepare($sql_leer);\r\n $sentencia_leer->execute();\r\n $resultados = $sentencia_leer->fetchAll(PDO::FETCH_ASSOC);\r\n return $resultados;\r\n }", "title": "" }, { "docid": "cf49de1ccf5da065fff18062fff7ab37", "score": "0.72647786", "text": "public function getUsuarios(){\n $pdo=self::getConexion();\n $sql=\"SELECT * FROM Usuarios\";\n $consulta=$pdo->query($sql);\n $usuarios=$consulta->fetchAll(PDO::FETCH_ASSOC);\n return $usuarios;\n }", "title": "" }, { "docid": "486acd4f3366639d7688a3b945a71948", "score": "0.72052485", "text": "public static function ctrObtenerDatosUser(){\n $tabla = \"udalv_user\";\n $columna = \"id\";\n if(isset($_SESSION[\"idUser\"])){\n $dato = $_SESSION[\"idUser\"];\n }else{\n $dato = null;\n return null;\n }\n $respuesta = ModeloUsuario::mdlObtenerUsuarios($tabla,$columna,$dato);\n return $respuesta;\n }", "title": "" }, { "docid": "51853d98a7bff2aadc441a488205ac94", "score": "0.71504134", "text": "public function DataEnfermera()\n\t\t{\n\t\t\t$aux=new Usuario;\n\t\t\tsession_start();\n\t\t\t$user=$_SESSION['ENFERMERA'];\n\t\t\t$dataUser=$aux->Consultar(\"SELECT nombresCom_usu FROM tbl_usuario WHERE login_usu='$user'\");\n\t\t\t$id=$aux->Consultar(\"SELECT id_esp FROM tbl_usuario WHERE login_usu='$user';\");\n\t\t\t$esp=$aux->Consultar(\"SELECT descripcion_esp FROM tbl_especialida WHERE id_esp='$id';\");\n\t\t\techo \"Bienvenid@: \".$dataUser.\" ;Especialidad: $esp\";\n\t\t}", "title": "" }, { "docid": "f11d54439219c82b76a31b806629fd36", "score": "0.7131447", "text": "private function getAllUsers()\n {\n $em = $this->getDoctrine()->getManager();\n $resu = $this->getDoctrine()\n ->getRepository('AdminBundle:Usuario')\n ->findAll(); \n return $resu;\n }", "title": "" }, { "docid": "16a869a0ae0dc8fd322834b31888bc97", "score": "0.7085516", "text": "public function obtenerUsuarios()\n {\n $datos = $this->Usuario_model->getUsuarios();\n echo $datos;\n }", "title": "" }, { "docid": "62df5ae5819cb9a07b60e20d10de969d", "score": "0.7079666", "text": "function getUsuario(){\n if(!$this->_idUsuario){\n echo 'No existe Id usuario';\n exit;\n }else\n return $this->Consulta('SELECT `id_tipodocumento`, `nombre`, `usuario`, `clave`, `direccion`, `email`, `telefono`, `celular` FROM `usuarios` where id_usuario = '.$this->_idUsuario);\n }", "title": "" }, { "docid": "cb5d8b5b21dc982b021b7825587195ea", "score": "0.7079308", "text": "public function getUsuarios(){\n //return GenericoDAO::EjecutarConsulta($sql);\n $query = \"select usuarios.*, tipo_usuario.nombre as nom_tipo\n\n FROM `usuarios` \n\n INNER JOIN tipo_usuario ON tipo_usuario.pkID=usuarios.fkID_tipo\";\n\n return GenericoDAO::EjecutarConsulta($query);\n }", "title": "" }, { "docid": "ef4eb442f08c07bb1d0a1fa14bcbb14a", "score": "0.7065203", "text": "public function getUsers()\n {\n return $this->db->query(\"SELECT * FROM `usuarios`\")->fetch_all(MYSQLI_ASSOC);\n }", "title": "" }, { "docid": "f5792438ecdeb5ec44e8f294132797a9", "score": "0.705707", "text": "public function showAllUsers(){\r\n $datas = $this->getAllUsers();\r\n //the key (key:value) from this array are = the name of the columns in the MySQL DB I created\r\n foreach($datas as $data){\r\n echo($data['uid'] . \"<br>\");\r\n echo($data['pwd'] . \"<br>\");\r\n }\r\n }", "title": "" }, { "docid": "9a4499f6dfe41841d183145a9c261566", "score": "0.70439035", "text": "public static function TraerTodosLosUsuarios() {\r\n $objetoAccesoDatos = AccesoDatos::dameUnObjetoAcceso();\r\n //Genero la consulta\r\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT * FROM `usuarios`\");\r\n //Ejecuto la consulta\r\n $consulta->execute();\r\n //Casteo los usuario a una variable y la retorno\r\n $usuarios = $consulta->fetchAll(PDO::FETCH_CLASS,\"Usuario\");\r\n return $usuarios;\r\n }", "title": "" }, { "docid": "958ac7139f0a69c31f1934682de16cce", "score": "0.6973581", "text": "public function getUsuarios(){\n\t\t$sql = \"SELECT * FROM usuario WHERE CARGO_idCargo=3 AND ESTADO_idEstado = 9\";\n\t\t$cn = conectar();\n\t\t$res = $cn->query($sql);\n\t\t$cn->close();\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "ea85163a13edb580d8dc59e49ad506eb", "score": "0.6956748", "text": "public function getAll()\n {\n return $this->db->get('usuario')->result();\n }", "title": "" }, { "docid": "e9795134f142e9c4b113e5b9f915f402", "score": "0.6951334", "text": "function carregaUsuario() {\n $tabela = new TabelaModel(\"usuario\", \"id_usuario\", \"nm_usuario\");\n $coluna = $this->adicionaColunaNormal($tabela, \"ID Usuario\", \"id_usuario\", true, TIPO_INPUT_INTEIRO);\n $coluna->setInvisible();\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"txt_email\"), \"email_usuario\", true, TIPO_INPUT_EMAIL);\n $coluna->setDetalhesInclusao(true, false, \"\");\n $coluna = $this->adicionaColunaNormal($tabela, \"Ultimo Acesso\", \"ultimo_acesso_usuario\", false, TIPO_INPUT_DATA);\n $coluna = $this->adicionaColunaNormal($tabela, \"Data Cadastro\", \"dtcadastro_usuario\", true, TIPO_INPUT_DATA);\n $coluna->setDetalhesInclusao(true, false, null);\n\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"txt_username\"), \"nm_usuario\", false, TIPO_INPUT_TEXTO_CURTO);\n $coluna->setDetalhesInclusao(true, true, null);\n $coluna = $this->adicionaColunaNormal($tabela, \"Hit Count\", \"conta_acesso_usuario\", false, TIPO_INPUT_INTEIRO);\n $coluna = $this->adicionaColunaComFK($tabela, translateKey(\"txt_prefered_language\"), \"id_lingua\", false, false, \"lingua\", TIPO_INPUT_SELECT_FK);\n $coluna->setDetalhesInclusao(true, true, LINGUA_EN);\n\n\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"txt_email\"), \"email_usuario_novo\", false, TIPO_INPUT_UNIQUE_EMAIL);\n $coluna->setDetalhesInclusao(true, true, null);\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"txt_email_recover\"), \"email_usuario_recovery\", false, TIPO_INPUT_EMAIL);\n $coluna->setDetalhesInclusao(true, true, null);\n $coluna->setHintKey(\"txt_email_recover_hint\");\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"txt_password\"), \"senha_usuario_novo\", false, TIPO_INPUT_SENHA);\n $coluna->setDetalhesInclusao(true, true, null);\n $coluna = $this->adicionaColunaNormal($tabela, translateKey(\"login_repeat_password\"), \"senha_usuario_repeat\", false, TIPO_INPUT_SENHA);\n $coluna->setDetalhesInclusao(true, true, null);\n\n\n $tabela->setPaginaInclusao(getHomeDir() . \"login/\");\n\n return $tabela;\n }", "title": "" }, { "docid": "2a86c63ac80603535cc721daaaeaaed8", "score": "0.6948051", "text": "public function cargarUsuarios() {\n try {\n if ($_SESSION['posicion'] == 0) {\n $query = $this->db->connect()->prepare('SELECT u.nombre, u.apellido1, u.apellido2 \n FROM usuario u \n INNER JOIN hoja_de_tiempo h ON u.cedula = h.usuario\n WHERE h.estado = 1');\n\n $query->execute();\n }\n else {\n $query = $this->db->connect()->prepare('SELECT u.nombre, u.apellido1, u.apellido2 \n FROM usuario u \n INNER JOIN hoja_de_tiempo h ON u.cedula = h.usuario\n WHERE h.estado = 1 AND u.departamento = :departamento');\n\n $query->execute(['departamento' => $_SESSION['departamento']]);\n }\n\n $nombres = [];\n $nombre = \"\";\n\n while ($registro = $query->fetch(PDO::FETCH_ASSOC)) {\n $nombre = $registro['nombre'] . \" \" . $registro['apellido1'] . \" \" . $registro['apellido2'];\n array_push($nombres, $nombre);\n }\n\n return $nombres;\n }\n catch (PDOException $e) {\n return $e;\n }\n }", "title": "" }, { "docid": "834ca5814ca4e6178f24090f6ccfe95f", "score": "0.6945318", "text": "public function listarUsuarios(){\n $sql = \"SELECT * FROM usuario\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "title": "" }, { "docid": "f8d9d9a2a6c07fa70ca665d21409688a", "score": "0.69175965", "text": "public function datosUsuario($user) {\n $sql = \"SELECT * FROM USUARIOS WHERE USUARIO=\\\"$user\\\"\";\n $resultado = $this->conexion_db->query($sql);\n $datos = $resultado->fetch_all(MYSQLI_ASSOC);\n return $datos;\n }", "title": "" }, { "docid": "d8ca61f291e11e9558661a6610deaa03", "score": "0.6900408", "text": "function getUsers(){\n\n $query = $this->query()->select([\"usuarios.id_usuario\", \"usuarios.nome\", \"usuarios.sobrenome\", \"usuarios.usuario\", \"usuarios.email\", \"nivel_usuario.nivel\", \"DATE_FORMAT(usuarios.data_registro, '%d/%b/%Y %H:%i') AS data\", \"usuarios.id_nivel\"])\n ->innerJoin([\"nivel_usuario\" => \"nivel_usuario.id_nivel = usuarios.id_nivel\"])->order([\"usuarios.data_registro\" => \"DESC\"])->all();\n\n return $query;\n\n }", "title": "" }, { "docid": "c44323ebfad0143bb919417676d54285", "score": "0.68962103", "text": "public function mostrarUsuarios()\n {\n $sql = \"SELECT * FROM Usuario\";\n try {\n $result = $this->conexion->conexion->query($sql);\n $arreglo = array();\n while ($re = $result->fetch_array(MYSQLI_ASSOC)) {\n $arreglo[] = $re;\n }\n //$json=json_encode($arreglo);\n return $arreglo;\n $this->conexion->cerrar();\n } catch (Exception $e) {\n $this->conexion->cerrar();\n }\n }", "title": "" }, { "docid": "1b81c19804670f1f027c62ddbec75745", "score": "0.688677", "text": "public function getAll()\n {\n $stmt = $this->pdo->prepare(\"SELECT * FROM usuarios\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "611ceb2b4970e4690e2d494808cdca9d", "score": "0.6876912", "text": "public function buscaUsuarios(){\n\n\t\t$arrUsuarios = [];\n\n\t\ttry {\n\n\n\t\t\t$con = new PDO(\"mysql:host=localhost;dbname=forum\", \"root\", \"\");\n\n \t\t$resultSet = $con->prepare(\"SELECT id_usuario, \n \t\t\t\t\t\t\t\t\t\t nome,\n \t\t\t\t\t\t\t\t\t\t email,\n \t\t\t\t\t\t\t\t\t\t nickname,\n \t\t\t\t\t\t\t\t\t\t senha,\n \t\t\t\t\t\t\t\t\t\t perfil,\n \t\t\t\t\t\t\t\t\t\t date_format(dataNascimento, '%d/%m/%Y') as dataNascimento,\n \t\t\t\t\t\t\t\t\t\t assinatura,\n \t\t\t\t\t\t\t\t\t\t sexo,\n \t\t\t\t\t\t\t\t\t\t banido,\n \t\t\t\t\t\t\t\t\t\t biografia,\n \t\t\t\t\t\t\t\t\t\t localizacao,\n \t\t\t\t\t\t\t\t\t\t interesse,\n \t\t\t\t\t\t\t\t\t\t ocupacao,\n \t\t\t\t\t\t\t\t\t\t facebook,\n \t\t\t\t\t\t\t\t\t\t linkedin,\n \t\t\t\t\t\t\t\t\t\t twitter,\n \t\t\t\t\t\t\t\t\t\t foto\n \t\t\t\t\t\t\t\t\t FROM tb_usuario\");\n\n\t\t\tif($resultSet->execute()){ // executa o select\n\t\t\t\tif($resultSet->rowCount() > 0){ // consulta retornou mais que 1 registro\n\t\t\t\t\twhile($row = $resultSet->fetch(PDO::FETCH_OBJ)){\n \t\t\t\t\t\t\n \t\t\t\t\t\t// construo o objeto com email e senha\n \t\t\t\t\t\t$userBanir = New Usuario();\n \t\t\t\t\t\t$userBanir->setIdUsuario($row->id_usuario);\n \t\t\t\t\t\t$userBanir->setNome($row->nome);\n\t\t\t\t\t\t$userBanir->setEmail($row->email);\n\t\t\t\t\t\t$userBanir->setNickName($row->nickname);\n\t\t\t\t\t\t$userBanir->setSenha($row->senha);\n\t\t\t\t\t\t$userBanir->setPerfil($row->perfil);\n\t\t\t\t\t\t$userBanir->setDataNascimento($row->dataNascimento);\n\t\t\t\t\t\t$userBanir->setAssinatura($row->assinatura);\n\t\t\t\t\t\t$userBanir->setSexo($row->sexo);\n\t\t\t\t\t\t$userBanir->setBanido($row->banido);\n\t\t\t\t\t\t$userBanir->setBiografia($row->biografia);\n\t\t\t\t\t\t$userBanir->setLocalizacao($row->localizacao);\n\t\t\t\t\t\t$userBanir->setInteresse($row->interesse);\n\t\t\t\t\t\t$userBanir->setOcupacao($row->ocupacao);\n\t\t\t\t\t\t$userBanir->setFacebook($row->facebook);\n\t\t\t\t\t\t$userBanir->setLinkedin($row->linkedin);\n\t\t\t\t\t\t$userBanir->setTwitter($row->twitter);\n\t\t\t\t\t\t$userBanir->setFoto($row->foto);\n\n\t\t\t\t\t\tarray_push($arrUsuarios, $userBanir);\n\n\t\t\t\t}\n } \n }\n\n return $arrUsuarios;\n\n \t}\n \tcatch (Exception $e) {\n \t\tUtil::alerta($e->getMessage());\n \t}\n\n\t}", "title": "" }, { "docid": "3f0b9062ad0073b1fe4fb83e96901eb0", "score": "0.68687654", "text": "public function listar(){\r\n $result= array();\r\n $sql=\"SELECT DISTINCT u.*, r.id_rol FROM usuario u INNER JOIN rol_usuario r \r\n ON r.id_usuario= u.id ORDER BY u.id ASC; \";\r\n $query=$this->con->prepare($sql);\r\n $query->execute();\r\n while ($r=$query->fetch(PDO::FETCH_ASSOC)){\r\n $data = new usuario();\r\n $data->__set('id',$r['id']);\r\n $data->__set('email',trim($r['email']));\r\n $data->__set('nombre',trim($r['nombre']));\r\n $data->__set('apellido',trim($r['apellido']));\r\n $data->__set('rol',$r['id_rol']);\r\n if(isset($r['id_escuela'])){\r\n $data->__set('escuela',$r['id_escuela']);\r\n }else{\r\n $data->__set('ubicacion',$r['id_ubicacion']);\r\n }\r\n $data->__set('status',$r['status']);\r\n $data->__set('fecha_elim',$r['fecha_elim']);\r\n $result[]=$data;\r\n unset($data);\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "cbe0b90940682397b51c107273a7e0bb", "score": "0.686057", "text": "public function getAll(){\n\n\n try {\n $sql = 'SELECT * FROM usuarios WHERE rol = :rol';\n $stmt = $this->con->prepare($sql);\n \n $stmt->execute(['rol' => $this->getRol()]);\n\n $resultado = $stmt->fetchAll();\n\n if($resultado){//si existe un resultado lo recorremos y asignamos a las variables por su getter y setter\n\n return $resultado;\n \n }\n } catch (PDOException $e) {\n\n echo \"Error-002 model-user getAll\".$e->getMessage();\n\n \n\n }\n \n }", "title": "" }, { "docid": "0333712b42ebb8ca87520503fd77fb3e", "score": "0.681055", "text": "public static function getUsers(){\r\n $dados = User::select()->get();\r\n $users = [];\r\n // transformar o resultado em objetos dos models\r\n foreach($dados as $listaUsers){\r\n $viewUsers = new User();\r\n $viewUsers->id = $listaUsers['id'];\r\n $viewUsers->email = $listaUsers['email'];\r\n $viewUsers->name = $listaUsers['name'];\r\n $viewUsers->password = $listaUsers['password'];\r\n $viewUsers->birthdate = $listaUsers['birthdate'];\r\n $viewUsers->city = $listaUsers['city'];\r\n $viewUsers->work = $listaUsers['work'];\r\n $viewUsers->avatar = $listaUsers['avatar'];\r\n $viewUsers->cover = $listaUsers['cover'];\r\n $viewUsers->funcao = $listaUsers['funcao'];\r\n $viewUsers->hour = $listaUsers['hour_login'];\r\n\r\n $users[] = $viewUsers;\r\n }\r\n return $users;\r\n }", "title": "" }, { "docid": "31faa7799222b9cf184594f02009b6f9", "score": "0.67951894", "text": "function BuscarUsuarios() {\n \tglobal $tsCore, $tsUser;\n # Creamos un arreglo para el metodo post!\n $U = array(\n \"id\" => intval($_POST['id']),\n \"usuarios\" => $tsCore->setSecure($_POST['users']),\n \"todos\" => $tsCore->setSecure($_POST['s']),\n );\n # Evitaremos inyecciones de SQL\n $all = $tsCore->setSecure($U['todos']);\n \t$usuarios = $tsCore->setSecure($U['usuarios']);\n # Evitamos que salga nuestro usuario\n $MiId = \"u.user_id != \" . (int)$U['id'];\n # Creamos la sentencia\n\t $sentencia = ($all == 'todos') ? \"u.user_id, u.user_name, u.user_activo, u.user_baneado FROM u_miembros AS u WHERE {$MiId}\" : \"DISTINCT u.user_id, u.user_name, u.user_activo, u.user_baneado FROM u_miembros AS u WHERE {$MiId} AND u.user_name LIKE '%$usuarios%'\";\n\t\t# Ejecutamos la sentencia\n\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', \"SELECT {$sentencia} ORDER BY u.user_id ASC\");\n # Mostramos\n \t$data = ($usuarios == '') ? '' : result_array($query);\n # Devolvemos el campo indicado\n \treturn $data;\n }", "title": "" }, { "docid": "67c1dfe4377582d8fc0f4d9f96d52c88", "score": "0.6793445", "text": "function get_info_usuario($id_usuario)\n {\n\n return $this->db->query(\"SELECT*\n FROM usuarios\n WHERE usuarios.usuario_id = $id_usuario\")->result_array();\n }", "title": "" }, { "docid": "1ea84da0760b1f3a5e78372c6a1a4ee2", "score": "0.6790553", "text": "public function getUsers()\n {\n return $sub = DB::select('select T0.id_emp as idEmp, T0.nombre as nombreEmp, T1.name as name, T1.email as email, T1.id as id from tbl_empresa as T0, users as T1 where T0.id_emp=T1.id_emp and T1.borrado=0', []);\n }", "title": "" }, { "docid": "a4ad25227a42ebed8dc836b775ede05b", "score": "0.6782912", "text": "public function getUsers()\n {\n return self::$database->usuarios;\n }", "title": "" }, { "docid": "aa11105d5a31a6f7f3b4ef611f02dae4", "score": "0.6751546", "text": "function getUsuarios(){\r\n\t\t$usuar = array();\r\n\t\r\n\t\t$conexion = get_conexion();\r\n\t\t$sql = \"SELECT * from usuario\";\r\n\t\r\n\t\t$resultUsuar = mysqli_query($conexion, $sql);\r\n\t\r\n\t\twhile($row = mysqli_fetch_assoc($resultUsuar)){\r\n\t\t\t$usuar[] = $row;\r\n\t\t}\r\n\t\r\n\t\treturn $usuar;\r\n\t}", "title": "" }, { "docid": "ea6eafb37e3b9a009fb3baaad0799a44", "score": "0.6737949", "text": "public function LoadAllUserinfos()\n {\n $table_name = \"users\";\n $columns = \"*\";\n $where = array();\n //$where[] = array(\"column\" => \"zkratka\", \"value\" => \"KIV/DB1\", \"symbol\" => \"=\");\n\n $userinfo = $this->DBSelectAll($table_name, $columns, $where);\n return $userinfo;\n }", "title": "" }, { "docid": "9423df5eb0ff2e9040ec64a606bcfb9a", "score": "0.67269444", "text": "public function obtenerLista() {\n $sql = \"SELECT * FROM USUARIO\";\n if(!$result = mysqli_query($this->con, $sql)) die();\n\t\t\t$usuarios = array();\n\t\t\twhile ($row = mysqli_fetch_array($result)) {\n\n\t\t\t\t$usuarios[] = new Usuario($row[0], $row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7]);\n\t\t\t}\n\t\t\treturn $usuarios;\n\t }", "title": "" }, { "docid": "0401171ac0ac225c34cb6572fc6099f5", "score": "0.67268914", "text": "function getListUsers(): array {\n $connexion = Connect_bdtk::getConnexion();\n $results = $connexion->query(\"SELECT * FROM utilisateur\");\n $results->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE,\n \"User\", array('utilisateur_id', 'utilisateur_mdp',\n 'utilisateur_login', 'utilisateur_mail', 'utilisateur_nom',\n 'utilisateur_prenom', 'utilisateur_adr_num_rue', \n 'utilisateur_adr_cp', 'utilisateur_tel', 'ville_id', 'role_id'));\n $resultats = $results->fetchAll();\n $results->closeCursor();\n Connect_bdtk::disconnect();\n return $resultats;\n }", "title": "" }, { "docid": "8b347a9e28de9d1a19d6192f318071ac", "score": "0.67251146", "text": "public function listar(){\n $db = new Database();\n \n $sqlUsuario = $db->consulta(\"SELECT * FROM Usuario\");\n $arrayUsuario = array();\n while ($row_usuario = mysqli_fetch_assoc($sqlUsuario))\n $arrayUsuario[] = $row_usuario;\n \n $db->desconectar();\n return $arrayUsuario;\n }", "title": "" }, { "docid": "c1f41123323054a0c739bad1b3336801", "score": "0.6705062", "text": "public function getusuario($id) {\n if ($id == null) { \n $dados = $this->estrutura_vazia();\n return $dados; \n } else { \n $groupby = null;\n $where = $this->chaveTabela.'='.$id;\n $orderby = $this->chaveTabela;\n $fields = array('*');\t\t\t\n $dados = $this->read($this->tabusuario, $fields, $where, $groupby, null, null, $orderby);\n return $dados;\n }\n\t}", "title": "" }, { "docid": "e55e07f19af7d280abee9ed0ca4137f8", "score": "0.6692501", "text": "public function getAllUsers(){\n $arrayObjetosUsuarios = [];\n\n $arrayStringUsuarios = explode(PHP_EOL,\"usuarios.php\");\n\n foreach ($arrayStringUsuarios as $stringUsuario) {\n $arrayUsuario = json_encode($stringUsuario);\n $arrayObjetosUsuarios[] = new Usuario($arrayUsuario);\n }\n\n return $arrayObjetosUsuarios;\n }", "title": "" }, { "docid": "56392f83a5bb75c9fce6904045e9f751", "score": "0.66759765", "text": "public function showUsers(){\n $repository = $this->getDoctrine()\n ->getRepository('AppBundle:Utilisateur');\n return $repository->findAll();\n }", "title": "" }, { "docid": "e3cb2f427f7d6a9a5d9c6b6698082767", "score": "0.66750443", "text": "public static function CaricaUtenti()\r\n\t {\r\n $res = array();\r\n\r\n $conn = connect();\r\n \r\n $query = \"SELECT * FROM users\";\r\n\r\n // esegue la quary ed ottiene un ResultSet\r\n $result = $conn->query($query);\r\n\r\n // Se ci sono righe ...\r\n $u = null;\r\n if ($result->num_rows > 0) {\r\n // ... le consumo una alla volta\r\n while($row = $result->fetch_assoc()){\r\n $u = new Utente();\r\n $u->user_id = $row[\"user_id\"];\r\n $u->username = $row['name'] . \" \" . $row['surname'];\r\n $u->email = $row['email'];\r\n $u->password = $row['pwd'];\r\n $res[] = $u;\r\n }\r\n }\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "b75b1f3dafb353dad8cc3da04f538103", "score": "0.6670068", "text": "public function getAll(){\n $request = $this->db->prepare(\"SELECT * FROM user\");\n if($request->execute()){\n $users = [];\n foreach($request->fetchAll() as $selected){\n $user = new User();\n $user\n ->setId($selected[\"id\"])\n ->setUsername($selected[\"username\"]);\n $users[] = $user;\n }\n return $users;\n }\n }", "title": "" }, { "docid": "557b59e1ab6dc5c42b24e04ffd653e62", "score": "0.666024", "text": "protected function retornaUsuariosTodos(){\n try{\n $conecta = new ConexionBD();\n $conecta->getConexionBD()->beginTransaction();\n $sentenciaSQL = \"SELECT * FROM usuarios\";\n $intencio = $conecta->getConexionBD()->prepare($sentenciaSQL);\n $intencio->execute();\n return $resultat = $intencio->fetchAll(PDO::FETCH_OBJ);\n }catch(Exception $excepcio){\n $conecta->getConexionBD()->rollback(); \n return null; \n }\n }", "title": "" }, { "docid": "2cd070c03f97668604d53a367bc71cde", "score": "0.6647143", "text": "public function getRetosUsuario(){ \n return Auth::user()->retos->toJson();\n }", "title": "" }, { "docid": "35e22fe19e6e4a76db9eefaf7d87df39", "score": "0.6641608", "text": "public function userToArray(){\n\t\t$this->userInArray = array(\n\t\t\t'_id' => base64_decode($this->id),\n\t\t\t'username' => $this->username,\n\t\t\t'apellidos' => $this->apellidos,\n\t\t\t'pass' => $this->password,\n\t\t\t'edad' => $this->edad,\n\t\t\t'activado' => $this->activado,\n\t\t\t'codActivacion' => $this->codActivacion,\n 'imgPerfil' => $this->imgPerfil,\n 'lugares' => array(),\n \"admin\" =>$this->admin,\n \"privado\" =>$this->privado\n\t\t\t//'email' => $this->email\n\t\t\t);\n\t}", "title": "" }, { "docid": "a696b928072b6a1818adad6eacacc917", "score": "0.6636477", "text": "public function allUsers(){\n $teste = Usuario::teste();\n return $teste;\n }", "title": "" }, { "docid": "0a8462a656a3fbefb845e80a94d0f6ed", "score": "0.66317636", "text": "public function getUsers()\n {\n $sql = \"SELECT * FROM users\"; \n return $this->getAll($sql);\n }", "title": "" }, { "docid": "cbaaa756961bdabf371f7e8f874f3d41", "score": "0.6629913", "text": "public function getUser(){\n\t\t $this->setRquery(\"SELECT * FROM amistiUser WHERE userID=?\",array($this->UID));\n\t\t\t\t $res = $this->getRquery(); \n\t\t\t\t $this->UID = $res[0]['userID'];\n\t\t\t\t $this->uName = $res[0]['uName'];\n\t\t\t\t $this->fName = $res[0]['fName']; \n\t\t\t\t $this->sName = $res[0]['sName'];\n\t\t\t\t $this->email = $res[0]['email'];\n\t\t\t\t $this->regDate = $res[0]['regTime'];\n\t\t \n\t\t }", "title": "" }, { "docid": "ef9cb7269539cf65e9f39b4df9fe6737", "score": "0.6628112", "text": "public static function getAllUsuarios() {\n $consulta = \"SELECT * FROM usuario\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "460cdb680afb07491f684ff7a5998a8c", "score": "0.6624661", "text": "public function mostrarU()\r\n {\r\n $conexion = new DataSource();\r\n // Conectando y comprobando conexion\r\n if (!$conexion->conectar()) {\r\n echo \"La conexion fallo\";\r\n exit;\r\n } else {\r\n // Variable que contendra objeto DTO\r\n $usuario = null;\r\n // Arreglo que contendra los objetos DTO\r\n $usuarios = array();\r\n // Variable con llamada al procedimiento almacenado\r\n $sql = \"CALL mostrarUser()\";\r\n // Preparando sentencia y evaluando preparacion\r\n if ($stmt = $conexion->preparar($sql)) {\r\n // Ejecutando sentencia\r\n $stmt->execute();\r\n // Vinculando variables a los campos de la tabla\r\n $stmt->bind_result($id, $nombre, $apellido, $direccion, $email, $pass);\r\n // Evaluando existencia de registros e iterando cada uno\r\n while ($stmt->fetch()) {\r\n $usuario = new Usuario();\r\n $usuario->id = $id;\r\n $usuario->nombres = $nombre;\r\n $usuario->apellidos = $apellido;\r\n $usuario->direccion = $direccion;\r\n $usuario->email = $email;\r\n $usuario->password = $pass;\r\n // Agregando el objeto al arreglo personas\r\n array_push($usuarios, $usuario);\r\n }\r\n // Cerrando conexiones y liberando recursos\r\n $stmt->close();\r\n $conexion->desconectar();\r\n // Retornando arreglo\r\n return $usuarios;\r\n } else {\r\n // Cerrando conexiones y liberando recursos\r\n $conexion->desconectar();\r\n echo \"Ocurrio un error al llamar al PS\";\r\n exit;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5c8d54a4c5dfa6e65c7938c84bf8af31", "score": "0.66094947", "text": "function getUsers(){\r\n\t\t$connectService = new ConnectionBDD();\r\n\t\t$connect = $connectService->connect();\r\n\t\t$result = mysql_query(\"select id_user,nom,prenom,path_photo from Utilisateur where path_photo !='' order by nom,prenom\");\r\n\t\t$tab = array();\r\n\t\tfor($i = 0 ; $i < mysql_num_rows($result) ; $i++){\r\n\t\t\t$user = new Data();\r\n\t\t\t$user->addInfo(\"id\",mysql_result($result,$i,0));\r\n\t\t\t$user->addInfo(\"nom\",mysql_result($result,$i,1));\r\n\t\t\t$user->addInfo(\"prenom\",mysql_result($result,$i,2));\r\n\t\t\t$user->addInfo(\"path\",mysql_result($result,$i,3));\r\n\t\t\t$tab[$i] = $user;\r\n\t\t}\r\n\t\t$connectService->close();\r\n\t\treturn $tab;\r\n\t}", "title": "" }, { "docid": "8c6ef5ae8bcc76ea020146c78ecd90a6", "score": "0.66042256", "text": "public function GetUsers() {\n $conn = $this->ConnectToDb();\n $users = array();\n\n $sql = <<<SQL\nSELECT * FROM users\nSQL;\n\n $query = $conn->query($sql);\n while ($row = $query->fetch_assoc()) {\n $user = (object)[];\n foreach ($row as $key => $value) {\n if ($key != 'Password')\n $user->$key = $value;\n }\n array_push($users, $user);\n }\n\n return $users;\n }", "title": "" }, { "docid": "564647ccc186e4fed8a833552bd9843c", "score": "0.6601168", "text": "public function getAll()\n {\n try {\n $data = $this->db->connection();\n $sql = 'SELECT id, name, surname, email FROM users';\n $stmt = $data->prepare($sql);\n if ($stmt->execute()) {\n $result = $stmt->get_result();\n $data = $result->fetch_all();\n $response = [\n 'response' => true,\n 'data' => $data\n ];\n } else {\n $response = [\n 'response' => false,\n 'data' => 'No se puede mostrar los usuarios'\n ];\n }\n $stmt->close();\n return $response;\n } catch (ErrorException $e) {\n $response = [\n 'response' => false,\n 'data' => $e\n ];\n return $response;\n }\n }", "title": "" }, { "docid": "fbfebbf32bf90c0a83c8b5bac89a03b4", "score": "0.6599607", "text": "public function getDataUserId($idUsuario){\n $this->query = \"SELECT persona.nombre,persona.apellido,persona.direccion,usuarios.usuarios,usuarios.idusuarios,usuarios.profile_photo\n FROM usuarios_personas\n INNER JOIN usuarios ON usuarios.idusuarios = usuarios_personas.usuarios_idusuarios\n INNER JOIN persona ON persona.idpersona = usuarios_personas.persona_idpersona\n WHERE usuarios_personas.usuarios_idusuarios = '$idUsuario'\";\n $this->get_results_from_query();\n\n if(count($this->rows) ==2){\n print_r(json_encode($this->rows));\n }else{\n print_r(json_encode(Array(\"Mensaje\"=>\"No existe el usuario con el id \".$idUsuario)));\n }\n }", "title": "" }, { "docid": "4d9bb9aaa30a5552adf3f894d0fe327c", "score": "0.6597359", "text": "public function getUsers(){\n $users = array();\n $result = $this->db->execute('select * from users');\n foreach ($result as $key => $row) {\n $row = $result->fields;\n $users[$row['ipkUserID']]['username'] = $row['strUsername']; \n $users[$row['ipkUserID']]['firstname'] = $row['strFirstName'];\n $users[$row['ipkUserID']]['surname'] = $row['strSurname'];\n $users[$row['ipkUserID']]['enabled'] = $row['bEnabled'];\n }\n return $users;\n\n }", "title": "" }, { "docid": "f59a4fb7b011cffc3454c930f17d9c90", "score": "0.65956914", "text": "public function consultarUsuarios(){\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 eliminar un usuario\n return $resultados = $conexion->query(\"SELECT * FROM usuarios WHERE nickUsuario <> '*****' AND passwordUsuario <> '*****'\");\n\n }\n\n catch(PDOException $e){\n return \"Error: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "f8bd1af0c4e30bf2207a71e033261af1", "score": "0.65866303", "text": "public function users(){\n $db = $this->getPDO();\n $sql = \"SELECT * FROM utilisateurs\";\n $users = $db->query($sql);\n return $users;\n }", "title": "" }, { "docid": "a14be4c1728adacf1ce6e8e6dcf7b22e", "score": "0.65862036", "text": "public static function TraerTodosBD()\n {\n\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n $consulta = $objetoAccesoDato->RetornarConsulta(\"SELECT * FROM usuarios\");\n $consulta->execute();\n $usuarios = $consulta->fetchAll(PDO::FETCH_CLASS, \"Usuario\");\n //$consulta->rowCount();\n return $usuarios;\n }", "title": "" }, { "docid": "a34194b157f707f6ec10526bd3b8b6c3", "score": "0.6585751", "text": "public static function getAllUsers()\n {\n if (!$_SESSION['is_admin']) {\n return [];\n }\n\n $db = new Database();\n $sql = 'SELECT * FROM User';\n $dataset = [\n 'name' => $name\n ];\n\n try {\n $result = $db->execute($sql, $dataset)->fetchAll();\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n\n return $result;\n }", "title": "" }, { "docid": "76d1d782c185285b5a8ed74a53710cc3", "score": "0.65812516", "text": "public function LoadAllUsers(){\n $table_name = \"uzivatele\";\n\n // ukazka podminky\n $where_array = array();\n //$where_array[] = array(\"column\" => \"jmeno\", \"symbol\" => \"=\", \"value\" => \"Admin\");\n\n $uzivatele = $this->DBSelectAll($table_name, \"*\", $where_array);\n //printr($uzivatele);\n\n return $uzivatele;\n }", "title": "" }, { "docid": "093c1d07b9805ae3e20425230671d642", "score": "0.65715116", "text": "private function getUserList(){\n \n $db = new \\classes\\MysqlDB( $this->DB_host, $this->DB_user,\n $this->DB_pw, $this->DB_db,$this->DB_showErrors);\n $q = 'SELECT UserName, Id FROM FK_User ORDER BY UserName';\n\n $users = $db->query_array($q);\n foreach($users as $user){\n $this->userList[]= $user['UserName'];\n }\n \n //var_dump($users);\n }", "title": "" }, { "docid": "dd2f8250f1bff7f3376abefdd0053e5f", "score": "0.65648854", "text": "public function buscar( ){\n\t\t$sql = \"SELECT DISTINCT U.idusuario, U.nombres, U.apellidos, U.usuario, R.idrol, R.nombrerol, CU.claveusuario\n\t\t\t\tFROM usuario U\n\t\t\t\tINNER JOIN usuariofacultad UF ON ( UF.usuario = U.usuario )\n\t\t\t\tINNER JOIN UsuarioTipo UT ON (UT.UsuarioId = U.idusuario)\n INNER JOIN usuariorol UR ON (UR.idusuariotipo = UT.UsuarioTipoId)\n\t\t\t\tINNER JOIN rol R ON ( R.idrol = UR.idrol )\n\t\t\t\tINNER JOIN claveusuario CU ON ( CU.idusuario = U.idusuario )\n\t\t\t\tWHERE U.usuario = ?\n\t\t\t\tAND CU.claveusuario = ?\n\t\t\t\tAND CU.codigoestado = 100\";\n\t\t\t\t\n\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t$this->persistencia->setParametro( 0 , $this->getUser( ) , true );\n\t\t$this->persistencia->setParametro( 1 , $this->getPass( ) , true );\n\t\t//echo $this->persistencia->getSQLListo( );\n\t\t$this->persistencia->ejecutarConsulta( );\n\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t$this->setId( $this->persistencia->getParametro( \"idusuario\" ) );\n\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombres\" ) );\n\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidos\" ) );\n\t\t\t$this->setUser( $this->persistencia->getParametro( \"usuario\" ) );\n\t\t\t\n\t\t\t$rol = new Rol( null );\n\t\t\t$rol->setId( $this->persistencia->getParametro( \"idrol\" ) );\n\t\t\t$rol->setNombre( $this->persistencia->getParametro( \"nombrerol\" ) );\n\t\t\t$this->setRol( $rol );\n\t\t}\n\t\t\n\t\t$this->persistencia->freeResult( );\n\t}", "title": "" }, { "docid": "16c999196d7a341851f7ca98ce643d6c", "score": "0.65444016", "text": "public function showAllUser(){\n return User::select('id', 'name', 'email')->get();\n }", "title": "" }, { "docid": "f40564e08c4528f8aa1a4276c72bc8fb", "score": "0.6542736", "text": "public function verTodos() {\n\n $conn = new FabricaConexoes(\"localhost\", \"root\", \"\");\n $conn->selecionaBaseDados(\"presencadigitaldb\");\n $this->sql = \"select * from tb_usuarios\";\n $this->resultSet = mysql_query($this->sql, $conn->getConexao()) or die(\"Erro ao efetuar consulta. Erro = \".mysql_error());\n while($linha = mysql_fetch_array($this->resultSet)) {\n $usuarios[] = new Usuario($linha['login'], $linha['cpf'], $linha['senha'], $linha['id_usuario']);\n }\n $conn->finalizaConexao($this->resultSet);\n return $usuarios;\n }", "title": "" }, { "docid": "ffdb2ea59ef894d2d8a5e6889fa49656", "score": "0.65389895", "text": "public function listUser(){\n $dbcon = Database::getDb();\n $sql = \"SELECT * FROM users\";\n $pdostm = $dbcon->prepare($sql);\n $pdostm->execute();\n return $pdostm->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "506e058e96e6a1fd8c73730e63269184", "score": "0.6535006", "text": "public function mostrar_todos_usuarios(){\r\n\t\t$this->conectar();\r\n\t\t$pst = $this->conexion->prepare(\"select * from usuario\");\r\n\t\t$pst->execute();\r\n\t\t$resultado = $pst->get_result();\r\n\t\t$pst->close();\r\n\t\t$this->cerrar();\r\n\t\t\r\n\t\treturn $resultado;\r\n\t}", "title": "" }, { "docid": "5cc4bdf25bfa3f13f9b9974af1da9080", "score": "0.6529411", "text": "public function getInfoUsuario()\n {\n \textract($_POST);\n \t//súper acceso a la app\n\t\tif(validaInApp($movil))//esta validación me hará consultas más seguras\n\t\t{\n\t\t\t//$post['idPersona'] \t= $idusuario;\n\t\t\t//busco la foto con la palabra que envien\n\t\t\t$logueo = $this->logicaUsuarios->infoUsuario($idusuario);\n\t\t\techo json_encode($logueo);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$respuesta = array(\"mensaje\"=>\"Acceso no admitido.\",\n \"continuar\"=>0,\n \"datos\"=>\"\"); \n\n echo json_encode($respuesta); \n\t\t}\n }", "title": "" }, { "docid": "b8f7bc5c8dcae190cd7b9416ca5ac79b", "score": "0.6528614", "text": "public function getUserList() {\n $db = $this->dbConnect();\n $req = $db->query(\"SELECT id, username, role, DATE_FORMAT(registrationDate, '%d/%m/%Y at %Hh%imin%ss') AS registrationDate FROM users ORDER BY registrationDate DESC LIMIT 0, 50\");\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE,\n 'App\\Model\\User');\n $users = $req->fetchAll();\n return $users;\n }", "title": "" }, { "docid": "af968fde61cb885153612ab3881241ca", "score": "0.6521302", "text": "function getAllUser() {\n $sql = \"SELECT FirstName,LastName,EmailId,ContactNumber,BDate,EName,ERelation,EContact,RType,AEmailId,RollNo,Image FROM tblusers ORDER BY id\";\n $result = $this->db_handle->runBaseQuery($sql);\n return $result;\n }", "title": "" }, { "docid": "38ec0dfffe32ee180fcd693f34efb31b", "score": "0.65199393", "text": "public function pullUserData()\n {\n // Make the query\n $q = \"SELECT first_name, last_name, role, city, state, zipcode,\n sex, email, pass, registration_date, birth_date,\n phone_num, digoro_score, invited, default_teamID,\n login_before\n FROM users\n WHERE id_user = {$this->_id}\n LIMIT 1\";\n \n // Execute the query and store the result\n $result = $this->_dbObject->getRow($q);\n\n // Found result\n if($result !== false) {\n $this->setUserAttributes($result['first_name'], $result['last_name'],\n $result['role'], $result['city'],\n $result['state'], $result['zipcode'],\n $result['sex'], $result['email'], $result['pass'],\n $result['registration_date'], $result['birth_date'],\n $result['phone_num'], $result['digoro_score'],\n $result['invited'], $result['default_teamID'],\n $result['login_before']);\n }\n\n }", "title": "" }, { "docid": "963541340387a5531d531ccbb33186d2", "score": "0.6512093", "text": "public function getUsersData() {\n // Get all classes from Model's scope\n $users = User::getAllData();\n // var_dump($users->first()->userDetail); die();\n\n // Begin constructing data for datatables\n $datatable = DatatablesCustom::of($users);\n $datatable->remove_column('id');\n $datatable->edit_column('full_name', function($obj) {\n if ($obj->userDetail->gender == \"male\")\n $honorifics = \"Mr.\";\n else\n $honorifics = \"Mrs.\";\n\n $name = ucwords(strtolower($obj->full_name));\n return $honorifics.\" \".$name;\n });\n $datatable->edit_column('action', function($obj) {\n $ret = '<a href=\"' . URL::route('users.edit', array($obj->id)) . '\"><i class=\"glyphicon glyphicon-pencil\"></i></a>\n &middot;\n <a href=\"javascript:void(0);\" data-toggle=\"modal\" data-target=\"#modal-delete\" data-id=\"' . $obj->id . '\" data-title=\"users\" data-preview=\"' . $obj->full_name . '\">\n <i class=\"text-danger glyphicon glyphicon-trash\"></i>\n </a>';\n return $ret;\n });\n return $datatable->make();\n }", "title": "" }, { "docid": "195ea28088dbf4e180f00deafa5560dc", "score": "0.65103316", "text": "public function readSesiones()\n {\n $sql = 'SELECT plataforma, fecha_hora, usuarios.usuario\n FROM historial_usuarios INNER JOIN usuarios USING(id_usuario)\n WHERE id_usuario = ?\n ORDER BY fecha_hora desc;';\n $params = array($_SESSION['id_usuario']);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "1698490ee02433e40d14bf5524ec39a3", "score": "0.65085244", "text": "function searchAll() {\n $oAccesoDatos = new AccesoDatos();\n $query = \"\";\n $result = null;\n $fila = null;\n $j = 0;\n $oUsu = null;\n $arrUsuarios = null;\n if ($oAccesoDatos -> conectar()) {\n $query = \"SELECT id, username, first_name, last_name, name, birthday, gender, email, date_register, qty_votes, place\n\t\t\t\tFROM jb_user\";\n $result = $oAccesoDatos -> ejecutarConsulta($query);\n $oAccesoDatos -> desconectar();\n if ($result) {\n foreach ($result as $fila) {\n $oUsu = new User();\n\n $oUsu -> setId($fila[0]);\n $oUsu -> setUsername($fila[1]);\n $oUsu -> setFirstName($fila[2]);\n $oUsu -> setLastName($fila[3]);\n $oUsu -> setName($fila[4]);\n $oUsu -> setBirthday($fila[5]);\n $oUsu -> setGender($fila[6]);\n $oUsu -> setEmail($fila[7]);\n $oUsu -> setDateRegister($fila[8]);\n $oUsu -> setQtyVotes($fila[9]);\n $oUsu -> setPlace($fila[10]);\n \n $arrUsuarios[$j] = $oUsu;\n $j = $j + 1;\n }\n }\n }\n return $arrUsuarios;\n }", "title": "" }, { "docid": "37d5c2e5f32a996584a2eb479fe0b646", "score": "0.650046", "text": "public function readUser();", "title": "" }, { "docid": "7b6ae8db657429058c92179002aa3de8", "score": "0.6499726", "text": "public function obtenerTodosUsuarios() {\n \t$aResultados;\n \t$select = 'DISTINCT UsuarioDescarga';\n \t$from = DB_APP.DB_PREFIJO.'DescargasContratos';\n \t$order = 'ORDER BY UsuarioDescarga ASC';\n \t$aUsuarios = $this->consulta($select, $from, '', $order);\n\t\tif (is_array($aUsuarios)) {\n\t\t\t$jsonUsuarios = array();\n\t\t\tforeach ($aUsuarios as $d) {\n\t\t\t\t$jsonUsuarios[] = array(\n\t\t 'id' => $d['UsuarioDescarga'],\n\t\t 'value' => ucfirst($d['UsuarioDescarga'])\n\t\t );\n\t\t\t}\n\t\t\t$aResultados[] = array('jsonUsuarios' => $jsonUsuarios);\n\t\t\treturn json_encode($aResultados);\n\t\t} else {\n\t\t\treturn 'false';\n\t\t}\n }", "title": "" }, { "docid": "e64728fef347da431565c823e461caaf", "score": "0.64970744", "text": "function detalleUsuarios() {\n\trequire_once('conexion.php');\n\t$conexion = new Conexion();\n\t$conexion->conectarBD();\n\t$query = $conexion -> getConexion() -> query(\"SELECT id, username, rol FROM usuario\");\n\t$conexion->desconectarBD();\n\treturn $query->fetchAll();\n}", "title": "" }, { "docid": "9f6c29b9ed6c678b28b7100c99bc02a7", "score": "0.64970094", "text": "function obtenerDatos($nombreUsuario){\r\n $con = new Conexion();\r\n $sql = \"SELECT *FROM Usuarios WHERE Nombre_Usuario = '$nombreUsuario'\";\r\n $datos = $con->consulta($sql);\r\n return $datos[0];\r\n }", "title": "" }, { "docid": "cf97c7ef0bb655863bdac22a673698ae", "score": "0.6494447", "text": "function getAllUser() :array {\n \n $sql = \"SELECT \n `user_id`,\n `is_user_admin`, \n `user_firstname`, \n `user_lastname`, \n `user_email`, \n `user_password`\n FROM \n `users` \n ORDER BY \n `users`.`user_id` ASC\";\n $query = $this->pdo->prepare($sql);\n $query->execute(); \n \n return $query->fetchAll(PDO::FETCH_ASSOC);\n \n }", "title": "" }, { "docid": "791b1ea7c02a14f1fa7041cc4f1e6925", "score": "0.64943284", "text": "private function populateUserData()\n {\n $query = '\n SELECT\n u.`id`,\n u.`full_name`,\n u.`password`,\n u.`old_password`,\n r.`name` as `role`,\n p.`action`,\n p.`resource`\n FROM users AS `u`\n INNER JOIN roles AS `r` ON u.`role_id` = r.`id`\n LEFT JOIN role_permissions AS `rp` ON rp.`role_id` = r.`id`\n LEFT JOIN permissions AS `p` ON rp.`permission_id` = p.`id`\n WHERE u.`id` = ?\n ';\n\n $user = $user = DB::select($query, [$this->auth->user()->id]);\n\n if($user){\n $this->role = $user[0]->role;\n $this->full_name = $user[0]->full_name;\n if($user[0]->action){\n foreach($user as $userPermission){\n if(!isset($this->permissions[$userPermission->resource]))\n $this->permissions[$userPermission->resource] = [];\n\n $this->permissions[$userPermission->resource][] = $userPermission->action;\n }\n }\n }else{\n Log::error('Houston We have a problem!!');\n }\n }", "title": "" }, { "docid": "765f1c71473d661cbb17fa31b93c73c3", "score": "0.64931023", "text": "public function getUsers() {\n\t\t$users = array();\n\t\t$q = $this->bdd->prepare('SELECT * FROM users ORDER BY profil_id DESC, lastname');\n\t\t$q->execute();\n\t\twhile ($data = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$users[] = new User($data);\n\t\t}\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "2ff13391c2c0525db305b0ebaa07ee3f", "score": "0.64901865", "text": "function consultar_usuario(){\n\t\t$pdo= Conexion::Abrirbd();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n\t\t$sql=\"SELECT * FROM usuario\";\n\n\t\t$query=$pdo->prepare($sql);\n\t\t$query->execute();\n\t\t$result=$query->fetchALL(PDO::FETCH_BOTH);\n\n\t\tConexion::Cerrarbd();\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "69c623f1dbf2c6fcb4535d60af944b4b", "score": "0.6489195", "text": "public function tampil()\n {\n $this->query(\"SELECT id_user,nama_user,email_user,jabatan_user,username,tipe_user FROM $this->tabel_user\");\n $this->stmt->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "b73ce3f87fdcac35548b9ee7f91dce15", "score": "0.64887136", "text": "public function iniciar()\n { \n $email = $this->input->post(\"email\");\n $pass = $this->input->post(\"pass\");\n $pass = sha1($pass);\n \n $this->db->where(array(\n \t\"email\" => $email,\n \t\"pass\" => $pass\n ));\n\n $query = $this->db->get('usuarios');\n\n if($query->num_rows() == 1)\n {\n \n \t/*\n\t\t\t\tObtener datos personales.\n \t*/\n $sql = \"SELECT * FROM datos_personales WHERE email='$email'\";\n $query = $this->db->query($sql);\n $result = array_shift($query->result_array());\n \n $array = array(\n \"logged\" => true,\n \"id\" => $result[\"usuario\"],\n \"email\" => $result[\"email\"],\n \"agencia\" => $result[\"agencia\"],\n \"constructora\" => $result[\"constructora\"],\n \"nombre\" => $result[\"nombre\"],\n \"telefono\" => $result[\"telefono\"],\n \"acerca\" => $result[\"acerca\"],\n \"twitter\" => $result[\"twitter\"],\n \"facebook\" => $result[\"facebook\"],\n \"google\" => $result[\"google\"],\n \"linkedin\" => $result[\"linkedin\"]\n );\n \n \t/*\n\t\t\t\tObtener id de tipo de usuario\n\t\t\t\ty tipo de membresía.\n \t*/\n $id = $array[\"id\"];\n $sql = \"SELECT * FROM usuarios WHERE id='$id'\";\n $query = $this->db->query($sql);\n $result = array_shift($query->result_array());\n\n $array = array_merge($array,\n \tarray(\n \t\t\"tipo\" => $result[\"tipo\"],\n \t\t\"pack\" => $result[\"pack\"],\n \t\t\"verificado\" => $result[\"verificado\"]\n \t)\n );\n \n \t/*\n\t\t\t\tObtener string de tipo de usuario\n\t\t\t\tsegún el id indicado.\n \t*/\n $id = $array[\"tipo\"];\n $sql = \"SELECT * FROM tipos_usuario WHERE id='$id'\";\n $query = $this->db->query($sql);\n $result = array_shift($query->result_array());\n $array[\"tipo\"] = $result[\"tipo\"];\n \n \t/*\n\t\t\t\tIniciar datos de sesión y\n\t\t\t\tredireccionar al perfil de usuario.\n \t*/\n $this->session->set_userdata($array);\n redirect('perfil');\n\n } else {\n $this->load->view(\"error-login\");\n }\n\t}", "title": "" }, { "docid": "b1fbbe7c37090e90ae1f86c89fc563e4", "score": "0.64857185", "text": "function obtenerUsuario($row){\n $user = new Usuario();\n $user->setId($row['IDUsuario']); //Añadimos ID\n $user->setNick($row['Nick']); //Añadimos Nick\n $user->setName($row['NombreUsuario']); //Añadimos Nombre\n $user->setPass($row['Pass']);\n\n return $user;\n}", "title": "" }, { "docid": "ab7b74621bf2d2e7483c3a63f83c005e", "score": "0.6483497", "text": "public function getAllUsers() \n { \n $data = $this->entityManager->getRepository(Users::class)->findBy(array(),array('id' => 'DESC'));\n return $data;\n }", "title": "" }, { "docid": "9cf2c31114e7a039b56cebd81b06296e", "score": "0.647834", "text": "public function obtenerUsuarios()\r\n {\r\n // Preparamos la consulta.\r\n $stmt = self::$_mysqli->prepare(\"select nombre, apellidos from amadeus_usuarios\") or die(self::$_mysqli->error);\r\n\r\n // Ejecutamos la consulta.\r\n $stmt->execute();\r\n\r\n // Almacenamos el resultado.\r\n $stmt->store_result();\r\n\r\n // Vinculamos las variables para el recordset.\r\n $stmt->bind_result( $nombre, $apellidos);\r\n\r\n\r\n $cadena='<table border=\"1\"><tr><th>Nombre</th><th>Apellidos</th></tr>';\r\n // Leemos la fila del recordset\r\n while($stmt->fetch())\r\n {\r\n $cadena.='<tr><td>'.$nombre.'</td><td>'.$apellidos.'</td></tr>';\r\n }\r\n $cadena.='</table>';\r\n\r\n\r\n // Liberamos el espacio ocupado por el recordset\r\n $stmt->free_result();\r\n\r\n //Devolvemos la cadena\r\n return $cadena;\r\n }", "title": "" }, { "docid": "7bf15b0c8ac6ff3e41f11a5e8f2096aa", "score": "0.6469705", "text": "private function _getUsers() {\n \n //Role Super Admin get all user\n if ($this->session_data->role == 1) {\n $user = new User();\n return $user->where('status', 'A')->get();\n }\n \n //Role Admin get all user\n if ($this->session_data->role == 2) {\n $user = new User();\n return $user->where(array('role_id <>' => 1, 'status' => 'A'))->get();\n }\n \n //Role Rector\n if ($this->session_data->role == 3) {\n $array = array();\n \n $academy = new Academy();\n \n //Get related Rector of Rector\n $array[] = $academy->getRelatedRectorsByRector($this->session_data->id);\n \n $school = new School();\n \n //Get related Deans of Rector\n $array[] = $school->getRelatedDeansByRector($this->session_data->id);\n \n $class = new Clan();\n \n //Get related Teacher of Rector\n $array[] = $class->getRelatedTeachersByRector($this->session_data->id);\n \n $user_detail = new Userdetail();\n \n //Get related Students of Rector\n $array[] = $user_detail->getRelatedStudentsByRector($this->session_data->id);\n \n $user = new User();\n \n //convert multi array to single and from that get unique id details\n return $user->getUsersDetails(array_unique(MultiArrayToSinlgeArray($array)));\n }\n \n //Role Dean\n if ($this->session_data->role == 4) {\n $array = array();\n \n $academy = new Academy();\n \n //Get related Rector of Dean\n $array[] = $academy->getRelatedRectorsByDean($this->session_data->id);\n \n $school = new School();\n \n //Get related Dean of Dean\n $array[] = $school->getRelatedDeansByDean($this->session_data->id);\n \n $class = new Clan();\n \n //Get related Teacher of Dean\n $array[] = $class->getRelatedTeachersByDean($this->session_data->id);\n \n $user_detail = new Userdetail();\n \n //Get related Student of Dean\n $array[] = $user_detail->getRelatedStudentsByDean($this->session_data->id);\n \n $user = new User();\n \n //convert multi array to single and from that get unique id details\n return $user->getUsersDetails(array_unique(MultiArrayToSinlgeArray($array)));\n }\n \n //Role Teacher\n if ($this->session_data->role == 5) {\n $array = array();\n \n $academy = new Academy();\n \n //Get related Rector of Teacher\n $array[] = $academy->getRelatedRectorsByTeacher($this->session_data->id);\n \n $school = new School();\n \n //Get related Dean of Teacher\n $array[] = $school->getRelatedDeansByTeacher($this->session_data->id);\n \n $class = new Clan();\n \n //Get related Teacher of Teacher\n $array[] = $class->getRelatedTeachersByTeacher($this->session_data->id);\n \n $user_detail = new Userdetail();\n \n //Get related Student of Teacher\n $array[] = $user_detail->getRelatedStudentsByTeacher($this->session_data->id);\n \n $user = new User();\n \n //convert multi array to single and from that get unique id details\n return $user->getUsersDetails(array_unique(MultiArrayToSinlgeArray($array)));\n }\n \n //Role Student\n if ($this->session_data->role == 6) {\n $array = array();\n \n $academy = new Academy();\n \n //Get related Rector of Student\n $array[] = $academy->getRelatedRectorsByStudent($this->session_data->id);\n \n $school = new School();\n \n //Get related Dean of Student\n $array[] = $school->getRelatedDeansByStudent($this->session_data->id);\n \n $class = new Clan();\n \n //Get related Teacher of Student\n $array[] = $class->getRelatedTeachersByStudent($this->session_data->id);\n \n $user_detail = new Userdetail();\n \n //Get related Student of Student\n $array[] = $user_detail->getRelatedStudentsByStudent($this->session_data->id);\n \n $user = new User();\n \n //convert multi array to single and from that get unique id details\n return $user->getUsersDetails(array_unique(MultiArrayToSinlgeArray($array)));\n }\n }", "title": "" }, { "docid": "21430a6d5bb3eb45b3c57cb259328f17", "score": "0.64681053", "text": "public function CargarDatosById(){\n try{\n /**verificamos session*/\n if(\\utilidades::verifySessionRol(__NAMESPACE__) != null){\n return \\utilidades::verifySessionRol(__NAMESPACE__);\n }\n \n $arrResponse = new \\stdClass();\n \n /**consultamos la tabla users*/\n $objFacUsers = new \\facUsers();\n $arrDUSers = $objFacUsers->getUsers(array(\n 'id||=||'.\\Auth::user()->id\n ));\n if(count($arrDUSers)==0){\n throw new \\Exception(\"no existen los datos del usuario --> \".\\Auth::user()->id);\n }\n \n /**consultamos la tabla account data***/\n $objFacAccountData = new \\facAccountData();\n $arrDAccountData = $objFacAccountData->getAccountData(array(\n 'users_id||=||'.$arrDUSers[0]->id\n ));\n if(count($arrDAccountData)==0){\n throw new \\Exception(\"no existen los datos del usuario en account data --> \".\\Auth::user()->id);\n }\n \n /**consultamos la tabla account data communications**/\n $arrDAccDatComm = $objFacAccountData->getAccountDataCommunications(array(\n 'account_data_id||=||'.$arrDAccountData[0]->id\n ));\n if(count($arrDAccDatComm)==0){\n throw new \\Exception(\"no existen los datos del usuario en account data communications --> \".\\Auth::user()->id);\n }\n \n $arrResponse->rows[0] = new \\stdClass();\n \n $arrResponse->rows[0]->email_account = $arrDUSers[0]->email;\n $arrResponse->rows[0]->active = $arrDUSers[0]->active;\n \n $arrResponse->rows[0]->first_name_account = $arrDAccountData[0]->first_name;\n $arrResponse->rows[0]->first_middle_name_account = $arrDAccountData[0]->middle_name;\n $arrResponse->rows[0]->last_name_account = $arrDAccountData[0]->last_first_name;\n $arrResponse->rows[0]->last_middle_name_account = $arrDAccountData[0]->last_middle_name;\n \n $arrResponse->rows[0]->email_notification_1_account = $arrDAccDatComm[0]->email_notification_1;\n $arrResponse->rows[0]->email_notification_2_account = $arrDAccDatComm[0]->email_notification_2;\n $arrResponse->rows[0]->phone_number_1_account = $arrDAccDatComm[0]->phone_number_1;\n $arrResponse->rows[0]->phone_number_2_account = $arrDAccDatComm[0]->phone_number_2;\n $arrResponse->rows[0]->phone_number_mobile_1_account = $arrDAccDatComm[0]->phone_number_mobile_1;\n $arrResponse->rows[0]->phone_number_mobile_2_account = $arrDAccDatComm[0]->phone_number_mobile_2;\n $arrResponse->error = false;\n return \\Response::json($arrResponse);\n } catch (\\Exception $ex) {\n throw $ex;\n }\n }", "title": "" }, { "docid": "9bd635f84c381335d594e86ef3fc82a6", "score": "0.64630514", "text": "public function getUsers()\n {\n $query = \"SELECT {$this->tableColumns['id']} as id,\n {$this->tableColumns['username']} as name,\n {$this->tableColumns['password']} as password\n FROM {$this->usersTableName}\";\n $res = array();\n if ($rows = $this->getDb()->query($query)) {\n foreach ($rows as $row) {\n $res[] = (object) array(\n 'id' => $row['id'],\n 'name' => $row['name'],\n 'password' => $row['password'],\n );\n }\n }\n return $res;\n }", "title": "" }, { "docid": "f3ba0aba8930885bd6842cb0e0269d4e", "score": "0.6462922", "text": "public static function obtener_todos($Conexion) {\n\n $usuarios = array();\n\n if (isset($Conexion)) {\n\n try {\n include_once 'Usuario.inc.php';\n $sql = 'SELECT * FROM unexpoweb.usuarios';\n\n $sentencia = $Conexion->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll();\n\n if (count($resultado)) {\n foreach ($resultado as $fila) {\n $usuarios[] = new Usuario(\n $fila['id'], $fila['cedula'], $fila['expediente'], $fila['password'], $fila['email'], $fila['fecha_registro'], $fila['activo']\n );\n }\n } else {\n print (\"No hay usuarios\");\n }\n } catch (Exception $ex) {\n print \"Error\" . $ex->getMessage();\n }\n }\n return $usuarios;\n }", "title": "" }, { "docid": "e84d973ab1cf3f28d1f16af0a08700c4", "score": "0.64619845", "text": "public function consultarUsuario($idUsuario = NULL)\n {\n $datosUsuario = NULL;\n\n $consulta = \"SELECT * FROM usuario\";\n\n if (isset($idUsuario)) {\n $consulta .= \" WHERE id_usuario = $idUsuario\";\n\n $resultado = pg_query($consulta);\n\n $datosUsuario = pg_fetch_assoc($resultado);\n\n /**\n * Llenando el objeto usuario.\n */\n $this->idUsuario = $datosUsuario['id_usuario'];\n $this->idEmpleado = $datosUsuario['id_empleado'];\n $this->idTipoUsuario = $datosUsuario['id_tipo_usuario'];\n $this->fechaRegistro = $datosUsuario['fecha_registro'];\n $this->login = $datosUsuario['login'];\n $this->clave = $datosUsuario['clave'];\n $this->activo = $datosUsuario['activo'];\n }\n else {\n $consulta .= \" ORDER BY id_usuario\";\n\n $resultado = pg_query($consulta);\n\n $datosUsuario = pg_fetch_all($resultado);\n }\n\n /**\n * Retornando array de datos por si se desea utilizar de otra forma.\n */\n return $datosUsuario;\n }", "title": "" }, { "docid": "e5b94f72b6440efb8d9a263147dfb123", "score": "0.6461639", "text": "public static function getAllUsers(){\r\n $users[]=array();\r\n $conn=DBUtil::getConnection();\r\n $sql=\"select * from tb_user\";\r\n $result = $conn->query($sql);\r\n if ($result->num_rows > 0) {\r\n while($row = $result->fetch_assoc()){\r\n $user=self::fillUser($row);\r\n $users[]=$user;\r\n }\r\n }\r\n $conn->close();\r\n return $users;\r\n }", "title": "" }, { "docid": "0588a0e21bf1dc5a262d574338c85138", "score": "0.64612913", "text": "public function getUsuario(){\n echo \"<br>Mostrar Usuario: \".$this->name;\n }", "title": "" }, { "docid": "fa0d7d15d4e53750623f346cd502fa97", "score": "0.6460371", "text": "public function listarusuario(){\n\t\t\t$usuario = User::all();\n\t\t\treturn View::make('User.listarusuarios', array('datos' => $usuario));\n\t\t}", "title": "" }, { "docid": "2d582337a4ccc6069197efd292ef6987", "score": "0.64555657", "text": "public function resultListaUsuario(){\n\n\t\t$query = \"\tSELECT u.usuario_codigo, initcap(u.usuario_nombres) as usuario_nombres, initcap(u.usuario_apellidos) as usuario_apellidos, initcap(p.proaca_titulootorgado) as usuario_titulootorgado, initcap(e.entest_nombre) as entest_nombre, pe.perfil_descripcion\n\t\t\t\t\tFROM tb_usuario u\n JOIN tb_itementidadestudiosede i ON i.iteentestsed_codigo = u.iteentestsed_codigo\n\t\t\t\t\tJOIN tb_entidadestudio e ON e.entest_codigo = i.entest_codigo\n JOIN tb_programaacademico p ON p.proaca_codigo = u.proaca_codigo\n JOIN tb_perfil pe ON pe.perfil_codigo = u.perfil_codigo\n\t\t\t\t\tORDER BY u.usuario_nombres \";\n\n\t\t$result = pg_query($query) or die('La consulta fallo: ' . pg_last_error());\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "daac6ca7506ddb871ff3633f962f71a8", "score": "0.6452692", "text": "public function readUsers() {\n static $stmt;\n if ($stmt == null)\n $stmt = $this->dbh->prepare(\n \"SELECT id, username, password, email, device \".\n \"FROM user \".\n \"ORDER BY username\"\n );\n\n $success = $stmt->execute(Array( ));\n if ($success === false)\n throw new Exception($this->formatErrorMessage($stmt, \"Unable to query database for User records\"));\n\n $rv = Array();\n while ($row = $stmt->fetchObject()) {\n $rv[] = new User(\n $row->id,\n $row->username,\n $row->password,\n $row->email,\n $row->device\n );\n } // while\n\n return $rv;\n }", "title": "" }, { "docid": "72e90187c5754ce8c92f445dc629e564", "score": "0.6443912", "text": "function getUsuario($idUsuario){\n //Instanciamiento para la clase Usuarios\n $user = new Usuarios();\n\n //Crear el array Json\n $userArray[\"items\"] = array();\n\n //Ejecutar el metodo para consulta SQL\n $res = $user->listarUsuario($idUsuario);\n\n //Verificar si hay lineas retornadas\n if(mysqli_num_rows($res)>0){\n //Recorrer el array de resultado\n while($fila = mysqli_fetch_assoc($res)){\n $item = array(\n \"usuarioid\"=>$fila[\"usuarioid\"],\n \"nombre\"=>$fila[\"nombrecompleto\"],\n \"usuario\"=>$fila[\"usuario\"],\n \"clave\"=>$fila[\"clave\"]\n );\n \n //Agregando array auxiliar con array JSON\n array_push($userArray[\"items\"],$item);\n }//Fin de while\n\n //Mostrar el array final\n echo json_encode($userArray);\n }else\n echo json_encode(\n array(\"mensaje\"=>\"No hay resultados para mostrar\"));\n\n }", "title": "" }, { "docid": "f4fb08bc92b1282696343c5403e26ef5", "score": "0.6442927", "text": "public function getAllUsers(){\n $stmt = $this->DB->prepare(\"SELECT * FROM users;\");\n $stmt->execute();\n $array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $array;\n }", "title": "" }, { "docid": "45f2d30aa8292ffb4cacfa74bd639ffc", "score": "0.644194", "text": "public function consultarDatosUsuario($data){\n $URL = \"https://\".$data['plataforma'].\".seuatvirtual.mx/webservice/rest/server.php?moodlewsrestformat=json&wstoken=\".$data['token'].\"&wsfunction=core_webservice_get_site_info\";\n $json = file_get_contents($URL);\n $request = json_decode($json, TRUE);\n $datos['nombre'] = $request['firstname'];\n $datos['apellidos'] = $request['lastname'];\n $datos['userid'] = $request['userid'];\n $datos['pictureurl'] = $request['userpictureurl'];\n return $datos;\n }", "title": "" }, { "docid": "4e0b77072c30f34b805f400bf85672e8", "score": "0.6441409", "text": "public function getAllUsers(){\n\t\t$query = \"SELECT * FROM users\";\n\t\t$dbcontroller = new DBController();\n\t\t$this->user = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->user;\n\t}", "title": "" }, { "docid": "d9f791c2c947780effb5d6d3eef22dc8", "score": "0.6441249", "text": "private function ifoCadUser()\n {\n $infoCadUser = new AdmsRead();\n $infoCadUser->fullRead(\"SELECT env_email_conf FROM adms_cads_usuarios WHERE id =:id LIMIT :limit\", \"id=1&limit=1\");\n $this->IfoCadUser = $infoCadUser->getResultado();\n\n }", "title": "" } ]
afb8ec23355ba42167c70e9142d211d9
doSave() Insert the row in the database.
[ { "docid": "e288815ee83ea4e4a825b62b71628b4d", "score": "0.0", "text": "protected function doInsert(PropelPDO $con)\r\n {\r\n $modifiedColumns = array();\r\n $index = 0;\r\n\r\n $this->modifiedColumns[] = DadosPeer::ID;\r\n if (null !== $this->id) {\r\n throw new PropelException('Cannot insert a value for auto-increment primary key (' . DadosPeer::ID . ')');\r\n }\r\n\r\n // check the columns in natural order for more readable SQL queries\r\n if ($this->isColumnModified(DadosPeer::ID)) {\r\n $modifiedColumns[':p' . $index++] = '`ID`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::ESTAEMCELULA)) {\r\n $modifiedColumns[':p' . $index++] = '`ESTAEMCELULA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DIACELULA)) {\r\n $modifiedColumns[':p' . $index++] = '`DIACELULA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::HORACELULA)) {\r\n $modifiedColumns[':p' . $index++] = '`HORACELULA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MINUTOCELULA)) {\r\n $modifiedColumns[':p' . $index++] = '`MINUTOCELULA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::PERIODOCELULA)) {\r\n $modifiedColumns[':p' . $index++] = '`PERIODOCELULA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::COORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`COORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DIACOORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`DIACOORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::FREQUENCIACOORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`FREQUENCIACOORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::HORACOORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`HORACOORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MINUTOCOORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`MINUTOCOORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::PERIODOCOORDENADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`PERIODOCOORDENADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`DISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DIADISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`DIADISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::FREQUENCIADISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`FREQUENCIADISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::HORADISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`HORADISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MINUTODISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`MINUTODISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::PERIODODISCIPULADOR)) {\r\n $modifiedColumns[':p' . $index++] = '`PERIODODISCIPULADOR`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::LIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`LIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOMELIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`NOMELIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::LIDERTREINAMENTO)) {\r\n $modifiedColumns[':p' . $index++] = '`LIDERTREINAMENTO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DIALIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`DIALIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::FREQUENCIALIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`FREQUENCIALIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::HORALIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`HORALIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MINUTOLIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`MINUTOLIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::PERIODOLIDER)) {\r\n $modifiedColumns[':p' . $index++] = '`PERIODOLIDER`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::CCM)) {\r\n $modifiedColumns[':p' . $index++] = '`CCM`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::DIACCM)) {\r\n $modifiedColumns[':p' . $index++] = '`DIACCM`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::HORACCM)) {\r\n $modifiedColumns[':p' . $index++] = '`HORACCM`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MINUTOCCM)) {\r\n $modifiedColumns[':p' . $index++] = '`MINUTOCCM`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::PERIODOCCM)) {\r\n $modifiedColumns[':p' . $index++] = '`PERIODOCCM`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHADOMINGO)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHADOMINGO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHASEGUNDA)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHASEGUNDA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHATERCA)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHATERCA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHAQUARTA)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHAQUARTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHAQUINTA)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHAQUINTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHASEXTA)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHASEXTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::MANHASABADO)) {\r\n $modifiedColumns[':p' . $index++] = '`MANHASABADO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDEDOMINGO)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDEDOMINGO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDESEGUNDA)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDESEGUNDA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDETERCA)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDETERCA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDEQUARTA)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDEQUARTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDEQUINTA)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDEQUINTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDESEXTA)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDESEXTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::TARDESABADO)) {\r\n $modifiedColumns[':p' . $index++] = '`TARDESABADO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITEDOMINGO)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITEDOMINGO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITESEGUNDA)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITESEGUNDA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITETERCA)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITETERCA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITEQUARTA)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITEQUARTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITEQUINTA)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITEQUINTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITESEXTA)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITESEXTA`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::NOITESABADO)) {\r\n $modifiedColumns[':p' . $index++] = '`NOITESABADO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::OBSERVACAO)) {\r\n $modifiedColumns[':p' . $index++] = '`OBSERVACAO`';\r\n }\r\n if ($this->isColumnModified(DadosPeer::ID_USUARIO)) {\r\n $modifiedColumns[':p' . $index++] = '`ID_USUARIO`';\r\n }\r\n\r\n $sql = sprintf(\r\n 'INSERT INTO `dados` (%s) VALUES (%s)',\r\n implode(', ', $modifiedColumns),\r\n implode(', ', array_keys($modifiedColumns))\r\n );\r\n\r\n try {\r\n $stmt = $con->prepare($sql);\r\n foreach ($modifiedColumns as $identifier => $columnName) {\r\n switch ($columnName) {\r\n case '`ID`':\r\n $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);\r\n break;\r\n case '`ESTAEMCELULA`':\r\n $stmt->bindValue($identifier, $this->estaemcelula, PDO::PARAM_STR);\r\n break;\r\n case '`DIACELULA`':\r\n $stmt->bindValue($identifier, $this->diacelula, PDO::PARAM_INT);\r\n break;\r\n case '`HORACELULA`':\r\n $stmt->bindValue($identifier, $this->horacelula, PDO::PARAM_INT);\r\n break;\r\n case '`MINUTOCELULA`':\r\n $stmt->bindValue($identifier, $this->minutocelula, PDO::PARAM_INT);\r\n break;\r\n case '`PERIODOCELULA`':\r\n $stmt->bindValue($identifier, $this->periodocelula, PDO::PARAM_INT);\r\n break;\r\n case '`COORDENADOR`':\r\n $stmt->bindValue($identifier, $this->coordenador, PDO::PARAM_STR);\r\n break;\r\n case '`DIACOORDENADOR`':\r\n $stmt->bindValue($identifier, $this->diacoordenador, PDO::PARAM_INT);\r\n break;\r\n case '`FREQUENCIACOORDENADOR`':\r\n $stmt->bindValue($identifier, $this->frequenciacoordenador, PDO::PARAM_INT);\r\n break;\r\n case '`HORACOORDENADOR`':\r\n $stmt->bindValue($identifier, $this->horacoordenador, PDO::PARAM_INT);\r\n break;\r\n case '`MINUTOCOORDENADOR`':\r\n $stmt->bindValue($identifier, $this->minutocoordenador, PDO::PARAM_INT);\r\n break;\r\n case '`PERIODOCOORDENADOR`':\r\n $stmt->bindValue($identifier, $this->periodocoordenador, PDO::PARAM_INT);\r\n break;\r\n case '`DISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->discipulador, PDO::PARAM_STR);\r\n break;\r\n case '`DIADISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->diadiscipulador, PDO::PARAM_INT);\r\n break;\r\n case '`FREQUENCIADISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->frequenciadiscipulador, PDO::PARAM_INT);\r\n break;\r\n case '`HORADISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->horadiscipulador, PDO::PARAM_INT);\r\n break;\r\n case '`MINUTODISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->minutodiscipulador, PDO::PARAM_INT);\r\n break;\r\n case '`PERIODODISCIPULADOR`':\r\n $stmt->bindValue($identifier, $this->periododiscipulador, PDO::PARAM_INT);\r\n break;\r\n case '`LIDER`':\r\n $stmt->bindValue($identifier, $this->lider, PDO::PARAM_STR);\r\n break;\r\n case '`NOMELIDER`':\r\n $stmt->bindValue($identifier, $this->nomelider, PDO::PARAM_STR);\r\n break;\r\n case '`LIDERTREINAMENTO`':\r\n $stmt->bindValue($identifier, $this->lidertreinamento, PDO::PARAM_STR);\r\n break;\r\n case '`DIALIDER`':\r\n $stmt->bindValue($identifier, $this->dialider, PDO::PARAM_INT);\r\n break;\r\n case '`FREQUENCIALIDER`':\r\n $stmt->bindValue($identifier, $this->frequencialider, PDO::PARAM_INT);\r\n break;\r\n case '`HORALIDER`':\r\n $stmt->bindValue($identifier, $this->horalider, PDO::PARAM_INT);\r\n break;\r\n case '`MINUTOLIDER`':\r\n $stmt->bindValue($identifier, $this->minutolider, PDO::PARAM_INT);\r\n break;\r\n case '`PERIODOLIDER`':\r\n $stmt->bindValue($identifier, $this->periodolider, PDO::PARAM_INT);\r\n break;\r\n case '`CCM`':\r\n $stmt->bindValue($identifier, $this->ccm, PDO::PARAM_STR);\r\n break;\r\n case '`DIACCM`':\r\n $stmt->bindValue($identifier, $this->diaccm, PDO::PARAM_INT);\r\n break;\r\n case '`HORACCM`':\r\n $stmt->bindValue($identifier, $this->horaccm, PDO::PARAM_INT);\r\n break;\r\n case '`MINUTOCCM`':\r\n $stmt->bindValue($identifier, $this->minutoccm, PDO::PARAM_INT);\r\n break;\r\n case '`PERIODOCCM`':\r\n $stmt->bindValue($identifier, $this->periodoccm, PDO::PARAM_INT);\r\n break;\r\n case '`MANHADOMINGO`':\r\n $stmt->bindValue($identifier, $this->manhadomingo, PDO::PARAM_STR);\r\n break;\r\n case '`MANHASEGUNDA`':\r\n $stmt->bindValue($identifier, $this->manhasegunda, PDO::PARAM_STR);\r\n break;\r\n case '`MANHATERCA`':\r\n $stmt->bindValue($identifier, $this->manhaterca, PDO::PARAM_STR);\r\n break;\r\n case '`MANHAQUARTA`':\r\n $stmt->bindValue($identifier, $this->manhaquarta, PDO::PARAM_STR);\r\n break;\r\n case '`MANHAQUINTA`':\r\n $stmt->bindValue($identifier, $this->manhaquinta, PDO::PARAM_STR);\r\n break;\r\n case '`MANHASEXTA`':\r\n $stmt->bindValue($identifier, $this->manhasexta, PDO::PARAM_STR);\r\n break;\r\n case '`MANHASABADO`':\r\n $stmt->bindValue($identifier, $this->manhasabado, PDO::PARAM_STR);\r\n break;\r\n case '`TARDEDOMINGO`':\r\n $stmt->bindValue($identifier, $this->tardedomingo, PDO::PARAM_STR);\r\n break;\r\n case '`TARDESEGUNDA`':\r\n $stmt->bindValue($identifier, $this->tardesegunda, PDO::PARAM_STR);\r\n break;\r\n case '`TARDETERCA`':\r\n $stmt->bindValue($identifier, $this->tardeterca, PDO::PARAM_STR);\r\n break;\r\n case '`TARDEQUARTA`':\r\n $stmt->bindValue($identifier, $this->tardequarta, PDO::PARAM_STR);\r\n break;\r\n case '`TARDEQUINTA`':\r\n $stmt->bindValue($identifier, $this->tardequinta, PDO::PARAM_STR);\r\n break;\r\n case '`TARDESEXTA`':\r\n $stmt->bindValue($identifier, $this->tardesexta, PDO::PARAM_STR);\r\n break;\r\n case '`TARDESABADO`':\r\n $stmt->bindValue($identifier, $this->tardesabado, PDO::PARAM_STR);\r\n break;\r\n case '`NOITEDOMINGO`':\r\n $stmt->bindValue($identifier, $this->noitedomingo, PDO::PARAM_STR);\r\n break;\r\n case '`NOITESEGUNDA`':\r\n $stmt->bindValue($identifier, $this->noitesegunda, PDO::PARAM_STR);\r\n break;\r\n case '`NOITETERCA`':\r\n $stmt->bindValue($identifier, $this->noiteterca, PDO::PARAM_STR);\r\n break;\r\n case '`NOITEQUARTA`':\r\n $stmt->bindValue($identifier, $this->noitequarta, PDO::PARAM_STR);\r\n break;\r\n case '`NOITEQUINTA`':\r\n $stmt->bindValue($identifier, $this->noitequinta, PDO::PARAM_STR);\r\n break;\r\n case '`NOITESEXTA`':\r\n $stmt->bindValue($identifier, $this->noitesexta, PDO::PARAM_STR);\r\n break;\r\n case '`NOITESABADO`':\r\n $stmt->bindValue($identifier, $this->noitesabado, PDO::PARAM_STR);\r\n break;\r\n case '`OBSERVACAO`':\r\n $stmt->bindValue($identifier, $this->observacao, PDO::PARAM_STR);\r\n break;\r\n case '`ID_USUARIO`':\r\n $stmt->bindValue($identifier, $this->id_usuario, PDO::PARAM_INT);\r\n break;\r\n }\r\n }\r\n $stmt->execute();\r\n } catch (Exception $e) {\r\n Propel::log($e->getMessage(), Propel::LOG_ERR);\r\n throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), $e);\r\n }\r\n\r\n try {\r\n $pk = $con->lastInsertId();\r\n } catch (Exception $e) {\r\n throw new PropelException('Unable to get autoincrement id.', $e);\r\n }\r\n $this->setId($pk);\r\n\r\n $this->setNew(false);\r\n }", "title": "" } ]
[ { "docid": "25b55d92cf6baa05208599c54770c763", "score": "0.76607835", "text": "public function save() {\n\t\t\tif($this->getPrimaryKey())\n\t\t\t\t$this->update();\n\t\t\telse\n\t\t\t\t$this->insert();\n\t\t}", "title": "" }, { "docid": "40f39216902c559bf990edad25d91b46", "score": "0.7337637", "text": "public function save(){ \r\n\t\tif($this->id){\r\n\t\t\t$this->update();\r\n\t\t}else{\r\n\t\t\t$this->insert();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7c18079397ed22b25460b38ecada3a26", "score": "0.724857", "text": "public function save() {\n $db = Settings::getInstance()->getDbInterface();\n if (empty($this->id)) {\n $sql = $db->getInsertSql(static::getTableDef(), $this->mapToArray());\n $db->execute($sql);\n $this->id = $db->getInsertId();\n } else {\n $sql = $db->getUpdateSql(static::getTableDef(), $this->mapToArray());\n $db->execute($sql);\n }\n }", "title": "" }, { "docid": "ca96f4ef56af289c9c18908d0e89b7a3", "score": "0.7245211", "text": "public function save()\r\n\t{\r\n\t\tself::setUpConnection();\r\n\t\t$this->_validator->validate($this);\r\n\t\tif (isset($this->_data['id']) && is_numeric($this->_data['id'])) {\r\n\t\t\t$this->update();\r\n\t\t} else {\r\n\t\t\t$this->insert();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1f87352eeafc907f4555e1c25c10919a", "score": "0.7202432", "text": "public function save()\n {\n $this->db->insert($this->table, $this->data);\n }", "title": "" }, { "docid": "39f3916a171204b5736d4f21fc4047ca", "score": "0.7130132", "text": "abstract protected function doSave();", "title": "" }, { "docid": "53f3228f858d508f713ff1b4ebbaed9f", "score": "0.70754373", "text": "public function save()\n {\n if (!empty($this->attributes['id']))\n {\n $this->update();\n } else {\n $this->insert();\n }\n }", "title": "" }, { "docid": "6cbc04c7c1d8a9d822620e137cb87607", "score": "0.70483273", "text": "public function save() {\n\t\tif (!empty($this->id)) {\n\t\t\t// this is not a new record. Update values\n\t\t\t$sql = \"update {$this->table} set \";\n\t\t\t$mapItems = array();\n\t\t\t$bindvarTypes = \"\";\n\t\t\t$bindvalues = array();\n\t\t\tforeach ($this->orm as $map=>$type) {\n\t\t\t\t$mapItems[]=\"`$map`=?\";\n\t\t\t\t$bindvarTypes .= $type;\n\t\t\t\t$bindvalues[] = $this->data[$map];\n\t\t\t}\n\t\t\t$bindvalues[]=$this->id;\n\t\t\t$bindvarTypes .= \"d\";\n\t\t\t$params = array_merge(array($bindvarTypes), $bindvalues);\n\t\t\t$sql .= implode(\",\",$mapItems);\n\t\t\t$sql .= \" where {$this->key} = ?\";\n\t\t\t$stmt = self::$dbm->prepare($sql);\n\t\t\tif (!$stmt) { echo \"error with $sql\"; exit; }\n\t\t\t\n\t\t\tcall_user_func_array(array(&$stmt, 'bind_param'), $this->makeValuesReferenced($params));\n\t\t\t$stmt->execute();\n\t\t} else {\n\t\t\t// new record. Perform an insert instead.\n\t\t\t$map = array();\n\t\t\tfor ($i=0; $i<count($this->orm); $i++) {\n\t\t\t\t$map[]=\"?\";\n\t\t\t}\n\t\t\t$map=implode(\",\", $map);\n\t\t\t$bindfields = array();\n\t\t\t$bindvarTypes = \"\";\n\t\t\t$bindvalues = array();\n\t\t\tforeach ($this->orm as $gmap=>$type) {\n\t\t\t\t$bindfields[] = $gmap;\n\t\t\t\t$bindvarTypes .= $type;\n\t\t\t\t$bindvalues[] = $this->data[$gmap];\n\t\t\t}\n\t\t\t$sql = \"insert into {$this->table} (`\".implode(\"`,`\", $bindfields).\"`) values ($map)\";\n\t\t\t$params = array_merge(array($bindvarTypes), $bindvalues);\n\t\t\t$stmt = self::$dbm->prepare($sql);\n\t\t\tif (!$stmt) { echo \"error with $sql: {self::$dbm->error}\"; exit; }\n\t\t\t\n\t\t\tcall_user_func_array(array(&$stmt, 'bind_param'), $this->makeValuesReferenced($params));\n\t\t\t$stmt->execute();\n\t\t\tif ($stmt->error != '') {\n\t\t\t\tthrow new \\Exception(\"STMT Error: {$stmt->error}\");\n\t\t\t\texit;\n\t\t\t}\n\t\t\treturn $stmt->insert_id;\n\t\t}\n\t}", "title": "" }, { "docid": "fb4ad4dc0796d0f27a167707e24c82c0", "score": "0.70008355", "text": "function save(){\n if(isset($this->id))\n $this->update();\n else\n $this->insert();\n }", "title": "" }, { "docid": "b3956c1253c1f61591be498be4b73489", "score": "0.69673777", "text": "public function save(){\r\n if($this->id){\r\n $data = $this->data;\r\n $where['id = ?'] = $this->id;\r\n $this->update($data,$where);\r\n } else{\r\n $data = $this->data;\r\n $this->id = $this->insert($data);\r\n }\r\n }", "title": "" }, { "docid": "f0c72aabd4f4b9c196e86243b7409258", "score": "0.6906917", "text": "public function save()\n {\n if ($this->Id == 0) {\n // Empty classes are set with ID = 0\n $this->create();\n } elseif ($this->Id == -1) {\n // Unretrievable rows are set up as ID = -1\n // Do nothing\n } else {\n // Otherwise, it's an existing ID\n $this->update();\n }\n }", "title": "" }, { "docid": "bc7466844d4c46951331e804be482057", "score": "0.6895263", "text": "public function save(){\n if(isset($this->id)){\n $this->update();\n }else{\n $this->insert();\n }\n\n }", "title": "" }, { "docid": "6bd88ebc5f8e9ff7e27dbd3bb0148a09", "score": "0.6866035", "text": "public function Save()\n\t\t{\n\t\t\tif ($this->Exists()) {\n\t\t\t\treturn $this->UpdateRow();\n\t\t\t} else {\t\n\t\t\t\treturn $this->InsertRow();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d6c6a25fe3f870d9040da4761fd410a3", "score": "0.685806", "text": "public function save() {\n $this->gdao->save($this);\n }", "title": "" }, { "docid": "38199c65d0cb7b6753c0327264a71de8", "score": "0.6792065", "text": "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 'title' => $this->title\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "c65f55d5bee515bc495fae5e74bcf1a9", "score": "0.67742646", "text": "public function save()\n\t\t{\n\t\t\t$save_type = (($this->id > 0)?UPDATE:INSERT);\n\t\t\t$this->errors = array();\n\t\t\t$this->validate($save_type);\n\t\t\t\n\t\t\tif(is_null($this->errors))\n\t\t\t{\n\t\t\t\t$this->buildCommitSql($save_type);\n\n\t\t\t\t$this->execSql(\"Saving $this->obj_type\", $save_type);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "947bf884469f66661ed979551b36a224", "score": "0.6747929", "text": "public function save()\n {\n if(!$this->id)\n $this->add($this);\n else\n $this->update($this);\n }", "title": "" }, { "docid": "8fa580c346fda121d739bee3e8bb48ba", "score": "0.6745333", "text": "public function save() {\r\n if ($this->id === 0) return $this->insert();\r\n else return $this->update();\r\n }", "title": "" }, { "docid": "a85eb76ca8d839c3579e7d12111bf503", "score": "0.6734246", "text": "function save(){\n //if($this->id == null) //INSERT INTO\n //else //UPDATE\n\n /* ex.: INSERT INTO ($this->__table) SET ($this->$key) = ($this->$value)\n * UPDATE FROM ($this->__table) VALUES(($this->$key) = ($this->$value)) WHARE ($this->__where)\n *\n * in foreach: bypass $__table and $__whare !!\n */\n }", "title": "" }, { "docid": "1446ffb488dfd120fc3ad414a112cef3", "score": "0.6694459", "text": "public function save() {\n $sql = NULL;\n $date = $this->datetime();\n\n if ($this->new_record()) {\n $this->id = $this->next_insert_id();\n\n if ($this->has_timestamps()) {\n $this->date_added = $date;\n $this->date_updated = $date;\n }\n\n $columns = join(\", \", array_keys($this->sql_columns_and_values()));\n $values = join(\", \", array_values($this->sql_columns_and_values()));\n $sql = \"INSERT INTO \". static::TABLE_NAME .\" (\". $columns .\") VALUES (\". $values .\")\";\n } else {\n if ($this->has_timestamps()) {\n $this->date_updated = $date;\n }\n\n $assigns = [];\n\n foreach ($this->sql_columns_and_values() as $key => $value) {\n array_push($assigns, \"$key = $value\");\n }\n\n $sql = \"UPDATE \". static::TABLE_NAME .\" SET \". join(\", \", $assigns) .\" WHERE id = \" . Quoter::quote_if_string($this->id);\n }\n\n /* echo $sql; */\n static::db()->query($sql);\n }", "title": "" }, { "docid": "60a8495258010ff1190f46d1574c145a", "score": "0.6684818", "text": "public function save()\r\n {\r\n if ( isset($this->id) )\r\n {\r\n $this->update();\r\n }\r\n else\r\n {\r\n $this->create();\r\n }\r\n }", "title": "" }, { "docid": "bdf00c1fa3245e3ac5ed2f2492cbf389", "score": "0.6640258", "text": "public function _save() {\n\n $this->toArray();\n\n\t\t$result = $this->dbAdapter->insert($this->getTableName(), $this->data);\n\t\t//check result throw Exception\n\t\t\n return $this->dbAdapter->lastInsertId();\n\t}", "title": "" }, { "docid": "4c3370c380762d80ce6cf04152aba2fb", "score": "0.66367525", "text": "public function testSave_Insert()\n {\n return;\n self::$reuse_db = false;\n \n $record = new \\Foo();\n $record->name = 'MAN';\n $record->ext = 'mu';\n $ret = $this->table->save($record);\n \n $this->assertSame($record, $ret);\n $this->assertEquals(6, $record->id);\n \n $result = $this->db->query(\"SELECT * FROM foo WHERE id = 6\");\n $this->assertEquals(array('id'=>6, 'name'=>'MAN', 'ext'=>'mu'), $result->fetch_assoc());\n }", "title": "" }, { "docid": "4106102f5a3f66db2bc7cf7d74e10ecf", "score": "0.66335034", "text": "public function save(){\n\t\t$dbh = App::get('dbh');\n\t\t$values = $this->getAttributes();\n\t\t$param = get_called_class()::getParam();\n\t\tunset($param['id']);\n\t\t$req = \"INSERT INTO \". get_called_class() .\"(\";\n\t\t$req.=join(\",\",array_map(null,array_keys($param))).\") VALUES (\";\n\t\t$req.=join(\",\",array_map(function($key){return \":\".$key;},array_keys($param))).\")\";\n\t\t$statement = $dbh->prepare($req);\n\t\tforeach ($param as $key => $value) // prepared statement with name placeholders \n\t\t\t$statement->bindParam($key, $values[$key], $value);\n\t\t\n\t\t$statement->execute();\n\t}", "title": "" }, { "docid": "c0b11f5791e6c0dd1d6ff0eeb0781b84", "score": "0.6611326", "text": "public function save()\n {\n $fields = $this->getAttributes();\n $values = [];\n try {\n $mysqli = self::setConnection();\n \n if(!$this->bNew) {\n \n foreach($fields as $key => $fieldName) {\n $values[] = $fieldName . '=' . '\"' . $mysqli->escape_string($this->$fieldName) . '\"';\n }\n \n $query_templ = ['UPDATE', self::getTable(), 'SET', implode(', ', $values), 'WHERE', 'id='.$this->id];\n } else {\n \n foreach ($fields as $key => $fieldName) {\n $values[] = '\"' . $mysqli->escape_string($this->$fieldName) . '\"';\n }\n \n $query_templ = ['INSERT', 'INTO', self::getTable(), '('. implode(', ', $fields) .')', 'VALUES', '('. implode(', ', $values) .')'];\n }\n \n $query = implode(' ', $query_templ);\n \n if(!$mysqli->query($query)) {\n throw new AppException($mysqli->error);\n } \n \n if($this->bNew) {\n $this->id = $mysqli->insert_id;\n $this->bNew = false;\n }\n\n return true;\n } catch(AppException $e) {\n \n echo $e->getMessage();die;\n return false;\n }\n }", "title": "" }, { "docid": "3f012b925bf0b255502510b216224935", "score": "0.6602893", "text": "abstract protected function doSave($con);", "title": "" }, { "docid": "b3e5f2787eb33ffe4d3915c456a5cb2d", "score": "0.65990216", "text": "public function save()\n {\n if ($this->getId() > 0) {\n return $this->_update();\n } else {\n return $this->_insert();\n }\n }", "title": "" }, { "docid": "a34cf724581853cd780d43b510b14fad", "score": "0.659875", "text": "public function save()\n {\n $fields = get_object_vars($this);\n $columns = '';\n $values = '';\n $queryValues=array();\n foreach ($fields as $col => $val) {\n $columns .= $col . ', ';\n $values .= ':' . $col . ', ';\n $queryValues[':'.$col]=$val;\n }\n $columns = '(' . substr($columns, 0, -2) . ')';\n $values = '(' . substr($values, 0, -2) . ')';\n $db = Service::get('db');\n $query = 'INSERT INTO `' . static::getTable() . '` ' . $columns . ' VALUES ' . $values;\n $stmt=$db->prepare($query);\n $res= $stmt->execute($queryValues);\n if($res==false){\n throw new DatabaseException('Saving is failed');\n }\n }", "title": "" }, { "docid": "50b363c621f680f4d3dcfcc043106a4b", "score": "0.6571703", "text": "function save(){\n\t\tglobal $wpdb;\n\n\t\t$formats = array();\n\n\t\t//note: $value can't be referenced in php4\n\t\tforeach($this->__data as $field => $value ){\n\n\t\t\t$this->__data[$field] = apply_filters( $this->__obj_name.'_data_'.$field.'_before_save', $value, $this->__id );\n\n\t\t\tif( !empty($this->__fields_format[$field]) )\n\t\t\t\t$formats[] = $this->__fields_format[$field];\n\t\t\telse\n\t\t\t\t$formats[] = '%s';\n\t\t}\n\n\t\t/* Call a before save action here */\n\t\tdo_action( $this->__obj_name.'_data_before_save', array(&$this) );\n\n\t\tif ( $this->__id ) {\n\t\t\t// Update\n\t\t\t$result = $wpdb->update( $this->__table, $this->__data, array( $this->__id_field => $this->__id ), $formats, array( '%d' ) );\n\t\t} else {\n\t\t\t// Save\n\t\t\t$result = $wpdb->insert( $this->__table, $this->__data, $formats );\n\t\t}\n\n\t\tif ( !$result )\n\t\t\treturn false;\n\n\t\tif ( !$this->__id )\n\t\t\t$this->__id = $wpdb->insert_id;\n\n\t\t/* Add an after save action here */\n\t\tdo_action( $this->__obj_name.'_data_after_save', array(&$this) );\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7a1d4fac9a7c037671f4fba3f5408e7b", "score": "0.6563951", "text": "public function save($record) {\r\n\r\n\t\t\t$success = $this->insert($record);\r\n\t\t\t\r\n\t\t\t\tif(!$success){\r\n\t\t\t\t\t$this->update($record);\r\n\t\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "0640a5cf8d784ddc5a3aadcf08f4c865", "score": "0.656188", "text": "private function insert()\r\n\t{\r\n\t\ttry {\r\n\t\t\tself::$db->insert($this->_tableName, $this->_data);\r\n\t\t\t$this->_data['id'] = self::$db->lastInsertId();\r\n\t\t} catch (Zend_Db_Exception $e) {\r\n\t\t\tif (!$this->_validator->handleException($e))\r\n\t\t\t{\r\n\t\t\t\tthrow $e;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e5633add4292de94de49dcf22f0f24be", "score": "0.65443754", "text": "public function save() \n\t{\n\n\t\tif (isset($this->id) && ($this->id) > 0) {\n\t\t\t// Return update when id exists\n\t\t\treturn $this->update();\n\t\t} else {\n\t\t\t// Return insert when id does not exists\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "ba9b6bc37d718a880f6e50f5353ffee4", "score": "0.6530632", "text": "function save() {\n\t\t$numrows = 0;\n\t\tif ( $this->id == 0 ) {\n\t\t\t// insert\n\t\t\t$sql = \"insert into entry ( title, entry_text, post_date, author ) values \" . \n\t\t\t \"( '$this->title', '$this->entry_text', NOW(), '$this->author' )\";\n\t\t\t$numrows = $this->db->insert( $sql );\n\t\t\tif ( $numrows > 0 ) {\n\t\t\t\t$this->id = $this->db->insert_id();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// update\n\t\t\t$sql = \"update entry set title = '$this->title', \" . \n\t\t\t \"entry_text = '$this->entry_text', post_date = '$this->post_date' \" .\n\t\t\t \"author = '$this->author' where id = $this->id\";\n\t\t\t$numrows = $this->db->update( $sql );\n\t\t}\n\t\treturn $numrows;\n\t}", "title": "" }, { "docid": "1afe44d2ac1c4ee5a440837c466e9916", "score": "0.6516002", "text": "public function save() {\n\t\t$key = $this->_key;\n\n\t\t$action = ($this->$key > 0) ? 'insert' : 'replace';\n\t\t$result = $this->_db->$action($this->_tbl_name, $this->_data);\n\n\t\tforeach ($this->_metadata as $mKey => $mVal) {\n\t\t\tupdate_metadata($this->_meta_name, $this->$key, $mKey, $mVal);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8f17b6b62990b745f4f3a4c22fbe7e2d", "score": "0.65152615", "text": "public function save()\n\t{\n\t\t$eventHandler = $this->getEventHandler();\n\t\tif ($this->getHandlerExceptions()) {\n\t\t\t$eventHandler->setExceptions($this->getHandlerExceptions());\n\t\t}\n\t\t$eventHandler->trigger('EntityBeforeSave');\n\t\t$db = \\App\\Db::getInstance();\n\t\t$transaction = $db->beginTransaction();\n\t\ttry {\n\t\t\tif (!$this->isNew() && !$this->isMandatorySave() && empty($this->getPreviousValue())) {\n\t\t\t\tApp\\Log::info('ERR_NO_DATA');\n\t\t\t} else {\n\t\t\t\tif (method_exists($this, 'validate')) {\n\t\t\t\t\t$this->validate();\n\t\t\t\t}\n\t\t\t\t$this->saveToDb();\n\t\t\t}\n\t\t\t$recordId = $this->getId();\n\t\t\tUsers_Privileges_Model::setSharedOwner($this->get('shownerid'), $recordId);\n\t\t\tif ('link' === \\App\\Request::_get('createmode') && \\App\\Request::_has('return_module') && \\App\\Request::_has('return_id')) {\n\t\t\t\tVtiger_Relation_Model::getInstance(Vtiger_Module_Model::getInstance(\\App\\Request::_get('return_module')), $this->getModule())\n\t\t\t\t\t->addRelation(\\App\\Request::_getInteger('return_id'), $recordId);\n\t\t\t}\n\t\t\t$transaction->commit();\n\t\t} catch (\\Exception $e) {\n\t\t\t$transaction->rollBack();\n\t\t\tthrow $e;\n\t\t}\n\t\t$eventHandler->trigger('EntityAfterSave');\n\t\tif ($this->isNew()) {\n\t\t\t\\App\\Cache::staticSave('RecordModel', $this->getId() . ':' . $this->getModuleName(), $this);\n\t\t\t$this->isNew = false;\n\t\t}\n\t\t\\App\\Cache::delete('recordLabel', $this->getId());\n\t\t\\App\\Cache::staticDelete('UnlockFields', $this->getId());\n\t\t\\App\\PrivilegeUpdater::updateOnRecordSave($this);\n\t}", "title": "" }, { "docid": "0e876ba13ccf770e4c5a035a17be085d", "score": "0.6502028", "text": "public function saveData()\n {\n foreach ($this->getData() as $row) {\n $this->getAdapter()->insert($this, $row);\n }\n }", "title": "" }, { "docid": "22eac28d6cb5ce2b99ad4256b0ae6f01", "score": "0.64899087", "text": "function save() {\n $this->dbh->TransactionBegin();\n $query =\n \"INSERT into person (login, email, last_name, name, titles_before, titles_after, ais_id)\n\t\t\t VALUES ($1, $2, $3, $4, $5, $6, $7)\";\n $this->dbh->query($query, array(\n $this->username, $this->email, $this->priezvisko, $this->meno,\n $this->tituly_pred, $this->tituly_za, $this->ais_id\n ));\n $query = \"SELECT id from person WHERE login=$1\";\n $this->dbh->query($query,array($this->username));\n $id=$this->dbh->fetch_assoc();\n foreach ($this->skupina as $grp) {\n $query =\n \"INSERT into person_group (id_person,id_group) VALUES ($1, $2)\";\n $this->dbh->query($query, array($id['id'], $grp));\n }\n $this->dbh->TransactionEnd();\n }", "title": "" }, { "docid": "9a25ab76da8715bf5c8b16e7456cfd47", "score": "0.6489326", "text": "public function save(){\n\t\t$data = array(\n\t\t\t'time' => time(),\n\t\t\t'author' => $this->author,\n\t\t\t'title' => $this->title,\n\t\t\t'content' => $this->content\n\t\t);\n\n\t\t$this->db->insert(TBL_POST, $data);\n\t\t$this->id = $this->db->insert_id();\n\t}", "title": "" }, { "docid": "d0c262a7745207cf7275edb7b4e172a8", "score": "0.6485209", "text": "function save()\r\n {\r\n $model = $this->getModel( $this->get('suffix') );\r\n $row = $model->getTable();\r\n $row->load( array( 'user_id' => JFactory::getUser()->id ) );\r\n $row->bind( $_POST );\r\n $row->user_id = JFactory::getUser()->id;\r\n\r\n if ( $row->save() )\r\n {\r\n $model->clearCache();\r\n $model->setId( $row->user_id );\r\n $this->messagetype = 'message';\r\n $this->message = JText::_('COM_TIENDA_SAVED');\r\n\r\n $dispatcher = JDispatcher::getInstance();\r\n $dispatcher->trigger( 'onAfterSave'.$this->get('suffix'), array( $row ) );\r\n }\r\n else\r\n {\r\n $this->messagetype = 'notice';\r\n $this->message = JText::_('COM_TIENDA_SAVE_FAILED').\" - \".$row->getError();\r\n }\r\n\r\n $redirect = \"index.php?option=com_tienda\";\r\n $task = $this->input->getCmd('task');\r\n switch ($task)\r\n {\r\n case \"save\":\r\n default:\r\n $redirect .= \"&view=\".$this->get('suffix');\r\n break;\r\n }\r\n\r\n $redirect = JRoute::_( $redirect, false );\r\n $this->setRedirect( $redirect, $this->message, $this->messagetype );\r\n }", "title": "" }, { "docid": "afea410f3c031d58e0d5b33453ae91cb", "score": "0.6469247", "text": "public function save()\n {\n $query = '';\n if (isset($this->id)) {\n $updates = '';\n foreach ($this->_describe as $field) {\n if ($this->$field) {\n $updates .= \"`\" . $field.\"` = '\" . mysql_real_escape_string($this->$field) . \"',\";\n }\n }\n $updates = substr($updates, 0, -1);\n\n $query = \"UPDATE \" . $this->_table . \" SET \" . $updates\n . \" WHERE `id`='\" . mysql_real_escape_string($this->id).\"'\";\n } else {\n $fields = '';\n $values = '';\n foreach ($this->_describe as $field) {\n if ($this->$field) {\n $fields .= '`' . $field . '`,';\n $values .= \"'\".mysql_real_escape_string($this->$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 $this->_result = mysql_query($query, $this->_dbHandle);\n $this->clear();\n if ($this->_result == 0) {\n //TODO Error Generation\n return -1;\n }\n }", "title": "" }, { "docid": "a4e4f4570dea35a31336b00105edc92a", "score": "0.64675283", "text": "public function save() {\n \t$db = Db::instance();\n \t\n \t// omit id and any timestamps\n \t$db_properties = array(\n\t 'id' => $this->id,\n\t 'creator_id' => $this->creator_id,\n\t 'product_id' => $this->product_id,\n\t 'product_count' => $this->product_count\n );\n \t$db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n \t}", "title": "" }, { "docid": "b8573d59e9719b4107db00f6c0c77c12", "score": "0.6462037", "text": "function wrappedSave() {\n\t\tif($this->primaryKeyIsSet()) {\n\t\t\treturn $this->update();\n\t\t} else {\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "5f41be36903364f3ae983eb87ac3b36a", "score": "0.6455021", "text": "public function save()\n {\n $em = Application::getFacadeApplication()->make(EntityManagerInterface::class);\n $em->persist($this);\n $em->flush();\n }", "title": "" }, { "docid": "65468275f70b08f4085d8b4226ad77a7", "score": "0.64438444", "text": "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'product_id' => $this->product_id,\n 'user_id' => $this->user_id,\n 'count' => $this->count,\n 'date_added' => $this->date_added\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "523f1f8c0f7d3efed01115703953d231", "score": "0.644269", "text": "public function save(){\n\t\tif(!static::$attributes) static::getmetadata();\n\t\tif(!$this->validate())\n\t\t\treturn false;\n\t\telse {\n\n\t\t\tif($this->isNewRecord)\n\t\t\t\t$ret= $this->insert();\n\t\t\telse\n\t\t\t\t$ret= $this->update();\n if(!$ret){ //Ha habido error de BD\n $this->errors[self::$pkey]='Error de Base de Datos';\n }\n return $ret;\n\t\t}\n\t}", "title": "" }, { "docid": "8e762973271de0803db72452c51b5a9b", "score": "0.6432816", "text": "public function save() {\n\t\t$tableMeta = static::getTableMeta();\n\t\t$queryArgs = [];\n\t\t\n\t\t// Update\n\t\tif ($this->_exists) {\n\t\t\t$update = [];\n\t\t\t$where = [];\n\t\t\tforeach ($tableMeta['columns'] as $prop => $propInfo) {\n\t\t\t\tif (isset($propInfo['key'])) {\n\t\t\t\t\t$where[] = \"t.`{$propInfo['name']}` = :{$prop}:\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$update[] = \"t.`{$propInfo['name']}` = :{$prop}:\";\n\t\t\t\t}\n\n\t\t\t\t$queryArgs[$prop] = $this->getProp($prop);\n\t\t\t}\n\n\t\t\t$update = implode(', ', $update);\n\t\t\t$where = implode(' AND ', $where);\n\n\t\t\t$db = DI::getDefault()->get('Db');\n\t\t\treturn $db->query(\"UPDATE {$tableMeta['name']} as t SET {$update} WHERE {$where} LIMIT 1\", $queryArgs);\n\t\t}\n\n\t\t// Insert\n\t\telse {\n\t\t\t$columns = [];\n\t\t\t$values = [];\n\t\t\tforeach ($tableMeta['columns'] as $prop => $propInfo) {\n\t\t\t\tif (isset($propInfo['key']) && isset($propInfo['autoIncrement'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$columns[] = \"`{$propInfo['name']}`\";\n\t\t\t\t$values[] = \":{$prop}:\";\n\t\t\t\t$queryArgs[$prop] = $this->getProp($prop);\n\t\t\t}\n\n\t\t\t$columns = implode(', ', $columns);\n\t\t\t$values = implode(', ', $values);\n\n\t\t\t$db = DI::getDefault()->get('Db');\n\t\t\t$result = $db->query(\"INSERT INTO {$tableMeta['name']} ({$columns}) VALUES ({$values})\", $queryArgs);\n\t\t\t\n\t\t\tif ($result !== false) {\n\t\t\t\tif (!is_bool($result)) {\n\t\t\t\t\tif ($tableMeta['autoIncrement']) {\n\t\t\t\t\t\t$autoProp = $tableMeta['autoIncrement'];\n\t\t\t\t\t\t$this->$autoProp = $result;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->_exists = true;\n\t\t\t\t$db->trackModel(DbTrackTypeEnum::ABORTED(), function() { $this->_exists = false; });\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0478930c071ff38e62d859f507ee2e34", "score": "0.6425992", "text": "public function save()\r\n\t{\r\n if($this->photoId)\r\n {\r\n $where = $this->getAdapter()->quoteInto('photoId = ?', $this->photoId);\r\n $this->update($this->photoData, $where);\r\n }\r\n else{\r\n $this->photoId = $this->insert($this->photoData);\r\n $this->photoId;\r\n }\r\n\t}", "title": "" }, { "docid": "f0b8bc607963fa940c27fd6ee7297a55", "score": "0.6407707", "text": "abstract public function insert(Galahad_Model_Entity $entity);", "title": "" }, { "docid": "d0f8069051c3fdf3c8e3f17689f8d1a9", "score": "0.6399878", "text": "public function save()\n {\n if ($this->exists()) {\n $this->update(); // update the table\n } else {\n $this->create(); // create the table\n }\n\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "c60887efabbcef27ef3551067df57de9", "score": "0.63958985", "text": "public function save() {\n\t\tif (isset($this->id)) {\n\n\t\t\t// Return update when id exists\n\t\t\treturn $this->update();\n\n\t\t} else {\n\n\t\t\t// Return insert when id does not exists\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "8514464eb6b10a99c547ca444e401f54", "score": "0.63937986", "text": "public function save() {\n return $this->model->saveOrUpdateRecordToDB($this->table, $this->uniqueKey, $this);\n }", "title": "" }, { "docid": "a8b4dc9d811ed71765906bcbed93555c", "score": "0.63765174", "text": "public function save() {\n\t\tif (!is_null($this->id)) {\n\t\t\t$sql = 'update support set ';\n\t\t} else {\n\t\t\t$sql = 'insert into support set ';\n\t\t}\n\t\t$sql .= '`owner`=\"' . e($this->owner->getId()) . '\", ';\n\t\t$sql .= '`ticket_id`=\"' . e($this->ticket_id) . '\", ';\n\t\t$sql .= '`title`=\"' . e($this->title) . '\", ';\n\t\tif (!is_null($this->id)) {\n\t\t\t$sql .= 'id=\"' . e($this->id) . '\" where id=\"' . $this->id . '\"';\n\t\t} else {\n\t\t\t$sql = trim($sql, ', ');\n\t\t}\n\t\tDatabase::singleton()->query($sql);\n\t\tif (is_null($this->id)) {\n\t\t\t$this->id = Database::singleton()->lastInsertedID();\n\t\t\tself::__construct($this->id);\n\t\t}\n\t}", "title": "" }, { "docid": "8420a0bbabb5808b6c32a6c5f44da651", "score": "0.63752687", "text": "public function save(){}", "title": "" }, { "docid": "8c63103e151e0b10a4f70a67835e9cd4", "score": "0.6367437", "text": "public final function save()\n\t{\n\t\tif (!$this->validate())\n\t\t\treturn;\n\t\t\n\t\tif (!$this->isPersisted())\n\t\t\treturn $this->insert();\n\t\telse\n\t\t\treturn $this->update();\n\t}", "title": "" }, { "docid": "224fdddcdb7a89e79861e1bc069fedff", "score": "0.63668406", "text": "private function _save()\n\t{\n\t}", "title": "" }, { "docid": "224fdddcdb7a89e79861e1bc069fedff", "score": "0.63668406", "text": "private function _save()\n\t{\n\t}", "title": "" }, { "docid": "352c448ac18d8ef1e78a4d28bf851671", "score": "0.6354976", "text": "public function save()\n {\n // si l'instance a une propriété 'id\n if ($this->getId() > 0){\n // alors on le met a jour\n return $this->update();\n } else {\n // sinon on l'ajoute\n return $this->insert();\n }\n }", "title": "" }, { "docid": "7e35f28c6e08aedfc0fbf2c13b6ec14f", "score": "0.63468784", "text": "public function saveInDB()\n {\n User::insert($this->fields, $this->values);\n }", "title": "" }, { "docid": "0ac51a0e675feb47e4dbe29859adaee4", "score": "0.63426393", "text": "public function testSave_Insert_Values()\n {\n return;\n self::$reuse_db = false;\n \n $record = $this->table->save(array('name'=>'MAN', 'ext'=>'mu'));\n $this->assertEquals(6, $record->id);\n $this->assertEquals('MAN', $record->name);\n $this->assertEquals('mu', $record->ext);\n \n $result = $this->db->query(\"SELECT * FROM foo WHERE id = 6\");\n $this->assertEquals(array('id'=>6, 'name'=>'MAN', 'ext'=>'mu'), $result->fetch_assoc());\n }", "title": "" }, { "docid": "ed9c4299e6faf231f87b34088c1489a7", "score": "0.63382864", "text": "public function save()\n {\n if (isset($this->values['id']) && ! is_null(isset($this->values['id']))) {\n return $this->table->update($this->values, 'id = ?', array((int) $this->values['id']));\n } else {\n return $this->table->create($this->values);\n }\n }", "title": "" }, { "docid": "8bdbc18b5ce87d1a1c99d384e806cb8f", "score": "0.63325584", "text": "public function save()\n {\n if (!empty($this->attributes)){\n \tself::dbConnect();\n \t$stmt = self::$dbc->prepare(\"SELECT * FROM \" . static::$table . \" WHERE id = :id\");\n\n \t$stmt->bindValue(\":id\", $this->attributes[\"id\"], PDO::PARAM_STR);\n\n \t$stmt->execute();\n\n \t$results = $stmt->fetch(PDO::FETCH_ASSOC);\n\n \tif ($results){\n \t\tforeach ($this->attributes as $key => $value) {\n\t \t\t$stmt = self::$dbc->prepare(\"UPDATE \" . static::$table . \" SET $key = :$key WHERE id = :id\");\n\n\t\t\t\t\t$stmt->bindValue(\":id\", $this->attributes[\"id\"], PDO::PARAM_INT);\n\t\t\t\t\t$stmt->bindValue(\":$key\", $value, PDO::PARAM_STR);\n\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t}\n \t}\n \telse{\n \t\t$cols = implode(\", \", array_keys($this->attributes));\n\t \t$vals = \":\" . implode(\", :\", array_keys($this->attributes));\n \t\t$query = \"INSERT INTO \" . static::$table . \" ($cols) VALUES ($vals)\";\n \t\t$stmt = self::$dbc->prepare($query);\n\n \t\tforeach($this->attributes as $key => $val){\n\t \t\t$stmt->bindValue(\":$key\", $val, PDO::PARAM_STR);\n\t \t}\n\n \t\t$stmt->execute();\n \t}\n }\n }", "title": "" }, { "docid": "cb59a61751ec24cc39855ca9c3bd574b", "score": "0.6330868", "text": "public function save()\n {\n $sql = \"INSERT INTO Type_Traitement (code,type,unite)\"\n . \" VALUES (:code,:type,:unite)\";\n \n $req = Model::$pdo->prepare($sql);\n \n $values = array(\n \"code\"=>$this->code,\n \n \"type\"=>$this->type,\n \n \"unite\"=>$this->unite\n );\n \n $req->execute($values);\n }", "title": "" }, { "docid": "169ddcf9bc9f55241eb2b92e2f928ff4", "score": "0.63227", "text": "public function save()\n {\n if ($this->readonly)\n return false;\n\n $id = $this->id;\n $table_name = $this->table_name;\n if (!$id) {\n $this->loaded = 0;\n };\n if ($this->loaded == 0) {\n # assume this is a new entity\n $stmt = \"INSERT INTO `$table_name` (\";\n if ( is_array($this->database_fields) ) {\n foreach ($this->database_fields as $key => $value) {\n if (!is_numeric($key)) {\n $key = str_replace(\"'\", \"\\'\", $key);\n if ($value != \"\") {\n $stmt .= \"`$key`,\";\n }\n }\n }\n }\n\n # Chop last comma\n $stmt = ereg_replace(\",$\", \"\", $stmt);\n $stmt .= \") VALUES (\";\n if ( is_array($this->database_fields) ) {\n foreach ($this->database_fields as $key => $value) {\n if (!is_numeric($key)) {\n if ($value != \"\") {\n $value = self::$aDB[$this->dsn]->quote($value);\n $stmt .= \"$value,\";\n }\n }\n }\n }\n # Chop last comma\n $stmt = ereg_replace(\",$\", \"\", $stmt);\n $stmt .= \")\";\n }\n else if ( ! $this->modified )\n {\n return true;\n }\n else\n {\n $stmt = \"UPDATE `$table_name` SET \";\n foreach ($this->database_fields as $key => $value) {\n if (!is_numeric($key)) {\n if ($this->modified_fields[$key] == true) {\n $value = self::$aDB[$this->dsn]->quote($value);\n if ($value == \"\") {\n $stmt .= \"`$key` = NULL, \";\n } else {\n $stmt .= \"`$key` = $value, \";\n }\n }\n }\n }\n # Chop last comma and space\n $stmt = ereg_replace(\", $\", \"\", $stmt);\n $stmt .= \" WHERE {$GLOBALS['primary_keys'][$this->dsn][$table_name]}='$id'\";\n }\n\n $result = self::$aDB[$this->dsn]->query($stmt);\n\n if (DB::isError($result)) {\n return new Error(ERROR_BADQUERY);\n #Error::display(\"ERROR: (\". __CLASS__ .\"/\". __LINE__ .\") Query error: $stmt b/c\".$result->getMessage(), 'FATAL');\n }\n\n if ( $this->loaded == 0) {\n # Try to get the ID of the new tuple.\n $stmt = \"SELECT LAST_INSERT_ID() As {$GLOBALS['primary_keys'][$this->dsn][$table_name]}\";\n\n $result = self::$aDB[$this->dsn]->query($stmt);\n if ( $result->numRows() > 0 ) {\n $row = $result->fetchRow();\n $proposed_id = $row[$GLOBALS['primary_keys'][$this->dsn][$table_name]];\n $this->database_fields[$GLOBALS['primary_keys'][$this->dsn][$table_name]] = $proposed_id;\n }\n $result->free();\n if ($proposed_id > 0) {\n $this->loaded = 1;\n $this->id = $proposed_id;\n }\n else\n {\n return false;\n }\n }\n\n $this->modified = 0;\n unset($this->modified_fields);\n self::$object_cache[$table_name][$this->id] = $this->database_fields;\n\n return true;\n }", "title": "" }, { "docid": "84b431b70705abc517360cbaeeeca2c7", "score": "0.6320771", "text": "public function save(){\n\n $db = Service::get('db');\n $table = static::getTable();\n $this->password = md5($this->password);\n\n $fields = get_object_vars($this);\n\n $sth = $db->prepare('SHOW COLUMNS FROM '.$table);\n $sth->setFetchMode(\\PDO::FETCH_ASSOC);\n $sth->execute();\n $colums = array();\n while($row = $sth->fetch()) {\n $colums[] = $row['Field'];\n }\n\n\n $query = \"INSERT INTO \".$table.\" SET \";\n foreach($fields as $key => $value){\n if(array_search($key, $colums)){\n $query_parts[] = sprintf(\"`%s`='%s'\", $key, $fields[$key]);\n }\n }\n $query_part = implode(', ', $query_parts);\n $query .= $query_part;\n\n $sth = $db->prepare($query);\n $res = $sth->execute();\n if (!$res) throw new DatabaseException('Data save failed');\n\n }", "title": "" }, { "docid": "591df2f34f23343a3829d33fcde6b53d", "score": "0.6313001", "text": "public function saveToDb()\n\t{\n\t\t$entityInstance = $this->getModule()->getEntityInstance();\n\t\t$db = \\App\\Db::getInstance();\n\t\tforeach ($this->getValuesForSave() as $tableName => $tableData) {\n\t\t\tif ($this->isNew()) {\n\t\t\t\tif ('vtiger_crmentity' === $tableName) {\n\t\t\t\t\t$db->createCommand()->insert($tableName, $tableData)->execute();\n\t\t\t\t\t$this->setId((int) $db->getLastInsertID('vtiger_crmentity_crmid_seq'));\n\t\t\t\t} else {\n\t\t\t\t\t$db->createCommand()->insert($tableName, [$entityInstance->tab_name_index[$tableName] => $this->getId()] + $tableData)->execute();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$db->createCommand()->update($tableName, $tableData, [$entityInstance->tab_name_index[$tableName] => $this->getId()])->execute();\n\t\t\t}\n\t\t}\n\t\tif ($this->getModule()->isInventory()) {\n\t\t\t$this->saveInventoryData();\n\t\t}\n\t}", "title": "" }, { "docid": "294fcda8d7ddf126a50481758cb18208", "score": "0.631055", "text": "public function save()\n {\n // Determine if the primary keys are filled.\n if (!$this->arePrimaryKeysFilled())\n {\n throw new EntityException('entity-primary-keys-not-set');\n }\n \n // Get types and values.\n $types = $this->getTypes();\n $values = $this->getAllValues();\n \n // First do a selection to check whether entry exists (unfortunately PostgreSQL does \n // not directly support 'INSERT OR UPDATE' syntax).\n $result = $this->getSelectQuery()->execute($this->getPrimaryKeyValues());\n \n if ($result->getAmount() == 0)\n {\n // Entry does not exist, do an insertion.\n $this->getInsertQuery(false)->execute($values, $types);\n }\n else\n {\n // Update existing entry.\n $this->getUpdateQuery()->execute($values, $types);\n }\n }", "title": "" }, { "docid": "b4695f6a0414fbed8bb8bde2fc275f8b", "score": "0.63048345", "text": "public function save()\n {\n return $this->isPersisted() ? $this->update() : $this->insert();\n }", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6300407", "text": "public function save();", "title": "" }, { "docid": "61038eedc41b32f0bf70f6cef6704a25", "score": "0.6295967", "text": "public function save() {\n if (!isset($this->data['created_at'])) {\n $this->data['created_at'] = date(\"Y-m-d H:i:s\", time());\n }\n if (!$this->id) {\n $cnt = $this->count();\n if ($cnt > self::MAX_ROW) {\n $this->tableRotate();\n $this->newTable();\n }\n return self::getDB()->insert($this->tableName(), $this->data);\n }\n return self::getDB()->update($this->tableName(), $this->data, sprintf(\"id=%d\", $this->id));\n }", "title": "" }, { "docid": "5ef8c262e0a8694680f7cd5bca8eecfa", "score": "0.6277088", "text": "function save()\n {\n $statement = $GLOBALS['DB']->query(\"INSERT INTO tasks (description, category_id) VALUES\n ('{$this->getDescription()}', {$this->getCategoryId()}) RETURNING id;\");\n //use PDO fetch method to get id and put into assoc array\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n //setting setId to result\n $this->setId($result['id']);\n }", "title": "" }, { "docid": "dc46bf5effb202f59c4ea0b34046d77a", "score": "0.6271507", "text": "public function save() {\n\t // A new record won't have an id yet.\n\t return isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "c69781c0f69f620d3031fa274b313c2d", "score": "0.6260478", "text": "public function save() {\r\n\t\tif (empty($this->id)) {\r\n\t\t\treturn $this->saveNew();\r\n\t\t}else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1cadd91e5a3b6b7699ce14e3e634ba54", "score": "0.625825", "text": "function onSave()\n {\n try\n {\n // open a transaction with database\n TTransaction::open($this->database);\n\n // get the form data\n $object = $this->form->getData($this->activeRecord);\n\n // validate data\n $this->form->validate();\n\n // stores the object\n $object->store();\n\n // fill the form with the active record data\n $this->form->setData($object);\n\n // close the transaction\n TTransaction::close();\n\n // shows the success message\n new TMessage('info', TAdiantiCoreTranslator::translate('Record saved'));\n // reload the listing\n }\n catch (Exception $e) // in case of exception\n {\n // get the form data\n $object = $this->form->getData($this->activeRecord);\n\n // fill the form with the active record data\n $this->form->setData($object);\n\n // shows the exception error message\n new TMessage('error', $e->getMessage());\n\n // undo all pending operations\n TTransaction::rollback();\n }\n }", "title": "" }, { "docid": "d614c1b6fed82f3b4c1551940c920b03", "score": "0.62570953", "text": "protected function _insert()\n {\n\n $oDb = oxDb::getDb(oxDb::FETCH_MODE_ASSOC);\n $myConfig = $this->getConfig();\n $myUtils = oxRegistry::getUtils();\n\n // let's get a new ID\n if (!$this->getId()) {\n $this->setId();\n }\n\n $sIDKey = $myUtils->getArrFldName($this->getCoreTableName() . '.oxid');\n $this->$sIDKey = new oxField($this->getId(), oxField::T_RAW);\n $sInsert = \"Insert into {$this->getCoreTableName()} set \";\n\n //setting oxshopid\n $sShopField = $myUtils->getArrFldName($this->getCoreTableName() . '.oxshopid');\n\n if (isset($this->$sShopField) && !$this->$sShopField->value) {\n $this->$sShopField = new oxField($myConfig->getShopId(), oxField::T_RAW);\n }\n\n $sInsert .= $this->_getUpdateFields($this->getUseSkipSaveFields());\n\n $blRet = (bool) $oDb->execute($sInsert);\n\n\n return $blRet;\n }", "title": "" }, { "docid": "7ec6911ada5b76f80bf378f47ac86a13", "score": "0.62545013", "text": "abstract protected function doSave(EntryInterface $entry);", "title": "" }, { "docid": "8c35dc3f9a6cccc7bcbb8a1810c8bbf5", "score": "0.6241654", "text": "public function save()\n {\n return $this->{static::$primaryKey} === NULL ? $this->create() :$this->update() ;\n }", "title": "" }, { "docid": "7dea2ed23e4e8e201edbfe0a7d6b1860", "score": "0.624091", "text": "public function save()\n\t{\n\t\t$this->change_before_save();\n\t\t$models = $this->format_post_to_save_models();\n\t\t$result = $this->save_models($models);\n\t\t$this->process_result($result);\n\t\t$success_save = $this->execute_after_save($result);\n\t\tif($success_save && $success_alert = $this->get_save_success_alert()) {\n\t\t\t$this->session->add_alert_message($success_alert);\n\t\t} else if($danger_alert = $this->get_save_danger_alert()) {\n\t\t\t$this->session->add_alert_message($danger_alert, \"danger\");\n\t\t}\n\t\t//header(\"Location: \".$_POST[\"redirect\"]);\n\t}", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.6229543", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.6229543", "text": "abstract public function save();", "title": "" } ]
9ee57b403dc62b96a4bf99f580e8889c
Method: reset_db_parameter_group() This API modifies the parameters of a DBParameterGroup to the engine/system default value. To reset specific parameters submit a list of the following: ParameterName and ApplyMethod. To reset the entire DBParameterGroup specify the DBParameterGroup name and ResetAllParameters parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to pendingreboot to take effect on the next MySQL reboot or RebootDBInstance request. Access: public Parameters: $db_parameter_group_name _string_ (Required) The name of the DB Parameter Group. $opt _array_ (Optional) An associative array of parameters that can have the keys listed in the following section. Keys for the $opt parameter: ResetAllParameters _boolean_ (Optional) Specifies whether (`true`) or not (`false`) to reset all parameters in the DB Parameter Group to default values. Parameters _ComplexList_ (Optional) An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of keyvalue pairs. These pairs can be set one of two ways: by setting each individual `Parameters` subtype (documented next), or by passing an associative array with the following `Parameters`prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example. Parameters.x.ParameterName _string_ (Optional) Specifies the name of the parameter. Parameters.x.ParameterValue _string_ (Optional) Specifies the value of the parameter. Parameters.x.Description _string_ (Optional) Provides a description of the parameter. Parameters.x.Source _string_ (Optional) Indicates the source of the parameter value. Parameters.x.ApplyType _string_ (Optional) Specifies the engine specific parameters type. Parameters.x.DataType _string_ (Optional) Specifies the valid data type for the parameter. Parameters.x.AllowedValues _string_ (Optional) Specifies the valid range of values for the parameter. Parameters.x.IsModifiable _boolean_ (Optional) Indicates whether (`true`) or not (`false`) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. Parameters.x.MinimumEngineVersion _string_ (Optional) The earliest engine version to which the parameter can apply. Parameters.x.ApplyMethod _string_ (Optional) Indicates when to apply parameter updates. [Allowed values: `immediate`, `pendingreboot`] returnCurlHandle _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests. Returns: _CFResponse_ A object containing a parsed HTTP response.
[ { "docid": "be82c3519cc16cb36c24bb15ce7aaed3", "score": "0.8353088", "text": "public function reset_db_parameter_group($db_parameter_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupName'] = $db_parameter_group_name;\n\n\t\t// Optional parameter\n\t\tif (isset($opt['Parameters']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'Parameters' => $opt['Parameters']\n\t\t\t), 'member'));\n\t\t\tunset($opt['Parameters']);\n\t\t}\n\n\t\treturn $this->authenticate('ResetDBParameterGroup', $opt, $this->hostname);\n\t}", "title": "" } ]
[ { "docid": "78e3d8992749d98992f78ac4dbd7a668", "score": "0.72753847", "text": "public function modify_db_parameter_group($db_parameter_group_name, $parameters, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupName'] = $db_parameter_group_name;\n\n\t\t// Required parameter\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'Parameters' => (is_array($parameters) ? $parameters : array($parameters))\n\t\t), 'member'));\n\n\t\treturn $this->authenticate('ModifyDBParameterGroup', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "13ceede817eb60f03a80f3607b619edd", "score": "0.63895285", "text": "public function delete_db_parameter_group($db_parameter_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupName'] = $db_parameter_group_name;\n\n\t\treturn $this->authenticate('DeleteDBParameterGroup', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "eee22dee0bd1c35736d8b19c27a13ac8", "score": "0.5684579", "text": "public function describe_db_parameters($db_parameter_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupName'] = $db_parameter_group_name;\n\n\t\treturn $this->authenticate('DescribeDBParameters', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "b289a748a105adc68626579be79e7cc2", "score": "0.56356597", "text": "public function describe_db_parameter_groups($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\n\t\treturn $this->authenticate('DescribeDBParameterGroups', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "89585f2519496d0288714315585cee19", "score": "0.54002506", "text": "public function create_db_parameter_group($db_parameter_group_name, $db_parameter_group_family, $description, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupName'] = $db_parameter_group_name;\n\t\t$opt['DBParameterGroupFamily'] = $db_parameter_group_family;\n\t\t$opt['Description'] = $description;\n\n\t\treturn $this->authenticate('CreateDBParameterGroup', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "f517b084d0ced2801eed9c0806dcfd78", "score": "0.50166625", "text": "public function describe_engine_default_parameters($db_parameter_group_family, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBParameterGroupFamily'] = $db_parameter_group_family;\n\n\t\treturn $this->authenticate('DescribeEngineDefaultParameters', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "b7902c16fb823111cf33d1ef23ef93eb", "score": "0.4945317", "text": "public function UserPositionGroupUpdate($arrParameter){\r\n\t\t$psSql = \"Exec dbo.USER_PositionGroupUpdate \";\t\r\n\t\t$psSql .= \"'\" . $arrParameter['PK_POSITION_GROUP'] . \"'\";\r\n\t\t$psSql .= \",'\" . $arrParameter['C_CODE'] . \"'\";\r\n\t\t$psSql .= \",'\" . $arrParameter['C_NAME'] . \"'\";\r\n\t\t$psSql .= \",'\" . $arrParameter['C_ORDER'] . \"'\";\r\n\t\t$psSql .= \",'\" . $arrParameter['C_STATUS'] . \"'\";\r\n\t\t//echo htmlspecialchars($psSql); exit;\r\n\t\ttry {\t\t\t\r\n\t\t\t$arrTempResult = $this->adodbExecSqlString($psSql) ; \r\n\t\t}catch (Exception $e){\r\n\t\t\techo $e->getMessage();\r\n\t\t};\r\n\t\treturn $arrTempResult;\t\t\r\n\t}", "title": "" }, { "docid": "7d156cf98c7cd8140ff4d1fb324bf265", "score": "0.49051106", "text": "public function update_auto_scaling_group($auto_scaling_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['AutoScalingGroupName'] = $auto_scaling_group_name;\n\t\t\n\t\t// Optional list (non-map)\n\t\tif (isset($opt['AvailabilityZones']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'AvailabilityZones' => (is_array($opt['AvailabilityZones']) ? $opt['AvailabilityZones'] : array($opt['AvailabilityZones']))\n\t\t\t), 'member'));\n\t\t\tunset($opt['AvailabilityZones']);\n\t\t}\n\n\t\treturn $this->authenticate('UpdateAutoScalingGroup', $opt);\n\t}", "title": "" }, { "docid": "30acc49b81b28e3f230c06e70d164bc0", "score": "0.4880293", "text": "public function getGroupParams ($group_name)\n\t{\n\t\t$jinput = JFactory::getApplication()->input;\n\n\t\tif ($jinput->get('option', null) == 'com_dump')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isset($GLOBALS[$this->plg_name]['variable_group_name'][$group_name]))\n\t\t{\n\t\t\t$GLOBALS[$this->plg_name]['variable_group_name'][$group_name] = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Get defauls values from XML {\n\t\t$group_name_start = $group_name;\n\t\t$group_name_end = str_replace('{', '', $group_name) . '}';\n\t\t$xmlfile = $this->plg_path . '/' . $this->plg_name . '.xml';\n\t\t$xml = simplexml_load_file($xmlfile);\n\n\t\t$field = 'field';\n\t\t$xpath = 'config/fields/fieldset';\n\n\t\t$started = false;\n\t\t$defaults = array();\n\n\t\tforeach ($xml->xpath('//' . $xpath . '/' . $field) as $f)\n\t\t{\n\t\t\t$field_name = (string) $f['name'];\n\n\t\t\tif ($field_name == $group_name_start)\n\t\t\t{\n\t\t\t\t$started = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!$started)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (in_array($f['basetype'], array('toggler', 'blockquote', 'note')))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$defaults[$field_name] = '';\n\n\t\t\t$def = (string) $f['default'];\n\n\t\t\tif (!empty($f['defaultAddition']))\n\t\t\t{\n\t\t\t\t$def .= $this->getDefaultAddtion((string) $f['defaultAddition']);\n\t\t\t}\n\n\t\t\tif (!empty($def))\n\t\t\t{\n\t\t\t\t$defaults[$field_name] = $def;\n\t\t\t}\n\t\t\telseif ($def == 0)\n\t\t\t{\n\t\t\t\t$defaults[$field_name] = $def;\n\t\t\t}\n\n\t\t\tif ($field_name == $group_name_end)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Get defauls values from XML }\n\n\t\t// Get all parameters\n\t\t$params = $this->params->toObject();\n\n\t\t$pparams = array();\n\t\t/*\n\t\tif (empty($params->{$group_name})) {\n\t\t\t$override_parameters = array (\n\t\t\t\t'ruleEnabled'=>$this->paramGet('ruleEnabled'),\n\t\t\t\t'menuname'=>$this->paramGet('menuname'),\n\t\t\t\t'show_articles'=>$this->paramGet('show_articles'),\n\t\t\t\t'categories'=>$this->paramGet('categories'),\n\t\t\t\t'regeneratemenu'=>$this->paramGet('regeneratemenu')\n\t\t\t);\n\t\t\t$pparams[] = $override_parameters;\n\t\t}\n\t\t*/\n\n\t\tif (empty($params->{$group_name}))\n\t\t{\n\t\t\t$params->{$group_name} = array();\n\t\t}\n\n\t\t$pparams_temp = $params->{$group_name};\n\n\t\tforeach ($pparams_temp as $fieldname => $values)\n\t\t{\n\t\t\t$group_number = 0;\n\t\t\t$values = (array) $values;\n\n\t\t\tforeach ($values as $n => $value)\n\t\t\t{\n\t\t\t\tif ($value == 'variablefield::' . $group_name)\n\t\t\t\t{\n\t\t\t\t\t$group_number++;\n\t\t\t\t}\n\t\t\t\telseif (is_array($value) && $value[0] == 'variablefield::' . $group_name)\n\t\t\t\t{\n\t\t\t\t\tif (!isset($pparams[$group_number][$fieldname]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pparams[$group_number][$fieldname] = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$group_number++;\n\t\t\t\t}\n\t\t\t\telseif (is_array($value) )\n\t\t\t\t{\n\t\t\t\t\t$pparams[$group_number][$fieldname][] = $value[0];\n\t\t\t\t}\n\t\t\t\telseif ( $fieldname == $group_name )\n\t\t\t\t{\n\t\t\t\t\t$pparams[$group_number][$fieldname][] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pparams[$group_number][$fieldname] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update params with default values if there are no stored in the DB. Usefull when adding a new XML field and a user don't resave settings {\n\t\tforeach ($pparams as $param_key => $param)\n\t\t{\n\t\t\tforeach ($defaults as $k => $v)\n\t\t\t{\n\t\t\t\tif (!isset($param[$k]))\n\t\t\t\t{\n\t\t\t\t\t$pparams[$param_key][$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update params with default values if there are no stored in the DB. Usefull when adding a new XML field and a user don't resave settings }\n\n\t\t$this->pparams = $pparams;\n\t}", "title": "" }, { "docid": "56a34173f0dae9da169b7b7bc30a109b", "score": "0.4557805", "text": "protected static function insertGroupOptions($groupID, $groupOptions = array(), $update = false) { \n\t\t// get default values from options.\n\t\t$defaultValues = array();\n\t\tif (!$update) {\n\t\t\t$sql = \"SELECT\toptionID, defaultValue\n\t\t\t\tFROM\twcf\".WCF_N.\"_group_option\";\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\t\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$defaultValues[$row['optionID']] = $row['defaultValue'];\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// build the sql strings. \n\t\t$inserts = '';\n\t\tforeach ($groupOptions as $option) {\n\t\t\tif (!empty($inserts)) $inserts .= ',';\n\t\t\t$inserts .= \"(\".$groupID.\", \".$option['optionID'].\", '\".escapeString($option['optionValue']).\"')\";\n\t\t\t\n\t\t\t// the value of this option was send via \"activeOptions\".\n\t\t\tunset($defaultValues[$option['optionID']]);\n\t\t}\n\t\t\n\t\t// add default values from inactive options.\n\t\tforeach ($defaultValues as $optionID => $optionValue) {\n\t\t\tif (!empty($inserts)) $inserts .= ',';\n\t\t\t$inserts .= \"(\".$groupID.\", \".$optionID.\", '\".escapeString($optionValue).\"')\";\n\t\t}\n\t\t\n\t\tif (!empty($inserts)) {\n\t\t\t$sql = \"REPLACE INTO\twcf\".WCF_N.\"_group_option_value\n\t\t\t\t\t\t(groupID, optionID, optionValue)\n\t\t\t\tVALUES \t\t\".$inserts;\n\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "8711e7f3dd002dedac1739005b60fdb2", "score": "0.45305288", "text": "public function updateGroup($group_id, $paramsRequest);", "title": "" }, { "docid": "afdc39afce4a6028a0459c1f737b80e4", "score": "0.44939414", "text": "private function updateDefaultSecurityGroups(array $parms){\n //$sArray = readGenLookups($dbh, \"Group_Code\");\n $stmt = $this->dbh->query(\"select Group_Code as Code, Description from w_groups\");\n $groups = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($groups as $g) {\n $sArray[$g['Code']] = $g;\n }\n\n\n\n $secRS = new W_idp_secgroupsRS();\n $secRS->idIdp->setStoredVal($this->IdpId);\n $rows = EditRS::select($this->dbh, $secRS, array($secRS->idIdp));\n\n foreach ($rows as $r) {\n $sArray[$r['idSecGroup']][\"exist\"] = \"t\";\n }\n\n $updtd = FALSE;\n\n foreach ($sArray as $g) {\n\n if (!isset($g[\"exist\"]) && in_array($g[\"Code\"], $parms)) {\n\n // new group code to put into the database\n $secRS = new W_idp_secgroupsRS();\n $secRS->idIdp->setNewVal($this->IdpId);\n $secRS->idSecGroup->setNewVal($g[\"Code\"]);\n $n = EditRS::insert($this->dbh, $secRS);\n\n $updtd = TRUE;\n\n } else if (isset($g[\"exist\"]) && !in_array($g[\"Code\"], $parms)) {\n\n // group code to delete from the database.\n $secRS = new W_idp_secgroupsRS();\n $secRS->idIdp->setStoredVal($this->IdpId);\n $secRS->idSecGroup->setStoredVal($g[\"Code\"]);\n $n = EditRS::delete($this->dbh, $secRS, array($secRS->idIdp, $secRS->idSecGroup));\n\n if ($n == 1) {\n $updtd = TRUE;\n }\n }\n }\n return $updtd;\n }", "title": "" }, { "docid": "98d16f62b287ed26145a4cf50653c6fe", "score": "0.44380823", "text": "function pmp_default_group() {\n\tcheck_ajax_referer('pmp_ajax_nonce', 'security');\n\n\t$group = json_decode(stripslashes($_POST['group']));\n\n\tupdate_option('pmp_default_group', $group->attributes->guid);\n\n\tprint json_encode(array(\"success\" => true));\n\twp_die();\n}", "title": "" }, { "docid": "fc0df0a6469e979be328e52eb3be5bfb", "score": "0.44175908", "text": "public function testUpdateGroup()\n {\n }", "title": "" }, { "docid": "a1c3db25790719630d19daec30ec3f08", "score": "0.44165802", "text": "function clearParameters() {\r\n\r\n\t\tif($this->parameters != NULL) {\r\n #parameters.setLocked(false); // !!!\r\n $this->parameters = array();\r\n\t\t} else {\r\n $this->parameters = array();\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "6c95a1fd9f5057d98ea0ec0a360e436f", "score": "0.44127786", "text": "public function update($userGroupID, $groupName, $relThemeID, $subscriberAreaLogoutURL, $forceUnsubscriptionLink, $forceRejectOptLink, $permissions, $paymentSystem, $paymentPricingRange, $paymentCampaignsPerRecipient, $paymentCampaignsPerCampaignCost, $paymentAutoRespondersChargeAmount, $paymentAutoRespondersPerRecipient, $paymentDesignPrevChargeAmount, $paymentDesignPrevChargePerReq, $paymentSystemChargeAmount, $limitSubscribers, $limitLists, $limitCampaignSendPerPeriod, $limitEmailSendPerPeriod, $plainEmailHeader, $plainEmailFooter, $hTMLEmailHeader, $hTMLEmailFooter, $trialGroup, $trialExpireSeconds, $sendMethod, $sendMethodSaveToDiskDir, $sendMethodPowerMTAVMTA, $sendMethodPowerMTADir, $sendMethodLocalMTAPath, $sendMethodSMTPHost, $sendMethodSMTPPort, $sendMethodSMTPSecure, $sendMethodSMTPTimeOut, $sendMethodSMTPAuth, $sendMethodSMTPUsername, $sendMethodSMTPPassword)\n\t{\n\n\t\t$command = \"Command=UserGroup.Update\";\n\t\t$userGroupID = \"UserGroupID=\".$userGroupID;\n\t\t$groupName = \"GroupName=\".$groupName;\n\t\t$relThemeID = \"RelThemeID=\".$relThemeID;\n\t\t$subscriberAreaLogoutURL = \"SubscriberAreaLogoutURL=\".$subscriberAreaLogoutURL;\n\t\t$forceUnsubscriptionLink = \"ForceUnsubscriptionLink=\".$forceUnsubscriptionLink;\n\t\t$forceRejectOptLink = \"ForceRejectOptLink=\".$forceRejectOptLink;\n\t\t$permissions = \"Permissions=\".$permissions;\n\t\t$paymentSystem = \"PaymentSystem=\".$paymentSystem;\n\t\t$paymentPricingRange = \"PaymentPricingRange=\".$paymentPricingRange;\n\t\t$paymentCampaignsPerRecipient = \"PaymentCampaignsPerRecipient=\".$paymentCampaignsPerRecipient;\n\t\t$paymentCampaignsPerCampaignCost = \"PaymentCampaignsPerCampaignCost=\".$paymentCampaignsPerCampaignCost;\n\t\t$paymentAutoRespondersChargeAmount = \"PaymentAutoRespondersChargeAmount=\".$paymentAutoRespondersChargeAmount;\n\t\t$paymentAutoRespondersPerRecipient = \"PaymentAutoRespondersPerRecipient=\".$paymentAutoRespondersPerRecipient;\n\t\t$paymentDesignPrevChargeAmount = \"PaymentDesignPrevChargeAmount=\".$paymentDesignPrevChargeAmount;\n\t\t$paymentDesignPrevChargePerReq = \"PaymentDesignPrevChargePerReq=\".$paymentDesignPrevChargePerReq;\n\t\t$paymentSystemChargeAmount = \"PaymentSystemChargeAmount=\".$paymentSystemChargeAmount;\n\t\t$limitSubscribers = \"LimitSubscribers=\".$limitSubscribers;\n\t\t$limitLists = \"LimitLists=\".$limitLists;\n\t\t$limitCampaignSendPerPeriod = \"LimitCampaignSendPerPeriod=\".$limitCampaignSendPerPeriod;\n\t\t$limitEmailSendPerPeriod = \"LimitEmailSendPerPeriod=\".$limitEmailSendPerPeriod;\n\t\t$plainEmailHeader = \"PlainEmailHeader=\".$plainEmailHeader;\n\t\t$plainEmailFooter = \"PlainEmailFooter=\".$plainEmailFooter;\n\t\t$hTMLEmailHeader = \"HTMLEmailHeader=\".$hTMLEmailHeader;\n\t\t$hTMLEmailFooter = \"HTMLEmailFooter=\".$hTMLEmailFooter;\n\t\t$trialGroup = \"TrialGroup=\".$trialGroup;\n\t\t$trialExpireSeconds = \"TrialExpireSeconds=\".$trialExpireSeconds;\n\t\t$sendMethod = \"SendMethod=\".$sendMethod;\n\t\t$sendMethodSaveToDiskDir = \"SendMethodSaveToDiskDir=\".$sendMethodSaveToDiskDir;\n\t\t$sendMethodPowerMTAVMTA = \"SendMethodPowerMTAVMTA=\".$sendMethodPowerMTAVMTA;\n\t\t$sendMethodPowerMTADir = \"SendMethodPowerMTADir=\".$sendMethodPowerMTADir;\n\t\t$sendMethodLocalMTAPath = \"SendMethodLocalMTAPath=\".$sendMethodLocalMTAPath;\n\t\t$sendMethodSMTPHost = \"SendMethodSMTPHost=\".$sendMethodSMTPHost;\n\t\t$sendMethodSMTPPort = \"SendMethodSMTPPort=\".$sendMethodSMTPPort;\n\t\t$sendMethodSMTPSecure = \"SendMethodSMTPSecure=\".$sendMethodSMTPSecure;\n\t\t$sendMethodSMTPTimeOut = \"SendMethodSMTPTimeOut=\".$sendMethodSMTPTimeOut;\n\t\t$sendMethodSMTPAuth = \"SendMethodSMTPAuth=\".$sendMethodSMTPAuth;\n\t\t$sendMethodSMTPUsername = \"SendMethodSMTPUsername=\".$sendMethodSMTPUsername;\n\t\t$sendMethodSMTPPassword = \"SendMethodSMTPPassword=\".$sendMethodSMTPPassword;\n\t\t\n\t\t$apiPath = $command\n\t\t\t\t\t\t.'&'.$userGroupID\n\t\t\t\t\t\t.'&'.$groupName\n\t\t\t\t\t\t.'&'.$relThemeID\n\t\t\t\t\t\t.'&'.$subscriberAreaLogoutURL\n\t\t\t\t\t\t.'&'.$forceUnsubscriptionLink\n\t\t\t\t\t\t.'&'.$forceRejectOptLink\n\t\t\t\t\t\t.'&'.$permissions\n\t\t\t\t\t\t.'&'.$paymentSystem\n\t\t\t\t\t\t.'&'.$paymentPricingRange\n\t\t\t\t\t\t.'&'.$paymentCampaignsPerRecipient\n\t\t\t\t\t\t.'&'.$paymentCampaignsPerCampaignCost\n\t\t\t\t\t\t.'&'.$paymentAutoRespondersChargeAmount\n\t\t\t\t\t\t.'&'.$paymentAutoRespondersPerRecipient\n\t\t\t\t\t\t.'&'.$paymentDesignPrevChargeAmount\n\t\t\t\t\t\t.'&'.$paymentDesignPrevChargePerReq\n\t\t\t\t\t\t.'&'.$paymentSystemChargeAmount\n\t\t\t\t\t\t.'&'.$limitSubscribers\n\t\t\t\t\t\t.'&'.$limitLists\n\t\t\t\t\t\t.'&'.$limitCampaignSendPerPeriod\n\t\t\t\t\t\t.'&'.$limitEmailSendPerPeriod\n\t\t\t\t\t\t.'&'.$plainEmailHeader\n\t\t\t\t\t\t.'&'.$plainEmailFooter\n\t\t\t\t\t\t.'&'.$hTMLEmailHeader\n\t\t\t\t\t\t.'&'.$hTMLEmailFooter\n\t\t\t\t\t\t.'&'.$trialGroup\n\t\t\t\t\t\t.'&'.$trialExpireSeconds\n\t\t\t\t\t\t.'&'.$sendMethod\n\t\t\t\t\t\t.'&'.$sendMethodSaveToDiskDir\n\t\t\t\t\t\t.'&'.$sendMethodPowerMTAVMTA\n\t\t\t\t\t\t.'&'.$sendMethodPowerMTADir\n\t\t\t\t\t\t.'&'.$sendMethodLocalMTAPath\n\t\t\t\t\t\t.'&'.$sendMethodSMTPHost\n\t\t\t\t\t\t.'&'.$sendMethodSMTPPort\n\t\t\t\t\t\t.'&'.$sendMethodSMTPSecure\n\t\t\t\t\t\t.'&'.$sendMethodSMTPTimeOut\n\t\t\t\t\t\t.'&'.$sendMethodSMTPAuth\n\t\t\t\t\t\t.'&'.$sendMethodSMTPUsername\n\t\t\t\t\t\t.'&'.$sendMethodSMTPPassword\n\t\t;\n\n\t\treturn SessionData::getSession()->getResponse($apiPath);\n\n\t}", "title": "" }, { "docid": "d8a65653ac3a8c51dc278b277e905f08", "score": "0.4362089", "text": "public function suspend_processes($auto_scaling_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['AutoScalingGroupName'] = $auto_scaling_group_name;\n\t\t\n\t\t// Optional list (non-map)\n\t\tif (isset($opt['ScalingProcesses']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'ScalingProcesses' => (is_array($opt['ScalingProcesses']) ? $opt['ScalingProcesses'] : array($opt['ScalingProcesses']))\n\t\t\t), 'member'));\n\t\t\tunset($opt['ScalingProcesses']);\n\t\t}\n\n\t\treturn $this->authenticate('SuspendProcesses', $opt);\n\t}", "title": "" }, { "docid": "3c46b863bf7280aa623762c7429233c9", "score": "0.43593234", "text": "function setParams($option, $param = false)\n {\n return $this->IC->set_parameters($option, $param);\n }", "title": "" }, { "docid": "8aafa19c6b1673da4cdf2940cdbf9f4a", "score": "0.43570462", "text": "public function resetParams()\n {\n $this->reset();\n return $this;\n }", "title": "" }, { "docid": "34be6fb6834959c46c51ff14388177bc", "score": "0.4357015", "text": "public function setGroup(FieldOptionGroup &$optionGroup): void {\n $this->group = &$optionGroup;\n }", "title": "" }, { "docid": "1330011e3962794addd6b0df85c333ab", "score": "0.4356769", "text": "public function reset($next = true)\n {\n if ($next and $this->dbReset) {\n $this->dbPending = array();\n $this->dbApplied = array();\n $this->dbBuilder = null;\n $this->withApplied = array();\n }\n\n // Reset on the next call?\n $this->dbReset = $next;\n\n return $this;\n }", "title": "" }, { "docid": "a8e2d8709c59be9e14ecabaa1ae66073", "score": "0.4352661", "text": "function update_chart_parameters()\n{\n\t$root=&$_SESSION[\"webcharts\"];\n\t$params_saved=0;\n\t$arr_join_tables=getChartTablesList();\n\tif(!count($root[\"parameters\"]))\n\t\treturn;\n\tforeach($root[\"parameters\"] as $idx=>$arr)\n\t{\n\t\t$appear=false;\n\t\tif(is_groupby_chart())\n\t\t{\n//\tcheck if the parameter appear in the group_by_condition\n\t\t\tfor($i=0;$i<count($root[\"group_by_condition\"])-1;$i++)\n\t\t\t{\n\t\t\t\tif($root[\"group_by_condition\"][$i][\"field_opt\"]!=$arr[\"table\"].\".\".$arr[\"name\"])\n\t\t\t\t\tcontinue;\n\t\t\t\tif($arr[\"agr_func\"]==$root[\"group_by_condition\"][$i][\"group_by_value\"] || !$arr[\"agr_func\"] && $root[\"group_by_condition\"][$i][\"group_by_value\"]==\"GROUP BY\")\n\t\t\t\t{\n\t\t\t\t\t$appear=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$root[\"parameters\"][$idx][\"agr_func\"]=\"\";\n\t\t\t//\tcheck if the field appear in the list of tables\n\t\t\tforeach($arr_join_tables as $tbl)\n\t\t\t{\n\t\t\t\tif($tbl!=$arr[\"table\"])\n\t\t\t\t\tcontinue;\n\t\t\t\t$fields=WRGetFieldsList($tbl);\n\t\t\t\tforeach($fields as $f)\n\t\t\t\t{\n\t\t\t\t\tif($f==$arr[\"name\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$appear=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($appear)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($appear)\n\t\t{\n\t\t\t$params_saved++;\n\t\t\tcontinue;\n\t\t}\n//\t\tclean up parameter\n\t\t$root[\"parameters\"][$idx][\"name\"]=\"\";\n\t\t$root[\"parameters\"][$idx][\"table\"]=\"\";\n\t\t$root[\"parameters\"][$idx][\"agr_func\"]=\"\";\n\t\t$root[\"parameters\"][$idx][\"label\"]=\"\";\n\t}\n\tif(!$root[\"parameters\"][0][\"name\"])\n\t{\n//\tadd first default parameter\n\t\tset_default_chart_parameter(0,false,true);\n\t\tif(!$root[\"parameters\"][0][\"name\"])\n\t\t\tset_default_chart_parameter(0,true,true);\n\t\t\n\t}\n\tif(!$root[\"parameters\"][count($root[\"parameters\"])-1][\"name\"])\n\t{\n//\tadd first default parameter\n\t\tset_default_chart_parameter(count($root[\"parameters\"])-1,true,false);\n\t}\n}", "title": "" }, { "docid": "c5c23b021f6be24e0a4950f92d4e8f5f", "score": "0.43455917", "text": "function set_parameter($parameter = array())\n {\n if (isset($parameter['primary_key']))\n {\n unset($parameter['primary_key']);\n }\n $this->parameter = array_merge($this->parameter, $parameter);\n }", "title": "" }, { "docid": "000f6e2fcf89b69c1bfd4edf9f5d7392", "score": "0.43450558", "text": "public function testUpdateGroup()\n {\n $group = $this->objects['updatedGroup'];\n $group->visibility = 'displayed';\n $group->list_id = null;\n \n $group = Tinebase_Group::getInstance()->updateGroup($group);\n \n $this->assertEquals($this->objects['updatedGroup']->name, $group->name);\n $this->assertEquals($this->objects['updatedGroup']->description, $group->description);\n $this->assertEquals('hidden', $group->visibility);\n }", "title": "" }, { "docid": "fb426cb7c2d3f044cff5fa1897f84026", "score": "0.43235004", "text": "public function updateFirewallGroup($options)\r\n {\r\n if (in_array($options['group_id'], $this->ids)) {\r\n $url = $this->api::FIREWALLS_URL . \"/\" . $options['group_id'];\r\n } else {\r\n throw new InvalidParameterException(\"That Firewall Group ID isn't associated with your account\");\r\n }\r\n $ba['description'] = $this->d_description;\r\n (isset($options['description'])) ? $ba['description'] = $options['description'] : null;\r\n $body = json_encode($ba);\r\n return $this->api->makeAPICall('PUT', $url, $body);\r\n }", "title": "" }, { "docid": "bb0bced3797ec4710d7e2a4e7471b24b", "score": "0.4318448", "text": "function padma_framework_maintenance_admin_options_group_name() {\n\tif ( $option = get_option( 'padma_framework' ) ) {\n\t\n\t\tupdate_option( 'padma_framework_options', $option );\n\t\t\n\t\tdelete_option( 'padma_framework' );\n\t\t\n\t}\n\n}", "title": "" }, { "docid": "6ce4e3f92962252fa6aa2313c0cd2a44", "score": "0.4312203", "text": "public function testUpdateGroup(){\n $this->assertNotNull($this->mysqli);\n \n //create group\n $this->group = new Group(null, $this->user->getUserID(), null, \"../images/default-avatar.jpg\", \"Albuquerque\", \"We are cool\", \"group-test\", 5,\"NM\", \"87124\", 1);\n \n //insert group\n $this->group->insert($this->mysqli);\n \n //update group\n $newDescription = \"We are the best, around. NOTHING will EVER bring us down\";\n $this->group->setGroupDescription($newDescription);\n $this->group->update($this->mysqli);\n \n //did it update?\n $this->assertNotNull($this->group->getGroupID());\n $this->assertTrue($this->group->getGroupID() > 0);\n $this->assertNotNull($this->group->getUserID());\n $this->assertTrue($this->group->getUserID() > 0);\n $this->assertNotNull($this->group->getGroupDateCreated());\n $this->assertIdentical($this->group->getGroupAvatar(), \"../images/default-avatar.jpg\");\n $this->assertIdentical($this->group->getGroupCity(), \"Albuquerque\");\n $this->assertIdentical($this->group->getGroupDescription(), $newDescription);\n $this->assertIdentical($this->group->getGroupName(), \"group-test\");\n $this->assertIdentical($this->group->getGroupState(), \"NM\");\n $this->assertIdentical($this->group->getGroupSkill(), 5);\n $this->assertIdentical($this->group->getGroupZip(), \"87124\");\n $this->assertIdentical($this->group->getPrivacyLevel(), 1);\n }", "title": "" }, { "docid": "18978b0f7cbdfa7a614a132246af5565", "score": "0.42940024", "text": "public function applyParameters(&$parameterArray)\n {\n if (empty($parameterArray['values'])) $parameterArray['values'] = [];\n\n $value = [];\n if ($this->id !== null) $value[\"adoptionID\"] = $this->id;\n if ($this->removeContact !== null) $value[\"adoptionRemoveContact\"] = $this->removeContact;\n if ($this->changeAnimal !== null) $value[\"adoptionChangeAnimal\"] = $this->changeAnimal;\n if ($this->changeSubmittedform !== null) $value[\"adoptionChangeSubmittedform\"] = $this->changeSubmittedform;\n if ($this->removeUser !== null) $value[\"adoptionRemoveUser\"] = $this->removeUser;\n if ($this->donationAmount !== null) $value[\"adoptionDonationAmount\"] = $this->donationAmount;\n if ($this->letterSent !== null) $value[\"adoptionLetterSent\"] = $this->letterSent;\n\n if (!empty($value)) $parameterArray['values'][] = $value;\n }", "title": "" }, { "docid": "af67dcc41ec2a05c44cca7d77a27662d", "score": "0.429275", "text": "public static function getgroupmembership_parameters() {\n return new external_function_parameters(\n array('groupId' => new external_value(PARAM_INT, 'The assignment group id\"'))\n );\n }", "title": "" }, { "docid": "fa248b7f67cfe75df6d371fa64b556c0", "score": "0.42845872", "text": "public function reset( $option_arr = array() ){\n\t\t$this->options_arr\t=\t$option_arr;\n\t\treturn update_option( $this->option_group, $option_arr );\n\t}", "title": "" }, { "docid": "d8c443def93d6a1727abf114fca933af", "score": "0.42790133", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset master/detail keys\n\t\t\tif ($this->Command == \"resetall\") {\n\t\t\t\t$this->setCurrentMasterTable(\"\"); // Clear master table\n\t\t\t\t$this->DbMasterFilter = \"\";\n\t\t\t\t$this->DbDetailFilter = \"\";\n\t\t\t\t$this->idperiodo_contable->setSessionValue(\"\");\n\t\t\t}\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->idperiodo_contable->setSort(\"\");\n\t\t\t\t$this->fecha->setSort(\"\");\n\t\t\t\t$this->estado_documento_debito->setSort(\"\");\n\t\t\t\t$this->estado_documento_credito->setSort(\"\");\n\t\t\t\t$this->estado_pago_cliente->setSort(\"\");\n\t\t\t\t$this->estado_pago_proveedor->setSort(\"\");\n\t\t\t\t$this->idempresa->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "7996d348c02cfd3478cdfdd6710370d6", "score": "0.42614076", "text": "public function group($aGroup)\n\t{\n\t\t$this->_group = $aGroup;\n\t}", "title": "" }, { "docid": "b4023728ea4a037df16acead68157567", "score": "0.4248549", "text": "public static function removeDefault ($group)\n\t{\n\t\tself::setGroupSetting ($group, 'default', FALSE);\n\t}", "title": "" }, { "docid": "ab0dfb01169d3fa48bc1e917602985fe", "score": "0.42112976", "text": "public function delete_db_security_group($db_security_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBSecurityGroupName'] = $db_security_group_name;\n\n\t\treturn $this->authenticate('DeleteDBSecurityGroup', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "417dd459b46529f745a5b89df4481e2b", "score": "0.42111823", "text": "public function resetParam(Request $request)\n {\n $id = $request->input('ID_PI');\n $requestParam = [];\n $para = 'CTRL';\n $modelpara = TblParam::where('ID_PI', $id)->where('MA_PARAM', $para)->get();\n $modelpara = $modelpara[0]; \n if(!empty($modelpara)){ \n $arr_para= json_decode($modelpara['FILE_PARAM'],true); \n foreach ($arr_para['CTRLPARAMS']['OUT_CTRLS'] as $key => $value) { \n if (array_key_exists('CONDITIONS', $value)) { \n $arr_para['CTRLPARAMS']['OUT_CTRLS'][$key]['ENABLE'] = 1;\n $arr_para['CTRLPARAMS']['OUT_CTRLS'][$key]['AUTO'] = 1;\n } \n }\n $requestParam['FILE_PARAM'] = json_encode($arr_para);\n if ($modelpara->update($requestParam)){ \n echo 'Điều khiển tự động theo thiết lập ban đầu!'; \n } \n else{\n echo 'Có lỗi xử lý dữ liệu!'; \n }\n } \n }", "title": "" }, { "docid": "3679b040444ea50d7fecd46a4a70d1d2", "score": "0.42065617", "text": "public function setGroup(SkillGroup $group=null) {\n $this->group = $group;\n }", "title": "" }, { "docid": "d1aa63c0bd395f2bc512c864b79c44ac", "score": "0.41996393", "text": "private function updateGroup(Group $group) {\n try {\n\n $this->uGroup->bindValue(1, $group->getName());\n MyUtils::isEmpty($group->getDescription()) ? $this->uGroup->bindValue(2, NULL) : $this->uGroup->bindValue(2, $group->getDescription());\n $this->uGroup->bindValue(3, $group->getID());\n $this->uGroup->execute();\n\n $group->copyFrom($this->getGroup($group->getID()));\n $group->setDirty(false);\n } catch (PDOException $ex) {\n echo \"PDOEXCEPTION ===========================\";\n var_dump($ex);\n }\n\n return $this;\n }", "title": "" }, { "docid": "ff35af092c89935ce611a77ed40de13a", "score": "0.41975218", "text": "public function getGroupOptions() {\n\t\t$defaultValues = array();\n\t\t\n\t\t$sql = \"SELECT\toptionID, defaultValue\n\t\t\tFROM\twcf\".WCF_N.\"_group_option\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$defaultValues[] = array('optionID' => $row['optionID'], 'optionValue' => (is_int($row['defaultValue']) ? 0 : '' ));\t\n\t\t}\n\n\t\treturn $defaultValues;\n\t}", "title": "" }, { "docid": "d70b027723bc35978a3435a7f2834d9c", "score": "0.41896653", "text": "public function setGroup($group);", "title": "" }, { "docid": "d70b027723bc35978a3435a7f2834d9c", "score": "0.41896653", "text": "public function setGroup($group);", "title": "" }, { "docid": "6adf92e9441c66527cad9b0d6021751d", "score": "0.41779488", "text": "public function clearParameters() {\n $this->parameters = [] ;\n }", "title": "" }, { "docid": "5da1d4959f6ed5150c9cdc78a1d79a2b", "score": "0.41743603", "text": "public function setGroup($group) \n {\n $this->_group = $group; \n }", "title": "" }, { "docid": "6c9a0ff1da549f8f2522d5618e115072", "score": "0.41703072", "text": "public function reset()\n {\n global $dic;\n $dic['requestParser']->reset();\n $this->requestParameters = $dic['requestParser']->getRequestParameters();\n }", "title": "" }, { "docid": "f248db501f185c438a48924807ff4d52", "score": "0.4169464", "text": "public function updateGroup($list) {\n\n\t\tif ($list && !empty($list)) {\n\t\t\t$this->cleanGroups();\n\t\t\t$this->addGroups($list);\n\t\t} else {\n\t\t\t$this->addGroups([$this->id_default_group]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "594ec4c80cb1049d6da42a1c77856bce", "score": "0.41631323", "text": "public function setParameters($val)\n {\n $this->_propDict[\"parameters\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "858953dbef3071641f2b7d63c09c3219", "score": "0.41610336", "text": "public function setParameters($val) {\n $this->_parameters = $val;\n }", "title": "" }, { "docid": "f8261114edb221d6bfaad8d205cb0184", "score": "0.4159306", "text": "public function update($group);", "title": "" }, { "docid": "a0ddfd3c0563dfb8390ceca6288cd2b1", "score": "0.41565675", "text": "function setGroupname($param) {\n $this->groupname = $param;\n }", "title": "" }, { "docid": "a0ddfd3c0563dfb8390ceca6288cd2b1", "score": "0.41565675", "text": "function setGroupname($param) {\n $this->groupname = $param;\n }", "title": "" }, { "docid": "3759fda885e5a3b769ed2f9c9cb9daf1", "score": "0.41364995", "text": "public function setRepoParameters(array $parameters = [])\n {\n // overwrite all existing params\n $this->paramCollection->setParameters($parameters);\n }", "title": "" }, { "docid": "8de07878689b95300d8af4d2ec9d58d3", "score": "0.41330406", "text": "function pmp_modify_group() {\n\tcheck_ajax_referer('pmp_ajax_nonce', 'security');\n\n\t$group = json_decode(stripslashes($_POST['group']));\n\t$sdk = new SDKWrapper();\n\t$doc = $sdk->fetchDoc(array('guid' => $group->attributes->guid));\n\n\t$items = $doc->items();\n\t$fetched = $items[0];\n\t$fetched->attributes = (object) array_merge((array) $fetched->attributes, (array) $group->attributes);\n\n\t$result = $fetched->save();\n\n\tprint json_encode(array(\"success\" => true));\n\twp_die();\n}", "title": "" }, { "docid": "a0a695c3528d3be83481f8d458ac0d19", "score": "0.41324353", "text": "function SetGroup( $id, $name, $desc )\n {\n\t\t$this->_groupinfo_cache = null;\n if( !isset( $name ) || $name == '' ) {\n\t\t\t$this->_DisplayErrorPage ($id, $params, $return_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->Lang ('error_insufficientparams'));\n\t\t\treturn;\n\t\t}\n \n $db = $this->GetDb();\n\n $eid = $this->GetGroupID( $name );\n if( $eid != false && $eid != $id ) {\n\t\t\t$mod = $this->GetModule();\n\t\t\treturn array(FALSE,$mod->Lang('error_groupname_exists'));\n\t\t}\n \n $q = \"UPDATE \".cms_db_prefix().\"module_feusers_groups SET\n groupname = ?, groupdesc = ? WHERE id = ?\";\n $dbresult = $db->Execute( $q, array( $name, $desc, $id ) );\n if( !$dbresult ) {\n\t\t\treturn array(FALSE,$db->ErrorMsg());\n\t\t}\n\n\t\t$this->_groupinfo_cache = null;\n return array( TRUE, '');\n }", "title": "" }, { "docid": "38db96c4fa5eac2b616d183876969464", "score": "0.41270062", "text": "public function setDrupalParameters(array $parameters);", "title": "" }, { "docid": "fcfc1354f0a7df6183b2853d3d82b6f1", "score": "0.41207308", "text": "public function modifyGroup($group_id = \"\") {\n\t\tif ($this->permissions->users_groups [\"modify\"] != \"1\")\n\t\t\t$this->mfunctions->noPermission ();\n\t\tif ($group_id != \"\") {\n\t\t\t$group = $this->musers->getGroupById ( $group_id );\n\t\t\tif ($group) {\n\t\t\t\t$data [\"group\"] = $group;\n\t\t\t\tif ($_POST) {\n\t\t\t\t\t$active = (isset ( $_POST [\"active\"] ) ? \"1\" : \"0\");\n\t\t\t\t\tif ($group_id == 1)\n\t\t\t\t\t\t$active = 1;\n\t\t\t\t\t$this->form_validation->set_message ( 'required', \"%s\" );\n\t\t\t\t\t$this->form_validation->set_message ( 'is_unique', \" %s \" . lang ( \"exist\" ) );\n\t\t\t\t\t$this->form_validation->set_rules ( 'title', lang ( 'enter_group_title' ), \"trim|required|callback_checkGroupExist[$group_id]\" );\n\t\t\t\t\tif ($this->form_validation->run () == FALSE) {\n\t\t\t\t\t\t$data [\"msg\"] = \"-1\";\n\t\t\t\t\t\t$data [\"message\"] = validation_errors ();\n\t\t\t\t\t\t$data [\"target\"] = \"modify_users_group\";\n\t\t\t\t\t\t$this->load->view ( \"admin/index\", $data );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$query = $this->musers->modifyGroup ( $group_id, array (\n\t\t\t\t\t\t\t\t\"title\" => trim ( $_POST [\"title\"] ),\n\t\t\t\t\t\t\t\t\"color\" => trim ( $_POST [\"color\"] ),\n\t\t\t\t\t\t\t\t\"active\" => $active,\n\t\t\t\t\t\t\t\t\"description\" => trim ( $_POST [\"description\"] ) \n\t\t\t\t\t\t) );\n\t\t\t\t\t\tif ($query > 0)\n\t\t\t\t\t\t\t$this->mfunctions->actionReport ( \"groups\", \"modify\" );\n\t\t\t\t\t\t$this->session->set_userdata ( array (\n\t\t\t\t\t\t\t\t\"msg\" => \"1\" \n\t\t\t\t\t\t) );\n\t\t\t\t\t\tredirect ( base_url () . \"admin/users/groups\", \"refresh\" );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$data [\"target\"] = \"modify_users_group\";\n\t\t\t\t\t$this->load->view ( \"admin/index\", $data );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a6a51d437cda4915efcd250539d7e06", "score": "0.41186938", "text": "public function setGroup($var)\n {\n GPBUtil::checkString($var, True);\n $this->group = $var;\n\n return $this;\n }", "title": "" }, { "docid": "42a68c26af93532295e441562d8a2045", "score": "0.41169956", "text": "public function setGroup($group) {\n $this->group = $group;\n }", "title": "" }, { "docid": "68dfe5ff55d7a725aafec2bd2efd6f55", "score": "0.41145748", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->setSessionOrderByList($sOrderBy);\n\t\t\t\t$this->CI_RUN->setSort(\"\");\n\t\t\t\t$this->Expedido->setSort(\"\");\n\t\t\t\t$this->Apellido_Paterno->setSort(\"\");\n\t\t\t\t$this->Apellido_Materno->setSort(\"\");\n\t\t\t\t$this->Nombres->setSort(\"\");\n\t\t\t\t$this->Fecha_Nacimiento->setSort(\"\");\n\t\t\t\t$this->Estado_Civil->setSort(\"\");\n\t\t\t\t$this->Direccion->setSort(\"\");\n\t\t\t\t$this->Telefono->setSort(\"\");\n\t\t\t\t$this->Celular->setSort(\"\");\n\t\t\t\t$this->Fiscalia_otro->setSort(\"\");\n\t\t\t\t$this->Unidad_Organizacional->setSort(\"\");\n\t\t\t\t$this->Unidad->setSort(\"\");\n\t\t\t\t$this->Cargo->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "a7539dda32c7ed1cdb7a594c95428e0f", "score": "0.4100828", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->Id_Item->setSort(\"\");\n\t\t\t\t$this->codigo_item->setSort(\"\");\n\t\t\t\t$this->nombre_item->setSort(\"\");\n\t\t\t\t$this->und_item->setSort(\"\");\n\t\t\t\t$this->precio_item->setSort(\"\");\n\t\t\t\t$this->costo_item->setSort(\"\");\n\t\t\t\t$this->tipo_item->setSort(\"\");\n\t\t\t\t$this->marca_item->setSort(\"\");\n\t\t\t\t$this->cod_marca_item->setSort(\"\");\n\t\t\t\t$this->detalle_item->setSort(\"\");\n\t\t\t\t$this->saldo_item->setSort(\"\");\n\t\t\t\t$this->activo_item->setSort(\"\");\n\t\t\t\t$this->maneja_serial_item->setSort(\"\");\n\t\t\t\t$this->asignado_item->setSort(\"\");\n\t\t\t\t$this->si_no_item->setSort(\"\");\n\t\t\t\t$this->precio_old_item->setSort(\"\");\n\t\t\t\t$this->costo_old_item->setSort(\"\");\n\t\t\t\t$this->registra_item->setSort(\"\");\n\t\t\t\t$this->fecha_registro_item->setSort(\"\");\n\t\t\t\t$this->empresa_item->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "55f4c4319ab3161c8e3a4b2958e57792", "score": "0.40946814", "text": "public function setGroupId($group_id)\n {\n $this->vkarg_group_id = $group_id;\n\n return $this;\n }", "title": "" }, { "docid": "2bf7a12819bfc6651b55f37cf65afbf6", "score": "0.407683", "text": "public function initialize_fields( $group ) {\n\n\t\tif ( ! isset( $this->fields[ $group ] ) ) {\n\n\t\t\treturn;\n\t\t}\n\n\t\twp_nonce_field(\n\t\t\t\"{$this->prefix}_fieldhelpers_{$group}_save_fields\",\n\t\t\t\"{$this->prefix}_fieldhelpers_{$group}_nonce\"\n\t\t);\n\n\t\t$initialized_fields = array();\n\n\t\tforeach ( $this->fields[ $group ] as $i => $field ) {\n\n\t\t\t// Account for arrays\n\t\t\tif ( $field['args']['name_base']) {\n\n\t\t\t $field['name'] = $field['args']['name_base'];\n }\n\n\t\t\t$initialized_fields[] = $field['name'];\n\n\t\t\t$option = $field['args']['option_field'] === true ? '_option' : '';\n\t\t\t?>\n <input type=\"hidden\"\n name=\"<?php echo \"{$this->prefix}_fieldhelpers{$option}_fields[{$group}][{$i}]\"; ?>\"\n value=\"<?php echo $field['name']; ?>\"/>\n\t\t\t<?php\n\n\t\t\tif ( $field['args']['multi_field'] ) {\n\t\t\t\t?>\n <input type=\"hidden\"\n name=\"<?php echo \"{$this->prefix}_fieldhelpers_{$group}{$option}_field_{$field['name']}_multi_field\"; ?>\"\n value=\"1\"/>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8963c0164b2b619163a1f312540513e9", "score": "0.4076175", "text": "function updateGroup($post) {\n\t\tglobal $fmdb, $fm_name, $fm_login;\n\t\t\n\t\tif (!isset($post['group_id'])) return _('This is a malformed request.');\n\t\tif (empty($post['group_name'])) return _('No group name defined.');\n\t\t\n\t\t/** Check name field length */\n\t\t$field_length = getColumnLength('fm_groups', 'group_name');\n\t\tif ($field_length !== false && strlen($group_name) > $field_length) return sprintf(_('Group name is too long (maximum %d characters).'), $field_length);\n\t\t\n\t\t/** Does the record already exist for this account? */\n\t\t$query = \"SELECT * FROM `fm_groups` WHERE `group_status`!='deleted' AND `group_name`='$group_name'\";\n\t\t$fmdb->get_results($query);\n\t\tif ($fmdb->num_rows) return _('This group already exists.');\n\t\t\n\t\t$sql_edit = null;\n\t\t\n\t\t$exclude = array('submit', 'action', 'group_id', 'user_caps', 'is_ajax', 'process_user_caps', 'type', 'group_users');\n\n\t\tforeach ($post as $key => $data) {\n\t\t\tif (!in_array($key, $exclude)) {\n\t\t\t\t$sql_edit .= $key . \"='\" . sanitize($data) . \"', \";\n\t\t\t}\n\t\t}\n\t\t$sql = rtrim($sql_edit . $sql_pwd, ', ');\n\t\t\n\t\t/** Process group permissions */\n\t\tif (isset($post['process_user_caps']) && !isset($post['user_caps'])) $post['user_caps'] = array();\n\t\t\n\t\tif (isset($post['user_caps'][$fm_name])) {\n\t\t\tif (array_key_exists('do_everything', $post['user_caps'][$fm_name])) {\n\t\t\t\t$post['user_caps'] = array($fm_name => array('do_everything' => 1));\n\t\t\t}\n\t\t}\n\t\tif (isset($post['user_caps'])) {\n\t\t\t$sql .= \",group_caps='\" . serialize($post['user_caps']) . \"'\";\n\t\t}\n\t\t\n\t\t/** Update the group */\n\t\t$query = \"UPDATE `fm_groups` SET $sql WHERE `group_id`={$post['group_id']} AND `account_id`='{$_SESSION['user']['account_id']}'\";\n\t\t$result = $fmdb->query($query);\n\t\t\n\t\tif ($fmdb->sql_errors) {\n\t\t\treturn formatError(_('Could not update the group because a database error occurred.'), 'sql');\n\t\t}\n\t\t\n\t\t/* Associated users with group */\n\t\t$queries[] = \"UPDATE `fm_users` SET `user_group`='0', `user_caps`=NULL WHERE `user_group`='{$post['group_id']}'\";\n\t\t$queries[] = \"UPDATE `fm_users` SET `user_group`='{$post['group_id']}', `user_caps`=NULL WHERE `user_id` IN ('\" . join(\"','\", $post['group_users']) . \"')\";\n\t\tforeach ($queries as $query) {\n\t\t\t$fmdb->query($query);\n\t\t\tif ($fmdb->sql_errors) {\n\t\t\t\treturn formatError(_('Could not associate the users with the group.'), 'sql');\n\t\t\t}\n\t\t}\n\n\t\taddLogEntry(sprintf(_(\"Updated group '%s'.\"), $post['group_name']));\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a7c3fbcc22dff7ffd299b54d3bd5f5e7", "score": "0.40750864", "text": "function bzhychange_group_debug_mode($userGroupIds, $debugMode) {\n bzhy_value2array($userGroupIds);\n\n return DBexecute(\n\t'UPDATE usrgrp SET debug_mode='.bzhy_dbstr($debugMode).' WHERE '.bzhydbConditionInt('usrgrpid', $userGroupIds)\n );\n}", "title": "" }, { "docid": "3151b30be3cb99775e0418a6e8c76a4c", "score": "0.4069228", "text": "public function setGroup($group) {\n\t\tif(!@array_key_exists($group, $this->_properties)) {\n\t\t\t$this->_properties[$group] = array();\n\t\t}\n\t\t$this->_group = $group;\n\t}", "title": "" }, { "docid": "97536301bdbc7d64ff79c68f24b5ed4f", "score": "0.40620336", "text": "public function setParameter($parameter);", "title": "" }, { "docid": "ff3b5322f0d462e9296fad2c673462e6", "score": "0.40512002", "text": "public function setGroup($group)\n {\n $this->group = $group;\n }", "title": "" }, { "docid": "131f76bc99bbd7f3d621bd2edaaadb05", "score": "0.40458378", "text": "function update_group($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('cadetGroup',$params);\n }", "title": "" }, { "docid": "01909f8591588a3623f8c87681ad9df7", "score": "0.4044763", "text": "public function stopProcessGroup($group, $wait = true): array\n {\n return $this->rpcClient->call('supervisor.stopProcessGroup', array($group, $wait));\n }", "title": "" }, { "docid": "660ffe8a1381ba7b7ee4269e192f86c3", "score": "0.4041773", "text": "public function resetOptimizationFlagCommand()\n {\n $this->imageManipulationService->resetOptimizationFlag();\n }", "title": "" }, { "docid": "58e2ce8d4f7b4028329b58f5b4acf561", "score": "0.4037225", "text": "public function setGroup($group) {\r\n $this->group = $group;\r\n return $this;\r\n }", "title": "" }, { "docid": "069853d6fe2f3d3cfe6675d141ca86bd", "score": "0.40324098", "text": "function db_param_pop() {\n\tglobal $g_db_param;\n\t$g_db_param->pop();\n}", "title": "" }, { "docid": "a37014850b05499e680a7f95d1b7003e", "score": "0.40281847", "text": "public function reset_params()\n {\n\n $this->_query_parameters = array();\n return $this;\n }", "title": "" }, { "docid": "5e17bd27b2b311a172091605aeb8b296", "score": "0.402799", "text": "public function testUpdate(){\n $this->createInstance();\n $this->createAndLogin();\n $nameTag = uniqid('', false);\n $res = $this->fConnector->getGroupsManagement()->addGroup($nameTag,$nameTag.'s','#fgae26','bolt',null)->wait();\n $this->assertInstanceOf(FlarumGroup::class,$res);\n $this->assertEquals($res->nameSingular,$nameTag);\n $this->assertEquals($res->namePlural,$nameTag.'s');\n $this->assertEquals($res->color,'#fgae26');\n $this->assertEquals($res->icon,'bolt');\n $this->assertNotEmpty($res->groupId);\n\n $res2 = $this->fConnector->getGroupsManagement()->updateGroup($nameTag.'2',$nameTag.'s2','#fgae25','wrench',$res->groupId,null)->wait();\n $this->assertInstanceOf(FlarumGroup::class,$res2);\n $this->assertEquals($res2->nameSingular,$nameTag.'2');\n $this->assertEquals($res2->namePlural,$nameTag.'s2');\n $this->assertEquals($res2->color,'#fgae25');\n $this->assertEquals($res2->icon,'wrench');\n $this->assertNotEmpty($res2->groupId);\n\n }", "title": "" }, { "docid": "96643a3cef835e43856b8e2e7d1d8a7d", "score": "0.40249747", "text": "public function modify(\n string $groupId,\n string $name = null,\n string $introduction = null,\n string $notification = null,\n string $faceUrl = null,\n int $maxMemberNum = null,\n string $shutUpAll = null,\n string $applyJoinOption = GroupConstant::FREE_ACCESS,\n ParameterList $appDefinedData = null\n ) {\n $params['GroupId'] = $groupId;\n Arr::setNotNullValue($params, 'Name', $name);\n Arr::setNotNullValue($params, 'Introduction', $introduction);\n Arr::setNotNullValue($params, 'Notification', $notification);\n Arr::setNotNullValue($params, 'FaceUrl', $faceUrl);\n Arr::setNotNullValue($params, 'MaxMemberNum', $maxMemberNum);\n Arr::setNotNullValue($params, 'ApplyJoinOption', $applyJoinOption);\n Arr::setNotNullValue($params, 'AppDefinedData', $appDefinedData && $appDefinedData());\n Arr::setNotNullValue($params, 'ShutUpAllMember', $shutUpAll);\n\n return $this->httpPostJson('group_open_http_svc/modify_group_base_info', $params);\n }", "title": "" }, { "docid": "9508dd9551a3398ec9b694faf79825bf", "score": "0.40240374", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset master/detail keys\n\t\t\tif ($this->Command == \"resetall\") {\n\t\t\t\t$this->setCurrentMasterTable(\"\"); // Clear master table\n\t\t\t\t$this->DbMasterFilter = \"\";\n\t\t\t\t$this->DbDetailFilter = \"\";\n\t\t\t\t$this->gjm_id->setSessionValue(\"\");\n\t\t\t}\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "e5d51da2c7c8c61767f01a19026f63ef", "score": "0.4019877", "text": "public static function clearGroup($group, $config = 'default') {\n\t\t$engine = static::engine($config);\n\t\tif (!$engine) {\n\t\t\treturn false;\n\t\t}\n\t\t$success = $engine->clearGroup($group);\n\t\tstatic::set(null, $config);\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "a6357496e0615fffe66a95ef5934fb2f", "score": "0.40078193", "text": "public function revoke_db_security_group_ingress($db_security_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DBSecurityGroupName'] = $db_security_group_name;\n\n\t\treturn $this->authenticate('RevokeDBSecurityGroupIngress', $opt, $this->hostname);\n\t}", "title": "" }, { "docid": "1c2257980837256a15dd3509bad17454", "score": "0.4005718", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id_admission->setSort(\"\");\n\t\t\t\t$this->nomr->setSort(\"\");\n\t\t\t\t$this->statusbayar->setSort(\"\");\n\t\t\t\t$this->masukrs->setSort(\"\");\n\t\t\t\t$this->noruang->setSort(\"\");\n\t\t\t\t$this->KELASPERAWATAN_ID->setSort(\"\");\n\t\t\t\t$this->nott->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "a70bef8e86506e92d69c6de538ae7740", "score": "0.400279", "text": "public function setGroup( $group )\n {\n $this->group = null;\n\n if (Validate::bracket( $group )) {\n $this->group = $group;\n } elseif (is_string( $group )) {\n $this->group = \"[{$group}]\";\n }\n\n return $this;\n }", "title": "" }, { "docid": "ab3388c6c86b0c04c0f8b4eb65daa8e7", "score": "0.4002701", "text": "public function reset_options( $options ) {\n\t\t$options[] = $this->group_keys_key;\n\n\t\treturn array_merge( $options, get_option( $this->group_keys_key, array() ) );\n\t}", "title": "" }, { "docid": "490c0b95d29d2010e6450db776ce482a", "score": "0.40001735", "text": "function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->PASIENBARU->setSort(\"\");\n\t\t\t\t$this->NOMR->setSort(\"\");\n\t\t\t\t$this->TGLREG->setSort(\"\");\n\t\t\t\t$this->KDDOKTER->setSort(\"\");\n\t\t\t\t$this->KDPOLY->setSort(\"\");\n\t\t\t\t$this->KDRUJUK->setSort(\"\");\n\t\t\t\t$this->KDCARABAYAR->setSort(\"\");\n\t\t\t\t$this->SHIFT->setSort(\"\");\n\t\t\t\t$this->NIP->setSort(\"\");\n\t\t\t\t$this->MASUKPOLY->setSort(\"\");\n\t\t\t\t$this->KELUARPOLY->setSort(\"\");\n\t\t\t\t$this->pasien_NAMA->setSort(\"\");\n\t\t\t\t$this->pasien_TEMPAT->setSort(\"\");\n\t\t\t\t$this->peserta_cob->setSort(\"\");\n\t\t\t\t$this->poli_eksekutif->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "1df90a0d05de47e27616ab710590d18d", "score": "0.3990764", "text": "public function group(Array $group){\n\n\t\t\t\t$this->sqlArray[\"group\"] = $group;\n\n\t\t\t}", "title": "" }, { "docid": "fa35d14a1d2a5ede1788978145382be7", "score": "0.3982353", "text": "public function callGroup($group, $params = array())\n\t{\n\t\tif( ! $this->hasGroup($group)) throw new Exception(\"Grouping widget [$group] does not exist\");\n\n\t\t$group = $this->groups[$group];\n\t\tif(count($group) > 0)\n\t\t{\n\t\t\tforeach ($group as $key => $value) {\n\t\t\t\t$args = isset($params[$key]) ? $params[$key] : array();\n\t\t\t\techo $this->callWidget($value, $args);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bfed7457ab06e352c4cc71b87c4de671", "score": "0.397629", "text": "function setDefaultRpcParams($rpcParams) {\n\t\t$this->defaultRpcParams = $rpcParams;\n\t}", "title": "" }, { "docid": "3073cef26ad53c2cb42b6761d947c6ad", "score": "0.39662752", "text": "function updateGroups($name,$nAdmin,$lAdmin,$status,$groupId,$groupPhoto){\n $db = dbConnect();\n if($groupPhoto){\n $req = $db->prepare(\"UPDATE groups SET title = ?, admin = ?, photo = ? WHERE id = ?\");\n $req->execute(array($name, $nAdmin, $groupPhoto, $groupId));\n updateStatutLastAdminGroup($status,$lAdmin,$groupId);\n updateStatutNewAdminGroup($nAdmin,$groupId);\n } else{\n $req = $db->prepare(\"UPDATE groups SET title = ?, admin = ? WHERE id = ?\");\n $req->execute(array($name, $nAdmin, $groupId));\n updateStatutLastAdminGroup($status,$lAdmin,$groupId);\n updateStatutNewAdminGroup($nAdmin,$groupId);\n }\n}", "title": "" }, { "docid": "1af9e498a123ef9fd4fb67663822bc02", "score": "0.3963111", "text": "function reset_option() {\n\n $option_name = $_REQUEST['option_name'];\n $default_options = $this->get_default_options();\n\n if (isset($default_options[$option_name])) {\n $options = AE_Options::get_instance();\n $options->$option_name = $default_options[$option_name];\n wp_send_json(array(\n 'msg' => $default_options[$option_name]\n ));\n }\n }", "title": "" }, { "docid": "b8f55f04342daebf2833f1effc965831", "score": "0.39627987", "text": "public function setGroupId($newVal)\n\t{\n\t\t$this->_groupId = $newVal;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d650bfb12cb289fdab42e549d449da24", "score": "0.39626485", "text": "public function patch($name, Group $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], Operation::class);\n }", "title": "" }, { "docid": "d650bfb12cb289fdab42e549d449da24", "score": "0.39626485", "text": "public function patch($name, Group $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], Operation::class);\n }", "title": "" }, { "docid": "bbe3991c3574c04c0df547a2bf2958ac", "score": "0.39551905", "text": "public function clearGroup($group)\n {\n $key = $this->_config['prefix'] . $group;\n if (isset($this->data[$key])) {\n $this->data[$key]['val'] += 1;\n }\n\n return true;\n }", "title": "" }, { "docid": "3718e774d369a2127ab17cdaac91c617", "score": "0.39540467", "text": "public function editGroup($group)\n {\n $auth = \\Flipside\\AuthProvider::getInstance();\n $ldap = $auth->getMethodByName('Flipisde\\Auth\\LDAPAuthenticator');\n if($ldap !== false)\n {\n $ldap->getAndBindServer(true);\n }\n if(is_array($group))\n {\n $group = json_decode(json_encode($group), false);\n }\n if(isset($group->description))\n {\n $this->setDescription($group->description);\n unset($group->description);\n }\n if(isset($group->member))\n {\n $this->clearMembers();\n $count = count($group->member);\n for($i = 0; $i < $count; $i++)\n {\n $isLast = false;\n if($i === $count - 1)\n {\n $isLast = true;\n }\n if(!isset($group->member[$i]->type))\n {\n continue;\n }\n if($group->member[$i]->type === 'Group')\n {\n $this->addMember($group->member[$i]->cn, true, $isLast);\n }\n else\n {\n $this->addMember($group->member[$i]->uid, false, $isLast);\n }\n }\n unset($group->member);\n }\n return true;\n }", "title": "" }, { "docid": "886db362e83d24669f3d894752c89be3", "score": "0.3950984", "text": "function edit_group($uri=NULL) \n { \n //$data['all_groups'] = $this->adminmodel->get_all_group(); \n\t $data['get_group_by_id'] = $this->admin_group_model->get_group_by_id($uri); \n $data['all_campaign'] = $this->admin_model->get_all_campaign(); \n\t if($this->input->post('update')) \n\t { \n\t $select_group_id = $this->uri->segment(3); \n\t\t$editGroupName = $this->input->post('editGroupName');\n\t\t$array = $this->input->post('optionsRadios'); \n\t\t$visibility = $array[0]; \t\t\n $campaignSelect = $this->input->post('campaignSelect'); \n\t\t \n\t if($select_group_id && $editGroupName && $campaignSelect) \n { \n\t\t \n\t\t $result = $this->admin_group_model->edit_group($select_group_id,$editGroupName,$visibility,$campaignSelect); \n\t\t if($result==TRUE)\n\t\t\t { \n\t\t\t $data['result'] = \"Change Saved\"; \n\t\t\t } \n\t\t\t else\n\t\t\t {\n\t\t\t $data['result'] = \"Error in saving\"; \n\t\t\t }\n\t\t } \t\t\n\t }\t \n $data['admin_info'] = $this->admin_model->admin_profile_detail(); \t \n\t $this->load->view('admin/edit-group',$data); \n }", "title": "" }, { "docid": "f83c9957ad5aaa954a1800630c4c3d19", "score": "0.3939903", "text": "function clearParams() {\n \t\treturn $this->_resetSet();\n \t}", "title": "" }, { "docid": "ce58e4c311767c200e137857c4891856", "score": "0.39337206", "text": "public function delete_auto_scaling_group($auto_scaling_group_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['AutoScalingGroupName'] = $auto_scaling_group_name;\n\t\t\n\t\treturn $this->authenticate('DeleteAutoScalingGroup', $opt);\n\t}", "title": "" }, { "docid": "f4afed93a0a61ec3b3892bb7e4317de4", "score": "0.3932157", "text": "function set_parameter($option, $value = false)\n {\n if (!is_array($option)) {\n $option = array($option => $value);\n }\n foreach ($option as $k => $v) {\n switch ($k) {\n case 'encoding':\n switch ($v) {\n case 'utf8':\n case 'ucs4_string':\n case 'ucs4_array':\n $this->_api_encoding = $v;\n break;\n default:\n $this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k);\n return false;\n }\n break;\n case 'overlong':\n $this->_allow_overlong = ($v) ? true : false;\n break;\n case 'strict':\n $this->_strict_mode = ($v) ? true : false;\n break;\n default:\n $this->_error('Set Parameter: Unknown option '.$k);\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "a3c70ab1ac7970e4b17a6e5bbdb4264a", "score": "0.39252764", "text": "function ResetAdvancedSearchParms() {\n\n\t\t// Clear advanced search parameters\n\t\tglobal $trx_additional;\n\t\t$trx_additional->setAdvancedSearch(\"x_kode\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_seqno\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_tanggal\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_room\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_withppn\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_withservice\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_subtotal1\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_ppn\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_subtotal2\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_service\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_grandtotal\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_notes\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_createby\", \"\");\n\t\t$trx_additional->setAdvancedSearch(\"x_createdate\", \"\");\n\t}", "title": "" }, { "docid": "0a1aa00b4d4cbc31c89a8d7b49dba762", "score": "0.39231363", "text": "protected function updateGroupRequest($body, $group_id, $x_sds_auth_token = null, $x_sds_date_format = null)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateGroup'\n );\n }\n // verify the required parameter 'group_id' is set\n if ($group_id === null || (is_array($group_id) && count($group_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_id when calling updateGroup'\n );\n }\n\n $resourcePath = '/v4/groups/{group_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($x_sds_auth_token !== null) {\n $headerParams['X-Sds-Auth-Token'] = ObjectSerializer::toHeaderValue($x_sds_auth_token);\n }\n // header params\n if ($x_sds_date_format !== null) {\n $headerParams['X-Sds-Date-Format'] = ObjectSerializer::toHeaderValue($x_sds_date_format);\n }\n\n // path params\n if ($group_id !== null) {\n $resourcePath = str_replace(\n '{' . 'group_id' . '}',\n ObjectSerializer::toPathValue($group_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json;charset=UTF-8']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json;charset=UTF-8'],\n ['application/json;charset=UTF-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d8232e8c6980a4e9645a5e3e8d23cbd9", "score": "0.39215335", "text": "function updateGroup($objSecurity)\n\t\t{\t\t\t\n\t\t\tglobal $db;\t \n\t\t\t$sql=\"\n\t\t\t\tUPDATE puser_GROUP SET GROUP_NAME=?,DESCRIPTION=?,STATUS_ID=?, MODIFIED_DATE=now(), MODIFIED_BY=?\n\t\t\t\tWHERE GROUP_ID=?\n\t\t\t\";\n\t\t\t\n\t\t\t$sql = $db->Prepare($sql); \n\t\t\t$db->Execute($sql,array(\n\t\t\t\t\t\t\t\t\t$objSecurity->group_name,\n\t\t\t\t\t\t\t\t\t$objSecurity->description,\n\t\t\t\t\t\t\t\t\t$objSecurity->status_id,\n\t\t\t\t\t\t\t\t\t$objSecurity->created_by, \n\t\t\t\t\t\t\t\t\t$objSecurity->group_id\n\t\t\t\t\t\t\t\t\t));\t\t\t\n\t\t}", "title": "" }, { "docid": "5b4c7d29de20b2be28db3a8e968ca946", "score": "0.39209494", "text": "public function setGroup($group) {\n $this->group = $group;\n return $this;\n }", "title": "" }, { "docid": "644789a21ed1db10fb0a9da134abab40", "score": "0.3917929", "text": "public static function setOriginalGroup($originalgroup)\n\t{\n\t\tself::getGroupNamespace()->originalgroup = $originalgroup;\n\t}", "title": "" }, { "docid": "09853d9862084e38b4b82c0c10a9a79c", "score": "0.39039838", "text": "protected function postProcessGroups()\n {\n if (Tools::isSubmit('submit'.$this->name.'editgroup')) {\n if (Tools::getValue('captcha_disabled')) {\n RecaptchaGroup::disableCaptchas([(int) Tools::getValue(RecaptchaGroup::$definition['primary'])]);\n } else {\n RecaptchaGroup::enableCaptchas([(int) Tools::getValue(RecaptchaGroup::$definition['primary'])]);\n }\n $this->addConfirmation($this->l('The group settings have been updated'));\n } elseif (Tools::isSubmit('submitBulkdisable_recaptcha'.RecaptchaGroup::$definition['table'])) {\n RecaptchaGroup::disableCaptchas(Tools::getValue(RecaptchaGroup::$definition['table'].'Box'));\n $this->addConfirmation($this->l('The groups have been updated'));\n } elseif (Tools::isSubmit('submitBulkenable_recaptcha'.RecaptchaGroup::$definition['table'])) {\n RecaptchaGroup::enableCaptchas(Tools::getValue(RecaptchaGroup::$definition['table'].'Box'));\n $this->addConfirmation($this->l('The groups have been updated'));\n } elseif (Tools::isSubmit('captcha_disabledncrc_group')) {\n if (RecaptchaGroup::toggle(Tools::getValue(RecaptchaGroup::$definition['primary']))) {\n $this->addConfirmation($this->l('The captcha status has been successfully toggled'));\n } else {\n $this->addError($this->l('Unable to toggle captcha status'));\n }\n }\n }", "title": "" } ]
dee3141f72d928b1963b5ae3ef45056e
Converts an Indicia filter definition my_records filter to an ES query.
[ { "docid": "689876ddb085fbcb8bed20148cc8c7d3", "score": "0.4620405", "text": "private static function applyUserFiltersWho(array $definition, array &$bool) {\n if (!empty($definition['my_records']) && $definition['my_records'] === '1') {\n $bool['must'][] = [\n 'match' => ['metadata.created_by_id' => hostsite_get_user_field('indicia_user_id')],\n ];\n }\n }", "title": "" } ]
[ { "docid": "546a33104cb6d8602406c2a67ed1be28", "score": "0.54414773", "text": "public function &addFilterQuery ($fq) {}", "title": "" }, { "docid": "ac5cb8e7ae0993c0cffb829d5581689b", "score": "0.54170996", "text": "private function buildWorksFilter()\n {\n $parameters = array('objectDetail', 'objectName', 'startDate', 'endDate', 'institution');\n\n // Check if dates have to search in a enriched way or not\n $type = \\Input::get('type', 'normalised');\n\n // Do we need a simple look up or not\n $simple = true;\n\n if ($type == 'normalised') {\n $simple = false;\n }\n\n\n $filterParameters = array();\n\n foreach ($parameters as $parameter) {\n\n $val = \\Input::get($parameter);\n\n if (!empty($val)) {\n $filterParameters[$parameter] = \\Input::get($parameter);\n }\n }\n\n // Build the $and clause\n $and = array();\n\n // Check for institution\n if (!empty($filterParameters['institution'])) {\n\n $clause = array(\n 'dataprovider' => array(\n '$regex' => '.*' . $filterParameters['institution'] . '.*',\n '$options' => 'i'\n )\n );\n\n array_push($and, $clause);\n }\n\n\n // Check for objectDetail (objectNumber or title)\n if (!empty($filterParameters['objectDetail'])) {\n\n $clause = array(\n '$or' => array(\n array(\n 'objectNumber' => array(\n '$regex' => '.*' . $filterParameters['objectDetail'] . '.*',\n '$options' => 'i'\n )\n ), array(\n 'title' => array(\n '$regex' => '.*' . $filterParameters['objectDetail'] . '.*',\n '$options' => 'i'\n )\n )\n )\n );\n\n array_push($and, $clause);\n }\n\n // Check for objectName\n if (!empty($filterParameters['objectName'])) {\n\n $clause = array(\n 'objectName' => array(\n '$regex' => '.*' . $filterParameters['objectName'] . '.*',\n '$options' => 'i'\n )\n );\n\n array_push($and, $clause);\n }\n\n // Check for date parameters\n if (!empty($filterParameters['startDate']) || !empty($filterParameters['endDate'])) {\n\n $startDate = @$filterParameters['startDate'];\n $endDate = @$filterParameters['endDate'];\n\n if (empty($startDate)) {\n // Arbitrary lower boundry\n $startDate = -5000;\n }\n\n if (empty($endDate)) {\n // Arbitrary upper boundry\n\n $endDate = 3000;\n }\n\n if (!$simple) {\n\n $clause = array(\n 'dateIso8601Range' => array(\n '$in' => array(\n (int) $startDate,\n (int) $endDate\n )\n )\n );\n\n array_push($and, $clause);\n } else {\n\n $clause = array(\n '$or' => array(\n array('dateStartValue' => array( '$regex' => '.*' . $startDate . '.*', '$options' => 'i')),\n array('dateStartValue' => array( '$regex' => '.*' . $endDate . '.*', '$options' => 'i')),\n array('dateEndValue' => array( '$regex' => '.*' . $startDate . '.*', '$options' => 'i')),\n array('dateEndValue' => array( '$regex' => '.*' . $endDate . '.*', '$options' => 'i'))\n )\n );\n\n array_push($and, $clause);\n }\n }\n\n return $and;\n }", "title": "" }, { "docid": "f5de06b3f049ec0378ee08ed0bb4dd6a", "score": "0.5237564", "text": "function exo_filter_get_filter($label, $column_name, $table_name, $field_name, $entity_type_id, $target_entity_type_id, $group = 'eXo Filter', $help = '') {\n return [\n 'title' => t('@label (eXo Filter)', ['@label' => $label]),\n 'group' => $group,\n 'help' => $help,\n 'filter' => [\n 'field' => $column_name,\n 'table' => $table_name,\n 'id' => 'exo_filter_entity_reference',\n 'additional fields' => [],\n 'field_name' => $field_name,\n 'entity_type' => $entity_type_id,\n 'exo_filter_target_entity_type_id' => $target_entity_type_id,\n 'allow empty' => TRUE,\n ],\n ];\n}", "title": "" }, { "docid": "c454324e9eb4bb173db78a04f8420a26", "score": "0.5169424", "text": "public function getFilterQueries () {}", "title": "" }, { "docid": "12134eccf095ddd41869065f7a6567cc", "score": "0.50517017", "text": "private function getQueryFilter() {\n \n $units = array();\n foreach ( $this->filter as $key => $value) {\n $units[] = \"$key=$value\";\n }\n \n $filter = implode(',', $units);\n \n return \"(&($filter)(objectClass=*))\";\r\n }", "title": "" }, { "docid": "b30a6ab3e80f2b632eaf45a160a878a4", "score": "0.50470686", "text": "function gen_filtered_sql($db_obj, $filter_hash, $basic_select = 'SELECT * FROM ') {\n $num_criteria = count($filter_hash); \n \n $sql = $basic_select . $this->table_name . ' WHERE ';\n $types = '';\n $paramList = array();\n \n \n $col_types = $db_obj->columnTypeHash($this->table_name); //From ajax_helpers\n $num_criteria_handled = 0;\n \n // showArray($filter_hash);\n foreach($filter_hash as $key => $col) {\n if($key == \"date\") {\n continue;\n }\n $num_criteria--;\n if( trim($col['val']) == '' ) {\n continue;\n }\n if($num_criteria_handled > 0) { \n $sql .= ' ' . $col['bool'] . ' ' ;\n }\n \n // sql conditional \n $sql .= $col['column'] . ' LIKE ?';\n \n // type \n $types .= $col_types[$col['column']];\n \n // parameter \n $paramList[] = '%' . $col['val'] . '%';\n \n $num_criteria_handled++;\n } // end foreach \n \n // handle the date.\n if(array_key_exists('date', $filter_hash)){\n $col = $filter_hash['date'];\n $date_type = date_type($col);\n if($date_type != 0 && !empty($paramList)) {\n $sql .= ' AND (';\n }\n switch($date_type) {\n case 0:\n // get out \n break;\n case 1:\n // no start date \n $sql .= 'date <?' ;\n $paramList[] = ensureDate($col['end']);\n $types .= 's';\n break;\n case 2:\n // no end date \n $sql .= 'date > ?' ;\n $paramList[] = ensureDate($col['start']);\n $types .= 's';\n break;\n case 3:\n // has both start and end dates \n $sql .= 'date BETWEEN ? AND ?' ;\n $paramList[] = ensureDate($col['start']);\n $types .= 's';\n $paramList[] = ensureDate($col['end']);\n $types .= 's';\n break;\n }\n if($date_type != 0 && $num_criteria_handled > 0) {\n $sql .= ')';\n }\n\n }\n \n $query_parameters = array(\"sql\"=>$sql, \"types\"=>$types, \"paramList\"=> $paramList);\n return $query_parameters;\n }", "title": "" }, { "docid": "b3c7f5ff35157cec3a608d9b6eebeb77", "score": "0.5046856", "text": "public function build_query()\n {\n\n $store_output = array();\n\n $data_type = $this->types();\n foreach ($data_type as $key => $val):\n\n $output = array();\n\n $output['startDate'] = date('Y-m-d', strtotime('-28 days'));\n $output['endDate'] = date('Y-m-d');\n $output['dimensions'] = array($val[0]);\n $output['dimensionFilterGroups'] = array(array('filters' => array(array(\n 'dimension' => 'device',\n 'expression' => $val[1]))));\n $output['startRow'] = 0;\n $output['rowLimit'] = 10;\n\n $store_output[$key] = $output;\n\n endforeach;\n\n $data_dimension = $this->dimension();\n foreach ($data_dimension as $key => $val):\n\n $output = array();\n\n $output['startDate'] = date('Y-m-d', strtotime('-28 days'));\n $output['endDate'] = date('Y-m-d');\n $output['dimensions'] = array($val[0]);\n $output['searchType'] = $val[1];\n $output['startRow'] = 0;\n $output['rowLimit'] = 10;\n\n $store_output[$key] = $output;\n\n endforeach;\n\n return $store_output;\n }", "title": "" }, { "docid": "b3c16f0b5030731f2314f96ebbe63983", "score": "0.5045717", "text": "public function query() {\n $this->field_alias = $this->real_field;\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }", "title": "" }, { "docid": "b3c16f0b5030731f2314f96ebbe63983", "score": "0.5045717", "text": "public function query() {\n $this->field_alias = $this->real_field;\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }", "title": "" }, { "docid": "4fa468a096ae21162f8e52acef4cd907", "score": "0.50401795", "text": "protected function getFilterSQL() {\n\t\t$result = '';\n\t\t$firstrun = true;\n\t\t\n\t\tforeach ($this->filter as $val){\n\t\t\tif($firstrun) {\n\t\t\t\t$firstrun = false;\n\t\t\t} else {\n\t\t\t\t$result .= \"\\nAND \";\n\t\t\t}\n\t\t\t\n\t\t\tif ($val['op'] == 'bw'\n\t\t\t\t|| $val['op'] == 'ew'\n\t\t\t\t|| $val['op'] == 'ct'\n\t\t\t) {\n\t\t\t\t//we need to treat everything as string\n\t\t\t\t$result .= \"LOWER(CONVERT(\" . $this->getFieldSQLName($val['key']) . \", CHAR)) LIKE \";\n\t\t\t\t\n\t\t\t\tif ($val['val'] instanceof Amount) {\n\t\t\t\t\t$stringVal = $val['val']->getFormatted();\n\t\t\t\t} else if ($val['val'] instanceof Date) {\n\t\t\t\t\t$stringVal = $val['val']->getFormatted();\n\t\t\t\t} else {\n\t\t\t\t\t$stringVal = (string) strtolower($val['val']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($val['op']) {\n\t\t\t\t\tcase 'bw':\n\t \t\t\t\t$result .= \"'\" . addslashes($stringVal) . \"%'\";\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t\t\t\t\tcase 'ew':\n\t \t\t\t\t$result .= \"'%\" . addslashes($stringVal) . \"'\";\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t\t\t\t\tcase 'ct': \t\n\t \t\t\t\t$result .= \"'%\" . addslashes($stringVal) . \"%'\";\n\t \t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//standard comparison\n\t\t\t\t$result .= $this->getFieldSQLName($val['key']);\n\n\t\t\t\tswitch ($val['op']) {\n\t\t\t\t\tcase 'eq':\n\t\t\t\t\t\t$result .= ' = ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'lt':\n\t\t\t\t\t\t$result .= ' < ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'le':\n\t\t\t\t\t\t$result .= ' <= ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'gt':\n\t\t\t\t\t\t$result .= ' > ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ge':\n\t\t\t\t\t\t$result .= ' >= ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ne':\n\t\t\t\t\t\t$result .= ' != ';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$result .= $this->formatForDB($val['val'], $this->getFieldType($val['key']));\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "e7cbf6447b655c5cfb545acafdbade60", "score": "0.49978507", "text": "function filter_string($filter)\n {\n $col = $filter->field;\n $val = db_escape($filter->param);\n $dt = \"string\";\n\n if ($this->endsWith($filter->validation, \"_dmy\")) {\n $col = \"str_to_date(\" . $col . \", '%Y-%m-%d')\";\n $val = \"str_to_date('\" . $val . \"', '%d-%m-%Y')\";\n $dt = \"date\";\n } elseif ($this->endsWith($filter->validation, \"_mdy\")) {\n $col = \"str_to_date(\" . $col . \", '%Y-%m-%d')\";\n $val = \"str_to_date('\" . $val . \"', '%m-%d-%Y')\";\n $dt = \"date\";\n } elseif ($this->endsWith($filter->validation, \"_ymd\")) {\n $col = \"str_to_date(\" . $col . \", '%Y-%m-%d')\";\n $val = \"str_to_date('\" . $val . \"', '%Y-%m-%d')\";\n $dt = \"date\";\n }\n\n if (($filter->validation == \"integer\" || $filter->validation == \"number\"))\n $dt = \"number\";\n\n if ($filter->operator == \"E\")\n $filterstr = ($dt == \"string\") ? ($col . \" = '\" . $val.\"'\") : ($col . \" = \" . $val);\n elseif ($filter->operator == \"NE\")\n $filterstr = ($dt == \"string\") ? ($col . \" <> '\" . $val.\"'\") : ($col . \" <> \" . $val);\n elseif ($filter->operator == \"CONTAINS\")\n $filterstr = $col . \" like '%\" . $val . \"%'\";\n elseif ($filter->operator == \"NOT_CONTAIN\")\n $filterstr = $col . \" not like '%\" . $val . \"%'\";\n elseif ($filter->operator == \"EXISTS\")\n $filterstr = $col . \" is not null\";\n elseif ($filter->operator == \"NOT_EXIST\")\n $filterstr = $col . \" is null\";\n elseif ($filter->operator == \"STARTS_WITH\")\n $filterstr = $col . \" like '\" . $val . \"%'\";\n elseif ($filter->operator == \"ENDS_WITH\")\n $filterstr = $col . \" like '%\" . $val . \"'\";\n elseif ($filter->operator == \"LT\")\n $filterstr = ($dt == \"string\") ? ($col . \" < '\" . $val . \"'\") : ($col . \" < \" . $val);\n elseif ($filter->operator == \"LTE\")\n $filterstr = ($dt == \"string\") ? ($col . \" <= '\" . $val . \"'\") : ($col . \" <= \" . $val);\n elseif ($filter->operator == \"GT\")\n $filterstr = ($dt == \"string\") ? ($col . \" > '\" . $val . \"'\") : ($col . \" > \" . $val);\n elseif ($filter->operator == \"GTE\")\n $filterstr = ($dt == \"string\") ? ($col . \" >= '\" . $val . \"'\") : ($col . \" >= \" . $val);\n elseif ($filter->operator == \"CHECKED\")\n $filterstr = $col . \" like '%\" . $val . \"%'\";\n elseif ($filter->operator == \"UNCHECKED\")\n $filterstr = $col . \" not like '%\" . $val . \"%'\";\n elseif ($filter->operator == \"MAX\" || $filter->operator == \"MIN\")\n // self join to pick up the max/min for the date in the instrument specified by the filter\n $filterstr = $col . \" = (select \" . $filter->operator . \"(rdx.value) from redcap_data rdx, redcap_metadata rmx\n where rdx.project_id = rmx.project_id and rmx.field_name = rdx.field_name and rdx.project_id = \"\n . $this->Proj->project_id\n . $this->getDagFilter('rdx', $this->Proj->project_id)\n . \" and rdx.field_name = '\" . $filter->field . \"' and rdx.record=t.\" . REDCap::getRecordIdField() . \")\";\n\n return $filterstr;\n }", "title": "" }, { "docid": "69b5a2f69f5d9ab08b1e2ec914a5053e", "score": "0.49703944", "text": "protected function buildQuery()\n {\n $query = [];\n if (!empty($this->query)) {\n $query = $this->query;\n }\n if ($this->limit || $this->offset) {\n $query['page'] = [];\n if ($this->limit) {\n $query['page']['limit'] = $this->limit;\n }\n if ($this->offset) {\n $query['page']['offset'] = $this->offset;\n }\n }\n\n if (!empty($this->filters)) {\n foreach ($this->filters as $resource => $columns) {\n if (is_array($columns)) {\n foreach ($columns as $column => $operands) {\n foreach ($operands as $operand => $value) {\n $query['filter'][$resource][$column][$operand] = is_array($value) ? implode(',',\n $value) : $value;\n }\n }\n } else{\n $query['filter'][$resource] = $columns;\n }\n }\n }\n if (!empty($this->fields)) {\n foreach ($this->fields as $resource => $fieldList) {\n $query['fields'][$resource] = implode(',', $fieldList);\n }\n }\n if (!empty($this->includes)) {\n $query['include'] = implode(',', $this->includes);\n }\n return $query;\n }", "title": "" }, { "docid": "25748c3e71bfae5a665ce082a54ea80e", "score": "0.49455804", "text": "public function recordsetSelecting(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "25748c3e71bfae5a665ce082a54ea80e", "score": "0.49455804", "text": "public function recordsetSelecting(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "97843851cdea575a313485185e25f30b", "score": "0.49439234", "text": "public function queryFilters(): QueryFilterContainer;", "title": "" }, { "docid": "1380f63b92efd74d1039bf8f0d4c5d0e", "score": "0.49331537", "text": "public function queryAction (Request $request)\n {\n $query = $request->request->get('query');\n $from = $request->request->get('from');\n $index_name = $request->request->get('index_name');\n $type_name = $request->request->get('type_name');\n $limit = ($request->request->get('limit') != '' && $request->request->get('limit') < 200)\n ? $request->request->get('limit')\n : 50; // Limit results to 50\n\n $page_params = array(\n 'query' => $query,\n 'tab' => 'query',\n 'page_title' => 'Query Tool',\n 'index_name' => $index_name,\n 'index_filter_options' => $this->getIndices(), // Load indices to dropdown\n 'type_filter_options' => $this->getIndiceTypes($index_name), // Load types to dropdown\n 'not_selected_indice' => (empty($index_name)) // Don't load types dropdown if no indice is selected\n );\n\n if ($query != '') {\n $this->executed_query = json_decode($query, true);\n\n if ($from != '') $this->addExtraParams(array('from' => $from));\n if ($limit != '') $this->addExtraParams(array('size' => $limit));\n\n $exists_fields = (isset($this->executed_query['fields']));\n\n $url = '';\n $url .= ($index_name != '') ? '/' . $index_name : '';\n $url .= ($type_name != '') ? '/' . $type_name : '';\n\n $request = (new Query_Request(new Elastica_Client(), $url . '/_search', 'POST', array(), $this->executed_query))->send()->getData();\n\n $hits = $request['hits']['hits'];\n $total = $request['hits']['total'];\n $fields = array();\n\n if ($total > 0 && count($hits) > 0) {\n foreach ($hits as $key => $hit) {\n $results_list = (!$exists_fields) ? $hit['_source'] : $hit['fields'];\n foreach ($results_list as $field => $value) {\n $results[$key][$field] = $value;\n $fields[] = $field;\n }\n }\n $fields = array_unique($fields);\n } else {\n $total = 0;\n $results = array();\n $fields = array();\n }\n\n $page_params['total'] = $total;\n $page_params['results'] = $results;\n $page_params['fields'] = $fields;\n $page_params['from'] = $from;\n $page_params['limit'] = $limit;\n $page_params['indice_name'] = $index_name;\n $page_params['type_name'] = $type_name;\n }\n\n return $this->render('ElasticSearchManagementBundle:Query:query.html.twig', $page_params);\n }", "title": "" }, { "docid": "ee7c653095f10f865e7fd71b7eddc88e", "score": "0.49066645", "text": "function getFormattedQuery(){\n $this->keyCondition = $this->expressionAttributeSetter->checkForReservedKeywords($this->keyCondition, \" \");\n $keyConditionChanged = $this->expressionAttributeSetter->checkForQueryValues($this->keyCondition);\n $queryParams = [\n \"TableName\" => $this->tableName,\n \"KeyConditionExpression\" => $keyConditionChanged\n ];\n if(count($this->expressionAttributeSetter->getExpressionAttributeNames())){\n $queryParams['ExpressionAttributeNames'] = $this->expressionAttributeSetter->getExpressionAttributeNames();\n }\n if(count($this->expressionAttributeSetter->getExpressionAttributeValues())){\n $queryParams['ExpressionAttributeValues'] = $this->marshaler->marshalItem($this->expressionAttributeSetter->getExpressionAttributeValues());\n }\n if($this->projectAttributes){\n $queryParams['ProjectionExpression'] = $this->projectAttributes;\n }\n if($this->consistentRead){\n $queryParams['ConsistentRead'] = True;\n }\n if($this->indexName){\n $queryParams['IndexName'] = $this->indexName;\n }\n if($this->sortedInDescendingOrder){\n $queryParams['ScanIndexForward'] = False;\n }\n if($this->limit){\n $queryParams['Limit'] = $this->limit;\n }\n if($this->selectAttribute){\n $queryParams['Select'] = $this->selectAttribute;\n }\n if($this->filterExpression){\n $queryParams['FilterExpression'] = $this->filterExpression;\n }\n return $queryParams;\n }", "title": "" }, { "docid": "94e76407fa11eb3f36d60803dad7a5da", "score": "0.48653755", "text": "function addToFilter(&$params, $a_words, $prop, $a_fields){\n $a_p = [];\n foreach ($a_words as $word){\n foreach ($a_fields as $field){\n $p = [];\n $p['term'][$field] = $word;\n array_push($a_p, $p);\n }\n }\n \n $params['body']['query']['bool']['filter'][$prop]['filters'] = $a_p; \n}", "title": "" }, { "docid": "023de12aa482c4a83e77dbf5a70905c8", "score": "0.48348418", "text": "public function setFilter(Elastica_Filter_Abstract $filter) {\n\t\treturn $this->setParam('facet_filter', $filter->toArray());\n\t}", "title": "" }, { "docid": "26a5b3da9488deaa30e11bcab00f83f6", "score": "0.48132515", "text": "public function buildFilter();", "title": "" }, { "docid": "38b7982812ab89d203974294300d301f", "score": "0.4801603", "text": "public function getFilterFromRecordKeys()\n\t{\n\t\t$arKeys = $this->getRecordKeys();\n\t\t$keyFilter = \"\";\n\t\tforeach ($arKeys as $key) {\n\t\t\tif ($keyFilter <> \"\") $keyFilter .= \" OR \";\n\t\t\t$this->codigo->CurrentValue = $key;\n\t\t\t$keyFilter .= \"(\" . $this->getRecordFilter() . \")\";\n\t\t}\n\t\treturn $keyFilter;\n\t}", "title": "" }, { "docid": "61770ad14b98614fd87f0dd9164d56dc", "score": "0.48001817", "text": "public function actionDinamico()\n {\n $filtro = new DynamicReportFilter([\n ['column' => 'dp.cedula', 'label' => 'Cedula paciente', 'type' => DynamicReportComponent::TYPE_NUMBER],\n ['column' => 'dp.nombre', 'label' => 'Nombre paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.apellido', 'label' => 'Apellido paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.telefono_1', 'label' => 'Telefono paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.telefono_2', 'label' => 'Telefono 2 paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.fecha_nacimiento', 'label' => 'Fecha nacimiento paciente', 'type' => DynamicReportComponent::TYPE_DATE],\n ['column' => 'dp.direccion', 'label' => 'Direccion paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.serial_carnet', 'label' => 'Serial carnet paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'dp.embarazada', 'label' => 'Está embarazada', 'type' => DynamicReportComponent::TYPE_BOOLEAN],\n ['column' => 'parro.parroquia', 'label' => 'Parroquia paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'muni.municipio', 'label' => 'Municipio paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'edo.estado', 'label' => 'Estado paciente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'sexo.letra', 'label' => 'Sexo paciente (letra)', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'sexo.nombre', 'label' => 'Sexo paciente (descripcion)', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'nac.letra', 'label' => 'Nacionalidad paciente (letra)', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'nac.descripcion', 'label' => 'Nacionalidad paciente (descripcion)', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'med.nb_producto', 'label' => 'Medicamento', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'pat.descripcion', 'label' => 'Patologia', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'soli.dosis', 'label' => 'Dosis', 'type' => DynamicReportComponent::TYPE_NUMBER],\n ['column' => 'soli.frecuencia', 'label' => 'Frecuencia', 'type' => DynamicReportComponent::TYPE_NUMBER],\n ['column' => 'soli.cantidad_mensual', 'label' => 'Cantida mensual', 'type' => DynamicReportComponent::TYPE_NUMBER],\n ['column' => 'frec.frecuencias', 'label' => 'Tipo frecuencia', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'ente.descripcion', 'label' => 'Ente', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'hsoli.fecha', 'label' => 'Fecha solicitud', 'type' => DynamicReportComponent::TYPE_DATE],\n ['column' => 'usu.usuario', 'label' => 'Usuario registrador', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'usu.cedula', 'label' => 'Cedula usuario', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'usu.nombre', 'label' => 'Nombre usuario', 'type' => DynamicReportComponent::TYPE_STRING],\n ['column' => 'usu.apellido', 'label' => 'Apellido usuario', 'type' => DynamicReportComponent::TYPE_STRING],\n ]);\n\n $filtro->validate('fields');\n\n if ($filtro->load(Yii::$app->request->post()) && $filtro->validate()) {\n $query = (new \\yii\\db\\Query)\n ->from(\\frontend\\models\\DatosPersona::tableName() . ' dp')\n ->leftJoin(\\common\\models\\Parroquia::tableName() . ' parro', 'parro.codigo_parroquia = dp.codigo_parroquia')\n ->leftJoin(\\common\\models\\Municipio::tableName() . ' muni', 'muni.codigo_municipio = parro.codigo_municipio')\n ->leftJoin(\\common\\models\\Estado::tableName() . ' edo', 'edo.codigo_estado = muni.codigo_estado')\n ->leftJoin(\\frontend\\models\\Solicitud::tableName() . ' soli', 'dp.id = soli.id_datos_persona')\n ->leftJoin(\\common\\models\\MedicamentoSibo::tableName() . ' med', 'med.id_producto = soli.id_medicamento')\n ->leftJoin(\\common\\models\\Frecuencias::tableName() . ' frec', 'frec.id = soli.id_frecuencia')\n ->leftJoin(\\common\\models\\Cie10Categoria::tableName() . ' pat', 'pat.id = soli.id_patologia')\n ->leftJoin(\\common\\models\\Sexo::tableName() . ' sexo', 'sexo.id = dp.id_sexo')\n ->leftJoin(\\common\\models\\Nacionalidad::tableName() . ' nac', 'nac.id = dp.id_nacionalidad')\n ->leftJoin(\\common\\models\\Ente::tableName() . ' ente', 'ente.id = dp.trabajador_id_ente')\n ->leftJoin(\\backend\\models\\HSoli::tableName() . ' hsoli', 'hsoli.id_solicitud = soli.id')\n ->leftJoin(\\common\\models\\Usuario::tableName() . ' usu', 'usu.id = hsoli.id_usuario');\n\n $dynamicReport = new DynamicReportComponent($filtro->fields, $query);\n $dynamicReport->setSelectData( $filtro->select, $filtro->dataGetTypes, $filtro->dataSort );\n\n $where = ['soli.activo' => true];\n $dynamicReport->setWhereData( $filtro->whereColumn, $filtro->whereOperator, $filtro->whereCondition );\n $dynamicReport->addCondition( $where );\n\n $file = Yii::getAlias('@webroot').'/archivos/temp/temp'.rand().'.csv';\n\n $dynamicReport->getCsv($file, 'Reporte dinamico');\n }\n\n ArrayHelper::multisort($filtro->fields, 'column');\n $columnsList = ArrayHelper::map($filtro->fields, 'id', 'label');\n $columnsListOptions = [];\n\n foreach ($filtro->fields as $row) {\n $columnsListOptions[ $row['id'] ] = [\n 'data-type' => $row['type'],\n ];\n }\n\n return $this->render('dinamico', [\n 'model' => $filtro,\n 'columnsList' => $columnsList,\n 'columnsListOptions' => $columnsListOptions,\n ]);\n }", "title": "" }, { "docid": "9414984ebeb0869097224c574025d5e6", "score": "0.47921908", "text": "public function make_filter(array $filter) {\r\n // If the field value has spaces, or : in it, wrap it in double quotes.\r\n // unless it is a range query.\r\n if (preg_match('/[ :]/', $filter['#value']) && !isset($filter['#start']) && !preg_match('/[\\[\\{]\\S+ TO \\S+[\\]\\}]/', $filter['#value'])) {\r\n $filter['#value'] = '\"' . $filter['#value'] . '\"';\r\n }\r\n $prefix = empty($filter['#exclude']) ? '' : '-';\r\n return $prefix . $filter['#name'] . ':' . $filter['#value'];\r\n }", "title": "" }, { "docid": "ca76abfba5bc204690d8f074c30ca8c5", "score": "0.47842836", "text": "public function filterRows($filter){\n $this->internalQuery[\"where\"] = \"where \" . $filter;\n return $this;\n }", "title": "" }, { "docid": "9a89e4f62c2c535b834ff1488dde926e", "score": "0.47774363", "text": "public function filterDataTable($query,$request)\n {\n if (isset($request['req']['from']) && $request['req']['from'] != '')\n $query->whereDate('created_at' , '>=' , $request['req']['from']);\n\n if (isset($request['req']['to']) && $request['req']['to'] != '')\n $query->whereDate('created_at' , '<=' , $request['req']['to']);\n\n if (isset($request['req']['deleted']) && $request['req']['deleted'] == 'only')\n $query->onlyDeleted();\n\n if (isset($request['req']['deleted']) && $request['req']['deleted'] == 'with')\n $query->withDeleted();\n\n if (isset($request['req']['status']) && $request['req']['status'] == '1')\n $query->active();\n\n if (isset($request['req']['status']) && $request['req']['status'] == '0')\n $query->unactive();\n\n return $query;\n }", "title": "" }, { "docid": "2693fd9939e016262b9eeadf1df34e33", "score": "0.4770972", "text": "public function query($accountId, $filter = null)\n {\n // TODO: Implement me in case you want to be fancy\n }", "title": "" }, { "docid": "ae474d622a71e791c193351e310c91d3", "score": "0.4766119", "text": "protected function buildFilter()\n {\n $this->filter = [];\n\n if (isset($this->params['search'])) {\n $rx = new \\MongoRegex('/' . preg_quote($this->params['search'], '/') . '/i');\n $this->filter = array_merge($this->filter, [\n '$or' => [\n [ 'author' => $rx ],\n [ 'title' => $rx ]\n ]\n ]);\n }\n if (isset($this->params['plays'])) {\n $playsFilter = [];\n if (isset($this->params['plays']['min'])) {\n $playsFilter['$gte'] = (int) $this->params['plays']['min'];\n }\n if (isset($this->params['plays']['max'])) {\n $playsFilter['$lte'] = (int) $this->params['plays']['max'];\n }\n\n $result = Mongo::collection('historyentries')->aggregate([\n [ '$group' => [ '_id' => '$media', 'count' => [ '$sum' => 1 ] ] ],\n [ '$match' => [ 'count' => $playsFilter ] ]\n ])['result'];\n\n $ids = [];\n foreach ($result as $entry) {\n $ids[] = $entry['_id'];\n }\n\n $this->filter = array_merge($this->filter, [\n '_id' => [ '$in' => $ids ]\n ]);\n }\n\n return $this->filter;\n }", "title": "" }, { "docid": "7d4a216f48541874ac64af1082029c4a", "score": "0.47476766", "text": "protected function filterQuery()\n\t{\n\t\t$data = Yii::$app->getRequest()->get();\n\n\t\tforeach ($this->_fields as $field)\n\t\t\t$field->filterQuery($this->query, $data);\n\t}", "title": "" }, { "docid": "92d7a159d80a2f5f49777a20332fdbf8", "score": "0.47445098", "text": "public function onAdvSearchDisplayFilter(&$filter, $value = '', $formName = 'searchForm')\n\t{\n\t\tif ( !in_array($filter->field_type, static::$field_types) ) return;\n\n\t\t// No special SQL query, default query is enough since index data were formed as desired, during indexing\n\t\t$indexed_elements = true;\n\t\tFlexicontentFields::createFilter($filter, $value, $formName, $indexed_elements);\n\t}", "title": "" }, { "docid": "c7cf5bb7e0ee79dbcba38c02a3a1846a", "score": "0.4735357", "text": "public function searching()\r\n\t{\r\n\t\t$filter = $this->filter;\r\n\t\tif (is_array($filter)) {\r\n\t\t\tfor ($i = 0; $i < count($filter); $i++) {\r\n\t\t\t\tswitch ($filter[$i]['data']['type']) {\r\n\t\t\t\t\tcase 'string':\r\n\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' LIKE '%\" . $this->realEscapeString($filter[$i]['data']['value']) . \"%'\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'list':\r\n\t\t\t\t\t\t$split = explode(\",\", $filter[$i]['data']['value']);\r\n\t\t\t\t\t\tforeach ($split as $split_a) {\r\n\t\t\t\t\t\t\t$str .= \"'\". $split_a . \"',\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$str = $this->removeComa($str);\r\n\t\t\t\t\t\tif (count($split) > 0 && strlen($filter[$i]['data']['value']) > 0) {\r\n\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' IN ($str)\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'boolean':\r\n\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['column'] .\"' = \" . $this->realEscapeString($filter[$i]['data']['value']);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'numeric':\r\n\t\t\t\t\t\tswitch ($filter[$i]['data']['comparison']) {\r\n\t\t\t\t\t\t\tcase 'ne':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' != \" . $this->realEscapeString($filter[$i]['data']['value']);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'eq':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' = \" . $this->realEscapeString($filter[$i]['data']['value']);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'lt':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' < \" . $this->realEscapeString($filter[$i]['data']['value']);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'gt':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' > \" . $this->realEscapeString($filter[$i]['data']['value']);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'date':\r\n\t\t\t\t\t\tswitch ($filter[$i]['data']['comparison']) {\r\n\t\t\t\t\t\t\tcase 'ne':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' != '\". date('Y-m-d', strtotime($filter[$i]['data']['value'])) . \"'\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'eq':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' = '\". date('Y-m-d', strtotime($filter[$i]['data']['value'])) . \"'\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'lt':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' < '\". date('Y-m-d', strtotime($filter[$i]['data']['value'])) . \"'\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'gt':\r\n\t\t\t\t\t\t\t\t$qs .= \" AND '\". $filter[$i]['table'] .\"'.'\". $filter[$i]['column'] .\"' > '\". date('Y-m-d', strtotime($filter[$i]['data']['value'])) . \"'\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//$where .= $qs;\r\n\t\t}\r\n\t\tif (isset($qs)) {\r\n\t\t\treturn $qs;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7288a8162af2a0fb7cb057c99814808a", "score": "0.47299027", "text": "abstract protected function buildFilter($field, $type, $filter, $value);", "title": "" }, { "docid": "090e87c460a842785e8dd95fc8523c87", "score": "0.47240904", "text": "public function applyFilters(&$sql)\n {\n\n $params = array();\n $param_num = 1; // Incrementing parameter suffix, to permit duplicate columns.\n $where_clause = '';\n $join_clause = '';\n foreach ($this->_filters as $filter) {\n $param_name = $filter['column'].$param_num;\n\n // FOREIGN KEYS\n $column = $this->columns[$filter['column']];\n if ($column->is_foreign_key() && !$filter['force']) {\n $join = $this->joinOn($column);\n $filter['column'] = $join['column_alias'];\n $join_clause .= $join['join_clause'];\n }\n\n // LIKE or NOT LIKE\n if ($filter['operator'] == 'like' || $filter['operator'] == 'not like') {\n $where_clause .= ' AND CONVERT(' . $filter['column'] . ', CHAR) ' . strtoupper($filter['operator']) . ' :'.$param_name.' ';\n $params[$param_name] = '%' . $filter['value'] . '%';\n }\n\n // Equals or does-not-equal\n elseif ($filter['operator'] == '=' || $filter['operator'] == '!=') {\n $where_clause .= ' AND ' . $filter['column'] . ' ' . strtoupper($filter['operator']) . ' :'.$param_name.' ';\n $params[$param_name] = $filter['value'];\n }\n\n // IS EMPTY\n elseif ($filter['operator'] == 'empty') {\n $where_clause .= ' AND (' . $filter['column'] . ' IS NULL OR ' . $filter['column'] . ' = \"\")';\n }\n\n // IS NOT EMPTY\n elseif ($filter['operator'] == 'not empty') {\n $where_clause .= ' AND (' . $filter['column'] . ' IS NOT NULL AND ' . $filter['column'] . ' != \"\")';\n }\n\n // Other operators. They're already validated in $this->addFilter()\n else {\n $where_clause .= ' AND ('.$filter['column'].' '.$filter['operator'].' :'.$param_name.')';\n $params[$param_name] = $filter['value'];\n }\n\n $param_num++;\n } // end foreach filter\n\n // Add clauses into SQL\n if (!empty($where_clause)) {\n $where_clause_pattern = '/^(.* FROM .*?)((?:GROUP|HAVING|ORDER|LIMIT|$).*)$/m';\n $where_clause = substr($where_clause, 5); // Strip leading ' AND'.\n $where_clause = \"$1 $join_clause WHERE $where_clause $2\";\n $sql = preg_replace($where_clause_pattern, $where_clause, $sql);\n }\n\n return $params;\n }", "title": "" }, { "docid": "1387dda62d4acb83e8cdaa07c4bcca4e", "score": "0.4698886", "text": "protected function addFiltersToQuery()\n {\n $filterQueries = $this->prepareFilterQuries();\n\n foreach ($filterQueries as $key => $filterQueryData) {\n $filterQuery = $this->query->createFilterQuery($key);\n if (in_array($key, $this->facetExcludedFields)) {\n $filterQuery->setTags(['exclude']);\n }\n $filterQuery->setQuery($filterQueryData);\n }\n }", "title": "" }, { "docid": "87e74adbf9a2a167d30710927f2d9d66", "score": "0.46967763", "text": "private function filterRecurrencesApi($query)\n {\n $property_id = request('property_id');\n $tenant_name = request('tenant_name');\n $unit_id = request('unit_id');\n $sortkey = request('sortkey');\n $reverse = request('reverse');\n\n if ($property_id) {\n $query = $query->where('properties.id', $property_id);\n }\n if ($tenant_name) {\n $query = $query->where('tenants.name', 'LIKE', '%' . $tenant_name . '%');\n }\n if ($unit_id) {\n $query = $query->where('units.id', $unit_id);\n }\n if ($sortkey) {\n $query = $query->orderBy($sortkey, $reverse == 'true' ? 'asc' : 'desc');\n } else {\n $query = $query->orderBy('tenancies.tenancy_date', 'desc');\n }\n\n return $query;\n }", "title": "" }, { "docid": "c52dc03c0c10286b5702a0cf13334c4e", "score": "0.46967542", "text": "protected function _multipleRecordsToJson(Tinebase_Record_RecordSet $_records, $_filter = NULL)\n {\n if (count($_records) == 0) {\n return array();\n }\n\n switch ($_records->getRecordClassName()) {\n case 'Tinebase_Model_Preference':\n $accountFilterArray = $_filter->getFilter('account')->toArray();\n $adminMode = ($accountFilterArray['value']['accountId'] == 0 && $accountFilterArray['value']['accountType'] == Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE);\n foreach ($_records as $record) {\n if (! isset($app) || $record->application_id != $app->getId()) {\n $app = Tinebase_Application::getInstance()->getApplicationById($record->application_id);\n }\n $preference = Tinebase_Core::getPreference($app->name, TRUE);\n $preference->resolveOptions($record);\n if ($record->type == Tinebase_Model_Preference::TYPE_DEFAULT || ! $adminMode && $record->type == Tinebase_Model_Preference::TYPE_ADMIN) {\n $record->value = Tinebase_Model_Preference::DEFAULT_VALUE;\n }\n }\n break;\n }\n\n $result = parent::_multipleRecordsToJson($_records, $_filter);\n return $result;\n }", "title": "" }, { "docid": "313e3b808e493e01d52d09757b9d3681", "score": "0.469208", "text": "public function buildQueryPayload(): array\n {\n /** @var array $query */\n $query = $this->builder->query;\n\n return [\n 'must' => [\n 'bool' => [\n 'should' => [\n 'multi_match' => [\n 'query' => $query['term'],\n 'type' => 'cross_fields',\n 'fields' => [\n 'make',\n 'model',\n 'barcode',\n 'serial_number',\n 'category_name',\n ],\n ],\n ],\n ],\n ],\n ];\n }", "title": "" }, { "docid": "66764d58083cbb1a398408319a935e65", "score": "0.46877378", "text": "protected function getFilter(): array\n\t{\n\t\tstatic $filter = null;\n\n\t\tif ($this->arParams['FORCE_FILTER'] === 'Y')\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif ($filter !== null)\n\t\t{\n\t\t\treturn $filter;\n\t\t}\n\n\t\t$filter = [];\n\t\t$filterLogic = [\n\t\t\t'TITLE', 'NAME', 'LAST_NAME', 'SECOND_NAME', 'POST', 'COMMENTS', 'COMPANY_TITLE', 'CONTACT_FULL_NAME'\n\t\t];\n\t\t$filterAddress = [\n\t\t\t'ADDRESS', 'ADDRESS_2', 'ADDRESS_PROVINCE', 'ADDRESS_REGION', 'ADDRESS_CITY',\n\t\t\t'ADDRESS_COUNTRY', 'ADDRESS_POSTAL_CODE'\n\t\t];\n\t\t$filterHistory = ['STAGE_ID_FROM_HISTORY', 'STAGE_ID_FROM_SUPPOSED_HISTORY', 'STAGE_SEMANTIC_ID_FROM_HISTORY'];\n\t\t//from main.filter\n\t\t$grid = $this->entity->getFilterOptions();\n\t\t$gridFilter = $this->entity->getGridFilter();\n\t\t$search = $grid->GetFilter($gridFilter);\n\t\t\\Bitrix\\Crm\\UI\\Filter\\EntityHandler::internalize($gridFilter, $search);\n\t\tif (!isset($search['FILTER_APPLIED']))\n\t\t{\n\t\t\t$search = [];\n\t\t}\n\t\tif (!empty($search))\n\t\t{\n\t\t\tforeach ($search as $key => $item)\n\t\t\t{\n\t\t\t\tunset($search[$key]);\n\t\t\t\tif (in_array(mb_substr($key, 0, 2), array('>=', '<=', '<>')))\n\t\t\t\t{\n\t\t\t\t\t$key = mb_substr($key, 2);\n\t\t\t\t}\n\t\t\t\tif (in_array(mb_substr($key, 0, 1), array('=', '<', '>', '@', '!')))\n\t\t\t\t{\n\t\t\t\t\t$key = mb_substr($key, 1);\n\t\t\t\t}\n\t\t\t\t$search[$key] = $item;\n\t\t\t}\n\t\t\tforeach ($gridFilter as $key => $item)\n\t\t\t{\n\t\t\t\t//fill filter by type\n\t\t\t\t$fromFieldName = $key . '_from';\n\t\t\t\t$toFieldName = $key . '_to';\n\t\t\t\tif ($item['type'] === 'date')\n\t\t\t\t{\n\t\t\t\t\tif (!empty($search[$fromFieldName]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['>='.$key] = $search[$fromFieldName] . ' 00:00:00';\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($search[$toFieldName]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['<='.$key] = $search[$toFieldName] . ' 23:59:00';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($item['type'] === 'number')\n\t\t\t\t{\n\t\t\t\t\t$fltType = $search[$key . '_numsel'] ?? 'exact';\n\t\t\t\t\tif (\n\t\t\t\t\t\t($fltType === 'exact' || $fltType === 'range')\n\t\t\t\t\t\t&& isset($search[$fromFieldName], $search[$toFieldName])\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['>='.$key] = $search[$fromFieldName];\n\t\t\t\t\t\t$filter['<='.$key] = $search[$toFieldName];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($fltType === 'exact' && isset($search[$fromFieldName]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter[$key] = $search[$fromFieldName];\n\t\t\t\t\t}\n\t\t\t\t\telseif (\n\t\t\t\t\t\t$fltType === 'more'\n\t\t\t\t\t\t&& isset($search[$fromFieldName])\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['>'.$key] = $search[$fromFieldName];\n\t\t\t\t\t}\n\t\t\t\t\telseif (\n\t\t\t\t\t\t$fltType === 'less' &&\n\t\t\t\t\t\tisset($search[$toFieldName])\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['<'.$key] = $search[$toFieldName];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (isset($search[$key]))\n\t\t\t\t{\n\t\t\t\t\tif (in_array($key, $filterLogic, true))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['?' . $key] = $search[$key];\n\t\t\t\t\t}\n\t\t\t\t\telseif (in_array($key, $filterAddress, true))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['=%' . $key] = $search[$key] . '%';\n\t\t\t\t\t}\n\t\t\t\t\telseif (in_array($key, $filterHistory, true))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['%' . $key] = $search[$key];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($key === 'STATUS_CONVERTED')\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter[$key === 'N' ? 'STATUS_SEMANTIC_ID' : '!STATUS_SEMANTIC_ID'] = 'P';\n\t\t\t\t\t}\n\t\t\t\t\telseif ($key === 'ORDER_TOPIC' || $key === 'ACCOUNT_NUMBER')\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter['~' . $key] ='%' . $search[$key] . '%';\n\t\t\t\t\t}\n\t\t\t\t\telseif (\n\t\t\t\t\t\t$key === 'ENTITIES_LINKS' &&\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t$this->entity->isEntitiesLinksInFilterSupported()\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\t$ownerData = explode('_', $search[$key]);\n\t\t\t\t\t\tif (count($ownerData) > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ownerTypeName = \\CCrmOwnerType::resolveName(\n\t\t\t\t\t\t\t\t\\CCrmOwnerType::resolveID($ownerData[0])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$ownerID = (int)$ownerData[1];\n\t\t\t\t\t\t\tif (!empty($ownerTypeName) && $ownerID > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$filter[$this->entity->getFilterFieldNameByEntityTypeName($ownerTypeName)] = $ownerID;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter[$this->entity->prepareFilterField($key)] = $search[$key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (isset($item['alias'], $search[$item['alias']]))\n\t\t\t\t{\n\t\t\t\t\t$filter['=' . $key] = $search[$item['alias']];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//search index\n\t\t\t$find = $search['FIND'] ? trim($search['FIND']) : null;\n\t\t\tif (!empty($find))\n\t\t\t{\n\t\t\t\t$search['FIND'] = $find;\n\t\t\t\t$filter['SEARCH_CONTENT'] = $search['FIND'];\n\t\t\t}\n\t\t}\n\t\tif (isset($filter['COMMUNICATION_TYPE']))\n\t\t{\n\t\t\tif (!is_array($filter['COMMUNICATION_TYPE']))\n\t\t\t{\n\t\t\t\t$filter['COMMUNICATION_TYPE'] = [$filter['COMMUNICATION_TYPE']];\n\t\t\t}\n\t\t\tif (in_array(\\CCrmFieldMulti::PHONE, $filter['COMMUNICATION_TYPE']))\n\t\t\t{\n\t\t\t\t$filter['HAS_PHONE'] = 'Y';\n\t\t\t}\n\t\t\tif (in_array(\\CCrmFieldMulti::EMAIL, $filter['COMMUNICATION_TYPE']))\n\t\t\t{\n\t\t\t\t$filter['HAS_EMAIL'] = 'Y';\n\t\t\t}\n\t\t\tunset($filter['COMMUNICATION_TYPE']);\n\t\t}\n\t\t//overdue\n\t\tif (\n\t\t\tisset($filter['OVERDUE'])\n\t\t\t&& ($this->entity->isOverdueFilterSupported())\n\t\t)\n\t\t{\n\t\t\t$key = $this->entity->getCloseDateFieldName();\n\t\t\t$date = new \\Bitrix\\Main\\Type\\Date;\n\t\t\tif ($filter['OVERDUE'] === 'Y')\n\t\t\t{\n\t\t\t\t$filter['<'.$key] = $date;\n\t\t\t\t$filter['>'.$key] = \\Bitrix\\Main\\Type\\Date::createFromTimestamp(0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$filter['>='.$key] = $date;\n\t\t\t}\n\t\t}\n\t\t// counters\n\t\tif (\n\t\t\tisset($filter['ACTIVITY_COUNTER'])\n\t\t\t&& $this->entity->isActivityCountersFilterSupported()\n\t\t)\n\t\t{\n\t\t\tif (is_array($filter['ACTIVITY_COUNTER']))\n\t\t\t{\n\t\t\t\t$counterTypeID = Bitrix\\Crm\\Counter\\EntityCounterType::joinType(\n\t\t\t\t\tarray_filter($filter['ACTIVITY_COUNTER'], 'is_numeric')\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$counterTypeID = (int)$filter['ACTIVITY_COUNTER'];\n\t\t\t}\n\n\t\t\t$counter = null;\n\t\t\tif ($counterTypeID > 0)\n\t\t\t{\n\t\t\t\t// get assigned for this counter\n\t\t\t\t$counterUserIDs = array();\n\t\t\t\tif (isset($filter['ASSIGNED_BY_ID']))\n\t\t\t\t{\n\t\t\t\t\tif (is_array($filter['ASSIGNED_BY_ID']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$counterUserIDs = array_filter($filter['ASSIGNED_BY_ID'], 'is_numeric');\n\t\t\t\t\t}\n\t\t\t\t\telseif ($filter['ASSIGNED_BY_ID'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$counterUserIDs[] = $filter['ASSIGNED_BY_ID'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// set counter to the filter\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$counter = Bitrix\\Crm\\Counter\\EntityCounterFactory::create(\n\t\t\t\t\t\t$this->entity->getTypeId(),\n\t\t\t\t\t\t$counterTypeID,\n\t\t\t\t\t\t0\n\t\t\t\t\t);\n\t\t\t\t\t$filter += $counter->prepareEntityListFilter(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'MASTER_ALIAS' => $this->entity->getTableAlias(),\n\t\t\t\t\t\t\t'MASTER_IDENTITY' => 'ID',\n\t\t\t\t\t\t\t'USER_IDS' => $counterUserIDs\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\tif (isset($filter['ASSIGNED_BY_ID']))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($filter['ASSIGNED_BY_ID']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (\\Bitrix\\Main\\NotSupportedException $e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (\\Bitrix\\Main\\ArgumentException $e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($filter['ORDER_SOURCE']))\n\t\t{\n\t\t\t$orderSourceQuery = new \\Bitrix\\Main\\Entity\\Query(\\Bitrix\\Crm\\DealTable::getEntity());\n\t\t\t$orderSourceQuery->setSelect(['ID']);\n\t\t\t$orderSourceQuery->setFilter([\n\t\t\t\t'ORDER_BINDING.ORDER.TRADING_PLATFORM.TRADING_PLATFORM_ID' => $filter['ORDER_SOURCE'],\n\t\t\t]);\n\n\t\t\t$orderSourceSql = $orderSourceQuery->getQuery();\n\t\t\t$filter['__CONDITIONS'][] = [\n\t\t\t\t'SQL' => \\CCrmDeal::TABLE_ALIAS.\".ID IN ({$orderSourceSql})\",\n\t\t\t];\n\n\t\t\tunset($orderSourceQuery, $orderSourceSql, $filter['ORDER_SOURCE']);\n\t\t}\n\n\t\t$filter = $this->applyDeliveryStageFilter($filter);\n\n\t\t//deal\n\t\tif ($this->entity->isCategoriesSupported())\n\t\t{\n\t\t\t$filter['CATEGORY_ID'] = $this->entity->getCategoryId();\n\t\t}\n\t\t//invoice\n\t\tif ($this->entity->isRecurringSupported())\n\t\t{\n\t\t\t$filter['!IS_RECURRING'] = 'Y';\n\t\t}\n\t\tif (isset($filter['OVERDUE']))\n\t\t{\n\t\t\tunset($filter['OVERDUE']);\n\t\t}\n\t\t//detect success/fail columns\n\t\t$this->prepareSemanticIdsAndStages($filter);\n\n\t\t$entityTypeID = $this->entity->getTypeId();\n\t\t//region Apply Search Restrictions\n\t\t$searchRestriction = \\Bitrix\\Crm\\Restriction\\RestrictionManager::getSearchLimitRestriction();\n\t\tif(!$searchRestriction->isExceeded($entityTypeID))\n\t\t{\n\t\t\t$searchRestriction->notifyIfLimitAlmostExceed($entityTypeID);\n\n\t\t\tSearchEnvironment::convertEntityFilterValues(\n\t\t\t\t$entityTypeID,\n\t\t\t\t$filter\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arResult['LIVE_SEARCH_LIMIT_INFO'] = $searchRestriction->prepareStubInfo(\n\t\t\t\tarray('ENTITY_TYPE_ID' => $entityTypeID)\n\t\t\t);\n\t\t}\n\t\t//endregion\n\n\t\t\\CCrmEntityHelper::prepareMultiFieldFilter(\n\t\t\t$filter,\n\t\t\tarray(),\n\t\t\t'=%',\n\t\t\tfalse\n\t\t);\n\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "0a4b8f5a3be71251433bd8926883578d", "score": "0.46797088", "text": "protected function _assembleQuery()\n {\n $query = array('index' => $this->getAdapter()->getCurrentIndex()->getCurrentName(), 'type' => $this->getType());\n $query['body']['query']['filtered']['query']['bool']['must'][] = $this->_prepareFulltextCondition();\n\n foreach ($this->_facets as $facetName => $facet) {\n\n $facets = $facet->getFacetQuery();\n\n if (!$facet->isGroup()) {\n $facets = array($facetName => $facets);\n }\n\n foreach ($facets as $realFacetName => $facet) {\n foreach ($this->_filters as $filterFacetName => $filters) {\n $rawFilter = array();\n\n foreach ($filters as $filter) {\n $rawFilter[] = $filter->getFilterQuery();\n }\n\n if ($filterFacetName != $facetName && $filterFacetName != '_none_') {\n $mustConditions = $rawFilter;\n if (isset($facet['facet_filter']['bool']['must'])) {\n $mustConditions = array_merge($facet['facet_filter']['bool']['must'], $rawFilter);\n }\n $facet['facet_filter']['bool']['must'] = $mustConditions;\n }\n }\n $query['body']['facets'][$realFacetName] = $facet;\n }\n }\n\n foreach ($this->_filters as $facetName => $filters) {\n $rawFilter = array();\n foreach ($filters as $filter) {\n $rawFilter[] = $filter->getFilterQuery();\n }\n if ($facetName == '_none_') {\n if (!isset($query['body']['query']['filtered']['filter']['bool']['must'])) {\n $query['body']['query']['filtered']['filter']['bool']['must'] = array();\n $query['body']['query']['filtered']['filter']['bool']['_cache'] = true;\n }\n $mustConditions = array_merge($query['body']['query']['filtered']['filter']['bool']['must'], $rawFilter);\n $query['body']['query']['filtered']['filter']['bool']['must'] = $mustConditions;\n } else {\n if (!isset($query['body']['filter']['bool']['must'])) {\n $query['body']['filter']['bool']['must'] = array();\n }\n $query['body']['filter']['bool']['must'] = array_merge($query['body']['filter']['bool']['must'], $rawFilter);\n }\n }\n // Patch : score not computed when using another sort order than score\n // as primary sort order\n\n if (isset($this->_page['size']) && $this->_page['size'] > 0) {\n $query['body']['fields'] = array('entity_id');\n $query['body']['track_scores'] = true;\n $query['body']['sort'] = $this->_prepareSortCondition();\n $query['body'] = array_merge($query['body'], $this->_page);\n } else {\n $query['body'] = array_merge($query['body'], $this->_page);\n }\n\n return $query;\n }", "title": "" }, { "docid": "8ce1a31e31c686434ded186389df724f", "score": "0.4669401", "text": "function getQueryByFilter( $parameters ) {\n\t$where = \"\";\n\t$aWhere = array();\n\tif ( isset($parameters[\"filters\"]) ):\n\t\t$keyAnt = \"\";\n\t\tforeach ($parameters[\"filters\"] as $key => $v):\n\t\t\t$not = false;\n\t\t\tif ( isset($parameters[\"filters\"][$key][\"fg\"]) ):\n\t\t\t\t$not = strtolower($parameters[\"filters\"][$key][\"fg\"]) == \"true\";\n\t\t\tendif;\n\t\t\t$notStr = ( $not ? \"NOT \" : \"\" );\n\t\t\tif ( $key == \"X\" ):\n\t\t\t\t$where .= \" AND ca.TP_SEXO \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"U\" ):\n\t\t\t\t$where .= \" AND ca.ID_UNIDADE \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"T\" ):\n\t\t\t\t$where .= \" AND ca.ID_CAD_MEMBRO \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"C\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'CL' AND ap.ID \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"E\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'ES' AND ap.CD_AREA_INTERNO <> 'ME' AND ap.ID \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"M\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'ES' AND ap.CD_AREA_INTERNO = 'ME' AND ap.ID \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"A\" ):\n\t\t\t\t$where .= \" AND ap.CD_AREA_INTERNO \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"HT\" ):\n\t\t\t\t$where .= \" AND tm.TP \".$notStr.\"IN\";\n\t\t\telse:\n\t\t\t\t$where .= \" AND\";\n\t\t\tendif;\n\n\t\t\t$prim = true;\n\t\t\t$where .= \" (\";\n\t\t\tif ( is_array( $parameters[\"filters\"][$key][\"vl\"] ) ):\n\t\t\t\tforeach ($parameters[\"filters\"][$key][\"vl\"] as $value):\n\t\t\t\t\tif ( $key == \"G\" ):\n\t\t\t\t\t\tif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_FANFARRA IS \".( !$not ? \"NOT NULL\" : \"NULL\");\n\t\t\t\t\t\telseif ( $value == \"4\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '2-04%'\");\n\t\t\t\t\t\telseif ( $value == \"5\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '2-07%'\");\n\t\t\t\t\t\telseif ( $value == \"6\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '1-01%'\");\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '$value%'\");\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"IC\" ):\n\t\t\t\t\t\tif ( $value == \"0\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ccp.FG_COMPRA = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"1\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ccp.FG_COMPRA = 'N'\";\n\t\t\t\t\t\telseif ( $value == \"2\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ccp.FG_ENTREGUE = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ccp.FG_ENTREGUE = 'N'\";\n\t\t\t\t\t\telseif ( $value == \"4\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ccp.FG_PREVISAO = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"5\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"(ccp.FG_COMPRA = 'N' AND ccp.FG_PREVISAO = 'N')\";\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"Z\" ):\n\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ap.TP_ITEM \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '$value%'\");\n\t\t\t\t\telseif ( empty($value) ):\n\t\t\t\t\t\t$aWhere[] = \"NULL\";\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\telse:\n\t\t\t\t\t\t$aWhere[] = $value;\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\tendif;\n\t\t\t\t\t$prim = false;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$aWhere[] = \"$notStr\".\"NULL\";\n\t\t\t\t$where .= \"?\";\n\t\t\tendif;\n\t\t\t$where .= \")\";\n\t\tendforeach;\n\tendif;\n\n // echo $where;\n // exit;\n\n\t$query = \"\n\t\tSELECT DISTINCT\n\t\t\tccp.ID,\n\t\t\tccp.COMPL AS CM,\n\t\t\tccp.TP AS TP_INCL,\n\t\t\tccp.FG_COMPRA,\n\t\t\tccp.FG_ENTREGUE,\n ccp.FG_PREVISAO,\n tm.CD,\n\t\t\ttm.TP,\n\t\t\ttm.DS,\n\t\t\ttm.FUNDO,\n\t\t\ttm.CMPL,\n\t\t\ttm.FG_IM,\n\t\t\tca.NM,\n\t\t\tap.TP_ITEM,\n\t\t\tap.DS_ITEM\n\t\tFROM CAD_COMPRAS ccp\n\t\tINNER JOIN CON_ATIVOS ca ON (ca.ID_CAD_MEMBRO = ccp.ID_CAD_MEMBRO)\n\t\tINNER JOIN TAB_MATERIAIS tm ON (tm.id = ccp.id_tab_materiais)\n\t\t LEFT JOIN TAB_APRENDIZADO ap ON (ap.id = tm.id_tab_aprend)\n\t\tWHERE 1=1 $where\n\t ORDER BY ca.NM, tm.CD, ccp.COMPL\n \";\n\n\treturn CONN::get()->execute( $query, $aWhere );\n}", "title": "" }, { "docid": "d89ccd208aa8dbc37906f0e987d8c1f6", "score": "0.46512944", "text": "public function getFilteredSearch(&$filter, $value, $return_sql = true)\n\t{\n\t\tif ( !in_array($filter->field_type, static::$field_types) ) return;\n\n\t\t$filter->isindexed = true;\n\t\treturn FlexicontentFields::getFilteredSearch($filter, $value, $return_sql);\n\t}", "title": "" }, { "docid": "fbbf7e0f7312bebce9938e4aab43f01f", "score": "0.46405357", "text": "public function advancedSearch($query, $fields = array(), $page = 0, $entity = self::ENT_ARTIFACT, $fq = null) {\n\n //Perform same query of simple, but adding to the filter also the requested fields\n\n $quote = urlencode('\"');\n\n $filter = self::FLD_ENTITYTYPE . ':' . $entity;\n\n if (is_array($fields) AND ! empty($fields)) {\n $params = array();\n foreach ($fields as $k => $v)\n $params [] = \"$k:$v\"; //$k:$quote$v$quote\";\n\n $filter .= ' AND ' . implode(' AND ', $params);\n } elseif (is_string($fields) AND trim($fields)) {\n $filter .= ' AND ' . $fields;\n } else {\n //Nothing\n }\n\n if (rtrim(ltrim($query)) == \"\") {\n $query= \"*\";\n }\n\n if ($fq != null) {\n $filter .= \" AND $fq\";\n }\n\n return $this->query($query, $filter, $page);\n /** http://node1.d.eagle.research-infrastructures.eu:8080/is/mvc/index/EMF-index-cleaned/solr.do/select?wt=json&q=*:*&rows=10&start=0&fq=inscriptiontypevoc:%22http://www.eagle-network.eu/voc/typeins/lod/92%22 */\n }", "title": "" }, { "docid": "36e862f26de057d57862799cfabf17db", "score": "0.46370214", "text": "public static function GetFilter($arFilter)\n\t{\n\n\t\tif (!is_array($arFilter))\n\t\t\t$arFilter = Array();\n\n\t\t$arSqlSearch = Array();\n\n\t\tforeach ($arFilter as $key => $val)\n\t\t{\n\t\t\t$res = CLearnHelper::MkOperationFilter($key);\n\t\t\t$key = $res[\"FIELD\"];\n\t\t\t$cOperationType = $res[\"OPERATION\"];\n\n\t\t\t$key = strtoupper($key);\n\n\t\t\tswitch ($key)\n\t\t\t{\n\t\t\t\tcase \"ID\":\n\t\t\t\tcase \"STUDENT_ID\":\n\t\t\t\tcase \"TEST_ID\":\n\t\t\t\tcase \"RESULT\":\n\t\t\t\tcase \"MAX_RESULT\":\n\t\t\t\t\t$arSqlSearch[] = CLearnHelper::FilterCreate(\"G.\".$key, $val, \"number\", $bFullJoin, $cOperationType);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"COMPLETED\":\n\t\t\t\t\t$arSqlSearch[] = CLearnHelper::FilterCreate(\"G.\".$key, $val, \"string_equal\", $bFullJoin, $cOperationType);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"USER\":\n\t\t\t\t\t$arSqlSearch[] = GetFilterQuery(\"U.ID, U.LOGIN, U.NAME, U.LAST_NAME\",$val);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $arSqlSearch;\n\n\t}", "title": "" }, { "docid": "c2fd0dd5d4d21792e53b63ab5b0dbf81", "score": "0.46336696", "text": "public function providesWhereFieldEqualsValue(): array\n {\n return [\n 'default' => [\n 'default',\n 'name=john'\n ],\n 'json api' => [\n 'json_api',\n 'filter[name]=john'\n ],\n 'odata' => [\n 'odata',\n '$filter=name eq \\'john\\''\n ],\n ];\n }", "title": "" }, { "docid": "8f8db4b8bbef3c6960513cc3d823d33d", "score": "0.46266654", "text": "public function setMainFilter($sql) {\n for ($i = 0; $i < count($this->values); $i++) {\n array_push($this->filterTypes, $this->values[$i][\"type\"]);\n }\n\n // Go through all filter types\n foreach ($this->filterTypes as $key => $entry) {\n\n if ($key !== 0) {\n $sql .= \" AND \";\n }\n\n if (strcmp($entry, \"manufacturer\") === 0) {\n $sql .= \"manufacturer.manufac_ID IN(\";\n } else {\n $sql .= $entry . \".\" . $entry . \"_ID IN(\";\n }\n\n $numberOfValues = count($this->values[$key][\"values\"]);\n\n for ($i = 0; $i < $numberOfValues; $i++) {\n $sql .= call_user_func(array($this->getDbKeys, \"get\" . ucfirst($entry)), $this->values[$key][\"values\"][$i]) . \", \";\n }\n\n $sql = substr($sql, 0, strlen($sql) - 2);\n $sql .= \")\";\n }\n\n return $sql;\n }", "title": "" }, { "docid": "d72b35312f3145ab2399035c93dc8726", "score": "0.4626614", "text": "function _insert_filters($filters, $operator)\n\t{\n\t\t$sql = '';\n\t\t$sql_conditions = '';\n\t\t$field_sql = '';\n\t\t// print_r($filters);\n\t\tforeach ($filters as $col_name => $terms)\n\t\t{\n\t\t\t$field_sql = $col_name; // Just cos this is what they used for Entries\n\n\t\t\tif (strncmp($terms, '=', 1) == 0)\n\t\t\t{\n\t\t\t\t// echo \"<li>EXACT: \" . $field_sql;\n\t\t\t\t\n\t\t\t\t/** ---------------------------------------\n\t\t\t\t/** Exact Match e.g.: search:body=\"=pickle\"\n\t\t\t\t/** ---------------------------------------*/\n\t\t\t\t\n\t\t\t\t$terms = substr($terms, 1);\n\t\t\t\t\n\t\t\t\t// special handling for IS_EMPTY\n\t\t\t\tif (strpos($terms, 'IS_EMPTY') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$terms = str_replace('IS_EMPTY', '', $terms);\n\t\t\t\t\t\n\t\t\t\t\t$add_search = $this->EE->functions->sql_andor_string($terms, $field_sql);\n\t\t\t\t\t\n\t\t\t\t\t// remove the first AND output by $this->EE->functions->sql_andor_string() so we can parenthesize this clause\n\t\t\t\t\t$add_search = substr($add_search, 3);\n \t\n\t\t\t\t\t$conj = ($add_search != '' && strncmp($terms, 'not ', 4) != 0) ? 'OR' : 'AND';\n \t\n\t\t\t\t\tif (strncmp($terms, 'not ', 4) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_conditions .= $operator.' ('.$add_search.' '.$conj.' '.$field_sql.' != \"\") ';\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$sql_conditions .= $operator.' ('.$add_search.' '.$conj.' '.$field_sql.' = \"\") ';\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 $condition = $this->EE->functions->sql_andor_string($terms, $field_sql).' ';\n\t\t\t\t\t// replace leading AND/OR with desired operator\n\t\t\t\t\t $condition = preg_replace('/^AND|OR/', $operator, $condition,1);\n\t\t\t\t\t$sql_conditions .= $condition;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// echo \"<li>LIKE: \" . $field_sql;\n\t\t\t\t/** ---------------------------------------\n\t\t\t\t/** \"Contains\" e.g.: search:body=\"pickle\"\n\t\t\t\t/** ---------------------------------------*/\n\t\t\t\t\n\t\t\t\tif (strncmp($terms, 'not ', 4) == 0)\n\t\t\t\t{\n\t\t\t\t\t$terms = substr($terms, 4);\n\t\t\t\t\t$like = 'NOT LIKE';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$like = 'LIKE';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (strpos($terms, '&&') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$terms = explode('&&', $terms);\n\t\t\t\t\t$andor = (strncmp($like, 'NOT', 3) == 0) ? 'OR' : 'AND';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$terms = explode('|', $terms);\n\t\t\t\t\t$andor = (strncmp($like, 'NOT', 3) == 0) ? 'AND' : 'OR';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sql_conditions .= ' '.$operator.' (';\n\t\t\t\t\n\t\t\t\tforeach ($terms as $term)\n\t\t\t\t{\n\t\t\t\t\tif ($term == 'IS_EMPTY')\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_conditions .= ' '.$field_sql.' '.$like.' \"\" '.$andor;\n\t\t\t\t\t}\n\t\t\t\t\telseif (strpos($term, '\\W') !== FALSE) // full word only, no partial matches\n\t\t\t\t\t{\n\t\t\t\t\t\t$not = ($like == 'LIKE') ? ' ' : ' NOT ';\n\t\t\t\t\t\t$term = '([[:<:]]|^)'.addslashes(preg_quote(str_replace('\\W', '', $term))).'([[:>:]]|$)';\n\t\t\t\t\t\t$sql_conditions .= ' '.$field_sql.$not.'REGEXP \"'.$this->EE->db->escape_str($term).'\" '.$andor;\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$sql_conditions .= ' '.$field_sql.' '.$like.' \"%'.$this->EE->db->escape_like_str($term).'%\" '.$andor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$sql_conditions = substr($sql_conditions, 0, -strlen($andor)).') ';\n\t\t\t} // <- END if (strncmp($terms, '=', 1) == 0)\n\t\t} // <- END foreach ($filters as $col_name => $terms)\n\n\t\tif ($sql_conditions != '')\n\t\t{\n\t\t\t$sql_conditions = ltrim($sql_conditions, 'AND ');\n\t\t\t$sql_conditions = ltrim($sql_conditions, 'OR ');\n\t\t\t$sql = $sql.' ('.$sql_conditions.')';\n\t\t}\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "f5afef428b03150c687f3f63e6592940", "score": "0.46259508", "text": "public function getModelQuery($filter)\n {\n return call_user_func([$filter->modelNamespace(), 'query']);\n }", "title": "" }, { "docid": "3792a818247def6b86511befe35aaa81", "score": "0.46187016", "text": "protected function extendWhereClauseWithFilterScoring(FilterDto $filter, string $table = ''): string\n {\n $sql = '';\n if ($filter->getScoring() > 0) {\n $field = 'scoring';\n if ($table !== '') {\n $field = $table . '.' . $field;\n }\n $sql .= ' and ' . $field . ' >= ' . $filter->getScoring();\n }\n return $sql;\n }", "title": "" }, { "docid": "0ddebc65195068e76c7aa08a6755a1e3", "score": "0.4618535", "text": "function SetupLookupFilters($fld) {\n\t\tglobal $grLanguage;\n\t\tswitch ($fld->FldVar) {\n\t\tcase \"x_city\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`city` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `city`, `city` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `all clients`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`city` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "3aac2d219d70c9642ff663676bdd593c", "score": "0.46085614", "text": "private function prepareFilter($filter, $table = '') {\n $where = '';\n $limit = '';\n $order = '';\n $whereArray = array();\n if (is_array($filter)) {\n\n if (isset($filter['search'])) {\n $where = ' WHERE 1=1 ';\n foreach ($filter['search'] as $key => $value) {\n $where .= 'AND ( LOWER(city) REGEXP :city' . $key . ' ';\n $where .= ' OR zip REGEXP :zip' . $key . ' ';\n $where .= ' OR LOWER(address) REGEXP :address' . $key . ' ';\n $where .= ' OR LOWER(state) REGEXP :state' . $key . ' ) ';\n $whereArray[':city' . $key] = '[[:<:]]' . strtolower($value) . '[[:>:]]';\n $whereArray[':zip' . $key] = '[[:<:]]' . strtolower($value) . '[[:>:]]';\n $whereArray[':address' . $key] ='[[:<:]]' . strtolower($value) . '[[:>:]]';\n $whereArray[':state' . $key] = '[[:<:]]' . strtolower($value) . '[[:>:]]';\n }\n }\n \n if (isset($filter['limit'])) {\n $limit = ' LIMIT ' . $filter['limit']['position'] . ', ' . $filter['limit']['count'];\n }\n if (isset($filter['order'])) {\n $order = ' ORDER BY ';\n foreach ($filter['order']['by'] as $by) {\n $order .= $by . ', ';\n }\n\n// Drop last comma\n $order = substr($order, 0, -1);\n $order .= $filter['order']['direction'];\n }\n }\n\n return array('where' => $where . $order . $limit, 'whereArray' => $whereArray);\n }", "title": "" }, { "docid": "c2fdd72a6fb42b8702d4d6a9dbf6b2d3", "score": "0.46072543", "text": "function buildQuery();", "title": "" }, { "docid": "4bfec783c341a0b3ff56c99fc358b2bf", "score": "0.46062887", "text": "private function _processFilter()\n {\n $filter = $this->_dataService->getHost()->getQueryStringItem(\n ODataConstants::HTTPQUERY_STRING_FILTER\n );\n\t\t\n if (!is_null($filter)) {\n $requestTargetKind = $this->_requestDescription->getTargetKind();\n if (!($requestTargetKind == RequestTargetKind::RESOURCE \n || $requestTargetKind == RequestTargetKind::COMPLEX_OBJECT \n || $this->_requestDescription->getRequestCountOption() == RequestCountOption::VALUE_ONLY)\n ) {\n ODataException::createBadRequestError(\n Messages::queryProcessorQueryFilterOptionNotApplicable()\n );\n }\n $resourceType = $this->_requestDescription->getTargetResourceType();\n// $resourceType = new \\ODataProducer\\Providers\\Metadata\\ResourceType(new \\ReflectionClass('Adro\\StudentEnrollmentBundle\\Entity\\Student'), null, null);\n try {\n \t$expressionProvider = $this->_dataService->getMetadataQueryProviderWrapper()->getExpressionProvider(); \n $internalFilterInfo = ExpressionParser2::parseExpression2(\n $filter, $resourceType, $expressionProvider\n );\n\t\t\t\t/* @var $internalFilterInfo \\ODataProducer\\UriProcessor\\QueryProcessor\\ExpressionParser\\InternalFilterInfo */\n\t\t\t\t\n//\t\t\t\techo '<pre>'; //print_r($internalFilterInfo);\n//\t\t\t\tprint_r($resourceType);\n//\t\t\t\t\n//\t\t\t\texit('');\n $this->_requestDescription->setInternalFilterInfo(\n $internalFilterInfo\n ); \n } catch (ODataException $odataException) {\n throw $odataException;\n }\n }\n }", "title": "" }, { "docid": "31c7b4bca2c6d5a3eb34b8724ea3cc53", "score": "0.45862326", "text": "function query( $p_filter_input ) {\n\n //require_api( 'logging_api.php' );\n //log_event(LOG_FILTERING, \"query( \".var_export($p_filter_input, true).\")\");\n\n $t_cmdId = $p_filter_input[0];\n //log_event(LOG_FILTERING, '$t_cmdId = '.$t_cmdId);\n\n $t_bug_table = db_get_table( 'bug' );\n\n $t_query = array(\n 'join' => \"JOIN codev_command_bug_table ON $t_bug_table.id = codev_command_bug_table.bug_id \",\n 'where' => \"codev_command_bug_table.command_id = $t_cmdId \",\n );\n //log_event(LOG_FILTERING, \"query = \".var_export($t_query, true));\n return $t_query;\n }", "title": "" }, { "docid": "d21e5230e1bb5d20e4138156783635d7", "score": "0.45792454", "text": "public function filter($query);", "title": "" }, { "docid": "05e36ea162799542a04bb5ab36d03072", "score": "0.45673513", "text": "public function retrieveAll(array $filter = null, array $fields = null);", "title": "" }, { "docid": "bc4bc36451b35f373810362c17ded104", "score": "0.4560002", "text": "public function appendFilterSql($_select, $_backend)\n {\n $db = $_select->getAdapter();\n\n $not = false;\n $in = false;\n if (false !== strpos($this->_operator, 'not')) {\n $not = true;\n }\n if ($this->_operator === 'in') {\n $in = true;\n }\n if ($this->_operator !== 'contains' && $this->_operator !== 'notcontains') {\n if (true === $not) {\n $this->_operator = 'notcontains';\n } else {\n $this->_operator = 'contains';\n }\n }\n // mysql supports full text for InnoDB as of 5.6.4\n // full text can't do a pure negative search...\n $useMysqlFullText = false === $not && BackendFactory::factory()->supports('mysql >= 5.6.4 | mariadb >= 10.0.5');\n\n $values = static::sanitizeValue($this->_value, $useMysqlFullText);\n\n if (count($values) === 0) {\n if (true === $not) {\n $_select->where('1 = 1');\n } else {\n $_select->where('1 = 0');\n }\n return;\n }\n\n if (false === $useMysqlFullText) {\n\n if (false === $not && SetupCore::isLogLevel(LogLevel::NOTICE)) SetupCore::getLogger()->notice(__METHOD__ . '::' . __LINE__ .\n ' full text search is only supported on mysql 5.6.4+ / mariadb 10.0.5+ ... do yourself a favor and migrate. This query now maybe very slow for larger amount of data!');\n\n $filterGroup = new FilterGroup(array(), $in ?\n FilterGroup::CONDITION_OR : FilterGroup::CONDITION_AND);\n\n foreach ($values as $value) {\n $filter = new Text($this->_field, $this->_operator, $value, is_array($this->_options) ? $this->_options : []);\n $filterGroup->addFilter($filter);\n }\n\n SqlFilterFilterGroup::appendFilters($_select, $filterGroup, $_backend);\n\n } else {\n $field = $this->_getQuotedFieldName($_backend);\n $searchTerm = '';\n\n foreach ($values as $value) {\n $searchTerm .= ($searchTerm !== '' ? ', ' : '') . ($in ? '' : '+') . $value . '*';\n }\n\n $_select->where('MATCH (' . $field . $db->quoteInto(') AGAINST (? IN BOOLEAN MODE)', $searchTerm));\n }\n }", "title": "" }, { "docid": "c543862efd8bfe5f1578c4efee14fcad", "score": "0.45426974", "text": "public function _index_filter_query() {\n return $this->index_filter_query;\n }", "title": "" }, { "docid": "8ca44e04ed0863899f9b6c79deac7aed", "score": "0.45395148", "text": "public function saveAdvancedSearch($query, $fields = array(), $entity = self::ENT_ARTIFACT, $page = 0, $searchType, $fq = null) {\n\n //Perform same query of simple, but adding to the filter also the requested fields\n\n $filter = self::FLD_ENTITYTYPE . ':' . $entity;\n if (!is_null($fq)) {\n $filter .= \" AND $fq\";\n }\n\n if ($searchType == 0 AND ! empty($fields)) {\n\n $filter .= \" AND $fields\";\n } else if (is_array($fields) AND ! empty($fields)) {\n $params = array();\n foreach ($fields as $k => $v)\n $params [] = \"$k:$v\"; //$k:$quote$v$quote\";\n\n $filter .= ' AND ' . implode(' AND ', $params);\n } elseif (is_string($fields) AND trim($fields)) {\n $filter .= ' AND ' . $fields;\n } else {\n //Nothing\n }\n\n\n\n\n\n// $params = array();\n// foreach ($fields as $k => $v) {\n// $params [] = \"$k:\" . urlencode($v);\n// }\n//\n// $k = self::FLD_ENTITYTYPE;\n// $v = $entity;\n//\n// $params [] = \"($k:\\\"\" . urlencode($v).\"\\\")\";\n//\n// $filter = implode(' AND ', $params);\n\n if ($page > self::SAVE_PAGES_STARTING_BACK)\n $page-=self::SAVE_PAGES_STARTING_BACK;\n else\n $page = 0;\n\n $rows = self::PAGE_SIZE * self::SAVE_PAGES;\n\n //var_dump($filter); die();\n\n return $this->saveList($this->querySave($query, $filter, $page, $rows));\n\n /**\n http://node1.d.eagle.research-infrastructures.eu:8080/is/mvc/index/EMF-index-cleaned/solr.do/select?wt=json&q=*:*&rows=10&start=0&fq=inscriptiontypevoc:%22http://www.eagle-network.eu/voc/typeins/lod/92%22\n */\n }", "title": "" }, { "docid": "e17c47223445071dc7e30739dd6ecee7", "score": "0.45281035", "text": "public function query() {\n if (isset($this->value, $this->definition['trovequery'])) {\n $this->query->args['method'] = $this->definition['trovequery']['method'];\n if (is_array($this->value)) {\n foreach ($this->value as $key => $value) {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->definition['trovequery']['index'] . ':' . $value);\n }\n }\n else {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->definition['trovequery']['index'] . ':' . $this->value);\n }\n }\n }", "title": "" }, { "docid": "612b9c1ce296ddb456c01b6a8038f2b7", "score": "0.4527236", "text": "protected function customFilters($filters, &$query)\n {\n\n }", "title": "" }, { "docid": "0d12f5189814864919ec1a33cbf7ac36", "score": "0.4527208", "text": "public function getSearchFilter($useRequest = true)\n {\n $filter = parent::getSearchFilter($useRequest);\n\n if (isset($filter['used_in_track'])) {\n switch ($filter['used_in_track']) {\n case -1:\n $filter[] = \"NOT EXISTS (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_filter_id = gaf_id)\";\n break;\n case -2:\n $filter[] = \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments)\";\n break;\n case -3:\n $filter[] = \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_create_track = 0)\";\n break;\n case -4:\n $filter[] = \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_create_track > 0)\";\n break;\n default:\n $filter[] = sprintf(\n \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_id_track = %d)\",\n intval($filter['used_in_track'])\n );\n break;\n }\n unset($filter['used_in_track']);\n }\n if (isset($filter['creates_track'])) {\n switch ($filter['creates_track']) {\n case -1:\n $filter[] = \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_create_track > 0)\";\n break;\n default:\n $filter[] = sprintf(\n \"gaf_id IN (SELECT gtap_filter_id FROM gems__track_appointments WHERE gtap_create_track = %d)\",\n intval($filter['creates_track'])\n );\n break;\n }\n unset($filter['creates_track']);\n }\n\n if (isset($filter['used_in_filter'])) {\n $model = $this->getModel();\n switch ($filter['used_in_filter']) {\n case -1:\n $sub = $model->getSubFilterSql('*');\n $filter[] = \"NOT EXISTS $sub\";\n break;\n case -2:\n $sub = $model->getSubFilterSql('*');\n $filter[] = \"EXISTS $sub\";\n break;\n\n default:\n $sub = $model->getSubFilterIdSql($filter['used_in_filter'], \"other.gaf_id\");\n $filter[] = \"gaf_id IN ($sub)\";\n break;\n }\n // \\MUtil_Model::$verbose = true;\n unset($filter['used_in_filter']);\n }\n\n return $filter;\n }", "title": "" }, { "docid": "a44b49074adc9acd9ccff97eb9304ef2", "score": "0.45241776", "text": "public function andFilterWhere()\n {\n }", "title": "" }, { "docid": "8852a80da66ca1e89b8cf17c2fe9a5ac", "score": "0.45228645", "text": "private function query()\n {\n try {\n if (!empty($this->filter['more_like_this']))\n $filter = $this->filter;\n else\n $filter = (empty($this->filter) ? [\"match_all\" => new \\stdClass()] : [\"bool\" => $this->filter]);\n\n $this->result = $this->elasticsearch()->search($this->getBody($filter));\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "91ea0f1b5b8c1005bf25a09cb3aab1af", "score": "0.45184377", "text": "function processQueryWithFilters(&$query, $idCliente, $idArea, $idConsultor, $idProyecto){\n\t\tif($idCliente != -1)\n\t\t\t$query = $query.' AND cp.`idCliente` = '.$idCliente;\n\n\t\tif($idArea != -1)\n\t\t\t$query = $query.' AND cu.`idArea` = '.$idArea;\n\n\t\tif($idConsultor != -1)\n\t\t\t$query = $query.' AND cu.`id` = '.$idConsultor;\n\t\t\n\n\t\tif($idProyecto != -1)\n\t\t\t$query = $query.' AND cp.`id` = '.$idProyecto;\n\n\t\treturn $query;\t\t\n\t}", "title": "" }, { "docid": "cdfe4319d69f16bdad9d55d14b8b15b1", "score": "0.45155865", "text": "function getFilterQuery($key, $condition, $value, $originalValue, $type = 'normal')\n\t{\n\t\t# $$$ rob $this->_rawFilter set in tableModel::getFilterArray()\n\t\t# used in prefilter dropdown in admin to allow users to prefilter on raw db join value\n\n\t\t$params =& $this->getParams();\n\t\t$db = JFactory::getDBO();\n\t\tif ($type == 'querystring') {\n\t\t\t//$key2 = FabrikString::safeColNameToArrayKey($key);\n\t\t\t// $$$ rob no matter whether you use elementname_raw or elementname in the querystring filter\n\t\t\t// by the time it gets here we have normalized to elementname. So we check if the original qs filter was looking at the raw\n\t\t\t// value if it was then we want to filter on the key and not the label\n\t\t\t//if (!array_key_exists($key2, JRequest::get('get'))) {\n\t\t\tif (!$this->_rawFilter) {\n\t\t\t\t$k = $db->nameQuote($params->get('join_db_name')).'.'.$db->nameQuote($params->get('join_val_column'));\n\t\t\t} else {\n\t\t\t\t$k = $key;\n\t\t\t}\n\t\t\t$this->encryptFieldName($k);\n\t\t\treturn \"$k $condition $value\";\n\t\t\t//}\n\t\t}\n\t\t$this->encryptFieldName($key);\n\t\tif (!$this->_rawFilter && ($type == 'searchall' || $type == 'prefilter')) {\n\t\t\t//$$$rob wasnt working for 2nd+ db join element to same table (where key = `countries_0`.`label`)\n\t\t\t//$k = '`'.$params->get('join_db_name'). \"`.`\" . $params->get('join_val_column').'`';\n\t\t\t$str = \"$key $condition $value\";\n\t\t} else {\n\n\t\t\t$group =& $this->getGroup();\n\t\t\tif (!$group->isJoin() && $group->canRepeat()) {\n\n\t\t\t\t$fval = $this->getElement()->filter_exact_match ? $originalValue : $value;\n\n\t\t\t\t$str = \" ($key = $fval OR $key LIKE \\\"$originalValue',%\\\"\".\n\t\t\t\t\" OR $key LIKE \\\"%:'$originalValue',%\\\"\".\n\t\t\t\t\" OR $key LIKE \\\"%:'$originalValue'\\\"\".\n\t\t\t\t\" )\";\n\t\t\t} else {\n\t\t\t\t$str = \"$key $condition $value\";\n\t\t\t}\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "cc4c768f863f96b4109c1c41f3dc75c9", "score": "0.45063013", "text": "function where_and() { return $this->_expand('AND'); }", "title": "" }, { "docid": "6eda4769186d03538f3afb5312cd0864", "score": "0.45028138", "text": "function rental_search_filters($vars, $options = array()) {\n $filters = array();\n $vars = (array) $vars;\n print_log(\"rental_search_filters: vars:\".dump($vars, true), 'app', LOG_LEVEL_TEST);\n if($vars['in'] && $vars['out']) {\n $date_format = DATE_FORMAT;\n $data = array(\"in\" => '', \"in_disp\" => '', \"out\" => '', \"out_disp\" => '');\n $link = \"?\".array2qs(array_merge($vars, $data)); \n $filters[] = array('name' => phrase('dates', CAPITALIZE), 'data' => $data, 'link' => $link);\n }\n\n // guests\n if($vars['ng'] > 1) { \n $data = array(\"ng\" => 0);\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('guests', CAPITALIZE), 'data' => $data, 'link' => $link);\n } \n\n // rental type\n if($vars['pt']) { \n $data = array(\"pt\" => '');\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('type', CAPITALIZE), 'data' => $data, 'link' => $link);\n } \n\n // faciliites\n if($facs = $vars['fac']) {\n if(1) { // show each fac\n $facAr = explode(',', $facs);\n foreach($facAr as $facId) {\n $facCopy = $facAr;\n if(($key = array_search($facId, $facCopy)) !== false) {\n unset($facCopy[$key]);\n } \n $rest = implode(',', $facCopy);\n $data = array(\"fac\" => $rest);\n $link = \"?\".array2qs(array_merge($vars, $data));\n $facName = get_object(\"facility\", $facId, 'name');\n $filters[] = ['name' => phrase($facName, CAPITALIZE), 'data' => $data, 'link' => $link, 'class' => 'set-fac'];\n }\n } else { // show all facs together \n $data = array(\"fac\" => '');\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('amenities', CAPITALIZE), 'data' => $data, 'link' => $link);\n }\n \n }\n\n // bedrooms\n if($vars['nr'] > 1) { \n $data = array(\"nr\" => 1);\n $link = \"?\".array2qs(array_merge($vars, $data));\n //$filters[] = html_link($link, \"Bedrooms\", array(\"class\" => \"form-resubmit\", \"data-data\" => json_encode($data), \"data-target\" => \"#rental_search_form\"));\n $filters[] = array('name' => phrase('bedrooms', CAPITALIZE), 'data' => $data, 'link' => $link);\n \n } \n\n // bathrooms\n if($vars['nb'] > 1) { \n $data = array(\"nb\" => 1);\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('bathrooms', CAPITALIZE), 'data' => $data, 'link' => $link);\n } \n\n // price\n //if($vars['p'] || $vars['pp']) {\n $p = $vars['p'];\n list($min, $max) = explode(';', $p);\n if($max >= $max_price) $max = 0;\n if($min > 0 || $max > 0) { \n \n $data = array(\"p\" => '', \"pp\" => '');\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('price', CAPITALIZE), 'data' => $data, 'link' => $link, 'class' => 'green-border');\n } \n \n\n // size\n if($vars['sz'] > 1) {\n $data = array(\"sz\" => 1);\n $link = \"?\".array2qs(array_merge($vars, $data));\n $filters[] = array('name' => phrase('size', CAPITALIZE), 'data' => $data, 'link' => $link); \n } \n \n return $filters; \n}", "title": "" }, { "docid": "ceab88dedbc80f15b99b0465699ad063", "score": "0.45011663", "text": "function advanced_sphinx_get_query_string($search_options) {\n $query = array();\n foreach ($search_options as $key => $option) {\n if ($key == 'keys') {\n $query[$key] = $option;\n }\n elseif ($key == 'filters') {\n foreach ($search_options['filters'] as $filter_key => $filter_val) {\n $val = implode(',', $filter_val);\n $query['fil-' . $filter_key] = $val;\n }\n }\n elseif ($key == 'view' || $key == 'group') {\n $query[$key] = $option;\n }\n elseif ($key == 'sorted') {\n foreach ($search_options['sorted'] as $sort_key => $sort_val) {\n $query['sor-' . $sort_key] = $sort_val;\n }\n }\n }\n\n return $query;\n}", "title": "" }, { "docid": "1c12a028f7b2e0625cd613ac85d65821", "score": "0.44995046", "text": "function handleFilters($filters, $formName, $prefix, $applyFiltersToData)\n {\n\n if (! $applyFiltersToData) {\n return \"\";\n }\n $filtersql = \" $prefix \";\n\n if (is_array($filters) || is_object($filters)) {\n foreach ($filters as $filter) {\n\n if ($filter->instrument == $formName) {\n $filtersql = $filtersql . $this->filter_string($filter) . \" \" . $filter->boolean . \" \";\n }\n }\n }\n\n if (strlen($filtersql) > 7) {\n if (substr($filtersql, -4) == \"AND \" || substr($filtersql, -4) == \" OR \") {\n $filtersql = substr($filtersql, 0, strlen($filtersql) - 4);\n }\n } else {\n $filtersql = \"\";\n }\n\n return $filtersql;\n\n }", "title": "" }, { "docid": "d88d6f9c9f48a901efadfa21044bd585", "score": "0.44941056", "text": "function getFilterQuery($key, $condition, $value, $originalValue, $type = 'normal')\r\n\t{\r\n\t\t$this->encryptFieldName($key);\r\n\t\tswitch ($condition) {\r\n\t\t\tcase 'earlierthisyear':\r\n\t\t\t\t$query = \" DAYOFYEAR($key) <= DAYOFYEAR($value) \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'laterthisyear':\r\n\t\t\t\t$query = \" DAYOFYEAR($key) >= DAYOFYEAR($value) \";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ($this->isJoin()) {\r\n\t\t\t\t// query the joined table concatanating into one field\r\n\t\t\t\t$jointable = $this->getJoinModel()->getJoin()->table_join;\r\n\t\t\t\t$pk = $this->getListModel()->getTable()->db_primary_key;\r\n\t\t\t\t$key = \"(SELECT GROUP_CONCAT(id SEPARATOR '//..*..//') FROM $jointable WHERE parent_id = $pk)\";\r\n\t\t\t\t$value = str_replace(\"'\", '', $value);\r\n\t\t\t\t$query = \"($key = '$value' OR $key LIKE '$value\".GROUPSPLITTER.\"%' OR\r\n\t\t\t\t$key LIKE '\".GROUPSPLITTER.\"$value\".GROUPSPLITTER.\"%' OR\r\n\t\t\t\t$key LIKE '%\".GROUPSPLITTER.\"$value')\";\r\n\t\t\t} else {\r\n\t\t\t\t$query = \" $key $condition $value \";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "02c43a7f2f890b89290ed54bf694d31a", "score": "0.44930688", "text": "public function getRowsQueryProperty()\n {\n // searching\n $query = Employee::query()\n ->with('category')\n ->byNameNickName($this->filters['search'] ?? null);\n //filters\n $query = $query->when($this->filters['social_status'] ?? null, function ($query) {\n $query->where('social_status', $this->filters['social_status']);\n });\n\n $query = $query->when($this->filters['amount_min'] ?? null, function ($query) {\n $query->where('salary', '>', $this->filters['amount_min']);\n });\n $query = $query->when($this->filters['amount_max'] ?? null, function ($query) {\n $query->where('salary', '<=', $this->filters['amount_max']);\n });\n $query = $query->when($this->filters['date_start'] ?? null, function ($query) {\n $query->whereDate('worked_date', '>', $this->filters['date_start']);\n });\n $query = $query->when($this->filters['date_end'] ?? null, function ($query) {\n $query->where('worked_date', '<=', $this->filters['date_end']);\n });\n $query = $query->when($this->filters['type'] ?? null, function ($query) {\n $query->where('type', $this->filters['type']);\n });\n\n $query = $query->when($this->filters['category_id'] ?? null, function ($query) {\n $query->where('category_id', $this->filters['category_id']);\n });\n // sorting\n $query = $this->applySorting($query);\n return $query;\n }", "title": "" }, { "docid": "877d82c0b2ce284ff940e787c7f453de", "score": "0.4492766", "text": "function hook_search_api_query_alter(SearchApiQueryInterface $query) {\n // Exclude entities with ID 0. (Assume the ID field is always indexed.)\n if ($query->getIndex()->getEntityType()) {\n $info = entity_get_info($query->getIndex()->getEntityType());\n $query->condition($info['entity keys']['id'], 0, '!=');\n }\n}", "title": "" }, { "docid": "155b5df3a88817f5349f519a80041b67", "score": "0.4491033", "text": "function\tget_sql_where($ent_object_data, $array_parameters, $field_data, $general_object_filter, $use_virtual_fields=true, $sql_type='mssql')\n{\n /*\n $fp = fopen('tmp.txt', 'w+');\n fwrite($fp, var_export($array_parameters['field_filters'],true).\"\\n\\n\\n\\n\\n\\n\");\n fclose($fp);\n */\n\n //Create 3 strings: one containing exclusive filters, one containing inclusive filters and one containing\n // the division filter (if there is one).\n $sql_where_inc = '';\n $sql_where_exc = '';\n $sql_where_div = '';\n foreach($array_parameters['field_filters'] as $field_filter)\n {\n //Get the parsed values for this field.\n $field_vars = get_field_vars($field_filter);\n $field_name =\t\t\t$field_filter['name'];\n $field_name_generic =\t$field_filter['generic_name'];\n $field_type =\t\t\t$field_filter['type']['sz_type'];\n $field_values =\t\t\t$field_filter['values'];\n $field_is_exclusive =\t$field_filter['is_exclusive'];\n $field_is_complement =\t$field_filter['is_complement'];\n\n //Identify whether this is a division field.\n $field_is_division =\t($field_name=='SQL' && $field_name_generic=='division_id') ? true : is_division_field($field_name, $field_data);\n\n //Get the field name for this field.\n if ($field_name == '')\n $field_name = get_local_name($field_name_generic, $field_data);\n\n //If a field name wasn't specified, skip the field.\n if ($field_name == '')\n continue;\n\n //If the field is a virtual field (it doesn't actually exist in the specified\n // database table) and $use_virtual_fields is false, skip the field.\n if (($use_virtual_fields==false) && is_virtual_field($field_name,$field_data))\n continue;\n\n //If get_field_filter() returns an empty string, something is wrong with the\n // filter parameter and this field should be skipped.\n if ($field_type == 'SQL')\n {\n $this_where = trim(get_field_conditional_filter($ent_object_data, $field_values, $field_data, $sql_type));\n }\n else\n {\n $this_where = trim(get_field_filter($ent_object_data['ent_object_data_table_name'], $field_name, $field_type, $field_values, $field_data, $sql_type));\n if ($this_where != '' && $field_is_complement)\n $this_where = \"(NOT($this_where))\";\n }\n\n if ($this_where != '')\n {\n if ($field_is_division)\n {\n //There should be only one division field filter.\n $sql_where_div = $this_where;\n }\n else\n {\n //Append the current field filter to its respective where clause, based on whether\n // it's an exclusive or inclusive filter.\n if ($field_is_exclusive)\n {\n //Only place the $sql_glue after the first filter.\n $this_glue = ($sql_where_exc == '') ? '' : ' AND ';\n $sql_where_exc .= $this_glue.$this_where;\n }\n else\n {\n //Only place the $sql_glue after the first filter.\n $this_glue = ($sql_where_inc == '') ? '' : ' OR ';\n $sql_where_inc .= $this_glue.$this_where;\n }\n }\n }\n }\n\n //Trim SQL filters. Not sure why this is needed.\n $sql_where_exc = trim($sql_where_exc);\n $sql_where_inc = trim($sql_where_inc);\n $sql_where_div = trim($sql_where_div);\n /*\n $fp = fopen('tmp1.txt', 'a+');\n fwrite($fp, 'sql_where_exc:'.$sql_where_exc.\"\\n\\n\");\n fwrite($fp, 'sql_where_inc:'.$sql_where_inc.\"\\n\\n\");\n fwrite($fp, 'sql_where_div:'.$sql_where_div.\"\\n\\n\");\n fclose($fp);\n */\n\n //Calculate how the two groups of filters (inclusive & exclusive) be claused together,\n // based on $sql_glue and the exclusive & inclusive filter clauses.\n if (($sql_where_exc!='') && ($sql_where_inc!=''))\n {\n $this_glue = ($array_parameters['is_exclusive']==true) ? ' AND ' : ' OR ';\n $sql_where = '(('.$sql_where_exc.')'.$this_glue.'('.$sql_where_inc.'))';\n }\n else if ($sql_where_exc != '')\n {\n //Only exclusive filters were found and created.\n $sql_where = '('.$sql_where_exc.')';\n }\n else if ($sql_where_inc != '')\n {\n //Only inclusive filters were found and created.\n $sql_where = '('.$sql_where_inc.')';\n }\n else\n {\n //Both WHERE clauses were blank. No filters were found, or they weren't valid.\n //Return an empty string.\n $sql_where = '';\n }\n\n if ($sql_where_div != '')\n {\n if ($sql_where == '')\n $sql_where = $sql_where_div;\n else\n $sql_where = \"($sql_where_div) AND ($sql_where)\";\n }\n\n //Done.\n return $sql_where;\n}", "title": "" }, { "docid": "d0f933a7bdfb8b3dab6a9845e6316a06", "score": "0.44766134", "text": "public static function parseFilters()\n {\n $fq = array_map(function ($pair) {\n return \"{$pair[0]}:\\\"{$pair[1]}\\\"\";\n }, self::parseFacets());\n if (get_option('solr_search_items_only')) {\n $fq[] = \"resulttype:Item\";\n }\n return $fq;\n }", "title": "" }, { "docid": "91c494bc048c67a2cd84673ed6f61b1d", "score": "0.44732347", "text": "function getQueryByFilter( $parameters ) {\n\t$where = \"\";\n\t$aWhere = array();\n\n\t$strQuery = \"\";\n\tif ( !isset($parameters[\"filters\"]) ):\n\t\t$strQuery .= \"\n\t\tSELECT p.NM,\n\t\t\t\tp.ID_CAD_PESSOA,\n\t\t\t\tm.ID AS ID_CAD_MEMBRO,\n\t\t\t\tesm.ID AS ID_EVE_MEMBRO,\n\t\t\t\tesm.ID_EVE_SAIDA,\n\t\t\t\tp.IDADE_HOJE,\n\t\t\t\tYEAR(es.DH_R)-YEAR(p.DT_NASC) - IF(DATE_FORMAT(p.DT_NASC,'%m%d')>DATE_FORMAT(es.DH_R,'%m%d'),1,0) AS IDADE_EVENTO_FIM,\n\t\t\t\tesm.FG_AUTORIZ\n\t\t\tFROM EVE_SAIDA es\n\t\tINNER JOIN CAD_ATIVOS a ON (a.NR_ANO = YEAR(es.DH_S))\n\t\tINNER JOIN CAD_MEMBRO m ON (m.ID = a.ID_CAD_MEMBRO)\n\t\tINNER JOIN CON_PESSOA p ON (p.ID_CAD_PESSOA = m.ID_CAD_PESSOA)\n\t\tLEFT JOIN EVE_SAIDA_MEMBRO esm ON (esm.ID_CAD_MEMBRO = a.ID_CAD_MEMBRO AND esm.ID_EVE_SAIDA = es.ID)\n\t\tWHERE es.ID = ?\n\n\t\tUNION\n\t\t\";\n\t\tif ($parameters[\"id\"] == \"Novo\"):\n\t\t\t$aWhere[] = null;\n\t\telse:\n\t\t\t$aWhere[] = $parameters[\"id\"];\n\n\t\t\t$where .= \" AND NOT EXISTS (SELECT 1\n\t\t\t\t\t\t\t\t\tFROM EVE_SAIDA es\n\t\t\t\t\t\t\t\tINNER JOIN CAD_ATIVOS a ON (a.NR_ANO = YEAR(es.DH_S))\n\t\t\t\t\t\t\t\tINNER JOIN CAD_MEMBRO m ON (m.ID = a.ID_CAD_MEMBRO)\n\t\t\t\t\t\t\t\tINNER JOIN CON_PESSOA p ON (p.ID_CAD_PESSOA = m.ID_CAD_PESSOA)\n\t\t\t\t\t\t\t\tLEFT JOIN EVE_SAIDA_MEMBRO esm ON (esm.ID_CAD_MEMBRO = a.ID_CAD_MEMBRO AND esm.ID_EVE_SAIDA = es.ID)\n\t\t\t\t\t\t\t\tWHERE es.ID = ?)\";\n\t\t\t$aWhere[] = $parameters[\"id\"];\n\t\tendif;\n\tendif;\n\n\t$strQuery .= \"SELECT ca.NM,\n\t\t\t\tca.ID_CAD_PESSOA,\n\t\t\t\tca.ID_CAD_MEMBRO,\n\t\t\t\tesm.ID AS ID_EVE_MEMBRO,\n\t\t\t\tes.ID AS ID_EVE_SAIDA,\n\t\t\t\tca.IDADE_HOJE,\n\t\t\t\tYEAR(es.DH_R)-YEAR(ca.DT_NASC) - IF(DATE_FORMAT(ca.DT_NASC,'%m%d')>DATE_FORMAT(es.DH_R,'%m%d'),1,0) AS IDADE_EVENTO_FIM,\n\t\t\t\tesm.FG_AUTORIZ\n\t\tFROM CON_ATIVOS ca\n\t\tLEFT JOIN EVE_SAIDA_MEMBRO esm ON (esm.ID_CAD_MEMBRO = ca.ID_CAD_MEMBRO AND esm.ID_EVE_SAIDA = ?)\n\t\tLEFT JOIN EVE_SAIDA es ON (es.ID = esm.ID_EVE_SAIDA)\n\t\tWHERE 1=1\n\t\";\n\tif ($parameters[\"id\"] == \"Novo\"):\n\t\t$aWhere[] = null;\n\telse:\n\t\t$aWhere[] = $parameters[\"id\"];\n\tendif;\n\n\t//if ( isset($parameters[\"dhr\"]) ):\n\t//\t$dhr = fStrToDate($parameters[\"dhr\"]);\n\t//\t$where .= \" AND YEAR(DATE('$dhr'))-YEAR(ca.DT_NASC) - IF(DATE_FORMAT(ca.DT_NASC,'%m%d')>DATE_FORMAT(DATE('$dhr'),'%m%d'),1,0) < 18\";\n\t//else:\n\t//\t$where .= \" ca.IDADE_HOJE < ?\";\n\t//\t$aWhere[] = 18;\n\t//endif;\n\n\tif ( isset($parameters[\"filters\"]) ):\n\t\t$keyAnt = \"\";\n\t\tforeach ($parameters[\"filters\"] as $key => $v):\n\t\t\t$not = false;\n\t\t\tif ( isset($parameters[\"filters\"][$key][\"fg\"]) ):\n\t\t\t\t$not = strtolower($parameters[\"filters\"][$key][\"fg\"]) == \"true\";\n\t\t\tendif;\n\t\t\t$notStr = ( $not ? \"NOT \" : \"\" );\n\t\t\tif ( $key == \"X\" ):\n\t\t\t\t$where .= \" AND ca.tp_sexo \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"U\" ):\n\t\t\t\t$where .= \" AND ca.id_unidade \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"C\" ):\n\t\t\t\t$where .= \" AND EXISTS (\n\t\t\t\t\t\t\tSELECT DISTINCT 1\n\t\t\t\t\t\t\tFROM TAB_APRENDIZADO ta\n\t\t\t\t\t\t\tLEFT JOIN APR_HISTORICO ah ON (ah.ID_TAB_APREND = ta.ID AND ah.DT_CONCLUSAO IS NULL)\n\t\t\t\t\t\t\tWHERE ta.TP_ITEM = 'CL' AND ah.ID_CAD_PESSOA = ca.ID_CAD_PESSOA AND\n\t\t\t\t\t\t\tta.ID \".$notStr.\"IN\";\n\t\t\telse:\n\t\t\t\t$where .= \" AND\";\n\t\t\tendif;\n\n\t\t\t$prim = true;\n\t\t\t$where .= \" (\";\n\t\t\tif ( is_array( $parameters[\"filters\"][$key][\"vl\"] ) ):\n\t\t\t\tforeach ($parameters[\"filters\"][$key][\"vl\"] as $value):\n\t\t\t\t\tif ( $key == \"B\" ):\n\t\t\t\t\t\tif ($value == \"S\"):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.DT_BAT IS \". ( $value == \"S\" && !$not ? \"NOT NULL\" : \"NULL\");\n\t\t\t\t\t\telseif ($value == \"N\"):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.DT_BAT IS \". ( $value == \"N\" && !$not ? \"NULL\" : \"NOT NULL\");\n\t\t\t\t\t\telseif (fStrStartWith($value,\"A\")):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"YEAR(ca.DT_BAT) \". ( !$not ? \" < \" : \" >= \") . substr($value,1,4);\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"YEAR(ca.DT_BAT) \". ( !$not ? \" = \" : \" <> \") . $value;\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"G\" ):\n\t\t\t\t\t\tif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_FANFARRA IS \".( !$not ? \"NOT NULL\" : \"NULL\");\n\t\t\t\t\t\telseif ( $value == \"4\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '2-04%'\");\n\t\t\t\t\t\telseif ( $value == \"5\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '2-07%'\");\n\t\t\t\t\t\telseif ( $value == \"6\" ):\n\t\t\t\t\t\t $where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '1-01%'\");\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '$value%'\");\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( empty($value) ):\n\t\t\t\t\t\t$aWhere[] = \"NULL\";\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\telse:\n\t\t\t\t\t\t$aWhere[] = $value;\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\tendif;\n\t\t\t\t\t$prim = false;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$aWhere[] = \"$notStr\".\"NULL\";\n\t\t\t\t$where .= \"?\";\n\t\t\tendif;\n\t\t\t$where .= \")\";\n\t\t\tif ( $key == \"C\" ):\n\t\t\t\t$where .= \")\";\n\t\t\tendif;\n\t\tendforeach;\n\tendif;\n\t$strQuery .= \" $where ORDER BY 1\";\n\n\t//echo $strQuery;\n\t//print_r($aWhere);\n\t//echo \"<br/><br/>\";\n\n\treturn CONN::get()->execute($strQuery, $aWhere);\n}", "title": "" }, { "docid": "7516ec6c3197ab45b4a7611ba1ad73bf", "score": "0.4468276", "text": "public function sql($field, $val)\n {\n // Initiate some vars\n $exact = $all = $starts = $ends = $exclude = false;\n $sep = '|';\n\n // Exact matches\n if (substr($val, 0, 1) == '=') {\n $val = substr($val, 1);\n $exact = true;\n }\n\n // Starts with matches\n if (substr($val, 0, 1) == '^') {\n $val = substr($val, 1);\n $starts = true;\n }\n\n // Ends with matches\n if (substr($val, -1) == '$') {\n $val = rtrim($val, '$');\n $ends = true;\n }\n\n // All items? -> && instead of |\n if (strpos($val, '&&') !== false) {\n $all = true;\n $sep = '&&';\n }\n\n // Excluding?\n if (substr($val, 0, 4) == 'not ') {\n $val = substr($val, 4);\n $exclude = true;\n }\n\n // Explode it\n $items = explode($sep, $val);\n\n // Init sql for where clause\n $sql = array();\n\n // SQL template thingie\n $tmpl = '(%s %s %s)';\n\n // Loop through each sub-item of the filter an create sub-clause\n foreach ($items as $item) {\n // Left hand side of the sql\n $key = $field;\n\n // whole word? Regexp search\n if (substr($item, -2) == '\\W') {\n $operand = $exclude ? 'NOT REGEXP' : 'REGEXP';\n $item = preg_quote(substr($item, 0, -2));\n $item = str_replace(\"'\", \"\\'\", $item);\n $item = \"'[[:<:]]{$item}[[:>:]]'\";\n } else {\n if (preg_match('/^([<>]=?)([\\d\\.]+)$/', $item, $match)) {\n // Numeric operator!\n $operand = $match[1];\n $item = $match[2];\n } elseif ($item == 'IS_EMPTY') {\n // IS_EMPTY should also account for NULL values as well as empty strings\n $key = sprintf($tmpl, $field, ($exclude ? '!=' : '='), \"''\");\n $item = sprintf($tmpl, $field, ($exclude ? 'IS NOT' : 'IS'), 'NULL');\n $operand = $exclude ? 'AND' : 'OR';\n } elseif ($exact || ($starts && $ends)) {\n // Use exact operand if empty or = was the first char in param\n $operand = $exclude ? '!=' : '=';\n $item = \"'\" . ee()->db->escape_str($item) . \"'\";\n } else {\n // Use like operand in all other cases\n $operand = $exclude ? 'NOT LIKE' : 'LIKE';\n $item = '%' . ee()->db->escape_like_str($item) . '%';\n\n // Allow for starts/ends with matching\n if ($starts) {\n $item = ltrim($item, '%');\n }\n if ($ends) {\n $item = rtrim($item, '%');\n }\n\n $item = \"'{$item}'\";\n\n // Account for `field` NOT LIKE '%foo%' where `field` can be NULL\n if ($exclude) {\n $item .= \" OR {$key} IS NULL\";\n }\n }\n }\n\n $sql[] = sprintf($tmpl, $key, $operand, $item);\n }\n\n // Inclusive or exclusive\n $andor = $all ? ' AND ' : ' OR ';\n\n // Get complete clause, with parenthesis and everything\n $where = (count($sql) == 1) ? $sql[0] : '(' . implode($andor, $sql) . ')';\n\n return $where;\n }", "title": "" }, { "docid": "be358eea09266dc80175fc1a9766fa0c", "score": "0.44661787", "text": "private function filterToQueryParams(QueryFilter $filter)\n {\n $queryParams = [];\n\n if ($filter->getSkip() > 0) {\n $queryParams['$skip'] = $filter->getSkip();\n }\n\n if ($filter->getLimit() > 0) {\n $queryParams['$top'] = $filter->getLimit();\n }\n\n if ($filter->getShowInlineCount()) {\n $queryParams['$inlinecount'] = 'allpages';\n }\n\n if ($filter->getOrderBy()) {\n $queryParams['$orderby'] = $filter->getOrderBy();\n }\n\n return $queryParams;\n }", "title": "" }, { "docid": "bd73fe92eb76298377fd09b553b6b315", "score": "0.44569805", "text": "function generateFilterConditions($filter = NULL, $pre = ''){\n\t\t$retval = array();\n\t\tif($filter){\n\t\t\tforeach($this->searchFields as $field){\n\t\t\t\t$retval['OR'][\"$field LIKE\"] = '%' . $filter . '%'; \n\t\t\t}\n\t\t}\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "1c166b36bd65466d8cc410d46fe8ce52", "score": "0.44564426", "text": "protected function extendWhereClauseWithFilterDomain(\n FilterDto $filter,\n string $table = ''\n ): string {\n $sql = '';\n if ($filter->getDomain() !== '') {\n $field = 'domain';\n if ($table !== '') {\n $field = $table . '.' . $field;\n }\n $sql .= ' and ' . $field . '=\"' . $filter->getDomain() . '\"';\n }\n return $sql;\n }", "title": "" }, { "docid": "93746ab52c07e78e81de98ea1b8b115a", "score": "0.44549462", "text": "private function createWhereArrayForReadItems($field, $projectId, $userId) {\r\n return array(\r\n 'where' => array(\r\n 'and',\r\n ItemFullInfoView::PROJECT_ID_FIELD . '= :projectId',\r\n \"$field = :userId\"\r\n ),\r\n 'params' => array(\r\n ':projectId' => (int) $projectId,\r\n ':userId' => $userId\r\n )\r\n );\r\n }", "title": "" }, { "docid": "f2c374bb0e25958c7b810e696e64beb3", "score": "0.4449925", "text": "public function filter($filter = 'assigned')\n {\n $this->setParameter('filter', $filter);\n\n return $this;\n }", "title": "" }, { "docid": "dc356a7c5d4c3fe9d0b27afab9bb7dd9", "score": "0.44440204", "text": "public function createQuery($sort = null, $filter = null, $fields = null)\n {\n $query = [];\n\n if (null !== $sort) {\n $query['sort'] = $sort;\n }\n\n if (null !== $filter) {\n $query['filter'] = [];\n if (is_array($filter)) {\n foreach ($filter as $f) {\n $query['filter'] = $f;\n }\n } else {\n $query['filter'] = $filter;\n }\n }\n\n if (null !== $fields) {\n $query['fields'] = (is_array($fields)) ? implode(',', $fields) : $fields;\n }\n\n if (!empty($query)) {\n $this->stream->setFields($query);\n }\n }", "title": "" }, { "docid": "cfb903a26d45a9300c8f28fa1495ca65", "score": "0.44421417", "text": "public function newFilter()\n {\n // create a filter object based on the model's filter class\n $filter = Solar::factory($this->_model->filter_class);\n \n // note which table cols are not part of the fetch cols\n $skip = array_diff(\n array_keys($this->_model->table_cols),\n $this->_model->fetch_cols\n );\n \n // set filters as specified by the model\n foreach ($this->_model->filters as $key => $list) {\n // skip table cols that are not part of the fetch cols\n if (in_array($key, $skip)) {\n continue;\n }\n $filter->addChainFilters($key, $list);\n }\n \n // set filters added to this record\n foreach ($this->_filters as $key => $list) {\n $filter->addChainFilters($key, $list);\n }\n \n // set which elements are required by the table itself\n foreach ($this->_model->table_cols as $key => $info) {\n if ($info['autoinc']) {\n // autoinc are not required\n $flag = false;\n } elseif (in_array($key, $this->_model->sequence_cols)) {\n // auto-sequence are not required\n $flag = false;\n } else {\n // go with the col info\n $flag = $info['require'];\n }\n \n // set the requirement flag\n $filter->setChainRequire($key, $flag);\n }\n \n // tell the filter to use the model for locale strings\n $filter->setChainLocaleObject($this->_model);\n \n // done!\n return $filter;\n }", "title": "" }, { "docid": "563e2e569e3cd448a73a392ad8a92720", "score": "0.44386145", "text": "public function toSearch();", "title": "" }, { "docid": "17a54f5106dfdde1057c6116d852a6e9", "score": "0.44334465", "text": "public function getQueryBuilder(array $filters);", "title": "" }, { "docid": "e96f40564358b9104d1aecb149b1e759", "score": "0.4432234", "text": "public function query(QueryInterface $query): array\n {\n $queryTime = time();\n $this->log(\n LogLevel::INFO, \n sprintf(\"Querying records from table '%s' ...\", \n $this->getName()\n ),\n [\n 'table' => $this->getName(),\n 'query' => (string)$query\n ]\n );\n\n $records = [];\n\n // We need to determine the records that need to be loaded\n // for the query evaluation, that is, if we ever need to load\n // all records to make the checks. This result is called the source.\n // It can therefore either be [all|index]\n // The rules are\n // Both \"ands\" and \"ors\" groups of criteria must be checked.\n // \n // If at least one criterion of the \"and\" group can work with\n // indexes, the source of the \"and\" group shall be index\n // Inversely, if at least one \"or\" criterion requires all records,\n // the source of the \"or\" group shall be all\n // \n // Finally if both groups can rely on indexes only we will load form the indexes\n \n $andCriterias = $query->getAndCriteria();\n $andCanOnlyRelyOnIndexes = empty($andCriterias) ? true : false;\n $andIds = [];\n foreach ($andCriterias as $c) {\n $col = $this->getColumnByName($c->getField());\n if(!$col) continue;\n\n if (!$col->isIndexed()) {\n continue;\n }\n \n $andCanOnlyRelyOnIndexes = true;\n $ids = [];\n $index = $this->indexManager->getIndexForCriterion($c);\n $ids = array_merge($ids, $index->getIds());\n\n // We'll want to keep the smallest subset of ids\n if (count($ids) < count($andIds) || empty($andIds)) {\n $andIds = $ids;\n }\n }\n\n $orCanOnlyRelyOnIndexes = true;\n $orIds = [];\n foreach ($query->getOrCriteria() as $c) {\n $col = $this->getColumnByName($c->getField());\n if(!$col) continue;\n\n if (!$col->isIndexed()) {\n $orCanOnlyRelyOnIndexes = false;\n continue;\n }\n \n $ids = [];\n $indexes = $this->indexManager->getIndexesForCriterion($c);\n foreach ($indexes as $index) {\n $ids = array_merge($ids, $index->getIds());\n }\n\n // We'll want to keep the smallest subset of ids\n if (count($ids) < count($andIds) || empty($andIds)) {\n $andIds = $ids;\n }\n }\n\n $records = [];\n if ($andCanOnlyRelyOnIndexes && $orCanOnlyRelyOnIndexes) {\n foreach ($ids as $id) {\n $this->log(\n LogLevel::INFO, \n sprintf(\"Criterion fetched indexes\", \n $this->getName()\n ),\n [\n 'criterion' => (string)$c,\n '$ids' => $ids\n ]\n );\n $filePath = $this->getDirectory()->getRealPath() . \"/$id.yaml\";\n $file = File::fromStringPath($filePath);\n $records[] = $this->loadRecordFromFile(\n $file\n );\n }\n } else {\n $records = iterator_to_array($this->queryAll());\n }\n\n // Filter records\n $records = array_filter($records, static function($rec) use ($query) {\n return $query->matches($rec);\n });\n\n\n // Use array values to make sure keys are sequential\n $records = array_values(array_unique($records));\n\n $this->log(\n LogLevel::INFO, \n sprintf(\"Queried records from table '%s' ...\", \n $this->getName()\n ),\n [\n 'table' => $this->getName(),\n 'query' => (string)$query,\n 'count' => count($records),\n 'strategy' => [\n 'use_index_for_inclusive' => $andCanOnlyRelyOnIndexes,\n 'use_index_for_exclusive'=> $orCanOnlyRelyOnIndexes,\n ],\n 'time' => time() - $queryTime\n ]\n );\n\n return $records;\n }", "title": "" }, { "docid": "25ead4e4832dc21beada8f36167c32f2", "score": "0.4426847", "text": "public function appendFilterSql($_select, $_backend)\n {\n // quote field identifier, set action and replace wildcards\n $field = $this->_getQuotedFieldName($_backend);\n if (($db = Core::getDb()) instanceof AdapterInterface) {\n if (!$this->_binary && $this->_caseSensitive) {\n $field = 'BINARY ' . $field;\n } elseif ($this->_binary && !$this->_caseSensitive) {\n if ($db->getConfig()['charset'] === 'utf8') {\n $field .= ' COLLATE utf8_unicode_ci';\n } else {\n $field .= ' COLLATE utf8mb4_unicode_ci';\n }\n }\n }\n \n if (! (isset($this->_opSqlMap[$this->_operator]) || array_key_exists($this->_operator, $this->_opSqlMap))) {\n throw new InvalidArgument('Operator \"' . $this->_operator . '\" not defined in sql map of ' . get_class($this));\n }\n $action = $this->_opSqlMap[$this->_operator];\n \n // don't remove wildcards for certain operators\n // TODO add an option for this?\n $value = (! in_array($this->_operator, array('in', 'notin'))) ? $this->_replaceWildcards($this->_value) : $this->_value;\n \n // check if group by is operator and return if this is the case\n if ($this->_operator == 'group') {\n $_select->group(isset($this->_options['field']) ? $this->_options['field'] : $this->_field);\n }\n \n if (in_array($this->_operator, array('in', 'notin')) && ! is_array($value)) {\n $value = explode(' ', $value);\n }\n \n // this is a text filter, so all items in the filter must be of type text (needed in pgsql)\n if (in_array($this->_operator, array('in', 'notin')) && is_array($value)) {\n foreach($value as &$item) {\n $item = (string) $item;\n }\n }\n\n $db = Core::getDb();\n \n if (is_array($value) && empty($value)) {\n $_select->where('1=' . (substr($this->_operator, 0, 3) == 'not' ? '1/* empty query */' : '0/* impossible query */'));\n return;\n }\n \n if ($this->_operator == 'equalsspecial') {\n if (is_array($value)) {\n foreach($value as $key => $v){\n $value[$key] = preg_replace('/(\\s+|\\-)/', '%', $v);\n }\n } else {\n $value = preg_replace('/(\\s+|\\-)/', '%', $value);\n } \n }\n \n if (! in_array($this->_operator, array('in', 'notin'))) {\n if ($this->_caseSensitive) {\n $where = Core::getDb()->quoteInto($field . ' ' . $action['sqlop'], $value);\n } else {\n $where = Core::getDb()->quoteInto(Command::factory($db)->prepareForILike($field) . ' ' . $action['sqlop'], $value);\n }\n } else {\n $where = Core::getDb()->quoteInto($field . $action['sqlop'], $value);\n }\n\n if (in_array($this->_operator, array('not', 'notin', 'notcontains')) && $value !== '') {\n $where = \"( $where OR $field IS NULL)\";\n }\n\n if (in_array($this->_operator, array('equals', 'equalsspecial', 'contains', 'startswith', 'endswith', 'in')) && $value === '') {\n $where = \"( $where OR $field IS NULL)\";\n }\n\n // finally append query to select object\n $_select->where($where);\n }", "title": "" }, { "docid": "4be437180f737b67cf8160847a17b38a", "score": "0.44219115", "text": "function generateWhereClauseFromFilters($json, $project_id, $valSel, $selectClause) {\n global $module;\n $sql = $selectClause . \" FROM redcap_data rdm where rdm.project_id = \" . $project_id . \" AND \";\n if (is_array($json->filters) || is_object($json->filters)) {\n foreach ($json->filters as $filterIdx => $filter) {\n // for now ignore max and min in doing counts. will need to think about how to do this in combo\n // with other parameters\n if ($filter->operator != 'MAX' && $filter->operator != 'MIN') {\n\n $filterstr = $this->filter_string($filter);\n\n $filter_val_sel = \"(case when rd.field_name = '\" . $filter->field . \"' and (rm.element_type = 'calc' or coalesce(rm.element_enum, '') = '') then rd.value \" .\n \" when rd.field_name = '\" . $filter->field . \"' then $valSel end) \" ;\n\n $filterstr = str_replace( $filter->field, $filter_val_sel, $filterstr);\n $sql = $sql . \" rdm.record in (select record from redcap_data rd, redcap_metadata rm where rd.project_id = rm.project_id and rd.field_name = rm.field_name \"\n . $this->getDagFilter('rd', $project_id)\n . \" and rd.project_id = \" . $project_id\n . \" and rd.field_name = '\" . $filter->field\n . \"' and \" . $filterstr . \") \" . \" \" . $filter->boolean . \" \";\n\n }\n }\n }\n\n if (substr($sql, -4) == \"AND \")\n $sql = substr($sql, 0, strlen($sql) - 4);\n\n if (substr($sql, -3) == \"OR \")\n $sql = substr($sql, 0, strlen($sql) - 3);\n\n $module->emDebug(\"SQL for COUNT : \" . $sql);\n\n return $sql;\n }", "title": "" }, { "docid": "5c7ad4f837a6520ab024a5fd5efb9c12", "score": "0.44152752", "text": "private function getFilter( $field, $value, $operation )\n {\n if( empty( $field ) || empty( $value ) || empty( $operation ) )\n {\n $this->log( \"Missing parameters to build filter : field='\" . $field . \"', value='\" . $value . \"', operation='\" . $operation . \"'\", Logger::LOG_WARN, __METHOD__ ) ;\n return null ;\n }\n\n $res = '$filter=' ;\n switch( $operation )\n {\n case 'contains' :\n $res .= \"contains(\" ;\n $res .= $field ;\n $res .= ',' ;\n $res .= \"'\" . $value . \"'\" ;\n $res .= \")\" ;\n break ;\n case 'equals' :\n $res .= $field ;\n $res .= \"%20eq%20\" ;\n $res .= \"'\" ;\n $res .= $value ;\n $res .= \"'\" ;\n break ;\n case 'equalsraw' :\n $res .= $field ;\n $res .= \"%20eq%20\" ;\n $res .= $value ;\n break ;\n default :\n $res = null ;\n break ;\n }\n return $res ;\n }", "title": "" }, { "docid": "ac2bbd850d843c8e853603006a014387", "score": "0.4414023", "text": "public static function getSearchFilterQuery($filterName)\r\n {\r\n $filterQuery = array('join' => array(), 'where' => array());\r\n $post = JFactory::getApplication()->input->post->getArray();\r\n $geographicalFilters = array('country', 'region', 'city');\r\n $db = JFactory::getDbo();\r\n\r\n //The geographical filters are not taken in account in the query as they \r\n //deal with each other in their respective file.\r\n if(in_array($filterName, $geographicalFilters)) {\r\n $filters = array('month', 'price', 'duration', 'theme', 'date');\r\n }\r\n else {\r\n $filters = array('country', 'region', 'city', 'month', 'price', 'duration', 'theme', 'date');\r\n }\r\n\r\n foreach($filters as $key => $filter) {\r\n //Stores the value of each available filter.\r\n //Note: The calling filter is not taken in account.\r\n if($filter != $filterName && isset($post['filter'][$filter])) {\r\n\t//Note: Uses a variable's variable\r\n\t${$filter} = $post['filter'][$filter];\r\n }\r\n }\r\n\r\n //Joins over the travel table for the geographical filters.\r\n if(in_array($filterName, $geographicalFilters)) {\r\n if((isset($price) && !empty($price)) || (isset($duration) && !empty($duration)) || (isset($theme) && !empty($theme)) || (isset($month) && !empty($month))) {\r\n\t$alias = substr($filterName, 0, 2);\r\n\t$filterQuery['join'][] = '#__odyssey_travel AS t ON sf_'.$alias.'.travel_id=t.id';\r\n }\r\n }\r\n //Joins over the search_fiter table for the \"regular\" filters.\r\n else {\r\n if(isset($country) && !empty($country)) {\r\n\t$filterQuery['join'][] = '#__odyssey_search_filter AS sf_co ON sf_co.travel_id=t.id';\r\n\t$filterQuery['where'][] = 'sf_co.country_code='.$db->Quote($country);\r\n }\r\n\r\n if(isset($region) && !empty($region)) {\r\n\t$filterQuery['join'][] = '#__odyssey_search_filter AS sf_re ON sf_re.travel_id=t.id';\r\n\t$filterQuery['where'][] = 'sf_re.region_code='.$db->Quote($region);\r\n }\r\n\r\n if(isset($city) && !empty($city)) {\r\n\t$filterQuery['join'][] = '#__odyssey_search_filter AS sf_ci ON sf_ci.travel_id=t.id';\r\n\t$filterQuery['where'][] = 'sf_ci.city_id='.(int)$city;\r\n }\r\n }\r\n\r\n //To get the months we also have to join over the departure step map table.\r\n if(isset($month) && !empty($month)) {\r\n $filterQuery['join'][] = '#__odyssey_departure_step_map AS ds ON ds.step_id=t.dpt_step_id';\r\n $filterQuery['where'][] = 'ds.date_time LIKE '.$db->Quote($month.'%');\r\n }\r\n\r\n if(isset($price) && !empty($price)) {\r\n $filterQuery['where'][] = 't.price_range='.$db->Quote($price);\r\n }\r\n\r\n if(isset($duration) && !empty($duration)) {\r\n $filterQuery['where'][] = 't.travel_duration='.$db->Quote($duration);\r\n }\r\n\r\n if(isset($theme) && !empty($theme)) {\r\n $filterQuery['where'][] = 't.theme='.$db->Quote($theme);\r\n }\r\n\r\n return $filterQuery;\r\n }", "title": "" }, { "docid": "16aedfdca3a8d112b47ebf2a1db060f7", "score": "0.44116148", "text": "protected function getEdiDocumentByFilterRequest($filter = null, $page = null, $limit = null, $sort = null)\n {\n\n $resourcePath = '/beta/ediDocument/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($filter !== null) {\n $queryParams['filter'] = ObjectSerializer::toQueryValue($filter);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($sort !== null) {\n $queryParams['sort'] = ObjectSerializer::toQueryValue($sort);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c7956f3fbc5f8147dc9d0b4459c41aee", "score": "0.44109055", "text": "public function &removeFilterQuery ($fq) {}", "title": "" }, { "docid": "3da17b44311e0480b9e4641178778463", "score": "0.44053406", "text": "public function processFilters(\\Doctrine\\ORM\\QueryBuilder $sql, $filters)\n {\n if (sizeof($filters)) {\n foreach ($filters as $key => $value) {\n if (!$value) {\n continue;\n }\n switch ($key) {\n case 'organization':\n $sql\n ->andWhere(\"o.id IN (:organizationIds)\");\n\n $ids = explode(',', $value);\n\n $sql->setParameter(':organizationIds', $ids);\n break;\n case 'customer':\n $sql\n ->andWhere(\"customer.id IN (:customerIds)\");\n\n $ids = explode(',', $value);\n\n $sql->setParameter(':customerIds', $ids);\n break;\n case 'performer':\n $sql\n ->andWhere(\"performer.id IN (:performerIds)\");\n\n $ids = explode(',', $value);\n\n $sql->setParameter(':performerIds', $ids);\n break;\n case 'prolongation':\n $valueBool = $value == 'Yes' ? 'TRUE': 'FALSE';\n $sql\n ->andWhere(\"d.prolongation = {$valueBool}\");\n\n break;\n case 'dogovorType':\n $ids = explode(',', $value);\n $sql\n ->andWhere(\"d.dogovorTypeId in (:dogovorTypeId)\")\n ->setParameter(':dogovorTypeId', $ids);\n break;\n case 'number':\n $value = trim($value);\n\n $sql\n ->andWhere(\"d.number LIKE :number\")\n ->setParameter(':number', \"{$value}%\");\n break;\n case 'dateRange':\n $dateArr = explode('-', $value);\n $dateStart = new \\DateTime(str_replace('.', '-', $dateArr[0]));\n $dateStop = new \\DateTime(str_replace('.', '-', $dateArr[1]));\n $sql\n ->andWhere(\"d.createDateTime BETWEEN :datestart AND :datestop\")\n ->setParameter(':datestart', $dateStart)\n ->setParameter(':datestop', $dateStop);\n break;\n case 'dateRangeForType':\n $dateArr = explode('-', $value);\n $dateStart = new \\DateTime(str_replace('.', '-', $dateArr[0]));\n $dateStop = new \\DateTime('23:59:59 '.str_replace('.', '-', $dateArr[1]));\n if (isset($filters['typeDate']) && $filters['typeDate'] == 'startdatetime') {\n $sql->andWhere(\"d.startdatetime BETWEEN :datestart AND :datestop\");\n } elseif (isset($filters['typeDate']) && $filters['typeDate'] == 'stopdatetime') {\n $sql->andWhere(\"d.stopdatetime BETWEEN :datestart AND :datestop\");\n } elseif (isset($filters['typeDate']) && $filters['typeDate'] == 'prologation') {\n $sql->andWhere(\"d.prolongationDate BETWEEN :datestart AND :datestop\");\n } else {\n $sql->andWhere(\n \"\n d.startdatetime BETWEEN :datestart AND :datestop\n or\n d.stopdatetime BETWEEN :datestart AND :datestop\n or\n d.prolongationDate BETWEEN :datestart AND :datestop\n \"\n );\n }\n $sql->setParameter(':datestart', $dateStart)\n ->setParameter(':datestop', $dateStop);\n break;\n case 'subject':\n $sql\n ->andWhere(\"d.subject LIKE :subject\")\n ->setParameter(':subject', \"{$value}%\");\n break;\n case 'isActive':\n if ($value == 'true') {\n $sql->andWhere(\"d.isActive = TRUE\");\n } elseif ($value == 'false') {\n $sql->andWhere(\"d.isActive = FALSE\");\n }\n break;\n\n }\n }\n }\n }", "title": "" }, { "docid": "41e65a8b423ca82c0c04d66d38d78ef0", "score": "0.44020483", "text": "function filter_get_results($sql, $fielddef, $fieldname, $specialvalue = ''){\n \tstatic $FILTERSETS;\n\t\tglobal $CFG, $DB;\n\n\t\t// filter values caching\n\t\tif (isset($FILTERSETS) && array_key_exists($fielddef, $FILTERSETS) && empty($specialvalue)){\n\t\t\treturn $FILTERSETS[$fielddef];\n\t\t}\n\n\t\tif ($this->allow_filter_desaggregate($fielddef)){\n\t\t\t// try desagregate\n\t\t\t$sql = preg_replace('/MAX\\(([^\\(]+)\\)/si', '$1', $sql);\n\t\t\t$sql = preg_replace('/SUM\\((.*?)\\) AS/si', '$1 AS', $sql);\n\t\t\t$sql = preg_replace('/COUNT\\((?:DISTINCT)?([^\\(]+)\\)/si', '$1', $sql);\n\t\t\t// purge from unwanted clauses\n\t\t\tif (preg_match('/\\bGROUP BY\\b/si', $sql)){\n\t \t\t$sql = preg_replace('/GROUP BY.*(?!GROUP BY).*$/si', '', $sql);\n\t \t}\n\t\t\tif (preg_match('/\\bORDER BY\\b/si', $sql)){\n\t \t\t$sql = preg_replace('/ORDER BY.*?$/si', '', $sql);\n\t \t}\n\t }\n\n\t\t$filtersql = 'SELECT DISTINCT '.$fieldname.' FROM ( '.$sql.' ) as subreq ';\n\n\t\t$filtersql .= \" ORDER BY $fieldname \";\n \t$filtersql = $this->protect($filtersql);\n \tif (!empty($this->config->showfilterqueries)){\n \t\t$this->filterqueries = \"<div class=\\\"dashboard-filter-query\\\" style=\\\"padding:1px;border:1px solid #808080;margin:2px;font-size;0.75em;font-family:monospace\\\"><b>FILTER :</b> $filtersql</div>\";\n \t}\n\t\tif ($this->config->target == 'moodle'){\n\t\t\t$FILTERSET[$fielddef] = $DB->get_records_sql($filtersql);\n\t\t} else {\n\t\t\tif (!isediting() || !@$CFG->block_dashboard_enable_isediting_security){\n\t\t\t\t$FILTERSET[$fielddef] = extra_db_query($filtersql, false, true, $error);\n\t\t\t\tif ($error){\n\t\t\t\t\t$this->content->text .= $error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$FILTERSET[$fielddef] = array();\n\t\t\t}\n\t\t}\n\t\tif (is_array($FILTERSET[$fielddef])){\n\t\t\tswitch ($specialvalue) {\n\t\t\t\tcase 'LAST' :\n\t\t\t\t\t$result = end(array_values($FILTERSET[$fielddef]))->$fieldname;\n\t\t\t\t\treturn (!empty($FILTERSET[$fielddef])) ? $result : false ;\n\t\t\t\tcase 'FIRST' :\n\t\t\t\t\t$result = reset(array_values($FILTERSET[$fielddef]))->$fieldname ;\n\t\t\t\t\treturn (!empty($FILTERSET[$fielddef])) ? $result : false ;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $FILTERSET[$fielddef];\t\t\t\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "8901ea0850b2bb623eadb11d888de3cc", "score": "0.4401344", "text": "function get_filters_sql($filters)\t{\n\t $Wv=\"\";$Gv=\"\";$Ov=\"\";$Hv=\"\";$Lv=\"\";$Jv=\"\";\n\t $Wf=true;$Gf=true;$Of=true;$Hf=true;$Lf=true;$Jf=true;\n\t $this->column_selections = \"*\";\n\t\n\tforeach($filters as $filter)\n\t{\n\t\tswitch($filter[0])\n\t\t{\n\t\t\tcase 'group':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" AND \".$filter[1].\" \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'or_group':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" OR \".$filter[1].\" \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'where':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" \".$filter[2].\" '\".$filter[3].\"' \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" AND \".$filter[1].\" \".$filter[2].\" '\".$filter[3].\"' \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'or_where':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" \".$filter[2].\" '\".$filter[3].\"' \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" OR \".$filter[1].\" \".$filter[2].\"'\".$filter[3].\"' \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'like':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" AND \".$filter[1].\" LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'or_like':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" OR \".$filter[1].\" LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'not_like':\n\t\t\tif($Wf)\n\t\t\t{\n\t\t\t\t$Wf=false;\n\t\t\t\t$Wv=\" WHERE \".$filter[1].\" NOT LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Wv=$Wv.\" AND \".$filter[1].\" NOT LIKE '\".$filter[2].\"' \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'group_by':\n\t\t\tif($Gf)\n\t\t\t{\n\t\t\t\t$Gf=false;\n\t\t\t\t$Gv=\" GROUP BY \".$filter[1].\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Gv=$Gv.\" ,\".$filter[1].\" \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'order_by':\n\t\t\tif($Of)\n\t\t\t{\n\t\t\t\t$Of=false;\n\t\t\t\t$Ov=\" ORDER BY \".$filter[1].\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Ov=$Ov.\" ,\".$filter[1].\" \";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'having':\n\t\t\tif($Hf)\n\t\t\t{\n\t\t\t\t$Hf=false;\n\t\t\t\t$Hv=\" HAVING \".$filter[1].\" = \".$filter[2].\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'limit':\n\t\t\tif($Lf)\n\t\t\t{\n\t\t\t\t$Lf=false;\n\t\t\t\tif(isset($filter[2]))\n\t\t\t\t{\n\t\t\t\t\t$Lv=\" LIMIT \".$filter[1].\" , \".$filter[2] .\" \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$Lv=\" LIMIT \".$filter[1].\" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'join':\n\t\t\tif($Jf)\n\t\t\t{\n\t\t\t\t$Jf=false;\n\t\t\t\tif(isset($filter[3]))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$Jv=\" \".$filter[3].\" JOIN \".$filter[1].\" ON \".$filter[2].\" \";\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\n\t\t\t\t\t$Jv=\" JOIN \".$filter[1].\" ON \".$filter[2].\" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'select':\n\t\t\t\n\t\t\t\tif($this->column_selections == \"*\")\n\t\t\t\t{\n\t\t\t\t\t$this->column_selections = $filter[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->column_selections = $this->column_selections.\",\".$filter[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'distinct':\n\t\t\t\n\t\t\t\tif($this->column_selections == \"*\")\n\t\t\t\t{\n\t\t\t\t\t$this->column_selections = \" DISTINCT \".$filter[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->column_selections = \" DISTINCT \".$filter[1].\",\".$this->column_selections;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t}\t\t\t\t\n\t}\n\t\n\t$return=$Jv.$Wv.$Gv.$Ov.$Hv.$Lv;\n\treturn $return;\n}", "title": "" }, { "docid": "d161c01e92d6ab76893b52a0792cffd5", "score": "0.43918315", "text": "public function filter($className, $params, $orderBy=null, $parameterOperators=null, \n $formFieldNameConversions=null, $limit=null, $page=null, \n $onlyCount=False, $alphanumericSortFields=null) {\n \n \n if ($onlyCount==False) {\n $dql = 'SELECT t0 ';\n }\n else {\n $dql = 'SELECT count(t0) ';\n }\n \n $dql .= 'FROM '.$className.' t0 ';\n \n $whe = $par = [];\n $join = [];\n \n $path_prefix_num = 1;\n \n $param_uniq_identifier = 1;\n \n foreach($params as $parameter_key=>$parameter_value){\n \n if ($formFieldNameConversions===null || !array_key_exists($parameter_key, $formFieldNameConversions)){\n $db_parameter_name = $parameter_key;\n }\n else{\n $db_parameter_name = $formFieldNameConversions[$parameter_key];\n }\n \n $whe_index = 0;\n \n if ($parameterOperators===null){\n $operator = \"=\";\n }\n else if (array_key_exists($parameter_key, $parameterOperators)){\n $operator = $parameterOperators[$parameter_key];\n }\n else {\n $operator = \"=\";\n }\n \n if (is_array($parameter_value) && array_key_exists(\"value\", $parameter_value)){\n \n $path_prefix = \"p\".$path_prefix_num.\"_\";\n $path_prefix_num += 1;\n\n $additional_path_conditions = null;\n\n if(is_array($parameter_value[\"value\"]) && $operator != \"IN\" && $operator != \"NOT IN\"){\n $ar_slice = $parameter_value[\"path\"];\n }\n else{\n if (array_key_exists(\"path\", $parameter_value[\"path\"])) {\n $ar_slice = array_slice($parameter_value[\"path\"][\"path\"], 0, -1);\n if (array_key_exists(\"filter\", $parameter_value[\"path\"])) {\n $additional_path_conditions = $parameter_value[\"path\"][\"filter\"];\n }\n }\n else {\n $ar_slice = array_slice($parameter_value[\"path\"], 0, -1);\n }\n }\n \n foreach($ar_slice as $table_index=>$table_column){\n if($table_index==0){\n $join[] = \"JOIN t\".($table_index).\".\".$table_column.\" \".$path_prefix.\"t\".($table_index+1);\n }\n else{\n $join[] = \"JOIN \".$path_prefix.\"t\".($table_index).\".\".$table_column.\" \".$path_prefix.\"t\".($table_index+1);\n }\n $whe_index += 1;\n }\n \n if(is_array($parameter_value[\"value\"]) && $operator != \"IN\" && $operator != \"NOT IN\"){\n foreach($parameter_value[\"value\"] as $inner_key=>$inner_value){\n if ($operator == \"LIKE\"){\n $inner_value = \"%\" . $inner_value .\"%\";\n }\n if ($operator == \"IN\" || $operator == \"NOT IN\") {\n $whe[] = 't'.$whe_index.'.'.$inner_key.' '.$operator.' (:'.$inner_key.$param_uniq_identifier.')';\n }\n else {\n $whe[] = 't'.$whe_index.'.'.$inner_key.' '.$operator.' :'.$inner_key.$param_uniq_identifier;\n }\n if ($additional_path_conditions!=null) {\n foreach($additional_path_conditions as $additional_path_condition_column=>$additional_path_condition_value) {\n $whe[] = 't'.$whe_index.'.'.$additional_path_condition_column.' = \\''.$additional_path_condition_value.'\\'';\n }\n }\n $par[$inner_key.$param_uniq_identifier] = $inner_value;\n $param_uniq_identifier += 1;\n }\n }\n else{\n if (!array_key_exists(\"path\", $parameter_value[\"path\"])) {\n $parameter_key = end($parameter_value[\"path\"]);\n $db_parameter_name = $parameter_key; \n }\n else {\n $parameter_key = end($parameter_value[\"path\"][\"path\"]);\n $db_parameter_name = $parameter_key;\n }\n \n $parameter_value = $parameter_value[\"value\"];\n\n if ($operator == \"LIKE\"){\n $parameter_value = \"%\" . $parameter_value .\"%\";\n }\n if($whe_index>0){\n if ($operator == \"IN\" || $operator == \"NOT IN\") {\n $whe[] = $path_prefix.'t'.$whe_index.'.'.$db_parameter_name.' '.$operator.' (:'.$parameter_key.$param_uniq_identifier.')';\n }\n else {\n $whe[] = $path_prefix.'t'.$whe_index.'.'.$db_parameter_name.' '.$operator.' :'.$parameter_key.$param_uniq_identifier;\n }\n if ($additional_path_conditions!=null) {\n foreach($additional_path_conditions as $additional_path_condition_column=>$additional_path_condition_value) {\n $whe[] = $path_prefix.'t'.$whe_index.'.'.$additional_path_condition_column.' = \\''.$additional_path_condition_value.'\\'';\n }\n }\n }\n else{\n if ($operator == \"IN\" || $operator == \"NOT IN\") {\n $whe[] = 't'.$whe_index.'.'.$db_parameter_name.' '.$operator.' (:'.$parameter_key.$param_uniq_identifier.')';\n }\n else {\n $whe[] = 't'.$whe_index.'.'.$db_parameter_name.' '.$operator.' :'.$parameter_key.$param_uniq_identifier;\n }\n if ($additional_path_conditions!=null) {\n foreach($additional_path_conditions as $additional_path_condition_column=>$additional_path_condition_value) {\n $whe[] = 't'.$whe_index.'.'.$additional_path_condition_column.' = \\''.$additional_path_condition_value.'\\'';\n }\n }\n }\n \n $par[$parameter_key.$param_uniq_identifier] = $parameter_value;\n $param_uniq_identifier += 1;\n }\n \n }\n else{\n if ($operator == \"LIKE\"){\n $parameter_value = \"%\" . $parameter_value .\"%\";\n }\n if ($operator == \"IN\" || $operator == \"NOT IN\") {\n $whe[] = 't'.$whe_index.'.'.$db_parameter_name.' '.$operator.' (:'.$parameter_key.')';\n }\n else {\n $whe[] = 't'.$whe_index.'.'.$db_parameter_name.' '.$operator.' :'.$parameter_key;\n }\n $par[$parameter_key] = $parameter_value;\n }\n \n }\n\n $dql = $dql . join(' ', $join);\n \n if (count($whe)>0) {\n $dql .= ' WHERE ' . join(' AND ', $whe);\n }\n \n if ($orderBy!=null){\n $dql .= \" ORDER BY \";\n $orderByList = [];\n foreach($orderBy as $column=>$sortOrder){\n if ($alphanumericSortFields!=null && in_array($column, $alphanumericSortFields)) {\n $orderByList[] = \"LENGTH(t0.\".$column.\") \".$sortOrder;\n }\n $orderByList[] = \"t0.\".$column.\" \".$sortOrder;\n }\n $dql .= join(', ', $orderByList);\n }\n \n $query = $this->getEntityManager()->createQuery($dql)->setParameters($par);\n\n if ($onlyCount==True) {\n return $query->getSingleScalarResult();\n }\n \n\n if ($limit!==null) {\n \n $query->setMaxResults($limit);\n \n if ($page!=null) {\n $query->setFirstResult($limit*($page-1));\n }\n }\n \n return $query->getResult();\n\n }", "title": "" }, { "docid": "52a3b4c3a625ab9b2ea1ead548fba94a", "score": "0.4385373", "text": "private function setFilter(array $options) {\n $use_and = false;\n $filter = [];\n $set_in = [];\n $set_inbetween = [];\n\n if ($options) {\n foreach ($options as $key => $value) {\n // Multiple elements so require '$and'.\n if (is_array($value)) {\n $use_and = true;\n }\n\n }\n\n if (!$use_and) {\n foreach ($options as $key => $value) {\n $filter[$key] = $value;\n }\n } else {\n foreach ($options as $key => $value) {\n $in_statement = [];\n\n if (is_array($value) && count($value) > 0) {\n // Uses between ('<>') or in filter.\n if ($value[0] == '<>') {\n $set_inbetween[$key] = ['$gte' => (int) $value[1], '$lte' => (int) $value[2]];\n } else {\n foreach ($value as $v) {\n $in_statement[] = $v;\n }\n $set_in[] = [$key => ['$in' => $in_statement]];\n }\n } else {\n $set_in[] = [$key => $value];\n }\n\n }\n\n // Use Mongo $and for this type of statement.\n if (!empty($set_in)) {\n $filter = ['$and' => $set_in];\n }\n\n // Merges `and` and `between` if available.\n if (!empty($filter) && !empty($set_inbetween)) {\n $filter = array_merge($filter, $set_inbetween);\n } elseif (!empty($set_inbetween)) {\n $filter = $set_inbetween;\n }\n }\n }\n\n return $filter;\n }", "title": "" }, { "docid": "889157a07bd50343ad5a34d470c6a7ea", "score": "0.438451", "text": "public static function filter($input = null, $builder){\n\n $input = self::_normalizeArguments($input);\n\n //$fields = self::getRequestFields($request);\n $filters = self::_getFilters($input);\n $relationships = self::_getRelationships($input);\n $sorting = self::_getSorting($input);\n\n\n $query = $builder;\n $query = self::_addRelationships($query, $relationships);\n $query = self::_addFilters($query, $filters);\n $query = self::_sortResult($query, $sorting);\n\n return $query;\n\n\n }", "title": "" }, { "docid": "836ee35dfaa8850cb97e1df08b473feb", "score": "0.43814614", "text": "public function addFilter($field, $value)\n {\n $filter = new \\Elastica\\Filter\\Term(array($field => $value));\n $this->filters[] = $filter;\n }", "title": "" }, { "docid": "a959b9894ed2789ce257579907efc474", "score": "0.4380447", "text": "public function addFilter($column, $value, $comparison = sfDataSource::EQUAL, $group_operator = sfDataSource::GROUP_AND);", "title": "" }, { "docid": "a6a4a69074fae4ecfc86cccbf392a75a", "score": "0.43803725", "text": "function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\tcase \"x_dc_id\":\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `dc_id` AS `LinkFld`, `tgl` AS `DispFld`, `jumlah` AS `Disp2Fld`, `tujuan` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `t_14drop_cash`\";\n\t\t\t$sWhereWrk = \"{filter}\";\n\t\t\t$this->dc_id->LookupFilters = array(\"df1\" => \"7\", \"dx1\" => ew_CastDateFieldForLike('`tgl`', 7, \"DB\"), \"dx2\" => '`jumlah`', \"dx3\" => '`tujuan`');\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => '`dc_id` = {filter_value}', \"t0\" => \"3\", \"fn0\" => \"\");\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$this->Lookup_Selecting($this->dc_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\tif ($sSqlWrk <> \"\")\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\n\t\t\tbreak;\n\t\tcase \"x_vendor_id\":\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `vendor_id` AS `LinkFld`, `vendor_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `t_01vendor`\";\n\t\t\t$sWhereWrk = \"{filter}\";\n\t\t\t$this->vendor_id->LookupFilters = array(\"dx1\" => '`vendor_nama`');\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => '`vendor_id` = {filter_value}', \"t0\" => \"3\", \"fn0\" => \"\");\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$this->Lookup_Selecting($this->vendor_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\tif ($sSqlWrk <> \"\")\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\n\t\t\tbreak;\n\t\tcase \"x_item_id\":\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `item_id` AS `LinkFld`, `item_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `t_02item`\";\n\t\t\t$sWhereWrk = \"{filter}\";\n\t\t\t$this->item_id->LookupFilters = array(\"dx1\" => '`item_nama`');\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => '`item_id` = {filter_value}', \"t0\" => \"3\", \"fn0\" => \"\");\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$this->Lookup_Selecting($this->item_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\tif ($sSqlWrk <> \"\")\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\n\t\t\tbreak;\n\t\tcase \"x_satuan_id\":\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `satuan_id` AS `LinkFld`, `satuan_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `t_03satuan`\";\n\t\t\t$sWhereWrk = \"{filter}\";\n\t\t\t$this->satuan_id->LookupFilters = array(\"dx1\" => '`satuan_nama`');\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => '`satuan_id` = {filter_value}', \"t0\" => \"3\", \"fn0\" => \"\");\n\t\t\t$sSqlWrk = \"\";\n\t\t\t$this->Lookup_Selecting($this->satuan_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\tif ($sSqlWrk <> \"\")\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" } ]
46e4abaf6a2070fd6c10800626b0c2de
/Steptwo addslashes(), stripslashes(), get_magic_quotes_runtime(), and ini_get().
[ { "docid": "da3b40d9a9aebf7f9c57c9035a771add", "score": "0.0", "text": "function step_two(){\n\techo get_magic_quotes_gpc(); // 1\n\techo $_POST['lastname']; // O\\'reilly\n\techo addslashes($_POST['lastname']); // O\\\\\\'reilly\n\n\tif (!get_magic_quotes_gpc()) {\n\t\t$lastname = addslashes($_POST['lastname']);\n\t} else {\n\t\t$lastname = $_POST['lastname'];\n\t}\n\n\techo $lastname; // O\\'reilly\n\t$sql = \"INSERT INTO lastnames (lastname) VALUES ('$lastname')\";\n}", "title": "" } ]
[ { "docid": "73a25cd90375f897b28d5e44f31b5812", "score": "0.8159632", "text": "function doStripslashes() {\n\tif (get_magic_quotes_gpc()) {\n\t\t$_GET = stripslashesDeep($_GET);\n\t\t$_POST = stripslashesDeep($_POST);\n\t\t$_COOKIE = stripslashesDeep($_COOKIE);\n\t\t$_REQUEST = stripslashesDeep($_REQUEST);\n\t}\n}", "title": "" }, { "docid": "343e2028e0fbc0cab6971587670ae820", "score": "0.804884", "text": "function magicquoteshandler() {\n if (get_magic_quotes_gpc())\n {\n $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);\n while (list($key, $val) = each ($process))\n {\n foreach ($val as $k => $v) \n {\n unset($process[$key][$k]);\n if (is_array($v))\n {\n $process[$key][stripslashes($k)] = $v;\n $process[] = &$process[$key][stripslashes($k)];\n }\n else\n {\n $process[$key][stripslashes($k)] = stripslashes($v);\n }\n }\n }\n unset($process);\n }\n }", "title": "" }, { "docid": "f4837f6251060cd5e99aff1fc8ca3731", "score": "0.7976351", "text": "function strip_slashes($str) {\r\n return (get_magic_quotes_gpc() ? stripslashes($str) : $str);\r\n}", "title": "" }, { "docid": "5922b182af3b65e6757955a4591f0361", "score": "0.7902965", "text": "function magic_quotes()\n{\n\treturn function_exists('get_magic_quotes_gpc') and get_magic_quotes_gpc();\n}", "title": "" }, { "docid": "7fe834a39425299763c65af42b9f98c1", "score": "0.7853908", "text": "function custom_stripslashes($value)\n\t{\n\t\t/*\n\t\tif(get_magic_quotes_gpc())\n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t*/\t\n\t\t\treturn stripslashes($value);\n\t\t//}\t\n\t}", "title": "" }, { "docid": "fc08db60b1ec97fd7156c094bcdb4c06", "score": "0.784868", "text": "function Refine($str)\r\n{\r\n if(get_magic_quotes_gpc())\r\n return stripslashes($str);\r\n return $str;\r\n}", "title": "" }, { "docid": "5c3fa5c0b52571e026a3b1754caf9a16", "score": "0.78231066", "text": "function add_slashes($str) {\r\n return (get_magic_quotes_gpc() ? $str : addslashes($str));\r\n}", "title": "" }, { "docid": "2b348982fcd7cd8a5692cd2404f8615a", "score": "0.7805048", "text": "static function handle_magic_quotes() {\n // do we need to strip slashes?\n if (!get_magic_quotes_gpc()) return;\n\n $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);\n while (list($key, $val) = each($process)) {\n foreach ($val as $k => $v) {\n unset($process[$key][$k]);\n if (is_array($v)) {\n $process[$key][stripslashes($k)] = $v;\n $process[] = &$process[$key][stripslashes($k)];\n } else {\n $process[$key][stripslashes($k)] = stripslashes($v);\n }\n }\n }\n unset($process);\n }", "title": "" }, { "docid": "589801a4897519ad4a18c0b31f0487d5", "score": "0.776091", "text": "function magicDequote($text)\n{\n // If the PHP server enables magic quotes, remove them\n if (get_magic_quotes_gpc() == 1)\n return stripslashes($text);\n return $text; \n}", "title": "" }, { "docid": "ed3f5f555d8488ccc873fad3b7e2fd10", "score": "0.7731471", "text": "function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }", "title": "" }, { "docid": "ab7154a4e71a1eeea4af9f2c2deac39c", "score": "0.7704858", "text": "function magic_quotes($val)\n\t{\n\t\tif (!get_magic_quotes_gpc()) {\n\t\t $val = addslashes($val);\n\t\t} else {\n\t\t $val = $val;\n\t\t}\n\n\t\treturn $val;\n\t\t\n\t}", "title": "" }, { "docid": "240cb4cac4342c189d4639f0a7532149", "score": "0.7634588", "text": "function remove_magic_quotes()\r\n{\r\n\r\n\tif(get_magic_quotes_gpc())\r\n\t{\r\n\t\t$_GET \t= strip_slashes_deep($_GET\t\t);\r\n\t\t$_POST \t= strip_slashes_deep($_POST\t\t);\r\n\t\t$_COOKIE= strip_slashes_deep($_COOKIE\t);\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "ca90fb019bce7e8703a82e5199606b15", "score": "0.758331", "text": "public static function removeMagicQuotes() {\n function stripSlashesDeep($value) {\n return is_array($value)? array_map(\"stripSlashesDeep\", $value) : stripslashes($value);\n }\n\n if (get_magic_quotes_gpc() ) {\n if(isset($_GET)){\n $_GET = stripSlashesDeep($_GET);\n }\n \n if(isset($_POST)){\n $_POST = stripSlashesDeep($_POST);\n }\n \n if(isset($_COOKIE)){\n $_COOKIE = stripSlashesDeep($_COOKIE);\n }\n\n if(isset($_SESSION)){\n $_SESSION = stripSlashesDeep($_SESSION);\n }\n \n }\n }", "title": "" }, { "docid": "ac014d669c6b3694998eb75ae8bf5231", "score": "0.7524934", "text": "function strip_magic_quotes_gpc()\r\n{\r\n\tif (get_magic_quotes_gpc()) {\r\n\t\tfunction array_stripslashes(&$item, $key) {\r\n\t\t\t$item = stripslashes($item);\r\n\t\t}\r\n\t\tif (!empty($_GET)) {\r\n\t\t\tarray_walk_recursive($_GET, 'array_stripslashes');\r\n\t\t}\r\n\t\tif (!empty($_POST)) {\r\n\t\t\tarray_walk_recursive($_POST, 'array_stripslashes');\r\n\t\t}\r\n\t\tif (!empty($_REQUEST)) {\r\n\t\t\tarray_walk_recursive($_POST, 'array_stripslashes');\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "259be63b6092c0557f005696dcb43fdc", "score": "0.7437553", "text": "function remslash($thevalue) {\n if (!get_magic_quotes_gpc()) {\n $myvalue = stripslashes($thevalue);\n } else {\n $myvalue = $thevalue;\n }\n return $myvalue;\n}", "title": "" }, { "docid": "4f108ac3db0749c160fa3b95e89e5577", "score": "0.7400049", "text": "function custom_addslashes($value)\n\t{\n\t\t//CodeIgniter Always removes effect of magic quotes so that input data is always be unslashed by defalut.\n\t\t/*\n\t\tif(get_magic_quotes_gpc())\n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t*/\n\t\t\treturn addslashes($value);\n\t\t//}\n\t}", "title": "" }, { "docid": "63f788857b98ed25d7e6e7b49dc6f506", "score": "0.7288955", "text": "function fix_magic_quotes() {\n\tglobal $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n\t// clean gpc of slashes\n\tif (!get_magic_quotes_gpc()) {\n\t\treturn false;\n\t}\n\n\t$_GET = transcribe($_GET);\n\t$_POST = transcribe($_POST);\n\t$_COOKIE = transcribe($_COOKIE);\n\t$_REQUEST = transcribe($_REQUEST);\n\n\t$HTTP_GET_VARS = $_GET;\n\t$HTTP_POST_VARS = $_GET;\n\t$HTTP_COOKIE_VARS = $_COOKIE;\n\n\treturn true;\n\n}", "title": "" }, { "docid": "a60dde83eb6ed057d8f9cf3d826d60f0", "score": "0.7261017", "text": "function deslash($string)\r\n{\r\n\tif (get_magic_quotes_gpc())\r\n\t\t$string = stripslashes($string);\r\n\treturn $string;\r\n}", "title": "" }, { "docid": "99cfc048eb96fc73e7f85e9e502f9158", "score": "0.72533524", "text": "function motingo_deslashit($stringvar){\n if (1 == get_magic_quotes_gpc()){\n $stringvar = stripslashes($stringvar);\n }\n return $stringvar;\n}", "title": "" }, { "docid": "f3d59454ab7933970016cb2d5a68652c", "score": "0.72419375", "text": "function stripslashes_safe($string) {\n/// so C:\\temp becomes C:temp ... this isn't good.\n/// The following should work as a fairly safe replacement\n/// to be called on quoted AND unquoted strings (to be sure)\n\n $string = str_replace(\"\\\\'\", \"'\", $string);\n $string = str_replace('\\\\\"', '\"', $string);\n $string = str_replace('\\\\\\\\', '\\\\', $string);\n return $string;\n}", "title": "" }, { "docid": "65c5770be1b9b2948442af753c4172d5", "score": "0.71578324", "text": "function escapeSingleQuotes($str)\n{\n return stripslashes(str_replace(\"'\",\"''\",$str));\n}", "title": "" }, { "docid": "ae39ed721b82f9f5ea907b2d20dd31c8", "score": "0.71236926", "text": "function mysql_prep( $value ) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists( \"mysql_real_escape_string\" ); // i.e. PHP >= v4.3.0\n if( $new_enough_php ) { // PHP v4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if( $magic_quotes_active ) { $value = stripslashes( $value); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if( !$magic_quotes_active) { $value = addslashes( $value); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n }", "title": "" }, { "docid": "90b6e8e17ba16de2c13a993a83a4608a", "score": "0.71139127", "text": "function fix_string($input){\n\t if (get_magic_quotes_gpc()) $input = stripslashes($input); return htmlentities($input);\n\t}", "title": "" }, { "docid": "109776e042d0856ad06359647ce17ea1", "score": "0.71047336", "text": "function asf_clean_input() {\n //strip slashes from user input\n if (get_magic_quotes_gpc()) {\n $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);\n while (list($key, $val) = each($process)) {\n foreach ($val as $k => $v) {\n unset($process[$key][$k]);\n if (is_array($v)) {\n $process[$key][stripslashes($k)] = $v;\n $process[] = &$process[$key][stripslashes($k)];\n } else {\n $process[$key][stripslashes($k)] = stripslashes($v);\n }\n }\n }\n unset($process);\n }\n}", "title": "" }, { "docid": "92fa1c1a492241e6b6f73f83360baa99", "score": "0.70990753", "text": "function reslash($string)\r\n{\r\n\tif (!get_magic_quotes_gpc())\r\n\t\t$string = addslashes($string);\r\n\treturn $string;\r\n}", "title": "" }, { "docid": "5b2fe7c9a8502817c69e57237544a35b", "score": "0.7098566", "text": "function escape($string) {\r\n\t\tif(get_magic_quotes_runtime()){\t\t\t\r\n\t\t\t$string = stripslashes($string);\r\n\t\t}\r\n\t\treturn mysql_real_escape_string($string);\r\n\t}", "title": "" }, { "docid": "3065881c1bf6d1033fdb8f3620af155c", "score": "0.70759284", "text": "function motingo_slashit($stringvar){\n if (!get_magic_quotes_gpc()){\n $stringvar = addslashes($stringvar);\n }\n return $stringvar;\n}", "title": "" }, { "docid": "ce9c347b5d0cc0025a109903b4774f6f", "score": "0.70657504", "text": "private function smartslashes($string){\n\t\tif(!is_object($this->query)) $this->query=new GLOBAL_SQL();\n\t\tif(!$this->query->db->connection) $this->query->db->connect();\n\t\t#Return escaped data if it's no\n\t\t$string=$this->query->escape(get_magic_quotes_gpc()?stripslashes($string):$string);\n\t\t#Return ascaped data\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "c6fc5935bcadc6c9d667146050c0f7ba", "score": "0.70236635", "text": "function msEscapeQuotes($_s, $_GPC) {\n\tif(get_magic_quotes_gpc() && $_GPC)\n\t\treturn $_s;\n\telse\n\t\treturn addslashes($_s);\n}", "title": "" }, { "docid": "80ec61d032c7b37d0267ebc49ba53132", "score": "0.7006181", "text": "function cstring($value){\n if(get_magic_quotes_gpc($value)){ // removing sql_vulnerabelity //not working!\n $value=stripslashes($value);\n } // escaping things properly\nreturn mysql_real_escape_string($value);\n}", "title": "" }, { "docid": "954bcf5beb8155e9c5b8cfe4bf6988de", "score": "0.696997", "text": "function escape($str) {\r\n $str = get_magic_quotes_gpc()?stripslashes($str):$str;\r\n /* $str = mysql_real_escape_string($str); */\r\n return $str;\r\n }", "title": "" }, { "docid": "37dd0bd0575e1a66417f531face96da7", "score": "0.69530666", "text": "function mysqli_prep($value) {\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\n\t\t$new_enough_php = function_exists(\"mysqli_real_escape_string\"); // i.e. PHP >= v4.3.0\n\t\t\n\t\tif ($new_enough_php) { // PHP >= v4.3.0 or higher\n\t\t//undo any magic quote effects so mysqli_real_escape_string can do the work\n\t\t\n\t\tif ($magic_quotes_active) { $value = stripslashes ($value); }\n\t\t$value = mysqli_real_escape_string ($value);\n\t\t} else { //before PHP v4.3.0\n\t\t// if magic quotes aren't already ON then add slashes manually\n\t\tif (!$magic_quotes_active) { $value = addslashes($value); }\n\t\t// if the magic quotes are active, then the slashes already exist\n\t\t\n\t\t}\n\t\treturn $value;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "27517613b4d87d32dbaee3b84bd69d1a", "score": "0.695082", "text": "function db_escape_string($string)\n{\n if ( get_magic_quotes_gpc() ) {\n $string = stripslashes($string);\n }\n return mysql_escape_string($string);\n}", "title": "" }, { "docid": "8706762e856f6a02fef45178d9ecc99c", "score": "0.6948891", "text": "function deslash($string)\n{\n\tif (get_magic_quotes_gpc())\n\t$string = stripslashes($string);\n\treturn $string;\n}", "title": "" }, { "docid": "d5a149a7b00d22ddd68a0d56c968a4d8", "score": "0.69304526", "text": "public static function _escape_request()\n\t\t{\nif (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {\n // Create lamba style unescaping function (for portability)\n $quotes_sybase = strtolower(ini_get('magic_quotes_sybase'));\n $unescape_function = (empty($quotes_sybase) || $quotes_sybase === 'off') ? 'stripslashes($value)' : 'str_replace(\"\\'\\'\",\"\\'\",$value)';\n $stripslashes_deep = create_function('&$value, $fn', '\n if (is_string($value)) {\n $value = ' . $unescape_function . ';\n } else if (is_array($value)) {\n foreach ($value as &$v) $fn($v, $fn);\n }\n ');\n \n // Unescape data\n $stripslashes_deep($_POST, $stripslashes_deep);\n $stripslashes_deep($_GET, $stripslashes_deep);\n\n $stripslashes_deep($_COOKIE, $stripslashes_deep);\n $stripslashes_deep($_REQUEST, $stripslashes_deep);\n\n\t\t}\n\n\t\t}", "title": "" }, { "docid": "aa67eca96fbffcbdb58dff4d3e22f1d1", "score": "0.6926965", "text": "function escapeSpecialCharacters($data)\n{\n\t//$data = trim($data);\n\tif (get_magic_quotes_gpc())\n\t\treturn $data; //No need to escape data if magic quotes is turned on\n\t$data = is_array($data) ? array_map('escapeSpecialCharacters', $data) : addslashes(trim($data));//mysql_real_escape_string\n return $data;\n}", "title": "" }, { "docid": "3d876ad530224b1fe1d402d7598016bf", "score": "0.6886319", "text": "function com_db_input($string) \n{\n return addslashes($string);\n}", "title": "" }, { "docid": "fa21eb66a17de31261a66d5d7cd5a24e", "score": "0.68743354", "text": "public function testStripSlashesWithMagicQuotes()\n {\n $data = \"This should have \\\"quotes\\\" in it\";\n $stripped = \\Light\\Stdlib\\Util::stripSlashesIfMagicQuotes($data, true);\n $this->assertEquals('This should have \"quotes\" in it', $stripped);\n }", "title": "" }, { "docid": "2b22583529bd926dbda10a82b798d51b", "score": "0.68340224", "text": "function sanitize ($value){\n\t\tif( get_magic_quotes_gpc() )\n\t\t\t{\n\t\t\t\t$value = stripslashes( $value );\n\t\t\t}\n\t\tif( function_exists( “mysql_real_escape_string” ) )\n\t\t\t{\n\t\t\t\t$value = mysql_real_escape_string( $value );\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\t$value = addslashes( $value );\n\t\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "7e1cd756212633364240ceaada3f2988", "score": "0.68219435", "text": "public function disable_magic_quotes() {\r\n\t\t//let's turn off magic quotes - just a bunch of pain anyway\r\n\t\t@set_magic_quotes_runtime(false);\r\n\t\tini_set('magic_quotes_runtime', 0);\r\n\r\n\t\t/**\r\n\t\t * Removes malicious data from string. Primarily used to clean XSS and\r\n\t\t * other vulnerabilities.\r\n\t\t * @param string $input The string to be cleaned.\r\n\t\t * @return string\r\n\t\t */\r\n\t\tfunction cleanString(&$string) {\r\n\t\t\tif (is_array($string)) {\r\n\t\t\t\tforeach ($string as $key => &$value) {\r\n\t\t\t\t\tcleanString($value);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$string = strip_tags($string);\r\n\t\t\t\t$string = htmlspecialchars($string, 4, 'UTF-8');\r\n\t\t\t\t$string = htmlentities($string);\r\n\t\t\t\t$string = stripslashes($string);\r\n\r\n\t\t\t\t$mysqliLink = new mysqli(\"localhost\", \"tackster\", \"4tackster2use\", \"db_tackster\");\r\n//\t\t\terror_log(\"SQL INJECTION BEFORE: \" . $string . \"\\n\", 3, \"/tmp/php_error.log\");\r\n\t\t\t\t$string = mysqli_real_escape_string($mysqliLink, $string);\r\n//\t\t\terror_log(\"SQL INJECTION AFTER: \" . $string . \"\\n\", 3, \"/tmp/php_error.log\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tarray_walk($_POST, 'cleanString');\r\n\t\tarray_walk($_GET, 'cleanString');\r\n\t\tarray_walk($_COOKIE, 'cleanString');\r\n\t}", "title": "" }, { "docid": "d277bc98558fc8a458c568eaf4325a0b", "score": "0.6818499", "text": "function mysql_prep($value)\n{\n\t// magic quotes gpc가 PHP 세팅에서 on으로 되어있는지 확인 \n // gpc는 get, post, cookie의 약자임\n\t$magic_quotes_active = get_magic_quotes_gpc(); //boolean - true if the quotes thing is turned on\n\n\t// PHP 버전 4.3.0 이상에서만 존재하는 mysql_real_escape_string 함수의 사용이 가능한지 확인\n\t$new_enough_php = function_exists(\"mysql_real_escape_string\");\n\t\t\n\tif($new_enough_php)\n\t{\n\t\tif($magic_quotes_active)\n\t\t{\n\t\t\t$value = stripslashes($value);//if its a new version of php but has the quotes thing running, then strip the slashes it puts in\n\t\t}\n\t\t$value = mysql_real_escape_string($value);//if its a new version use the function to deal with characters\n\t}\n\telse\n\t\tif(!$magic_quotes_active)//If its an old version, and the magic quotes are off use the addslashes function\n\t\t{\n\t\t\t$value = addslashes($value);\n\t\t}\n\t\t\n\treturn $value;\n}", "title": "" }, { "docid": "bc4b1b63502fd0b831144941b6186ac8", "score": "0.6813532", "text": "function safeImport($data) {\n if (get_magic_quotes_gpc()) {\n $data = stripslashes($data);\n }\n return mysql_real_escape_string($data);\n}", "title": "" }, { "docid": "c8ea4282ba24acccfb02356c2ced5d19", "score": "0.6804897", "text": "function do_magic_quotes_gpc(&$ar) {\n if (!is_array($ar)) return false;\n\n foreach ($ar as $key => $value) {\n if (is_array($ar[$key])) {\n do_magic_quotes_gpc($ar[$key]);\n } else {\n $ar[$key] = addslashes($value);\n }\n }\n reset($ar);\n}", "title": "" }, { "docid": "4e686955018f29fa9cbbe5e982f88e39", "score": "0.6783702", "text": "function qsafe($string) {\n global $db_link;\n\n $string=trim($string);\n // If magic_quotes_gpc is enabled, first apply stripslashes() to the data. \n // Using mysqli_real_escape_string function on data which has already been escaped \n // will escape the data twice so we are reversing it first \n if(get_magic_quotes_gpc()) {\n $string = stripslashes($string);\n } \n \n // mysqli_real_escape_string escapes special chars such as quotes. \n return mysqli_real_escape_string($db_link,$string);\n}", "title": "" }, { "docid": "d853bc1bed2a4b60e92728131eb6c96d", "score": "0.6778665", "text": "function stringClean($str) {\n if(!get_magic_quotes_gpc()) {\n $str = addslashes($str);\n }\n return $str;\n}", "title": "" }, { "docid": "b50f654f46336330ef228bf05c8ecba9", "score": "0.67785573", "text": "public function _clean_magic_quotes($string){\n\t\tif(get_magic_quotes_gpc()){\n\t\t\tif(is_array($string)){\n\t\t\t\t$nstring = array();\n\t\t\t\tforeach($string as $key => $value){\n\t\t\t\t\t$nstring[$this->_clean_magic_quotes($key)] = $this->_clean_magic_quotes($value);\n\t\t\t\t}\n\t\t\t\t$string = $nstring;\n\t\t\t}else{\n\t\t\t\t$string = stripslashes($string);\n\t\t\t}\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "d5146c851b26e65f65428d26c872d67b", "score": "0.67651707", "text": "protected function escape_quotes()\n\t\t{\n\t\t\t// Create a placeholder that would be extremely hard to inject into the string\n\t\t\t$placeholder = mt_rand() . '_DBL_SLASH_PLACEHOLDER_' . mt_rand();\n\t\t\t\n\t\t\t//Place placeholders in legit escaped backslashes\n\t\t\t$this->replace_strings(array('\\\\\\\\'=>$placeholder));\n\t\t\t\n\t\t\t// Replace all quotes with their escaped counterparts\n\t\t\t$this->replace_strings(array(\"'\"=>\"\\'\",'\"'=>'\\\"'));\n\t\t\t\n\t\t\t// Replace attempts to escape by already escaping the quotes\n\t\t\t$this->replace_strings(array('\\\\\\\\'=>'\\\\'));\n\t\t\t\n\t\t\t$this->replace_strings(array($placeholder=>'\\\\\\\\'));\n\t\t\t\n\t\t}", "title": "" }, { "docid": "22b30206884959648416ff3e8b3bae6b", "score": "0.67364025", "text": "function unEscapeSpecialCharacters($data)\n{\n\tif (get_magic_quotes_gpc())\n\t\treturn $data; //No need to escape data if magic quotes is turned on\n\t//$data = is_array($data) ? array_map('unEscapeSpecialCharacters', $data) :stripslashes(utf8_encode(trim($data)));\n\t$data = is_array($data) ? array_map('unEscapeSpecialCharacters', $data) :stripslashes((trim($data)));\n return $data;\n}", "title": "" }, { "docid": "89faff6d04341ed1d454a730f9454661", "score": "0.6707972", "text": "function mySQLSafe($value, $quote=\"'\", $stripslashes = true) {\n\t\t$value = str_replace(array(\"\\'\",\"'\"),\"&#39;\",$value);\n\t\t\n\t\t// Stripslashes \n\t\tif (get_magic_quotes_gpc() && $stripslashes) { \n\t\t\t$value = stripslashes($value); \n\t\t} \n\t\t// Quote value\n\t\tif(version_compare(phpversion(),\"4.3.0\")==\"-1\") {\n\t\t\t$value = mysql_escape_string($value);\n\t\t} else {\n\t\t\t$value = mysql_real_escape_string($value);\n\t\t}\n\t\t$value = $quote . trim($value) . $quote; \n\t \n\t\treturn $value; \n\t}", "title": "" }, { "docid": "5129ad15c661d8685011e60658b804fa", "score": "0.67024666", "text": "public function escape_value($value) {\n\t\tif( $this->real_escape_string_exists ) { // PHP v4.3.0 or higher\n\t\t\t// undo any magic quote effects so mysql_real_escape_string can do the work\n\t\t\tif( $this->magic_quotes_active ) { $value = stripslashes( $value ); }\n\t\t\t$value = mysql_real_escape_string( $value );\n\t\t} else { // before PHP v4.3.0\n\t\t\t// if magic quotes aren't already on then add slashes manually\n\t\t\tif( !$this->magic_quotes_active ) { $value = addslashes( $value ); }\n\t\t\t// if magic quotes are active, then the slashes already exist\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "6409fdbe9fb063203a9931c3112dc103", "score": "0.66862154", "text": "function deslash($string) {\n\t\tif (get_magic_quotes_gpc())\n\t\t\t$string = stripslashes($string);\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "6409fdbe9fb063203a9931c3112dc103", "score": "0.66862154", "text": "function deslash($string) {\n\t\tif (get_magic_quotes_gpc())\n\t\t\t$string = stripslashes($string);\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "13d34ea3bc94ee67490c7b134e232d9b", "score": "0.6685827", "text": "function my_add_null_slashes( $string ) {\n global $db;\n if(defined('MYSQLI_ENABLED')){\n return $db->real_escape_string(stripslashes($string));\n }else{\n return mysql_real_escape_string(stripslashes($string));\n }\n\n}", "title": "" }, { "docid": "6b5b8717f0a199c6edab6a0803110be5", "score": "0.668515", "text": "public function testStripSlashesWithoutMagicQuotes()\n {\n $data = \"This should have \\\"quotes\\\" in it\";\n $stripped = \\Light\\Stdlib\\Util::stripSlashesIfMagicQuotes($data, false);\n $this->assertEquals($data, $stripped);\n }", "title": "" }, { "docid": "654d47f60d3fd00e05bce3c5ba382a0c", "score": "0.6655584", "text": "function dbSafe ( $inputStr ) {\n\t\treturn (get_magic_quotes_gpc())? $inputStr: addslashes((String)$inputStr);\n\t}", "title": "" }, { "docid": "52aea7b77472f61465bc8faf76c3334d", "score": "0.6651531", "text": "function abx_remove_magic_quotes(&$val) {\n\n if(is_array($val))\n\n array_walk($val,'abx_remove_magic_quotes');\n\n elseif (get_magic_quotes_gpc())\n\n $val = stripslashes($val);\n\n else\n\n $val = stripslashes($val);\n\n }", "title": "" }, { "docid": "e28905b05898e1dca0a793089f2b3dbf", "score": "0.6642469", "text": "function undo_magic_quotes_gpc(&$array){ \r\n foreach($array as &$value){ \r\n if(is_array($value)){ \r\n undo_magic_quotes_gpc($value); \r\n }else{ \r\n $value = stripslashes($value); \r\n } \r\n } \r\n }", "title": "" }, { "docid": "0377ceb05b5121e434ca6397c99abb6b", "score": "0.66394687", "text": "function sql_quote($value)\n{\n\t# removes items such as javascript attacks\n\t$value\t=\tcleanInput($value);\n\n if(get_magic_quotes_gpc())\n {\n $value = nl2br($value);\n\t $value = str_replace(\"\\r\\n\",\"\",$value);\n $value = stripslashes($value);\n }\n\n/*\n // check if this function exists\n if(function_exists(\"mysql_real_escape_string\"))\n {\n $value = mysql_real_escape_string($value);\n }\n // for PHP < 4.3.0 use addslashes\n else\n {\n $value = addslashes($value);\n }\n*/\n\n\t# no mysql connection required\n $value = mysql_escape_mimic(transliterateString($value));\n\n# changing the < to [ removes <br>\n#\t$value\t= str_replace('<','[', $value);\n#\t$value\t= str_replace('>',']', $value);\n#\t$value\t= str_replace('(','[', $value);\n#\t$value\t= str_replace(')',']', $value);\n\n return $value;\n }", "title": "" }, { "docid": "cd970b8b08fdfd0bc24f6389dba7c18c", "score": "0.66294193", "text": "function legal_input($value) {\n $value = trim($value);\n $value = stripslashes($value);\n $value = htmlspecialchars($value);\n return $value;\n}", "title": "" }, { "docid": "023c6d451f728ff262be8ab2e5099e0c", "score": "0.662505", "text": "function sanitizeString($var) //sanitizing input\r\n{\r\n\tif (get_magic_quotes_gpc())\r\n\t\t$var = stripslashes($var);\r\n\t$var = htmlentities($var);\r\n\t$var = strip_tags($var);\r\n\treturn $var;\r\n}", "title": "" }, { "docid": "b7a7377f1c98f3094b30f4925ed762d3", "score": "0.65969455", "text": "function db_escapeString($str){\n\tglobal $_conn;\n\tif(get_magic_quotes_gpc()){\n\t\treturn mysqli_real_escape_string($_conn, stripslashes($str));\n\t}else{\n\t\treturn mysqli_real_escape_string($_conn, $str);\n\t}\t\n}", "title": "" }, { "docid": "c111b08dff2d3754c81f067203d64c76", "score": "0.65753126", "text": "function quote_smart($value)\n{\n // Stripslashes if we need to\n if (get_magic_quotes_gpc()) \n {\n $value = stripslashes($value);\n }\n\n // Quote it if it's not a number\n if (!is_numeric($value)) \n {\n $value = \"'\" . mysql_real_escape_string(trim($value)) . \"'\";\n }\n\n return $value;\n}", "title": "" }, { "docid": "81efffba8fa0c96c7092002f2aa674d8", "score": "0.65685177", "text": "function escape($str) {\r\n\tglobal $db;\r\n $str = get_magic_quotes_gpc()?stripslashes($str):$str;\r\n $str = mysql_real_escape_string($str);\r\n return $str;\r\n }", "title": "" }, { "docid": "b03818ea90cd179a39bf234f76002603", "score": "0.6567422", "text": "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data,ENT_QUOTES);\r\n return $data; \r\n}", "title": "" }, { "docid": "d470b780556cbaaeade6786e889c9f61", "score": "0.65565157", "text": "function &escapeString( $str )\r\n {\r\n $str = str_replace (\"'\", \"''\", $str ); \r\n $str = str_replace (\"\\r\", \"\", $str ); \r\n return $str;\r\n }", "title": "" }, { "docid": "d6810e3122bc658534eb6251475f7382", "score": "0.6546905", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');\n return $data;\n}", "title": "" }, { "docid": "805e4ee155778d573e7dd850ed1ce070", "score": "0.6540879", "text": "function stringDirty($str) {\n $str = stripslashes($str);\n return $str;\n}", "title": "" }, { "docid": "d6458030611c3544fea21c2b897fd25a", "score": "0.6532261", "text": "function quote_smart($value) {\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n \n if (!is_numeric($value)) {\n $value = $this->mysqli->real_escape_string($value);\n }\n return $value;\n }", "title": "" }, { "docid": "c0fa4bc179e1c34df8312528b34c37d6", "score": "0.65293187", "text": "function string_wslashes($string)\n{\n return addslashes($string);\n}", "title": "" }, { "docid": "f95d103b2aa262c1bad5050006c57256", "score": "0.6527684", "text": "function real_escape_str( $str )\n {\n global $conn;\n if ( get_magic_quotes_gpc( ) ) $str = stripslashes( $str );\n // return mysql_real_escape_string( $str ) ;\n return mysqli_real_escape_string($conn, $str);\n }", "title": "" }, { "docid": "976b1dc7093a18a4cc19153c1ebead60", "score": "0.65252835", "text": "function skyre_sanitize_strip_slashes($input) {\n return wp_kses_stripslashes($input);\n}", "title": "" }, { "docid": "6ef7bda8bc595dd2e9075a1bf72e11ab", "score": "0.6523665", "text": "function nice_escape($unescapedString)\n{\n if (get_magic_quotes_gpc())\n {\n $unescapedString = stripslashes($unescapedString);\n }\n $semiEscapedString = mysql_real_escape_string($unescapedString);\n $escapedString = addcslashes($semiEscapedString, \"%_\");\n\n return $escapedString;\n}", "title": "" }, { "docid": "c0d7c2404ae496f03ed15f053f259799", "score": "0.65202254", "text": "function CleanPostForMysql($target) {\r\n if (get_magic_quotes_gpc()) {\r\n return $target;\r\n } else {\r\n return mysql_real_escape_string($target);\r\n } // if\r\n}", "title": "" }, { "docid": "8c98493684d916cabdf5369ca8375aa1", "score": "0.6503816", "text": "function undo_magic_quotes ( $source )\n{\n $source = str_replace ( \"\\\\'\", \"'\", $source );\n // \"backslash double quote\" becomes \"simply double quote\"\n $source = str_replace ( \"\\\\\\\"\", \"\\\"\", $source );\n // \"backslash backslash\" becomes simply \"backslash\"\n $source = str_replace ( \"\\\\\\\\\", \"\\\\\", $source );\n\n return $source;\n}", "title": "" }, { "docid": "1a91e2e93e2136efbcbec964a604e0ac", "score": "0.65019786", "text": "function mosStripslashes( &$value ) {\n\t$ret = '';\n\tif (is_string( $value )) {\n\t\t$ret = stripslashes( $value );\n\t} else {\n\t\tif (is_array( $value )) {\n\t\t\t$ret = array();\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$ret[$key] = mosStripslashes( $val );\n\t\t\t}\n\t\t} else {\n\t\t\t$ret = $value;\n\t\t}\n\t}\n\treturn $ret;\n}", "title": "" }, { "docid": "81e65fd5fdb4978926f03cf9f9d56bc1", "score": "0.64964306", "text": "function chckInp($val){\n\t$val = trim($val);\n\t$val = stripslashes($val);\n\t$val = htmlspecialchars($val);\n\treturn $val;\n}", "title": "" }, { "docid": "f9eee3ed53a20ce1a9458c618850684b", "score": "0.649501", "text": "function escape_data($data) {\n global $dbc;\n if (ini_get('magic_quotes_gpc')) {\n $data = stripslashes($data);\n }\n return mysql_real_escape_string(trim($data), $dbc);\n }", "title": "" }, { "docid": "061cb6227d13fdd21d12d9161388212a", "score": "0.64851314", "text": "function _escape($s)\n{\n\t$s=str_replace('\\\\','\\\\\\\\',$s);\n\t$s=str_replace('(','\\\\(',$s);\n\t$s=str_replace(')','\\\\)',$s);\n\t$s=str_replace(\"\\r\",'\\\\r',$s);\n\treturn $s;\n}", "title": "" }, { "docid": "9f5ab23c35cb8b6391166eb5917f72e4", "score": "0.6480333", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n $data = htmlentities($data, ENT_QUOTES);\r\n return $data;\r\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.64773494", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "b18ddb371848899886372f99a4896e21", "score": "0.64773494", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "d229d566b90c88c009aff7b863eb91aa", "score": "0.6472956", "text": "function test_input($data) { \r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "7991ca61fefb748b2bb46ebc11a24869", "score": "0.6466651", "text": "function clean($str){\r\n\t\r\n\t$str=@trim($str);\r\n\tif(get_magic_quotes_gpc()){\r\n\t\t\r\n\t\t$str= stripslashes($str);\r\n\t\t\r\n\t}\r\n\treturn mysql_real_escape_string($str);\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "58679c8d18e235dcee5664e5d86ad70f", "score": "0.6463388", "text": "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n \r\n}", "title": "" }, { "docid": "12aa4bdd9f1a8b4b615aecf8985d9a39", "score": "0.6431667", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "12aa4bdd9f1a8b4b615aecf8985d9a39", "score": "0.6431667", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "12aa4bdd9f1a8b4b615aecf8985d9a39", "score": "0.6431667", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "12aa4bdd9f1a8b4b615aecf8985d9a39", "score": "0.6431667", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "23a4080f1d729423a1287386effd6dd0", "score": "0.64284605", "text": "function test_input($data) {\n$data = trim($data);\n$data = stripslashes($data);\n$data = htmlspecialchars($data);\nreturn $data;\n}", "title": "" }, { "docid": "22f2e3fff753c54cc31e63682a3bb5ca", "score": "0.642164", "text": "function sanitize_data($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "4469b109e2144bae873d31009e274475", "score": "0.6420647", "text": "function test_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "4e53bc7b4f7e048b02a9916b93e260be", "score": "0.6417955", "text": "function test_input($data) {\r\n$data = trim($data);\r\n$data = stripslashes($data);\r\n$data = htmlspecialchars($data);\r\nreturn $data;\r\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b35a490d76fc80aeb0ebf69c9bf2552a", "score": "0.64131755", "text": "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "f8d2839a1867a46f7a257b98be6f6876", "score": "0.6409971", "text": "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "7e489056a9fa9c6f991f157901375f36", "score": "0.64088875", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" } ]
06831fbf7bc42e190fd37896bbe52cc0
Returns the id of the selected course type
[ { "docid": "846dbf68dd7b58fe35e654d48fd870ce", "score": "0.8442613", "text": "public function get_selected_course_type_id()\n {\n $selected_course_type = $this->get_selected_course_type();\n\n if ($selected_course_type)\n {\n return $selected_course_type->get_id();\n }\n\n return 0;\n }", "title": "" } ]
[ { "docid": "8d0b67e2e11c49d6364368d2430b33cc", "score": "0.8149015", "text": "public function get_course_type_id()\n {\n return $this->get_default_property(self::PROPERTY_COURSE_TYPE_ID);\n }", "title": "" }, { "docid": "b500363359b45f7b3c6ebfd36bc60190", "score": "0.80838925", "text": "public function getCourseTypeId()\n {\n return $this->courseTypeId;\n }", "title": "" }, { "docid": "5a23c8ab8a6b4c570724517ae9f5ec1f", "score": "0.74437886", "text": "public function get_selected_course_type()\n {\n if (!isset($this->selected_course_type))\n {\n $selected_course_type_id = $this->get_selected_course_type_parameter_value();\n $course_types = $this->retrieve_course_types();\n\n $course_type = null;\n\n if (is_null($selected_course_type_id))\n {\n do\n {\n $course_type = $course_types->next_result();\n }\n while (!is_null($course_type) && !$this->get_parent()->show_empty_courses() &&\n $this->count_courses_for_course_type($course_type[CourseType::PROPERTY_ID]) == 0);\n\n $course_types->reset();\n\n $selected_course_type_id = $course_type[CourseType::PROPERTY_ID];\n }\n\n if ($selected_course_type_id > 0)\n {\n $course_type = \\Chamilo\\Application\\Weblcms\\CourseType\\Storage\\DataManager::retrieve_by_id(\n CourseType::class_name(),\n $selected_course_type_id\n );\n\n if (!$course_type || !$course_type->is_active())\n {\n throw new \\Exception(Translation::get('NoValidCourseTypeSelected'));\n }\n }\n\n // Register the selected parameter id in the session for later retrieval\n $selected_course_type_id = (is_null($course_type)) ? $selected_course_type_id : $course_type->get_id();\n Session::register(self::PARAM_SELECTED_COURSE_TYPE, $selected_course_type_id);\n\n $this->selected_course_type = $course_type;\n }\n\n return $this->selected_course_type;\n }", "title": "" }, { "docid": "013adb3534b43588469c2e0dd41c6678", "score": "0.6936966", "text": "protected function get_selected_course_type_parameter_value()\n {\n $selected_course_type = Request::get(self::PARAM_SELECTED_COURSE_TYPE);\n\n if (!isset($selected_course_type))\n {\n $selected_course_type = Session::retrieve(self::PARAM_SELECTED_COURSE_TYPE);\n }\n\n return $selected_course_type;\n }", "title": "" }, { "docid": "0fd64e07a874a0d6382c904266c7a443", "score": "0.68858945", "text": "public function get_type()\n {\n return self::$_id;\n }", "title": "" }, { "docid": "5f4c6abb062addf131a9371e012ba370", "score": "0.68411803", "text": "public function get_course_type()\n {\n return $this->get_foreign_property(self::FOREIGN_PROPERTY_COURSE_TYPE, CourseType::class_name());\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.68096167", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.68096167", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.68096167", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "bba0c2690548cbf0d4eda582ccde0066", "score": "0.6751077", "text": "public function getTypeID(){\n return $this->getParameter('type_id');\n }", "title": "" }, { "docid": "6014f542a50527edc4323b631d79b391", "score": "0.67468905", "text": "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "title": "" }, { "docid": "e311edc14fa76919ff9fe199d246f071", "score": "0.6688505", "text": "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "title": "" }, { "docid": "02a841b33dcdef94e3b8bfd4c9030eff", "score": "0.66306037", "text": "public static function get_type_id($type) { \n\n\t\tswitch ($type) { \n\t\t\tcase 'album': \n\t\t\t\treturn '1'; \n\t\t\tbreak; \n\t\t\tcase 'artist': \n\t\t\t\treturn '2'; \n\t\t\tbreak; \n\t\t\tcase 'tag': \n\t\t\t\treturn '3'; \n\t\t\tbreak; \n\t\t\tdefault: \n\t\t\t\treturn '4'; \n\t\t\tbreak; \n\t\t} \n\n\t}", "title": "" }, { "docid": "0c24c64666c8367ac3c63f52cbcef244", "score": "0.6575745", "text": "public function getTypeId()\n {\n return $this->typeId;\n }", "title": "" }, { "docid": "4ca5f31d224cf91b46e7a8b5c5a9fe22", "score": "0.6554907", "text": "public function getType_id()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "d2c19dfb6b4ce61f4a10e41ef87fe338", "score": "0.65157044", "text": "public function getCourseId()\n {\n $courseId = 0;\n if ($this->getCourse()) {\n $courseId = $this->getCourse()->getId();\n }\n return (int)$courseId;\n\n }", "title": "" }, { "docid": "474c8e41c02088c355c265558ca1f776", "score": "0.6505983", "text": "public function getTypeId()\n {\n return $this->_typeId;\n }", "title": "" }, { "docid": "4b42bacfc749ebe2c1503e35a456023f", "score": "0.6457114", "text": "public function getTypeId() {\n return $this->_typeId;\n }", "title": "" }, { "docid": "5e985b031e6f259fddbc7c53ab65d8e3", "score": "0.6439408", "text": "public function type_id() : int {\n\t\treturn $this->type_id;\n\t}", "title": "" }, { "docid": "0205cd98a5b9f39aa57a606ba2603c00", "score": "0.6412142", "text": "public function getTypeID() {\n\t\treturn $this->_type_id;\n\t}", "title": "" }, { "docid": "385c7eace78dccca5f9087c90c58f6db", "score": "0.6391476", "text": "public static function typeOfCourseToString($type) {\n switch ($type) {\n case \"1\":\n return \"Cours\";\n break;\n case \"2\":\n return \"TD\";\n break;\n case \"3\":\n return \"TP\";\n break;\n default:\n return \"\";\n }\n }", "title": "" }, { "docid": "f90039748bca62f0a0202a42e4308180", "score": "0.6375082", "text": "public function TypeID() {\n\treturn $this->Value('ID_Type');\n }", "title": "" }, { "docid": "9f4db3df232ce286eb43fbad0cffd344", "score": "0.63678706", "text": "public function getTypeId()\n {\n return isset($this->typeId) ? $this->typeId : null;\n }", "title": "" }, { "docid": "4bc4e63fb7b3dfcfcbca7872393fa227", "score": "0.6218394", "text": "public function get_course_id() {\n\t\treturn $this->get_data( 'ref_id' );\n\t}", "title": "" }, { "docid": "e58f93aaf1a681c33bdf8d9561d369a9", "score": "0.6212452", "text": "public function typeId()\n {\n return config('entities.ids.' . $this->type);\n }", "title": "" }, { "docid": "01679f036804e7c0eebf80f1109f0daa", "score": "0.6207449", "text": "public static function get_type_id( $type ) {\n\n\t\tif ( isset( self::$types[ $type ] ) ) {\n\t\t\treturn self::$types[ $type ];\n\t\t}\n\t}", "title": "" }, { "docid": "725a8614f747b6b1c1f97cb3d9ebfc20", "score": "0.62017703", "text": "public function courseType(){\n return $this->belongsTo('ProIMAN\\CourseType','course_type_id');\n }", "title": "" }, { "docid": "bc6e2cc4039d83a585757e221e2ecaad", "score": "0.61933506", "text": "function getLTICourseID() {\n \n if ( isset( $_SESSION['lti'] ) ) {\n \n $lti = unserialize( $_SESSION['lti'] );\n \n switch( getLTILMS() ) {\n \n case 'canvas':\n \n return $lti['custom_canvas_course_id'];\n break;\n \n default:\n \n return null;\n \n }\n \n }\n \n return null;\n \n }", "title": "" }, { "docid": "f13ef266f5ba7ffde6b4a0b7c13897ee", "score": "0.61824477", "text": "public function get_course_id()\n {\n return $this->get_default_property(self::PROPERTY_COURSE_ID);\n }", "title": "" }, { "docid": "9d65b7170e8ba94ea90649f140dc1545", "score": "0.6072723", "text": "private function get_course_id($param = '')\r\n\t{\r\n\t\treturn $this->db->get_where('course', array('course_code' => $param))->row('course_id');\r\n\t}", "title": "" }, { "docid": "05d023f67eef3c5a8a22672ced5c7216", "score": "0.6070242", "text": "public function getTypeId()\n\t{\n\t\tif( isset( $this->values['product.typeid'] ) ) {\n\t\t\treturn (string) $this->values['product.typeid'];\n\t\t}\n\t}", "title": "" }, { "docid": "eb61542067f278048c4860e3f38fa9db", "score": "0.6049213", "text": "public static function ecomm_get_id($type, $id)\n {\n // Define prefixes\n $prefixes = apply_filters('woochimp_ecommerce_id_prefixes', array(\n 'user' => 'user_',\n 'guest' => 'guest_',\n 'order' => 'order_',\n 'product' => 'product_',\n 'item' => 'item_',\n ));\n\n // Combine and make sure it's a string\n if (isset($prefixes[$type])) {\n return (string) $prefixes[$type] . $id;\n }\n\n return (string) $id;\n }", "title": "" }, { "docid": "d928711417f3ced5914e7c1a84b05d1c", "score": "0.60279155", "text": "public function get_type_id()\n {\n return $this->get_default_property(self::PROPERTY_TYPE_ID);\n }", "title": "" }, { "docid": "981303022c0ac4fb2c2abca71057e3a9", "score": "0.59914196", "text": "public function getItemType($type) {\n \n $this->db['select']->column = \"*\";\n\t\t\n\t\t$this->db['select']->tableName = \"CAP_ACCOUNTING_TRANSACTION_ITEM_TYPE\";\n\t\t\n\t\t$this->db['select']->whereClause = [[\"CAP_ACC_TRA_ITE_TYP_NAME\",\"=\",strtoupper($type)]];\n\t\t\n\t\t$this->db['select']->execute();\n\t\t\n\t\treturn $this->db['select']->arrayResult[0]['CAP_ACC_TRA_ITE_TYP_ID'];\n \n }", "title": "" }, { "docid": "adba6873089235b1dbe7b4bd5fd71b17", "score": "0.5983737", "text": "public function getShortCourseId(){\n return 2;\n }", "title": "" }, { "docid": "ce7619b093371050a090bb1d12cd934a", "score": "0.5977887", "text": "protected function _classifieds_lang_id($id='', $type='') {\n global $Class_CRED_WPML_Integration;\n if (is_object($Class_CRED_WPML_Integration)) {\n return $Class_CRED_WPML_Integration->wpml_lang_id($id, $type);\n } else {\n return $id;\n }\n }", "title": "" }, { "docid": "77d9a5e8a0a8640967338ea5d60ca912", "score": "0.5960305", "text": "function theme_moove_get_course_category($id){\n\n global $DB;\n\n $sql_query = \"SELECT category\n FROM {course}\n WHERE id = $id\";\n\n $categoryid = $DB->get_record_sql($sql_query)->category;\n\n return $categoryid;\n }", "title": "" }, { "docid": "4d61fac8cc762501ec10ea7f996d8eb8", "score": "0.594254", "text": "public function get_id() {\n return str_replace('forumngtype_', '', get_class($this));\n }", "title": "" }, { "docid": "34ad8dd29353986c28e35567878d8109", "score": "0.5929842", "text": "public function getTypeId()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "772ce6bfc5b8edaadb2a4187deab0b12", "score": "0.5919672", "text": "public static function getMessageTypeId($type)\n {\n\n $lkp_message_type_id = 0; // 0 => General\n\n if (!isset($type) && ($type == \"\")) {\n $lkp_message_type_id = 0;\n } else {\n $result = DB::table('lkp_message_types')\n ->where('message_type', $type)\n ->first();\n if (count($result) >= 1) {\n $lkp_message_type_id = $result->id;\n }\n }\n return $lkp_message_type_id;\n }", "title": "" }, { "docid": "a7a8cd9d7acae4a8967b04a496aaf510", "score": "0.5871061", "text": "protected function get_course_type_url($course_type_id)\n {\n $parameters = array();\n $parameters[self::PARAM_SELECTED_COURSE_TYPE] = $course_type_id;\n\n return $this->get_parent()->get_url($parameters);\n }", "title": "" }, { "docid": "df2d3d37528f5b38492770b8c525116f", "score": "0.58710575", "text": "public function show(CourseType $courseType)\n {\n //\n }", "title": "" }, { "docid": "3d76cbfbff9a975b9eb54f715d96d2e4", "score": "0.58234817", "text": "public function getIdTypeClient()\n {\n return $this->idTypeClient;\n }", "title": "" }, { "docid": "849cb5d761886e8b5efd4d3e79b230e5", "score": "0.5815671", "text": "public function setIdType(string $idType): static;", "title": "" }, { "docid": "bf0e9bb3751f832ae2d5dcd3e7fa642a", "score": "0.58110464", "text": "abstract protected function get_typeid();", "title": "" }, { "docid": "c65893edec0a8ae8790ffe5b6dfa029a", "score": "0.57918465", "text": "public function fetchId($type = 'Confirm', $name = '', $text = '', $task = '', $list = true, $hideMenu = false)\n\t{\n\t\treturn $this->_parent->getName() . '-' . $name;\n\t}", "title": "" }, { "docid": "6ff0f661ebb3625e398999aaec48f0a8", "score": "0.5757145", "text": "private function getCourseType(string $maconomyId)\n {\n preg_match('/^[0-9]+/', $maconomyId, $matches);\n\n $courseType = CourseType::where('number', $matches[0])\n ->first();\n\n return $courseType;\n }", "title": "" }, { "docid": "2706631a288139826885dd8f8ca409fb", "score": "0.5735882", "text": "public function getCourseCode()\n {\n return $this->courseCode;\n }", "title": "" }, { "docid": "ac3acf4e4d36f3294141c62a9ac3804f", "score": "0.57250917", "text": "public function getCollectionAllocationId($key, $type) {\n if ($type == 'single') {\n return $this->collectionAllocationId;\n } else {\n if ($type == 'array') {\n return $this->collectionAllocationId [$key];\n } else {\n echo json_encode(\n array(\n \"success\" => false,\n \"message\" => \"Cannot Identify Type String Or Array:getCollectionAllocationId ?\"\n )\n );\n exit();\n }\n }\n }", "title": "" }, { "docid": "efaf0e60f308ffe26da725b2a06341b1", "score": "0.5692775", "text": "function single_course_id($data)\n {\n $this->db->select('*');\n $this->db->from('tbl_course');\n $this->db->where('course_id', $data);\n $query = $this->db->get();\n return $query->result() ;\n }", "title": "" }, { "docid": "ac236fb7cd77eda0a6b9f7dec796b464", "score": "0.5682638", "text": "public function edit($id_type)\n {\n //\n }", "title": "" }, { "docid": "b26c700294f62287f1879cd6277044a5", "score": "0.563629", "text": "public function getContentTypeId() : int\n {\n $rtn = $this->data['content_type_id'];\n\n return $rtn;\n }", "title": "" }, { "docid": "2601560e89e8e391153865ccdc6b1423", "score": "0.56171846", "text": "public function getCustomTypeId();", "title": "" }, { "docid": "2108c7fabae2eee315ad642ba8071e78", "score": "0.56003207", "text": "public function get_course()\n {\n return $this->get_selected_course();\n }", "title": "" }, { "docid": "0aba8ccb1a71e06bbdcc7d20a0874e14", "score": "0.55537206", "text": "public function getSubscriptionTypeId() : int;", "title": "" }, { "docid": "265bca33bc8ce4efd9cd118398db499c", "score": "0.55535966", "text": "public function set_course_type_id($course_type_id)\n {\n $this->set_default_property(self::PROPERTY_COURSE_TYPE_ID, $course_type_id);\n }", "title": "" }, { "docid": "1256172a4f3e333cc29d42f1c8e12ea6", "score": "0.5551775", "text": "public function getModuleAccessId($key, $type) {\r\n if ($type == 'single') {\r\n return $this->moduleAccessId;\r\n } else if ($type == 'array') {\r\n return $this->moduleAccessId [$key];\r\n } else {\r\n echo json_encode(array(\"success\" => false, \"message\" => \"Cannot Identifiy Type String Or Array:getModuleAccessId ?\"));\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "02f4d903ea9142de1198732f970bcb52", "score": "0.5550786", "text": "public function getEntityTypeId();", "title": "" }, { "docid": "b611682bc351ea44da86542ee75781d7", "score": "0.5540898", "text": "public function get_robots_post_type_option_id( $type ) {\n\t\treturn $this->s_field_id( \"{$type}_post_types\" );\n\t}", "title": "" }, { "docid": "31cce28ae71e2fe3ba0f87f83cb8caa2", "score": "0.55370224", "text": "public function getItemId()\n\t{\n\t\treturn $this->getTypeId();\n\t}", "title": "" }, { "docid": "64541f17857da7195ce6cee0b525fbad", "score": "0.5523139", "text": "abstract protected function getContentTypeId();", "title": "" }, { "docid": "d77985f27cc61f7f402d0654c1981813", "score": "0.55193776", "text": "function get_by_type( $type_id )\n {\n $this->db->where('type_id', $type_id);\n $this->db->limit(1);\n return $this->db->get('card_types')->row();\n }", "title": "" }, { "docid": "3752715867254d8060750aa41dfc2819", "score": "0.55190426", "text": "public function getLoanTypeId()\n\t\t{\n\t\t\treturn $this->getModel()->loan_type_id;\n\t\t}", "title": "" }, { "docid": "2b395e54cbaf23b843081049641631e3", "score": "0.54775625", "text": "protected function _getDealCategoryId($category, $type) {\n\t\t// GENERAL\n\t\tif ( !$category || preg_match( '/general/i', $category ) ) {\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'monthly':\n\t\t\t\t\treturn $this->_config['general_monthly_deal_category_id'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'annual':\n\t\t\t\t\treturn $this->_config['general_annual_deal_category_id'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->_config['general_onetime_deal_category_id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// BUSINESS PARTNER\n\t\tif ( preg_match( '/business/i', $category ) )\n\t\t\treturn $this->_config['business_monthly_deal_category_id'];\n\t \n\t\t// RESCUE\n\t\tif ( preg_match( '/rescue/i', $category ) )\n\t\t\treturn $this->_config['rescue_onetime_deal_category_id'];\n\t\t\t\n\t\t// RESTORE\n\t\tswitch ($type) {\n\t\t case 'monthly':\n\t\t \treturn $this->_config['restore_monthly_deal_category_id'];\n\t\t \tbreak;\n\t\t case 'annual':\n\t\t \treturn $this->_config['restore_annual_deal_category_id'];\n\t\t \tbreak;\n\t\t default:\n\t\t \treturn $this->_config['restore_onetime_deal_category_id'];\n\t\t}\n\t}", "title": "" }, { "docid": "ba8ecb0af39bddafbfc048e91ced16d6", "score": "0.5467936", "text": "public function getCourtId()\n\t{\t\treturn $this->courtId;\n\t}", "title": "" }, { "docid": "8bbbbb0840e23dc7c51805e10dc9c560", "score": "0.5459956", "text": "public function choose_type($genre_id, $type_id) {\n\t\t$this->loadModel('GenreActivity');\n\t\t\n\t\tif($this->RequestHandler->isAjax() && $this->GenreActivity->hasType($genre_id, $type_id)) {\n\t\t\t$this->layout = 'modal';\n\t\t\t$sections = array('choose');\n\t\t\t$params['current'] = $sections[0];\n\t\t\t$params['previous'] = false;\n\n\t\t\t// Set section properties\n\t\t\tif($params['current'] == $sections[0]) {\n\t\t\t\t$params['title'] = __('add-title', __('Activity'));\n\t\t\t\t$params['message'] = __('choose-message', __('activity'));\n\n\t\t\t\t$params['filters'] = array();\n\t\t\t\t$params['filters']['model'] = 'Chooser';\n\t\t\t\t$params['filters']['url'] = array('controller' => 'activities', 'action' => 'choose');\n\t\t\t\t$params['filters']['fields'] = array();\n\n\t\t\t\t$this->request->data['Chooser']['filters'] = array('type_id' => $type_id);\n\t\t\t\t$this->request->data['Chooser']['multiple'] = false;\n\t\t\t}\n\n\t\t\t$this->set(compact('params', 'sections'));\n\t\t}\n\t\telse throw new InvalidRequestException();\n\t}", "title": "" }, { "docid": "7bfaa9f6e6e7ce3e8896fecc83fc5225", "score": "0.5436032", "text": "protected function getOrgGuideType($type)\n {\n if ($type != \"\") {\n return $this->iatiToOrgGuideMapper[strtolower($type)];\n }\n\n return \"\";\n }", "title": "" }, { "docid": "37037569a94257a938d8f7f9c6ca4686", "score": "0.54267263", "text": "function getChoiceCategoryType(){\n\n\t\t$query = $this->db->get('tbl_choice_category_type');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "c3472a22c3eabf237ff2e2734cf4bb15", "score": "0.54114556", "text": "abstract protected function getIdCategory();", "title": "" }, { "docid": "1370a7b4ecbc4cf7556e459c39328a46", "score": "0.5406132", "text": "public function get_courseidnumber() {\n return s($this->course->idnumber);\n }", "title": "" }, { "docid": "62d497fc9cf624d58714b022c8379801", "score": "0.5400942", "text": "public function get_student_details_by_id($type = \"\", $id = \"\") {\n\t\t$enrol_data = array();\n\t\tif ($type == \"section\") {\n\t\t\t$checker = array(\n\t\t\t\t'section_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->result_array();\n\t\t\tforeach ($enrol_data as $key => $enrol) {\n\t\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol['student_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['code'] = $student_details['code'];\n\t\t\t\t$enrol_data[$key]['user_id'] = $student_details['user_id'];\n\t\t\t\t$enrol_data[$key]['parent_id'] = $student_details['parent_id'];\n\t\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['name'] = $user_details['name'];\n\t\t\t\t$enrol_data[$key]['email'] = $user_details['email'];\n\t\t\t\t$enrol_data[$key]['role'] = $user_details['role'];\n\t\t\t\t$enrol_data[$key]['address'] = $user_details['address'];\n\t\t\t\t$enrol_data[$key]['phone'] = $user_details['phone'];\n\t\t\t\t$enrol_data[$key]['birthday'] = $user_details['birthday'];\n\t\t\t\t$enrol_data[$key]['gender'] = $user_details['gender'];\n\t\t\t\t$enrol_data[$key]['blood_group'] = $user_details['blood_group'];\n\n\t\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol['class_id'])->row_array();\n\t\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol['section_id'])->row_array();\n\n\t\t\t\t$enrol_data[$key]['class_name'] = $class_details['name'];\n\t\t\t\t$enrol_data[$key]['section_name'] = $section_details['name'];\n\t\t\t}\n\t\t}\n\t\telseif ($type == \"class\") {\n\t\t\t$checker = array(\n\t\t\t\t'class_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->result_array();\n\t\t\tforeach ($enrol_data as $key => $enrol) {\n\t\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol['student_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['code'] = $student_details['code'];\n\t\t\t\t$enrol_data[$key]['user_id'] = $student_details['user_id'];\n\t\t\t\t$enrol_data[$key]['parent_id'] = $student_details['parent_id'];\n\t\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['name'] = $user_details['name'];\n\t\t\t\t$enrol_data[$key]['email'] = $user_details['email'];\n\t\t\t\t$enrol_data[$key]['role'] = $user_details['role'];\n\t\t\t\t$enrol_data[$key]['address'] = $user_details['address'];\n\t\t\t\t$enrol_data[$key]['phone'] = $user_details['phone'];\n\t\t\t\t$enrol_data[$key]['birthday'] = $user_details['birthday'];\n\t\t\t\t$enrol_data[$key]['gender'] = $user_details['gender'];\n\t\t\t\t$enrol_data[$key]['blood_group'] = $user_details['blood_group'];\n\n\t\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol['class_id'])->row_array();\n\t\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol['section_id'])->row_array();\n\n\t\t\t\t$enrol_data[$key]['class_name'] = $class_details['name'];\n\t\t\t\t$enrol_data[$key]['section_name'] = $section_details['name'];\n\t\t\t}\n\t\t}\n\t\telseif ($type == \"student\") {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol_data['student_id']))->row_array();\n\t\t\t$enrol_data['code'] = $student_details['code'];\n\t\t\t$enrol_data['user_id'] = $student_details['user_id'];\n\t\t\t$enrol_data['parent_id'] = $student_details['parent_id'];\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t$enrol_data['name'] = $user_details['name'];\n\t\t\t$enrol_data['email'] = $user_details['email'];\n\t\t\t$enrol_data['role'] = $user_details['role'];\n\t\t\t$enrol_data['address'] = $user_details['address'];\n\t\t\t$enrol_data['phone'] = $user_details['phone'];\n\t\t\t$enrol_data['birthday'] = $user_details['birthday'];\n\t\t\t$enrol_data['gender'] = $user_details['gender'];\n\t\t\t$enrol_data['blood_group'] = $user_details['blood_group'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$enrol_data['class_name'] = $class_details['name'];\n\t\t\t$enrol_data['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $enrol_data;\n\t}", "title": "" }, { "docid": "9901139831c28bebcbc03d9142b6c9b9", "score": "0.5400931", "text": "function getTypeIdByCode($code) {\n $id = 0;\n $conn = \\DB\\getConnection();\n\n // Run the query and get the user details\n $query = sprintf(\"SELECT id\n FROM PaymentTypes\n WHERE code = '%s'\",\n $conn->escape_string($code));\n\n $result = $conn->query($query);\n\n if ($result->num_rows) {\n $row = mysqli_fetch_assoc($result);\n $id = $row['id'];\n }\n\n return $id;\n}", "title": "" }, { "docid": "8b92a8b38026bd542539ee170e525e6b", "score": "0.5399997", "text": "public function fetch_cc_email_id($CM_COMPLAINT_TYPE){\n\t\t$this->db->distinct('DEP_EMAIL');\n\t\t$this->db->select('DEP_EMAIL');\n\t\t$this->db->join('MJ_USER_COMP_TYPE_AUTH M','M.MJ_UCTA_DEPID=A.DEP_ID');\n\t\t$this->db->where('M.MJ_CC_NO',$CM_COMPLAINT_TYPE);\n\t\t$query = $this->db->get('ALL_DEP_MST A');\n \t\t$row = $query->row();\n\t\tif (isset($row))\n\t\t return $row->DEP_EMAIL;\n\t}", "title": "" }, { "docid": "bcbf5ce0645a522ac54f4c11721bf445", "score": "0.5398762", "text": "Public function get_ididtypeexp()\n\t\t{\n\t\t\tReturn $this ->idtypeexp;\n\t\t}", "title": "" }, { "docid": "9f6e9889b56ccbae8c46cf2c3d96b881", "score": "0.5398264", "text": "public function getCommissionByCourseTypeId( $courseTypeId);", "title": "" }, { "docid": "a941c8348a073ebb72e79bf83b16bd37", "score": "0.5388705", "text": "private function getTypeID($typeName)\n {\n $getTypeIDQuery = 'SELECT questionTypeID FROM question_types WHERE typeName = ?';\n $getTypeID = mysqli_stmt_init($this->link);\n mysqli_stmt_prepare($getTypeID, $getTypeIDQuery);\n mysqli_stmt_bind_param($getTypeID, 's', $typeName);\n mysqli_stmt_execute($getTypeID); //Executes the statement\n $result = mysqli_stmt_get_result($getTypeID)->fetch_row(); //Retrieves the first rows results\n return $result[0]; //Returns result value\n }", "title": "" }, { "docid": "95838f136209bc06a4272f8b7ea99f04", "score": "0.5388504", "text": "function get_type_name_by_id_custom($type,$type_id='',$field='name')\n\t{\t$type1='comp_type'; //table field name\n\t\treturn\t$this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field;\t\n\t}", "title": "" }, { "docid": "2648e41b51e5c41cf036d722aa3363e5", "score": "0.5379087", "text": "function _check_cat_id($id, $type)\n {\n // $type = str_replace(array('cat_', '_id'), '', $type);\n $id = model('cat')->get_id(array('id' => $id, 'type' => $type));// check id theo loai\n //echo $this->db->last_query();\n if (!$id) return false;\n return true;\n }", "title": "" }, { "docid": "f616a8ae171902075be21951e68d6fd6", "score": "0.5352947", "text": "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "4b89f1726bdf1404cd328754da946f1b", "score": "0.53520167", "text": "public function getTipoId()\n {\n return $this->tipoId;\n }", "title": "" }, { "docid": "3972d44485924540663255086a00eebe", "score": "0.5351764", "text": "public static function findType ($courriel,$type) {\n self::initialiserDB();\n self::$database->query(\"SELECT * from Publication WHERE courrielAmi='$courriel' AND idCategorie='$type' ORDER BY id DESC\");\n return self::$database->liste(\"Publication\");\n }", "title": "" }, { "docid": "d23afb4418cd04fbe558a0cf8c6832ab", "score": "0.5338817", "text": "protected function getUserRoleId($type=\"student\", $filter=true)\n {\n $return = '';\n $roleArray = $this->RoleDetails->where([\"role\"=>$type])->read();\n if($filter===true) {\n if(!empty($roleArray[0]['_id'])) {\n $return = $roleArray[0]['_id'];\n }\n }\n return $return;\n }", "title": "" }, { "docid": "c3fb5502a9f5dce536eef1cada9d1c82", "score": "0.533333", "text": "public function getTypeCom()\n {\n return $this->type_com;\n }", "title": "" }, { "docid": "f9e570180787a5aeff54e26601a54359", "score": "0.5332183", "text": "public function selectItemTypeSelectd()\n {\n \n $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n if (!empty($itemTypeIds)) {\n\n $getItemTypeIdData = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getItemTypeIdData)) {\n\n foreach ($getItemTypeIdData as $itemType) {\n\n $itemTpyeListHtml = '<option value=\"'.$itemType->id.'\"';\n \n if ($itemTypeIds == $itemType->id) { \n\n $itemTpyeListHtml .= ' selected=\"selected\"';\n\n }\n\n $itemTpyeListHtml .= '>'.$itemType->name.'</option>';\n\n echo $itemTpyeListHtml; \n\n }\n\n }\n }\n }", "title": "" }, { "docid": "857c86c7a3445f160a0b7c4ec633bd77", "score": "0.5331881", "text": "public function getCourseByCodeObject($id) {\n $mount = \\DB::table('subjectallocations')->where('id',$id)->first();\n \n $course = \\DB::table('courses')->where('code',$id)->first();\n \n return @$course;\n }", "title": "" }, { "docid": "62a4878cb69000d2ae45cbe1a4d472ee", "score": "0.53317964", "text": "public function getIdentifierTypeAttribute()\n {\n return $this->identifier ? $this->identifier->type_id : '';\n }", "title": "" }, { "docid": "a24b576609797e9c430543c9f8fc7e1f", "score": "0.5330876", "text": "public function entityTypeId();", "title": "" }, { "docid": "feb79c595bc08594cd770b4d8a8db863", "score": "0.5315477", "text": "public function get_reg_id($character, $id_type) {\n\n $fields = array(\"*\");\n $whereArr = array(\"id_type\" => $id_type);\n $id_number = $this->db_model->getData($fields, 'id_numbers_m_tbl', $whereArr);\n\n $int = intval(preg_replace('/[^0-9]+/', '', $id_number[0]->id_number), 10);\n $id = \"$character\" . ($int + 1);\n return $id;\n\n}", "title": "" }, { "docid": "9f75251cf580e39eb126638a5e1dffe8", "score": "0.53087175", "text": "function createTxType( $type=null ){\n global $mysqli;\n $type = $mysqli->real_escape_string($type);\n $results = $mysqli->query(\"SELECT id FROM index_tx_types WHERE type='{$type}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n $row = $results->fetch_assoc();\n return $row['id'];\n } else {\n $results = $mysqli->query(\"INSERT INTO index_tx_types (type) values ('{$type}')\");\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create record in index_tx_types table');\n }\n }\n } else {\n byeLog('Error while trying to lookup record in index_tx_types table');\n }\n}", "title": "" }, { "docid": "30558dc6d010f87ba292b8888f5e5e27", "score": "0.53008807", "text": "function getTypeId($name) {\n \t$sql = \"SELECT id FROM \".$this->tbl_images_type.\" WHERE name=\".$name;\n $id = $this->db->getOne($sql);\n return $id;\n }", "title": "" }, { "docid": "b501f4d75471b99e833268dfcab3f5ee", "score": "0.5297136", "text": "final public function getType(): int {}", "title": "" }, { "docid": "29c3e6fb6e27698d1d977937485037de", "score": "0.5295332", "text": "public function getQuestionnaireTypeId()\n {\n return $this->questionnaire_type_id;\n }", "title": "" }, { "docid": "5ea93e9c3d44fd842c9b5563762b26ca", "score": "0.5290533", "text": "public function curriculum_course_id($id)\n {\n $usertype = JWTAuth::getPayload()->get('usertype');\n\n if ($usertype != \"staff\") {\n $response = [\n 'status' => 'Error',\n 'result' => 'Permission error'\n ];\n return response()->json($response, 404);\n }\n\n $collection = Curriculum_Course::find($id);\n\n $response = [\n 'status' => 'Success',\n 'result' => $collection\n ];\n\n return response()->json($response, 201);\n }", "title": "" }, { "docid": "b0b9681cdadcd7737deccf2febaf73b4", "score": "0.52856266", "text": "public function get_robots_taxonomy_option_id( $type ) {\n\t\treturn $this->s_field_id( \"{$type}_taxonomies\" );\n\t}", "title": "" }, { "docid": "e4f4d5b8584289b27d1c58823861dadc", "score": "0.5280289", "text": "function get_type()\n { return $this->type;\n }", "title": "" }, { "docid": "24fd901c7cb3fbb9136f4da31d2a0ba2", "score": "0.52802104", "text": "public function getType(){\n return ucfirst(array_search($this->type, self::userTypes()));\n }", "title": "" }, { "docid": "e150245d038f246e57b162a289331616", "score": "0.52770007", "text": "protected function retrieve_course_types()\n {\n return \\Chamilo\\Application\\Weblcms\\CourseType\\Storage\\DataManager::retrieve_active_course_types_with_user_order(\n $this->get_parent()->get_user_id()\n );\n }", "title": "" }, { "docid": "d8067f675a5aa4102f4c72524b26ff8b", "score": "0.52689034", "text": "function get_course($id = ''){\n\t\t\tprint_r($this->input->post());\n\t\t}", "title": "" }, { "docid": "8afcfd881989520d79080db6193d91a1", "score": "0.52688926", "text": "public function getAccidentType()\n {\n return $this->accidentType;\n }", "title": "" }, { "docid": "455e353b5d1931e6482ee0de91a872ad", "score": "0.52579445", "text": "abstract protected function getType(): int;", "title": "" } ]
178785b1d5e9a64b8321c9c3fa52d21a
Sets the player's influence score.
[ { "docid": "64577c2e77bce4a59a17a38019138838", "score": "0.6000558", "text": "public function setInfluenceScore($influenceScore){\n\t\t$this->influenceScore = $influenceScore;\n\t}", "title": "" } ]
[ { "docid": "6b18ed6d34680bbae4eb16a83d0a3892", "score": "0.7303552", "text": "public function setScore()\n {\n $this->score+=1 ;\n }", "title": "" }, { "docid": "42ad2a9bbbc0de8f9a4dd79291a5dfe9", "score": "0.66610676", "text": "public function setScore($score);", "title": "" }, { "docid": "3d77075df727a08a88cfefda7972ad12", "score": "0.6607134", "text": "public function setScore($score){\n $this->score = $score;\n }", "title": "" }, { "docid": "15a49ce071408a6067f34c7b2c00302f", "score": "0.65997416", "text": "public function setScore($score)\n {\n $this->score = $score;\n }", "title": "" }, { "docid": "53e26976d3829059e3271c7476064cf7", "score": "0.65652937", "text": "public function testSetScore()\n {\n $exp = $this->game->setScoreExtraSumma(63);\n $this->assertEquals(63, $exp);\n\n $res = $this->game->setBonus();\n $bonus = 50;\n $this->assertEquals($bonus, $res);\n }", "title": "" }, { "docid": "a2ac022ad335773f2dc7babc3c54e058", "score": "0.6287707", "text": "function dbSetAuxScore($player_id, $score) {\n $this->DbQuery(\"UPDATE player SET player_score_aux=$score WHERE player_id='$player_id'\");\n }", "title": "" }, { "docid": "36d9c8d741c3bd41a7176670bc2d0e70", "score": "0.62389344", "text": "public function incrementScore()\n {\n $this->score++;\n }", "title": "" }, { "docid": "6fee900e811cf113bcba809510659cc2", "score": "0.61024374", "text": "function updateScore($player,$points) {\n $score = $player->getScore();\n $player->setScore($score +$points);\n}", "title": "" }, { "docid": "76713dc1d7863212fb71dfd044999ea7", "score": "0.59341353", "text": "public function setScore($Score)\n {\n $this->Score = $this->db->real_escape_string($Score);\n }", "title": "" }, { "docid": "c33b89391fe9b67ebe5137dc9a83a354", "score": "0.59054685", "text": "public function saveScore(int $score = 0)\n {\n $this->score += $score;\n }", "title": "" }, { "docid": "e36951c2592324f8b35a273956cf2300", "score": "0.58792466", "text": "public function set_scores($match_winner_score = null, $match_loser_score = null) {\n if(!is_null($match_winner_score)) $this->set_new_data('score', $match_winner_score);\n if(!is_null($match_loser_score)) $this->set_new_data('o_score', $match_loser_score);\n }", "title": "" }, { "docid": "2a3bb12e1f7fba5a38b9a58a3341f4a3", "score": "0.58455443", "text": "public function setScore($val)\n {\n $this->_propDict[\"score\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "4cf8d62f5058939d53527d62296d1839", "score": "0.5769034", "text": "public function setRiskScore($val)\n {\n $this->_propDict[\"riskScore\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "5cae20981b7ffe85aaab0057c42031a8", "score": "0.5694238", "text": "public function updateDevelopBonus($score) {\n $sunMember = SunMember::with(array('parent', 'parent.member'))\n ->where('member_id', $this->id)\n ->remember(60)\n ->first();\n if ($sunMember->parent != null) {\n //Kiem tra cap bac cua cha\n if (!empty($sunMember->parent->member->regency)) {\n $tyle = MyBonus::$DEVELOP_AMOUNT[$sunMember->parent->member->regency];\n $amount = (int) $score * $tyle / 100;\n Event::fire('member.update.bonus', array($sunMember->parent->id, MyBonus::HH_PHAT_TRIEN, $amount));\n// DB::table('member_bonus')\n// ->where('member_id', $sunMember->parent->id)\n// ->where('bonus_id', MyBonus::HH_PHAT_TRIEN)\n// ->increment('auto_amount', $amount);\n }\n }\n }", "title": "" }, { "docid": "6cf90fe1f175e1d711e06e02b1af88c7", "score": "0.56349784", "text": "public function setDamage(int $value)\n {\n }", "title": "" }, { "docid": "9e15c8564a1b3c311e62ac4100c0f474", "score": "0.56201875", "text": "public function setPlayerScoreToZero()\n {\n return $this->roundPlayerScore = 0;\n }", "title": "" }, { "docid": "19cd5afaa09412e73c8c8249799246bb", "score": "0.55663997", "text": "function set_score($score)\n {\n \t\tif($this->debug>0){error_log('New LP - In learnpathItem::set_score('.$score.')',0);}\n \t\tif(($this->max_score<=0 || $score <= $this->max_score) && ($score >= $this->min_score))\n \t\t{\n \t\t\t$this->current_score = $score;\n \t\t\t$master = $this->get_mastery_score();\n \t\t\t$current_status = $this->get_status(false);\n \t\t\t//if mastery_score is set AND the current score reaches the mastery score AND the current status is different from 'completed', then set it to 'passed'\n \t\t\tif($master != -1 && $this->current_score >= $master && $current_status != $this->possible_status[2])\n \t\t\t{\n \t\t\t\t$this->set_status($this->possible_status[3]);\n \t\t\t}\n \t\t\telseif($master != -1 && $this->current_score<$master)\n \t\t\t{\n \t\t\t\t$this->set_status($this->possible_status[4]);\n \t\t\t}\n \t\t\treturn true;\n \t\t}\n \treturn false;\n }", "title": "" }, { "docid": "7f04a6049cfd845ee5f9eedf91c421b0", "score": "0.5541234", "text": "public function setScore(\\SugarBean $activity, $score);", "title": "" }, { "docid": "61ed9f9c0044ade278f9baca6ca553bb", "score": "0.5506186", "text": "public function testSetScoreYatzy()\n {\n $this->game->setScoreExtraYatzy();\n $this->game->setScore();\n $res = $this->game->getScoreExtra();\n $this->assertEquals(50, $res[\"summa\"]);\n }", "title": "" }, { "docid": "0494e8d3bfa21b8e1df32cc3951d8f75", "score": "0.5501951", "text": "public function setScore($var)\n {\n GPBUtil::checkFloat($var);\n $this->score = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0494e8d3bfa21b8e1df32cc3951d8f75", "score": "0.5501951", "text": "public function setScore($var)\n {\n GPBUtil::checkFloat($var);\n $this->score = $var;\n\n return $this;\n }", "title": "" }, { "docid": "60864fa44aa8455d37267a02c818d855", "score": "0.54645824", "text": "public function setWinner($winner)\n\t{\n\t\t$this->winner = $winner;\n\t}", "title": "" }, { "docid": "85384d074794a15c3343ec7bfc6f096d", "score": "0.5407406", "text": "public function decrementScore()\n {\n $this->score--;\n }", "title": "" }, { "docid": "dfe2313840c1464880d5672858bf6527", "score": "0.5395966", "text": "public function setPriorityScore($val)\n {\n $this->_propDict[\"priorityScore\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "fd8cd58daa491bf6e048478f8dec6eb3", "score": "0.5385224", "text": "public function setConfidence(?int $value): void {\n $this->getBackingStore()->set('confidence', $value);\n }", "title": "" }, { "docid": "483721e6b8d37145a5cf403aa407cebb", "score": "0.5373937", "text": "function updateScores(){\n $players = self::getCollectionFromDB(\"SELECT player_id id, money FROM player\");\n foreach ($players as &$player)\n $player['carpet_score'] = 0;\n\n $board = Board::getBoard();\n for($x = 1; $x <= 7; $x++) {\n for($y = 1; $y <= 7; $y++) {\n $carpet = $board[$x][$y];\n if(!is_null($carpet))\n $players[$carpet['pId']]['carpet_score']++;\n }\n }\n\n foreach ($players as $pId => &$player) {\n $score_aux = (int) $player['money'];\n $score = $score_aux + $player['carpet_score'];\n\n // Update scores for current player\n self::DbQuery(\"UPDATE player SET player_score = $score, player_score_aux = $score_aux WHERE player_id = $pId\");\n }\n }", "title": "" }, { "docid": "9d516eeb357bc3d206c8a2631f08b930", "score": "0.53696007", "text": "public function set_personal_score($score)\n {\n foreach ($score as $point)\n {\n $scores[] = $point + $this->offset;\n }\n\n $this->personal_score = $scores;\n }", "title": "" }, { "docid": "226935a53a216b10456cc43723c59cb8", "score": "0.5354406", "text": "public function setSensitivity(?int $value): void {\n $this->getBackingStore()->set('sensitivity', $value);\n }", "title": "" }, { "docid": "7dea0b4acdd25b5df5722336690bc535", "score": "0.5347136", "text": "protected function setupScoreFunctions()\n {\n $this->score(new FieldValueFactor('score', 'log', 1));\n // strsze ogloszenia traca na waznosci, glownie po 14d. z kazdym dniem score bedzie malalo o 1/10\n // za wyjatkiem pierwszych 2h publikacji\n $this->score(new Decay('boost_at', '14d', 0.1, '2h'));\n }", "title": "" }, { "docid": "f35c056629a242ebf493ede9ac884144", "score": "0.532145", "text": "public function updateScore()\n {\n $b = new Carbon('2015-12-8 07:46:43');\n\n $t = $b->diffInSeconds($this->created_at);\n\n $x = $this->votesTotal;\n $y = ($x > 0) ? 1 : (($x === 0) ? 0 : -1);\n\n $z = abs($x) >= 1 ? abs($x) : 1;\n\n $this->update([\n 'score' => log($z, 10) + ($y * $t / 45000)\n ]);\n }", "title": "" }, { "docid": "e988eb2f94622734a5091ab106a74223", "score": "0.5308326", "text": "public function setScore($var)\n {\n GPBUtil::checkInt32($var);\n $this->score = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4c835236135c0958255b39dfc70445db", "score": "0.5294051", "text": "function updateScore() {\n //adding up all the score\n // 3 and 13 are multipliers and should not be in calculation\n // 51-57, 60, 61 was deleted => points merged with 50\n $score = round($this->wfPoint1 + $this->wfPoint2 + $this->wfPoint4 +\n $this->wfPoint5 + $this->wfPoint6 + $this->wfPoint7 + $this->wfPoint8 +\n $this->wfPoint9 + $this->wfPoint10 + $this->wfPoint11 + $this->wfPoint12 +\n $this->wfPoint14 + $this->wfPoint15 + $this->wfPoint16 +\n $this->wfPoint17 + $this->wfPoint18 + $this->wfPoint19 + $this->wfPoint20 +\n $this->wfPoint21 + $this->wfPoint22 + $this->wfPoint23 + $this->wfPoint24 +\n $this->wfPoint25 + $this->wfPoint26 + $this->wfPoint27 + $this->wfPoint28 +\n $this->wfPoint29 + $this->wfPoint30 + $this->wfPoint31 + $this->wfPoint32 +\n $this->wfPoint33 + $this->wfPoint34 + $this->wfPoint35 + $this->wfPoint36 +\n $this->wfPoint37 + $this->wfPoint38 + $this->wfPoint39 + $this->wfPoint40 +\n $this->wfPoint41 + $this->wfPoint42 + $this->wfPoint43 + $this->wfPoint44 +\n $this->wfPoint45 + $this->wfPoint46 + $this->wfPoint47 + $this->wfPoint48 +\n $this->wfPoint49 + $this->wfPoint50 + $this->wfPoint58 + $this->wfPoint59);\n if ($score < 0) {\n $score = 0;\n }\n return $score;\n }", "title": "" }, { "docid": "a971e7e30f3b816894e8ee7a7c7b0539", "score": "0.5292026", "text": "public function scoreMoins($ID)\n {\n $Score = $this->_Score - 1;\n\n $req = \"UPDATE `perso` SET `Score`= $Score WHERE `ID`=$ID\"; \n $reponse = $this->_BDD->query($req);\n }", "title": "" }, { "docid": "3cc30018d81397c6c916081d5572e7d3", "score": "0.52852637", "text": "public function setAvgPerMatch()\n {\n $this->avgPerMatch = bcdiv($this->scored, $this->games);\n }", "title": "" }, { "docid": "5f955dbe1396b02635a192382e992d31", "score": "0.5274855", "text": "public function setExperience($experience){\n $experience = (int) $experience;\n \n // on vérifie ensuite si ce nombre est compris entre 1 et 100\n if ($experience >= 1 && $experience <= 100){\n // si c'est le cas c'est tout bon on assigne la valeur a l'attribut correspondant\n $this->_experience = $experience;\n }\n }", "title": "" }, { "docid": "a58c5c567493c70e655d763aa0de82b3", "score": "0.52707636", "text": "public function setGameWinner()\n\t{\n\t\t$index = $this->gameWinner;\n\t\tif ( isset($this->players[$index]) ) {\n\t\t\t$this->players[$index]->addScore(50);\n\t\t\t$this->players[$index]->increaseRoundsWon();\n\t\t\t$this->players[$index]->increaseGamesWon();\n\t\t\t$this->games++;\t\t\t\n\t\t\t$this->_setDetails('gamewin');\n\t\t} else {\n\t\t\t$error = array(\n\t\t\t\t'function'\t=>\t'_setGameWinner',\n\t\t\t\t'params'\t=>\tarray(\n\t\t\t\t\t'index'\t=>\t$index\n\t\t\t\t),\n\t\t\t\t'message'\t=>\t'Array index out of bounds'\n\t\t\t);\n\t\t\t\n\t\t\t$this->_addError($error);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "edd191c3e424865958564511909f3d7e", "score": "0.5243305", "text": "public function setsWinPercentageWithOtherPlayer($otherPlayer) {\n $sets = $this->setsWithOtherPlayer($otherPlayer);\n\n if ($sets !== 0) {\n return round($this->setsWonWithOtherPlayer($otherPlayer) / $sets * 100);\n }\n\n return 0;\n }", "title": "" }, { "docid": "970d654f9b4a586f17f714767655291e", "score": "0.5227974", "text": "public function setImpact($impact)\n {\n $this->impact = $impact;\n }", "title": "" }, { "docid": "3fa4f70aa10bfea5cbfa71e8a9e5861e", "score": "0.5217636", "text": "public function onBeforeScore(BonusEvent $event)\n {\n $player = $event->getPlayer();\n $options = $event->getOptions();\n\n if ($player->getPosition() == $event->getInventory()->getOption('player')) {\n $player->addScore($options['points']);\n $this->delete();\n }\n }", "title": "" }, { "docid": "2f8291157e55359d23c704cec106bf41", "score": "0.5211137", "text": "public function setBonus(int $bonus): void\n {\n $this->bonus = $bonus;\n }", "title": "" }, { "docid": "7dada000de73a7b2323c0735eae53ba4", "score": "0.51851726", "text": "public function getScore(): float\n {\n return $this->score;\n }", "title": "" }, { "docid": "3537a9d2855a097e74f7e0bab5dbb223", "score": "0.51395315", "text": "public function updateScore($activity, $user, array $score);", "title": "" }, { "docid": "7b42cecf86026df5270c739a16981b12", "score": "0.51306933", "text": "public function setScore($half = null){\n\t\t$scores = explode(\":\",$this->match_info->score);\n\t\t$ht_scores = explode(\":\",$this->match_info->ht_score);\n if($half == \"st\"){\n // need to set only second half score\n $ft_score_array = explode(':', $scores);\n $ht_score_array = explode(':', $ht_scores);\n $this->home_score = (int)$ft_score_array[0] - (int)$ht_score_array[0];\n $this->away_score = (int)$ft_score_array[1] - (int)$ht_score_array[1];\n }\n\t\telse{\n if($half == \"ht\"){\n // only half time\n\t\t\t\t$score = $ht_scores;\n }\n\t\t\telse{\n // only full time\n\t\t\t\t$score = $scores;\n }\n $this->home_score = (int)$score[0];\n $this->away_score = (int)$score[1];\n }\n }", "title": "" }, { "docid": "7a188f64e9be5e2e812d3b66ff5d54bc", "score": "0.51250803", "text": "function setScoreByPlayerName($playerName, $newScore)\n{\n $connection = open_database_connection();\n\n $oldScore = getScoreByPlayerName($playerName);\n $playerId = getIdByPlayerName($playerName);\n\n $shouldUpdate = $newScore > $oldScore;\n\n if($shouldUpdate){\n //---------\n // update score //\n $query = \"UPDATE cookbook_highscores SET score=$newScore WHERE id=$playerId\";\n\n mysqli_query($connection, $query);\n $numAffectedRows = mysqli_affected_rows($connection);\n close_database_connection($connection);\n return ($numAffectedRows > 0);\n } else {\n close_database_connection($connection);\n return false;\n }\n}", "title": "" }, { "docid": "e84d4f0153fa8562bd629a3751ef92c0", "score": "0.5109636", "text": "public function getScore() : int\n {\n return $this->score;\n }", "title": "" }, { "docid": "56619f358ab192eeb4b849bc907d5006", "score": "0.51061463", "text": "public function setThresholdScore(float $threshold): void\n {\n $this->threshold = $threshold;\n }", "title": "" }, { "docid": "2ac32e4e7ab5ddbe29088fb6ea46b63b", "score": "0.50970614", "text": "private function setTeamsScore($teams, $score)\n {\n foreach ($teams as $key => $team) {\n $otherKey = ($key == 0) ? 1 : 0;\n\n $this->teams[$team]->scoreFor += $score[$key];\n $this->teams[$team]->scoreAgainst += $score[$otherKey];\n\n if ($key == 0) {\n $this->teams[$team]->scoreForIn += $score[$key];\n $this->teams[$team]->scoreAgainstIn += $score[$otherKey];\n } else {\n $this->teams[$team]->scoreForOut += $score[$key];\n $this->teams[$team]->scoreAgainstOut += $score[$otherKey];\n }\n }\n }", "title": "" }, { "docid": "339972025c453ef61e510d8d1ba572ba", "score": "0.5095816", "text": "public function setReferrerCoinsAttribute($value)\n {\n $this->attributes['referrer_coins'] = intval(trim($value));\n }", "title": "" }, { "docid": "5e6864ce3b5fcefc2124b1991bf7110f", "score": "0.50949097", "text": "public function setbonusPV($bonusPV){\n\t\t$this->bonusPv = $bonusPV;\n\t\t$this->vie = $this->vie + $bonusPV;\n\t}", "title": "" }, { "docid": "16edf908e6e0669d35f0bf9a726d576c", "score": "0.5093407", "text": "public function getScore(){\n return $this->score;\n }", "title": "" }, { "docid": "0ab36316ab720fce8cbf09655e0b52bc", "score": "0.5090825", "text": "public function addScore( $score ) {\n $this->chunk_review->score += $score;\n $this->updatePassFailResult();\n }", "title": "" }, { "docid": "8f3eb9accf33a84a63d6379212e26c0c", "score": "0.50899553", "text": "function setMaxScore( $score, $try = false ) {\n\t\t\n\t\t\n\t\tlist($num_correct) = sql_fetch_row(sql_query(\"\n\t\tSELECT COUNT(*)\n\t\tFROM \".$GLOBALS['prefix_lms'].\"_testquestanswer \n\t\tWHERE idQuest = '\".(int)$this->id.\"'\"));\n\t\t\n\t\tif(!$num_correct) $score_assigned = 0;\n\t\telse $score_assigned = round($score / $num_correct, 2);\n\t\t\n\t\tif($try) return round($score_assigned * $num_correct, 2);\n\t\t\n\t\t$re_assign = sql_query(\"\n\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_testquestanswer\n\t\tSET score_correct = '\".$score_assigned.\"'\n\t\tWHERE idQuest = '\".(int)$this->id.\"'\");\n\t\tif(!$re_assign) return 0;\n\t\telse return round($score_assigned * $num_correct, 2);\n\t}", "title": "" }, { "docid": "36c471ef4ac561c1db254c1995cf1362", "score": "0.5077433", "text": "public function setDeviceAppHealthScore(?float $value): void {\n $this->getBackingStore()->set('deviceAppHealthScore', $value);\n }", "title": "" }, { "docid": "27df359f7cd59cc51377cab46e0f39ea", "score": "0.50658983", "text": "public function set_rewards($rewards){\n $this->set_info('player_rewards', $rewards);\n }", "title": "" }, { "docid": "de05ae8a895a48a3e159a0591799d92f", "score": "0.5056296", "text": "public function getInfluenceScore(){\n\t\treturn $this->influenceScore;\n\t}", "title": "" }, { "docid": "0c5160a92ed331d01db07910c7b0b2ef", "score": "0.5018803", "text": "public function setMilitaryScore($militaryScore){\n\t\t$this->militaryScore = $militaryScore;\n\t}", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "bbe14c4c2ad28b17dc0422b0bc53594e", "score": "0.5016487", "text": "public function getScore()\n {\n return $this->score;\n }", "title": "" }, { "docid": "09adc70d1e92df5da78fac3f40c09c0d", "score": "0.5014821", "text": "function update_score($team_id)\n{\n\t$main_points = 0;\n\t$alt_points = 0;\n\n\t$sql = \"SELECT r.score AS score,r.score_alt AS score_alt\n\t\tFROM results r\n\t\tJOIN team t\n\t\t\tON t.team_number=r.team_number\n\t\tJOIN problem p\n\t\t\tON p.contest=t.contest\n\t\t\tAND p.problem_number=r.problem_number\n\t\tWHERE r.team_number=\" . db_quote($team_id) . \"\n\t\tAND p.visible='Y'\";\n\t$result = mysql_query($sql)\n\t\tor die(\"SQL error: \".mysql_error());\n\twhile ($row = mysql_fetch_assoc($result))\n\t{\n\t\t$main_points += $row['score'];\n\t\t$alt_points += $row['score_alt'];\n\t}\n\n\t$sql = \"UPDATE team SET score=\" . db_quote($main_points) . \",\n\t\t\tscore_alt=\" . db_quote($alt_points) . \"\n\t\tWHERE team_number=\" . db_quote($team_id);\n\tmysql_query($sql);\n}", "title": "" }, { "docid": "3c2dda3b699e1c23d8c82ea2ee5c45cf", "score": "0.5012474", "text": "public function gagnerExperience(){\n \n $this->experience = $this->experience + 5;\n \n }", "title": "" }, { "docid": "e3633d1ac1d3375914fa307dd89e5b22", "score": "0.49594706", "text": "private function gerateRankingScore()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e176b810314d1228d04e1bd9da1665fd", "score": "0.49506408", "text": "public function setReferrerRewardLimitAttribute($value)\n {\n $this->attributes['referrer_reward_limit'] = intval(trim($value));\n }", "title": "" }, { "docid": "b5cf4d8204c49463254c21c0e6f7f3e9", "score": "0.49426886", "text": "public function getScore()\n {\n return $this->Score;\n }", "title": "" }, { "docid": "d1da599fc797514edacab94a4461d643", "score": "0.49387783", "text": "public function setComputerScoreToZero()\n {\n return $this->roundComputerScore = 0;\n }", "title": "" }, { "docid": "8661180f0f10da124774c8c2294bb7cf", "score": "0.49368882", "text": "public function getScore () {\n \treturn $this->score;\n }", "title": "" }, { "docid": "7277c3bbcb815ae14d40945b0d8eafd6", "score": "0.49025726", "text": "public function setHealth(int $value)\n {\n }", "title": "" }, { "docid": "be80eb45470b07781c07c740a48c6d73", "score": "0.49004358", "text": "public function getScore() {\n\t\treturn $this->score;\n\t}", "title": "" }, { "docid": "d6542996653dce114b6a2b45d332f7ef", "score": "0.48953366", "text": "public function setAlertImpact($val)\n {\n $this->_propDict[\"alertImpact\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "3a2eb0006e87a01884f4151a32542aef", "score": "0.48544505", "text": "public function setSpouse($value)\n {\n $this->spouse = $value;\n }", "title": "" }, { "docid": "4fda6320e0a4ac9055477b14685ab244", "score": "0.4838561", "text": "public function scoreRecord() {\n\t\t $this->competence='';\n\t\t $this->score=0.0;\n\t}", "title": "" }, { "docid": "fbd9fc10cd286fa873f5649643f08f30", "score": "0.48357055", "text": "public function updateScore($ruleId, $score, $loggedId);", "title": "" }, { "docid": "14289366cdab8e852d93dedcaf6c7ae0", "score": "0.48082793", "text": "protected function setStat($value, $name, $player_id = NULL)\n {\n }", "title": "" }, { "docid": "391035079cb968d05b3973bf1213f176", "score": "0.4807996", "text": "public static function update_score ($user, $score) {\n\t\tif ($score == '') {\n\t\t\t$score = -1;\n\t\t}\n\n\t\treturn DB::execute (\n\t\t\t'update #prefix#courses_learner set score = ? where user = ?',\n\t\t\t$score,\n\t\t\t$user\n\t\t);\n\t}", "title": "" }, { "docid": "f8613989a4aa92635d06986d6e6e73fd", "score": "0.4807878", "text": "public function setRate($value) {\n $this->rate = $value;\n }", "title": "" }, { "docid": "295c1a613cd1ef3465a74676a843875e", "score": "0.4806585", "text": "function set_max_score($score)\n {\n \t\tif($this->debug>0){error_log('New LP - In learnpathItem::set_max_score('.$score.')',0);}\n \tif(is_int($score) or $score == '')\n \t{\n \t\t$this->view_max_score = Database::escape_string($score);\n \t\tif($this->debug>1){error_log('New LP - In learnpathItem::set_max_score() - Updated object score of item '.$this->db_id.' to '.$this->view_max_score,0);}\n \t\treturn true;\n \t}\n \treturn false;\n }", "title": "" }, { "docid": "1ad08079765d9ab7baacaf0bb80000de", "score": "0.47931343", "text": "function updateRank($comment_id,$ip,$score){\n\t\t\tinclude(\"account.php\");\n\t\t\t$vcommentid = $comment_id;\n\t\t\t$stmt = $link->prepare(\"UPDATE ranking SET score = '$score' WHERE comment_id= '$comment_id' AND ip='$ip'\");\n\t\t\t$stmt->execute(); \n\t\t\t$stmt->close();\n\t\t}", "title": "" }, { "docid": "f6861182cf12c197f5891febad7f8c95", "score": "0.4783001", "text": "function setPriority( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get();\n $this->Priority = $value;\n }", "title": "" }, { "docid": "9f98113e36e3829757b6624aab2125c3", "score": "0.4780199", "text": "public function getScore()\n {\n if ($this->isStrike()) {\n return 10;\n }\n\n if ($this->isGutterball()) {\n return 0;\n }\n\n if ($this->isSpare() && $previous = $this->getPrevious()) {\n return 10 - $previous->getScore();\n }\n\n return (int) $this->getValue();\n }", "title": "" }, { "docid": "7a6127b99ed61bddb8b8144ec120ce2b", "score": "0.4778569", "text": "protected\n function updateScore(Request $request)\n {\n $user = auth()->user();\n if ($user)\n switch ($request->command) {\n case 'install_chat':\n auth()->user()->score += Helper::$install_chat_score;\n auth()->user()->save();\n return auth()->user()->score;\n break;\n case 'follow_chat':\n auth()->user()->score += Helper::$follow_score;\n auth()->user()->save();\n return auth()->user()->score;\n\n break;\n case 'see_video':\n auth()->user()->score += Helper::$see_video_score;\n auth()->user()->save();\n return auth()->user()->score;\n break;\n\n }\n }", "title": "" }, { "docid": "7a6127b99ed61bddb8b8144ec120ce2b", "score": "0.4778569", "text": "protected\n function updateScore(Request $request)\n {\n $user = auth()->user();\n if ($user)\n switch ($request->command) {\n case 'install_chat':\n auth()->user()->score += Helper::$install_chat_score;\n auth()->user()->save();\n return auth()->user()->score;\n break;\n case 'follow_chat':\n auth()->user()->score += Helper::$follow_score;\n auth()->user()->save();\n return auth()->user()->score;\n\n break;\n case 'see_video':\n auth()->user()->score += Helper::$see_video_score;\n auth()->user()->save();\n return auth()->user()->score;\n break;\n\n }\n }", "title": "" }, { "docid": "46076ad988aa064015de9daf492d3030", "score": "0.4773679", "text": "function setMonteCarlo() {\n $this->wfPoint12 = 250 * $this->monteCarlo;\n }", "title": "" }, { "docid": "107244d3a436f1ca2459cc2907fbc6c3", "score": "0.4772594", "text": "public function setHighestHand()\n {\n $this->_setHighestHandByPlayer('White');\n $this->_setHighestHandByPlayer('Black');\n }", "title": "" }, { "docid": "8910733fd0214367f9caae601d36f6d0", "score": "0.47635946", "text": "public function setFinancialScore($financialScore){\n\t\t$this->financialScore = $financialScore;\n\t}", "title": "" }, { "docid": "6b343039f048324927ec96688415706d", "score": "0.4759297", "text": "public function setReferrerXpAttribute($value)\n {\n $this->attributes['referrer_xp'] = intval(trim($value));\n }", "title": "" }, { "docid": "941b86444045e20ed204527d62f983cd", "score": "0.47536182", "text": "public function setDeviceImpactedCount(?int $value): void {\n $this->getBackingStore()->set('deviceImpactedCount', $value);\n }", "title": "" }, { "docid": "d1c112c0be40d6d8501321d5ef55097c", "score": "0.47305238", "text": "public function setMasteryScore(int $masteryScore)\n {\n $this->masteryScore = $masteryScore;\n }", "title": "" }, { "docid": "eba40e9dd7848751d27040544f4a05b2", "score": "0.4725553", "text": "public function setUserVote($value){\n\t\t$this->userVote = $value;\n\t}", "title": "" }, { "docid": "64e7263240540dcc74bc0f8048c94bc5", "score": "0.47249812", "text": "public function energy_use($value)\n\t{\n\t\t$value = (int) $value;\n\t\t\n\t\t\\Kofradia\\DB::get()->exec(\"UPDATE users_players SET up_energy = GREATEST(0, up_energy - $value) WHERE up_id = $this->id\");\n\t\t$this->data['up_energy'] = max(0, $this->data['up_energy'] - $value);\n\t\t\n\t\t$this->trigger(\"energy\", array(\n\t\t\t\t\"energy_used\" => $value));\n\t}", "title": "" }, { "docid": "bcd92614779184d9245999723243874a", "score": "0.4718343", "text": "public function save()\n {\n $sum = $this->turn->getTurnScore();\n $this->playing->addValuesToScore($sum);\n }", "title": "" }, { "docid": "6fd5d37a093e22e4025ec7214149787e", "score": "0.47181052", "text": "public function set_energy($energy){\n $this->set_info('player_energy', $energy);\n }", "title": "" }, { "docid": "3b1bf76eb3c85b728ffefd512247182b", "score": "0.4712955", "text": "public function setCoin() : void\n {\n try {\n $this->coin = Coins::firstOrCreate();\n } catch (Exception $e) {\n $this->logger->error([\n 'coin_set_error' => $e->getMessage(),\n 'stack' => $e->getTraceAsString()\n ]);\n throw new CoinException('error setting coin');\n }\n }", "title": "" }, { "docid": "95e67d32b8313a5402d4ffdc9d60915c", "score": "0.47110566", "text": "public function score() {\r\n return $this->trustScore->Score;\r\n }", "title": "" }, { "docid": "5dd148779c8969c7399480c2e674edac", "score": "0.47057712", "text": "private function recalcScore()\n\t{\n\t\tif ($this->isLinear())\n\t\t{\n\t\t\t$wc = Module_WeChall::instance();\n\t\t\t$wc->includeClass('WC_Warbox');\n\t\t\t$wc->includeClass('WC_Warflag');\n\t\t\t$basescore = WC_Warflag::getTotalscoreForSite($this);\n\t\t\tif ($this->isNoV1())\n\t\t\t{\n// \t\t\t\tWC_RegAt::calcTotalscores()\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$basescore = $this->getBasescore();\n\t\t\t$average = Common::clamp($this->getAverage(), 0, 1);\n\t\t\t$challcnt = $this->getChallcount();\n\t\t\t$spc = $this->getVar('site_spc');\n\t\t\t\n\t\t\t$basescore += $spc * $challcnt;\n\t\t\t\n\t\t\t$basescore += $basescore - $average * $basescore;\n\t\t\t\n\t\t\t$basescore = intval(round($basescore));\n\t\t}\n\t\t\n\t\tif ($basescore != $this->getScore())\n\t\t{\n\t\t\trequire_once 'WC_HistorySite.php';\n\t\t\tif (false === WC_HistorySite::insertEntry($this->getID(), $this->getScore(), $this->getUsercount(), $this->getChallcount()))\n\t\t\t{\n\t\t\t\techo GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn $this->saveVar('site_score', $basescore);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "de840050c333d94e3e54df29b3c4251b", "score": "0.47016338", "text": "public function setWeight($weight)\n {\n parent::setWeight($weight * 2.205);\n }", "title": "" }, { "docid": "ef0bac97d58a5d74d76d9a99608e921e", "score": "0.47007093", "text": "public function set_average_total_score($score)\n {\n foreach ($score as $point)\n {\n $scores[] = $point + $this->offset;\n }\n\n $this->average_total_score = $scores;\n }", "title": "" }, { "docid": "fb2d91315af22e966064c37efb2562dd", "score": "0.46965584", "text": "public function setNeutralThreshold($value)\n {\n $this->neutralThreshold = $value;\n }", "title": "" } ]
d1ef1e321e48fe6be4975df7f6573a77
Creates a form to delete a Curso entity by id.
[ { "docid": "0c3327ef054dbe6b798c465659e24212", "score": "0.79752535", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('curso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" } ]
[ { "docid": "1b5b3518fac5d3e939b81796f7dd2f85", "score": "0.78191465", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('precios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a19a5f93a2d5a5603772adbfedc0bae4", "score": "0.7801908", "text": "private function createDeleteForm($id) {\r\n $icon = '<i class=\"icon icon-remove\"></i>';\r\n //$icon = html_ ($icon);\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('article_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer l\\'article courant'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "71a84110c136720061b9707eb859dd90", "score": "0.7753842", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clientes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "57ffa12fe64b67824b24d6203842cb53", "score": "0.77508515", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('secteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('submit', 'submit', array('label' => ' ','attr'=>array('class'=>'btn-supp','title'=>'Supprimer')))\n //--\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bc5da135d1d46865380f637be6386e15", "score": "0.7726951", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('campodocumento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1f83865af23af5b40ec9b8dafafffd70", "score": "0.7724786", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('excecoes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6a67a902fc769ccb1c66c586d66d9ae3", "score": "0.77203196", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('grhemployes_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "1a7400aa690cdb0f1f986410dd0992e0", "score": "0.7710079", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('colegiado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "dc4e90e8a4c02b59a794d3cd94e4f900", "score": "0.7707865", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reservaciones_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1b1f70d92bcc14033a7666e3e990063e", "score": "0.769475", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sites_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "be6aa88e3048fc6023e62dad47430434", "score": "0.76900953", "text": "private function createDeleteForm($id) {\n\t\t\treturn $this->createFormBuilder()\n\t\t\t ->setAction($this->generateUrl('individu_delete', array('id' => $id)))\n\t\t\t ->setMethod('DELETE')\n\t\t\t ->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t ->getForm();\n\t\t}", "title": "" }, { "docid": "345d0a13581cfb68090188475106362e", "score": "0.76849854", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('discoduro_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f5034df714f5b0e03d89d8512254be78", "score": "0.7667808", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('causencias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "652f536ef8bdcfc9f1081bb7b91d7506", "score": "0.76677424", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('plaisir_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "f7ca0e73cd7338694152dc02ad4612ec", "score": "0.7665349", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('corporation_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-primary btn-small'\n )\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2c5e19d8c93c87cb02e15a59b0e434d8", "score": "0.7653296", "text": "private function createDeleteForm($id) {\n\t\t\treturn $this->createFormBuilder()\n\t\t\t ->setAction($this->generateUrl('voie_delete', array('id' => $id)))\n\t\t\t ->setMethod('DELETE')\n\t\t\t ->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t ->getForm();\n\t\t}", "title": "" }, { "docid": "ffeb1b224a24e02d9ecda1dd960f56c6", "score": "0.76522166", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pedidoproducto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "07808ed3b99f29e5112e9bd809b61bca", "score": "0.7649386", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnico_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "28cc0f5fb350274f3cad952f856034c6", "score": "0.7643649", "text": "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vitrine_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'title.sim', 'translation_domain' => 'messagesCommonBundle', 'attr' => array('class' => 'btn btn-success btn-lg bt-delete-foto')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7309264bb92dcc2fe74271efa2d8e686", "score": "0.76421994", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modelo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9a5839302281142294f7304fba139d96", "score": "0.763351", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('activo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c1e384873b26818092897198bf8dd7e8", "score": "0.7633276", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyectoinversion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "24b051e9501c8971d2b5914a38e3a74d", "score": "0.7630701", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('costo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "98e4005096ec2ea8f64457d1b07eb7a8", "score": "0.7625677", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tiposempresa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "15a0feab1a2cae2fd8a371eccd87d7d4", "score": "0.7617461", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('komentarz_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Skasuj Komentarz','attr' => array('class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "88333fe8a55dfedf317646fade9c789d", "score": "0.761041", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('publicidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "11d1ed1196574972c743eb4788143eb8", "score": "0.7609569", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ud_salones_prestamo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c3aec194f0989fe9900242c7c0bd14ab", "score": "0.7605951", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('productsection_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "34bf3ffe63c24970553499bb08bdfbb4", "score": "0.7604335", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cuestionarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "16be26fd5b88b8f4303c0c7e0ffdc23c", "score": "0.7604211", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('distributivos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8ac822b58a1949ac059084959cc72a0e", "score": "0.76031417", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('masdocumentos_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "4535b90f50f7d228e0d2d0183b525129", "score": "0.75990677", "text": "private function createDeleteForm($id)\n {\n\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n /* return $this->createFormBuilder()\n ->setAction($this->generateUrl('encargadoproyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;*/\n }", "title": "" }, { "docid": "f18d4e23fd69498bcbd14dbfe6eb9e4f", "score": "0.75957775", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('lineaaccion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9d0ce01cf0e81f114a3f23dbd1a62bf1", "score": "0.75956285", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_tiposervicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "96a52b850cc91fcf53d5d2cc994a109e", "score": "0.7594043", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('antecedentepenal_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr'=>array('class'=>'btn btn-primary')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7a6231d9148611328706778036220004", "score": "0.7583338", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cdeudas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "8344f606c9dffdaa3fde4690b0d48eef", "score": "0.7580729", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4f6eb5f76e6ab4a5690af2e8d8f8ed52", "score": "0.75764024", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('direccioncliente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "691cd1a2278e7e32a82fab9661f611ea", "score": "0.7572771", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Obrazki_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8f543e1301f2f86d4e032ed1648fef63", "score": "0.7571115", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyectosescolares_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3805f2f24a11678ba0db5d9593dfd550", "score": "0.7563875", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registro_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr' => array('class' => 'btn btn-danger btn-sm')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3b862ec643501d9929d9791efdc2ea3f", "score": "0.7562773", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('terceros_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "e62035b09b0a2aa9d71fb236ef8c5226", "score": "0.75521016", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_object_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить номер'))\n ->getForm();\n }", "title": "" }, { "docid": "75eb708be3c6dbe4746f7353be03e227", "score": "0.7549025", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('documento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cc24bc68aab9b9cf653850d42bed8141", "score": "0.75453144", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comentarioproyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0e97ada73d45bbe362d95c08aaadfb98", "score": "0.75431865", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sale_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7c5d9d5daaa48ed6623123f1ed256dd3", "score": "0.7535887", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('fiscalizacion_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "36f48a4f4ff93a084a1ab15749705cbd", "score": "0.75299156", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comptecomptable_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cc2520db279f0e9fb15d39cb2c49c43e", "score": "0.75281274", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Publicacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7951848d005ea1a694b3760ad25142d8", "score": "0.75271016", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('actividades_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "29de813d9e6c8f53c806bbcce1dc97ef", "score": "0.7521288", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vehicule_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('supprimer', 'submit', array('label' => 'S', 'attr' => array('class' => 'btn-supp btn-danger', 'title' => 'Supprimer')))\n //--\n ->getForm()\n ;\n }", "title": "" }, { "docid": "174f7c371fe14982a3e744c383cd45aa", "score": "0.75121176", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('grhcontrats_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "ddabd9989cf9feb74e064df952e4b1de", "score": "0.7510208", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('listaNegraCombustible_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "57a254770b91584b264ab48c6fe69b43", "score": "0.75053996", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('color_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '刪除'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "29117b1655344b6d565726b796be9ef0", "score": "0.7504793", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5eb264a75170c03855ce33b58ef393e8", "score": "0.750353", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('datosfiscales_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "25c9ee8e3bc725596916b9ebb517441f", "score": "0.75019336", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reclamations_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "31353b1a3baf8cb71ee0956034a5ffc1", "score": "0.7499672", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('alumno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "02a37717c4e107e032e26e3f01241f80", "score": "0.74952596", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('absensi_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a43c6afb31d2105f73f31e4adb1eb72a", "score": "0.7494748", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zimzim_opinion_opinion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'button.delete'))\n ->getForm();\n }", "title": "" }, { "docid": "553f0bb55bbeb741c8bc7eda17d4f5c8", "score": "0.74939376", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('operation_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0718478e17d2bfa8c1b18ada961bc7eb", "score": "0.74928945", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('datosdistritos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f6e7cb542e1c8d31251b3cd7e86cb413", "score": "0.74907094", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zastepstwo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Skasuj zastępstwo','attr' => array('class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "289f574dbf8cbc01fa37c2b9c1d6b410", "score": "0.74835855", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('parametros_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b6d8cfeae0036155d8834bba4ad5e5cf", "score": "0.74829113", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gasto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "90716f686cdadf1dd1f2fe0977417d92", "score": "0.7475958", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuariointerno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "750620a8dc4260cd812750ed51089abe", "score": "0.7475277", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pagescarrousel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1f4ca2e8a9daea4d58755c6fe927cc05", "score": "0.7473713", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ctrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "98f8550d0b14e0cdc309cfd4f6957c99", "score": "0.74723125", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('stock_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4f7cd51c202bd0c90a1e91ca32fce386", "score": "0.7472", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('experience_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "458415365aa6f79aa12e6841d3e82edd", "score": "0.7466368", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bor_slider_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "0fc1abbb3244e8f3c6c25c1af4774380", "score": "0.7465749", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pauta_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar Pauta'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "776dca3c1238f73ced9a2a402431f54a", "score": "0.7465301", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('cr_backend_fininstitut_delete', array('id' => $id)))\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "e19353b80e114d8a0a904a2daef6d7a5", "score": "0.7465276", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('casa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c5daa1ba71e11296287bf40ca52f6802", "score": "0.74652106", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('informefinanciero_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fececcbf36d34af9ea28bac8f25d92e9", "score": "0.74646056", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('calculallocationconge_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b37855e029b9e3a8954e0e12ef478ebd", "score": "0.7463383", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visita_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d154e9a8d116a5dd1cf26218b1016d0d", "score": "0.7462789", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hora_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ec35f704916a986780418a968f5b7ca3", "score": "0.74594414", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solicitud_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2ce8346bc924cbce49b3b6bd1d6442f9", "score": "0.7456819", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('typetable_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "dfea9b337dfac1341d01e5a4037a8bf3", "score": "0.74565387", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('supprimer_instance', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm();\r\n }", "title": "" }, { "docid": "72bf05f89249a1d117cbfc505b2cfe44", "score": "0.7454779", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifda_ctlferiado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "834d593531827e3ddcf670bdcdc01f64", "score": "0.7452455", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('profissao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fadcdd20687533e7b11aacf28eff808b", "score": "0.7447499", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('supprimer_signalisation', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm();\r\n }", "title": "" }, { "docid": "94bf91e430d070036c32a9b748cd30fd", "score": "0.7444747", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_recurso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b402b047dd99467c6d76215a0a141174", "score": "0.7444606", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('service_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', 'attr'=> array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "828587c4c9af25bf1a62ce51ba8b3f7e", "score": "0.7444248", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger',\n 'onclick' => \"return confirm('Are You sure You want to delete entity?')\",\n ),\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fe8604916019098fa7a681c62739a2f5", "score": "0.74403846", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('termofuse_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "76d2038137586fa3e39069ea44551c5f", "score": "0.7438356", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('scoring_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a9f08a6980933d2bbd43bbabb78691b0", "score": "0.7438076", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ceebab7bac190148794a01779f7d7faf", "score": "0.74377936", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2d18bf722dfb631beeef5486e94a3058", "score": "0.7437143", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cf41c58c96388642f8880b915ebc3f81", "score": "0.74368817", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0abfb23f8423a69ca48ef167da5fb0fd", "score": "0.7430561", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sidplaactividad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4c4d4ebd2f7a43e58e21c60e388e2451", "score": "0.7428229", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_vendedor_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "661ba1cdd5fdcad5a2895a48ed98cdee", "score": "0.74249125", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => ' Eliminar', 'attr' => array('icon' => 'remove' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ab821ecce5d4751e02a3dd28113feac5", "score": "0.74215585", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administradores_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b8aae5d1216de8389cdef4c7b99b0d7c", "score": "0.74150074", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tutorias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => \"Eliminar\", 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7276a0f6191dffeac7f10eae8d772c8c", "score": "0.7412848", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pensumanio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f7ca5b528f459fd03ec30a5d2d3039f8", "score": "0.7409182", "text": "private function createDeletecomForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comment_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
ff36981c0e0eef2dc2cd384f7bf01460
Boot up the repository, pushing criteria
[ { "docid": "9997f354d8e5b78fc462b1709eca1cc4", "score": "0.0", "text": "public function boot()\n {\n $this->pushCriteria(app(RequestCriteria::class));\n }", "title": "" } ]
[ { "docid": "2d724be90c3f0997fe44c6490f65e051", "score": "0.6280935", "text": "protected function initRepo() {\n\n\t\t$process = new Process(['git', 'init']);\n\t\t$process->run();\n\n\t\t$process = new Process(['git', 'checkout', '-b', $this->development]);\n\t\t$process->run();\n\n\t\t$process = new Process(['git', 'add', '.']);\n\t\t$process->run();\n\n\t\t$process = new Process(['git', 'commit', '-m', 'Workflow Setup Complete']);\n\t\t$process->run();\n\n\t\t$this->verifyBranch();\n\t}", "title": "" }, { "docid": "e87049e8f9e63d35a09041b620003e0e", "score": "0.6141347", "text": "private function initRepository(): void\n {\n $kernel = $this->getContainer()->get('kernel');\n\n $application = new Application($kernel);\n\n $command = $application->find('doctrine:phpcr:repository:init');\n $commandTester = new CommandTester($command);\n $commandTester->execute(\n ['command' => $command->getName()]\n );\n }", "title": "" }, { "docid": "6233b1a1661977169da1972457518152", "score": "0.5954601", "text": "public function init(){\n\t\t$this->initRepository($this->settings['JackrabbitRepository']['workspace']);\n\t}", "title": "" }, { "docid": "37e8258fde325f44c9148a5f1ee76843", "score": "0.5708246", "text": "function prepare_deploy() {\n\n // Determine required binaries\n $binaries = array('git', 'rsync');\n foreach( BUILDPIPELINE as $command ) {\n $binaries[] = explode(\" \", $command)[0];\n }\n\n // Check Environment\n if( !checkEnvironment( $binaries )) {\n cleanup( LOCALREPOSITORY );\n return;\n }\n\n // Fetch updates from Git repository\n if( !gitPull( REMOTEREPOSITORY, LOCALREPOSITORY, BRANCH, LOCALREPOSITORY . VERSION_FILE )) {\n cleanup( LOCALREPOSITORY );\n return;\n }\n}", "title": "" }, { "docid": "a2c03fe1e4a1ef0fc909fe649c43087d", "score": "0.5704645", "text": "protected function createRepository()\n {\n passthru(\"hub create \" . $this->project_name_and_org);\n }", "title": "" }, { "docid": "167de434da45c30a4a3b012204104c8b", "score": "0.56443775", "text": "public function set_needed_repos(): void {}", "title": "" }, { "docid": "522a0b5dc2551f903d2219306c3352d8", "score": "0.54997927", "text": "public function run()\n {\n $repositories = GitHub::user()\n ->repositories(\n $this->_username,\n $this->_type,\n $this->_sort,\n $this->_direction,\n $this->_visibility,\n $this->_affiliation\n );\n\n foreach ($repositories as $data)\n {\n $repository = [\n 'node_id' => $data['node_id'],\n 'name' => $data['name'],\n 'full_name' => $data['full_name'],\n 'html_url' => $data['html_url'],\n 'url' => $data['url'],\n 'commits_url' => $data['commits_url'],\n 'git_commits_url' => $data['git_commits_url'],\n 'repo_created_at' => $data['created_at'],\n 'repo_updated_at' => $data['updated_at'],\n 'repo_pushed_at' => $data['pushed_at'],\n ];\n\n factory(\\App\\Repository::class)->create($repository);\n }\n }", "title": "" }, { "docid": "a8a19cd5d6947318bc9b2940f77d5ed5", "score": "0.54888123", "text": "protected function setUp() {\r\n\t\t$this->repository = new Tx_Extracache_Domain_Repository_ArgumentRepository();\r\n\t}", "title": "" }, { "docid": "9d7f203b466463c36e97fe25bf417ed7", "score": "0.5471396", "text": "public function run()\n {\n $this->qualityRepo = App::make(QualityRepository::class);\n\n foreach (Quality::KNOWN_QUALITIES as $name) {\n $this->qualityRepo->create($name);\n }\n }", "title": "" }, { "docid": "4a32a2683d5c3e046f1357253694cf12", "score": "0.54707676", "text": "public function git_init() {\n\t\tIDE::check_perms();\n\n\t\t$this->git_open_repo(); // make sure git repo is open\n\n\t\t// create the local repo path if it doesn't exist\n\t\tif ( ! file_exists( $this->git->getRepositoryPath() ) ) {\n\t\t\tmkdir( $this->git->getRepositoryPath() );\n\t\t}\n\n\t\t$result = $this->git->getBinary()->{'init'}( $this->git->getRepositoryPath(), array(\n\t\t\t// What do we put here?\n\t\t) );\n\n\t\t// return $result->getStdOut(); // still not getting enough output from the push...\n\t\tif ( $result->getStdErr() === '' ) {\n\t\t\techo $result->getStdOut();\n\t\t} else {\n\t\t\techo $result->getStdErr();\n\t\t}\n\n\t\tdie(); // this is required to return a proper result\n\t}", "title": "" }, { "docid": "4cce311d36956c36e9d93b4b82097cc6", "score": "0.5384382", "text": "protected function _git_repo_setup() {\n\t\t$this->local_git_repo = null;\n\n\t\t/*\n\t\t * Create temporary directory\n\t\t */\n\t\t$cmd = sprintf(\n\t\t\t'%s -d %s',\n\t\t\tescapeshellcmd( 'mktemp' ),\n\t\t\tescapeshellarg( sys_get_temp_dir() . '/vipgocs-XXXXXX' )\n\t\t);\n\n\t\t$result = shell_exec( $cmd );\n\n\t\t$this->local_git_repo = trim( $result );\n\n\t\t/*\n\t\t * Add submodule.\n\t\t */\n\t\tfile_put_contents(\n\t\t\t$this->local_git_repo . '/.gitmodules',\n\t\t\t'[submodule \"testmodule1\"]' . PHP_EOL .\n\t\t\t'path = plugins/submodulefolder-1' . PHP_EOL .\n\t\t\t'url = https://github.com/test-submodule-owner/test-submodule-1.git' . PHP_EOL\n\t\t);\n\t}", "title": "" }, { "docid": "053906e0d05abf220d9bb33fbc3fcfee", "score": "0.53827614", "text": "function init() {\n\t\tif ( ! apply_filters( 'git_update_keep_location', false ) )\n\t\t\treturn;\n\n\t\tadd_filter( 'upgrader_pre_install', array( $this, 'upgrader_pre_install' ), 5, 3 );\n\t\tadd_filter( 'upgrader_post_install', array( $this, 'upgrader_post_install' ), 15, 3 );\n\n\t}", "title": "" }, { "docid": "47cf275145b95e13b8396858adde5274", "score": "0.5381012", "text": "public function run()\n {\n $country = Country::whereSlug('united-arab-emirates')->first();\n $community = Community::whereSlug('dubai-marina')->first();\n\n $developer = factory(Developer::class)->create([\n 'country_id' => $country->id,\n 'name' => 'Dubai Properties',\n 'slug' => 'dubai-properties'\n ]);\n\n $project = factory(Project::class)->create([\n 'developer_id' => $developer->id,\n 'name' => 'Villanova',\n 'title' => 'First time Mediterranean styled \"Cluster Homes\" in Dubailand',\n 'slug' => 'villanova'\n ]);\n\n // $project->searchable();\n\n $community->projects()->attach($project);\n\n $this->addProjectType($project);\n $this->addPaymentPlans($project);\n\t $this->addBrochure($project);\n //\n }", "title": "" }, { "docid": "b9ee2dc26d5d9e941e726a25fed3462e", "score": "0.53733605", "text": "protected function initializeAction() {\n\t\t$this->paperRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_paperRepository');\n\t\t$this->bestPaperRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_bestPaperVotingRepository');\n\t}", "title": "" }, { "docid": "a3673582cce22116dc491743e5261360", "score": "0.53647506", "text": "function onCreate(RepositoryConnectorInterface $repo);", "title": "" }, { "docid": "9a88342f025654f557397db69244718e", "score": "0.53476083", "text": "protected function initializeAction() {\n\t\t$this->allowOnlyAuthorWithMinAdminLevel(10);\n\t\t$this->rallyePlaceRepository = t3lib_div::makeInstance('Tx_Wpjr_Domain_Repository_RallyePlaceRepository');\n\t}", "title": "" }, { "docid": "1ff7c62f8c23b61ae197f2e74676930e", "score": "0.5345389", "text": "public function setUp() {\n \n self::bootKernel();\n $this->marketplaceRepository = static::$kernel->getContainer()->get('MarketplaceRepository');\n }", "title": "" }, { "docid": "6e87368243394849f13ded761ca4525d", "score": "0.53166705", "text": "public function populate(){\n $this->libraryRepository->populateDB();\n }", "title": "" }, { "docid": "1fc052c728d7e2972f3b38c07b474682", "score": "0.5292483", "text": "protected function onSetUp() {\n\n\t\t$this::s()->update->setFeedSource( 'https://raw.githubusercontent.com/TheMasterCut/tmc-search-popup/master/updates.json' );\n\n\t\tif( ! App::i()->license->isActive() ){\n\t\t\t$this::s()->update->disableUpdateOfPackage();\n\t\t}\n\n\t}", "title": "" }, { "docid": "3d31d0a0149e5371f48345822f963838", "score": "0.5287015", "text": "function __construct()\n {\n $this->productionRepository = new ProductRepository();\n $this->coefficientRepository = new CoefficientRepository();\n }", "title": "" }, { "docid": "f1a190d5c07ffc9122abfa1730aeb791", "score": "0.5274458", "text": "public function run_install()\n\t{\n\t\t// Create the database tables.\n\t\t// Also include table_prefix in name\n\t\t// HT: Added `fuzzy` boolean NOT NULL default \\'0\\' for fuzzy search\n\t\t$this->db->query('CREATE TABLE IF NOT EXISTS `'.Kohana::config('database.default.table_prefix').'findlocation_settings` (\n\t\t\t\t `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t `region_code` varchar(10) DEFAULT NULL,\n\t\t\t\t `append_to_google` varchar(255) DEFAULT NULL,\n\t\t\t\t `geonames_username` varchar(255) DEFAULT NULL,\n\t\t\t\t `n_w_lat` double NOT NULL default \\'0\\',\n\t\t\t\t `n_w_lon` double NOT NULL default \\'0\\',\n\t\t\t\t `s_e_lat` double NOT NULL default \\'0\\',\n\t\t\t\t `s_e_lon` double NOT NULL default \\'0\\',\n\t\t\t\t `fuzzy` boolean NOT NULL default \\'0\\',\n\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1');\n\t\t\t\t\n\t\t$this->db->query('CREATE TABLE IF NOT EXISTS `'.Kohana::config('database.default.table_prefix').'findlocation_cache` (\n\t\t\t\t `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t `search_term` varchar(255) DEFAULT NULL,\n\t\t\t\t `result_name` varchar(255) DEFAULT NULL,\n\t\t\t\t `lat` double NOT NULL default \\'0\\',\n\t\t\t\t `lon` double NOT NULL default \\'0\\',\n\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1');\n\t\t\t\t\n\t}", "title": "" }, { "docid": "fe15628939ef30c677573fbbc4937a6e", "score": "0.5263397", "text": "Protected Function initializeAction() {\n\t\t$this->projectRepository =& t3lib_div::makeInstance('Tx_MittwaldTimetrack_Domain_Repository_ProjectRepository');\n\t}", "title": "" }, { "docid": "b8c4112bc983f3380264e5433adc5ab3", "score": "0.5262576", "text": "protected function initializeAction() {\n\t\t$this->familyRepository =& t3lib_div::makeInstance('Tx_Timekeeping_Domain_Repository_FamilyRepository');\n\t}", "title": "" }, { "docid": "7306bf6fd04b29ac5116b68bb0a3e341", "score": "0.5261594", "text": "protected function initializeAction() {\n\t\t$this->charRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_CharRepository');\n\t\t$this->bestCharRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_BestCharVotingRepository');\n\t}", "title": "" }, { "docid": "f4f4e6637cadff056f9b553e6b176d3d", "score": "0.5256455", "text": "protected function prepareDatabase()\n {\n $this->migrator->setConnection($this->connection);\n \n if ( ! $this->migrator->repositoryExists())\n {\n $this->repository->createRepository();\n } \n }", "title": "" }, { "docid": "bb990c0528b07f0fb8be5ea1acad5beb", "score": "0.52479017", "text": "protected function initializeAction() {\n\t\t$this->orderRepository = t3lib_div::makeInstance('Tx_TlShop_Domain_Repository_OrderRepository');\n\t\t$this->articleRepository = t3lib_div::makeInstance('Tx_TlShop_Domain_Repository_ArticleRepository');\n\t}", "title": "" }, { "docid": "d65281d24434d652f29b3eb14e570407", "score": "0.524407", "text": "public function install()\n {\n /**\n * read loom.json and loom.lock, compare states : \n * if state is changed generate a fresh autoloading script, and lock the state.\n * else dont touch it :P\n */\n self::breakRunning(\"NOTICE\", \"This feature is out of order.\");\n }", "title": "" }, { "docid": "d79b7bd207be97859770c028f3e9cf69", "score": "0.52390707", "text": "public function initializeAction() {\n\t\tparent::initializeAction();\n\t\t\n\t\t$this->injectMapRepository(t3lib_div::makeInstance('Tx_Ccore_Domain_Repository_MapRepository'));\n\t}", "title": "" }, { "docid": "d27a9c6ea5db109df4cdcb3951d499a9", "score": "0.5237239", "text": "public function setup() {\n\t\t// load database tables from .sql-files\n\t\t$this->db->loadSQLFile($this->moduleName, 'alienweapons');\n\t}", "title": "" }, { "docid": "fc1e30484014eb91e6edfe7b192d44dc", "score": "0.5236155", "text": "public function install() {\n\t\t$this->verifyBranch();\n\t\t$this->generate();\n\t}", "title": "" }, { "docid": "edbdc2ac55887d9551c1dc405362630f", "score": "0.52319956", "text": "public function setUp()\n {\n $this->package = new Package([]);\n $this->repository = NewInstance::of(Repository::class);\n }", "title": "" }, { "docid": "efc8055dd1fa79e5631792cdd0914ddc", "score": "0.52288705", "text": "protected function initRepo(): void\n {\n if (isset($this->repository)) {\n $this->debug(\"Repository already initialized.\");\n return;\n }\n\n\n try {\n $process = new Process(['git', 'rev-parse', '--show-toplevel']);\n $process->run();\n $repository_dir = trim($process->getOutput());\n $this->cwd = $repository_dir;\n $client = new Git();\n $this->repository = $client->open($this->cwd);\n } catch (\\Exception $e) {\n $this->stdErr->writeln(\"No repository found in current directory.\");\n exit(1);\n }\n }", "title": "" }, { "docid": "6475d02d78967b9384f9ed197b263251", "score": "0.52201957", "text": "function initializeGitObject() {\n\t \n\t\t$repodir = $this->getGitDir().$this->_reponame;\n\n if (!is_dir($repodir)) {\n\t\t\tmkdir($repodir,0770,true);\n\t\t}\n\t\tif (is_dir($repodir)) {\n\t\t\t\t$repo = new GitRepo($repodir, true, false);\n \tif (!($repo->is_repo_present())) {\n \t$repo->run('init');\n \t}\n\t\t\t\treturn $repo;\n\t\t}\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "b7f9cb55c8ff551b5265110d8d037548", "score": "0.5215528", "text": "protected function initializeAction() {\n\t\t$this->jobOfferRepository = t3lib_div::makeInstance('Tx_Jobsearch_Domain_Repository_JobOfferRepository');\n\t}", "title": "" }, { "docid": "613c6cc6aa34abeef02bfbb0f941a215", "score": "0.5211121", "text": "public function prepatch($servers,$packages,$environment,$user);", "title": "" }, { "docid": "8f96e173bea83330cec1f871b15e2240", "score": "0.520672", "text": "public function initialize()\n {\n $this->setSchema(\"repo_search\");\n }", "title": "" }, { "docid": "4d98cd4ae5200fd6c6f258e27a405aff", "score": "0.5205285", "text": "protected function initializeAction() {\r\n parent::initializeAction();\r\n \r\n $this->categoryRepository = t3lib_div::makeInstance('Tx_NasMarket_Domain_Repository_CategoryRepository');\r\n $this->adRepository = t3lib_div::makeInstance('Tx_NasMarket_Domain_Repository_AdRepository');\r\n\t\t$this->posterRepository = t3lib_div::makeInstance('Tx_NasMarket_Domain_Repository_PosterRepository');\r\n\t\t\r\n $this->basePath = realpath('.');\r\n\t\t//t3lib_div::devLog('settings', 'test' , 0, $this->settings);\r\n\t}", "title": "" }, { "docid": "4a9dcfa1317221dfbe028d17e0e60e0b", "score": "0.51928735", "text": "protected function initialise()\r\n\t{\r\n\t\t$this->entityManager = $this->getDoctrine()->getManager();\r\n\t\t$this->repository = $this->entityManager->getRepository('PlaygroundCookiejarBundle:Folder');\r\n\t\t$this->translator = $this->get('translator');\r\n\t}", "title": "" }, { "docid": "62287f987c7d7081dfea5b947650c54b", "score": "0.51837397", "text": "protected function initialise()\n\t{\n\t\t$this->entityManager = $this->getDoctrine()->getManager();\n\t\t$this->repository = $this->entityManager->getRepository('App:Folder');\n\t\t$this->translator = $this->get('translator');\n\t}", "title": "" }, { "docid": "84fdc3c20568269146884a21ca41910c", "score": "0.51824987", "text": "public function initializeAction() {\n\t\t$this->regionRepository = t3lib_div::makeInstance('Tx_ZefuegDealer_Domain_Repository_RegionRepository');\n\t\t$this->dealerRepository = t3lib_div::makeInstance('Tx_ZefuegDealer_Domain_Repository_DealerRepository');\n\t}", "title": "" }, { "docid": "0d87e61a804cce746ad3385a65ee5695", "score": "0.517597", "text": "public function run_install()\n\t{\n\t\t// ****************************************\n\t\t// DATABASE STUFF\n\t\t$this->db->query(\"\n\t\t\tCREATE TABLE `\".Kohana::config('database.default.table_prefix').\"custombaselayer` (\n\t\t\t\t`id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t`openlayers` varchar(50) DEFAULT NULL,\n\t\t\t\t`title` varchar(100) DEFAULT NULL,\n\t\t\t\t`description` text,\n\t\t\t\t`attribution` text,\n\t\t\t\t`url` varchar(255) DEFAULT NULL,\n\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n\t\t\");\n\n\t\t$this->db->query(\"\n\t\t\tINSERT INTO `\".Kohana::config('database.default.table_prefix').\"custombaselayer` (`id`, `openlayers`, `title`, `description`, `attribution`, `url`)\n\t\t\t\tVALUES (1, 'XYZ', 'Custom Baselayer', 'This is a baselayer custom configured by the Custom Baselayer plugin.', NULL, NULL);\n\t\t\");\n\t\t// ****************************************\n\t}", "title": "" }, { "docid": "7dc594acae24f3619ba180447f7e0c44", "score": "0.5173816", "text": "private function bootup()\n {\n $this->getInitFiles();\n }", "title": "" }, { "docid": "8d722cf19d9ba3ff42aa8c1fa31e3670", "score": "0.51590765", "text": "function setup() {\n\t\t$this->get_all_users();\n\t\t$this->get_my_managers();\n\t}", "title": "" }, { "docid": "f66c713c25787db985698a99f904ba47", "score": "0.51582783", "text": "public static function init()\n {\n\n // Security validation.\n // The current logged user id is equal to the Surveyor user id?\n if (Auth::id() != null && static::isActive()) {\n $repository = static::retrieve();\n if (data_get($repository, 'user.id') != Auth::id()) {\n static::flush();\n }\n }\n\n if (Auth::id() != null && ! static::isActive()) {\n $repository = [];\n $repository['scopes'] = [];\n $repository['policies'] = [];\n $repository['policy'] = [];\n\n data_set($repository, 'user.id', Auth::id());\n\n if (! is_null(me()->profiles)) {\n foreach (me()->profiles as $profile) {\n $repository['profiles'][$profile->code] = ['id' => $profile->id,\n 'code' => $profile->code,\n 'name' => $profile->name, ];\n\n foreach ($profile->scopes as $scope) {\n $repository['scopes'][$scope->model][] = $scope->scope;\n }\n\n foreach ($profile->policies as $policy) {\n $repository['policies'][$policy->model] = $policy->policy;\n\n $repository['policy'][$policy->policy] = [\n 'viewAny' => $policy->pivot->can_view_any,\n 'view' => $policy->pivot->can_view,\n 'create' => $policy->pivot->can_create,\n 'update' => $policy->pivot->can_update,\n 'delete' => $policy->pivot->can_delete,\n 'forceDelete' => $policy->pivot->can_force_delete,\n 'restore' => $policy->pivot->can_restore, ];\n }\n }\n }\n\n static::store($repository);\n }\n }", "title": "" }, { "docid": "e6c63190c60bd4e998060fae4ffbf3b4", "score": "0.5151281", "text": "public function run()\n {\n touch('database/database.sqlite');\n $repository = new Repository();\n $repository->createDatabase();\n $repository->fillDatabase();\n \n \n }", "title": "" }, { "docid": "e2fdb1e9318edbe825ab0e1a98330db5", "score": "0.5141304", "text": "public function __construct()\n {\n $this->clientSettingRepo = new ClientSettingRepository();\n $this->apprTypeRepository = new ApprTypeRepository();\n $this->loanTypesRepository = new LoanTypesRepository();\n $this->loanReasonRepository = new LoanReasonRepository();\n $this->propertyTypeRepository = new PropertyTypeRepository();\n $this->occupancyStatusRepository = new OccupancyStatusRepository();\n $this->statePricingVersionRepository = new StatePricingVersionRepository();\n $this->lenderRepository = new LenderRepository();\n $this->statusRepository = new StatusRepository();\n $this->apiUserRepository = new ApiUserRepository();\n $this->loanpurposeRepository = new LoanpurposeRepository();\n $this->clientLogRepository = new ClientLogRepository();\n $this->clientFileRepository = new ClientFileRepository();\n $this->clientHistoryRepository = new ClientHistoryRepository();\n $this->clientGroupNoteRepository = new ClientGroupNoteRepository();\n $this->userGroupLogRepository = new UserGroupLogRepository();\n\n }", "title": "" }, { "docid": "719c833d61349ed6adb225426fb15a20", "score": "0.5139035", "text": "function pushWithDB() {\n\t\trequire __DIR__ . '/../../script/push-with-db.php';\n\t}", "title": "" }, { "docid": "407abb9306be847f2763322ee7cda4a9", "score": "0.51365966", "text": "public function setup() {\n $Database = Gdn::database();\n $Config = Gdn::factory(Gdn::AliasConfig);\n $Drop = false;\n $Validation = new Gdn_Validation(); // This is going to be needed by structure.php to validate permission names\n include(PATH_APPLICATIONS.DS.'conversations'.DS.'settings'.DS.'structure.php');\n include(PATH_APPLICATIONS.DS.'conversations'.DS.'settings'.DS.'stub.php');\n }", "title": "" }, { "docid": "edd95b78ec83c217c66023f164ef49b7", "score": "0.513468", "text": "private function setup() {\n\t\t$this->data = new Data_Store();\n\n\t\tBootstrapper::boot();\n\t}", "title": "" }, { "docid": "e69fc192e09bf691b2b9b522298f5834", "score": "0.5134524", "text": "public function install() {\n\t\t\n\t\t$this->checkAddingSeo();\n\t}", "title": "" }, { "docid": "ad086703ee2065e3202309feaa84b5ae", "score": "0.513147", "text": "public function setUp() {\n\n\t\tif ( ! $this->gitParser )\n\t\t\t$this->gitParser = new Asset\\GitStdOutParser;\n\t\tif ( ! $this->directory_navigator )\n\t\t\t$this->directory_navigator = new Asset\\DirectoryNavigator;\n\n\t\t$tmpDir = $this->directory_navigator->getTmpDir();\n\t\t$this->organizer = new Asset\\RepositoryTestOrganizer( $tmpDir );\n\t\t$this->organizer->cleanUp();\n\t\t$this->repositories = $this->organizer->getRepositories();\n\t}", "title": "" }, { "docid": "b9673b5e1b425bd1eeb93111834acd29", "score": "0.5128665", "text": "public function initializeAction() {\n\t\t$this->albumRepository = t3lib_div::makeInstance('Tx_Yagal_Domain_Repository_AlbumRepository');\n\t\t$this->personRepository = t3lib_div::makeInstance('Tx_Yagal_Domain_Repository_PersonRepository');\n\t\t$this->cObj=t3lib_div::makeInstance('tslib_cObj');\n\n\t}", "title": "" }, { "docid": "f98996a7bc37c078f6c04c4c405bf08e", "score": "0.51256865", "text": "public function setup()\n {\n CRUD::setModel(\\App\\Models\\Pledge::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/pledge');\n CRUD::setEntityNameStrings('pledge', 'pledges');\n CRUD::enableExportButtons();\n\n if(backpack_user()->hasRole('member')){\n CRUD::addClause('whereUserId', backpack_user()->id);\n }\n }", "title": "" }, { "docid": "9fb47607fe8ed2afc1997d25b5addb4f", "score": "0.5109875", "text": "public function run()\n {\n factory(Repository::class, 10)\n ->create();\n }", "title": "" }, { "docid": "5ebe36bb30ac9aadd348146c88cdcd13", "score": "0.5109794", "text": "private function gitSetup()\n {\n $this->climate()->out(sprintf(\n 'Setting the git environment to push to %s...',\n $this->projectRepo()\n ));\n\n exec('rm -rf .git');\n // initialize git.\n exec('git init');\n // set the remote repo.\n exec(sprintf(\n 'git remote add origin %s',\n $this->projectRepo()\n ));\n\n exec('git branch --set-upstream-to origin/master');\n\n // verify the remote repo.\n exec('git remote -v 2>&1', $output);\n $this->climate()->dim()->out($output);\n }", "title": "" }, { "docid": "05bacc4f768cc860a3356c2644958304", "score": "0.51074964", "text": "public function setup()\n {\n $this->terminusLogin();\n $this->backupGet();\n $this->dbSeed();\n }", "title": "" }, { "docid": "18e397f4d58683391d6eda77c1efbed7", "score": "0.5098364", "text": "public function setup() {\n\t\t$archive_data = array(\n\t\t\t'name' => 'The Artwork Title',\n\t\t\t'controller' => 'works'\n\t\t);\n\t\t$archive = Archives::create();\n\t\t$archive->save($archive_data);\n\n\t\t$work = Works::create(array(\n\t\t\t'id' => $archive->id,\n\t\t\t'materials' => 'The Materials'\n\t\t));\n\n\t\t$success = $work->save();\n\n\t}", "title": "" }, { "docid": "367c6c172e8e2fd86350a13c2ebee36f", "score": "0.5090073", "text": "public function setUp()\n {\n parent::setUp();\n $this->geodataRepostitory = new GeodataRepository();\n }", "title": "" }, { "docid": "412a1e21a090da100f9fe9552bb98e41", "score": "0.5080377", "text": "public function install() {\n\t\t$this->maybe_update_db();\n\t}", "title": "" }, { "docid": "38a4b7ff1b40fc6de25199ae5a871a00", "score": "0.50738174", "text": "public function install() { }", "title": "" }, { "docid": "efba9e67558561bc9fbfc4938caf2e74", "score": "0.5046056", "text": "public function boot()\n {\n $addonArray = array('MYSQLS');\n //foreach ($this->container->getParameter('pwx_deploy_addons') as $addon)\n foreach ($addonArray as $addon)\n {\n if ( Runtime::hasCredentials($addon)) {\n if ( $credentials = Runtime::getCredentials($addon) )\n {\n $propelConfig = \\Propel::getConfiguration();\n\n $dsn = $propelConfig['datasources']['default']['connection']['dsn'];\n $patterns = array('/host=(.*);dbname/', '/;dbname=(.*);charset/');\n $replaces = array(\n 'host=' . $credentials['MYSQLS_HOSTNAME'] . ';dbname',\n ';dbname=' . $credentials['MYSQLS_DATABASE'] . ';charset');\n $newDsn = preg_replace($patterns, $replaces, $dsn);\n // \"mysql:host=localhost;dbname=projectx;charset=UTF8\"\n\n $propelConfig['datasources']['default']['connection']['user'] = $credentials['MYSQLS_USERNAME'];\n $propelConfig['datasources']['default']['connection']['password'] = $credentials['MYSQLS_PASSWORD'];\n $propelConfig['datasources']['default']['connection']['dsn'] = $newDsn;\n\n \\Propel::setConfiguration($propelConfig);\n }\n }\n }\n }", "title": "" }, { "docid": "6e60118076cdcfb31badead014af6179", "score": "0.5032908", "text": "private function initializeTestBed() {\n $this->projectToRequestBidsFromCloudwords = $this->createProjectToRequestBidsFromCloudwords();\n $this->projectToRequestBidsFromPreferredVendors = $this->createProjectToRequestBidsFromPreferredVendors();\n $this->projectToRequestBidsFromPreferredVendorsWithAutoSelection = $this->createProjectToRequestBidsFromPreferredVendorsWithAutoSelection();\n }", "title": "" }, { "docid": "3bcc62922a3d092445b0fadf755bcc3c", "score": "0.5025979", "text": "public function initialize() {\n\t\t$this->tasksPath = APP . 'vendors' . DS . 'shells' . DS .'tasks' . DS;\n\t\t$this->Folder = new Folder();\n\t\t$this->Folder->cd($this->tasksPath);\n\t\tforeach ($this->Folder->find() as $task) {\n\t\t\tif ($task == 'deploy_logic.php') {\n\t\t\t\t$this->tasks[] = Inflector::camelize(str_replace(\".php\", \"\", $task));\n\t\t\t}\n\t\t}\n\t\tparent::initialize();\n\t\t$this->parameters();\n\t}", "title": "" }, { "docid": "52e1d95583a48533916894505be5ff5b", "score": "0.5024448", "text": "public function createRepository(): void;", "title": "" }, { "docid": "e4741710d31325c1f37e2f2a48eb68cb", "score": "0.5021666", "text": "function execute() {\n\t\tif ( file_exists( $this->buildDir ) ) {\n\t\t\t$this->runCmd( 'rm', '-rf', '--', $this->buildDir );\n\t\t}\n\t\tif ( !mkdir( $this->buildDir ) ) {\n\t\t\t$this->croak( \"Unable to create build directory {$this->buildDir}\" );\n\t\t}\n\t\t$this->chdir( $this->buildDir );\n\n\t\t# Check out the parent directory of the target branch\n\t\t$this->runCmd( 'svn', 'co', '--depth=empty', '--quiet', $this->destBaseUrl, 'wmf' );\n\n\t\t$this->chdir( 'wmf' );\n\n\n\t\t# Copy in phase3\n\t\t$destRel = $this->newVersion;\n\t\t$this->runCmd( 'svn', 'cp', '--quiet', \"{$this->mainSourceUrl}/phase3\", $destRel );\n\n\n\t\t# Delete extensions/README\n\t\t$this->runCmd( 'svn', 'rm', '--quiet', \"$destRel/extensions/README\" );\n\n\t\t# Add normal extensions\n\t\tforeach ( $this->normalExtensions as $name ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--ignore-externals', '--quiet',\n\t\t\t\t\"{$this->mainSourceUrl}/extensions/$name\",\n\t\t\t\t\"$destRel/extensions/$name\" );\n\t\t}\n\n\t\t# Add special extensions\n\t\tforeach ( $this->specialExtensions as $name => $sourceUrl ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--ignore-externals', '--quiet',\n\t\t\t\t$sourceUrl,\n\t\t\t\t\"$destRel/extensions/$name\" );\n\t\t}\n\n\t\t# Copy in preserved items\n\t\tforeach ( $this->preservedItems as $item ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--quiet',\n\t\t\t\t\"{$this->destBaseUrl}/{$this->oldVersion}/$item\",\n\t\t\t\tdirname( \"$destRel/$item\" ) );\n\t\t}\n\n\t\t# Do intermediate commit\n\t\t$this->runWriteCmd( 'svn', 'ci', '-q', '-m', \"Creating new WMF branch\" );\n\n\t\t# Fix $wgVersion\n\t\t$this->fixVersion( \"$destRel/includes/DefaultSettings.php\" );\n\n\t\t# Apply patches\n\t\tforeach ( $this->patches as $patch ) {\n\t\t\t$this->runCmd( 'svn', 'merge', '-q', '-c', $patch['rev'], $patch['base'], $destRel );\n\t\t}\n\n\t\t# Remove unwanted externals\n\t\tforeach ( $this->unwantedExternals as $external ) {\n\t\t\t$this->runCmd( 'svn', 'propdel', '-q', 'svn:externals', \"$destRel/$external\" );\n\t\t}\n\n\t\t# Do the final commit\n\t\t$this->runWriteCmd( 'svn', 'ci', '-q', '-m', \n\t\t\t'Applied local patches for new WMF branch' );\n\t}", "title": "" }, { "docid": "33cb88a0ce7647d71f0d637d7037b121", "score": "0.50172555", "text": "public function run()\n {\n factory(App\\ApplicationCriterion::class, 100)->create();\n }", "title": "" }, { "docid": "28ff80f18b70a8b1d1770cc802a3d7f5", "score": "0.5015782", "text": "public function setup() {\n\t\tif ( ! Jetpack::is_active() || ! Jetpack_Plan::supports( 'search' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->jetpack_blog_id = Jetpack::get_option( 'id' );\n\n\t\tif ( ! $this->jetpack_blog_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\trequire_once dirname( __FILE__ ) . '/class.jetpack-search-helpers.php';\n\t\trequire_once dirname( __FILE__ ) . '/class.jetpack-search-template-tags.php';\n\t\trequire_once JETPACK__PLUGIN_DIR . 'modules/widgets/search.php';\n\n\t\t$this->init_hooks();\n\t}", "title": "" }, { "docid": "5398c7fd77448d9f90cd7e82231ed4e2", "score": "0.50126386", "text": "public function setUp()\n {\n $this->database = TestDatabase::initialize();\n TestSchema::initialize($this->database);\n $this->data = TestData::seedTestModels($this->database);\n TestData::seedRelatedModels($this->database);\n\n $this->repository = new RepositoryStub(new TestModel);\n }", "title": "" }, { "docid": "ba4487e37bc76a349c7d292fbf3609f9", "score": "0.5012355", "text": "public function prepare() {\n\n\t\t// bootstrapping\n\t\t$this->bootstrap();\n\n\t\t// getting the configuration\n\t\t$this->getConfiguration();\n\n\t\t// merge local configuration over existing\n\t\t$this->conf = t3lib_div::array_merge_recursive_overrule($this->conf, $this->localConfiguration);\n\n\t\t// getting the parameters\n\t\t$this->getParameters();\n\n\t\t// getting the plugin mode\n\t\t$this->getPluginMode();\n\n\t\t// initializing\n\t\t$this->init();\n\n\t}", "title": "" }, { "docid": "9fad67b855bfa017cf81b13216cce1a1", "score": "0.5008662", "text": "public function _install() {}", "title": "" }, { "docid": "8ce9256f9504d62f23ef61c106b947f2", "score": "0.5003484", "text": "protected function bootRepository()\n {\n return $this->bootRepositoryWith(null);\n }", "title": "" }, { "docid": "70b1021e83be1f00a237bbcaded480fb", "score": "0.50031096", "text": "abstract public function boot();", "title": "" }, { "docid": "70b1021e83be1f00a237bbcaded480fb", "score": "0.50031096", "text": "abstract public function boot();", "title": "" }, { "docid": "0fa623f3af0f2d48c8baf7f1ad9c179c", "score": "0.500225", "text": "public function setup()\n {\n // If it is installed system-wide then this isn't necessary to\n // enable Zend Search\n set_include_path(sfConfig::get('sf_lib_dir') . '/vendor' . PATH_SEPARATOR . get_include_path());\n // for compatibility / remove and enable only the plugins you want\n\n $this->enablePlugins('sfDoctrinePlugin');\n $this->enablePlugins('sfJqueryReloadedPlugin');\n $this->enablePlugins('sfDoctrineGuardPlugin');\n $this->enablePlugins('sfDoctrineActAsTaggablePlugin');\n $this->enablePlugins('sfWebBrowserPlugin');\n $this->enablePlugins('sfFeed2Plugin');\n $this->enablePlugins('sfSyncContentPlugin');\n $this->enablePlugins('jmsPaymentPlugin');\n $this->enablePlugins('timpanyPlugin');\n $this->enablePlugins('sfTaskExtraPlugin');\n }", "title": "" }, { "docid": "1d9accc00ad9938af977846219348fb1", "score": "0.50003076", "text": "private function init_configs()\n {\n\n $this->stub_dir = $this->getBaseStubDir().'/packageStubs/';\n $this->des_dir = app_path();\n\n $this->command_param = $this->argument(\"command_param\");\n// dd($this->command_param);\n if (!$this->command_param) {\n throw new \\Exception(\"command_param 必填\");\n }\n $this->git_hub_dir = storage_path('git/'.snake_case($this->command_param).'/');\n if (file_exists($this->git_hub_dir . 'composer.json')) {\n $this->error($this->command_param.'已存在');\n die;\n }\n\n }", "title": "" }, { "docid": "3a2470d2c7ef0ba437d6355878031e4b", "score": "0.4993645", "text": "public function run()\n {\n $packages = \\App\\Package::all();\n foreach($packages as $p) {\n $confExists = ArchiveHomeConf::where('siteId', $p->siteId)\n ->where('tableIdentifier', $p->tableIdentifier)\n ->count();\n\n if (! $confExists) {\n ArchiveHomeConf::create([\n 'siteId' => $p->siteId,\n 'tableIdentifier' => $p->tableIdentifier,\n 'eventsNumber' => 100,\n 'dateStart' => '2017-01-01',\n ]);\n }\n }\n }", "title": "" }, { "docid": "60fadc950b8352a11151ac87aa774f16", "score": "0.49933648", "text": "public function setup(Repository $repository, WebHook $webHook);", "title": "" }, { "docid": "3fc4682b79e12c0159fb64cd426dac3e", "score": "0.49862158", "text": "public function run()\n {\n $this->addDependentReleases();\n }", "title": "" }, { "docid": "debe2c3e6be67b07fd3ac9ba66776ef7", "score": "0.49822024", "text": "protected function set_up() {}", "title": "" }, { "docid": "1bef8a521eb4ed58b0b35322b44d7222", "score": "0.49801219", "text": "public function setup()\n {\n Log::useFiles('php://stderr');\n Log::info(\"TeamConfig running\");\n\n DB::table('team_config')->delete();\n\n $i = 0;\n\n //======================================================================\n // FIXTURES - CREATING DB ENTRIES\n //======================================================================\n foreach ($this->teams as $team) {\n if ($i >= 1000000) {\n continue;\n }\n\n \\App\\Models\\TeamConfig::create([\n 'title' => $team['title'],\n 'title_normalised' => self::normaliseTitle($team['title']),\n 'background_color' => $team['background_color'],\n 'text_color' => $team['text_color'],\n 'image' => $team['image']\n ]);\n\n }\n\n //$this->logRecordsAddedCount();\n }", "title": "" }, { "docid": "641653f7206a064064ecf9ae9931897d", "score": "0.49777764", "text": "private function install(): void\n {\n $this->getIO()->write(' - Install hooks: ', false);\n $runner = new Captain($this->executable, $this->configuration, $this->gitDirectory);\n $runner->execute(Captain::COMMAND_INSTALL, $this->getIO());\n $this->getIO()->write(('<comment> done</comment>'));\n }", "title": "" }, { "docid": "e75f70277a44342ff7ab532e4419a862", "score": "0.49772936", "text": "public function run()\n {\n //\n branch::insert($this->branches);\n }", "title": "" }, { "docid": "61ecc8d675e8d2d1d9ae5e94acb349ad", "score": "0.49740174", "text": "public function initializeAction() {\t\t\n\t\t$this->labelRepository = t3lib_div::makeInstance('Tx_L10nServer_Domain_Repository_LabelRepository');\n\n\t\t$this->suggestionRepository = t3lib_div::makeInstance('Tx_L10nServer_Domain_Repository_SuggestionRepository');\n\t\t$this->translatorRepository = t3lib_div::makeInstance('Tx_L10nServer_Domain_Repository_TranslatorRepository');\n \n $this->setVars();\n\t}", "title": "" }, { "docid": "515a865327902f04d5d65d3cd92b92e0", "score": "0.4969612", "text": "public function setUp(){\n static::bootKernel();\n $this->lavoisierUrl = static::$kernel->getContainer()->getParameter('lavoisierUrl');\n\n $this->datasource = Populate::datasource();\n $this->broadcastMailingLists = Populate::createBroadcastMailingLists();\n $this->broadcastMessage = Populate::createBroadcastMessage();\n $this->mailMessage = Populate::createMailMessage();\n }", "title": "" }, { "docid": "2b95c8973d7c31d124c523f8ae0708d3", "score": "0.49687633", "text": "private function installer(){\n if(!$this->getModuleName() != \"hook_it\"){\n return;\n }\n db_update('system')\n ->fields(array('weight' => -10000, 'bootstrap' => 1))\n ->condition('name', $this->getModuleName(), '=')\n ->execute();\n }", "title": "" }, { "docid": "b577f506de80a4deac16eeb218487efc", "score": "0.49638298", "text": "public function initialise()\n {\n $this->ctsDB = config('services.cts.database');\n $this->communityDB = config('services.community.database');\n\n // set the cutoff date\n $this->atcCutoffDate = Carbon::now()->subMonths(6);\n $this->pilotCutoffDate = Carbon::now()->subYears(5);\n\n // intialise scripts for interfacing with the forums\n require_once config('services.community.init_file');\n require_once \\IPS\\ROOT_PATH.'/system/Member/Member.php';\n require_once \\IPS\\ROOT_PATH.'/system/Db/Db.php';\n\n // get the relevant DB IDs\n foreach (DB::table(config('services.cts.database').'.rts')->get(['id', 'name']) as $rts) {\n $this->rtsIDs[snake_case($rts->name)] = $rts->id;\n }\n $this->memberForumIDs = DB::table(\"{$this->communityDB}.ibf_core_members\")\n ->join(\"{$this->communityDB}.ibf_core_login_links\", 'ibf_core_members.member_id', '=', 'ibf_core_login_links.token_member')\n ->pluck('member_id', 'token_identifier');\n $this->forumGroupIDs = DB::table(\"{$this->communityDB}.ibf_core_groups AS g\")\n ->join(\"{$this->communityDB}.ibf_core_sys_lang_words AS w\", DB::raw('CONCAT(\"core_group_\", g.g_id)'), '=', 'w.word_key')\n ->pluck('word_default', 'g_id');\n $this->pilotGroupID = array_search('Pilot Mentors', $this->forumGroupIDs);\n $this->atcGroupID = array_search('ATC Mentors', $this->forumGroupIDs);\n\n $this->log('Command initialised.');\n }", "title": "" }, { "docid": "6b15fb6174762162fe4245fc7c0c9d92", "score": "0.49550906", "text": "public function setup() {\r\n // Init some config settings.\r\n if (!c('Find.MinWordLength')) {\r\n saveToConfig('Find.MinWordLength', 4);\r\n }\r\n if (!c('Find.CompleteWords')) {\r\n saveToConfig('Find.CompleteWords', true);\r\n }\r\n // set up tables\r\n $this->structure();\r\n }", "title": "" }, { "docid": "ed10a11c8d247792cf7ece20e9736188", "score": "0.49514169", "text": "protected function initializeAction() {\n $this->articleRepository = t3lib_div::makeInstance('Tx_Library_Domain_Repository_ArticleRepository');\n }", "title": "" }, { "docid": "fbd1049925310720273dc6a6c673ea41", "score": "0.49488312", "text": "public function setUp(): void\n {\n $this->initGitCommandsLocal();\n $this->gitCommands->command('init')->initRepository();\n $this->addFile('test');\n $this->gitCommands->command('commit')->stageAll();\n $this->gitCommands->command('commit')->commit('first commit', 'Paul Schweppe <[email protected]>');\n $this->addFile('test2');\n $this->gitCommands->command('commit')->stageAll();\n $this->gitCommands->command('commit')->commit('Second commit', 'Paul Schweppe <[email protected]>');\n }", "title": "" }, { "docid": "72135adfd7a6081032e8e9c7c0117194", "score": "0.49477544", "text": "public static function bootArchivable()\n {\n static::addGlobalScope(new ArchivableScope);\n }", "title": "" }, { "docid": "717c1ff14e779916c054b75816e479bd", "score": "0.494697", "text": "protected function _before()\n {\n $this->packageConfigurationBuilder = new PackageConfigurationBuilder();\n }", "title": "" }, { "docid": "4feadd3136fe40770a2cc899f86b9b78", "score": "0.4944749", "text": "public function initializeAction() {\n\t\tparent::initializeAction();\n\t\t$this->questionRepository = t3lib_div::makeInstance('Tx_Questionrating_Domain_Repository_QuestionRepository');\n\t\t$this->ratingRepository = t3lib_div::makeInstance('Tx_Questionrating_Domain_Repository_RatingRepository');\n\t}", "title": "" }, { "docid": "78095b7651979c9df049df7d46621941", "score": "0.49435428", "text": "function setup()\n {\n $this->src('Corp')\n ->query(\"SELECT\n\torder_id AS 'Order ID',\n\tb.`name` AS Merchant,\n\tc.nickname AS 'Nick Name',\n\tc.email1 AS Email,\n\to.cc_last_4_digits AS 'Last 4 Digits',\n\to.subtotal AS 'Sub Total',\n\to.reject_reason AS 'Reject Reason',\n\to.payment_processor_message AS 'Payment Error',\n\tc.sms_no AS 'Phone'\nFROM\n\t`order` o\n\tLEFT JOIN business_customers b ON b.businessID = o.business_id\n\tLEFT JOIN consumer_profile c ON c.uid = o.consumer_id\nWHERE\n\to.STATUS = :status\n\tAND FIND_IN_SET(o.business_id,(SELECT merchant_ids FROM `corp` WHERE corp_name = 'TapForAll'))\n and ( (CAST(o.date AS DATE)) <= :endDate and (CAST(o.date AS DATE)) >= :startDate )\n\tORDER BY\n\to.date DESC;\n\t\")\n ->params(array(\n \":status\"=>$this->params[\"status\"],\n \":startDate\"=>$this->params[\"dateRange\"][0],\n \":endDate\"=>$this->params[\"dateRange\"][1]\n ))\n ->pipe($this->dataStore(\"corp_orders\"));\n }", "title": "" }, { "docid": "d83ede7252b92f372ea3971d8893ab07", "score": "0.49424228", "text": "public function run()\n {\n $items = $this->repository->findWhere([\n 'author' => '[email protected]',\n ])->keyBy('name')->toArray();\n\n $this->createSourceEngineNest(array_get($items, 'Source Engine'));\n $this->createVoiceServersNest(array_get($items, 'Voice Servers'));\n $this->createRustNest(array_get($items, 'Rust'));\n $this->createAmongUsNest(array_get($items, 'Among Us'));\n $this->createBeamMPNest(array_get($items, 'BeamMP'));\n $this->createBeamNGNest(array_get($items, 'BeamNG'));\n $this->createBotsNest(array_get($items, 'Bots'));\n $this->createCallofDutyNest(array_get($items, 'Call of Duty'));\n $this->createCryoFallNest(array_get($items, 'CryoFall'));\n $this->createDatabaseNest(array_get($items, 'Database'));\n $this->createETLegacyNest(array_get($items, 'Enemy Territory'));\n $this->createFactorioNest(array_get($items, 'Factorio'));\n $this->createFasterThanLightNest(array_get($items, 'Faster Than Light'));\n $this->createGrandTheftAutoNest(array_get($items, 'Grand Theft Auto'));\n $this->createLeagueSandboxNest(array_get($items, 'League Sandbox'));\n $this->createMindustryNest(array_get($items, 'Mindustry'));\n $this->createMinetestNest(array_get($items, 'Minetest'));\n $this->createOpenarenaNest(array_get($items, 'Openarena'));\n $this->createOpenRANest(array_get($items, 'OpenRA'));\n $this->createRedDeadRedemptionNest(array_get($items, 'Red Dead Redemption'));\n $this->createSoftwareNest(array_get($items, 'Software'));\n $this->createStarMadeNest(array_get($items, 'StarMade'));\n $this->createStorageNest(array_get($items, 'Storage'));\n $this->createTeeworldsNest(array_get($items, 'Teeworlds'));\n $this->createTerrariaNest(array_get($items, 'Terraria'));\n $this->createTycoonGamesNest(array_get($items, 'Tycoon Games'));\n $this->createUnrealEngineNest(array_get($items, 'Unreal Engine'));\n $this->createVelorenNest(array_get($items, 'Veloren'));\n $this->createVintageStoryNest(array_get($items, 'Vintage Story'));\n $this->createXonoticNest(array_get($items, 'Xonotic'));\n }", "title": "" }, { "docid": "dda87d35d87b43b523ad112729925ae2", "score": "0.4942236", "text": "public function init() {\n $this->register_git_section();\n\t}", "title": "" }, { "docid": "1befa039d6dabfc83a1706c66d480908", "score": "0.49404758", "text": "public function run()\n {\n $providers = [\n \\App\\Http\\Controllers\\Auth\\OauthController::GITHUB => [\n 'name' => 'GitHub',\n 'url' => 'github.com',\n 'git_url' => '[email protected]',\n 'commit_url' => 'commit',\n 'repository_class' => \\App\\Services\\Repository\\Providers\\GitHub::class,\n ],\n ];\n\n foreach ($providers as $provider => $data) {\n $providerModel = \\App\\Models\\RepositoryProvider::firstOrNew([\n 'repository_class' => $data['repository_class'],\n ]);\n\n $providerModel->fill([\n 'provider_name' => $provider,\n 'name' => $data['name'],\n 'url' => $data['url'],\n 'git_url' => $data['git_url'],\n 'commit_url' => $data['commit_url'],\n ]);\n\n $providerModel->save();\n }\n }", "title": "" }, { "docid": "5cd18ee30297243de1e93a3d706bab48", "score": "0.4930111", "text": "public function setup()\n\t{\n\t\tself::$redis->flushdb();\n\t}", "title": "" }, { "docid": "53910aacf733618e1e3fc331e1ba035c", "score": "0.49294934", "text": "public function bootstrap() {\n // create tests directory (if not exists) or abort\n $this->createTestsDirOrAbort();\n\n // install necessary modules\n $this->installModules();\n\n // add codeception test scaffolding\n $this->createScaffolding();\n\n // create configs\n $this->createConfigFiles();\n\n // setup selenoid if applicable\n $this->setupSelenoid();\n\n // generate helpers if necessary\n $this->generateHelpers();\n\n // generate sample tests if necessary\n $this->generateSampleTests();\n\n $this->logHeader('Building Codeception modules');\n $this->client->codeceptFromHost('build');\n\n print \"\\n\";\n Logger::info('Done.');\n Logger::info('-------------------------------------------------------------------');\n Logger::info('Run ' . Logger::green('aivec-codecept up') . ' to create and/or start the Docker containers.');\n }", "title": "" }, { "docid": "702c8ce12ae4756981ce2cb8161be660", "score": "0.49278957", "text": "function HTX_initial_setup() {\r\n create_db();\r\n }", "title": "" }, { "docid": "37c4ea412caa801d81991f713d417ace", "score": "0.49248716", "text": "function init() {\n\t\t$this->models_dir = ZOOP_DIR . \"/formz/tests/Doctrine_Records/\";\n\t\t$this->db_file = ZOOP_DIR . \"/formz/tests/formz.sqlite\";\n\t\t$this->dsn = 'sqlite:' . $this->db_file;\n\n\t\t// set up the db (dump it and start over)\n\t\tif (is_file($this->dsn)) unlink($this->db_file);\n\t\t$this->db = new SQLiteDatabase($this->db_file);\n\t\t\n\t\t// set up doctrine\n\t\tDoctrine_Manager::connection($this->dsn);\n \t\tDoctrine::loadModels($this->models_dir);\n\t\tDoctrine::createTablesFromModels();\n\t}", "title": "" }, { "docid": "1395015b09efe7beccde718b4d62f17a", "score": "0.4920505", "text": "abstract function install();", "title": "" } ]
7165007e7c962aaff3de7498a0f643d2
Array of attributes to getter functions (for serialization of requests)
[ { "docid": "493b38b40d53841a1300d3df811c097d", "score": "0.0", "text": "public static function getters()\n {\n return self::$getters;\n }", "title": "" } ]
[ { "docid": "35ddc04fc08bf693ea79a2113e96f9d8", "score": "0.7071254", "text": "public function getAttributes(): array\n {\n // Get all attributes using all the getters.\n $attributes = [];\n foreach(\\array_keys(\\get_object_vars($this)) as $attribute) {\n\n // Construct the getter name.\n $getter = \\lcfirst(\\str_replace('_', '', \\ucwords($attribute, '_')));\n\n // Get the attribute's value from the getter.\n $attributes[$attribute] = $this->{$getter}();\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "36b8bae9eda9e8ad3905899e294de9a8", "score": "0.6628055", "text": "abstract protected function getDirectGetters();", "title": "" }, { "docid": "f19fe6f38a11b308c592a23ab66fcd70", "score": "0.6581621", "text": "public function toArray() {\n $attrs = $this->_private_attributes;\n $result = array();\n foreach ($attrs as $key => $attr) {\n if (method_exists($this, \"get\" . underscore_to_camel_case($key, true))) {\n eval('$result[\"' . $key . '\"] = $this->get' . underscore_to_camel_case($key, true) . '();');\n } else {\n $result[$key] = $attr;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "0e63888696ffdafbfcbbe6dd71bbd85f", "score": "0.6499994", "text": "abstract function attributes(): array;", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a297ef0115d62dd4383028a66380dc7d", "score": "0.64415324", "text": "public static function getters()\n {\n return [\n 'recipients' => 'getRecipients',\n 'result_action' => 'getResultAction',\n 'parameters' => 'getParameters',\n 'schedule' => 'getSchedule',\n 'generation_date' => 'getGenerationDate'\n ];\n }", "title": "" }, { "docid": "d79bb1c2a8f54fe1314592d10c4a2756", "score": "0.63861316", "text": "public static function getters()\n {\n return [\n 'mode' => 'getMode',\n 'currency' => 'getCurrency',\n 'version' => 'getVersion'\n ];\n }", "title": "" }, { "docid": "7d5dfcb976a5042b4ebf7f0c8a7431b7", "score": "0.63637143", "text": "public static function getters()\n {\n return [\n 'status' => 'getStatus',\n 'quota' => 'getQuota'\n ];\n }", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "77277b11efb5a13292c0bf52648961b1", "score": "0.6277958", "text": "protected function getArrayableAttributes()\n {\n }", "title": "" }, { "docid": "d63d1d0016bdd3bb4a10e8cb754d222b", "score": "0.62675774", "text": "public function getAttributes() {}", "title": "" }, { "docid": "d63d1d0016bdd3bb4a10e8cb754d222b", "score": "0.6267457", "text": "public function getAttributes() {}", "title": "" }, { "docid": "d63d1d0016bdd3bb4a10e8cb754d222b", "score": "0.6267457", "text": "public function getAttributes() {}", "title": "" }, { "docid": "beaafc1738658df8e504ee7581e7c3d8", "score": "0.6241648", "text": "public function getAttributes()\n {\n }", "title": "" }, { "docid": "beaafc1738658df8e504ee7581e7c3d8", "score": "0.6241648", "text": "public function getAttributes()\n {\n }", "title": "" }, { "docid": "48bd02bb93edc402c83c76033f39ba47", "score": "0.62360954", "text": "function getAttributes()\n {\n }", "title": "" }, { "docid": "05adacb9dedee38dfbc31c450dc2a2e0", "score": "0.623109", "text": "public function getCustomAttributes(): array;", "title": "" }, { "docid": "a96500d742548e718bbf5048b2320157", "score": "0.6217279", "text": "protected function getAttributeSavedMethods()\n {\n $attributes = [];\n foreach($this->getDirty() as $attribute => $value) {\n if($this->hasAttributeSavedMethod($attribute)) {\n $attributes[] = $attribute;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "c045e6c3c95db3d54ce7d85967a841a2", "score": "0.60957927", "text": "public function getGetters() {\n $sRet = \"// GET Functions\\n\";\n\n // Create the primary key function.\n $sRet .= \"public function get$this->primarykey() {\\n\";\n $sRet .= \"return(\\$this->$this->primarykey);\\n}\\n\\n\";\n\n // Loop through variables to create the functions.\n foreach($this->variables as $variable) {\n // Loop through variables and declare them.\n if($variable != $this->primarykey) {\n // Variable is not primary key, so we'll add it.\n $sRet .= \"public function get$variable() {\\n\";\n $sRet .= \"return(\\$this->$variable);\\n}\\n\\n\";\n }\n }\n\n return($sRet);\n }", "title": "" }, { "docid": "826eb5caba45c516aed0f106052b289b", "score": "0.60859674", "text": "public function getCustomAttributes()\n {\n }", "title": "" }, { "docid": "385421ada22305acd97dcab5a598eb37", "score": "0.60735816", "text": "public function attributesToArray()\n {\n $this->hiddenFunctions = array_merge((($this->hiddenFunctions)?:[]),$this->defaultHiddens());\n if(php_sapi_name() == \"cli\")\n return parent::attributesToArray();\n $callback = debug_backtrace()[2]['function'];\n $attributes = parent::attributesToArray();\n foreach ($this->encryptable as $key) {\n if (isset($attributes[$key])&&!in_array($callback,$this->hiddenFunctions)) {\n $attributes[$key] = Crypt::encrypt($attributes[$key]);\n }\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "6fb539fad2f427f4b6fa36442dee2830", "score": "0.6038225", "text": "public function toArray()\n {\n // If we're hiding attributes, then return those not hidden\n $array = $this->shouldHide && is_array($this->hidden)\n ? $this->except($this->hidden)\n : $this->attributes ?? [];\n\n // Use the getter, if its set, for each attribute\n foreach ($array as $key => $value) {\n $array[$key] = method_exists($this, $method = 'get' . ucfirst($key) . 'Attribute')\n ? $this->{$method}()\n : $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "c39e19ef622314c8fabde2a85986f13c", "score": "0.6026315", "text": "public function getCustomAttributes() {}", "title": "" }, { "docid": "cf8e952e8643efa03f8adc564e52bc79", "score": "0.5957014", "text": "public static function attributes() {\n\t\treturn [\n\t\t\t'id' => 'id',\n\t\t\t'name' => 'name',\n\t\t];\n\t}", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "0d887c3f8650aad02505178443808cfd", "score": "0.59468174", "text": "public static function getters()\n {\n return [\n 'new_email' => 'getNewEmail'\n ];\n }", "title": "" }, { "docid": "90e0f3dbb56829f4d72aff3ec7ecde22", "score": "0.59332705", "text": "public function attributes();", "title": "" }, { "docid": "90e0f3dbb56829f4d72aff3ec7ecde22", "score": "0.59332705", "text": "public function attributes();", "title": "" }, { "docid": "978f2c350f7886fc5c0ecb557da4d292", "score": "0.5921448", "text": "public function get_attributes()\n {\n }", "title": "" }, { "docid": "978f2c350f7886fc5c0ecb557da4d292", "score": "0.5921448", "text": "public function get_attributes()\n {\n }", "title": "" }, { "docid": "07bc915ff3385d176b3c0e8d00ff84cb", "score": "0.5910818", "text": "protected function attributes(){\n\t $attributes = array();\n\t foreach(self::$champs as $field){\n\t if(property_exists($this, $field)){\n\t\t $attributes[$field] = $this->$field; \n\t\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "7ba4dfb3a2626c2913f91e98fac47771", "score": "0.58889675", "text": "protected function getAttributes()\n {\n return [];\n }", "title": "" }, { "docid": "80a87cbff99f694c37a53829b3210003", "score": "0.5883578", "text": "protected function attributes() {\r // return an array of attribute names and their values\r $attributes = array();\r foreach (self::$db_fields as $field) {\r if (property_exists($this, $field)) {\r $attributes[$field] = $this->$field;\r }\r }\r return $attributes;\r }", "title": "" }, { "docid": "a5b10f131f323bc949a2a6e41a706568", "score": "0.5883016", "text": "public function getRestHookableAttributes(): array\n {\n return [];\n }", "title": "" }, { "docid": "10adcdba64a9afbcf47606a80fbd57a4", "score": "0.5868465", "text": "function getAttributes()\n {\n $request_uri = $this->getRequestUri();\n $node = $this->getNode();\n $href = $this->getHref();\n $base = $this->getBase();\n $path = $this->getPath();\n $next = $this->getNext();\n $ret = compact('request_uri', 'node', 'href', 'base', 'path', 'next');\n return new ArrayObject($ret, ArrayObject::ARRAY_AS_PROPS);\n }", "title": "" }, { "docid": "7fe3784968c6f897ad70a4f1b2cd901e", "score": "0.58548725", "text": "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "title": "" }, { "docid": "15bceeaff5626e0f0e7cd9edbed2db96", "score": "0.58518827", "text": "public function getMutatedAttributes()\n {\n }", "title": "" }, { "docid": "4b5ad4a40d5c5c26ffd4af726714c503", "score": "0.5830045", "text": "protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }", "title": "" }, { "docid": "492fddfea51865eac85943608670b6cb", "score": "0.5811857", "text": "public function getAttributes()\n {\n return array_merge(\n $this->attributes,\n [\n 'args' => $this->args(),\n 'type' => $this->type(),\n 'resolve' => $this->getResolver(),\n ]\n );\n }", "title": "" }, { "docid": "396d5f0abb1dda7c9572dc5e40be2cf5", "score": "0.57995033", "text": "protected function attributes() {\r\n\t $attributes = array();\r\n\t foreach(static::$db_fields as $field) {\r\n\t if(property_exists($this, $field)) {\r\n\t $attributes[$field] = $this->$field;\r\n\t }\r\n\t }\r\n\t return $attributes;\r\n\t}", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "6d674ecc604695c75dbea290fa69e7ec", "score": "0.57967484", "text": "public static function getters(): array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "41b6f958fce2ea645a5ae48032f269cd", "score": "0.57855636", "text": "public function __get($attribute) {}", "title": "" }, { "docid": "a929972e285fd7a732115bb5e55a4baa", "score": "0.57823", "text": "public function __get($method)\n\t{\n\t\treturn array($this, $method);\t\t\n\t}", "title": "" }, { "docid": "0401b68f9b0bc01bb002fa70bb122c76", "score": "0.57805383", "text": "public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}", "title": "" }, { "docid": "cb700834034789f94c387aebbc3e8abe", "score": "0.57784396", "text": "public function getAttributes(): Attributes\n {\n }", "title": "" }, { "docid": "a4eb8895df0465ad80084a1a7fbc1f56", "score": "0.5777502", "text": "protected function attributes() {\n\n $attributes = array();\n foreach(self::$db_fields as $field) {\n $attributes[$field] = $this->$field;\n }\n return $attributes;\n }", "title": "" }, { "docid": "15360c3883d7e35e03f1021bb1916f2a", "score": "0.57761973", "text": "function GetAttributes();", "title": "" }, { "docid": "f9eddc50fbe75fc88cb4c4ac79616651", "score": "0.57673955", "text": "public function attributesToArray()\n {\n }", "title": "" }, { "docid": "10500ff9ead0a362f11926442e925025", "score": "0.5760105", "text": "protected function attributes() {\n $attributes = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "9cf0f5f99773a4bb82c5833fe405fa1b", "score": "0.57480764", "text": "public static function attributeMap()\n {\n return [\n 'recipients' => 'recipients',\n 'result_action' => 'result_action',\n 'parameters' => 'parameters',\n 'schedule' => 'schedule',\n 'generation_date' => 'generation_date'\n ];\n }", "title": "" }, { "docid": "8a1d6935dd56eecbd9435803485ccba6", "score": "0.5743079", "text": "abstract protected function setRequiredGetters();", "title": "" }, { "docid": "8aad4fbae24abe007ad1b252aa19adcb", "score": "0.5735495", "text": "private function getApiAttributeNamesArray()\n {\n $array = [\n 'firstname',\n 'lastname',\n 'email',\n 'id',\n 'website_id',\n 'group_id',\n 'prefix',\n 'middlename',\n 'suffix',\n 'dob',\n 'taxvat',\n 'gender',\n 'is_active',\n 'company',\n 'city',\n 'country_id',\n 'region',\n 'postcode',\n 'telephone',\n 'fax',\n 'vat_id',\n 'street_1',\n 'street_2',\n 'subaccounts',\n 'manage_subaccounts',\n 'account_data_modification_permission',\n 'account_order_history_view_permission',\n 'checkout_order_create_permission',\n 'checkout_order_approval_permission',\n 'checkout_cart_view_permission',\n 'checkout_view_permission',\n 'checkout_order_placed_notification_permission',\n 'force_usage_parent_company_name_permission',\n 'force_usage_parent_vat_permission',\n 'force_usage_parent_addresses_permission',\n 'password',\n 'parent_email',\n 'promote',\n 'can_manage_subaccounts',\n ];\n\n return $array;\n }", "title": "" }, { "docid": "d25c0ba4299dd14649c6a9e7be9e2a52", "score": "0.5711641", "text": "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach(self::$db_fields as $field) {\n\t\t\tif(property_exists($this, $field)){\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "83c2ef01f6be0b3f0985b95de5bca34e", "score": "0.57087517", "text": "protected function attributes() {\n\t $attributes = array();\n\t\tforeach(self::$db_fields as $field) {\n\t\t\tif(property_exists($this, $field)) {\n\t \t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t return $attributes;\n\t}", "title": "" }, { "docid": "c543e04d9aef20dbe71ea6d159ef7ab8", "score": "0.57079405", "text": "public function getFieldsWithSetter(): array {\n $fields = [];\n foreach ($this->asArray as $field => $method) {\n if (!empty($method[\"set\"])) {\n $fields[] = $field;\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "081640f5031bf781072e3e755b54b145", "score": "0.5703054", "text": "public function attributes()\n {\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "cf893e04335fc83fed7c417e36a18c4f", "score": "0.56864893", "text": "private function requestedAttributes()\n {\n\n $default = [\n 'id',\n 'name',\n 'level',\n 'rarity',\n 'image',\n 'category.0',\n 'category.1',\n 'vendor_price',\n 'buy.quantity',\n 'buy.price',\n 'buy.last_change.time',\n 'buy.last_change.quantity',\n 'buy.last_change.price',\n 'sell.quantity',\n 'sell.price',\n 'sell.last_change.time',\n 'sell.last_change.quantity',\n 'sell.last_change.price',\n 'last_update'\n ];\n\n $requested = $this->getInput('attributes') ?: $default;\n\n if (!is_array($requested)) {\n $requested = explode(',', $requested);\n }\n\n return $requested;\n\n }", "title": "" }, { "docid": "8056c439cf0d18ee82c35598e459736f", "score": "0.5683283", "text": "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "460e19ba92b87f21d5dd15c44a86df71", "score": "0.5674506", "text": "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach (self::$db_fields as $field) {\n\t\t\tif (property_exists($this, $field)) {\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "54f6f24e83dc7742c7e989da7517640c", "score": "0.5666733", "text": "protected function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "c31dac2987a41531ad1a2aa841f0dc6b", "score": "0.56629527", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'arity' => fn(ParseNode $n) => $o->setArity($n->getEnumValue(ScopeOperatorType::class)),\n 'multivaluedComparisonType' => fn(ParseNode $n) => $o->setMultivaluedComparisonType($n->getEnumValue(ScopeOperatorMultiValuedComparisonType::class)),\n 'supportedAttributeTypes' => fn(ParseNode $n) => $o->setSupportedAttributeTypes($n->getCollectionOfEnumValues(AttributeType::class)),\n ]);\n }", "title": "" }, { "docid": "20f477f86182072c4ddacea6d71f7147", "score": "0.56622463", "text": "public function getAttributes()\n {\n $return = [];\n foreach ($this->attr as $attr => $info) {\n $return[$attr] = $this->getAttribute($attr);\n }\n\n return $return;\n }", "title": "" }, { "docid": "7d78551ebb56469f9bfdaad23557cdde", "score": "0.5619268", "text": "public function attributes()\n {\n return [\n ];\n }", "title": "" }, { "docid": "fa42f0259213d654a746e53fb7952fbd", "score": "0.56080014", "text": "public function attributes(){\r\n /*\r\n $attributes = array();\r\n foreach(self::$db_fields as $field){\r\n if(property_exists($this, $field)){\r\n\t $attributes[$field] = $this->$field;\r\n\t }\r\n }\r\n return $attributes;\r\n */\r\n \r\n //return get_object_vars($this);\r\n return $this->variables;\r\n }", "title": "" } ]
018bdab04b03206ba23dc32b94a4a3a6
Function to populate the Privacy Settings type one drop down.
[ { "docid": "969f1227076ab3461367585e1e8d0449", "score": "0.6101115", "text": "function privacy_settings_Combo01($selection = ''){\n\t\t$privacy_settings_01\t = \t$this->privacy_settings_01;\n\t\tforeach ($privacy_settings_01 as $key=>$value){\n\t\t?>\n\t\t\t<option value=\"<?=$key?>\" <?php echo ($selection == $key)?'selected=\"selected\"':\"\";?>><?=$value?></option>\n\t\t<?php\t\n\t\t} \n\t}", "title": "" } ]
[ { "docid": "86c4255205ccec17bc080522cf04bdc3", "score": "0.64353096", "text": "public function actionPrivacy()\n {\n $form = new PosterPrivacySetting(['poster' => app()->auth()->getUser()]);\n\n\n $this->view->setScript('platform/user/controller/settings/edit-user-privacy')\n ->assign(['form' => $form]);\n }", "title": "" }, { "docid": "d6b8b6a1271b8dc8667667c9f88c916d", "score": "0.6157754", "text": "function privacy_settings_Combo02($selection = ''){\n\t\t$privacy_settings_02\t = \t$this->privacy_settings_02;\n\t\tforeach ($privacy_settings_02 as $key=>$value){\n\t\t?>\n\t\t\t<option value=\"<?=$key?>\" <?php echo ($selection == $key)?'selected=\"selected\"':\"\";?>><?=$value?></option>\n\t\t<?php\t\n\t\t} \n\t}", "title": "" }, { "docid": "f1468ea279541372f6db9f6a8ab255fe", "score": "0.61335725", "text": "public function get_privacy_settings() {\n\t\t\t$privacy = array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Courses', 'learnpress' ),\n\t\t\t\t\t'id' => 'courses',\n\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t'type' => 'yes-no',\n\t\t\t\t\t'description' => esc_html__( 'Public your profile courses.', 'learnpress' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Quizzes', 'learnpress' ),\n\t\t\t\t\t'id' => 'quizzes',\n\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t'type' => 'yes-no',\n\t\t\t\t\t'description' => esc_html__( 'Public your profile quizzes.', 'learnpress' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'learn-press/profile-privacy-settings', $privacy );\n\t\t}", "title": "" }, { "docid": "9d9ef1f4fd9687e1d2807e4690d5b89c", "score": "0.61083233", "text": "public function settings() {\n\t\t// create admin page\n\t\t$this->settings_page = add_submenu_page( 'options-general.php', $this->admin_name, $this->admin_name, 'manage_network_options', $this->admin_slug, array( $this, 'settings_page' ) );\n\t}", "title": "" }, { "docid": "3e891ada52dceb7ce667587e1a175b68", "score": "0.6087957", "text": "public function settings() {\n $page_title = 'WP NG Angular';\n $menu_title = $page_title;\n $menu_slug = 'settings_' . $this->plugin_name;\n\n add_options_page( $page_title, $menu_title, 'manage_options', $menu_slug, array( Wp_Ng_Settings::getInstance( $this->plugin_name ), 'render_settings_page') );\n }", "title": "" }, { "docid": "ada250068b18045069e509372b6939fe", "score": "0.60243165", "text": "function capabilities_dropdown() {\n $capabilities = array (\n __('all registered users', 'recaptcha') => 'read',\n __('edit posts', 'recaptcha') => 'edit_posts',\n __('publish posts', 'recaptcha') => 'publish_posts',\n __('moderate comments', 'recaptcha') => 'moderate_comments',\n __('activate plugins', 'recaptcha') => 'activate_plugins'\n );\n \n $this->build_dropdown('recaptcha_options[minimum_bypass_level]', $capabilities, $this->options['minimum_bypass_level']);\n }", "title": "" }, { "docid": "875669e3e3497463746b435f78433751", "score": "0.60222095", "text": "protected function add_settings_ui() {\n\t\tadd_settings_section( 'default', '', null, self::SLUG );\n\n\t\t$policies = $this->policies->get_all();\n\t\t$option = $this->policies_setting->get();\n\t\tforeach ( $policies as $policy ) {\n\t\t\tadd_settings_field(\n\t\t\t\t$policy->slug,\n\t\t\t\t$policy->title,\n\t\t\t\tfunction( $args ) use ( $policy, $option ) {\n\t\t\t\t\t$status = isset( $option[ $policy->slug ] ) ? $option[ $policy->slug ][0] : Isolation_Policy::STATUS_DISABLED;\n\t\t\t\t\t$this->render_field( $policy, $status );\n\t\t\t\t},\n\t\t\t\tself::SLUG,\n\t\t\t\t'default',\n\t\t\t\tarray( 'label_for' => $policy->slug )\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e5e041c62fc0d509da8e4b0bda75d2ed", "score": "0.60053974", "text": "public function get_settings_fields();", "title": "" }, { "docid": "7c022ec3e52a44806f62604b9e2a33a8", "score": "0.5967607", "text": "public function settings()\n\t{\n\t\t$this->require_login();\n\t\t$data = array(\n\t\t\t'portal_topic' => $this->variable_model->get('portal_topic'),\n\t\t\t'email_address' => $this->variable_model->get('email_address'),\n\t\t);\n\n\t\t$this->view_wrapper('admin/settings', $data);\n\t}", "title": "" }, { "docid": "3dff646b9a074a97b5527aa637179e67", "score": "0.59618527", "text": "public function settings_form()\n\t\t{\n\t\t\n\n\t\t}", "title": "" }, { "docid": "6bfd3f8b6974563379e333c7e7b009b1", "score": "0.5935066", "text": "public function SetSettings()\r\n\t{\r\n\t\t$this->title\t\t\t\t= __( 'Hide admin menu items', 'developer-tools' );\r\n\t\t$this->fields\t\t\t\t= array(\r\n\t\t\tarray( \r\n\t\t\t\t'fieldType' => 'NestedCheckboxGroups',\r\n\t\t\t\t'name' => '',\r\n\t\t\t\t'globalVariable' => 'menuItems'\r\n\t\t\t),\r\n array( \r\n 'fieldType' => 'Checkbox',\r\n 'name' => 'admin_access',\r\n\t\t\t\t'advanced' => true,\r\n\t\t\t\t'uid1accessOnly' => true,\r\n\t\t\t\t'label' => __( 'Do not disable for user account', 'developer-tools' ) . ': <strong>'.UID1_USERNAME.'</strong>'\r\n )\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "0836546b7e3ba1141ecb4434037b5605", "score": "0.5918211", "text": "public function settingsForm();", "title": "" }, { "docid": "08b11180278672bded9d7969a1dfec81", "score": "0.5911881", "text": "function culturefeed_ui_privacy_settings_form(array $form, array &$form_state, CultureFeed_User $culturefeed_user) {\n\n form_load_include($form_state, 'inc', 'culturefeed_ui', 'includes/privacy_settings');\n\n $options = culturefeed_ui_privacy_settings_get_options($culturefeed_user);\n $default_value = culturefeed_ui_privacy_settings_get_current_setting($culturefeed_user);\n if (!in_array($default_value, array_keys($options))) {\n $default_value = 'nick';\n }\n\n $user_id = culturefeed_get_uid_for_cf_uid($culturefeed_user->id, $culturefeed_user->nick);\n\n $form['#culturefeed_user'] = $culturefeed_user;\n\n $form['setting'] = array(\n '#default_value' => $default_value,\n '#options' => $options,\n '#title' => t('Select the way your user details are visible to others in your <a href=\"@profile-url\">public profile</a>.', array('@profile-url' => url('user/' . $user_id))),\n '#type' => 'radios',\n );\n\n $form['actions'] = array(\n '#type' => 'actions',\n 'submit' => array(\n '#type' => 'submit',\n '#value' => t('Save'),\n ),\n );\n\n // Tooltip.\n $info = t('All your user activities will be set to private too.');\n if ($info) {\n\n $form['#attached'] = array(\n 'js' => array(\n drupal_get_path('module', 'culturefeed_ui') . '/js/privacy_tooltip.js',\n array(\n 'type' => 'setting',\n 'data' => array('culturefeed_ui_privacy_settings_anonymous_tooltip' => $info),\n ),\n ),\n 'library' => array(\n array('system', 'ui.tooltip'),\n ),\n );\n\n }\n\n return $form;\n\n}", "title": "" }, { "docid": "b1b75093c6e487273ef89e0168907eb4", "score": "0.5909922", "text": "function ucsc_cdp_add_sublevel_menu() {\n\tadd_submenu_page(\n\t\t'options-general.php',\n\t\t'UCSC Profiles Plugin Settings',\n\t\t'UCSC Profiles',\n\t\t'manage_options',\n\t\t'ucsc_cdp',\n\t\t'ucsc_cdp_display_settings_page'\n\t);\n}", "title": "" }, { "docid": "dba010c999d11621e88c747ac958c0b8", "score": "0.587235", "text": "public function add_menu() {\n\t\tadd_submenu_page( 'uncode-system-status', esc_html__( 'Privacy', 'uncode-privacy' ), esc_html__( 'Privacy', 'uncode-privacy' ), 'edit_theme_options', 'uncode-privacy-settings', array( $this, 'settings_page_template' ) );\n\t}", "title": "" }, { "docid": "e004db9bf54cd13d3fbd2c0e95d6773f", "score": "0.5857097", "text": "function bookswp_create_settings_menu() {\n add_options_page('BooksWP Settings', 'BooksWP', 'administrator', 'bookswp-settings', \n 'bookswp_settings_page' );\n}", "title": "" }, { "docid": "6796dfc1e28ee7223a3ee29bb5f84326", "score": "0.58566487", "text": "protected function showDefaultSettings()\n\t{\n\t\tob_start();\n\t\techo Helper::showHeading(static::getMessage('SETTINGS_TITLE'));\n\t\t?>\n\t\t<? if (!strlen($this->arProfile['PARAMS']['CATEGORIES_REDEFINITION_MODE'])): ?>\n\t\t\t<input type=\"hidden\" name=\"PROFILE[PARAMS][CATEGORIES_REDEFINITION_MODE]\" value=\"<?= CategoryRedefinition::MODE_STRICT; ?>\" />\n\t\t<? endif ?>\n\t\t<table class=\"acrit-exp-plugin-settings\" style=\"width:100%;\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\t\t\t\t\t\t<a target=\"_blank\" href=\"https://seller.ozon.ru/settings/api-keys\"><?= static::getMessage('SETTINGS_GET_KEY'); ?></a>\n\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\t\t\t\t\t\t<?= static::getMessage('SETTINGS_CLIENT_ID'); ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\t\t\t\t\t\t<input type=\"text\" name=\"PROFILE[PARAMS][APP_ID]\" value=\"<?= $this->arProfile['PARAMS']['APP_ID'] ?>\" size=\"40\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\t\t\t\t\t\t<?= static::getMessage('SETTINGS_API_KEY'); ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\t\t\t\t\t\t<input type=\"text\" name=\"PROFILE[PARAMS][APP_SECRET]\" value=\"<?= $this->arProfile['PARAMS']['APP_SECRET'] ?>\" size=\"40\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\t\t\t\t\t\t<?= Helper::ShowHint(static::getMessage('OZON_SECTION_FROM_PROPERTY_HINT')); ?>\n\t\t\t\t\t\t<?= static::getMessage('OZON_SECTION_FROM_PROPERTY'); ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<? $checked = ($this->arProfile['PARAMS']['OZON_SECTION_FROM_PROPERTY'] == 'Y') ? 'checked=\"checked\"' : ''; ?>\n\t\t\t\t\t<td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\t\t\t\t\t\t<input <?= $checked ?> type=\"checkbox\" name=\"PROFILE[PARAMS][OZON_SECTION_FROM_PROPERTY]\" value=\"Y\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<? /* /$style = ($this->arProfile['PARAMS']['OZON_SECTION_FROM_PROPERTY'] != 'Y') ? 'style=\"display:none;\"' : ''; ?>\n\t\t\t\t <tr <?= $style ?>>\n\t\t\t\t <td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\t\t\t\t <?= Helper::ShowHint(static::getMessage('OZON_SECTION_CODE_HINT')); ?>\n\t\t\t\t <?= static::getMessage('OZON_SECTION_CODE'); ?>\n\t\t\t\t </td>\n\t\t\t\t <td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\t\t\t\t <input type=\"text\" name=\"PROFILE[PARAMS][OZON_SECTION_CODE]\" value=\"<?= $this->arProfile['PARAMS']['OZON_SECTION_CODE'] ?>\" size=\"40\" \" />\n\t\t\t\t </td>\n\t\t\t\t </tr>\n\t\t\t\t <?/* */ ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"40%\" class=\"adm-detail-content-cell-l\">\n\t\t\t\t\t\t<?= Helper::ShowHint(static::getMessage('FIRST_RUN_SYNC_HINT')); ?>\n\t\t\t\t\t\t<?= static::getMessage('FIRST_RUN_SYNC'); ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"60%\" class=\"adm-detail-content-cell-r\">\n\n\t\t\t\t\t\t<div class=\"sync_ext_id_div\"><a href=\"javascript:void(0)\" class=\"adm-btn run_sync_ext_id\" title=\"\"><?= static::getMessage('FIRST_RUN_SYNC_BUTTON'); ?></a></div>\n\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?\n\t\t//pp(static::request('/v1/category/attribute', ['category_id' => '17038143']), true);\n\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "ab82298aa60a7d6a1e73d35ff0241bff", "score": "0.5845149", "text": "public function wpsac_admin_menu() {\n add_options_page( __( 'Licensing Addon Example Settings', 'licensing-addon-example' ), $this->config['short_name'], 'manage_options', 'licensing-addon-example-settings', array( $this, 'create_wpsac_settings_page' ) );\n }", "title": "" }, { "docid": "1c497a23d8298c166133675b44042d9b", "score": "0.5811277", "text": "function add_settings_page() {\n // add the options page\n if ($this->environment == Environment::WordPressMU && $this->is_authority())\n add_submenu_page('wpmu-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page'));\n\n /* re-add when we figure out a way to add network-wide settings in ms\n if ($this->environment == Environment::WordPressMS && $this->is_authority())\n add_submenu_page('ms-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page'));\n */\n \n add_options_page('WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page'));\n }", "title": "" }, { "docid": "39e2e5111104ad4fee88e8f594c96323", "score": "0.57980746", "text": "static public function settings_page()\n {\n /* May be update Role label */\n self::update_role();\n include ud_get_wpp_agents()->path('static/views/admin/settings.php', 'dir');\n }", "title": "" }, { "docid": "b557e24c6652f5348950bb9b0745fa91", "score": "0.5770928", "text": "function madmimi_admin_settings() {\n $form = array();\n $form['madmimi_username'] = array(\n '#title' => 'Mad Mimi Username',\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('madmimi_username', NULL),\n '#size' => 60,\n '#maxlength' => 128\n );\n \n $form['madmimi_apikey'] = array(\n '#title' => 'Mad Mimi API Key',\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('madmimi_apikey', NULL),\n '#size' => 60,\n '#maxlength' => 128,\n '#description' => t('Be sure your account has the Mailer API feature, available <a href=\"http://madmimi.com/addons\">here</a>.'),\n );\n \n $form['madmimi_promotionname'] = array(\n '#title' => 'Promotion Name',\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('madmimi_promotionname', NULL),\n '#size' => 60,\n '#maxlength' => 128\n );\n\n // Add a drop down to select the promotion type\n $form['madmimi_promotiontype'] = array(\n \t'#title' => 'Promotion Type',\n '#type' => 'select',\n '#options' => array('Composer', 'Plain Text'),\n '#required' => TRUE,\n\t'#default_value' => variable_get('madmimi_promotiontype', NULL)\n );\n \n return system_settings_form($form); \n}", "title": "" }, { "docid": "8232e4d911f12a6e191042eb926156ae", "score": "0.5769206", "text": "function userlevel_options($user_type) {\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT * from user_level ORDER by level_name ASC';\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t$options = '';\r\n\t\tif($user_type != '') { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\tif($user_type == $row['level_name']) {\r\n\t\t\t\t$options .= '<option selected=\"selected\" value=\"'.$row['level_name'].'\">'.ucfirst($row['level_name']).'</option>';\r\n\t\t\t\t} else { \r\n\t\t\t\t$options .= '<option value=\"'.$row['level_name'].'\">'.ucfirst($row['level_name']).'</option>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\t$options .= '<option value=\"'.$row['level_name'].'\">'.ucfirst($row['level_name']).'</option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $options;\t\r\n\t}", "title": "" }, { "docid": "0d599c31a088d626e1636d6edb35b815", "score": "0.576791", "text": "function settings_select_list() {\n return $this->config_get('settings_select_list');\n }", "title": "" }, { "docid": "456243fcebc0c31144de457b595dd471", "score": "0.5753957", "text": "public function display_settings_section() { }", "title": "" }, { "docid": "953cea8eb4dd5d19dd96e7ac1eb6075c", "score": "0.57534224", "text": "public static function prepare_settings() {\n\t\tself::add_setting(\n\t\t\tarray(\n\t\t\t\t'id' => 'products',\n\t\t\t\t'label' => 'Product Names',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'description' => 'Product names, one per line.',\n\t\t\t)\n\t\t);\n\n\t\tself::add_setting(\n\t\t\tarray(\n\t\t\t\t'id' => 'publication_id',\n\t\t\t\t'label' => 'Publication ID',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Unique indentifier for your publication.',\n\t\t\t)\n\t\t);\n\n\t\tself::add_setting(\n\t\t\tarray(\n\t\t\t\t'id' => 'oauth_client_id',\n\t\t\t\t'label' => 'OAuth Client ID',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Unique identifier for your Google OAuth Client.',\n\t\t\t)\n\t\t);\n\n\t\tself::add_setting(\n\t\t\tarray(\n\t\t\t\t'id' => 'oauth_client_secret',\n\t\t\t\t'label' => 'OAuth Client Secret',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Secret key for your Google OAuth Client.',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "d33caa0aca3eec25012e80ad7e0d8d7c", "score": "0.5753144", "text": "function web_gp_add_settings_page()\n{\n\t//$page_title: the title of the page\n\t//$menu_title: the name of the menu\n\t//$access_privileges: who has permission to access this page\n\t//$page_name: can be a unique string, but many developers prefer to use __FILE__ to ensure that the name is unique, and doesn’t have the potential to clash with any other pages\n\t//$callback: the function that will handle the creation of the options form\n\n add_options_page( 'Web GP Plugin', 'Web GP settings', 'manage_options', 'manage_web_gp_options', 'web_gp_build_settings_page' );\n}", "title": "" }, { "docid": "1aa31b922f9b21245aded294db106e11", "score": "0.5746872", "text": "function restriction_options() {\n\t\t\t$this->hide_not_approved();\n\t\t\t$this->hide_by_role();\n\t\t\t$this->hide_by_account_settings();\n\n\t\t\tdo_action( 'um_member_directory_restrictions_handle_extend' );\n\t\t}", "title": "" }, { "docid": "1abaef05c0f74900fbd7c4da6d0ab137", "score": "0.57420594", "text": "function display_wc_product_dropdown_settings( $template ) {\n\t$template = SWCP_DIR . '/views/field-settings.php';\n\n\treturn $template;\n}", "title": "" }, { "docid": "d6efba6d16888fedd40d6e2c47e6bfd8", "score": "0.5738309", "text": "function renderAdminSettings( )\r\n\t{\r\n\t\t$pluginParams =& $this->getPluginParams();\r\n\t\t$params =& $this->getParams();\r\n\t\t$element =& $this->getElement();\r\n\t\tFabrikHelperHTML::script( 'admin.js', 'components/com_fabrik/plugins/element/fabrikdropdown/', true );\r\n\t\t?>\r\n<div id=\"page-<?php echo $this->_name;?>\" class=\"elementSettings\"\r\n\tstyle=\"display: none\"><?php FabrikHelperAdminHTML::subElementFields( $element ); ?>\r\n<fieldset><?php echo $pluginParams->render(); ?></fieldset>\r\n<fieldset><legend><?php echo JText::_('Sub elements');?></legend> <a\r\n\tclass=\"addButton\" href=\"#\" id=\"addDropDown\" style=\"text-align: right\"><?php echo JText::_( 'Add' ); ?></a>\r\n<ul id=\"drd_subElementBody\" class=\"subelements\"></ul>\r\n</fieldset>\r\n<fieldset><legend><?php echo JText::_('Add options') ?></legend> <?php echo $pluginParams->render( 'params', 'add' ); ?>\r\n</fieldset>\r\n</div>\r\n<input\r\n\ttype=\"hidden\" name=\"params[drd_initial_selection]\" value=\"\"\r\n\tid=\"params_drd_initial_selection\" />\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "d4820e2b0e67a9db58689fd829d9e5e8", "score": "0.57336795", "text": "public function privacy() {\n return view()->make('company.modules.setting.privacy',['privacy'=>Privacy::all()])->with('title','privacy');\n }", "title": "" }, { "docid": "d032ea7854ce4affd1bfd0e31a97a242", "score": "0.57298046", "text": "public function get_settings_options(){\r\n\t\t\r\n\t\t$info = $this->component_info();\r\n\t\t$optionname = $info['option_name'];\r\n\t\t\r\n\t\t$settings = array();\r\n\t\t\r\n\t\t\r\n\t\t$temp = array();\r\n\t\t$temp['name'] = __('Content Page disabled for','admin2020');\r\n\t\t$temp['description'] = __(\"Content Page will be disabled for any users or roles you select\",'admin2020');\r\n\t\t$temp['type'] = 'user-role-select';\r\n\t\t$temp['optionName'] = 'disabled-for'; \r\n\t\t$temp['value'] = $this->utils->get_option($optionname,$temp['optionName'], true);\r\n\t\t$settings[] = $temp;\r\n\t\t\r\n\t\t$temp = array();\r\n\t\t$temp['name'] = __('Post types available in content page','admin2020');\r\n\t\t$temp['description'] = __(\"Only the selected post types will be available in the content page.\",'admin2020');\r\n\t\t$temp['type'] = 'post-type-select';\r\n\t\t$temp['optionName'] = 'post-types-content'; \r\n\t\t$temp['value'] = $this->utils->get_option($optionname,$temp['optionName'], true);\r\n\t\t$settings[] = $temp;\r\n\t\t\r\n\t\t$temp = array();\r\n\t\t$temp['name'] = __('Enable private library mode','admin2020');\r\n\t\t$temp['description'] = __(\"When enabled, the content page will only show content created by or uploaded by the currently logged in user. This includes folders..\",'admin2020');\r\n\t\t$temp['type'] = 'switch';\r\n\t\t$temp['optionName'] = 'private-mode'; \r\n\t\t$temp['value'] = $this->utils->get_option($optionname,$temp['optionName']);\r\n\t\t$settings[] = $temp;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn $settings;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "2602748e67f6c1fa41130ed2c63a229b", "score": "0.57262987", "text": "function panda_custom_settings(){\n\tregister_setting('panda-settings-group', 'first_name');\n\n\t//add_settings_section( $id, $title, $callback, $page )\n\tadd_settings_section('panda-sidebar-options', 'Sidebar Options', 'panda_sidebar_options', 'panda_page');\n\n \t//add_settings_field( string $id, string $title, callable $callback, string $page, string $section = 'default', array $args = array() )\n\tadd_settings_field('sidebar-name', 'First Name', 'panda_sidebar_name', 'panda_page','panda-sidebar-options'); // last parameter here should matcmatch the id on the previous line\n\t\n\n}", "title": "" }, { "docid": "c4398817881c26da61864aa1d31c1b90", "score": "0.5725535", "text": "public function Settings()\n {\n $userData['settings'] = $this->Webadminmodel->getSettings();\n $this->_tpladmin('Settings', $userData);\n }", "title": "" }, { "docid": "ba78fb4cd30d54a9568779a8a5529506", "score": "0.57236946", "text": "public function add_install_settings_fields( $type );", "title": "" }, { "docid": "a20dc769a2bf9c1d51e8d96019bb0018", "score": "0.5720178", "text": "function showAdminSettings() {\n ?>\n <form action=\"options.php\" method=\"post\">\n <?php\n // Output security fields for the registered setting \"ssb_settings\"\n settings_fields( 'ssb_settings' );\n // Output setting sections and their fields\n do_settings_sections( 'ssb_settings_menu_page' );\n // Output save settings button\n submit_button( __('Save Changes', 'social-share-buttons') );\n ?>\n </form>\n <?php\n }", "title": "" }, { "docid": "ea605df368e3c93831c7021e1cb534a2", "score": "0.5718336", "text": "public function displaysSettingsForm();", "title": "" }, { "docid": "348443a4ffa4809689fd32979c5473c9", "score": "0.5717124", "text": "function ca_staff_display_access_settings($form, &$form_state, $conf) {\n $form['settings']['ca_staff_display'] = array(\n '#type' => 'select',\n '#title' => t('Staff\\'s display type'),\n '#options' => array(\n 'ca_staff_display_square' => t('Display Square'),\n 'ca_staff_display_portrait' => t('Display Portrait'),\n ),\n '#required' => TRUE,\n '#default_value' => $conf['ca_staff_display'],\n );\n\n return $form;\n}", "title": "" }, { "docid": "97fa73644fd3890b6a2cbb8d25e698f9", "score": "0.5716614", "text": "public function settings_init() {\n\t\tif ( ! PirateForms_Util::get_option() ) {\n\t\t\t$new_opt = array();\n\t\t\tforeach ( $this->get_plugin_options() as $tab => $array ) {\n\t\t\t\tforeach ( $array['controls'] as $controls ) {\n\t\t\t\t\t$new_opt[ $controls['id'] ] = isset( $controls['default'] ) ? $controls['default'] : '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tPirateForms_Util::set_option( $new_opt );\n\t\t}\n\t}", "title": "" }, { "docid": "879ce19dec626eaa60e686b0eaafe756", "score": "0.5709151", "text": "function rcMC_settings_menu() {\n \n global $options_page;\n \n $options_page = add_options_page( 'MailChimp Configuration', 'MailChimp', 'manage_options',\n 'rcMC-mc', 'rcMC_config_page' ); \n}", "title": "" }, { "docid": "bec9de795de0d7bd4ed10652322a06bf", "score": "0.56972563", "text": "public function settings() {\n\t\tif ($this->session->user_name != null) {\n\t\t\t\n\t\t\t$this->load->model ( 'Loginmodel' );\n\t\t\t$user_type_id = $this->session->userdata ( 'user_type_id' );\n\t\t\t$data ['menu_name'] = $this->Loginmodel->get_main_menu_list ( $user_type_id, 'Clients' );\n\t\t\t$this->session->set_userdata ( 'first_level_menu', $data );\n\t\t\t\n\t\t\t$this->load->model ( 'Projectsmodel' );\n\t\t\t$results = $this->Projectsmodel->get_company_details ();\n\t\t\t$data = array (\n\t\t\t\t\t'results' => $results \n\t\t\t);\n\t\t\t\n\t\t\t/*\n\t\t\t * $this->load->model('Clientmodel');\n\t\t\t * $results=$this->Clientmodel->view_clients_overview();\n\t\t\t * $data=array('results'=>$results);\n\t\t\t */\n\t\t\t\n\t\t\t$this->load->view ( 'menu' );\n\t\t\t$this->load->view ( 'border' );\n\t\t\t$this->load->view ( 'settings', $data );\n\t\t}\n\t}", "title": "" }, { "docid": "f96ed86a400c5306dc9e50060631c6b8", "score": "0.5693608", "text": "function access_level_server_option() {\n\n\t\t$ctrl = new SloodleConfigurationOptionSelectOne();\n\t\t$ctrl->fieldname = 'sloodleserveraccesslevel';\n\t\t$ctrl->title = 'accesslevelserver';\n\t\t$ctrl->description = '';\n\t\t$ctrl->options = array(\n\t\t\tSLOODLE_SERVER_ACCESS_LEVEL_PUBLIC => 'accesslevel:public',\n\t\t\tSLOODLE_SERVER_ACCESS_LEVEL_COURSE => 'accesslevel:course',\n\t\t\tSLOODLE_SERVER_ACCESS_LEVEL_SITE => 'accesslevel:site',\n\t\t\tSLOODLE_SERVER_ACCESS_LEVEL_STAFF => 'accesslevel:staff'\n\t\t);\n\t\t$ctrl->default = SLOODLE_SERVER_ACCESS_LEVEL_PUBLIC;\n\t\t$ctrl->type = 'radio'; // This is the recommended display type for the object.\n\n\t\treturn $ctrl;\n\n\t}", "title": "" }, { "docid": "112c16ac2a4fdc6ad78dd46ac74d69a5", "score": "0.56917006", "text": "function Communicator_admin_settings()\r\n{\r\n\t// Security check \r\n\tif (!SecurityUtil::checkPermission('Communicator::', '::', ACCESS_ADMIN)) {\r\n return LogUtil::registerPermissionError();\r\n }\r\n\r\n\t// Create output object\r\n\t$render = FormUtil::newpnForm('Communicator');\r\n\tLoader::requireOnce('modules/Communicator/includes/classes/admin/settings.php');\r\n\treturn $render->pnFormExecute('communicator_admin_settings.htm',new communicator_admin_settings_handler());\r\n}", "title": "" }, { "docid": "e4322b0b58f0bbc0becd52dc3cb623ab", "score": "0.56906354", "text": "public function plugin_settings_page()\n {\n \tif(!current_user_can('manage_options'))\n \t{\n \t\twp_die(__('You do not have sufficient permissions to access this page.'));\n \t}\n\t\n $model = new WP_Geeks_Referrals_Model();\n $view_data[\"referrals\"] = $model->getReferralLinks();\n\n \n \t// Render the settings template\n \tinclude(sprintf(\"%s/../templates/settings.php\", dirname(__FILE__)));\n\n }", "title": "" }, { "docid": "708f4623ec503a48ca6c8aca6116b7b1", "score": "0.56891596", "text": "function settings()\n {\n global $LANG, $DB, $PREFS;\n \n // Grab the member groups from our current site\n $member_groups = $DB->query(\"SELECT group_id,site_id,group_title FROM exp_member_groups WHERE `site_id` = \" . $PREFS->ini(\"site_id\"));\n\n // Create an array of our member groups in the format that $settings needs\n foreach ($member_groups->result as $group)\n {\n $member_groups_array[$group['group_id']] = $group['group_title'];\n } \n \n $settings = array(); \n $settings['groups'] = array('ms', $member_groups_array, '1');\n $settings['show_user'] = array('r', array('yes' => \"yes\", 'no' => \"no\"), 'yes');\n $settings['show_templates'] = array('r', array('yes' => \"yes\", 'no' => \"no\"), 'yes');\n $settings['show_extensions'] = array('r', array('yes' => \"yes\", 'no' => \"no\"), 'yes');\n $settings['show_plugins'] = array('r', array('yes' => \"yes\", 'no' => \"no\"), 'yes');\n $settings['show_modules'] = array('r', array('yes' => \"yes\", 'no' => \"no\"), 'yes');\n $settings['css'] = array('t','','');\n\n return $settings;\n }", "title": "" }, { "docid": "ed75dff1878dcfd7ac46894078e7db21", "score": "0.56870806", "text": "function tn_display_settings() {\n\tglobal $settings_table, $settings_params;\n\techo get_settings_table($settings_table, $settings_params, \"tn_settings\", \"name\", \"tn-edit-setting\");\n}", "title": "" }, { "docid": "aaffbad09c998c3778be789af7ed75f1", "score": "0.5660944", "text": "public function create_settings_page() {\n $page_title = 'Inventionland Institute Website Plugin Settings';\n $menu_title = 'Institute Settings';\n $capability = 'manage_options';\n $slug = 'eduiland_settings';\n $callback = [$this, 'settings_page_html'];\n add_submenu_page('options-general.php', $page_title, $menu_title, $capability, $slug, $callback);\n }", "title": "" }, { "docid": "0152d0dbae46dc038fe938177cbc83f4", "score": "0.5659813", "text": "private function _settings()\n\t{\n\t\tglobal $txt;\n\n\t\t$config_vars = array(\n\t\t\tarray('select', 'registration_method', array($txt['setting_registration_standard'], $txt['setting_registration_activate'], $txt['setting_registration_approval'], $txt['setting_registration_disabled'])),\n\t\t\tarray('check', 'notify_new_registration'),\n\t\t\tarray('check', 'force_accept_agreement'),\n\t\t\tarray('check', 'force_accept_privacy_policy'),\n\t\t\tarray('check', 'send_welcomeEmail'),\n\t\t\tarray('check', 'show_DisplayNameOnRegistration'),\n\t\t\t'',\n\t\t\tarray('int', 'coppaAge', 'subtext' => $txt['setting_coppaAge_desc'], 'onchange' => 'checkCoppa();', 'onkeyup' => 'checkCoppa();'),\n\t\t\tarray('select', 'coppaType', array($txt['setting_coppaType_reject'], $txt['setting_coppaType_approval']), 'onchange' => 'checkCoppa();'),\n\t\t\tarray('large_text', 'coppaPost', 'subtext' => $txt['setting_coppaPost_desc']),\n\t\t\tarray('text', 'coppaFax'),\n\t\t\tarray('text', 'coppaPhone'),\n\t\t);\n\n\t\t// Add new settings with a nice hook, makes them available for admin settings search as well\n\t\tcall_integration_hook('integrate_modify_registration_settings', array(&$config_vars));\n\n\t\treturn $config_vars;\n\t}", "title": "" }, { "docid": "6786428f75afcb3b8dbec69a3278bc64", "score": "0.5659281", "text": "function admin_settings_init() { }", "title": "" }, { "docid": "e629e76831de3ad448992bb64e0f260e", "score": "0.56566215", "text": "public static function ap_settings_page() {\n require_once 'admin-settings.php';\n qsot_admin_settings::output();\n }", "title": "" }, { "docid": "39891215f0b79f08896c02abedcbbcc1", "score": "0.56514674", "text": "public function load_settings_fields() {\n\t\t\t$this->setting_option_fields = array(\n\t\t\t\t'question_template' => array(\n\t\t\t\t\t'name' => 'question_template',\n\t\t\t\t\t'type' => 'select-edit-delete',\n\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Question.\n\t\t\t\t\t\tesc_html_x( '%s templates', 'placeholder: Question', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'question' )\n\t\t\t\t\t),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Question.\n\t\t\t\t\t\tesc_html_x( 'Manage %s templates. Select a template then update the title or delete.', 'placeholder: Question', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'question' )\n\t\t\t\t\t),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'options' => $this->setting_option_values['question_templates'],\n\t\t\t\t\t'buttons' => array(\n\t\t\t\t\t\t'delete' => esc_html__( 'Delete', 'learndash' ),\n\t\t\t\t\t\t'update' => esc_html__( 'Update', 'learndash' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}", "title": "" }, { "docid": "507e6917d9ce6d3eefc77e0d695e08d6", "score": "0.56473124", "text": "function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\t\t\n }", "title": "" }, { "docid": "d16a403a9a3cde390d4405d2ff80d004", "score": "0.5641382", "text": "function auction_details_pulldown2($selected = '', $showall = 0, $type = 'product')\r\n {\r\n global $ilance, $myapi, $phrase, $ilconfig;\r\n \r\n $html = '<select name=\"project_details2\" style=\"font-family: verdana\">';\r\n if ($showall)\r\n {\r\n $html .= '<option value=\"\">' . $phrase['_all'] . '</option>'; \r\n }\r\n $html .= '<option value=\"regular\"'; if ($selected == \"regular\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_regular'].'</option>';\r\n $html .= '<option value=\"fixed\"'; if ($selected == \"fixed\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_fixed'].'</option>';\r\n $html .= '</select>';\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "1b9273f175a49cf3d7c5d345ef71da31", "score": "0.5633186", "text": "function presseportal_option_page_show_general_options() {\n\t$api_key = presseportal_get_option(PRESSEPORTAL_API_KEY);\n?>\n <table id=\"PresseportalTabGeneral\" class=\"form-table\" style=\"clear:none\">\n\t\t<tr valign=\"top\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<div class=\"adminHelpMessage\">\n\t\t\t\t\t<img src=\"<?php echo plugins_url('img/info.gif', dirname(__FILE__))?>\" alt=\"Info\" align=\"middle\" />\n\t\t\t\t\t<?php _e('This page contains fundamental plugin settings. Without API key and resource id the plugin is unable to work.', 'Presseportal'); ?>\n\t\t\t\t\t<br>\n\t\t\t\t\t<?php _e('If you do not have an API key, please register on the following page to get one', 'Presseportal'); ?>:\n\t\t\t\t\t<a href=\"http://www.presseportal.de/services/\" target=\"_blank\"><?php _e('Click here', 'Presseportal'); ?></a>.\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\n <tr valign=\"top\">\n <td scope=\"row\" class=\"label\">\n \t<label for=\"api_key\"><?php _e('Presseportal API key', 'Presseportal'); ?>:</label>\n </td>\n <td>\n\t\t\t\t<?php $api_key = presseportal_get_option(PRESSEPORTAL_API_KEY); ?>\n <input name=\"api_key\" id=\"api_key\" size=\"50\" value=\"<?php echo $api_key; ?>\" type=\"text\" class=\"regular-text\" />\n </td>\n </tr>\n\n <tr valign=\"top\">\n <td scope=\"row\" class=\"label\">\n \t<label for=\"cron_user_id\"><?php _e('Default user for new posts', 'Presseportal'); ?>:</label>\n </td>\n <td>\n<?php\n\t\t\t\t\t\t\t$current_user = presseportal_get_option(PRESSEPORTAL_DEFAULT_USER_ID);\n\t\t\t\t\t\t\twp_dropdown_users(\"orderby=user_nicename&name=default_user_id&selected=\" . $current_user);\n?>\n\t\t\t</td>\n </tr>\n\n <tr valign=\"top\">\n <td scope=\"row\" class=\"label\">\n \t<label for=\"cron_category_id\"><?php _e('Default category for new posts', 'Presseportal'); ?>:</label>\n </td>\n <td>\n<?php\n\t\t\t\t\t\t$current_cat = presseportal_get_option(PRESSEPORTAL_DEFAULT_CATEGORY_ID);\n\t\t\t\t\t\twp_dropdown_categories(\"hide_empty=0&name=default_category_id&selected=\" . $current_cat . \"&show_option_none=Keine\");\n?>\n\t\t\t</td>\n </tr>\n\n <tr valign=\"top\">\n <td scope=\"row\" class=\"label\">\n \t<label for=\"filter_positive\"><?php _e('Default positive filters', 'Presseportal'); ?>:<br/>\n \t(<?php _e('Separate multiple filters by comma.', 'Presseportal'); ?>)\n </label>\n </td>\n <td>\n <textarea name=\"filter_positive\" cols=\"50\" rows=\"5\"><?php echo presseportal_get_option(PRESSEPORTAL_DEFAULT_FILTER_POSITIVE); ?></textarea>\n </td>\n </tr>\n\n <tr valign=\"top\">\n <td scope=\"row\" class=\"label\">\n \t<label for=\"filter_negative\"><?php _e('Default negative filters', 'Presseportal'); ?>:<br/>\n \t(<?php _e('Separate multiple filters by comma.', 'Presseportal'); ?>)\n </label>\n </td>\n <td>\n <textarea name=\"filter_negative\" cols=\"50\" rows=\"5\"><?php echo presseportal_get_option(PRESSEPORTAL_DEFAULT_FILTER_NEGATIVE); ?></textarea>\n </td>\n </tr>\n\n\t</table>\n<?php\n}", "title": "" }, { "docid": "cbe7a93b38e35f5d8fb5b2184827001f", "score": "0.5626521", "text": "public function settings() {\n\t\tglobal $current_user;\n\t\t$pirate_forms_options = PirateForms_Util::get_option();\n\t\t$plugin_options = $this->get_plugin_options();\n\t\tinclude_once PIRATEFORMS_DIR . 'admin/partials/settings.php';\n\t}", "title": "" }, { "docid": "08917d005e4f243e0b0b98bea95ba0f0", "score": "0.562245", "text": "function SimpleGeneralSettings_admin_actions() {\n add_options_page(\"Simple General Settings\", \"Simple General Settings\", 1, \"simple-general-settings\", \"SimpleGeneralSettings_admin\");\n}", "title": "" }, { "docid": "55e8227270ab94a98ac96d64555fe036", "score": "0.5612396", "text": "function video_metadata_admin_settings() {\n module_load_include('inc', 'video', '/includes/metadata');\n $metadata = new video_metadata;\n $form = $metadata->admin_settings();\n return system_settings_form($form);\n}", "title": "" }, { "docid": "cfc5a4e803d62cd8d8e035e97dedaccf", "score": "0.5609946", "text": "function charitable_get_admin_settings() {\r\n\treturn charitable_get_helper( 'Admin_Settings' );\r\n}", "title": "" }, { "docid": "fe48d1a24146db07001d9fa3cd3ab129", "score": "0.5606066", "text": "public function initialize_settings() {\n\t\t\n\t\t$default_settings = array();\n\t\tforeach ( $this->settings as $id => $setting ) {\n\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'description' )\n\t\t\t\t$default_settings[$id] = $setting['std'];\n\t\t}\n\t\t\n\t\tupdate_option( $this->theme_safename . '-options', $default_settings );\n\t\t\n\t}", "title": "" }, { "docid": "afd1d62e8c9f9e7306397331ab5b6d8b", "score": "0.56014836", "text": "public function addSettings()\r\n\t\t{\r\n\r\n\t\t\tif ( ! current_user_can( 'administrator' ) && ! $this->permission() )\r\n\t\t\t\treturn;\r\n\r\n\t\t\tglobal $shortname, $options;\r\n\r\n\t\t\t$pos = 0;\r\n\r\n\t\t\t$found = false;\r\n\r\n\t\t\tforeach ( $options as $key )\r\n\t\t\t{\r\n\r\n\t\t\t if ( isset( $key['id'] ) && $shortname . '_smooth_scroll' == $key['id'] )\r\n\t\t\t {\r\n\r\n\t\t\t \t\t$found = true;\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t } // end if\r\n\r\n\t\t\t $pos++;\r\n\r\n\t\t\t} // end if\r\n\r\n\t\t\tif ( $found && $pos > 0 )\r\n\t\t\t{\r\n\r\n\t\t\t\t$array1 = array_slice( $options, 0, $pos + 1 );\r\n\t\t\t\t$array2 = array_slice( $options, $pos + 1 );\r\n\r\n\t\t\t\t$settings =\r\n\t\t\t\t[\r\n\r\n\t\t\t\t\t[], // fix to display the settings properly\r\n\r\n\t\t\t\t\t[\r\n\r\n\t\t\t\t\t\t'name' => esc_html__( 'Layouts Disable User Check', self::DOMAIN ),\r\n\t\t\t\t\t\t'id' => $shortname . '_ddpl_user_check',\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'std' => 'true',\r\n\t\t\t\t\t\t'desc' => esc_html__( 'Here you can specify if the user check is disabled. Then the predefined layouts are not displayed for any user of this page.', self::DOMAIN ),\r\n\r\n\t\t\t\t\t],\r\n\r\n\t\t\t\t\t[\r\n\r\n\t\t\t\t\t\t'name' => esc_html__( 'Layouts Change User Role', self::DOMAIN ),\r\n\t\t\t\t\t\t'id' => $shortname . '_ddpl_user_role',\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'std' => 'administrator',\r\n\t\t\t\t\t\t'desc' => esc_html__( 'Here you can define with which user role ( hierarchical, e.g. \\'editor\\', \\'author\\' etc. ) or which capability ( \\'current_user_can( \\'$cab\\' ) ) users can access the predefined layouts. Multiple roles or permissions can be entered, separated by commas. The default is set to \\'administrator\\'.', self::DOMAIN ),\r\n\t\t\t\t\t\t'validation_type' => 'nohtml',\r\n\r\n\t\t\t\t\t],\r\n\r\n\t\t\t\t];\r\n\t\t\t} // end if\r\n\r\n\t\t\t$this->setOptions( array_merge( $array1, $settings, $array2 ) );\r\n\r\n\t\t}", "title": "" }, { "docid": "e76eb8b7dbe9628a47e8f13e664a46df", "score": "0.5598194", "text": "public function settingsPage() {\n $build = array();\n \n $build['faq_ask_experts_settings_form'] = $this->formBuilder()->getForm('Drupal\\faq_ask\\Form\\ExpertsForm');\n \n return $build;\n }", "title": "" }, { "docid": "4b5dda77141b3fdeacb9a38939b4903e", "score": "0.5595388", "text": "function access_level_object_control_option() {\n\n\t\t$ctrl = new SloodleConfigurationOptionSelectOne();\n\t\t$ctrl->fieldname = 'sloodleobjectaccesslevelctrl';\n\t\t$ctrl->title = 'accesslevelobject:control';\n\t\t$ctrl->description = '';\n\t\t$ctrl->options = array(\n\t\t\tSLOODLE_OBJECT_ACCESS_LEVEL_PUBLIC => 'accesslevel:public',\n\t\t\tSLOODLE_OBJECT_ACCESS_LEVEL_GROUP => 'accesslevel:group',\n\t\t\tSLOODLE_OBJECT_ACCESS_LEVEL_OWNER => 'accesslevel:owner'\n\t\t);\n\t\t$ctrl->default = SLOODLE_OBJECT_ACCESS_LEVEL_OWNER;\n\t\t$ctrl->type = 'radio'; // This is the recommended display type for the object.\n\n\t\treturn $ctrl;\n\n\t}", "title": "" }, { "docid": "046f7fe13a0322d7c54b33bc60c3e4a4", "score": "0.558906", "text": "public function add_settings(){\n\t\tadd_options_page( __('YouTube Favorites', 'youtube-favorite-video-posts' ), __('YouTube Favorites', 'youtube-favorite-video-posts'), 'manage_options', 'youtube-favorite-video-posts-settings', array( $this, 'view_settings' ) );\n\t}", "title": "" }, { "docid": "6d6a7404021380a9fe64f3aa2ff231b1", "score": "0.5563925", "text": "private function load_settings_api(){\n\n \t$terms = get_terms( 'department', array('hide_empty' => 0) );\n \t$support_groups = array('' => 'Select a Term');\n \t\n \tforeach($terms as $term){\n \t\t$support_groups[$term->slug] = $term->name; \n \t}\n\n // \n $ticket_status = array('' => 'Select a Status');\n $terms = get_terms( 'status', array('hide_empty' => 0) );\n foreach($terms as $term){\n $ticket_status[$term->slug] = $term->name; \n }\n\n\n \t$site_pages = get_pages();\n \t$pages = array();\n \tforeach($site_pages as $page){\n \t\t$pages[$page->ID] = $page->post_title;\n \t}\n \t\n\n \t$sections = array(\n \t\t'base_section' => array(\n \t\t\t'section' => array('page' => 'base_settings', 'title' => 'General Settings', 'description' => 'General Settings Description'),\n \t\t\t'fields' => array(\n \t\t\t\tarray('type' => 'select', 'id' => 'support_page', 'section' => 'base_section', 'setting_id' => 'support_system_config', 'label' => 'Support System Page', 'choices' => $pages, 'value' => ''),\n array('type' => 'select', 'id' => 'add_ticket_page', 'section' => 'base_section', 'setting_id' => 'support_system_config', 'label' => 'Add Ticket Page', 'choices' => $pages, 'value' => ''),\n\t\t \t\tarray('type' => 'select', 'id' => 'require_account', 'section' => 'base_section', 'setting_id' => 'support_system_config', 'label' => 'Require Wordpress Account', 'choices' => array('No', 'Yes'), 'value' => ''),\n\t\t \t)\n \t\t),\n\t\t\t'ticket_section' => array(\n \t\t\t'section' => array('page' => 'base_settings', 'title' => 'Ticket Settings', 'description' => 'General Ticket Settings'),\n \t\t\t'fields' => array(\n \t\t\t\tarray('type' => 'select', 'id' => 'default_group', 'section' => 'ticket_section', 'setting_id' => 'support_system_config', 'label' => 'Default Unassigned Group', 'choices' => $support_groups, 'value' => ''),\n array('type' => 'select', 'id' => 'ticket_open_status', 'section' => 'ticket_section', 'setting_id' => 'support_system_config', 'label' => 'Ticket Opened Status', 'choices' => $ticket_status, 'value' => ''),\n array('type' => 'select', 'id' => 'ticket_close_status', 'section' => 'ticket_section', 'setting_id' => 'support_system_config', 'label' => 'Ticket Closed Status', 'choices' => $ticket_status, 'value' => ''),\n array('type' => 'select', 'id' => 'ticket_responded_status', 'section' => 'ticket_section', 'setting_id' => 'support_system_config', 'label' => 'Ticket Team Reply Status', 'choices' => $ticket_status, 'value' => ''),\n array('type' => 'select', 'id' => 'ticket_reply_status', 'section' => 'ticket_section', 'setting_id' => 'support_system_config', 'label' => 'Ticket Author Reply Status', 'choices' => $ticket_status, 'value' => ''),\n\t\t \t)\n \t\t),\n 'theme_section' => array(\n 'section' => array( 'page' => 'base_settings', 'title' => 'Theme Settings', 'description' => 'Theme Settings'),\n 'fields' => array(\n array( 'type' => 'select' , 'id' => 'disable_css', 'section' => 'theme_section', 'setting_id' => 'support_system_config', 'label' => 'Disable Plugin CSS', 'value' => '', 'choices' => array('No', 'Yes'))\n )\n ),\n // email notifications tab\n /*'notification_override' => array(\n 'section' => array('page' => 'notification_settings', 'title' => 'Notification Overrides', 'description' => 'Override templates with messages below'),\n 'fields' => array(\n array('type' => 'select', 'id' => 'override_admin', 'section' => 'notification_override', 'setting_id' => 'notification_override', 'label' => 'Override Admin Email', 'value' => '', 'choices' => array('no' => 'No', 'yes' => 'Yes')),\n array('type' => 'select', 'id' => 'override_member', 'section' => 'notification_override', 'setting_id' => 'notification_override', 'label' => 'Override Member Email', 'value' => '', 'choices' => array('no' => 'No', 'yes' => 'Yes')),\n array('type' => 'select', 'id' => 'override_public', 'section' => 'notification_override', 'setting_id' => 'notification_override', 'label' => 'Override Public Email', 'value' => '', 'choices' => array('no' => 'No', 'yes' => 'Yes')),\n )\n ),\n 'notification_admin' => array(\n 'section' => array('page' => 'notification_settings', 'title' => 'Admin Notification', 'description' => 'Notification email sent to admins once a ticket has been submitted.'),\n 'fields' => array(\n array('type' => 'text', 'id' => 'msg_title', 'section' => 'notification_admin', 'setting_id' => 'notification_admin', 'label' => 'Response Subject', 'value' => ''),\n array('type' => 'textarea', 'id' => 'msg_body', 'section' => 'notification_admin', 'setting_id' => 'notification_admin', 'label' => 'Response Message', 'value' => ''),\n )\n ),\n \t\t'notification_user' => array(\n \t\t\t'section' => array('page' => 'notification_settings', 'title' => 'Member Notification', 'description' => 'Confirmation email sent to member once a ticket has been submitted.'),\n \t\t\t'fields' => array(\n \t\t\t\tarray('type' => 'text', 'id' => 'msg_title', 'section' => 'notification_user', 'setting_id' => 'notification_user', 'label' => 'Response Subject', 'value' => ''),\n \t\t\t\tarray('type' => 'textarea', 'id' => 'msg_body', 'section' => 'notification_user', 'setting_id' => 'notification_user', 'label' => 'Response Message', 'value' => ''),\n \t\t\t)\n \t\t),\n 'notification_public' => array(\n 'section' => array('page' => 'notification_settings', 'title' => 'Public Notification', 'description' => 'Confirmation email sent to public user once a ticket has been submitted.'),\n 'fields' => array(\n array('type' => 'text', 'id' => 'msg_title', 'section' => 'notification_public', 'setting_id' => 'notification_public', 'label' => 'Response Subject', 'value' => ''),\n array('type' => 'textarea', 'id' => 'msg_body', 'section' => 'notification_public', 'setting_id' => 'notification_public', 'label' => 'Response Message', 'value' => ''),\n )\n ),*/\n \t);\n\n \t$sections = array_merge($sections, apply_filters( 'wt/settings_sections', $sections));\n \t$this->settings_sections = $sections;\n }", "title": "" }, { "docid": "4e932911b6806b76afb60c3feaf6f981", "score": "0.5561908", "text": "public function getProfileSettings()\n\t{\n\t\treturn view('pages.auth.profile.settings');\n\t}", "title": "" }, { "docid": "71cd050490d37c6349604b28b23af89f", "score": "0.55598176", "text": "public static function settings_page_template() {\n\t\twp_localize_script( 'wprm-admin', 'wprm_settings', array(\n\t\t\t'structure' => array_values( self::get_structure() ),\n\t\t\t'settings' => self::get_settings_with_defaults(),\n\t\t\t'defaults' => self::get_defaults(),\n\t\t) );\n\n\t\trequire_once( WPRM_DIR . 'templates/admin/settings.php' );\n\t}", "title": "" }, { "docid": "096a1994c7f05a75795c03a03d5780b4", "score": "0.55539626", "text": "function auction_details_pulldown($selected = '', $showall = 0, $type = 'service')\r\n {\r\n global $ilance, $myapi, $phrase, $ilconfig;\r\n \r\n $html = '<select name=\"project_details\" style=\"font-family: verdana\">';\r\n if ($showall)\r\n {\r\n $html .= '<option value=\"\">' . $phrase['_all'] . '</option>'; \r\n }\r\n $html .= '<option value=\"public\"'; if ($selected == \"public\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_public'].'</option>';\r\n $html .= '<option value=\"invite_only\"'; if ($selected == \"invite_only\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_invite_only'].'</option>';\r\n $html .= '<option value=\"realtime\"'; if ($selected == \"realtime\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_realtime'].'</option>';\r\n if ($ilconfig['enable_uniquebidding'] AND $type == 'product')\r\n {\r\n $html .= '<option value=\"unique\"'; if ($selected == \"unique\") { $html .= ' selected=\"selected\"'; } $html .= '>'.$phrase['_lowest_unique_bid'].'</option>';\r\n }\r\n $html .= '</select>';\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "0a1b401c52589610ab9f8cca93e21fdb", "score": "0.554552", "text": "function settings_form() {\n $form['menu_left'] = array(\n '#type' => 'select',\n '#title' => 'Left menu',\n '#options' => array('' => '<none>') + menu_get_menus(),\n '#default_value' => theme_plugin_get_setting(__CLASS__, 'menu_left', 'main-menu'),\n );\n $form['menu_right'] = array(\n '#type' => 'select',\n '#title' => 'Right menu',\n '#options' => array('' => '<none>') + menu_get_menus(),\n '#default_value' => theme_plugin_get_setting(__CLASS__, 'menu_right', 'user-menu'),\n );\n $form['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => 'Make topbar sticky at the top of the page',\n '#default_value' => theme_plugin_get_setting(__CLASS__, 'sticky'),\n );\n $form['contain_to_grid'] = array(\n '#type' => 'checkbox',\n '#title' => 'Set to grid width instead of full page width',\n '#default_value' => theme_plugin_get_setting(__CLASS__, 'contain_to_grid'),\n );\n $form['hide_site_name'] = array(\n '#type' => 'checkbox',\n '#title' => 'Hide the site name displaying by default at the left of the topbar',\n '#default_value' => theme_plugin_get_setting(__CLASS__, 'hide_site_name'),\n );\n return $form;\n }", "title": "" }, { "docid": "f06b29170b65d3ba603a81bfb1546518", "score": "0.5542928", "text": "public function settings()\n {\n $data['page'] = 'settings';\n $table = \"user\";\n\n // function to get user profile by id user\n $where = array(\n 'id_user' => $this->session->userdata('user_id')\n );\n $profile = $this->Admin_models->get_data($table, $where)->row();\n\n $data['profile'] = $profile;\n\n $data['page_title'] = 'Settings - Next Community';\n $this->load->view('admin/header', $data);\n $this->load->view('admin/sidebar', $data);\n $this->load->view('admin/settings/index', $data);\n $this->load->view('admin/footer');\n }", "title": "" }, { "docid": "9ad4e1b54c64526150fc14612b1ef047", "score": "0.55418205", "text": "private function initSettingsItem(){\r\n\t \r\n\t\t$options = $this->objAddon->getOptions();\r\n\t\t$paramsItems = $this->objAddon->getParamsItems();\r\n\t\t\r\n\t\t//items editor - settings\r\n\t\t$settingsItem = new UniteCreatorSettings();\r\n\t\t$settingsItem->addRadioBoolean(\"enable_items\", esc_html__(\"Enable Items\", \"unlimited_elements\"), false);\r\n\t\r\n\t\t$settingsItem->setStoredValues($options);\r\n\t\r\n\t\t$this->settingsItemOutput = new UniteSettingsOutputInlineUC();\r\n\t\t$this->settingsItemOutput->init($settingsItem);\r\n\t\t$this->settingsItemOutput->setAddCss(\"[wrapperid] .unite_table_settings_wide th{width:100px;}\");\r\n\t\r\n\t}", "title": "" }, { "docid": "6cfc67fea7d56e51aead4553264e84eb", "score": "0.55411834", "text": "function wpcf_access_types_caps_predefined() {\n $modes = array(\n 'read' => array(\n 'title' => __('Read', 'wpcf_access'),\n 'role' => 'guest',\n 'predefined' => 'read',\n ),\n 'edit_own' => array(\n 'title' => __('Edit own', 'wpcf_access'),\n 'role' => 'contributor',\n 'predefined' => 'edit_own',\n ),\n 'delete_own' => array(\n 'title' => __('Delete own', 'wpcf_access'),\n 'role' => 'contributor',\n 'predefined' => 'delete_own',\n ),\n 'edit_any' => array(\n 'title' => __('Edit any', 'wpcf_access'),\n 'role' => 'editor',\n 'predefined' => 'edit_any',\n ),\n 'delete_any' => array(\n 'title' => __('Delete any', 'wpcf_access'),\n 'role' => 'editor',\n 'predefined' => 'delete_any',\n ),\n 'publish' => array(\n 'title' => __('Publish', 'wpcf_access'),\n 'role' => 'author',\n 'predefined' => 'publish',\n ),\n );\n return $modes;\n}", "title": "" }, { "docid": "c8b42cbae592407318a621d6f0fd4995", "score": "0.5532908", "text": "function sensortypes_plugin_setting_menu(){\nglobal $_,$myUser,$conf;\nif(isset($_['section']) && $_['section']=='sensortypes' ){\n\nif($myUser!=false){\n\t$sensorTypeManager = new sensorType();\n\t$sensorTypes = $sensorTypeManager->populate();\n\n\t//Si on est en mode modification\n\tif (isset($_['id'])){\n\t\t$id_mod = $_['id'];\n\t\t$selected = $sensorTypeManager->getById($id_mod);\n\t\t$description = $selected->GetName();\n\t\t$button = \"Modifier\";\n\t}\n\t//Si on est en mode ajout\n\telse\n\t{\n\t\t$description = \"Ajout d'un type de capteur\";\n\t\t$button = \"Ajouter\";\n\t}\n\t?>\n\n\t<div class=\"span9 userBloc\">\n\n\n\t\t<h1>Types de capteurs</h1>\n\t\t<p>Gestion des types de capteurs radio</p> \n\t\t<form action=\"action.php?action=sensor_add_type\" method=\"POST\">\n\t\t\t<fieldset>\n\t\t\t\t<legend><?php echo $description ?></legend>\n\n\t\t\t\t<div class=\"left\">\n\t\t\t\t\t<label for=\"nameSensorType\">Nom</label>\n\t\t\t\t\t<?php if(isset($selected)){echo '<input type=\"hidden\" name=\"id\" value=\"'.$id_mod.'\">';} ?>\n\t\t\t\t\t<input type=\"text\" id=\"nameSensorType\" value=\"<?php if(isset($selected)){echo $selected->getName();} ?>\" name=\"nameSensorType\" placeholder=\"Température, Hygrométrie\"/>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t<br/><button type=\"submit\" class=\"btn\"><?php echo $button; ?></button>\n\t\t\t\t</fieldset>\n\t\t\t\t<br/>\n\t\t\t</form>\n\n\t\t\t<table class=\"table table-striped table-bordered table-hover\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Nom</th>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\n\t\t\t\t<?php foreach($sensorTypes as $sensorType){ \n\t\t\t\t\t?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><?php echo $sensorType->getName(); ?></td>\n\t\t\t\t\t\t<td><a class=\"btn\" href=\"action.php?action=sensor_delete_type&id=<?php echo $sensorType->getId(); ?>\"><i class=\"icon-remove\"></i></a>\n\t\t\t\t\t\t\t<a class=\"btn\" href=\"setting.php?section=sensortypes&id=<?php echo $sensorType->getId(); ?>\"><i class=\"icon-edit\"></i></a></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\n\t\t\t\t<?php }else{ ?>\n\n\t\t\t\t<div id=\"main\" class=\"wrapper clearfix\">\n\t\t\t\t\t<article>\n\t\t\t\t\t\t<h3>Vous devez être connecté</h3>\n\t\t\t\t\t</article>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "5fc48d62a885fd8691cd6dbb9931af69", "score": "0.55114985", "text": "public function facility_settings(){\n\t $data['title'] = \"Facility Settings\";\n\t\t$data['content_view'] = \"facility/facility_settings_v\";\n\t\t$data['banner_text'] = \"Facility Settings\";\n\t\t$data['link'] = \"reports_management\";\n\t\t$this -> load -> view(\"template\", $data);\n}", "title": "" }, { "docid": "90430eec48b6c0ac9989ac1dc1f261e4", "score": "0.55052435", "text": "function afo_portfolio_admin_settings() {\n\n\t$types = node_get_types('names');\n\t$options[''] = '-- none --';\n\t$options = array_merge($options, $types);\n\n\t$form['afo_portfolio_artwork_content_type'] = array(\n\t\t'#type' => 'select',\n\t\t'#title' => t('Choose Artwork content type'),\n\t\t'#options' => $options,\n\t\t'#default_value' => variable_get('afo_portfolio_artwork_content_type', ''),\n\t\t'#description' => t('This content type will be used as the portfolio artworks.'),\n\t);\n\n\t$form['afo_portfolio_folder_content_type'] = array(\n\t\t'#type' => 'select',\n\t\t'#title' => t('Choose Folder content type'),\n\t\t'#options' => $options,\n\t\t'#default_value' => variable_get('afo_portfolio_folder_content_type', ''),\n\t\t'#description' => t('This content type will be used as the portfolio folders.'),\n\t);\n\n\t$form['afo_portfolio_artwork_max'] = array(\n\t\t'#type' => 'textfield',\n\t\t'#size' => '10',\n\t\t'#title' => t('Artworks max'),\n\t\t'#default_value' => variable_get('afo_portfolio_artwork_max', ''),\n\t\t'#description' => t('Maximum total number of artworks that non-paying members can create.'),\n\t);\n\n\t$form['afo_portfolio_thumbnail_default_preset'] = array(\n\t\t'#type' => 'textfield',\n\t\t'#size' => '40',\n\t\t'#title' => t('Thumbnail default imagecache preset'),\n\t\t'#default_value' => variable_get('afo_portfolio_thumbnail_default_preset', ''),\n\t\t'#description' => t('The preset used for portfolio thumbnails, unless otherwise specified.'),\n\t);\n\t\n\t$menus[''] = '<none>';\n\t$menus = array_merge($menus, menu_get_menus());\n\t$form['afo_portfolio_manage_menuname'] = array(\n\t\t'#type' => 'select',\n\t\t'#title' => t('Manage portfolio menu'),\n\t\t'#description' => t('Select the menu to print from the Manage Portfolio block'),\n\t\t'#options' => $menus,\n\t\t'#default_value' => variable_get('afo_portfolio_manage_menuname', ''),\n\t);\n\n\treturn system_settings_form($form);\n\n}", "title": "" }, { "docid": "bf53c37f227be5c25ed50d83547cde45", "score": "0.549415", "text": "public function add_settings_menu_page() {\n\n\t\tadd_options_page(\n\t\t\t__( 'Movie Library Settings', 'movie-library-features' ),\n\t\t\t__( 'Movie Library Settings', 'movie-library-features' ),\n\t\t\t'manage_options',\n\t\t\t__( 'movie_library_settings', 'movie-library-features' ),\n\t\t\tarray( $this, 'movie_library_settings_html' )\n\t\t);\n\n\t}", "title": "" }, { "docid": "c404f78c83c23ee7ed30fe074c358257", "score": "0.54918814", "text": "public function admin_options() {\n \t?>\n \t<h3><?php _e( 'GoPay Plugin ([email protected])', 'woocommerce-gopay' ); ?></h3>\n \t<p><?php _e('Umožňuje platby přes bránu GoPay', 'woocommerce-gopay' ); ?></p>\n \t<table class=\"form-table\">\n \t<?php\n \t\t// Generate the HTML For the settings form.\n \t\t$this->generate_settings_html();\n \t?>\n\t\t</table><!--/.form-table-->\n \t<?php\n }", "title": "" }, { "docid": "e70a495ea6bd68ceeea5e4a32081d745", "score": "0.54903823", "text": "public function display_settings()\n {\n // -------------------------------------\n // Init return value\n // -------------------------------------\n\n $r = array();\n\n // -------------------------------------\n // Build rows for values\n // -------------------------------------\n\n $r[] = array(\n 'title' => 'variable_maxlength',\n 'fields' => array(\n $this->setting_name('maxlength') => array(\n 'type' => 'short-text',\n 'value' => $this->settings('maxlength'),\n 'label' => ''\n )\n )\n );\n\n $r[] = array(\n 'title' => 'variable_size',\n 'fields' => array(\n $this->setting_name('size') => array(\n 'type' => 'select',\n 'value' => $this->settings('size'),\n 'choices' => array(\n 'large' => lang('large'),\n 'medium' => lang('medium'),\n 'small' => lang('small'),\n 'x-small' => lang('x-small')\n )\n )\n )\n );\n\n $r[] = array(\n 'title' => 'variable_pattern',\n 'desc' => 'variable_pattern_help',\n 'fields' => array(\n $this->setting_name('pattern') => array(\n 'type' => 'text',\n 'value' => $this->settings('pattern')\n )\n )\n );\n\n // -------------------------------------\n // Build settings text_direction\n // -------------------------------------\n\n $r[] = PVUI::setting('dir', $this->setting_name('text_direction'), $this->settings('text_direction'));\n\n // -------------------------------------\n // Return output\n // -------------------------------------\n\n return $this->settings_form($r);\n }", "title": "" }, { "docid": "a1c2831073464b8a89bc478b4d83f4f0", "score": "0.5488292", "text": "public function settings()\n\t{\n\t\t$page = new \\Gloudemans\\Settings\\Page();\n\t\t$page->registerSubMenuPages([\n\t\t\t'Gloudemans\\Settings\\Pages\\Main',\n\t\t\t'Gloudemans\\Settings\\Pages\\Frontpage',\n\t\t\t'Gloudemans\\Settings\\Pages\\Company',\n\t\t\t'Gloudemans\\Settings\\Pages\\Socialmedia',\n\t\t\t'Gloudemans\\Settings\\Pages\\Product',\n\t\t\t'Gloudemans\\Settings\\Pages\\Contact',\n\t\t]);\n\t\t$page->setup();\n\t}", "title": "" }, { "docid": "93910350e0808a7393352aa587a47940", "score": "0.54834247", "text": "function tc_intuit_create_menu() {\n\tadd_options_page( 'TaxCaster Settings', 'TaxCaster', 'manage_options', 'tax-caster-plugin', 'tc_intuit_settings_page' );\n\n}", "title": "" }, { "docid": "a23c567406cdafedeb7158da44fb95d2", "score": "0.5480634", "text": "function cpa_setting_section_callback_function() {\n \n echo '<p>Select the private area page ID (int)</p>';\n}", "title": "" }, { "docid": "6f5de59da89b19ac5f21f28c6b680731", "score": "0.54800177", "text": "public function menu_settings() {\n\n\t\t// Default (top level) menu for the VIA portal\n\t\t$this->menu_hook = add_menu_page(\n\t\t\t__( \"VIA Portal\", \"vialang\" ),\n\t\t\t__( \"VIA Portal\", \"vialang\" ),\n\t\t\tapply_filters( 'via_min_management_capability', 'manage_categories' ),\n\t\t\t'via-portal',\n\t\t\tarray( $this, 'default_menu', ),\n\t\t\t'dashicons-welcome-widgets-menus',\n\t\t\t6\n\t\t);\n\n\t}", "title": "" }, { "docid": "fdcb15f74c2a7e5c3867ec2faac54fb9", "score": "0.5468402", "text": "function pp_ltw2013_uu_admin_settings_form() {\n\t// form\n\t\t$form = array();\n\n\t\t$form['landesliste'] = array(\n\t\t\t'#type' => 'fieldset',\n\t\t\t'#title' => t('Landesliste'),\n\t\t\t'#description' => t(\"Der UU-Sammelbalken kann am Ende oder am Anfang angezeigt werden.\"),\n\t\t);\n\n\t\t$form['landesliste']['pp_ltw2013_landesliste_start'] = array(\n\t\t\t'#type' => 'checkbox',\n\t\t\t'#title' => t('Am Anfang anzeigen'),\n\t\t\t'#default_value' => variable_get('pp_ltw2013_landesliste_start', NULL),\n\t\t);\n\t\n\t\t$form['landesliste']['pp_ltw2013_landesliste_end'] = array(\n\t\t\t'#type' => 'checkbox',\n\t\t\t'#title' => t('Am Ende anzeigen'),\n\t\t\t'#default_value' => variable_get('pp_ltw2013_landesliste_end', NULL),\n\t\t);\n\n\n\t\t$form['kreiswahlvorschlaege'] = array(\n\t\t\t'#type' => 'fieldset',\n\t\t\t'#title' => t('Kreiswahlvorschläge'),\n\t\t\t'#description' => t(\"Die UU-Sammelbalken können pro Wahlkreis zur Anzeige ausgewählt werden.\"),\n\t\t);\t\n\n\t\t$wks = array(\n\t\t\t\t\"1\"\t\t=>\t\"Kassel-Land I\",\n\t\t\t\t\"2\"\t\t=>\t\"Kassel-Land II\",\t\n\t\t\t\t\"3\"\t\t=>\t\"Kassel-Stadt I\",\t\n\t\t\t\t\"4\"\t\t=>\t\"Kassel-Stadt II\",\n\t\t\t\t\"5\"\t\t=>\t\"Waldeck-Frankenberg I\",\n\t\t\t\t\"6\"\t\t=>\t\"Waldeck-Frankenberg II\",\n\t\t\t\t\"7\"\t\t=>\t\"Schwalm-Eder I\",\n\t\t\t\t\"8\"\t\t=>\t\"Schwalm-Eder II\",\n\t\t\t\t\"9\"\t\t=>\t\"Eschwege-Witzenhausen\",\n\t\t\t\t\"10\"\t=>\t\"Rotenburg\",\n\t\t\t\t\"11\"\t=>\t\"Hersfeld\",\n\t\t\t\t\"12\"\t=>\t\"Marburg-Biedenkopf I\",\n\t\t\t\t\"13\"\t=>\t\"Marburg-Biedenkopf II\",\n\t\t\t\t\"14\"\t=>\t\"Fulda I\",\n\t\t\t\t\"15\"\t=>\t\"Fulda II\",\n\t\t\t\t\"16\"\t=>\t\"Lahn-Dill I\",\n\t\t\t\t\"17\"\t=>\t\"Lahn-Dill II\",\n\t\t\t\t\"18\"\t=>\t\"Gießen I\",\n\t\t\t\t\"19\"\t=>\t\"Gießen II\",\n\t\t\t\t\"20\"\t=>\t\"Vogelsberg\",\n\t\t\t\t\"21\"\t=>\t\"Limburg-Weilburg I\",\n\t\t\t\t\"22\"\t=>\t\"Limburg-Weilburg II\",\n\t\t\t\t\"23\"\t=>\t\"Hochtaunus I\",\n\t\t\t\t\"24\"\t=>\t\"Hochtaunus II\",\n\t\t\t\t\"25\"\t=>\t\"Wetterau I\",\n\t\t\t\t\"26\"\t=>\t\"Wetterau II\",\n\t\t\t\t\"27\"\t=>\t\"Wetterau III\",\n\t\t\t\t\"28\"\t=>\t\"Rheingau-Taunus I\",\n\t\t\t\t\"29\"\t=>\t\"Rheingau-Taunus II\",\n\t\t\t\t\"30\"\t=>\t\"Wiesbaden I\",\n\t\t\t\t\"31\"\t=>\t\"Wiesbaden II\",\n\t\t\t\t\"32\"\t=>\t\"Main-Taunus I\",\n\t\t\t\t\"33\"\t=>\t\"Main-Taunus II\",\n\t\t\t\t\"34\"\t=>\t\"Frankfurt am Main I\",\n\t\t\t\t\"35\"\t=>\t\"Frankfurt am Main II\",\n\t\t\t\t\"36\"\t=>\t\"Frankfurt am Main III\",\n\t\t\t\t\"37\"\t=>\t\"Frankfurt am Main IV\",\n\t\t\t\t\"38\"\t=>\t\"Frankfurt am Main V\",\n\t\t\t\t\"39\"\t=>\t\"Frankfurt am Main VI\",\n\t\t\t\t\"40\"\t=>\t\"Main-Kinzig I\",\n\t\t\t\t\"41\"\t=>\t\"Main-Kinzig II\",\n\t\t\t\t\"42\"\t=>\t\"Main-Kinzig III\",\n\t\t\t\t\"43\"\t=>\t\"Offenbach-Stadt\",\n\t\t\t\t\"44\"\t=>\t\"Offenbach Land I\",\n\t\t\t\t\"45\"\t=>\t\"Offenbach Land II\",\n\t\t\t\t\"46\"\t=>\t\"Offenbach Land III\",\n\t\t\t\t\"47\"\t=>\t\"Groß-Gerau I\",\n\t\t\t\t\"48\"\t=>\t\"Groß-Gerau II\",\n\t\t\t\t\"49\"\t=>\t\"Darmstadt-Stadt I\",\n\t\t\t\t\"50\"\t=>\t\"Darmstadt-Stadt II\",\n\t\t\t\t\"51\"\t=>\t\"Darmstadt-Dieburg I\",\n\t\t\t\t\"52\"\t=>\t\"Darmstadt-Dieburg II\",\n\t\t\t\t\"53\"\t=>\t\"Odenwald\",\n\t\t\t\t\"54\"\t=>\t\"Bergstraße I\",\n\t\t\t\t\"55\"\t=>\t\"Bergstraße II\",\n\t\t);\n\n\t\tforeach ($wks as $wk => $name) {\n\t\t\t$form['kreiswahlvorschlaege']['pp_ltw2013_wk'.$wk] = array(\n\t\t\t\t'#type' => 'checkbox',\n\t\t\t\t'#title' => t(\"WK \".$wk.\" (\".$name.\")\"),\n\t\t\t\t'#default_value' => variable_get('pp_ltw2013_wk'.$wk, NULL),\n\t\t\t);\n\t\t}\n\t\t\n\t// return\n\t\treturn system_settings_form($form);\n}", "title": "" }, { "docid": "b77479343b5c6d12880b217d264c5bbb", "score": "0.546697", "text": "private static function load_settings() {\n\t\t$settings = get_option( 'wprm_settings', array() );\n\t\t$settings = is_array( $settings ) ? $settings : array();\n\n\t\tself::$settings = apply_filters( 'wprm_settings', $settings );\n\t}", "title": "" }, { "docid": "b825e2746930e73c54868a824ad7d7c8", "score": "0.5465975", "text": "function print_moderation_pulldown($value = '', $variableinfo = '')\r\n {\r\n global $phrase;\r\n \r\n $html = '<select name=\"config[' . $variableinfo . ']\" style=\"font-family: verdana\">';\r\n \r\n if ($value)\r\n {\r\n $html .= '\r\n <option value=\"1\" selected=\"selected\">' . $phrase['_disabled'] . '</option>\r\n <option value=\"0\">' . $phrase['_enabled'] . '</option>';\r\n }\r\n else\r\n {\r\n $html .= '\r\n <option value=\"1\">' . $phrase['_disabled'] . '</option>\r\n <option value=\"0\" selected=\"selected\">' . $phrase['_enabled'] . '</option>';\r\n }\r\n \r\n $html .= '</select>';\r\n \r\n return $html; \r\n }", "title": "" }, { "docid": "6bd25c1d41955288ecd213c7750615f7", "score": "0.5465066", "text": "public function get_settings_fields() {\n\n $settings_fields = array(\n $this->config['prefix'] . '_options' => array(\n array(\n 'name' => $this->config['prefix'] . '_license_key',\n 'label' => __( 'License Key', 'whmcs-licensing-example' ),\n 'desc' => __( 'Enter the license key that you were provided after purchase.', 'whmcs-licensing-example' ),\n 'type' => 'text'\n )\n )\n );\n\n return $settings_fields;\n\n }", "title": "" }, { "docid": "e5474e0cc8dc6605e0d4f0d92bd650fc", "score": "0.5462214", "text": "public function display_settings($data)\n\t\t{\n\t\t\t$query = $this->EE->db->get_where('exp_taxonomy_trees',array('site_id' => $this->EE->config->item('site_id')));\n\t\t\t\n\t\t\t//build the select options\n\t\t\t$options = array();\n\t\t\t\n\t\t\t// give the options for which tree to associate with this field\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$options[$row['id']] = $row['label'];\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($data['tree_id']))\n\t\t\t{\n\t\t\t\t$data['tree_id'] = '';\n\t\t\t}\n\n \t\t\t$this->EE->table->add_row(\n \t\t\t\t$this->EE->lang->line('select_tree'),\n\t\t\t\tform_dropdown('tree_id', $options, $data['tree_id'])\n \t\t\t);\n \t\t\t\n \t\t\t\n \t\t\t// give the option to run under pages mode\n \t\t\t$enable_pages_mode = NULL;\n \t\t\t\n \t\t\tif(isset($data['enable_pages_mode']))\n\t\t\t{\n\t\t\t\t$enable_pages_mode = TRUE;\n\t\t\t}\n \t\t\t\n \t\t\t$pages_mode_checkbox_options = array(\n\t\t\t 'name' => 'enable_pages_mode',\n\t\t\t 'id' => 'enable_pages_mode',\n\t\t\t 'value' => '1',\n\t\t\t 'checked' => $enable_pages_mode\n\t\t );\n\t\t \t\t\t\n \t\t\t$this->EE->table->add_row(\n \t\t\t\t$this->EE->lang->line('enable_pages_mode'),\n\t\t\t\tform_checkbox($pages_mode_checkbox_options)\n \t\t\t);\n \t\t\t\n \t\t\t\n \t\t\t// give the option to hide template select\n \t\t\t// essentially forces publishing via the pages module,\n \t\t\t// or the taxonomy interface\n \t\t\t$hide_template_select = NULL;\n \t\t\t\n \t\t\tif(isset($data['hide_template_select']))\n\t\t\t{\n\t\t\t\t$hide_template_select = TRUE;\n\t\t\t}\n\t\t\t \t\t\t\n \t\t\t$hide_template_select_checkbox_options = array(\n\t\t\t 'name' => 'hide_template_select',\n\t\t\t 'id' => 'hide_template_select',\n\t\t\t 'value' => '1',\n\t\t\t 'checked' => $hide_template_select\n\t\t );\n\t\t \t\t\t\n \t\t\t$this->EE->table->add_row(\n \t\t\t\t'&nbsp; <img src=\"'.PATH_CP_GBL_IMG.'cat_marker.gif\" border=\"0\" width=\"18\" height=\"14\" alt=\"\" title=\"\" /> '.$this->EE->lang->line('hide_template_select'),\n\t\t\t\tform_checkbox($hide_template_select_checkbox_options)\n \t\t\t);\n \t\t\t\n \t\t}", "title": "" }, { "docid": "794009714fe44ffe452b2cda13f8b1cd", "score": "0.54602015", "text": "abstract public function getSettingsSubForm(): \\pm_Form_SubForm;", "title": "" }, { "docid": "2eae70850c17e20fc02b84d0dcf60a28", "score": "0.54489815", "text": "public function create_admin_page() {\n $this->options = get_option('cw_inflation');\n ?>\n <div class=\"wrap\">\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields('cw_options_group');\n do_settings_sections('my-setting-admin');\n submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "65d44f1ee2241fec88f1f8e5cea454b8", "score": "0.544784", "text": "function emaudio_podcastalley_settings() {\n $form = array();\n return $form;\n}", "title": "" }, { "docid": "9f8404f64681cf90e765e38fbcb91a9a", "score": "0.5446836", "text": "function slb_get_options_settings() {\n\t$settings = array(\n\t\t'group'=>'slb_plugin_options',\n\t\t'settings'=>array(\n\t\t\t'slb_manage_subscription_page_id',\n\t\t\t'slb_confirmation_page_id',\n\t\t\t'slb_select_attachment_id'\n\t\t\t),\n\t);\n\n\n\treturn $settings;\n\n}", "title": "" }, { "docid": "3240a2fdb505894842d1e39170085499", "score": "0.5444005", "text": "function ssbwpp_settings_init() {\n\t register_setting( 'ssbwpp', 'ssbwpp_options' );\n\t \n\t // register a new section in the \"ssbwpp\" page\n\t add_settings_section(\n\t\t 'ssbwpp_section_developers',\n\t\t __( 'Social Share Buttons', 'ssbwpp' ),\n\t\t 'ssbwpp_section_developers_cb',\n\t\t 'ssbwpp'\n\t );\n\t \n\t // register a new field in the \"ssbwpp_section_developers\" section, inside the \"ssbwpp\" page\n\t add_settings_field(\n\t\t 'ssbwpp_field_selector', // as of WP 4.6 this value is used only internally\n\t\t // use $args' label_for to populate the id inside the callback\n\t\t __( 'Debajo o encima del contenido', 'ssbwpp' ),\n\t\t 'ssbwpp_field_selector_cb',\n\t\t 'ssbwpp',\n\t\t 'ssbwpp_section_developers',\n\t\t [\n\t\t\t 'label_for' => 'ssbwpp_field_selector',\n\t\t\t 'class' => 'ssbwpp_row',\n\t\t\t 'ssbwpp_custom_data' => 'custom',\n\t\t ]\n\t );\n}", "title": "" }, { "docid": "40b96d5fda2251798778859f4fc8a89a", "score": "0.5442966", "text": "public function getSettingsHtml()\n\t{\n\t\treturn blx()->templates->render('_components/linktypes/Users/settings', array(\n\t\t\t'settings' => $this->getSettings()\n\t\t));\n\t}", "title": "" }, { "docid": "dfe44265057f7422c4e4a418d9dcee79", "score": "0.5442827", "text": "function cpa_setting_callback_function() {\n $cpa_private_page_id = esc_attr( get_option( 'cpa_private_page_id' ) );\n \n $args = array(\n\t'sort_order' => 'asc',\n\t'sort_column' => 'post_title',\n\t'hierarchical' => 1,\n\t'exclude' => '',\n\t'include' => '',\n\t'meta_key' => '',\n\t'meta_value' => '',\n\t'authors' => '',\n\t'child_of' => 0,\n\t'parent' => -1,\n\t'exclude_tree' => '',\n\t'number' => '',\n\t'offset' => 0,\n\t'post_type' => 'page',\n\t'post_status' => 'publish'\n ); \n $pages = get_pages($args); \n echo \"<select name='cpa_private_page_id'>\";\n foreach ($pages as $page){\n //print_r($page);\n $option_html = \"<option value='$page->ID'\";\n if ($page->ID === intval($cpa_private_page_id)){\n $option_html .= \" selected='selected'\";\n }\n $option_html .= \" >$page->post_title</option>\";\n echo $option_html;\n }\n echo \"</select>\";\n}", "title": "" }, { "docid": "1757de53f3043cb17d6b9818c475f8bf", "score": "0.5440225", "text": "function wis_maps_settings_page() { \n \n ?>\n<div class=\"wrap\">\n<h2><?php _e( 'Map Details', 'wis-maps-plugin' ) ?></h2>\n\n<form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'wis_maps-plugin-settings-group' ); ?>\n <?php do_settings_sections( 'wis_maps-plugin-settings-group' ); ?>\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">Default Spain Map type</th>\n <td><select name=\"default_country_maptype\" value=\"<?php echo esc_attr( get_option('default_country_maptype') ); ?>\" />\n <option value=\"Google Maps\" <?php echo (get_option('default_country_maptype') == \"Google Maps\" ? \"selected\" : \"\"); ?> >Google Maps</option>\n <option value=\"Open Cycle Map\" <?php echo (get_option('default_country_maptype') == \"Open Cycle Map\" ? \"selected\" : \"\"); ?> >Open Cycle Map</option>\n <option value=\"Open Street Map\" <?php echo (get_option('default_country_maptype') == \"Open Street Map\" ? \"selected\" : \"\"); ?> >Open Street Map</option>\n <option value=\"Thunderforest Landscape\" <?php echo (get_option('default_country_maptype') == \"Thunderforest Landscape\" ? \"selected\" : \"\"); ?> >Thunderforest Landscape</option>\n </select>\n </td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Default Area Map type</th>\n <td><select name=\"default_area_maptype\" value=\"<?php echo esc_attr( get_option('default_area_maptype') ); ?>\" />\n <option value=\"Google Maps\" <?php echo (get_option('default_area_maptype') == \"Google maps\" ? \"selected\" : \"\"); ?> >Google Maps</option>\n <option value=\"Open Cycle Map\" <?php echo (get_option('default_area_maptype') == \"Open Cycle Map\" ? \"selected\" : \"\"); ?> >Open Cycle Map</option>\n <option value=\"Open Street Map\" <?php echo (get_option('default_area_maptype') == \"Open Street Map\" ? \"selected\" : \"\"); ?> >Open Street Map</option>\n <option value=\"Thunderforest Landscape\" <?php echo (get_option('default_area_maptype') == \"Thunderforest Landscape\" ? \"selected\" : \"\"); ?> >Thunderforest Landscape</option>\n </select>\n </td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Default Walk Map type</th>\n <td><select name=\"default_walk_maptype\" value=\"<?php echo esc_attr( get_option('default_walk_maptype') ); ?>\" />\n <option value=\"Google Maps\" <?php echo (get_option('default_walk_maptype') == \"Google maps\" ? \"selected\" : \"\"); ?> >Google Maps</option>\n <option value=\"Open Cycle Map\" <?php echo (get_option('default_walk_maptype') == \"Open Cycle Map\" ? \"selected\" : \"\"); ?> >Open Cycle Map</option>\n <option value=\"Open Street Map\" <?php echo (get_option('default_walk_maptype') == \"Open Street Map\" ? \"selected\" : \"\"); ?> >Open Street Map</option>\n <option value=\"Thunderforest Landscape\" <?php echo (get_option('default_walk_maptype') == \"Thunderforest Landscape\" ? \"selected\" : \"\"); ?> >Thunderforest Landscape</option>\n </select>\n </td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Google Maps API key</th>\n <td><input class=\"wis-maps-api-key\" id=\"wis-maps-gmap-api-key\" type=\"text\" name=\"google_maps_API_key\" value=\"<?php echo esc_attr( get_option('google_maps_API_key') ); ?>\" /></td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Thunderforest API key</th>\n <td><input class=\"wis-maps-api-key\" id=\"wis-maps-tf-api-key\" type=\"text\" name=\"thunderforest_API_key\" value=\"<?php echo esc_attr( get_option('thunderforest_API_key') ); ?>\" /></td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">IGN Copyright Text</th>\n <td><textarea class=\"wis-maps-textarea\" rows=\"8\" id=\"wis-maps-ign-copyright-text\" name=\"ign-copyright-text\" ><?php echo esc_attr( get_option('ign-copyright-text') ); ?></textarea></td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Area map explanatory text</th>\n <td><textarea class=\"wis-maps-textarea\" rows=\"8\" id=\"wis-maps-explanation\" name=\"map_explanation\" ><?php echo get_option('map_explanation'); ?></textarea></td>\n </tr>\n \n <tr valign=\"top\">\n <th scope=\"row\">Area list explanatory text</th>\n <td><textarea class=\"wis-maps-textarea\" rows=\"8\" id=\"wis-list-explanation\" name=\"list_explanation\" ><?php echo get_option('list_explanation'); ?></textarea></td>\n </tr>\n \n </table>\n \n <?php submit_button(); ?>\n\n</form>\n</div>\n<br>\n<div id=\"export-walk-pod\">\n <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\">\n <?php wp_nonce_field( 'export-walk', 'robbie-nonce' ); ?>\n <input type=\"hidden\" name=\"action\" value=\"export_walk_pod\">\n <input type=\"submit\" name=\"save\" value=\"Export Walks\">\n </form>\n</div>\n<br>\n<div id=\"export-area-pod\">\n <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\">\n <?php wp_nonce_field( 'export-area', 'robbie-nonce' ); ?>\n <input type=\"hidden\" name=\"action\" value=\"export_area_pod\">\n <input type=\"submit\" name=\"save\" value=\"Export Areas\">\n </form>\n</div>\n<br>\n<div id=\"export-grade-pod\">\n <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\">\n <?php wp_nonce_field( 'export-grade', 'robbie-nonce' ); ?>\n <input type=\"hidden\" name=\"action\" value=\"export_grade_pod\">\n <input type=\"submit\" name=\"save\" value=\"Export Grades\">\n </form>\n</div>\n<br>\n<div id=\"export-place-pod\">\n <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\">\n <?php wp_nonce_field( 'export-place', 'robbie-nonce' ); ?>\n <input type=\"hidden\" name=\"action\" value=\"export_place_pod\">\n <input type=\"submit\" name=\"save\" value=\"Export Start Places\">\n </form>\n</div>\n<div id=\"existing-exports\">\n <?php \n $files = scandir ( plugin_dir_path( __FILE__ ) . 'exports' );\n echo '<h3>' . (count($files) - 2) . ' Existing Export' . ( count($files) == 3 ? '' : 's' ) . '</h3>';\n foreach ($files as $fname) { // allow for filenames .. and . in the directory\n if ( ($fname !== '.') && ($fname !== '..') )\n { ?>\n <form action=\"<?php echo esc_url( admin_url('admin-post.php') ); ?>\" method=\"post\">\n <?php wp_nonce_field( 'delete-export', 'robbie-nonce' ); ?>\n <span>\n <input type=\"hidden\" name=\"action\" value=\"delete_export\">\n <input type=\"hidden\" name=\"fname\" value=\"<?php echo $fname; ?>\">\n <a href=\"<?php echo plugins_url( 'exports/' . $fname, __FILE__ ); ?>\" class=\"Download-link\"> <?php echo $fname; ?> </a>\n <input type=\"submit\" name=\"Delete\" value=\"Delete\">\n </span>\n </form>\n <?php \n }\n }\n ?>\n</div>\n<br>\n\n<?php\n\n}", "title": "" }, { "docid": "fc903e562ea9abfc16898d8660bebb21", "score": "0.54367167", "text": "function pmprodon_get_level_settings( $level_id ) {\r\n\t$default_settings = array(\r\n\t\t'donations' => 0,\r\n\t\t'donations_only' => 0,\r\n\t\t'min_price' => '',\r\n\t\t'max_price' => '',\r\n\t\t'dropdown_prices' => '',\r\n\t\t'text' => '',\r\n\t);\r\n\t\r\n\tif ( $level_id > 0 ) {\r\n\t\t$settings = get_option( 'pmprodon_' . $level_id, $default_settings );\r\n\t}\r\n\r\n\t$settings = ( ! empty( $settings ) && is_array( $settings ) ) ? array_merge( $default_settings, $settings ) : $default_settings;\r\n\t\r\n\treturn $settings;\r\n}", "title": "" }, { "docid": "fc085e8219179768da7030c8a0e1d733", "score": "0.54345584", "text": "public function movie_library_settings_html() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\t<?php\n\n\t\t\t\t\tsettings_fields( 'movie-options' );\n\n\t\t\t\t\tdo_settings_sections( 'movie-options' );\n\n\t\t\t\t\tsubmit_button( __( 'Save Settings', 'movie-library-plugin' ) );\n\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "3e77f4a2de3445f6f8b0d9f4cc90c2c0", "score": "0.5429597", "text": "function settings()\n\t{\n\t\t$query = ee()->db->select('group_id, group_title')->get_where('member_groups', array('can_access_cp' => 'y'));\n\n\t\t$groups = array();\n\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t\t$groups[$row->group_id] = $row->group_title;\n\t\t}\n\n\t\t$settings = array();\n\n\t\t// Color Settings\n\t\t$settings['color_top_bar'] \t\t= array('i', '', '');\n\t\t$settings['color_top_bar_link'] \t= array('i', '', '');\n\t\t$settings['color_top_bar_link_hover']\t= array('i', '', '');\n\t\t$settings['color_link'] \t\t\t= array('i', '', '');\n\t\t$settings['color_link_hover'] \t\t= array('i', '', '');\n\t\t$settings['color_button'] \t\t\t= array('i', '', '');\n\t\t$settings['color_button_hover'] \t= array('i', '', '');\n\t\t$settings['color_button_action'] \t= array('i', '', '');\n\t\t$settings['color_button_action_hover']\t= array('i', '', '');\n\n\t\t// Settings for hiding buttons\n\t\t$settings['hide_files_button'] = array('ms', $groups, '');\n\t\t$settings['hide_developer_button'] = array('ms', $groups, '');\n\t\t$settings['hide_preview_button'] = array('ms', $groups, '');\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "703d74472e34d1184a4b5d567105c2fc", "score": "0.54277414", "text": "function initialize_vallume_options() {\n /* SECTIONS */\n\n // home-page-section\n \n\n // general-section\n add_settings_section(\n 'general-section',\n 'General',\n 'general_section_cb',\n 'vallume-general-options'\n );\n \n\n // general_option_1\n add_settings_field(\n 'general_option_1',\n 'General - Option 1',\n 'general_option_1_cb',\n 'vallume-general-options',\n 'general-section',\n array()\n );\n\n\n /* REGISTER SETTINGS */\n \n\n register_setting( 'vallume-general-options', 'general_option_1' );\n}", "title": "" }, { "docid": "57a4e9c01027bd3b67e23d8f602b5bb8", "score": "0.5426946", "text": "function wpld_plugin_top_menu_page_html(){\n if(!is_admin()){\n return;\n }?>\n\n <div class=\"wrap\">\n <form action=\"options.php\" method=\"post\">\n <?php\n \n settings_fields('wpld_options_settings');\n // settings_fields( $option_group:string )\n do_settings_sections('wpld-settings');\n // do_settings_sections( $page:string )\n submit_button('Save Changes');\n\n\n ?>\n </form>\n </div>\n\n <?php\n }", "title": "" }, { "docid": "ccf391a07d7a176989ef2b05a7f78463", "score": "0.54267216", "text": "public function admin_init()\n {\n register_setting('apt_pro_options_group', 'apt_pro_options', array($this, 'sanitize_options'));\n\n add_settings_section('apt_pro_options', __('Options', 'auto-post-thumbnail-pro'), array($this, 'options_section'), 'auto-post-thumbnail-pro');\n\n add_settings_field('default_featured_image', __('Default featured image', 'auto-post-thumbnail-pro'), array($this, 'default_featured_image_field'), 'auto-post-thumbnail-pro', 'apt_pro_options', array('label_for' => 'default_featured_image'));\n\n add_settings_field('exclude_smaller_than', __('Exclude images smaller than', 'auto-post-thumbnail-pro'), array($this, 'exclude_smaller_than_field'), 'auto-post-thumbnail-pro', 'apt_pro_options', array('label_for' => 'exclude_smaller_than'));\n }", "title": "" }, { "docid": "c00667e52424883b41e13aa2668bb376", "score": "0.542626", "text": "function fb_get_main_settings_fields() {\n\t$children = array(\n\t\tarray('name' => 'app_id',\n\t\t\t'label' => 'App ID',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App ID.', 'facebook' ),\n\t\t\t),\n\t\tarray('name' => 'app_secret',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App Secret.', 'facebook' ),\n\t\t\t),\n\t\tarray('name' => 'app_namespace',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App Namespace.', 'facebook' ),\n\t\t\t),\n\t\t);\n\n\tfb_construct_fields('settings', $children);\n}", "title": "" } ]
687f64140fd4b870dec1f40964f8fd01
Return the emails subject.
[ { "docid": "9cf1483d46fa840a37359e29b8094615", "score": "0.6797599", "text": "abstract public function getSubject(): string;", "title": "" } ]
[ { "docid": "526630b3e2d19012d0a5e124418a0dd5", "score": "0.83355904", "text": "public function getSubject(): string\n {\n return $this->subject;\n }", "title": "" }, { "docid": "526630b3e2d19012d0a5e124418a0dd5", "score": "0.83355904", "text": "public function getSubject(): string\n {\n return $this->subject;\n }", "title": "" }, { "docid": "89f9bc05e1e9cfaf979d60479282c6be", "score": "0.83329046", "text": "function get_subject()\n\t{\n\t\t$this->_load();\n\t\treturn $this->the_mailer->getSubject();\n\t}", "title": "" }, { "docid": "9a669bd009f053d6adf8a4734278f0a2", "score": "0.831358", "text": "public function getEmailTemplateSubject();", "title": "" }, { "docid": "df8decd0c77124b0755843a772f61919", "score": "0.8289548", "text": "public function getSubject() {\n\t return $this->getValue(self::FIELD_SUBJECT);\n\t}", "title": "" }, { "docid": "20abd3125ddc6271fb73ee51cc546a47", "score": "0.8281418", "text": "public function getSmtMailSubject()\n {\n return $this->smt_mail_subject;\n }", "title": "" }, { "docid": "a194d562c50c062efd3d88bedfae0212", "score": "0.8180888", "text": "public function getSubject(): string\n {\n return $this->subject . $this->service->title;\n }", "title": "" }, { "docid": "04741697b92ec17536f2198b83e213fe", "score": "0.8159932", "text": "function getSubject() {\n if($this->subject == NULL) {\n //Warning, no subject set\n\n //Return subject as some default\n return \"\";\n }\n return $this->subject;\n }", "title": "" }, { "docid": "52927e7976d963ca65740d921b6ccdd9", "score": "0.81029665", "text": "public function getSubject()\n {\n return $this->getHeaders()->get('subject');\n }", "title": "" }, { "docid": "6738f182b698b8807e32d12692e6b157", "score": "0.8078103", "text": "public function subject(): string\n {\n return $this->subject;\n }", "title": "" }, { "docid": "c30468f78589230253dd6426d61e47d0", "score": "0.80666703", "text": "function getSubject()\n {\n return is_null($this->_sSubject) ? NULL : (string) $this->_sSubject;\n }", "title": "" }, { "docid": "a512c7692ff1cd50b81f6b41e88b5636", "score": "0.8050338", "text": "public function getSubject()\n {\n return $this->getGeneric('subject', 'SubjectFormat');\n }", "title": "" }, { "docid": "832fea245ed6246dfd324408a0feedc9", "score": "0.8024373", "text": "public function getEmailSubject () {\n $subject = $this->option('subject');\n if ($subject === null) {\n return trans('emails.reset-password-subject');\n }\n return $subject;\n }", "title": "" }, { "docid": "e032375d5eb4b414c0e11be47c81ffde", "score": "0.8010679", "text": "public function getSubject()\n {\n return $this->Subject;\n }", "title": "" }, { "docid": "e032375d5eb4b414c0e11be47c81ffde", "score": "0.8010679", "text": "public function getSubject()\n {\n return $this->Subject;\n }", "title": "" }, { "docid": "03fa7ec41904fe0de0dfdad1f7dedc80", "score": "0.80076724", "text": "public function getSubject()\n\t{\n\t\treturn $this->sSubject;\n\t}", "title": "" }, { "docid": "9a12b8a97c91c9bdca3b8e83a549748e", "score": "0.79351735", "text": "public function getSubject()\n {\n return $this->_Subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.7911521", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "38486968ab6d00a7476a78ba580590a9", "score": "0.7904063", "text": "public function getSubject() {\n\t\treturn $this->subject;\n\t}", "title": "" }, { "docid": "38486968ab6d00a7476a78ba580590a9", "score": "0.7904063", "text": "public function getSubject() {\n\t\treturn $this->subject;\n\t}", "title": "" }, { "docid": "65e1c73cf4c61e1f0481bf2c84ea3d48", "score": "0.78939146", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "65e1c73cf4c61e1f0481bf2c84ea3d48", "score": "0.78939146", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "2bb976cc075466d18437db3f57041e78", "score": "0.7884583", "text": "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6d32489b0be8ff8684341d3df1dc41b7", "score": "0.7808607", "text": "function getSubject()\n\t{\n\t\treturn Field::decodeWords( trim( $this->getFieldValue(\"Subject\") ) );\n\t}", "title": "" }, { "docid": "65a33a879a2adeae25f0a76e96c4249b", "score": "0.77982116", "text": "public function getSubject()\n {\n return $this->_subject;\n }", "title": "" }, { "docid": "54094506d87c961a93e56095995ef41e", "score": "0.7789203", "text": "public function getSubject() {\n return $this->_subject;\n }", "title": "" }, { "docid": "a13d6381c4178b158282346cc838d223", "score": "0.77858806", "text": "function GetSubject()\n {\n return $this->base->Subject;\n }", "title": "" }, { "docid": "df9f892abde176e0430c036c827ed2d8", "score": "0.7764341", "text": "protected function getSubject()\n {\n return $this->_subject;\n }", "title": "" }, { "docid": "34ce00cb274d4e63826735f821e62606", "score": "0.77405834", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "34ce00cb274d4e63826735f821e62606", "score": "0.77405834", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "62f7d6ce44f423890f72383a93cf9137", "score": "0.77404976", "text": "public function getSubject()\n {\n return isset($this->_gemsData['gap_subject']) ? $this->_gemsData['gap_subject'] : null;\n }", "title": "" }, { "docid": "e28a3628d5185b8464eb34680a6d87e9", "score": "0.7732285", "text": "public function getSubject()\n {\n $i = preg_match('/\\nSubject:([\\s\\S]*?)\\n\\w/im', $this->content, $match);\n\n if (1 === $i) {\n // Decode multiple line text\n $elm = imap_mime_header_decode(trim($match[1]));\n\n $subject = '';\n foreach ((array)$elm as $line) {\n $subject .= $line->text;\n }\n\n return $subject;\n\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0c43b856af136ac9b480295148c6ea76", "score": "0.7718037", "text": "public function getSubject()\r\n {\r\n return $this->subject;\r\n }", "title": "" }, { "docid": "eb8fe7e7cf80469068f20aa66eed4fdc", "score": "0.7595329", "text": "public function subject()\n\t{\n\t\treturn $this->exth_record(self::EXTH_RECORD_TYPE_SUBJECT);\n\t}", "title": "" }, { "docid": "8b3462740bc3d969013a11393b1b5981", "score": "0.7461872", "text": "public static function getSubject() { return self::$subject; }", "title": "" }, { "docid": "316e77c30191a06e08179d2d581afa49", "score": "0.74468416", "text": "public function get_admin_email_subject() {\n\t\t\t$default_email_subject = get_option( '_edd_fm_admin_subject', __( 'Possible fraudulent purchase', 'edd-fm' ) );\n\n\t\t\treturn $default_email_subject;\n\t\t}", "title": "" }, { "docid": "491329268ea911f90b353e225085b515", "score": "0.7419491", "text": "public function getSubject()\n {\n return call_user_func($this->_normalizer, $_SERVER[$this->_subject]);\n }", "title": "" }, { "docid": "c221ed63523f976117bd968be0cc5b89", "score": "0.7406842", "text": "public function get_customer_email_subject() {\n\t\t\t$default_email_subject = get_option( '_edd_fm_customer_subject', __( 'Your purchase was automatically flagged as potential fraud', 'edd-fm' ) );\n\n\t\t\treturn $default_email_subject;\n\t\t}", "title": "" }, { "docid": "c1fbd0125672b419797961addde1b7e0", "score": "0.73336166", "text": "public function getSubject() {\r return $this->subject;\r }", "title": "" }, { "docid": "e1e69e9775926baa4fc6ced993d0b75c", "score": "0.7233085", "text": "protected function getEmailSubject() {\n return t('New FOIA request received for @agency_component_name', ['@agency_component_name' => $this->agencyComponent->label()]);\n }", "title": "" }, { "docid": "bf769098dee31caefd0f722cc713d8bc", "score": "0.71923435", "text": "public function getSubject()\n {\n return call_user_func($this->_normalizer, $this->client->getUser());\n }", "title": "" }, { "docid": "fecf138f9d60bdcff6ba8b0af89a77bd", "score": "0.71919084", "text": "protected function getPhoneSubject()\n {\n return property_exists($this, 'subject') ? $this->subject : 'Your Password Reset Link';\n }", "title": "" }, { "docid": "82a7e6ff4e5b53bf6b1ed36f7e2245a2", "score": "0.7188859", "text": "protected function getSubject($useDefault = false) {\n $subject = $this->properties->getLocalizedWidgetProperty($this->locale, self::PROPERTY_SUBJECT);\n if (!$subject && $useDefault) {\n $subject = 'Message from ' . $this->properties->getNode()->getRootNode()->getName($this->locale);\n }\n\n return $subject;\n }", "title": "" }, { "docid": "c3342d2aee214c665c5373d906ccd6d4", "score": "0.7159744", "text": "public function getSystemSubject()\n {\n return $this->getGeneric('systemSubject', 'SystemSubjectFormat');\n }", "title": "" }, { "docid": "6b6f1937f0fe2af88d73df25df3ed503", "score": "0.71426517", "text": "public function getSubject()\n {\n $row = $this->db[\"subject\"]->getSubjectIDFromPaintingID($this->PaintingID);\n\n\n $output = '';\n\n\n foreach ($row as $value) {\n\n $output .= '<li class=\"item\"><a href=\"single-subject.php?SubjectID=' . $value[\"SubjectID\"] . '\">' . $this->db[\"subjectName\"]->getNameByID($value[\"SubjectID\"])[\"SubjectName\"] . '</a></li>';\n\n\n }\n\n return $output;\n\n }", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.71157414", "text": "public function getSubject();", "title": "" }, { "docid": "0248ee708268461f6743a475f62467a8", "score": "0.70427334", "text": "public function getSubject(): ?string;", "title": "" }, { "docid": "7029a1c1c66976ecac83e78dd5aba8d9", "score": "0.7024645", "text": "function getSubject();", "title": "" }, { "docid": "7029a1c1c66976ecac83e78dd5aba8d9", "score": "0.7024645", "text": "function getSubject();", "title": "" }, { "docid": "f2f57a5525ee76e81d9fad4d51b14278", "score": "0.6956712", "text": "public function getSSubject()\n {\n return isset($this->sSubject) ? $this->sSubject : null;\n }", "title": "" }, { "docid": "1b00c8018069946a88c854f64c64d8b5", "score": "0.69425577", "text": "function build_email_subject() {\n $this->full_email_subject .= $this->sender_subject->input_value;\n }", "title": "" }, { "docid": "ca6dbb4921154e20eaec30bc74130f0b", "score": "0.6887513", "text": "public function get_subject_tag()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->_load_config();\n\n if (isset($this->params['sa_spam_subject_tag']))\n return $this->params['sa_spam_subject_tag'];\n else\n return '';\n }", "title": "" }, { "docid": "bde4258a1ff1231c916a779f25350546", "score": "0.6866335", "text": "function Subject( $subject, $charset='' ) {\n\tif( isset($charset) && $charset != \"\" ) {\n\t\t$this->charset = strtolower($charset);\n\t}\n\t\n\tglobal $AppUI;\n\t\n\tif ( ( $AppUI->user_locale != 'en' || ( $this->charset && $this->charset != 'us-ascii' && $this->charset != 'utf-8') ) && function_exists('imap_8bit')) {\n\t\t$subject = \"=?\".$this->charset.\"?Q?\".\n\t\t\tstr_replace(\"=\\r\\n\",\"\",imap_8bit($subject)).\"?=\";\t\t\n\t}\n\t$this->xheaders['Subject'] = strtr( $subject, \"\\r\\n\" , \" \" );\n}", "title": "" }, { "docid": "b780a383a2869f22686c1c36180f4c4c", "score": "0.6848903", "text": "function getTemplateSubject($template) {\r\n switch ($template) {\r\n case \"errors\":\r\n return \"##nebackup.errors.subject##\";\r\n break;\r\n\r\n default:\r\n return \"\";\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "74a2b1ba1e0e6afaeaf5fbfcdb0ab49c", "score": "0.6798215", "text": "public function getEmailTitle();", "title": "" }, { "docid": "51d5da9dfcc513af7f0ecb0567e44aa6", "score": "0.6767347", "text": "public function getSubjectId()\n\t{\n\t\treturn $this->subject_id;\n\t}", "title": "" }, { "docid": "92f3cf655e3b1b7635f4f6dcbbd0d7cb", "score": "0.6745883", "text": "public static function getEmailSubject($postTitle, $subjectTemplate) {\n\t\t$message = '';\n\t\t$message = str_replace(self::TAG_POST_TITLE, $postTitle, $subjectTemplate);\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "df0af11f49b832e6ca1cfa319bcf002c", "score": "0.67367935", "text": "public function getExamSubject()\r\n {\r\n return $this->exam->subject;\r\n }", "title": "" }, { "docid": "d82d2e1a470458007ccb01d76a5eb195", "score": "0.6707045", "text": "public function getSSLCertSubject() {\r\n return inship_fedexship_get($this->handle, 162 );\r\n }", "title": "" }, { "docid": "462f1cfd0c3c7c17c0b639191cbabec0", "score": "0.6704851", "text": "public function getShortSubject();", "title": "" }, { "docid": "8de9e4c15b0cbbe31a09b8b5a560c84b", "score": "0.6635435", "text": "public function subjectWillReturnStringThatIsAlreadySet()\n {\n $helper = new FormMailHelper();\n $subject = implode('-', $this->faker->words(3));\n $data = ['subject' => $subject];\n $formName = $helper->subject($data);\n $this->assertInstanceOf('\\\\Pbc\\\\FormMail\\\\Helpers\\\\FormMailHelper', $formName);\n $this->assertSame($subject, $data['subject']);\n }", "title": "" }, { "docid": "ff3e6ec0a668b031c0b1d358caf5e949", "score": "0.66346943", "text": "function getNotificationSubjectPrefix() {\n return '';\n }", "title": "" }, { "docid": "c5b16b74a8e24c5340edf7966fb906bd", "score": "0.66288215", "text": "public function getEmailSubject(): ?string {\n $val = $this->getBackingStore()->get('emailSubject');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'emailSubject'\");\n }", "title": "" }, { "docid": "73713b41aeb46c92805ff7c0bb69cdd1", "score": "0.66282684", "text": "function _getEmailSubjectDetails() {\n global $objDatabase;\n\n $settingQuery='SELECT value from '.DBPREFIX.'module_u2u_settings WHERE name=\"subject\"';\n $objResult=$objDatabase->Execute($settingQuery);\n $arrShowSettings['subject'] = $objResult->fields['value'];\n return $arrShowSettings;\n }", "title": "" }, { "docid": "77b2f44d2f5727e1d6f07b9d80474b42", "score": "0.65990883", "text": "public function getBriefSubject();", "title": "" }, { "docid": "7ea6a4b093fc50d6a3212a5646d5fa29", "score": "0.65608716", "text": "private function setSubject()\n {\n $this->subject = trans('activation.emails.' . $this->kind . '_subject');\n }", "title": "" }, { "docid": "705d7491c2aa9ef2b99bc065989a2148", "score": "0.65564835", "text": "public function getSubjectResource()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "4bc5f771bdf498d0dead2570285b6e4c", "score": "0.65463436", "text": "protected function getEncodedSubject() {\n\n\t\t$subject = mb_convert_encoding( $this->subject, $this->charset, 'auto' );\n\n\t\treturn mb_encode_mimeheader( $subject, $this->charset, 'Q' );\n\n\t}", "title": "" }, { "docid": "9794213ec64461388b24c2abd4c09fc2", "score": "0.6440107", "text": "public function getProcessedSubject()\n {\n if ($this->processedHtml === null && $this->processedPlainText === null && $this->processedSubject === null) {\n $this->processAllText();\n }\n return $this->processedSubject;\n }", "title": "" }, { "docid": "35a283f41ead45194b08d2cf6c64b70d", "score": "0.64298606", "text": "private function getSubject(Tracker_Artifact $artifact, PFUser $recipient, $ignore_perms = false)\n {\n $subject = '['. $artifact->getTracker()->getItemName() .' #'. $artifact->getId() .'] ';\n $subject .= $this->getSubjectAssignedTo($artifact, $recipient);\n $subject .= $artifact->fetchMailTitle($recipient, 'text', $ignore_perms);\n return $subject;\n }", "title": "" }, { "docid": "5e13cb0e0264716075633cb79af178a8", "score": "0.63678974", "text": "public function makeSubjectWillReturnAString()\n {\n $helper = new FormMailHelper();\n $formName = $this->faker->word;\n $subject = $helper->makeSubject(['formName' => $formName]);\n $this->assertSame($subject, ucfirst($formName) . ' Form Submission');\n }", "title": "" }, { "docid": "5fc4b61bde7829eb29d127311cc40bb6", "score": "0.6359306", "text": "function get_email_subject ($prefix,$email_name){\n\t$sql = 'SELECT subject FROM '.$prefix.'emails WHERE `name`=\\''.$email_name.'\\'';\n\tif(!$result = mysql_query($sql)){\n\t\tdie('MySQL query failed. MySQL said: '.mysql_error());\n\t}\n\t$row = mysql_fetch_row($result);\n\t$output = $row[0];\n\treturn $output;\n}", "title": "" }, { "docid": "6534ebda3c5dd4e8bc8d99f596fb4b1c", "score": "0.63467634", "text": "public function subjects()\n\t{\n\t\treturn $this->exth_records(self::EXTH_RECORD_TYPE_SUBJECT);\n\t}", "title": "" }, { "docid": "9c8860fc688da19485803f3d3458c637", "score": "0.6278979", "text": "public function getSubjectName() {\n $teacher_id = $this->teacher_id;\n $query = DB::table('vne_subject')->select('vne_subject.name')->join('vne_teacher_class_subject','vne_subject.subject_id','=','vne_teacher_class_subject.subject_id')->join('vne_teachers','vne_teachers.teacher_id','=','vne_teacher_class_subject.teacher_id')->where('vne_teachers.teacher_id','=',$teacher_id)->where('vne_teacher_class_subject.deleted_at','=',NULL)->get()->first(); \n if ($query) {\n return $query->name; \n }\n else {\n return 'Chưa dạy môn nào';\n } \n }", "title": "" }, { "docid": "0ddf1d527e784af1f186acb28dd0b77a", "score": "0.62631", "text": "public function subject(): SubjectClaim\n {\n return self::_checkType($this->get(RegisteredClaim::NAME_SUBJECT),\n SubjectClaim::class);\n }", "title": "" }, { "docid": "99c9293762b6494e722dcfac498224be", "score": "0.62449175", "text": "public function addressSubject() {\n\t\t\t$drblank = \"Dr . \" . $this->lastname;\n\t\t\treturn $drblank;\n\n\t\t}", "title": "" }, { "docid": "b5080c0ed6217e1e4e1fef03bd8b6ecf", "score": "0.6235526", "text": "public function getSubject($messageID)\n {\n try {\n $header = imap_header($this->_inbox, $messageID);\n return utf8_decode(imap_utf8(imap_qprint($header->subject)));\n } catch (Exception $exc) {\n return $exc->getMessage();\n }\n }", "title": "" } ]
535d4c0bcad1b1aa0e3bf0f3e9999740
ORDERING FUNCTIONS Move gallery down
[ { "docid": "725c611537312f3d955d109c5af0887f", "score": "0.5981264", "text": "function photogallery_admin_incgallery() \n{\n $gid = (int)FormUtil::getPassedValue ('gid');\n $tobot = FormUtil::getPassedValue ('tobot');\n \n if ($tobot) {\n $message = _PHOTO_GALLERYMOVEDTOBOTTOM;\n } else {\n $message = _PHOTO_GALLERYMOVEDDOWN;\n }\n\n if (!SecurityUtil::confirmAuthKey('PhotoGallery')) {\n $url = pnModURL('PhotoGallery', 'admin', 'main');\n return LogUtil::registerAuthidError ($url);\n }\n\n if (pnModAPIFunc('PhotoGallery', 'admin', 'incgallery', array('gid' => $gid,\n 'tobot' => $tobot))) {\n LogUtil::registerStatus ($message);\n }\n\n return pnRedirect(pnModURL('PhotoGallery', 'admin', 'main'));\n}", "title": "" } ]
[ { "docid": "7ef089b5c8e12f4aacd4aeec36811edd", "score": "0.67382604", "text": "protected function determineGalleryPosition() {}", "title": "" }, { "docid": "58bfc048b61268a498fb492d1d503118", "score": "0.6610381", "text": "public function fixSortOrder()\n\t{\n\t\tglobal $db;\n\t\t$gallery_images = $db->get_results\n\t\t(\"\n\t\t\tSELECT image_guid, sort_order\n\t\t\tFROM images_galleries\n\t\t\tWHERE page_guid = '\".$this->getGUID().\"'\n\t\t\tAND revision = \".$this->getRevision().\"\n\t\t\tORDER BY sort_order ASC\n\t\t\");\n\t\t$i = 1;\n\t\tforeach ($gallery_images as $image)\n\t\t{\n\t\t\t$db->query\n\t\t\t(\"\n\t\t\t\tUPDATE images_galleries\n\t\t\t\tSET sort_order = $i\n\t\t\t\tWHERE image_guid = '$image->image_guid'\n\t\t\t\tAND page_guid = '\".$this->getGUID().\"'\n\t\t\t\tAND revision = \".$this->getRevision().\"\n\t\t\t\");\n\t\t\t$i++;\n\t\t}\n\t}", "title": "" }, { "docid": "609672a66cd132e6df1f822960e60e64", "score": "0.6226079", "text": "private function reorderImages() {\n $this->db->query('SELECT id, file_name\n FROM property_images\n WHERE image_hash IS NOT NULL \n AND order_id = 0\n ');\n\n $sql = 'UPDATE `property_images` SET order_id = CASE';\n\n $found = false;\n\n $ids = array();\n\n while ( $temp = $this->db->fetchassoc() ) {\n $number = $this->extractNumber($temp['file_name']);\n if ( $number ) {\n $ids[] = $temp['id'];\n $sql.= ' WHEN id = ' . $temp['id'] . ' THEN ' . $number . PHP_EOL;\n $found = true;\n }\n }\n\n $sql.= '\n\n ELSE order_id END\n\n WHERE image_hash IS NOT NULL AND id IN ( ' . implode(',', $ids) . ');';\n\n // only execute if theres an actual row to update\n if ( $found ) {\n $this->db->query($sql);\n }\n\n }", "title": "" }, { "docid": "55302fd3b43f9c16c86e0197d23f1d32", "score": "0.6156583", "text": "public function kmk_sort_meta_images() {\n\t\tglobal $wpdb; // WordPress database class\n\n\t\t$order = explode(',', $_POST[ 'order' ]);\n\t\t$counter = 0;\n\n\t\tforeach ($order as $image_id) {\n\t\t\t$wpdb->update($wpdb->posts, array( 'menu_order' => $counter ), array( 'ID' => $image_id ) );\n\t\t\t$counter++;\n\t\t}\n\t\tdie(1);\n\t}", "title": "" }, { "docid": "e5f1c2c8a105b7350c425db906bb2b07", "score": "0.6008022", "text": "public function updateGalleryOrder()\n {\n if (!isset($_POST['galleries'])) {\n Response::badRequest();\n }\n\n // Update gallery display orders\n foreach (explode(',', $_POST['galleries']) as $display_order => $id) {\n if ($gallery = gallery::select($id)) {\n $gallery->display_order = $display_order + 1;\n $gallery->update();\n }\n }\n\n // Success\n return true;\n }", "title": "" }, { "docid": "c27ffed48bebbf87d5f2339ad82ae420", "score": "0.59870315", "text": "public function sortDrag()\n {\n $this->jsonHeader();\n $adminId = (int)$_GET['adminId'];\n if ($adminId) {\n define('IN_ADMIN', 1);\n $_COOKIE['classified_session'] = $_COOKIE['admin_classified_session'];\n }\n\n $session = geoSession::getInstance();\n $session->initSession();\n\n $cart = geoCart::getInstance();\n //start up the cart\n $userId = ($adminId) ? (int)$_GET['userId'] : null;\n $cart->init(true, $userId);\n\n if (!$this->_validateCartStep()) {\n //invalid it seems?\n return;\n }\n\n //data to be returned\n $data = array();\n\n $imagesPreview = $_POST['imagesPreview'];\n\n $msgs = $cart->db->get_text(1, 10);\n\n //OK... get current images\n $oldImages = imagesOrderItem::getImagesCaptured();\n\n if (!$oldImages || !$imagesPreview) {\n return $this->_error($msgs[500684]);\n }\n $images_captured = $ids_used = $all_ids = array();\n foreach ($oldImages as $img) {\n $all_ids[(int)$img['id']] = (int)$img['id'];\n }\n foreach ($imagesPreview as $image_id) {\n $image_id = (int)$image_id;\n if (isset($all_ids[$image_id]) && !isset($ids_used[$image_id])) {\n $images_captured[] = array (\n 'type' => 1,\n 'id' => $image_id,\n );\n $ids_used[$image_id] = $image_id;\n }\n }\n array_unshift($images_captured, '');\n unset($images_captured[0]);\n\n //make sure there aren't any left over...\n if (count($all_ids) !== count($ids_used)) {\n //there were less items in the list than there is supposed to be...\n return $this->_error($msgs[500684]);\n }\n //save images\n //die ('images: '.print_r($images_captured,1));\n imagesOrderItem::setImagesCaptured($images_captured);\n\n $data['preview'] = $this->imagesBox();\n $data['msg'] = $msgs['500686'];\n echo $this->encodeJSON($data);\n }", "title": "" }, { "docid": "364d05327aed07f13ad18b79ad460673", "score": "0.59629464", "text": "public function reorder_images() {\n \n if ( ! isset( $_POST['data'] ) )\n die();\n \n list( $order, $post_id, $key, $nonce ) = explode( '|', $_POST['data'] );\n \n if ( ! wp_verify_nonce( $nonce, 'at_ajax_reorder' ) )\n die( '1' );\n \n parse_str( $order, $items );\n $items = $items['item'];\n $order = 1;\n foreach ( $items as $item ) {\n wp_update_post( array( 'ID' => $item, 'post_parent' => $post_id, 'menu_order' => $order ) );\n $order++;\n }\n \n die( '0' );\n \n }", "title": "" }, { "docid": "3c0047d07f3be24823532567f96f639c", "score": "0.5806502", "text": "public function gallery() {\n\t\t$elements = self::get();\n\n\t\tif ( ! empty( \\MyHomeCore\\My_Home_Core()->settings->props['mh-estate_slider'] )\n\t\t\t&& \\MyHomeCore\\My_Home_Core()->settings->props['mh-estate_slider'] == 'single-estate-slider'\n\t\t) {\n\t\t\tforeach ( $elements as $key => $element ) {\n\t\t\t\tif ( $element->type == Estate_Element::GALLERY ) {\n\t\t\t\t\tarray_splice( $elements, $key, 1 );\n\t\t\t\t\tupdate_option( self::OPTION_KEY, $elements );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $elements as $element ) {\n\t\t\tif ( $element['type'] == Estate_Element::GALLERY ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tarray_unshift(\n\t\t\t$elements, array(\n\t\t\t\t'label' => esc_html__( 'Gallery', 'myhome-core' ),\n\t\t\t\t'slug' => Estate_Element::GALLERY,\n\t\t\t\t'type' => Estate_Element::GALLERY\n\t\t\t)\n\t\t);\n\n\t\tupdate_option( self::OPTION_KEY, $elements );\n\t}", "title": "" }, { "docid": "037961bc01cc637bab633a412b5be899", "score": "0.5790002", "text": "function nesia_gallery_shortcode($attr) {\r\r\n\tglobal $post;\r\r\n \r\r\n\tstatic $instance = 0;\r\r\n\t$instance++;\r\r\n\r\r\n\t// Allow plugins/themes to override the default gallery template.\r\r\n\t$output = apply_filters('post_gallery', '', $attr);\r\r\n\tif ( $output != '' )\r\r\n\t\treturn $output;\r\r\n\r\r\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\r\r\n\tif ( isset( $attr['orderby'] ) ) {\r\r\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\r\r\n\t\tif ( !$attr['orderby'] )\r\r\n\t\t\tunset( $attr['orderby'] );\r\r\n\t}\r\r\n\r\r\n\textract(shortcode_atts(array(\r\r\n\t\t'order' => 'ASC',\r\r\n\t\t'orderby' => 'menu_order ID',\r\r\n\t\t'id' => $post->ID,\r\r\n\t\t'size' => 'full'\r\r\n\t), $attr));\r\r\n\r\r\n\t$id = intval($id);\r\r\n\tif ( 'RAND' == $order )\r\r\n\t\t$orderby = 'none';\r\r\n\r\r\n\tif ( !empty($include) ) {\r\r\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\r\r\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\r\n\r\r\n\t\t$attachments = array();\r\r\n\t\tforeach ( $_attachments as $key => $val ) {\r\r\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\r\r\n\t\t}\r\r\n\t} elseif ( !empty($exclude) ) {\r\r\n\t\t$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );\r\r\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\r\n\t} else {\r\r\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\r\n\t}\r\r\n\r\r\n\tif ( empty($attachments) )\r\r\n\t\treturn '';\r\r\n\r\r\n\tif ( is_feed() ) {\r\r\n\t\t$output = \"\\n\";\r\r\n\t\tforeach ( $attachments as $att_id => $attachment )\r\r\n\t\t\t$output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\r\r\n\t\treturn $output;\r\r\n\t}\r\r\n \r\r\n\t$i = 0;\r\r\n $output .= \"\r\r\n <figure class='entry-top'>\r\r\n <div class='entry-gallery-wrapper'>\r\r\n <div class='entry-top-gallery'>\";\r\r\n\tforeach ( $attachments as $id => $attachment ) {\r\r\n\t\t$link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);\r\r\n\r\r\n $output .= '<div class=\"top-gallery-item\">';\r\r\n $output .= $link;\r\r\n \r\r\n\t\tif ( trim($attachment->post_excerpt) ) \r\r\n $output .= '<div class=\"top-gallery-caption\">' . stripslashes($attachment->post_excerpt) . '</div>';\r\r\n\t\t\r\r\n $output .= '</div>';\r\r\n\t}\r\r\n\r\r\n\t$output .= \"\r\r\n </div>\r\r\n </div>\r\r\n </figure>\\n\";\r\r\n\r\r\n\treturn $output;\r\r\n}", "title": "" }, { "docid": "f247ea819c261a4bb9b63be2191c72fa", "score": "0.5780838", "text": "function ps2017_sidescroll_gallery() {\n\n // Get the post\n global $post;\n\n // Get first gallery from the post\n $gallery = get_post_gallery( get_the_ID(), false );\n\n if ($gallery) {\n\n // Split gallery shortcode into image IDs\n $imageIds = explode(',', $gallery['ids']);\n\n // Set init variable for while loop\n $i = 0;\n\n //Setup table\n echo '<div class=\"gallery-sidescroll\">';\n\n // Loop through array -> figure elements\n while ($i < count($imageIds)) {\n echo '<figure class=\"gallery-sidescroll-element\" id=\"gallery-item-' . ( $i + 1 ) . '\">';\n echo wp_get_attachment_image( $imageIds[$i], $size = 'medium', $icon = false, $attr = '' );\n echo '</figure>'; // .gallery-sidescroll-element\n $i++;\n };\n\n echo '</div>'; // .gallery-sidescroll\n };\n\n}", "title": "" }, { "docid": "fad51b49953d640147ffc01b3aa00551", "score": "0.57762283", "text": "public function galleryPositionDataProvider() {}", "title": "" }, { "docid": "f23a3b1761445e0e57f4616131587b2a", "score": "0.5757601", "text": "function move_album_by($album_row, $action = 'move_up', $steps = 1)\r\n\t{\r\n\t\tglobal $db;\r\n\r\n\t\t/**\r\n\t\t* Fetch all the siblings between the module's current spot\r\n\t\t* and where we want to move it to. If there are less than $steps\r\n\t\t* siblings between the current spot and the target then the\r\n\t\t* module will move as far as possible\r\n\t\t*/\r\n\t\t$sql = 'SELECT album_id, album_name, left_id, right_id\r\n\t\t\tFROM ' . GALLERY_ALBUMS_TABLE . \"\r\n\t\t\tWHERE parent_id = {$album_row['parent_id']}\r\n\t\t\t\tAND album_user_id = \" . NON_PERSONAL_ALBUMS . '\r\n\t\t\t\tAND ' . (($action == 'move_up') ? \"right_id < {$album_row['right_id']} ORDER BY right_id DESC\" : \"left_id > {$album_row['left_id']} ORDER BY left_id ASC\");\r\n\t\t$result = $db->sql_query_limit($sql, $steps);\r\n\r\n\t\t$target = array();\r\n\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t{\r\n\t\t\t$target = $row;\r\n\t\t}\r\n\t\t$db->sql_freeresult($result);\r\n\r\n\t\tif (!sizeof($target))\r\n\t\t{\r\n\t\t\t// The album is already on top or bottom\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t* $left_id and $right_id define the scope of the nodes that are affected by the move.\r\n\t\t* $diff_up and $diff_down are the values to substract or add to each node's left_id\r\n\t\t* and right_id in order to move them up or down.\r\n\t\t* $move_up_left and $move_up_right define the scope of the nodes that are moving\r\n\t\t* up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.\r\n\t\t*/\r\n\t\tif ($action == 'move_up')\r\n\t\t{\r\n\t\t\t$left_id = $target['left_id'];\r\n\t\t\t$right_id = $album_row['right_id'];\r\n\r\n\t\t\t$diff_up = $album_row['left_id'] - $target['left_id'];\r\n\t\t\t$diff_down = $album_row['right_id'] + 1 - $album_row['left_id'];\r\n\r\n\t\t\t$move_up_left = $album_row['left_id'];\r\n\t\t\t$move_up_right = $album_row['right_id'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$left_id = $album_row['left_id'];\r\n\t\t\t$right_id = $target['right_id'];\r\n\r\n\t\t\t$diff_up = $album_row['right_id'] + 1 - $album_row['left_id'];\r\n\t\t\t$diff_down = $target['right_id'] - $album_row['right_id'];\r\n\r\n\t\t\t$move_up_left = $album_row['right_id'] + 1;\r\n\t\t\t$move_up_right = $target['right_id'];\r\n\t\t}\r\n\r\n\t\t// Now do the dirty job\r\n\t\t$sql = 'UPDATE ' . GALLERY_ALBUMS_TABLE . \"\r\n\t\t\tSET left_id = left_id + CASE\r\n\t\t\t\tWHEN left_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}\r\n\t\t\t\tELSE {$diff_down}\r\n\t\t\tEND,\r\n\t\t\tright_id = right_id + CASE\r\n\t\t\t\tWHEN right_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}\r\n\t\t\t\tELSE {$diff_down}\r\n\t\t\tEND,\r\n\t\t\talbum_parents = ''\r\n\t\t\tWHERE\r\n\t\t\t\tleft_id BETWEEN {$left_id} AND {$right_id}\r\n\t\t\t\tAND right_id BETWEEN {$left_id} AND {$right_id}\r\n\t\t\t\tAND album_user_id = \" . NON_PERSONAL_ALBUMS;\r\n\t\t$db->sql_query($sql);\r\n\r\n\t\treturn $target['album_name'];\r\n\t}", "title": "" }, { "docid": "b5c663ead5d4d3b910b1a47a7d0abde6", "score": "0.5714931", "text": "function generateGallerySidecards ()\n{\n /***\n * Takes the rank of the image and returns the filename of the appropriate thumbnail\n *\n * @param $rank - the rank of the image\n *\n */\n function chooseThumbnail ($rank) {\n\n $i = ceil ($rank / 100); // round up to the nearest integer\n\n switch ($i) {\n case 1:\n return (\"1-100.png\");\n break;\n case 2:\n return (\"101-200.png\");;\n break;\n case 3:\n return (\"201-300.png\");\n break;\n case 4:\n return (\"301-400.png\");\n break;\n case 5:\n return (\"401-500.png\");\n break;\n default:\n return (\"over500.png\");\n }\n }\n\n//Pull exhibit data from tab-separated file into an associative array\n $checklistfilename = \"data/pinkexhibit.tsv\";\n\n $header = null;\n $pinkdata = array();\n $lines = file($checklistfilename);\n\n foreach ($lines as $line) {\n $values = str_getcsv($line, \"\\t\");\n if (!$header) $header = $values;\n else $pinkdata[] = array_combine($header, $values);\n }\n\n//Pull algorithm data from tab-separated file into an associative array\n $algorithmfilename = \"data/pink-algorithms.tsv\";\n\n $header = null;\n $pinkalgorithms = array();\n $lines = file($algorithmfilename);\n\n foreach ($lines as $line) {\n $values = str_getcsv($line, \"\\t\");\n if (!$header) $header = $values;\n else $pinkalgorithms[] = array_combine($header, $values);\n }\n\n// Generate the ready function that contains the gallery scripts for each image\n $pinkgallery = '<script type=\"text/javascript\">';\n $pinkgallery .= '$(document).ready(function (){ ';\n\n// Generate the lightGallery javascript for each image in the exhibit\n foreach ($pinkdata as $pinkimage) {\n\n // Tie the scripts to the html element for each dynamic lightGallery based on the filename\n $pinkgallery .= \"\n $('#_\" . preg_replace(\"/[^A-Za-z0-9 ]/\", '', $pinkimage['filename']) . \"').on('click', function() { \n \";\n $pinkgallery .= \"$(this).lightGallery({\n dynamic: true,\n dynamicEl: [{\";\n\n //Create the entry for the original image\n $pinkgallery .= '\n \"src\":' . \" 'images/original/\" . $pinkimage['filename'] . \".jpg',\";\n $pinkgallery .= \"\n 'thumb': 'images/thumbs/original.png',\";\n $pinkgallery .= \"\n 'subHtml': '\" . $pinkimage['image-info'] . \"'\n \";\n $pinkgallery .= ' }';\n\n // Iterate through each algorith and generate the sidecar image for the lightGallery\n foreach ($pinkalgorithms as $algorithm) {\n // Sample of the loop generated code\n //, {\n //\"src\": 'images/plain/IMG_78.38.31.png',\n //'thumb': 'images/thumbs/PinkCircles2.png',\n //'subHtml': \"<h4>Plain</h4><p>Lots of information about the Plain Algortithm</p>\"\n // }\n\n // Original are jpg but sidecars are png\n $sidecarImage = $algorithm['name'] . \"/\" . $pinkimage['filename'] .\".png\";\n\n // Thumbnails are stored in the algorithm directory, prefaced by thumb- and are assumed to be svg images\n $rankValue = $algorithm['name'].\"-rank\";\n $sidecarThumb = \"/thumbs/\" . chooseThumbnail($pinkimage[$rankValue]);\n\n $pinkgallery .= ', {\n \"src\": ';\n $pinkgallery .= \"'images/\" . $sidecarImage . \"',\n 'thumb': 'images/\" . $sidecarThumb. \"',\";\n $pinkgallery .= \"\n 'subHtml': \" . \"'\" . $algorithm['description'] . \"'\n }\";\n }\n\n //Close the script for each image\n $pinkgallery .= \"],\t\n share: false,\n autoplayControls: false,\n download: false,\n actualSize: false,\n fullScreen: false,\n toogleThumb: false,\n thumbWidth: 50,\n thumbHeight: '50px',\n thumbContHeight: 70,\n loadVimeoThumbnail: false\n });\n });\n \";\n }\n $pinkgallery .= '})\n \n </script>';\n\n echo $pinkgallery;\n\n}", "title": "" }, { "docid": "e077e40997e1bcf611129a3ac61b6cab", "score": "0.5687316", "text": "function getGalleriesOrdering() {\n $methods = array(\"\", \"ordering, gid ASC\", \"ordering, gid DESC\",\n \"ordering, name ASC\", \"ordering, name DESC\");\n \n return $methods[intval(zmgFactory::getConfig()->get('layout/ordering/galleries'))];\n }", "title": "" }, { "docid": "abf1076115351364af2c9fe8832d7455", "score": "0.56615585", "text": "function reorder_posts() {\n\t\tglobal $wp_query;\n\n\t\tif( !is_tax() && !is_category() && !is_tag() )\n\t\t\treturn;\n\n\t\t$have_images = array();\n\t\t$no_image = array();\n\n\t\tforeach( $wp_query->posts as $post ) {\n\t\t\tif( count( $have_images ) < 4 && has_post_thumbnail( $post->ID ) ) {\n\t\t\t\t$have_images[] = $post;\n\t\t\t} else {\n\t\t\t\t$no_image[] = $post;\n\t\t\t}\n\t\t}\n\n\t\t$wp_query->has_images = $have_images;\n\t\t$wp_query->posts = array_merge( $have_images, $no_image );\n\t}", "title": "" }, { "docid": "719bfbb81d17b505bd3e55fc88826015", "score": "0.5640112", "text": "function ext_gallery_images_action() \n\t{\n\t\tglobal $IN, $DB, $SESS;\n\n\t\t# Images Path\n\t\t$files_path = $this->settings['files_path'].$IN->GBL('entry_id').'/';\n\t\t$files_url = $this->settings['files_url'].$IN->GBL('entry_id').'/';\n\n\t\t# Single Entry Modification\n\t\tswitch($IN->GBL('A')) {\n\t\t\tcase 'image_cover': \n\t\t\t\t# Reset all the covers to NO\n\t\t\t\t$sql_query = 'UPDATE exp_mc_gallery_images SET cover=\"No\" WHERE entry_id=\"'.$IN->GBL('entry_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\n\t\t\t\t# Set selected Image to be the cover\n\t\t\t\t$sql_query = 'UPDATE exp_mc_gallery_images SET cover=\"Yes\" WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 'image_caption': \n\t\t\t\t# Set selected Image to be the cover\n\t\t\t\t$sql_query = 'UPDATE exp_mc_gallery_images SET caption=\"'.$IN->GBL('caption').'\" WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\n\t\t\t\t//echo 'alert(\"Set Caption to '.$IN->GBL('caption').' for image_id '.$IN->GBL('image_id').'\");';\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 'image_description': \n\t\t\t\t# Set selected Image to be the cover\n\t\t\t\t$sql_query = 'UPDATE exp_mc_gallery_images SET description=\"'.$IN->GBL('description').'\" WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\n\t\t\t\t//echo 'alert(\"Set Description to '.$IN->GBL('description').' for image_id '.$IN->GBL('image_id').'\");';\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 'image_order': \n\t\t\t\t# Set selected Image to be the cover\n\t\t\t\t$sql_query = 'UPDATE exp_mc_gallery_images SET order_id=\"'.$IN->GBL('order_id').'\" WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 'image_delete': \n\n\t\t\t\t# Set selected Image to be the cover\n\t\t\t\t$sql_query = 'SELECT filename FROM exp_mc_gallery_images WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$results = $DB->query($sql_query);\n\n//\t\t\t\tlist($filename,$file_extension) = explode('.',$results->row['filename']);\n\t\t\t\tlist($filename,$file_extension) = $this->_get_file_extension($results->row['filename']);\n\n\t\t\t\t$files['original'] = $filename.'.'.$file_extension;\n\t\t\t\t$files['small'] = $filename.'_s.'.$file_extension;\n\t\t\t\t$files['medium'] = $filename.'_m.'.$file_extension;\n\t\t\t\t$files['large'] = $filename.'_l.'.$file_extension;\n\t\t\t\t$files['thumbnail'] = $filename.'_thumb.'.$file_extension;\n\n\t\t\t\t# Delete Small, Medium, Large, Thumbnail Images\n\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\tif (file_exists($files_path.$file)) {\n\t\t\t\t\t\tunlink($files_path.$file);\n#\t\t\t\t\t} else {\n#\t\t\t\t\t\techo 'alert(\"Image '.$files_path.$file.' does not exist.\");';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$sql_query = 'DELETE FROM exp_mc_gallery_images WHERE image_id=\"'.$IN->GBL('image_id').'\"';\n\t\t\t\t$DB->query($sql_query);\n\n\t\t\t\techo 'alert(\"Successfully Deleted Image\");';\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t# Multiple Entries Multiplication\n\t\t$sql_query = 'SELECT filename FROM exp_mc_gallery_images WHERE entry_id = \"'.$IN->GBL('entry_id').'\"';\n\t\t$results = $DB->query($sql_query);\n\t\tforeach($results->result as $fields) {\n\n\t\t\t# list($filename,$file_extension) = explode('.',$fields['filename']);\n\t\t\tlist($filename,$file_extension) = $this->_get_file_extension($fields['filename']);\n\t\t\t$source_path = $files_path.$filename.'.'.$file_extension;\n\t\t\tif ($IN->GBL('which') == 'small') {\n\t\t\t\t$target_path = $files_path.$filename.'_s.'.$file_extension;\n\t\t\t} else if ($IN->GBL('which') == 'medium') {\n\t\t\t\t$target_path = $files_path.$filename.'_m.'.$file_extension;\n\t\t\t} else if ($IN->GBL('which') == 'large') {\n\t\t\t\t$target_path = $files_path.$filename.'_l.'.$file_extension;\n\t\t\t} else {\n\t\t\t\techo 'alert(\"Unable to determine target_path > WHICH '.$IN->GBL('which').' \");';\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tswitch($IN->GBL('A')) {\n\t\t\t\tcase 'entry_recreate': \n//\t\t\t\t\techo 'alert(\"RECREATE SOURCE: '.$source_path.' > TARGET: '.$target_path.' > Which: \\\"'.$IN->GBL('which').'\\\" Image: \\\"'.$IN->GBL('image_width').'\\\" by \\\"'.$IN->GBL('image_height').'\\\" pixels\");';\n\n\t\t\t\t\t# Recreate Image\n\t\t\t\t\t$this->_recreate_image($source_path,$target_path,$IN->GBL('image_width'),$IN->GBL('image_height'),$IN->GBL('image_quality'),$IN->GBL('image_scale'),$file_extension);\n\n\t\t\t\t\t$message = 'alert(\"Succesfully recreated resized images.\")';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'entry_delete': \n\n\t\t\t\t\t# Delete Target Images\n\t\t\t\t\tif (file_exists($target_path)) {\n\t\t\t\t\t\tunlink($target_path);\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = 'alert(\"Succesfully deleted images.\")';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tswitch($IN->GBL('A')) {\n\t\t\tcase 'entry_recreate': \n\t\t\t\t# $small_height,$small_width,$small_quality,$small_scale,$medium_height,$medium_width,$medium_quality,$medium_scale,$large_height,$large_width,$large_quality,$large_scale\n\n\t\t\t\tif ($IN->GBL('which') == 'small') {\n\t\t\t\t\t$this->settings['small_width'] = $IN->GBL('image_width');\n\t\t\t\t\t$this->settings['small_height'] = $IN->GBL('image_height');\n\t\t\t\t\t$this->settings['small_quality'] = $IN->GBL('image_quality');\n\t\t\t\t\t$this->settings['small_scale'] = $IN->GBL('image_scale');\n\t\t\t\t} else if ($IN->GBL('which') == 'medium') {\n\t\t\t\t\t$this->settings['medium_width'] = $IN->GBL('image_width');\n\t\t\t\t\t$this->settings['medium_height'] = $IN->GBL('image_height');\n\t\t\t\t\t$this->settings['medium_quality'] = $IN->GBL('image_quality');\n\t\t\t\t\t$this->settings['medium_scale'] = $IN->GBL('image_scale');\n\t\t\t\t} else if ($IN->GBL('which') == 'large') {\n\t\t\t\t\t$this->settings['large_width'] = $IN->GBL('image_width');\n\t\t\t\t\t$this->settings['large_height'] = $IN->GBL('image_height');\n\t\t\t\t\t$this->settings['large_quality'] = $IN->GBL('image_quality');\n\t\t\t\t\t$this->settings['large_scale'] = $IN->GBL('image_scale');\n\t\t\t\t}\n\n\t\t\t\t$data = $this->settings['small_width'].'||'.$this->settings['small_height'].'||'.$this->settings['small_quality'].'||'.$this->settings['small_scale'].'||'.$this->settings['medium_width'].'||'.$this->settings['medium_height'].'||'.$this->settings['medium_quality'].'||'.$this->settings['medium_scale'].'||'.$this->settings['large_width'].'||'.$this->settings['large_height'].'||'.$this->settings['large_quality'].'||'.$this->settings['large_scale'];\n\n//\t\t\t\techo 'alert(\"data: '.addslashes($data).'\");';\n\n\t\t\t\t$fp = fopen($files_path.'data.txt','w');\n\t\t\t\tif(!$fp) {\n\t\t\t\t\techo 'alert(\"Error: Cannot open file.\");';\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\tfwrite($fp,$data);\n\t\t\t\tfclose($fp);\n\n\t\t\t\tbreak;\n\t\t}\n\n\n\t\techo $message;\n\t\texit;\n\t}", "title": "" }, { "docid": "4fad1ea60b2f5b98faac4114c2432a64", "score": "0.56207824", "text": "function escapade_move_elements() {\n\n\tremove_action( 'primer_header', 'primer_add_hero', 7 );\n\tremove_action( 'primer_after_header', 'primer_add_page_title', 12 );\n\tremove_action( 'primer_site_info', 'primer_add_social_navigation', 7 );\n\tremove_action( 'primer_before_site_navigation', 'primer_add_mobile_menu' );\n\n\tadd_action( 'primer_pre_hero', 'primer_video_header' );\n\n\tif ( ! is_front_page() || ! is_active_sidebar( 'hero' ) ) {\n\n\t\tadd_action( 'primer_hero', 'primer_add_page_title', 12 );\n\n\t}\n\n}", "title": "" }, { "docid": "35455949641117ea430313ad29d7f295", "score": "0.56194705", "text": "function get_main_slides()\n{\n $gallery = get_post_gallery_images_with_info();\n ob_start();\n if ($gallery): ?>\n <?php foreach ($gallery as $image_obj): ?>\n <div class=\"swiper-slide\">\n <div class=\"main-screen main-screen_photo\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"main-screen__inner\">\n <h1 class=\"main-screen__title\"><?= $image_obj['title'] ?></h1>\n <div class=\"main-screen__descr\">\n <?= $image_obj['description'] ?>\n </div>\n <div>\n <a href=\"<?= get_permalink(11) ?>\" class=\"main-screen__btn btn-primary\">Посмотреть\n услуги</a>\n </div>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"main-screen__img\">\n <img style=\"<?= $image_obj['caption'] ?>\" src=\"<?= $image_obj['src'] ?>\"\n alt=\"<?= $image_obj['title'] ?>\">\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <?php endforeach; ?>\n <?php\n endif;\n return ob_get_clean();\n}", "title": "" }, { "docid": "1a0eae334c6ef3a20b8cfa4bcf0d3405", "score": "0.5601441", "text": "public function gallery()\n {\n }", "title": "" }, { "docid": "98666753a6794cd379112d65cdbdab7d", "score": "0.55973244", "text": "function create_image_gallery($gallery_name) {\r\n global $wpdb;\r\n global $andro_gallery_table;\r\n global $andro_gallery_image_table;\r\n\r\n $gallery = $wpdb->get_row(\"SELECT gallery_id,gallery_name FROM $andro_gallery_table WHERE gallery_slug = '$gallery_name'\");\r\n $imageResults = $wpdb->get_results(\"SELECT * FROM $andro_gallery_image_table WHERE gallery_image_gallery_id = $gallery->gallery_id ORDER BY gallery_image_sort_order ASC\");\r\n\r\n $images = '';\r\n $i = 0;\r\n foreach ($imageResults as $image) {\r\n $images .= '<img href=\"'.$image->gallery_image_path.'\" class=\"andro-gallery\" height=\"100\" width=\"100\" src=\"'.$image->gallery_image_path.'\" title=\"'.$image->gallery_image_description.'\"/>';\r\n }\r\n return generate_html($images);\r\n}", "title": "" }, { "docid": "dcd8952599d7ee029b96a90537d9ec91", "score": "0.5596165", "text": "public function sort()\n {\n if ($this->request->is('post')) {\n $order = explode(\",\", $_POST['order']);\n $i = 1;\n foreach ($order as $photo) {\n $this->Picture->read(null, $photo);\n $this->Picture->set('order', $i);\n $this->Picture->save();\n $i++;\n }\n }\n\n $this->render(false, false);\n }", "title": "" }, { "docid": "970f171e02b6b38cec2f011b633649ed", "score": "0.5587633", "text": "function urbegg_move_deck_orders() {\n\t# Get the globals:\n\tglobal $post, $wp_meta_boxes;\n\n\t# Output the \"advanced\" meta boxes:\n\tdo_meta_boxes( get_current_screen(), 'egghigh', $post );\n\n\t# Remove the initial \"advanced\" meta boxes:\n\tunset($wp_meta_boxes['post']['egghigh']);\n}", "title": "" }, { "docid": "75e9bdc0f6031315af51a9292ad1e890", "score": "0.55814564", "text": "public function movePostFromEndToTheMiddle() {}", "title": "" }, { "docid": "e5ab2eda64629a23dce56bc666f004cc", "score": "0.5580378", "text": "private function arrangeImages()\n {\n switch ($this->imagesBlockData['profile']) {\n case 'L':\n case 'P':\n $this->calculateImagesWidthsAndHeights1a(0);\n break;\n case 'LL':\n case 'LP':\n case 'PP':\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n break;\n case 'LLL':\n case 'LLP':\n case 'LPP':\n case 'PPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 2);\n break;\n case 'LLLP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 3);\n break;\n case 'LPPP':\n $this->calculateImagesWidthsAndHeights3a(1, 2, 3);\n $this->calculateImagesWidthsAndHeights1a(0);\n break;\n case 'LLLL':\n case 'LLPP':\n case 'PPPP':\n $this->calculateImagesWidthsAndHeights2a(2, 0);\n $this->calculateImagesWidthsAndHeights2a(1, 3);\n break;\n case 'LLLLL':\n $this->calculateImagesWidthsAndHeights3a(0, 1, 2);\n $this->calculateImagesWidthsAndHeights2a(3, 4);\n break;\n case 'LLLLP':\n case 'LLLPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 4);\n $this->calculateImagesWidthsAndHeights2a(2, 3);\n break;\n case 'LLPPP':\n case 'LPPPP':\n $this->calculateImagesWidthsAndHeights3b(2, 3, 4);\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n break;\n case 'PPPPP':\n $this->calculateImagesWidthsAndHeights2a(4, 0);\n $this->calculateImagesWidthsAndHeights3a(1, 2, 3);\n break;\n case 'LLLLLL':\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n $this->calculateImagesWidthsAndHeights2a(2, 3);\n $this->calculateImagesWidthsAndHeights2a(4, 5);\n break;\n case 'LLLLLP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 5);\n $this->calculateImagesWidthsAndHeights2a(3, 4);\n break;\n case 'LLLLPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 4);\n $this->calculateImagesWidthsAndHeights3b(2, 3, 5);\n break;\n case 'LLLPPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 5);\n $this->calculateImagesWidthsAndHeights3c(2, 3, 4);\n break;\n case 'LLPPPP':\n $this->calculateImagesWidthsAndHeights3b(0, 2, 4);\n $this->calculateImagesWidthsAndHeights3b(1, 3, 5);\n break;\n case 'LPPPPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 5);\n $this->calculateImagesWidthsAndHeights3a(2, 3, 4);\n break;\n case 'PPPPPP':\n $this->calculateImagesWidthsAndHeights3a(3, 4, 5);\n $this->calculateImagesWidthsAndHeights3a(0, 1, 2);\n break;\n\n case 'LLLLLLL':\n $this->calculateImagesWidthsAndHeights3a(0, 1, 2);\n $this->calculateImagesWidthsAndHeights2a(3, 4);\n $this->calculateImagesWidthsAndHeights2a(5, 6);\n break;\n case 'LLLLLLP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 6);\n $this->calculateImagesWidthsAndHeights3a(3, 4, 5);\n break;\n case 'LLLLLPP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 5);\n $this->calculateImagesWidthsAndHeights3b(3, 4, 6);\n break;\n case 'LLLLPPP':\n case 'LLLPPPP':\n $this->calculateImagesWidthsAndHeights3b(0, 1, 5);\n $this->calculateImagesWidthsAndHeights4b(2, 3, 4, 6);\n break;\n case 'LLPPPPP':\n $this->calculateImagesWidthsAndHeights3a(4, 5, 6);\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n $this->calculateImagesWidthsAndHeights2a(2, 3);\n break;\n case 'LPPPPPP':\n $this->calculateImagesWidthsAndHeights3a(0, 1, 2);\n $this->calculateImagesWidthsAndHeights4b(3, 4, 5, 6);\n break;\n case 'PPPPPPP':\n $this->calculateImagesWidthsAndHeights4a(0, 1, 2, 3);\n $this->calculateImagesWidthsAndHeights3b(4, 5, 6);\n break;\n\n case 'LLLLLLLL':\n $this->calculateImagesWidthsAndHeights3a(0, 1, 2);\n $this->calculateImagesWidthsAndHeights2a(3, 4);\n $this->calculateImagesWidthsAndHeights3a(5, 6, 7);\n break;\n case 'LLLLLLLP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 7);\n $this->calculateImagesWidthsAndHeights2a(3, 4);\n $this->calculateImagesWidthsAndHeights2a(5, 6);\n break;\n case 'LLLLLLPP':\n case 'LLLLLPPP':\n case 'LLLLPPPP':\n $this->calculateImagesWidthsAndHeights4b(0, 1, 2, 6);\n $this->calculateImagesWidthsAndHeights4c(3, 4, 5, 7);\n break;\n case 'LLLPPPPP':\n $this->calculateImagesWidthsAndHeights3a(4, 5, 6);\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n $this->calculateImagesWidthsAndHeights3a(2, 3, 7);\n break;\n case 'LLPPPPPP':\n case 'LPPPPPPP':\n $this->calculateImagesWidthsAndHeights3b(5, 6, 7);\n $this->calculateImagesWidthsAndHeights2a(0, 1);\n $this->calculateImagesWidthsAndHeights3c(2, 3, 4);\n break;\n case 'PPPPPPPP':\n $this->calculateImagesWidthsAndHeights4a(0, 1, 2, 3);\n $this->calculateImagesWidthsAndHeights4a(4, 5, 6, 7);\n break;\n default:\n }\n }", "title": "" }, { "docid": "f2ce580eacb16aff2531ccdb1773948e", "score": "0.5575762", "text": "function storey_post_gallery( $postid, $imagesize = '', $layout = 'slideshow' ) {\n\n if ( get_post_type($postid) == 'portfolio' ) {\n $image_ids_raw = get_post_meta($postid, '_tzp_gallery_images_ids', true);\n } else {\n $image_ids_raw = get_post_meta($postid, '_zilla_image_ids', true);\n }\n\n if( $image_ids_raw != '' ) {\n // custom gallery created\n $image_ids = explode(',', $image_ids_raw);\n $orderby = 'post__in';\n $post_parent = null;\n } else {\n // pull all images attached to post\n $image_ids = '';\n $orderby = 'menu_order';\n $post_parent = $postid;\n }\n\n // get the gallery images\n $args = array(\n 'include' => $image_ids,\n 'numberposts' => -1,\n 'orderby' => $orderby,\n 'order' => 'ASC',\n 'post_type' => 'attachment',\n 'post_parent' => $post_parent,\n 'post_mime_type' => 'image',\n 'post_status' => 'null'\n );\n $attachments = get_posts($args);\n\n $output = '';\n\n if( !empty($attachments) ) {\n $output .= \"<div class='zilla-gallery-container'>\";\n $output .= \"<!--BEGIN #zilla-gallery-$postid -->\\n<ul id='zilla-gallery-\" . esc_attr($postid) . \"' class='zilla-gallery \" . esc_attr($layout) . \"'>\";\n\n // create a fragment so that we can add a filter to be hooked into\n $fragment = '';\n foreach( $attachments as $attachment ) {\n $src = wp_get_attachment_image_src( $attachment->ID, $imagesize );\n $caption = $attachment->post_excerpt;\n $caption = ($caption) ? \"<div class='wp-caption-text'>$caption</div>\" : '';\n $alt = ( !empty($attachment->post_content) ) ? $attachment->post_content : $attachment->post_title;\n $fragment .= \"<li><img height='\" . esc_attr($src[2]) . \"' width='\" . esc_attr($src[1]) . \"' src='\" . esc_url($src[0]) . \"' alt='\" . esc_attr($alt) . \"' />$caption</li>\";\n }\n $fragment = apply_filters('storey_filter_gallery_content', $fragment, $postid);\n $output .= $fragment;\n\n $output .= '</ul>';\n\n /*if( $layout != 'stacked' ) {\n $output .= '<div class=\"zilla-slider-nav\">';\n $output .= '<a href=\"#\" id=\"zilla-slide-prev-'. esc_attr($postid) .'\" class=\"zilla-slide-prev\">&larr;' . __('Previous', 'zilla') . '</a>';\n $output .= '<a href=\"#\" id=\"zilla-slide-next-'. esc_attr($postid) .'\" class=\"zilla-slide-next\">' . __('Next', 'zilla') . '&rarr;</a>';\n $output .= '</div>';\n }*/\n $output .= '</div>';\n }\n\n return $output;\n}", "title": "" }, { "docid": "6450c3857da81e507a918823030be40f", "score": "0.5573047", "text": "function ppm_move_album($target_cat, $id, $ppm_test_mode)\n{\n global $page;\n\n // retrieve information about current category\n $source_cat_info = get_cat_info($id);\n $source_cat_name = $source_cat_info['name'];\n $source_dir = get_fulldirs(explode(',', $source_cat_info['uppercats']))[$id];\n\n // no move necessary (same category selected)\n // (this SHOULD never happen since the current category is excluded from the list)\n if ($target_cat == $id)\n {\n // build no work message\n $no_work_msg = l10n('MSG_NO_WORK_1').' - '.l10n('MSG_NO_WORK_2');\n\n array_push(\n $page['messages'],\n sprintf($no_work_msg)\n );\n }\n else\n {\n if ($target_cat == 'ROOT')\n {\n // get root URL for selected category's site\n $query = '\n SELECT galleries_url\n FROM '.SITES_TABLE.','.CATEGORIES_TABLE.'\n WHERE '.CATEGORIES_TABLE.'.site_id = '.SITES_TABLE.'.id\n AND '.CATEGORIES_TABLE.'.id = '.$id.'\n ;';\n list($root_url) = pwg_db_fetch_row(pwg_query($query));\n\n $dest_cat_path = $root_url;\n $dest_cat_path_final = $dest_cat_path.$source_cat_info['dir'];\n\n // override ROOT in target_cat with NULL (for database update below)\n $target_cat = NULL;\n }\n else\n {\n // get destination category information\n $dest_cat_info = get_cat_info($target_cat);\n $dest_cat_path = get_fulldirs(explode(',', $dest_cat_info['uppercats']))[$target_cat];\n $dest_cat_path_final = $dest_cat_path.'/'.$source_cat_info['dir'];\n }\n\n // check to see if directory already exists in destination \n // (this can happen if the parent directory of the current category is selected)\n if (file_exists($dest_cat_path_final))\n {\n $error_msg = $dest_cat_path_final.': '.l10n('MSG_ALBUM_EXISTS_ERR');\n\n array_push(\n $page['errors'],\n sprintf($error_msg)\n );\n }\n else\n {\n // build debugging messages (for test mode)\n if ($ppm_test_mode)\n {\n // build debug strings\n $debug_line_1 = l10n('DBG_SRC').' '.$source_dir;\n $debug_line_2 = l10n('DBG_DEST').' '.$dest_cat_path_final;\n\n array_push(\n $page['messages'],\n sprintf($debug_line_1),\n sprintf($debug_line_2)\n );\n } \n else\n {\n $move_status_ok = true;\n \n // move the directory\n $move_status_ok = ppm_move_file_or_folder($source_dir, $dest_cat_path_final);\n @ppm_chmod_r($dest_cat_path_final);\n\n if ($move_status_ok) \n {\n //move the derivatives folder (thumbnails, resizes, etc.) if it exists\n $source_derivatives = './'.PWG_DERIVATIVE_DIR.$source_dir;\n $dest_derivatives = './'.PWG_DERIVATIVE_DIR.$dest_cat_path_final;\n $dest_derivatives_parent = './'.PWG_DERIVATIVE_DIR.$dest_cat_path;\n if (is_dir($source_derivatives))\n {\n // make sure the parent target folder structure exists\n if (!is_dir($dest_derivatives_parent))\n {\n // create the missing parent folder structure\n mkdir($dest_derivatives_parent, 0777, true);\n\n // build informational message\n $parent_msg = l10n('MSG_DIR_CREATED').$dest_derivatives_parent;\n\n array_push(\n $page['warnings'],\n sprintf($parent_msg)\n );\n }\n\n $move_status_ok = ppm_move_file_or_folder($source_derivatives, $dest_derivatives);\n @ppm_chmod_r($dest_derivatives);\n }\n }\n\n // make the database changes associated with the move\n if ($move_status_ok)\n {\n // update parent album (id_uppercat) on the categories table\n single_update(\n CATEGORIES_TABLE,\n array(\n 'id_uppercat' => $target_cat\n ),\n array('id' => $id)\n );\n\n // update uppercats (album path) for the album move\n update_uppercats();\n\n // update global ranks (categories menu) to reflect album move\n update_global_rank();\n\n // update the image paths for items in the moved album (and sub-albums).\n // this is based on the update_path() function in admin/include/functions.php\n // except instead of updating ALL the paths on the images table, it only\n // updates images in the affected categories\n $query = '\n SELECT DISTINCT(storage_category_id)\n FROM '.IMAGES_TABLE.'\n WHERE storage_category_id IS NOT NULL\n AND storage_category_id in ('.$id.','.implode(',',get_subcat_ids(array($id))).')\n ;';\n $cat_ids = query2array($query, null, 'storage_category_id');\n $fulldirs = get_fulldirs($cat_ids);\n\n foreach ($cat_ids as $cat_id)\n {\n $query = '\n UPDATE '.IMAGES_TABLE.'\n SET path = '.pwg_db_concat(array(\"'\".$fulldirs[$cat_id].\"/'\",'file')).'\n WHERE storage_category_id = '.$cat_id.'\n ;';\n pwg_query($query);\n }\n\n // invalidate user cache (album/photo counts, etc.) to reflect the album move\n invalidate_user_cache();\n\n // build success message\n $success_msg = $source_dir.': '.l10n('MSG_DIR_MOVE_SUCCESS').$dest_cat_path_final.'.';\n\n array_push(\n $page['infos'],\n sprintf($success_msg)\n );\n } // end database changes\n else // an error occurred during the file system moves\n {\n // build directory move error message\n $error_msg = $dest_cat_path_final.': '.l10n('MSG_DIR_MOVE_ERR').' '.l10n('MSG_CHECK_LOG');\n\n array_push(\n $page['errors'],\n sprintf($error_msg)\n );\n }\n\n } // move album\n } \n } // end check for no work\n}", "title": "" }, { "docid": "fca57b0e83524da6340362110ea73c77", "score": "0.5545967", "text": "public function order()\r\n\t{\r\n\t\t$nli \t\t= JRequest::getVar( 'nli', null );\r\n\t\t$object_id \t= JRequest::getInt( 'object_id', null );\r\n\r\n\t\t$db \t\t= &JFactory::getDbo();\r\n\t\t$user \t\t= &JFactory::getUser();\r\n\t\t$user_id \t= (int) $user->get( 'id' );\r\n\r\n\t\tif( !$user->authorise( 'core.edit', 'com_di' ) )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif( isset( $nli ) && is_array( $nli ) && $object_id && $user_id )\r\n\t\t{\r\n\t\t\t$query = \"SELECT object_image_id FROM #__di_images WHERE object_id = '\" . $object_id . \"'\";\r\n\t\t\t$db->setQuery( $query );\r\n\t\t\t$images = $db->loadObjectList();\r\n\r\n\t\t\t$images_ids = '';\r\n\t\t\tif( is_array( $images ) )\r\n\t\t\t{\r\n\t\t\t\tforeach( $images as $image )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( $images_ids !== '')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$images_ids .= ',' . $image->object_image_id;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$images_ids .= $image->object_image_id;\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$items = '';\r\n\t\t\tforeach( $nli as $item )\r\n\t\t\t{\r\n\t\t\t\tif( $items !== '' )\r\n\t\t\t\t{\r\n\t\t\t\t\t$items .= ',' . (int)$item;\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$items .= (int)$item;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$query = 'UPDATE #__di_images SET ordering = FIND_IN_SET(object_image_id, \"' . $items . '\") WHERE object_image_id IN (' . $images_ids . ')';\r\n\t\t\t$db->setQuery( $query );\r\n\t\t\t$db->query();\r\n\r\n\t\t\t$this->setResponse( 'status', $db->getAffectedRows() );\r\n\t\t\t$this->setResponse( 'message', 'SUCCESS' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8b220acd7bb8f611eb54dde07c943efd", "score": "0.55409133", "text": "function urbegg_move_deck() {\n\t# Get the globals:\n\tglobal $post, $wp_meta_boxes;\n\n\t# Output the \"advanced\" meta boxes:\n\tdo_meta_boxes( get_current_screen(), 'egghigh', $post );\n\n\t# Remove the initial \"advanced\" meta boxes:\n\tunset($wp_meta_boxes['post']['egghigh']);\n}", "title": "" }, { "docid": "0a4ea180f1a4eed7552fd57451d432c2", "score": "0.55364335", "text": "function get_gallery() {\n\tinclude 'includes/connect.php';\n\tinclude_once 'functions/comment_functions.php';\n\tinclude_once 'functions/like_functions.php';\n\n\t$get_imgs = \"SELECT * FROM images ORDER BY date_created DESC\";\n\t$exe_imgs = $con->prepare($get_imgs);\n\t$exe_imgs->execute();\n\n\twhile ($image = $exe_imgs->fetch()) {\n\t\t$img_name = $image['img_name'];\n\t\t$img_id = $image['img_id'];\n\t\t$cmnts_amnt = get_comment_count($img_id);\n\t\t$likes_amnt = get_like_count($img_id);\n\t\techo \"\t<div class='tile is-ancestor'>\n\t\t\t\t\t<div class='tile is-12 is-vertical'>\n\t\t\t\t\t\t<div class='tile is-parent'>\n\t\t\t\t\t\t<article class='tile is-child box'>\n\t\t\t\t\t\t\t<figure class='image'>\n\t\t\t\t\t\t\t\t\t<a href='image_page.php?img=$img_id'>\n\t\t\t\t\t\t\t\t\t\t<img src='data:image/png;base64,\".$img_name.\"' />\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t\t<p class='subtitle'>Likes: $likes_amnt Comments: $cmnts_amnt</p>\n\t\t\t\t\t\t</article>\n\t\t\t\t\t </div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\";\n\t}\n}", "title": "" }, { "docid": "4aca095641489227a6f5bd2fb2e3a51b", "score": "0.55345607", "text": "public function AdminMediasFoot() {\n\t\techo '<script src=\"'.PLX_PLUGINS.'plxBetterMedia/dragndrop.js\"></script>'.\"\\n\";\n echo \"<style>\n.folder ul {\n padding: 4px 2px 2px;\n list-style: none;\n position: relative;\n border-top: 2px solid;\n border-left: 1px solid;\n border-right: 1px solid;\n border-color:#444;\n background:#44444411;\n}\n.folder ul ul {\n border-color:#FF1800;\n background:#FF180022;\n}\n.folder ul li.sub > div button:after {\n background:#FF1800;\n}\n\n.folder ul ul ul {\n border-color:#FF9A00;\n background:#FF9A0033;\n}\n.folder ul ul li.sub > div button:after {\n background:#FF9A00;\n}\n\n.folder ul ul ul ul {\n border-color:#FFEF00;\n background:#FFEF0044;\n}\n.folder ul ul ul li.sub > div button:after {\n background:#FFEF00;\n}\n\n.folder ul ul ul ul ul {\n border-color:#21DD00;\n}\n.folder ul ul ul ul li.sub > div button:after {\n background:#21DD00;\n}\n.folder ul ul ul ul ul ul {\n border-color:#008CFF;\n}\n.folder ul ul ul ul ul li.sub > div button:after {\n background:#008CF0;\n}\n.folder ul ul ul ul ul ul {\n border-color:#6942FF;\n}\n.folder ul ul ul ul ul li.sub > div button:after {\n background:#6942FF;\n}\n.folder li {\n\tpadding: .4em 2px 0px;\n display: inline-block;\n vertical-align:top;\nmax-width:30vw;\nposition:relative;\n}\n.folder li.sub div{\n bottom:-2px;\n}\n.folder li.sub{\n bottom:-4px;\n}\n\n.folder {\n position:relative;\nz-index:0;\ndisplay:flex;\ntext-align:center;\nflex-wrap:wrap;}\n.folder .directory {\nposition:relative;\nfont-size:0.9rem;\nmargin:2px;\ntransition:all 1s;\ndisplay:inline-block;\n}\n.folder .directory:after,\n.folder .directory:before {\ncontent:'';\ndisplay:block;\nposition:absolute;\nleft:0;\n}\n.folder .directory.selected button,\n.folder .directory button:hover,\n.folder .directory:before {\nborder-top-left-radius:.3em;\nborder-top-right-radius:.3em;\nborder:1px solid slategrey;\n}\n.folder .directory:before {\ntop:-.8em;\nwidth:40%;\nheight:.8em;\nborder-bottom:0;\nbackground:#999;\n}\n.folder .directory:after {\nwidth:100%;top:0;\nheight:100%;\nz-index:0;\nbackground:#999;\n}\n.folder .directory, .folder button {\nwidth:12em;\n}\n.folder button {\ncolor:inherit;\nposition:relative;\nbackground:lightyellow;\nz-index:1;\nheight:100%;\npadding:.8em;\nmargin:0;\ntransform-origin:0 100%;\nborder:1px solid slategrey;\n}\n\n.folder .directory button.isdragover,\n.folder .directory.selected button,\n.folder .directory button:hover {\ntransform:skew(-10deg) scaleY(.9);\n}\n.folder .directory.selected button {\nbackground:papayawhip;\n}\n.folder .directory.selected button {\nfont-weight:bold;\n}\n.folder .directory.selected button {\nfont-weight:bold;\n}\n</style>\\n\";\n }", "title": "" }, { "docid": "71b1334179d4ed8f79cb800970d07be4", "score": "0.5505703", "text": "function vigor_gallery( $image_id_array ) {\n\t$image_count = count($image_id_array);\n\t$counter = 0;\n \t$html = '';\n\t$html .= '<div class=\"vigor-simple-gallery\">';\n\tif ( $image_id_array) foreach ( $image_id_array as $image_id ) {\n\t\t$thumbnail_image = wp_get_attachment_image( $image_id, 'thumbnail' );\n\t\t$large_image = wp_get_attachment_image_src( $image_id, 'large' );\n\t\t$counter++;\n\t\t$html .= '<div class=\"image_container\">';\n\n\t\t$html .= '<a href=\"' . $large_image[0] . '\"> ' . $thumbnail_image;\n\t\tif ( $counter === 4 && $image_count > 4 ) {\n\t\t\t$remaining_images = $image_count - 4;\n\t\t\t$html .= '<div class=\"gallery-count\">' . $remaining_images . ' more</div>';\n\t\t}\n\t\t$html .= '</a>';\n\t\t$html .= '</div>';\n\t}\n\t$html .= '</div>';\n\techo $html;\n}", "title": "" }, { "docid": "615c1f6debd337d67a7c99d70c7bdd40", "score": "0.5492335", "text": "function getGalleryImages($p_intGalleryID, $p_strOrderyBy, $p_strSort) {\n\t\tif(!isset($p_strOrderBy)) {\n\t\t\t$p_strOrderyBy = CONF_ORDERBY;\n\t\t}\n\t\t// Wenn Sort nicht gesetzt ist, wird der Standardwert genommen\n\t\tif(!isset($p_strSort)) {\n\t\t\t$p_strSort = CONF_SORT;\n\t\t}\n\t\t// Alle Bilder der GalleryID auslesen\n\t\t$SQL = \"SELECT * FROM \". TABLEPREFIX .\"img \"\n\t\t\t\t\t.\" WHERE galleryid = \". $p_intGalleryID .\" \"\n\t\t\t\t\t.\" ORDER BY \". $p_strOrderyBy . \" \"\n\t\t\t\t\t.\" \". $p_strSort;\n\t\t// Array mit den Bildern\n\t\t$t_arrImages = mysql_query($SQL);\n\t\t$i = 0;\n\t\t// Bilddaten in MTF_Image Objekt packen und die Bilder in ein Array,\n\t\t// welches dann zurueckgegeben wird\n\t\twhile($img = mysql_fetch_object($t_arrImages)) {\n\t\t\t$t_objImage->intID = $img->id;\n\t\t\t$t_objImage->strName = $img->name;\n\t\t\t$t_objImage->strPathOriginal = $img->pathoriginal;\n\t\t\t$t_objImage->strPathResized = $img->pathresized;\n\t\t\t$t_objImage->strPathThumb = $img->paththumb;\n\t\t\t$t_objImage->intGalleryID = $img->galleryid;\n\t\t\t$t_objImage->strTitle = $img->title;\n\t\t\t$t_objImage->strAltText = $img->alttext;\n\t\t\t$t_objImage->intWidthOriginal = $img->widthoriginal;\n\t\t\t$t_objImage->intHeightOriginal = $img->heightoriginal;\n\t\t\t$t_objImage->intWidthResized = $img->widthresized;\n\t\t\t$t_objImage->intHeightResized = $img->heightresized;\n\t\t\t$t_objImage->intWidthThumb = $img->widththumb;\n\t\t\t$t_objImage->intHeightThumb = $img->heightthumb;\n\t\t\t$t_objImage->intSizeOriginal = $img->sizeoriginal;\n\t\t\t$t_objImage->intSizeResized = $img->sizeresized;\n\t\t\t$t_objImage->intSizeThumb = $img->sizethumb;\n\t\t\t$t_objImage->intTypeID = $img->typeid;\n\t\t\t$t_objImage->bolShowImg = $img->showimg;\n\t\t\t$t_objImage->intViews = $img->views;\n\t\t\t$t_objImage->strComment = $t_objMTF_Image->comment;\n\t\t\t$t_objImage->intDateAdd = $img->dateadd;\n\t\t\t$t_objImage->intCreator = $img->creator;\n\t\t\t$t_objImage->intDateChange = $img->datechange;\n\t\t\t$t_objImage->intChanger = $img->changer;\n\t\t\t$t_objReturnImage[$i] = $t_objImage;\n\t\t\t$i++;\n\t\t}\n\t\treturn $t_objReturnImage;\n\t}", "title": "" }, { "docid": "b526ab4fd091aefa4630df808ff1bafe", "score": "0.5480295", "text": "public function ajax_update_order()\n\t{\n\t\t$ids = explode(',', $this->input->post('order'));\n\n\t\t$i = 1;\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$this->photo_activity_category_m->update($id, array(\n\t\t\t\t'order' => $i\n\t\t\t));\n\n\t\t\tif ($i === 1)\n\t\t\t{\n\t\t\t\t$preview = $this->photo_activity_category_m->get($id);\n\n\t\t\t\tif ($preview)\n\t\t\t\t{\n\t\t\t\t\t$this->db->where('id', $preview->gallery_id);\n\t\t\t\t\t$this->db->update('galleries', array(\n\t\t\t\t\t\t'preview' => $preview->filename\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\t++$i;\n\t\t}\n\t}", "title": "" }, { "docid": "529c4b067ba58dcf1586bea4e21e4c63", "score": "0.5465313", "text": "function FCN_enchanced_image_navigation ( $url, $id ) {\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n\t\treturn $url;\n\n\t$image = get_post( $id );\n\tif ( ! empty ( $image->post_parent ) && $image->post_parent != $id )\n\t\t$url .= '#main';\n\treturn $url;\n}", "title": "" }, { "docid": "fab3150bdff420084f294cc2534d0dee", "score": "0.5462037", "text": "function move_to_gallery($img_name, $pdo)\n{\n\t$src = \"img/tmp/\" . $img_name;\n\t$dst = \"img/gallery/\" . $img_name;\n\tcopy($src, $dst);\n\n\t// get owner_id of image\n\t$stmt = $pdo->query(\"SELECT `owner_id` FROM img_tmp\");\n\t$owner_id = $stmt->fetchColumn();\n\n\t// delete tmp from server and database\n\tdelete_tmp($img_name, $pdo);\n\n\t// insert image data into database\n\t$stmt = $pdo->prepare(\"INSERT INTO img_gallery (`name`, `owner_id`) VALUES (?, ?)\");\n\t$stmt->execute([$img_name, $owner_id]);\n\t$_SESSION[\"image\"] = \"\";\n}", "title": "" }, { "docid": "9d542931d6c665ea47be3528c56e8239", "score": "0.5445292", "text": "function joints_post_lightGallery($output, $attr)\n{\n\tglobal $post, $wp_locale;\n\n\tstatic $instance = 0;\n\t$instance++;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 3,\n\t\t'size' => 'thumbnail',\n\t\t'include' => '',\n\t\t'exclude' => ''\n\t), $attr));\n\n\t$id = intval($id);\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty($include) ) {\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t} elseif ( !empty($exclude) ) {\n\t\t$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t} else {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty($attachments) )\n\t\treturn '';\n\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $att_id => $attachment )\n\t\t\t$output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$columns = intval($columns);\n\t$float = is_rtl() ? 'right' : 'left';\n\n\t$selector = \"gallery-{$instance}\";\n\n\t$image_class = \"module-1__column\";\n\n\t$output = apply_filters('gallery_style', \"\n <!-- see gallery_shortcode() in wp-includes/media.php -->\n <div id='$selector' class='gallery galleryid-{$id} lightgallery grid-layout-gallery__row gallery-columns-{$columns}'>\n \");\n\n\t$i = 1;\n\t$num = count($attachments);\n\n\tforeach ( $attachments as $id => $attachment ) {\n\t\t$props = get_attachment_props($id);\n\n\t\tif ( ! $props['url'] ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif($i === $num) {\n\t\t\t$image_class = \"module-1__column column-block end\";\n\t\t}\n\n\t\t$link = sprintf(\n\t\t\t'<a href=\"%s\" class=\"%s\" title=\"%s\" data-sub-html=\"%s\">%s</a>',\n\t\t\tesc_url( $props['url'] ),\n\t\t\tesc_attr( $image_class ),\n\t\t\tesc_attr( $props['caption'] ),\n\t\t\tesc_attr( $props['caption'] ),\n\t\t\twp_get_attachment_image( $id, $size, 0, $props )\n\t\t);\n\n\t\t$output .= $link;\n\n\t\t$i++;\n\t}\n\n\t$output .= \"</div>\\n\";\n\t$output .= \"<br style='clear: both;' />\";\n\n\treturn $output;\n}", "title": "" }, { "docid": "b098f653feb85a746ba4ae5427a5d940", "score": "0.54365414", "text": "function actionGallerySort($dir) {\n $dir = link::encode($dir);\n return linkmanager::prefix().'action/gallery/sort/'.$dir;\n }", "title": "" }, { "docid": "d2072de884f7635c5bdb6f660ca05a31", "score": "0.5428572", "text": "function js(){\n ?><script type=\"text/javascript\">\n var mvcGallery = false;\n\n jQuery(function($){\n $('.mvc-gallery a').click (function(){\n mvcGallery = $(this);\n });\n \n $('input[type=\"checkbox\"]:checked + label span').addClass('checked');\n \n $('.mvc-gallery ol').sortable({placeholder: 'sortable-placeholder'});\n \n $('a.mvc-gallery').each(function(){\n //check for opener of attachPro\n win = window.dialogArguments || opener || parent || top;\n\n if(!win.mvcGallery) return;\n \n //Change the link text to the title of the meta box\n $(this).text(win.mvcGallery.closest('.postbox').find('h3').text());\n\n $(this).click(function(){\n t = $(this).closest('.media-item' );\n win.mvcGalleryAdd (\n t.attr('id').replace(/\\D/g,''),\n t.find ('img.pinkynail:first').attr('src' ),\n t.find ('tr.post_title input').val()\n );\n t.find ('.describe-toggle-off').click();\n });\n });\n });\n \n\n //Add the new images to the meta box\n function mvcGalleryAdd(id, tn , l ){\n g = mvcGallery.closest('.postbox' );\n g.find('#uncheck-message').show();\n g.find ('ol') .append(\n '<li><img src=\"'+tn+'\"/> ' +\n '<input type=\"checkbox\" name=\"mvc-gallery-' +g.attr('id')+'[]\" value=\"'+id+'\" checked=\"checked\" />'+\n '<label><span></span>'+l+'</label>'+\n '</li>'\n );\n };\n \n </script>\n <?php\n }", "title": "" }, { "docid": "a430a920f4b1f7cd53d30c2f3e583052", "score": "0.5422492", "text": "private function goToImageManagement() {\n $images = $this->getDataLayer()->getImages();\n $this->getSmarty()->assign(\"images\", $images);\n $this->getSmarty()->assign(\"numberOfPages\", sizeof($images) / self::ITEMS_FOR_PAGE);\n $this->getSmarty()->assign(\"itemsForPage\", self::ITEMS_FOR_PAGE);\n $this->getSmarty()->assign(\"sid\", 2);\n\n\n $this->getSmarty()->assign(\"contentTemplate\", \"back/ImageManagement.tpl\"); // diciamo quale template deve includere\n $this->getSmarty()->assign(\"pagination\", \"back/Pagination.tpl\");\n $this->getSmarty()->display(\"back/Outline.tpl\"); // mostriamo il template\n }", "title": "" }, { "docid": "a2e7a40e0c40764dbbc6c66edb88b20e", "score": "0.54223233", "text": "function ppm_move_photo($target_cat, $id, $ppm_test_mode)\n{\n global $page;\n\n // retrieve information about current photo\n $image_info = get_image_infos($id);\n $storage_cat_id = $image_info['storage_category_id'];\n $source_file_path = $image_info['path'];\n $source_cat_name = get_cat_info($storage_cat_id)['name'];\n $source_dir = pathinfo($source_file_path)['dirname'];\n $source_file_name = pathinfo($source_file_path)['filename'];\n $source_file_ext = pathinfo($source_file_path)['extension'];\n\n // retrieve representative info, if applicable\n $source_rep_ext = $image_info['representative_ext'];\n if (!is_null($source_rep_ext))\n {\n $source_rep_path = original_to_representative($source_file_path, $source_rep_ext);\n }\n else\n {\n $source_rep_path = '';\n }\n\n // no move necessary (same category selected)\n if ($target_cat == $storage_cat_id)\n {\n // build no work message\n $no_work_msg = $source_file_name.'.'.$source_file_ext.': '.l10n('MSG_NO_WORK_1').' ('.\n $source_cat_name.') - '.l10n('MSG_NO_WORK_2');\n\n array_push(\n $page['messages'],\n sprintf($no_work_msg)\n );\n }\n else \n {\n // get destination category information\n $dest_cat_info = get_cat_info($target_cat);\n $dest_cat_name = $dest_cat_info['name'];\n $dest_uppercats = explode(',', $dest_cat_info['uppercats']);\n $dest_cat_path = get_fulldirs($dest_uppercats);\n $dest_cat_path = $dest_cat_path[$target_cat];\n $dest_file_exists = false;\n $dest_rep_ext = '';\n $dest_rep_path = '';\n \n // check to see if filename already exists in destination\n if (file_exists($dest_cat_path.'/'.$source_file_name.'.'.$source_file_ext))\n {\n $dest_file_exists = true;\n // append date-time to filename to avoid overwriting existing file\n list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));\n $date_string = preg_replace('/[^\\d]/', '', $dbnow);\n $dest_file_name = $source_file_name.'-'.$date_string.'.'.$source_file_ext;\n\n // build rename message\n $rename_msg = l10n('MSG_RENAME_1').$source_file_name.'.'.$source_file_ext.\n l10n('MSG_RENAME_2').$dest_file_name.l10n('MSG_RENAME_3');\n\n array_push(\n $page['warnings'],\n sprintf($rename_msg)\n );\n }\n else\n {\n $dest_file_name = $source_file_name.'.'.$source_file_ext;\n }\n\n // build the new destination path and filename\n $dest_file_path = $dest_cat_path.'/'.$dest_file_name;\n \n // build debugging messages (for test mode)\n if ($ppm_test_mode)\n {\n // build debug strings\n $debug_line_1 = l10n('DBG_SRC').' '.$source_file_path.' ('.$source_cat_name.')';\n $debug_line_2 = l10n('DBG_DEST').' '.$dest_file_path.' ('.$dest_cat_name.')';\n\n array_push(\n $page['messages'],\n sprintf($debug_line_1),\n sprintf($debug_line_2),\n sprintf('-----------------')\n );\n }\n\n // move the file\n $move_status_ok = true;\n if (!$ppm_test_mode)\n {\n $move_status_ok = ppm_move_file_or_folder($source_file_path, $dest_file_path);\n @ppm_chmod_path($dest_file_path);\n }\n\n if ($move_status_ok)\n {\n // check for an existing row for the target category (the image is virtually linked\n // to the physical destination album already)\n $query = '\n SELECT\n COUNT(*) as count\n FROM '.IMAGE_CATEGORY_TABLE.'\n WHERE image_id = '.$id.'\n AND category_id = '.$target_cat.'\n ;';\n $result = pwg_query($query);\n $row = pwg_db_fetch_assoc($result);\n $count = $row['count'];\n\n // show a message indicating a virtual link will be replaced\n if ($count == 1)\n {\n // build unlink message\n $unlink_msg = $source_file_name.'.'.$source_file_ext.' '.l10n('MSG_LINK_REMOVED');\n\n array_push(\n $page['warnings'],\n sprintf($unlink_msg)\n );\n }\n\n // make the database changes associated with the move \n if (!$ppm_test_mode)\n {\n // update file, path and storage category on the image table\n single_update(\n IMAGES_TABLE,\n array(\n 'file' => $dest_file_name,\n 'path' => $dest_file_path,\n 'storage_category_id' => $target_cat,\n ),\n array('id' => $id)\n );\n\n // delete an existing virtual link\n $query = '\n DELETE\n FROM '.IMAGE_CATEGORY_TABLE.'\n WHERE image_id = '. $id.'\n AND category_id = '.$target_cat.'\n ;';\n pwg_query($query);\n\n // update category on the image category table\n single_update(\n IMAGE_CATEGORY_TABLE,\n array(\n 'category_id' => $target_cat,\n ),\n array(\n 'image_id' => $id,\n 'category_id' => $storage_cat_id,\n )\n );\n\n $move_status_ok = true;\n $dest_rep_ext = $image_info['representative_ext'];\n\n // move representative (and representative derivatives)\n if (!is_null($dest_rep_ext))\n {\n $dest_rep_path = original_to_representative($dest_file_path, $dest_rep_ext);\n\n // create the pwg_representative folder if it doesn't exist in the destination\n if (!is_dir($dest_cat_path.'/pwg_representative'))\n {\n mkdir($dest_cat_path.'/pwg_representative');\n }\n\n // move representative\n $move_status_ok = ppm_move_file_or_folder($source_rep_path, $dest_rep_path);\n @ppm_chmod_path($dest_rep_path);\n\n // remove the source pwg_representative directory if it's empty\n @rmdir($source_dir.'/pwg_representative');\n\n // move derivatives (thumbnails, resizes, etc.) of the representative\n $source_derivatives = './'.PWG_DERIVATIVE_DIR.$source_dir.'/pwg_representative/'.$source_file_name.'-*.'.$dest_rep_ext;\n $dest_derivatives = './'.PWG_DERIVATIVE_DIR.$dest_cat_path.'/pwg_representative/';\n\n // create the pwg_representative folder if it doesn't exist in the destination\n if (!is_dir($dest_derivatives))\n {\n mkdir($dest_derivatives);\n // also copy the index.htm file to the new directory\n copy('./'.PWG_DERIVATIVE_DIR.$source_dir.'/pwg_representative/index.htm', $dest_derivatives.'/index.htm');\n }\n\n // loop through the list of derivatives and move them to the destination\n foreach (glob($source_derivatives) as $source_derivative_filename)\n {\n $dest_derivative_filename = pathinfo($source_derivative_filename)['basename'];\n $move_status_ok = ppm_move_file_or_folder($source_derivative_filename, $dest_derivatives.'/'.$dest_derivative_filename);\n @ppm_chmod_path($dest_derivatives.'/'.$dest_derivative_filename);\n }\n\n // count the files left in the source derivatives folder\n $remaining_file_count = count(scandir(PWG_DERIVATIVE_DIR.$source_dir.'/pwg_representative/')) - 2;\n if ($remaining_file_count == 1) \n {\n // if there's only one file left in the directory, it should be index.htm; remove it.\n @unlink(PWG_DERIVATIVE_DIR.$source_dir.'/pwg_representative/index.htm');\n }\n\n // now remove the source pwg_representative directory if it's empty\n @rmdir(PWG_DERIVATIVE_DIR.$source_dir.'/pwg_representative/');\n }\n else\n {\n // move derivatives (thumbnails, resizes, etc.)\n $source_derivatives = './'.PWG_DERIVATIVE_DIR.$source_dir.'/'.$source_file_name.'-*.'.$source_file_ext;\n $dest_derivatives = './'.PWG_DERIVATIVE_DIR.$dest_cat_path;\n\n // create the pwg_representative folder if it doesn't exist in the destination\n if (!is_dir($dest_derivatives))\n {\n mkdir($dest_derivatives);\n }\n\n // loop through the list of derivatives and move them to the destination\n foreach (glob($source_derivatives) as $source_derivative_filename)\n {\n $dest_derivative_filename = pathinfo($source_derivative_filename)['basename'];\n $move_status_ok = ppm_move_file_or_folder($source_derivative_filename, $dest_derivatives.'/'.$dest_derivative_filename);\n @ppm_chmod_path($dest_derivatives.'/'.$dest_derivative_filename);\n }\n\n // count the files left in the source derivatives folder\n $remaining_file_count = count(scandir(PWG_DERIVATIVE_DIR.$source_dir)) - 2;\n if ($remaining_file_count == 1)\n {\n // if there's only one file left in the directory, it should be index.htm; remove it.\n @unlink(PWG_DERIVATIVE_DIR.$source_dir.'/index.htm');\n }\n\n // now remove the source derivatives directory if it's empty\n @rmdir(PWG_DERIVATIVE_DIR.$source_dir);\n }\n\n if ($move_status_ok)\n {\n // build success message\n $success_msg = $dest_file_name.': '.l10n('MSG_FILE_MOVE_SUCCESS').$dest_cat_name.'.';\n\n array_push(\n $page['infos'],\n sprintf($success_msg)\n );\n }\n else\n {\n // build representative move error message\n $error_msg = $dest_file_name.': '.l10n('MSG_REP_MOVE_ERR');\n\n array_push(\n $page['errors'],\n sprintf($error_msg)\n );\n }\n\n } // end check for test mode\n }\n else // an error occurred during the file move\n {\n // build file move error message\n $error_msg = $dest_file_name.': '.l10n('MSG_FILE_MOVE_ERR').' '.l10n('MSG_CHECK_LOG');\n\n array_push(\n $page['errors'],\n sprintf($error_msg)\n );\n }\n } // move file\n}", "title": "" }, { "docid": "65f4c3724134d220151939a3a0724108", "score": "0.5421345", "text": "public static function get_admin_gallery($idp){\n $imgs = \\DB::table('gallery')\n ->where('id_post', $idp)\n ->first();\n $return = \"\"; \n if(empty($imgs)) return ''; \n $all_images = json_decode($imgs->directory,true);\n \n foreach ($all_images as $k=>$img){ \n $return .= '<div class=\"gallery_product\">'.\n '<a class=\"delete_image\" href=\"#\" onclick=\"access_url(\\''.\\URL::to('/').'/admin/remove-image/'.$imgs->id.'/'.$k.'\\',\\'.show_result_gallery\\', \\'.response_gallery\\',\\'none\\');return false;\">x</a>'.\n '<a href=\"#\"><img src=\\''.@\\Wh::get_thumbnail($img).'\\'></a>'. \n '</div>';\n }\n $return .= \"<div class='clear'></div>\";\n return $return; \n}", "title": "" }, { "docid": "9ab0d6bbcaaa1f2d31f6d87db3f48cd5", "score": "0.5417539", "text": "function enhanced_image_navigation( $url, $id ) {\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) {\n\t\treturn $url;\n\t}\n\n\t$image = get_post( $id );\n\tif ( ! empty( $image->post_parent ) && (int) $image->post_parent !== (int) $id ) {\n\t\t$url .= '#main';\n\t}\n\n\treturn $url;\n}", "title": "" }, { "docid": "9dcc6336ccc3a8e270171ee023bdae05", "score": "0.5395033", "text": "function my_gallery_shortcode($null, $attr = array( )) {\n\tglobal $post;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 3,\n\t\t'size' => 'thumbnail',\n\t\t'exclude' => ''\n\t), $attr));\n\n\t$id = intval($id);\n\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit',\n\t'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order,\n\t'orderby' => $orderby, 'exclude' => $exclude) );\n\n\tif ( empty($attachments) )\n\t\treturn '';\n\n\tif ( is_feed( ) ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $id => $attachment )\n\t\t\t$output .= wp_get_attachment_link($id, $size, true) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$itemtag = tag_escape($itemtag);\n\t$captiontag = tag_escape($captiontag);\n\t$columns = intval($columns);\n\t$itemwidth = $columns > 0 ? floor(100/$columns) : 100;\n\n\t$output = apply_filters('gallery_style', \"\n\t<div class='gallery'>\");\n\n\t$i = 0;\n\tforeach ( $attachments as $id => $attachment ) {\n\t\t$link = isset($attr['link']) && 'file' == $attr['link']\n\t\t\t? wp_get_attachment_link($id, $size, false, false)\n\t\t\t: wp_get_attachment_link($id, $size, true, false);\n\n\t\t$output .= \"\";\n\t\t$output .= \"\n\n\t\t$link\n\t\t\";\n\t\tif ( $captiontag && trim($attachment->post_excerpt) ) {\n\t\t\t$output .= \"\n\n\t\t\t{$attachment->post_excerpt}\n\t\t\t\";\n\t\t}\n\t\t$output .= \"\";\n\t}\n\n\t$output .= \"\n\t</div>\\n\";\n\n\treturn $output;\n}", "title": "" }, { "docid": "a9c7fed6ced57bdcf4bf3cb45d60080f", "score": "0.5385488", "text": "private function transfer_location_galleries() {\r\n\t\t$res = mysql_query(\"SELECT * FROM `location_gallery` WHERE 1\", $this->sql);\r\n\t\twhile ($row = mysql_fetch_array($res)) {\r\n\t\t\tif (array_key_exists($row['location_id'], $this->locations)) {\r\n\t\t\t\t$row = $this->toText($row);\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t'LocationGallery' => array(\r\n\t\t\t\t\t\t'caption_en' => $row['caption_en'],\r\n\t\t\t\t\t\t'caption_fr' => $row['caption_fr'],\r\n\t\t\t\t\t\t'image' => array(\r\n\t\t\t\t\t\t\t'tmp_name' => $this->old_path \r\n\t\t\t\t\t\t\t\t. 'application'\r\n\t\t\t\t\t\t\t\t. DS\r\n\t\t\t\t\t\t\t\t. 'location_gallery'\r\n\t\t\t\t\t\t\t\t. DS\r\n\t\t\t\t\t\t\t\t. 'original'\r\n\t\t\t\t\t\t\t\t. DS\r\n\t\t\t\t\t\t\t\t. $this->clean_file_name($row['image']),\r\n\t\t\t\t\t\t\t'error' => (int) 0\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'location_id' => $this->locations[$row['location_id']]\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t\t$this->LocationGallery->create();\r\n\r\n\t\t\t\t$this->_buildController('LocationGallery');\r\n\t\t\t\t$this->controller->request->data = $data;\r\n\r\n\t\t\t\t$this->Image->process('image');\r\n\r\n\t\t\t\t$this->LocationGallery->save($this->controller->request->data, false);\r\n\r\n\t\t\t\tif (isset($this->controller->request->data['LocationGallery']['logo'])) {\r\n\t\t\t\t\t$this->Image->finishCreate(\r\n\t\t\t\t\t\t$this->controller->request->data['LocationGallery']['logo'],\r\n\t\t\t\t\t\t$this->LocationGallery->getLastInsertID()\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}", "title": "" }, { "docid": "c3f4420f34237e6d9f77c3ee9925b81b", "score": "0.53825253", "text": "public function moveDown( $params )\n {\n $this->validate_params($params);\n\n $this->db->query(\"SELECT geocontexter.gc_item_image_move_order_down('{$params['id_image']}','{$params['id_item']}')\");\n }", "title": "" }, { "docid": "28ef1d1a90198f6b600255432bfd6adf", "score": "0.5378056", "text": "function BCMH_enhanced_image_navigation( $url, $id ) {\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n\t\treturn $url;\n\n\t$image = get_post( $id );\n\tif ( ! empty( $image->post_parent ) && $image->post_parent != $id )\n\t\t$url .= '#main';\n\n\treturn $url;\n}", "title": "" }, { "docid": "c320dad20457c92f031fd4c6a0bf53e4", "score": "0.5376742", "text": "static function gallery_builder(){\n self::CallBox( 'gallery_builder' );\n }", "title": "" }, { "docid": "a336dabaadd1fa7103d040eaa917b46f", "score": "0.537093", "text": "protected function prepareGalleryData() {}", "title": "" }, { "docid": "3cabf18f89700f7f89474503214d36aa", "score": "0.5361826", "text": "function buildImageGallery($class_list, $field_name){\n $string_class_list = implode(' ', $class_list);\n $images_array = [];\n $images = get_field($field_name);\n // make the data a little cleaner\n foreach ($images as $image) {\n array_push($images_array, $image);\n\n }\n $images_dataset = json_encode($images_array);\n $five_star_class = $images_array[0]['is_a_review'] ? 'five-star active' : 'five-star';\n echo \"<div class='image-gallery {$string_class_list}' data-image-target='0' data-image-set='\n {$images_dataset}'>\n <div class='gal_nav prev'>\n <svg viewbox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <circle cx='16' cy='16' opacity='.7' r='16'></circle>\n <polyline fill='none' points='21,3.5 8.5,16 21,28.5'></polyline> \n </svg>\n </div>\";\n // add two image div for transition\n echo \"<div class='gallery-image active' style='background-image:url(\\\"{$images_array[0]['image']['sizes']['hd']}\\\")'>\n <div class='image-overlay'>\n <div class='review-wrapper'>\n <div class='review'>\".\n \"<div class='{$five_star_class}'>\".getFiveStar(get_field('star_color')).\"</div>\".\n '<div class=\"review-text\">'.$images_array[0]['text'].'</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"gallery-image inactive\">\n <div class=\"image-overlay\">\n <div class=\"review-wrapper\">\n <div class=\"review\">'.\n \"<div class='five-star'>\".getFiveStar(get_field('star_color')).\"</div>\".\n '<div class=\"review-text\"></div>\n </div>\n </div>\n </div>\n </div>';\n echo '<div class=\"gal_nav next\">\n <svg viewbox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"16\" cy=\"16\" opacity=\".7\" r=\"16\"></circle>\n <polyline fill=\"none\" points=\"11.5,3.5 24,16 11.5,28.5\"></polyline> \n </svg>\n </div>\n </div>'; \n}", "title": "" }, { "docid": "a82818c2042b84288f17b63c8783a86f", "score": "0.5353688", "text": "public function printGalleryThumb(){\n\t\t\t\t$cont = 0;\n\t\t\t\tif(isset($this->pictures)){\n\t\t\t\t\tforeach ($this->pictures as $picture => $value) {\n\t\t\t\t\t\tif($cont %2 == 0){echo \"<div class='row'>\";};\n\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\techo \"<a href='index.php?&controller=gallery'> <div id='\" .$value[0] . \"' class='picture-card-small'>\n\t\t\t\t\t\t<div class='picture-grid'><img class='item-pic-tmb' src='images/uploads/\". $value[1] . \"'></div></div></a>\";\n\t\t\t\t\t\tif($cont %2 == 0){echo \"</div>\";};\n\t\t\t\t\t\tif($cont == 4){break;};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($cont < 4){\n\t\t\t\t\tfor ($i=$cont; $i < 4 ; $i++) { \n\t\t\t\t\t if($cont %2 == 0){echo \"<div class='row'>\";};\n\t\t\t\t\t $cont++;\n\t\t\t\t\t echo \"<a href='index.php?&controller=gallery'><div id='pic1' class='picture-card-small'>\n\t\t\t\t\t\t\t<div class='picture-grid'></div></div></a>\";\n\t\t\t\t\tif($cont %2 == 0){echo \"</div>\";};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "130b42d9288e021104dca457e6fde6f9", "score": "0.5339301", "text": "public function moveUp()\n {\n $this->reorder(-1);\n }", "title": "" }, { "docid": "181065bfc04bd0048893ea4a007ddd56", "score": "0.53287363", "text": "public function gallery()\n\t{\n\t\t$data = '2016-01_EEDF_Patinoire';\n\t\t$this->show('default/gallery', ['data'=>$data,'path'=>'assets/images/']);\n\t}", "title": "" }, { "docid": "fba093cb1593fca3857d965159243eb8", "score": "0.5327585", "text": "function revconcept_get_images($post_id) {\n global $post;\n \n $thumbnail_ID = get_post_thumbnail_id();\n \n $images = get_children( array('post_parent' => $post_id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );\n \n if ($images) :\n \n foreach ($images as $attachment_id => $image) :\n \n $img_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); //alt\n if ($img_alt == '') : $img_alt = $image->post_title; endif;\n \n $big_array = image_downsize( $image->ID, 'large' );\n $img_url = $big_array[0];\n \n echo '<li>';\n echo '<img src=\"';\n echo $img_url;\n echo '\" alt=\"';\n echo $img_alt;\n echo '\" />';\n echo '</li><!--end slide-->';\n \n\t\tendforeach;\n\tendif;\n}", "title": "" }, { "docid": "b2f4dff4fca2ec4d22df99f950a3fdfe", "score": "0.53235686", "text": "function orderup( ) {\n\torder( 1 );\n}", "title": "" }, { "docid": "d9f5e9796eabce9f877eb5ef305d972e", "score": "0.5321993", "text": "function shoestrap_slider_gallery( $attr ) {\n\tglobal $ss_layout, $ss_settings, $ss_framework;\n\n\t$post = get_post();\n\n\t$shoestrap_slider_height = $ss_settings['shoestrap_slider_height'];\n\n\tif ( ! isset( $shoestrap_slider_height ) || empty( $shoestrap_slider_height ) ) {\n\t\t$shoestrap_slider_height = 450;\n\t}\n\n\tstatic $instance = 0;\n\t$instance++;\n\n\tif ( ! empty( $attr['ids'] ) ) {\n\t\t$attr['orderby'] = ( empty( $attr['orderby'] ) ) ? 'post__in' : '';\n\t\t$attr['include'] = $attr['ids'];\n\t}\n\n\t$output = apply_filters( 'post_gallery', '', $attr );\n\n\tif ( $output != '' ) {\n\t\treturn $output;\n\t}\n\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( ! $attr['orderby'] ) {\n\t\t\tunset( $attr['orderby'] );\n\t\t}\n\t}\n\n\textract( shortcode_atts( array( \n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => '',\n\t\t'icontag' => '',\n\t\t'captiontag' => '',\n\t\t'columns' => 4,\n\t\t'size' => 'thumbnail',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'link' => 'file',\n\t\t'type' => 'default',\n\t\t'height' => $shoestrap_slider_height,\n\t ), $attr ) );\n\n\t// If type is set to default, return the default Shoetrap gallery\n\tif ( $type == 'default' ) {\n\n\t\treturn shoestrap_gallery( $attr );\n\n\t} else {\n\t\t// if type is not default, continue processing\n\t\t$id = intval( $id );\n\t\t$columns = ( 12 % $columns == 0 ) ? $columns: 4;\n\n\t\tif ( $order === 'RAND' ) {\n\t\t\t$orderby = 'none';\n\t\t}\n\n\t\tif ( ! empty( $include ) ) {\n\t\t\t$_attachments = get_posts( array( 'include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\n\t\t\t$attachments = array();\n\n\t\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t\t}\n\n\t\t} elseif ( ! empty( $exclude ) ) {\n\n\t\t\t$attachments = get_children( array( 'post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\n\t\t} else {\n\n\t\t\t$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\n\t\t}\n\n\t\tif ( empty( $attachments ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( is_feed() ) {\n\t\t\t$output = \"\\n\";\n\n\t\t\tforeach ( $attachments as $att_id => $attachment ) {\n\t\t\t\t$output .= wp_get_attachment_link( $att_id, $size, true ) . \"\\n\";\n\t\t\t}\n\n\t\t\treturn $output;\n\t\t}\n\n\t\t$unique = ( get_query_var( 'page' ) ) ? $instance . '-p' . get_query_var( 'page' ) : $instance;\n\n\t\t$output = shoestrap_slider_helper( 'wrapper_start', 'gallery-' . $post->ID . '-' . $unique, '', $type );\n\n\t\t$i = 0; foreach ( $attachments as $id => $attachment ) { $i++; }\n\n\t\t$output .= shoestrap_slider_helper( 'before_inner_start', 'gallery-' . $post->ID . '-' . $unique, $i, $type );\n\t\t$output .= shoestrap_slider_helper( 'inner_start', 'slides', '', $type );\n\n\t\t$width = $ss_layout->content_width_px();\n\n\t\t$i = 0;\n\n\t\tforeach ( $attachments as $id => $attachment ) {\n\t\t\t$imageurl = wp_get_attachment_url( $id );\n\t\t\t$image_args = array( \"url\" => $imageurl, \"width\" => $width, \"height\" => $height );\n\n\t\t\t$image = Shoestrap_Image::image_resize( $image_args );\n\t\t\t$image_url = $image['url'];\n\n\t\t\t$output .= shoestrap_slider_helper( 'slide_element_start', $imageurl, $i, $type ) . '<img src=\"' . $image_url . '\" />';\n\t\t\t\n\t\t\tif ( trim( $attachment->post_excerpt ) ) {\n\t\t\t\t$output .= shoestrap_slider_helper( 'caption_start', '', '', $type );\n\t\t\t\t$output .= wptexturize( $attachment->post_excerpt );\n\t\t\t\t$output .= shoestrap_slider_helper( 'caption_end', '', '', $type );\n\t\t\t}\n\n\t\t\t$output .= shoestrap_slider_helper( 'slide_element_end', '', '', $type );\n\t\t\t$i++;\n\n\t\t}\n\n\t\t$output .= shoestrap_slider_helper( 'inner_end', '', '', $type );\n\t\t$output .= shoestrap_slider_helper( 'before_wrapper_end', 'gallery-' . $post->ID . '-' . $unique, '', $type );\n\t\t$output .= shoestrap_slider_helper( 'wrapper_end', '', '', $type );\n\n\t\tif ( $type == 'flexslider_thumbs' ) {\n\n\t\t\t$output .= '<div id=\"carousel\" class=\"flexslider\"><ul class=\"slides\">';\n\n\t\t\t$i = 0;\n\t\t\tforeach ( $attachments as $id => $attachment ) {\n\t\t\t\t$imageurl = wp_get_attachment_url( $id );\n\t\t\t\t$image_args = array( \"url\" => $imageurl, \"width\" => $width, \"height\" => $height );\n\t\t\t\t$image = Shoestrap_Image::image_resize( $image_args );\n\t\t\t\t$image_url = $image['url'];\n\t\t\t\t$output .= shoestrap_slider_helper( 'slide_element_start', $imageurl, $i, $type ) . '<img src=\"' . $image_url . '\" />';\n\t\t\t\t$output .= shoestrap_slider_helper( 'slide_element_end', '', '', $type );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$output .= '</ul></div>';\n\t\t}\n\n\t\t$output .= shoestrap_slider_gallery_script( '.gallery-' . $post->ID . '-' . $unique, $type );\n\n\t\treturn $output;\n\t}\n}", "title": "" }, { "docid": "25502cf6e87924cd514e2b649f4c2f20", "score": "0.53219575", "text": "function tiga_enhanced_image_navigation( $url, $id ) {\n\n\tif ( ! is_attachment() && ! wp_attachment_is_image( $id ) )\n\t\treturn $url;\n\n\t$image = get_post( $id );\n\tif ( ! empty( $image->post_parent ) && $image->post_parent != $id )\n\t\t$url .= '#main';\n\n\treturn $url;\n\n}", "title": "" }, { "docid": "a54e481478d4e2d4ec7aeb14dde907d2", "score": "0.52876323", "text": "public function list_gallery()\n {\n $query = $this->db->select('id, title')\n ->order_by('id','desc')\n ->get($this->_table);\n $result = $query->result();\n if (count($result) == 1) {\n $result = reset($result);\n }\n return $result;\n }", "title": "" }, { "docid": "e3b54791fb1ed3a27a7c7033613e1b47", "score": "0.52747345", "text": "public function handle()\n {\n $count = 0;\n $imageField = 'image';\n $thumbName = '_thumb';\n\n foreach (Calendar::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Campaign::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Character::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Event::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Family::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Item::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Journal::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Location::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $this->move($model->map);\n\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Note::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Organisation::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Quest::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n foreach (Tag::whereNotNull($imageField)->get() as $model) {\n $count++;\n $this->move($model->image);\n $thumb = str_replace('.', $thumbName, $model->image);\n $this->move($thumb);\n }\n\n $this->info(\"Update $count entities.\");\n\n return true;\n }", "title": "" }, { "docid": "0c8459e068c68744c48277ef724aadd9", "score": "0.52735806", "text": "public function moveDown()\n {\n $this->reorder(1);\n }", "title": "" }, { "docid": "93b4bc26cee312cea6b24c7d4b64a3c3", "score": "0.5257175", "text": "function orderdown( ) {\n\torder( -1 );\n}", "title": "" }, { "docid": "071e9d170adfcd06f4a10fc3c53ccabe", "score": "0.5240885", "text": "function lc-gallery_menu() {\n add_option_page(\n 'LC Gallery',\n 'LC Gallery',\n 'manage_options',\n 'lc-gallery',\n 'lc-gallery_options_page'\n );\n}", "title": "" }, { "docid": "1ee6c1d36453db984817fad88dc461df", "score": "0.5240226", "text": "public function moveUp( $params )\n {\n $this->validate_params($params);\n\n $this->query(\"SELECT geocontexter.gc_item_image_move_order_up('{$params['id_image']}','{$params['id_item']}')\");\n }", "title": "" }, { "docid": "c384fffe395b2714fe3fd74e424bf054", "score": "0.5236916", "text": "public static function partial_gallery_slider( $echo = true ){\r\n\r\n if( ! $echo )\r\n ob_start();\r\n\r\n $gallery_images_ids = Better_Mag::posts()->get_first_gallery_ids();\r\n\r\n if( ! $gallery_images_ids ){\r\n return;\r\n }\r\n\r\n $gallery_images = new WP_Query( array(\r\n 'post_type' => 'attachment',\r\n 'post_status' => 'inherit',\r\n 'post__in' => $gallery_images_ids,\r\n 'orderby' => 'post__in',\r\n 'posts_per_page'=> -1\r\n ));\r\n\r\n // Gallery Images as Background Slide Show!\r\n if( Better_Mag::posts()->get_meta( 'gallery_images_bg_slides' ) && is_singular() ){\r\n $gallery_bg_slide_show = 'gallery-as-background-slide-show';\r\n }else{\r\n $gallery_bg_slide_show = '';\r\n }\r\n\r\n ?>\r\n\r\n <div class=\"gallery-slider slider-arrows <?php echo $gallery_bg_slide_show; ?>\">\r\n <div class=\"flexslider\">\r\n <ul class=\"slides\">\r\n <?php foreach( $gallery_images->posts as $attachment ){ ?>\r\n\r\n <li>\r\n <a href=\"<?php echo wp_get_attachment_url($attachment->ID); ?>\" title=\"<?php echo $attachment->post_excerpt ? $attachment->post_excerpt : ''; ?>\" rel=\"prettyPhoto[featured-gallery]\">\r\n <?php\r\n if( Better_Mag::posts()->get_meta( 'gallery_images_bg_slides' ) && is_singular() ){\r\n $_img_src = wp_get_attachment_image_src( $attachment->ID, 'full' );\r\n $image_attr = array(\r\n 'data-img' => $_img_src[0]\r\n );\r\n }else{\r\n $image_attr = array();\r\n }\r\n\r\n if( is_singular() && ! Better_Mag::current_sidebar_layout() ){\r\n echo wp_get_attachment_image( $attachment->ID, 'main-full', false, $image_attr );\r\n }else{\r\n echo wp_get_attachment_image( $attachment->ID, 'main-post', false, $image_attr );\r\n }\r\n\r\n // caption\r\n if ($attachment->post_excerpt){?>\r\n <p class=\"caption\"><?php echo $attachment->post_excerpt; ?></p><?php\r\n } ?>\r\n </a>\r\n </li>\r\n\r\n <?php } // No Reset Query Needed; We Used WP_Query->posts result directly as object ?>\r\n </ul>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n if( ! $echo )\r\n return ob_get_clean();\r\n }", "title": "" }, { "docid": "ec8798854182a0b2fd035d8d4ea81ff9", "score": "0.5235705", "text": "function videoresource_item_move_up($item) {\n return move_item($item, 'up');\n}", "title": "" }, { "docid": "2dba03a8a1c0702de2acb1f479838817", "score": "0.52260864", "text": "function ImageGallery( ) {\n\t\t$this->mImages = array();\n\t\t$this->mShowBytes = true;\n\t\t$this->mShowFilename = true;\n\t\t$this->mParsing = false;\n\t}", "title": "" }, { "docid": "4024942db214ae016e4647340bc4e81a", "score": "0.52245736", "text": "function shoestrap_slider_gallery_setup_after_theme() {\n\tremove_shortcode( 'gallery' );\n\tadd_shortcode( 'gallery', 'shoestrap_slider_gallery' );\n}", "title": "" }, { "docid": "05a15e5cb7304358cd86a849b222d982", "score": "0.5218793", "text": "function wp_skitter_menu_function() \n{\n\t// Get media library\n\t$args = array(\n\t\t'post_type' => 'attachment', \n\t\t'post_mime_type' => array('image/png', 'image/jpeg', 'image/gif'), \n\t\t'numberposts' => 50, \n\t\t'offset' => 0, \n\t\t'orderby' => 'ID', \n\t\t'order' => 'DESC',\n\t);\n\t\n\t$attachments = get_posts( $args );\n\t\n\t$wp_skitter_type = get_option('wp_skitter_type');\n\t\n?>\n\n<style type=\"text/css\" rel=\"stylesheet\" media=\"all\">\n\n.box_image_sk {background:#eee;padding:5px;border:1px solid #000;margin:10px;display:none;position:relative;}\n.item_image_sk {width:100px;overflow:hidden;float:left;margin:0 0px 0 0;}\n.item_image_sk img {margin-bottom:0px;}\n.settings_slide {margin-left:110px;}\n.settings_slide label:first-child {margin-top:0px;}\n.settings_slide label {display:block;margin-top:5px;}\n.settings_slide input {width:99%;}\n.remove_slide_sk {padding:1px 5px;background:#cc0000;color:#fff;font-size:12px;font-weight:bold;position:absolute;bottom:10px;right:10px; z-index:10;text-decoration:none;text-transform:uppercase;border:1px solid #990000;}\n.remove_slide_sk:hover {background:#cc3333;color:#fff;}\n\n/* Images selecteds */\n#box_selected_images {float:left;width:50%;background:#555;height:400px;overflow:auto;}\n\n/* List images */\n#box_list_images {float:left;width:50%;background:#eee;height:400px;overflow:auto;position:relative;}\n#box_list_images .item_list_sk {width:50px;height:50px;overflow:hidden;float:left;margin:5px 0 0 5px;background:#fff;}\n#box_list_images .item_list_sk a {float:left;}\n\n#box_more_media {text-align:center;float:left;width:100%;margin:20px 0;}\n#box_more_media a {padding:5px 20px;background:#ddd;border:1px solid #999;color:#333;text-shadow:#fff 1px 1px 0;text-decoration:none;border-radius:4px;}\n\n#loading_list_sk {position:absolute;top:10px;left:10px;background:#333;color:#fff;font-size:16px;font-weight:bold;border:1px solid #000;padding:5px;display:none;}\n\n.clear {clear:both;}\n\n#tabs_sk {background:#ccc;margin-bottom:10px;float:left;width:100%;}\n#tabs_sk a {background:#fff;padding:5px 10px;float:left;margin:5px 0 5px 5px;text-decoration:none;font-size:18px;}\n#tabs_sk a.tab_selected_sk {background:#333;color:#fff;}\n\n.tab_item_sk {display:none;float:left;width:100%;margin-bottom:20px;background:#eee;}\n.tab_item_sk table {margin:0;}\n.tab_item_selected_sk {display:block;}\n\n#setting_advanced {}\n#setting_advanced h3 {margin:0;}\n\n</style>\n\n<script>\n\nvar offset_sk = 1;\nvar request_sk = false;\n\njQuery.noConflict();\njQuery(document).ready(function() {\n\t\n\tjQuery('#form_skitter').submit(function() {\n\t\tjQuery('.box_image_sk').each(function() {\n\t\t\tif (jQuery(this).css('display') != 'block') jQuery(this).remove();\n\t\t});\n\t});\n\t\n\tjQuery('#box_more_media a').click(function() {\n\t\tif (request_sk) return false;\n\t\trequest_sk = true;\n\t\t\n\t\tvar last_id = jQuery('.item_list_sk:last').find('a').attr('href').replace('#', '');\n\t\tvar scroll_top = jQuery('#box_list_images').scrollTop() + 10;\n\t\t\n\t\tjQuery('#loading_list_sk').css({'top': scroll_top}).fadeTo(300, 0.9);\n\t\t\n\t\tjQuery.getJSON('admin-ajax.php?action=load_more_media&offset='+offset_sk+'&last_id='+last_id, function(json) {\n\t\t\tvar list = '';\n\t\t\tvar item = '';\n\t\t\t\n\t\t\tjQuery.each(json, function(key, val) {\n\t\t\t\t// List\n\t\t\t\tlist += '<div class=\"item_list_sk\">';\n\t\t\t\tlist += '<a href=\"#'+val.id+'\" title=\"Add\">'+val.thumb+'</a>';\n\t\t\t\tlist += '</div>';\n\t\t\t\t\n\t\t\t\t// Item\n\t\t\t\titem += '<div class=\"box_image_sk\" id=\"box_image_sk_'+val.id+'\">';\n\t\t\t\titem += '<div class=\"item_image_sk\">';\n\t\t\t\titem += val.image;\n\t\t\t\titem += '<input class=\"attachments_image\" type=\"checkbox\" value=\"'+val.id+'\" name=\"wp_skitter_attachments[image][]\" id=\"wp_skitter_attachment_'+val.id+'\" checked=\"checked\" style=\"display:none;\" />';\n\t\t\t\titem += '</div>';\n\t\t\t\titem += '<div class=\"settings_slide\">';\n\t\t\t\titem += '<label for=\"wp_skitter_attachment_label_'+val.id+'\">Label</label>';\n\t\t\t\titem += '<input class=\"attachments_label\" type=\"text\" name=\"wp_skitter_attachments[label]['+val.id+']\" id=\"wp_skitter_attachment_label_'+val.id+'\" size=\"50\" />';\n\t\t\t\titem += '<label for=\"wp_skitter_attachment_link_'+val.id+'\">Link</label>';\n\t\t\t\titem += '<input class=\"attachments_link\" type=\"text\" name=\"wp_skitter_attachments[link]['+val.id+']\" id=\"wp_skitter_attachment_link_'+val.id+'\" size=\"50\" />';\n\t\t\t\titem += '<label for=\"wp_skitter_attachment_animation_'+val.id+'\">Animation</label>';\n\t\t\t\titem += val.select;\n\t\t\t\titem += '</div>';\n\t\t\t\titem += '<div class=\"clear\"></div>';\n\t\t\t\titem += '<a href=\"#\" class=\"remove_slide_sk\" title=\"Remove\">x</a>';\n\t\t\t\titem += '</div>';\n\t\t\t});\n\t\t\t\n\t\t\tjQuery('#box_more_media').before(list);\n\t\t\tjQuery('#box_selected_images').append(item);\n\t\t\t\n\t\t\tjQuery('#loading_list_sk').fadeOut(300);\n\t\t\t\n\t\t\trequest_sk = false;\n\t\t\toffset_sk++;\n\t\t});\n\t\treturn false;\n\t});\n\t\n\tjQuery('.item_list_sk a').live('click', function() {\n\t\tvar id = jQuery(this).attr('href').replace('#', '');\n\t\tif (jQuery('#box_image_sk_'+id).css('display') != 'block') {\n\t\t\tjQuery(this).fadeTo(300,0.3);\n\t\t\tjQuery('#box_image_sk_'+id)\n\t\t\t\t.appendTo('#box_selected_images')\n\t\t\t\t.slideDown(300);\n\t\t}\n\t\telse {\n\t\t\tjQuery(this).fadeTo(300,1.0);\n\t\t\tjQuery('#box_image_sk_'+id).slideUp(300);\n\t\t}\n\t\treturn false;\n\t});\n\t\n\tjQuery('.remove_slide_sk').live('click', function() {\n\t\tjQuery(this).parents('.box_image_sk').slideUp(300);\n\t\treturn false;\n\t});\n\t\n\tjQuery('#tabs_sk a').click(function() {\n\t\tvar rel = jQuery(this).attr('rel');\n\t\tvar wp_skitter_type = jQuery(this).attr('href').replace('#', '');\n\t\t\n\t\tjQuery('.tab_selected_sk').removeClass('tab_selected_sk');\n\t\tjQuery('.tab_item_selected_sk').removeClass('tab_item_selected_sk');\n\t\t\n\t\tjQuery(this).addClass('tab_selected_sk');\n\t\tjQuery('#'+rel).addClass('tab_item_selected_sk');\n\t\t\n\t\tjQuery('#wp_skitter_type').val(wp_skitter_type);\n\t\t\n\t\treturn false;\n\t});\n\t\n});\n</script>\n\n<div class=\"wrap\">\n\t<h2>Skitter Slideshow</h2>\n\t<form method=\"post\" action=\"options.php\" id=\"form_skitter\">\n\t\t<?php settings_fields( 'wp_skitter_settings' ); ?>\n\t\t<input type=\"hidden\" value=\"<?php echo $wp_skitter_type;?>\" name=\"wp_skitter_type\" id=\"wp_skitter_type\" />\n\t\t\n\t\t<?php\n\t\t\n\t\t$selected_library = ($wp_skitter_type == 'library') ? 'class=\"tab_selected_sk\"' : '';\n\t\t$selected_posts = ($wp_skitter_type == 'posts') ? 'class=\"tab_selected_sk\"' : '';\n\t\t$selected_xml = ($wp_skitter_type == 'xml') ? 'class=\"tab_selected_sk\"' : '';\n\t\t\n\t\t$tab_selected_library = ($wp_skitter_type == 'library') ? ' tab_item_selected_sk' : '';\n\t\t$tab_selected_posts = ($wp_skitter_type == 'posts') ? ' tab_item_selected_sk' : '';\n\t\t$tab_selected_xml = ($wp_skitter_type == 'xml') ? ' tab_item_selected_sk' : '';\n\t\t\n\t\t?>\n\t\t<div id=\"tabs_sk\">\n\t\t\t<a href=\"#library\" rel=\"tab_media_library_sk\" <?php echo $selected_library;?>>Media Library</a>\n\t\t\t<a href=\"#posts\" rel=\"tab_posts_sk\" <?php echo $selected_posts;?>>Posts</a>\n\t\t\t<a href=\"#xml\" rel=\"tab_xml_sk\" <?php echo $selected_xml;?>>XML</a>\n\t\t</div>\n\t\t\n\t\t<div id=\"tab_posts_sk\" class=\"tab_item_sk<?php echo $tab_selected_posts;?>\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Category</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"wp_skitter_category\" id=\"wp_skitter_category\"> \n\t\t\t\t\t\t\t<option value=\"\">Select a Category</option> \n\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$category = get_option('wp_skitter_category');\n\t\t\t\t\t\t\t$categories= get_categories(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($categories as $cat) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$option = '<option value=\"'.$cat->term_id.'\"';\n\t\t\t\t\t\t\t\tif ($category == $cat->term_id) $option .= ' selected=\"selected\">';\n\t\t\t\t\t\t\t\telse { $option .= '>'; }\n\t\t\t\t\t\t\t\t$option .= $cat->cat_name;\n\t\t\t\t\t\t\t\t$option .= ' ('.$cat->category_count.')';\n\t\t\t\t\t\t\t\t$option .= '</option>';\n\t\t\t\t\t\t\t\techo $option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">Number of slides</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"wp_skitter_slides\" id=\"wp_skitter_slides\" size=\"7\" value=\"<?php echo get_option('wp_skitter_slides'); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t\t\n\t\t<div id=\"tab_xml_sk\" class=\"tab_item_sk<?php echo $tab_selected_xml;?>\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">XML Path</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" name=\"wp_skitter_xml\" id=\"wp_skitter_xml\" size=\"100\" value=\"<?php echo get_option('wp_skitter_xml'); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t\t\n\t\t<div id=\"tab_media_library_sk\" class=\"tab_item_sk<?php echo $tab_selected_library;?>\">\n\t\t\t<div id=\"box_list_images\">\n\t\t\t\t<div id=\"loading_list_sk\">Loading...</div>\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t// Media library\n\t\t\t\t$options_attachments = get_option('wp_skitter_attachments');\n\t\t\t\t\n\t\t\t\tforeach($attachments as $i => $attachment) \n\t\t\t\t{\n\t\t\t\t\t$id = $attachment->ID;\n\t\t\t\t\t$style = (is_array($options_attachments['image']) && in_array($id, $options_attachments['image'])) ? ' style=\"opacity:0.3;\"' : '';\n\t\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t\t<div class=\"item_list_sk\">\n\t\t\t\t\t\t<a href=\"#<?php echo $id;?>\" title=\"Add\"<?php echo $style;?>><?php echo wp_get_attachment_image( $id, array(50, 50) );?></a>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t<div id=\"box_more_media\">\n\t\t\t\t\t<a href=\"#\">More</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div id=\"box_selected_images\">\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\tif (!empty($options_attachments)) \n\t\t\t\t{\n\t\t\t\t\t// Loop images selecteds\n\t\t\t\t\tforeach($options_attachments['image'] as $id) \n\t\t\t\t\t{\n\t\t\t\t\t\t$attachment = get_post($id);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty($attachment)) continue;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$label = $options_attachments['label'][$id];\n\t\t\t\t\t\t$link = $options_attachments['link'][$id];\n\t\t\t\t\t\t$animation = $options_attachments['animation'][$id];\n\t\t\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t\t<div class=\"box_image_sk\" id=\"box_image_sk_<?php echo $id;?>\" style=\"display:block;\">\n\t\t\t\t\t\t<div class=\"item_image_sk\">\n\t\t\t\t\t\t\t<?php echo wp_get_attachment_image( $id, array(150, 150) );?>\n\t\t\t\t\t\t\t<input class=\"attachments_image\" type=\"checkbox\" value=\"<?php echo $id;?>\" name=\"wp_skitter_attachments[image][]\" id=\"wp_skitter_attachment_<?php echo $id;?>\" checked=\"checked\" style=\"display:none;\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"settings_slide\">\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_label_<?php echo $id;?>\">Label</label>\n\t\t\t\t\t\t\t<input class=\"attachments_label\" type=\"text\" name=\"wp_skitter_attachments[label][<?php echo $id;?>]\" id=\"wp_skitter_attachment_label_<?php echo $id;?>\" size=\"50\" value=\"<?php echo $label;?>\" />\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_link_<?php echo $id;?>\">Link</label>\n\t\t\t\t\t\t\t<input class=\"attachments_link\" type=\"text\" name=\"wp_skitter_attachments[link][<?php echo $id;?>]\" id=\"wp_skitter_attachment_link_<?php echo $id;?>\" size=\"50\" value=\"<?php echo $link;?>\" />\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_animation_<?php echo $id;?>\">Animation</label>\n\t\t\t\t\t\t\t<?php echo getSelectAnimations(array(\n\t\t\t\t\t\t\t\t'name' => 'wp_skitter_attachments[animation]['.$id.']',\n\t\t\t\t\t\t\t\t'id' => 'wp_skitter_attachment_animation_'.$id,\n\t\t\t\t\t\t\t\t'selected' => $animation,\n\t\t\t\t\t\t\t\t'class' => 'attachments_animation'\n\t\t\t\t\t\t\t));?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<a href=\"#\" class=\"remove_slide_sk\" title=\"Remove\">x</a>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// All images media\n\t\t\t\tforeach($attachments as $i => $attachment) \n\t\t\t\t{\n\t\t\t\t\t$id = $attachment->ID;\n\t\t\t\t\tif (is_array($options_attachments['image']) && in_array($id, $options_attachments['image'])) continue;\n\t\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t\t<div class=\"box_image_sk\" id=\"box_image_sk_<?php echo $id;?>\">\n\t\t\t\t\t\t<div class=\"item_image_sk\">\n\t\t\t\t\t\t\t<?php echo wp_get_attachment_image( $id, array(150, 150) );?>\n\t\t\t\t\t\t\t<input class=\"attachments_image\" type=\"checkbox\" value=\"<?php echo $id;?>\" name=\"wp_skitter_attachments[image][]\" id=\"wp_skitter_attachment_<?php echo $id;?>\" checked=\"checked\" style=\"display:none;\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"settings_slide\">\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_label_<?php echo $id;?>\">Label</label>\n\t\t\t\t\t\t\t<input class=\"attachments_label\" type=\"text\" name=\"wp_skitter_attachments[label][<?php echo $id;?>]\" id=\"wp_skitter_attachment_label_<?php echo $id;?>\" size=\"50\" />\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_link_<?php echo $id;?>\">Link</label>\n\t\t\t\t\t\t\t<input class=\"attachments_link\" type=\"text\" name=\"wp_skitter_attachments[link][<?php echo $id;?>]\" id=\"wp_skitter_attachment_link_<?php echo $id;?>\" size=\"50\" />\n\t\t\t\t\t\t\t<label for=\"wp_skitter_attachment_animation_<?php echo $id;?>\">Animation</label>\n\t\t\t\t\t\t\t<?php echo getSelectAnimations(array(\n\t\t\t\t\t\t\t\t'name' => 'wp_skitter_attachments[animation]['.$id.']',\n\t\t\t\t\t\t\t\t'id' => 'wp_skitter_attachment_animation_'.$id,\n\t\t\t\t\t\t\t\t'class' => 'attachments_animation'\n\t\t\t\t\t\t\t));?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<a href=\"#\" class=\"remove_slide_sk\" title=\"Remove\">x</a>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t\n\t\t<div id=\"setting_advanced\">\n\t\t\t\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\" colspan=\"2\"><h3>Customization</h3></th>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Skitter Theme</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php $wp_skitter_theme = get_option('wp_skitter_theme'); ?>\n\t\t\t\t\t\t<select name=\"wp_skitter_theme\" id=\"wp_skitter_theme\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$themes = getThemes();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($themes as $theme) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$selected = ($theme == $wp_skitter_theme) ? ' selected=\"selected\"' : '';\n\t\t\t\t\t\t\t\t$value = $theme != 'all' ? $theme : '';\n\t\t\t\t\t\t\t\techo sprintf('<option value=\"%s\"%s>%s</option>', $value, $selected, $theme);\n\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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">Animation type</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php $wp_skitter_animation = get_option('wp_skitter_animation'); ?>\n\t\t\t\t\t\t<select name=\"wp_skitter_animation\" id=\"wp_skitter_animation\">\n\t\t\t\t\t\t\t<option value=\"\">--</option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$animations = getAnimations();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($animations as $animation) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$selected = ($animation == $wp_skitter_animation) ? ' selected=\"selected\"' : '';\n\t\t\t\t\t\t\t\t$value = $animation != 'all' ? $animation : '';\n\t\t\t\t\t\t\t\techo sprintf('<option value=\"%s\"%s>%s</option>', $value, $selected, $animation);\n\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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">Navigation type</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php $wp_skitter_type_navigation = get_option('wp_skitter_type_navigation'); ?>\n\t\t\t\t\t\t<select name=\"wp_skitter_type_navigation\" id=\"wp_skitter_type_navigation\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$types_navigation = array(\n\t\t\t\t\t\t\t\t'numbers', \n\t\t\t\t\t\t\t\t'thumbs', \n\t\t\t\t\t\t\t\t'dots', \n\t\t\t\t\t\t\t\t'none', \n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($types_navigation as $type_navigation) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$selected = ($type_navigation == $wp_skitter_type_navigation) ? ' selected=\"selected\"' : '';\n\t\t\t\t\t\t\t\t$value = $type_navigation != 'all' ? $type_navigation : '';\n\t\t\t\t\t\t\t\techo sprintf('<option value=\"%s\"%s>%s</option>', $value, $selected, $type_navigation);\n\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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">width</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"wp_skitter_width\" id=\"wp_skitter_width\" size=\"20\" value=\"<?php echo get_option('wp_skitter_width'); ?>\" />px</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">height</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"wp_skitter_height\" id=\"wp_skitter_height\" size=\"20\" value=\"<?php echo get_option('wp_skitter_height'); ?>\" />px</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">background</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"wp_skitter_background\" id=\"wp_skitter_background\" size=\"20\" value=\"<?php echo get_option('wp_skitter_background'); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\">crop image</th>\n\t\t\t\t\t<td><input type=\"checkbox\" value=\"true\" name=\"wp_skitter_crop\" id=\"wp_skitter_crop\" <?php echo (get_option('wp_skitter_crop') == 'true' ? ' checked=\"checked\"' : ''); ?> /></td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t$data = array(\n\t\t\t\t\tarray('velocity', 'Velocity of animation', '1', \"2\"),\n\t\t\t\t\tarray('interval', 'Interval between transitions', '2500', \"3000\"),\n\t\t\t\t\tarray('navigation', 'Navigation display', 'true', \"false\"),\n\t\t\t\t\tarray('numbers_align', 'Alignment of numbers/dots/thumbs', \"left\", \"center\"),\n\t\t\t\t\tarray('label', 'Label display', 'true', \"false\"),\n\t\t\t\t\tarray('labelAnimation', 'Label animation', 'slideUp', \"slideUp, left, right, fixed\"),\n\t\t\t\t\tarray('width_label', 'Width label', \"null\", \"300px\"),\n\t\t\t\t\tarray('easing_default', 'Easing default', 'null', \"easeOutBack\"),\n\t\t\t\t\tarray('animateNumberOut', 'Animation/style number', \"null\", \"{backgroundColor:'#000', color:'#ccc'}\"),\n\t\t\t\t\tarray('animateNumberOver', 'Animation/style hover number', \"null\", \"{backgroundColor:'#000', color:'#ccc'}\"),\n\t\t\t\t\tarray('animateNumberActive', 'Animation/style active number', \"null\", \"{backgroundColor:'#000', color:'#ccc'}\"),\n\t\t\t\t\tarray('hideTools', 'Hide numbers and navigation', \"false\", \"true\"),\n\t\t\t\t\tarray('fullscreen', 'Fullscreen mode', \"false\", \"true\"),\n\t\t\t\t\tarray('show_randomly', 'Randomly slides', \"false\", \"true\"),\n\t\t\t\t\tarray('enable_navigation_keys', 'Enable navigation keys', \"false\", \"true\"),\n\t\t\t\t\tarray('controls', 'Option play/pause manually', \"false\", \"true\"),\n\t\t\t\t\tarray('controls_position', 'Position of button controls', \"center\", \"center, leftTop, rightTop, leftBottom, rightBottom\"),\n\t\t\t\t\tarray('focus', 'Focus slideshow', \"false\", \"true\"),\n\t\t\t\t\tarray('focus_position', 'Position of button focus slideshow', \"center\", \"center, leftTop, rightTop, leftBottom, rightBottom\"),\n\t\t\t\t\tarray('preview', 'Preview with dots', \"false\", \"true\"),\n\t\t\t\t\tarray('stop_over', 'Stop animation to move mouse over it.', \"false\", \"true\"),\n\t\t\t\t\tarray('with_animations', 'Specific animations', \"[]\", \"['paralell', 'glassCube', 'swapBars']\"),\n\t\t\t\t\tarray('auto_play', 'Sets whether the slideshow will start automatically', \"true\", \"false\"),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tforeach($data as $linha) \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<tr valign=\"top\" style=\"border-top:1px solid #ccc;\">\n\t\t\t\t\t<th scope=\"row\"><?php echo $linha[0];?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($linha[3] == 'true' || $linha[3] == 'false') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$selected = (get_option('wp_skitter_'.$linha[0]) == 'true' ? ' checked=\"checked\"' : '');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"checkbox\" value=\"true\" name=\"wp_skitter_<?php echo $linha[0];?>\" <?php echo $selected;?> />\n\t\t\t\t\t\t<?php\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?>\n\t\t\t\t\t\t<input type=\"text\" name=\"wp_skitter_<?php echo $linha[0];?>\" id=\"wp_skitter_<?php echo $linha[0];?>\" size=\"50\" value=\"<?php echo get_option('wp_skitter_'.$linha[0]); ?>\" />\n\t\t\t\t\t\t<?php\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?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\n\t\t\t\t<tr valign=\"top\" style=\"background-color:#eee;border-bottom:1px solid #ccc;\">\n\t\t\t\t\t<td scope=\"row\" style=\"padding-left:20px;\">Default: <strong><?php echo $linha[2];?></strong></td>\n\t\t\t\t\t<td>Example: <strong><?php echo $linha[3];?></strong></td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t?>\n\t\t\t\n\t\t\t</table>\n\t\t</div>\n\t \n\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t</p>\n\t</form>\n</div>\n\n<?php \n\n}", "title": "" }, { "docid": "e176dadc822f56c3ac4879a8f7c7e0eb", "score": "0.5215764", "text": "function MoveUp($patternId){\n\t\t//compare the page above, if any, then swap numbers\t\t\n\t\t$previousLinksOrderNumber = \"\";\n\t\t$previousLinkspageid = \"\";\t\t\n\t\t$sql = \"SELECT patternId, patternOrdernumber FROM ex_pattern ORDER BY patternOrdernumber\";\n\t\t$query = mysql_query($sql);\n\t\twhile($row = mysql_fetch_array($query)){\n\t\t\t//Check to see if this is the link to move\n\t\t\tif($row['patternId']==$patternId){\n\t\t\t\tif($previousLinkspageid!=\"\"){ \t\t//Link is already at the top - \"they built a better patternIdiot\"\n\t\t\t\t\t//Change me\n\t\t\t\t\tsmPattern::SetOrderNumber($patternId, $previousLinksOrderNumber);\t\n\t\t\t\t\t\n\t\t\t\t\t//Change other\n\t\t\t\t\tsmPattern::SetOrderNumber($previousLinkspageid, $row['patternOrdernumber']);\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\t$previousLinkspageid = $row['patternId'];\n\t\t\t$previousLinksOrderNumber = $row['patternOrdernumber'];\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "4cb89cb569db31a937d36ec655bf4741", "score": "0.521197", "text": "function change_templates_position() {\n\t\t\tadd_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_open', 29 ); // permission 29 is set because neobeat_add_product_list_item_holder_end hook is closed on 30\n\t\t\tadd_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 29 );\n\t\t}", "title": "" }, { "docid": "f2386466d6310c47eb819e5bf23fce61", "score": "0.52070993", "text": "function main_image() {\n $files = get_children('post_parent='.get_the_ID().'&post_type=attachment&post_mime_type=image&order=desc');\n if($files) :\n $permalink= get_permalink();\n $keys = array_reverse(array_keys($files));\n $j=0;\n $num = $keys[$j];\n $image=wp_get_attachment_image($num, 'large', true);\n $imagepieces = explode('\"', $image);\n $imagepath = $imagepieces[1];\n $main=wp_get_attachment_url($num);\n $template=get_template_directory();\n $the_title=get_the_title();\n print \"<a class='post-thumbnail mdl-cell mdl-cell--12-col' href='$permalink' aria-hidden='true'><img src='$main' alt='$the_title' class='frame' /></a>\";\n else :\n $src = get_template_directory_uri();\n $alt = get_the_title();\n $permalink= get_permalink();\n print \"<a class='post-thumbnail mdl-cell mdl-cell--12-col' href='$permalink' aria-hidden='true'><img src='$src/assets/img/default-image.jpg' alt='$alt' /></a>\";\n endif;\n }", "title": "" }, { "docid": "2086b63ba25a4e3ad4e7744c59447ecf", "score": "0.52014214", "text": "function dd_spg_display_gallery($atts) {\n \n global $wpdb;\n $table_photo = $wpdb->prefix . \"dd_spg_photos\";\n $table_gallery = $wpdb->prefix . \"dd_spg_galleries\";\n \n $return_options_data=dd_spg_get_all_options();\n $option_data = (object) $return_options_data;\n $dd_spg_is_display_title_and_des = strtolower($option_data->dd_spg_is_display_title_and_des);\n $dd_spg_slide_speed = strtolower($option_data->dd_spg_slide_speed);\n \n $dd_spg_effect = strtolower($option_data->dd_spg_effect);\n $dd_spg_slices = strtolower($option_data->dd_spg_slices);\n $dd_spg_boxcols = strtolower($option_data->dd_spg_boxcols);\n $dd_spg_boxrows = strtolower($option_data->dd_spg_boxrows);\n $dd_spg_pausetime = strtolower($option_data->dd_spg_pausetime);\n $dd_spg_largenavarrow = strtolower($option_data->dd_spg_largenavarrow);\n $dd_spg_largenavarrowdefaulthidden = strtolower($option_data->dd_spg_largenavarrowdefaulthidden);\n $dd_spg_pauseonhover = strtolower($option_data->dd_spg_pauseonhover);\n $dd_spg_manualadvance = strtolower($option_data->dd_spg_manualadvance);\n $dd_spg_prevtext = strtolower($option_data->dd_spg_prevtext);\n $dd_spg_nexttext = strtolower($option_data->dd_spg_nexttext);\n $dd_spg_keyboardnav = strtolower($option_data->dd_spg_keyboardnav);\n $dd_spg_displaygallerycaption = strtolower($option_data->dd_spg_displaygallerycaption);\n $dd_spg_controlnav = strtolower($option_data->dd_spg_controlnav);\n $dd_spg_controlnavthumbs = strtolower($option_data->dd_spg_controlnavthumbs);\n $dd_spg_captionopacity = strtolower($option_data->dd_spg_captionopacity);\n\t\n\t//Initializing thumbnail width height\n $img_thumb_size = explode('x', strtolower(trim($option_data->dd_spg_thumb_size))); //width x height\n $thumb_width = ($img_thumb_size[0])?$img_thumb_size[0]:80; //Calculating thumbnail width\n $thumb_height = ($img_thumb_size[1])?$img_thumb_size[1]:60; //Calculating thumbnail height\n \n //Initializing large width height\n $img_large_size = explode('x', strtolower(trim($option_data->dd_spg_large_size))); //height x width\n $img_large_width = ($img_large_size[0])?$img_large_size[0]:400; //Calculating large image width\n $img_large_height = ($img_large_size[1])?$img_large_size[1]:300; //Calculating large image height\n \n $extra = strtolower($img_large_width . 'x' . $img_large_height);\n $extra_replace = strtolower($thumb_width . 'x' . $thumb_height);\n \n \n extract( shortcode_atts( array(\n 'id' => '0',\n 'effect' => $dd_spg_effect,\n 'slices' => $dd_spg_slices,\n 'boxcols' => $dd_spg_boxcols,\n 'boxrows' => $dd_spg_boxrows,\n 'slidespeed' => $dd_spg_slide_speed,\n 'pausetime' => $dd_spg_pausetime,\n 'largenavarrow' => $dd_spg_largenavarrow,\n 'largenavarrowdefaulthidden' => $dd_spg_largenavarrowdefaulthidden,\n 'pausepnhover' => $dd_spg_pauseonhover,\n 'manualadvance' => $dd_spg_manualadvance,\n 'prevtext' => $dd_spg_prevtext,\n 'nexttext' => $dd_spg_nexttext,\n 'keyboardnav' => $dd_spg_keyboardnav,\n 'displaygallerycaption' => $dd_spg_is_display_title_and_des,\n 'controlnav' => $dd_spg_controlnav,\n 'controlnavthumbs' => $dd_spg_controlnavthumbs,\n 'controlnavthumbswidth' => $thumb_width,\n 'largeimageheight' => $img_large_height,\n 'largeimagewidth' => $img_large_width,\n 'controlnavthumbsheight' => $thumb_height,\n 'captionopacity' => $dd_spg_captionopacity,\n ), $atts ) ); \n \n \n if(empty($id)){\n return false;\n }\n \n \n $sql=\"select * from \".$table_gallery.\" where id='\".$id.\"'\";\n $gallery_data = $wpdb->get_row($sql);\n \n \n \n $sql=\"select * from \".$table_photo.\" where gallery_id='\".$id.\"'\";\n $photo_data = $wpdb->get_results($sql);\n \n \n if(!empty($gallery_data)){\n $upload_dir = wp_upload_dir();\n /*Array ( \n [path] => C:\\path\\to\\wordpress\\wp-content\\uploads\\2010\\05 \n [url] => http://example.com/wp-content/uploads/2010/05 \n [subdir] => /2010/05 \n [basedir] => C:\\path\\to\\wordpress\\wp-content\\uploads \n [baseurl] => http://example.com/wp-content/uploads \n [error] => \n )*/ \n \n $return_text = '<div id=\"slider_'.$id.'\" class=\"sssSlider\">';\n foreach($photo_data as $row){\n $img = $row->photo;\n \n $wp_filetype = wp_check_filetype(basename($img), null );\n $ext = '.' . $wp_filetype['ext'];\n $img = str_replace($ext, '-' . $img_large_width . 'x' . $img_large_height . $ext, $img);\n \n $tmp_img_url = $img;\n $tmp_img_dir = str_replace($upload_dir['baseurl'], $upload_dir['basedir'], $img);\n if(!file_exists($tmp_img_dir)){\n $img = $row->photo;\n }\n \n $image = '<img src=\"'.$img.'\" alt=\"'.$row->title.'\" title=\"'.$row->description.'\" />';\n $return_text.=$image; \n }\n $return_text.='</div>';\n\n \n\n \n$javascript_str = <<<EOD\n<script type=\"text/javascript\">\n$(window).load(function() { \n $('#slider_{$id}').ssSlider({\n effect: '{$effect}',\n slices: '{$slices}',\n boxCols: '{$boxcols}',\n boxRows: '{$boxrows}',\n slideSpeed: '{$slidespeed}',\n pauseTime: '{$pausetime}',\n largeNavArrow: '{$largenavarrow}',\n largeNavArrowDefaultHidden: '{$largenavarrowdefaulthidden}',\n pauseOnHover: '{$pauseonhover}',\n manualAdvance: '{$manualadvance}',\n prevText: '{$prevtext}',\n nextText: '{$nexttext}',\n keyboardNav: '{$keyboardnav}',\n displayGalleryCaption: '{$displayhallerycaption}',\n controlNav: '{$controlnav}',\n controlNavThumbs: '{$controlnavthumbs}',\n controlNavThumbsWidth: '{$controlnavthumbswidth}',\n largeImageHeight: '{$largeimageheight}',\n largeImageWidth: '{$largeimagewidth}',\n controlNavThumbsHeight: '{$controlnavthumbsheight}',\n controlNavThumbsSearch: '{$extra}',\n controlNavThumbsReplace: '{$extra_replace}',\n captionOpacity: '{$captionopacity}',\n beforeChange: function(){},\n afterChange: function(){},\n slideshowEnd: function(){},\n lastSlide: function(){},\n afterLoad: function(){}\n }); \n});\n</script>\nEOD;\n $return_text.= $javascript_str;\n return $return_text;\n \n } else {\n return false;\n }\n return false;\n}", "title": "" }, { "docid": "7ec5d8d4b0c0e74481c78bae8ba54c28", "score": "0.5198458", "text": "function getMediaOrdering() {\n $methods = array(\"\", \"date_add ASC\", \"date_add DESC\", \"filename ASC\",\n \"filename DESC\", \"name ASC\", \"name DESC\");\n \n return $methods[intval(zmgFactory::getConfig()->get('layout/ordering/media'))];\n }", "title": "" }, { "docid": "028a285191875390966d69c7289c205b", "score": "0.5186779", "text": "public function reorderMedia(Request $request)\n {\n $idArray = explode(\",\", trim($request['ids']));\n\n $sorter = static function ($produto) use ($idArray) {\n return array_search($produto->id, $idArray);\n };\n\n \n $medias = Media::with('imovel')->whereIn('id', $idArray)->get()->sortBy( $sorter);\n\n $indice = 0; \n\n foreach ($medias as $media) {\n\n $indice++; \n $picture = $medias->find($media->id);\n $picture->update(['position' => $indice]); \n \n } \n\n if($request->session()->get('imovel') !== null){\n\n $imovel = $request->session()->get('imovel');\n \n $update = $medias[0]->imovel; \n\n $request->session()->put('imovel', $update); \n\n }\n\n return response()->json('success', 200);\n \n \n }", "title": "" }, { "docid": "b0ce5046aa4313a6c43585de109fa050", "score": "0.51836306", "text": "public function updateOrder() {\n\t\t\t$table = \"test_image\";\n\t\t\t\n\t\t\t$image[\"imgorder\"] = $this->getOrder();\n\t\t\t\n\t\t\t$condition = array('id' => $this->getID());\n\t\t\t\n\t\t\t$this->getDBConn()->update($table, $image, $condition);\n\t\t}", "title": "" }, { "docid": "3c14ae71bebe34d63cc46efa43c93227", "score": "0.51750433", "text": "function helix_gallery_preview($params, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'slug' => '',\n\t\t'title' => '',\n\t\t'type' => '',\n\t\t'speed' => '2500'\n\t), $params));\n\t\n\tglobal $post;\n\t\n\t$term = get_term_by('slug', $slug, 'gallery');\n\t\n\tif ( $title == '' ) $the_title = 'From our ' . $term->name . ' Gallery';\n\telse $the_title = $title;\n\t\n\tif ( $type == 'sliding' ) {\n\t\t$sliding_class = ' sliding';\n\t\t$number = '-1';\n\t} else {\n\t\t$sliding_class = '';\n\t\t$number = '3';\n\t}\n\t\n\t$output = '<div class=\"from-gallery ' . $sliding_class . '\">\n\t\t<h4>' . $the_title . '</h4>';\n\t\n\tif ( $type == 'sliding' ) {\n\t\t$output .= '<div class=\"sliding-container\">';\n\t}\n\t\n\t$query = new WP_Query(array( 'numberposts' => $number, 'post_type' => 'photo-gallery', 'gallery' => $term->slug ) );\n\t$i = 0;\n\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t$i++;\n\t\t\n\t\tif ( has_post_thumbnail ) {\n\t\t\t$thumb = get_the_post_thumbnail($post->ID, 'from-gallery-page');\n\t\t\t\n\t\t\t$output .= '<div class=\"gallery-preview preview-' . $i . '\"><a href=\"/gallery/' . $slug . '\">' . $thumb . '</a></div>';\n\t\t}\n\tendwhile; endif;\n\t\n\t$output .= '<div class=\"clear\"></div>';\n\t\n\tif ( $type == 'sliding' ) {\n\t\t$output .= '</div><a href=\"/gallery/' . $slug . '\"><div class=\"sliding-top\"></div></a>';\n\t}\n\t\n\t$output .= '<a href=\"/gallery/' . $slug . '/\" class=\"btn btn-large\">Browse Gallery</a>\n\t</div>\n\t<script> start_gallery_preview_slide(' . $speed . '); </script>';\n\t\n\treturn $output;\n}", "title": "" }, { "docid": "52e306fd273f29c3e434988fc8d76596", "score": "0.5170335", "text": "function loadImages($albums, $albumRows, $albumColumn, $imgHgt, $imgWdth) {\r\n\t$content = $album = NULL;\r\n\t$inc = 1;\r\n\t$width = $height = $newWdth = $newHgt = 0;\r\n\t\r\n\tif(!empty($albums)) {\r\n\r\n\t foreach ($albums as $album) {\t \r\n\t \r\n\t\t\t$img = JURI::Base() . 'images/facegallery/thumb_image/' . $album->thumb_image;\r\n\t\t\t \r\n\t\t\tlist($width, $height) = getimagesize($img);\r\n\t\t\t\r\n\t\t\tif( $width < $imgWdth) {\r\n\r\n\t\t\t\t$newWdth = $imgWdth - $width;\r\n\t\t\t\t$width = $width + $newWdth;\r\n\t\t\t\t$newWdth=\" width:\".$width.\"px;\";\r\n\t\t\t\t$newHgt='';\r\n\t\t\t}\t\t\t\r\n\t\t\telse if( $height < $imgHgt) {\r\n\r\n\t\t\t\t$newHgt = $imgHgt - $height;\r\n\t\t\t\t$height = $height + $newHgt;\r\n\t\t\t\t$newHgt=\" height:\".$height.\"px;\";\r\n\t\t\t\t$newWdth='';\r\n\t\t\t}\r\n\t\r\n\t $total = $album->imagecount;\r\n\t $content .= '<li>';\r\n\t $content .= '<a href=\"' . JRoute::_(\"index.php?option=com_facegallery&view=images&aid=\" . $album->albumid) . '\" class=\"album_cover\">';\r\n\t if($album->cover_image)\r\n\t {\r\n\t \t$content .= '<span><img alt=\"' . $album->thumb_image . '\" src=\"' .$img .'\" style=\"' . $newWdth. ' ' .$newHgt. ' max-width:none !important;\" /></span>';\r\n\t }\r\n\t else \r\n\t { \t\r\n\t \t$content .= '<span><img alt=\"\" src=\"' . JURI::Base() . 'components/com_facegallery/images/default.jpg' . '\" /></span>';\r\n\t }\r\n\t $content .= '</a><span class=\"drop_shadow\"></span>';\r\n\t $content .= '<p class=\"album_title\">' . ucfirst($album->album_name) . '</p>';\r\n\t $content .= '<p class=\"images_count\"><i></i><span>' . $total .' '. JText::_('COM_FACEGALLERY_FEATURED_IMAGE'). ' </span></p>';\r\n\t $content .= '</li>';\r\n\t\r\n\t if ($inc % $albumColumn == 0 && count($albums) != $inc) {\r\n\t $content .= \"</ul><ul>\"; \r\n\t }\r\n\t\r\n\t $inc++;\r\n \t} // End foreach\r\n\t} // End If\r\n return $content;\r\n}", "title": "" }, { "docid": "cc1a6db60533f4fda0aeb69a06ab4667", "score": "0.51691103", "text": "function margo_before_shop_loop(){\n\t?>\n\t\t<div class=\"row\">\n\t\t<?php do_action( 'woo_custom_catalog_ordering' ); ?>\n\t<?php\n}", "title": "" }, { "docid": "e3ca520d6a69a1e5d4c94251fcfb5909", "score": "0.5166279", "text": "function videoresource_item_move_down($item) {\n return move_item($item, 'down');\n}", "title": "" }, { "docid": "2660b484022eec7c43d88522bebebe67", "score": "0.51619", "text": "function hentaifromhell($url) {\n// atau ada link ke galeri, // http://hentaifromhell.net/miyabi-tsuzuru-rough-sketch-rough-playing/\n// atau tidak ada galeri, // http://hentaifromhell.net/1st-week-of-homestay/\n\tif (strpos($url, 'gallery.php')) {\n\t\treturn hfh_gal($url);\n\t}\n\t$name = basename($url);\n\t$p = new Page($url);\n\t$p->go_line('alt=\"Gallery\"');\n\tif ($p->curr_line()->contain('href=\"')) {\n\t\t$gal = $p->curr_line()->dup()\n\t\t\t->cut_between('href=\"', '\"')\n\t\t\t->to_s();\n\t\treturn hfh_gal($gal);\n\t}\n\t$p->reset_line();\n\t$p->go_line(\"id='gallery-1'\");\n\tif ($p->curr_line()->contain(\"id='gallery-1'\")) {\n\t\tdo {\n\t\t\t$line = $p->curr_line();\n\t\t\tif ($line->contain('src=\"')) {\n\t\t\t\t$src = $line->dup()\n\t\t\t\t\t->cut_between('src=\"', '\"')\n\t\t\t\t\t->regex_replace('/-\\d+x\\d+\\./', '.')\n\t\t\t\t\t->to_s();\n\t\t\t\techo \"<a href='$src'>$name</a><br>\\n\";\n\t\t\t} else if ($line->contain('class=\"gallery_pages_list\"')) {\n\t\t\t\t// grab last page\n\t\t\t\t// iterate from page 2\n\t\t\t\t$pages = $line->extract_to_array('\">', '</');\n\t\t\t\t$last = (int)end($pages);\n\t\t\t\tfor ($i=2; $i<=$last; $i++) {\n\t\t\t\t\t$aurl = $url.'?galleryPage='.$i;\n\t\t\t\t\t$ap = new Page($aurl);\n\t\t\t\t\t$ap->go_line(\"id='gallery-1'\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\t$line = $ap->curr_line();\n\t\t\t\t\t\tif ($line->contain('src=\"')) {\n\t\t\t\t\t\t\t$src = $line->cut_between('src=\"', '\"')\n\t\t\t\t\t\t\t\t->regex_replace('/-\\d+x\\d+\\./', '.')\n\t\t\t\t\t\t\t\t->to_s();\n\t\t\t\t\t\t\techo \"<a href='$src'>$name</a><br>\\n\";\n\t\t\t\t\t}} while (!$ap->next_line()->contain('</div>'));\n\t\t\t\t}\n\t\t\t}\n\t\t} while (!$p->next_line()->regex_match('/^<\\/div>/'));\n\t\treturn;\n\t}\n\techo \"No gallery <a href='$url'>link</a>\";\n\treturn;\n}", "title": "" }, { "docid": "4bc7bc263573ed3200d17faebc56eb0e", "score": "0.51589876", "text": "function getLoadImgTurn(){\n//access to WP db\n $my_posts = new WP_Query;\n//URL for finding image\n// $url = \"https://www.bing.com/images/search?sp=-1&pq=\".str_replace(\" \",\"+\",$handle_item).\"&sc=8-6&sk=&cvid=C1E660A7D9B644928ED6A3DF14B77EBA&q=\".str_replace(\" \", \"+\",$handle_item).\"&qft=+filterui:imagesize-medium+filterui:photo-photo&FORM=IRFLTR\";\n $url = \"https://www.bing.com/images/search?sp=-1&pq=\".str_replace(\" \",\"+\",$handle_item).\"&sc=8-6&sk=&cvid=C1E660A7D9B644928ED6A3DF14B77EBA&q=\".str_replace(\" \", \"+\",$handle_item).\"&qft=+filterui:imagesize-medium+filterui:photo-photo&FORM=IRFLTR\";\n $draftPosts = array(); // variable - post/pages draft data (title, ID, content, images) \n $output = []; // variable - pictures url array\n $editPost = array();\n $rightLeftImgAlign = ['alignleft', 'alignright'];\n\n//get WP Object from WP DB\n $myposts = $my_posts->query(array(\n 'post_status' => 'draft',\n 'post_type'=>['post','page']\n ));\n\n//current theme data from WP db without image url \n foreach( $myposts as $pst ){\n $draftPosts[$pst->ID]['p_title']=$pst->post_title;\n $draftPosts[$pst->ID]['p_сontent']=$pst->post_content;\n preg_match_all('!<a class=\"thumb\" target=\"_blank\" href=\"(.*?)\"!',get(urlConstract($pst->post_title)),$url_matches);\n $draftPosts[$pst->ID]['p_newImg']= $url_matches[1][0];\n }\n//fill array $draftPosts by imgLoad function \n foreach ($draftPosts as $key => $value) {\n imgLoad($value['p_newImg'], $key, $value['p_title']);\n }\n//adds to array with posts/pages data are data about images ID in WP DB\n foreach ($draftPosts as $key => $value) {\n $attachId = new WP_Query(array(\n 'post_status' => 'any',\n 'post_type' => 'attachment',\n // 'post_mime_type' => 'image/jpeg',\n 'post_parent' => $key\n ));\n $draftPosts[$key]['p_img_id'] = $attachId->posts[0]->ID;\n }\n//get picture URL from WP DB and insert them to draft post or pages\n foreach ($draftPosts as $key => $value) {\n $side;\n $img = wp_get_attachment_image_url($value['p_img_id'], 'medium');\n $editPost['ID'] = $key;\n if (array_rand($rightLeftImgAlign) == 0) {\n $side = $rightLeftImgAlign[0];\n } else {\n $side = $rightLeftImgAlign[1];\n }\n // $editPost['post_content'] = '<img class=\"alignnone size-medium wp-image-19 alignleft\" src=\"'.$img.'\" alt=\"'.$value['p_title'].'\"/>'.$value['p_сontent'];\n $editPost['post_content'] = '<img class=\"alignnone size-medium wp-image-19 '.$side.'\" src=\"'.$img.'\" alt=\"'.$value['p_title'].'\"/>'.$value['p_сontent'];\n wp_update_post( wp_slash($editPost));\n }\n}", "title": "" }, { "docid": "5d7f428d34a4a8612b2488e54a7a1c4e", "score": "0.5154599", "text": "function ppm_move_item($target_cat, $id, $ppm_test_mode, $item_type)\n{\n global $page;\n\n // build debugging messages (for test mode)\n if ($ppm_test_mode)\n {\n $debug_line_1 = l10n('DBG_PROCESSING').' '.$item_type;\n\n array_push(\n $page['messages'],\n sprintf($debug_line_1)\n );\n }\n\n // call the corresponding move function for the item type\n switch ($item_type) {\n case 'photo':\n ppm_move_photo($target_cat, $id, $ppm_test_mode);\n break;\n case 'album':\n ppm_move_album($target_cat, $id, $ppm_test_mode);\n break;\n default:\n array_push(\n $page['messages'],\n l10n('MSG_NO_TYPE')\n );\n }\n}", "title": "" }, { "docid": "4343e52cd2a72823a27fb8f23281652f", "score": "0.51506424", "text": "public static function importGallery()\n {\n\n $objFilm = Database::getInstance()->prepare('SELECT * FROM tl_iso_product')->execute();\n while ($objFilm->next())\n {\n\n $arrFiles = array();\n //echo print_r($arrFiles,true);\n if (is_file(TL_ROOT . '/files/client/images/' . $objFilm->id . '.jpg'))\n {\n //Files::getInstance()->delete('isotope/i/' . $objFilm->id . '.jpg');\n Files::getInstance()->copy('files/client/images/' . $objFilm->id . '.jpg', 'isotope/i/id-' . $objFilm->id . '.jpg');\n $arrFiles[] = array(\n 'src' => 'id-' . $objFilm->id . '.jpg',\n 'alt' => '',\n 'link' => '',\n 'desc' => '',\n //'translate' => 'none',\n );\n Database::getInstance()->prepare('UPDATE tl_iso_product SET images = ? WHERE id=?')->execute(serialize($arrFiles), $objFilm->id);\n }\n }\n }", "title": "" }, { "docid": "1785d144e8926af59188064abca2e1a1", "score": "0.51485527", "text": "protected function move() {\n\t\tparent::move();\n\n\t\t$this->LoopSwimdata->goToIndex( $this->Loop->index() );\n\t}", "title": "" }, { "docid": "59fac1db4612da3f8e495f68e40f7238", "score": "0.51370436", "text": "function bootwireThumbnailsGallery(){\n\n\t$galleryimages = wire(\"page\")->images;\n\t$gallerycolumns = wire(\"page\")->gallery_columns;\n\tif($gallerycolumns == 2){\n\t\t$span = 6;\n\t\t$imagedim = 570;\n\t} elseif ($gallerycolumns == 3){\n\t\t$span = 4;\n\t\t$imagedim = 370;\t\t\n\t} elseif($gallerycolumns == 4){\n\t\t$span = 3;\n\t\t$imagedim = 270;\t\t\n\t} elseif($gallerycolumns == 5){\n\t\t$span = 2;\n\t\t$imagedim = 170;\t\t\n\t} elseif($gallerycolumns == 6){\n\t\t$span = 2;\n\t\t$imagedim = 170;\t\t\n\t}else{\n\t\t$span = 3;\n\t\t$imagedim = 270;\n\t}\n\n\t$out = \" \";\n\n\tforeach ($galleryimages as $galleryimage) {\n\t\t$out .= \"<li class='span{$span}'>\";\n $out .= \"<a href='{$galleryimage->url}' title='{$galleryimage->description}'>\";\n $out .= \"<img src='{$galleryimage->size($imagedim, $imagedim)->url}'>\";\n $out .= \"</a>\";\n $out .= \"</li>\";\n\t}\n/*\nThis is designed to work in a fluid row - if this is being inserted into a pre-existing row, remove the \nDIV below, but keep the UL.\n*/\n\techo \"<div class='row-fluid'>\";\n\techo \"<ul class='thumbnails'>{$out}</ul>\";\n\techo \"</div>\";\n}", "title": "" }, { "docid": "f6c7e42838337e373ad8827ee5f6b380", "score": "0.5134869", "text": "function gallery_page_handler($page)\n{\n elgg_load_library('elgg:gallery');\n\n if(!isset($page[0]))\n $page[0] = 'all';\n\n $page_type = $page[0];\n switch($page_type)\n {\n case 'view':\n $params = gallery_get_page_content_show($page[1]);\n break;\n case 'add':\n gatekeeper();\n $params = gallery_get_page_content_add();\n break;\n case 'delete':\n gatekeeper();\n $params = gallery_get_page_content_delete($page[1]);\n break;\n case 'all':\n $params = gallery_get_page_content_all();\n break;\n default:\n return false;\n }\n\n $body = elgg_view_layout('content', $params);\n\n echo elgg_view_page($params['title'], $body);\n return true;\n}", "title": "" }, { "docid": "b89ee2c143f6eb28777aa646076ba741", "score": "0.5132402", "text": "private function stack()\n {\n usort($this->images, [$this, 'imageSorter']);\n\n if ($this->width === 0) {\n $this->width = $this->images[0]->getWidth();\n if ($this->maxWidth < $this->width && $this->maxWidth != null) {\n $this->width = $this->maxWidth;\n }\n }\n\n if ($this->height === 0) {\n $this->height = $this->images[0]->getHeight();\n if ($this->maxHeight < $this->height && $this->maxHeight != null) {\n $this->height = $this->maxHeight;\n }\n }\n\n $this->freeSpaces[] = new FreeSpace(0, 0, $this->width, $this->height);\n\n foreach ($this->images as $image) {\n if ($this->hasSpace($image)) {\n $this->putImageInFreeSpace($image);\n continue;\n }\n\n $this->addFreeSpaceForImage($image);\n $this->putImageInFreeSpace($image);\n }\n }", "title": "" }, { "docid": "169837bf70447256e9b979a427749423", "score": "0.5127307", "text": "private function publishImages()\n\t{\n\t\tglobal $db;\n\t\t// Delete the live gallery images\n\t\t$this->deleteImages(0);\n\t\t// Set the non-live gallery images as live\n\t\t$db->query\n\t\t(\"\n\t\t\tUPDATE images_galleries\n\t\t\tSET revision = 0\n\t\t\tWHERE page_guid = '\".$this->getGUID().\"'\n\t\t\tAND revision = 1\n\t\t\");\n\t\t// Duplicate the new live gallery images as non-live\n\t\t$live_images = $db->get_results\n\t\t(\"\n\t\t\tINSERT INTO images_galleries\n\t\t\t(id, image_guid, page_guid, description, sort_order, revision)\n\t\t\tSELECT (0), image_guid, page_guid, description, sort_order, (1)\n\t\t\tFROM images_galleries\n\t\t\tWHERE page_guid = '\".$this->getGUID().\"'\n\t\t\tAND revision = 0\n\t\t\");\n\t}", "title": "" }, { "docid": "f14f3ac05d1d951897f91e5c3f05a872", "score": "0.51250505", "text": "function view_imagen_header(){\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->get_results(\"SELECT posicion_name, post_id FROM {$wpdb->prefix}image_header\n\t\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\t\tCASE\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=1 THEN 1\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=2 THEN 2\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=4 THEN 3\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=5 THEN 4\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=6 THEN 5\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=3 THEN 6\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=7 THEN 7\n\t\t\t\t\t\t\t\t\t\t\t\tWHEN posicion_name=8 THEN 8\n\t\t\t\t\t\t\t\t\t\t\tEND ASC;\");\n\n\n\t}", "title": "" }, { "docid": "90c78511a06e4750a77e7eed0459774c", "score": "0.51224804", "text": "function MoveDown($patternId){\n\t\t//compare the page above, if any, then swap numbers\t\t\n\t\t$previousLinksOrderNumber = \"\";\n\t\t$previousLinkspageid = \"\";\t\t\n\t\t$sql = \"SELECT patternId, patternOrdernumber FROM ex_pattern ORDER BY patternOrdernumber DESC\";\n\t\t$query = mysql_query($sql);\n\t\twhile($row = mysql_fetch_array($query)){\n\t\t\t//Check to see if this is the link to move\n\t\t\tif($row['patternId']==$patternId){\n\t\t\t\tif($previousLinkspageid!=\"\"){ \t\t//Link is already at the bottom - \"they built a better patternIdiot\"\n\t\t\t\t\t//Change me\n\t\t\t\t\tsmPattern::SetOrderNumber($patternId, $previousLinksOrderNumber);\t\n\t\t\t\t\t\n\t\t\t\t\t//Change other\n\t\t\t\t\tsmPattern::SetOrderNumber($previousLinkspageid, $row['patternOrdernumber']);\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\t$previousLinkspageid = $row['patternId'];\n\t\t\t$previousLinksOrderNumber = $row['patternOrdernumber'];\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "69b9476220c4470b794fe404e339f17e", "score": "0.51152766", "text": "public function executeImageGallery() {\n\t\t$path = '../uploads';\n\t\t$dirhandle = opendir($path);\n\n\t\treaddir($dirhandle);\n\t\treaddir($dirhandle);\n\n\t\t$imageArray = array();\n\n\t\t/* Get a list of image filenames\n\t\t */\n\t\twhile ($thisFile = readdir($dirhandle)) {\n\t\t\tif ($thisFile != '.DS_Store') {\n\t\t\t\t$imageArray[] = $thisFile;\n\t\t\t}\n\t\t}\n\n\t\t$this->setData($imageArray);\n\t}", "title": "" }, { "docid": "e3f67039c0bc86c675845050d7fb2bb6", "score": "0.5113999", "text": "function _menuMoveItemsOneDown($parentID) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## we will update all subpages of the supplied parent\n\t$db_connection = new DB_Sql();\n\t$query = \"UPDATE \".STRUCTURE.\" SET structure_order=structure_order+1 WHERE structure_parent='$parentID' AND client_id='$client_id'\";\n\t$result = $db_connection->query($query);\t\n}", "title": "" }, { "docid": "0b4ab841fab3c774ac57a040df91a34e", "score": "0.5113218", "text": "public function updateSlideShowImagesOrder(){\n\t \n $data = isset($_POST['img']) ? $_POST['img'] : 0;\n $i = 0;\n foreach ($data as $id) {\n $id = (int) $this->test_input($id);\n $updatePlayList = $this->query_update(\"update \".tbl_slideshow_imgs.\" set `position` = '{$i}' where `id`='{$id}' AND `userid`='{$this->userid}'\");\n \n $i++;\n }\n\t\n echo 1;\n\t \n\t \n }", "title": "" }, { "docid": "852adfea9ea642bc810d6c0b6517c507", "score": "0.5106628", "text": "function tc_content_show($column, $post_id){\n global $post;\n if($column == 'tc_slider_image'){\n echo the_post_thumbnail(array(100, 100));\n }\n if($column == 'tc_slider_image_order'){\n echo $post->menu_order;\n }\n}", "title": "" }, { "docid": "a4fc5deb1263624f83b1cee64e11358e", "score": "0.510429", "text": "public function Rearrange() {\n return '<li class=\"list-group-item\" id=\"{{id}}\">{{image_hover_front_heading}}</li>';\n }", "title": "" }, { "docid": "2f132b8f519c759e51d52a555c69d591", "score": "0.50954974", "text": "function wrny_gallery_shortcode( $attr ) {\n\t\n\tglobal $post;\n\t\n\t// TODO: run default gallery shortcode on Shop page\n\tif( $post->post_title == 'Shop' ) {\n\t\treturn wp_gallery_shortcode( $attr );\n\t}\n\t\n\t// get featured img id to exclude\n\t$featuredID = get_post_thumbnail_id();\n\tstatic $instance = 0;\n\t$instance++;\n\t\n\tif( !empty($attr['ids'] ) ) {\n\t\tif( empty( $attr['orderby'] ) ) {\n\t\t\t$attr['orderby'] = 'post__in';\n\t\t}\n\t\t$attr['include'] = $attr['ids'];\n\t}\n\t\n\t$output = apply_filters( 'post_gallery', '', $attr );\n\t\n\tif( $output != '' ) {\n\t\treturn $output;\n\t}\n\t\n\tif( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif( !$attr['orderby'] ) {\n\t\t\tunset( $attr['orderby'] );\n\t\t}\n\t}\n\t\n\textract( shortcode_atts( array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => '',\n\t\t'icontag' => '',\n\t\t'captiontag' => '',\n\t\t'columns' => 3,\n\t\t'size' => 'article-gallery',\n\t\t'include' => '',\n\t\t'exclude' => ''\n\t), $attr ) );\n\t\n\t$id = intval( $id );\n\t\n\tif( $order === 'RAND' ) {\n\t\t$orderby = 'none';\n\t}\n\t\n\t// get the attachments\n\tif( !empty( $include ) ) {\n\t\t\n\t\t$_attachments = get_posts( array(\n\t\t\t'include' => $include,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'order' => $order,\n\t\t\t'orderby' => $orderby\n\t\t) );\n\t\t\n\t\t$attachments = array();\n\t\t\n\t\tforeach( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t\t\n\t} elseif( !empty( $exclude ) ) {\n\t\t\n\t\t$attachments = get_children( array(\n\t\t\t'post_parent' => $id,\n\t\t\t'exclude' => $exclude,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'order' => $order,\n\t\t\t'orderby' => $orderby\n\t\t) );\n\t\t\n\t} else {\n\t\t\n\t\t$attachments = get_children( array( \n\t\t\t'post_parent' => $id,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'order' => $order,\n\t\t\t'orderby' => $orderby\n\t\t) );\n\t\t\n\t}\n\t\n\tif( empty( $attachments ) ) {\n\t\t$attachments = get_posts( $args );\n\t}\n\t\n\t// html markup for gallery\n\tif( $attachments ) {\n\t\n\t\t// RESPONSIVE GALLERY\n\t\t\t\n\t\t// load our gallery javascripts and css\n\t\t//wp_enqueue_script( 'jquery-scrollpane', get_stylesheet_directory_uri() . '/js/jquery.scrollpane.js', array(), '1.0', true );\n\t\twp_enqueue_script( 'jquery-mousewheel', get_stylesheet_directory_uri() . '/js/jquery.mousewheel.js', array(), '1.0', true );\n\t\t//wp_enqueue_style( 'jquery-scrollpane-css', get_stylesheet_directory_uri() . '/css/jquery.scrollpane.css' );\n\t\twp_enqueue_script( 'jquery-cycle2', get_stylesheet_directory_uri() . '/js/jquery.cycle2.js' );\n\t\twp_enqueue_script( 'jquery-cycle2-center', get_stylesheet_directory_uri() . '/js/jquery.cycle2.center.js' );\n\t\twp_enqueue_script( 'jquery-cycle2-swipe', get_stylesheet_directory_uri() . '/js/jquery.cycle2.swipe.js' );\n\t\t//wp_enqueue_script( 'gallery', get_stylesheet_directory_uri() . '/js/gallery.js', array(), '1.0', true );\n\t\t\n\t\t$output .= '<div id=\"article-gallery\">';\n\t\t$output .= '<div class=\"cycle-slideshow\" \n\t\t\tdata-cycle-fx=\"fade\" \n\t\t\tdata-cycle-pager=\".cycle-pager\" \n\t\t\tdata-cycle-slides=\"> div\" \n\t\t\tdata-cycle-swipe=true\n\t\t\tdata-cycle-timeout=\"5000\"\n\t\t\tdata-cycle-prev=\"#cycle-prev\"\n\t\t\tdata-cycle-next=\"#cycle-next\" \n\t\t\t>';\n\t\t\n\t\tforeach( $attachments as $attachment ) {\n\t\t\t\n\t\t\t// get image data\n\t\t \t$image_array = image_downsize( $attachment->ID, 'article-gallery' );\n\t\t \t$image = $image_array[0];\n\t\t\t$image_width = $image_array[1];\n\t\t\t$image_height = $image_array[2];\n\t\t\t\n\t\t\t// markup for each gallery item\n\t\t\t$output .= ' \t\n\t\t \t<div class=\"new-gallery-item\">\n\t\t \t\t<div class=\"new-gallery-image\">\n\t\t \t\t\t<div class=\"cycle-image\"><img src=\"' . $image . '\" img-height=\"' . $image_height .'\"></div>\n\t\t \t\t\t<div id=\"cycle-prev\"></div><div id=\"cycle-next\"></div>\n\t\t\t\t\t\t<div class=\"cycle-pager\"></div>\n\t \t\t\t</div>\n\t\t \t\t<div class=\"new-gallery-text\">\n\t\t \t\t\t<div class=\"new-gallery-title\">' . $attachment->post_excerpt . '</div>\n\t\t \t\t\t<div class=\"new-gallery-content\">' . $attachment->post_content . '</div>\n\t\t \t\t</div>\n\t\t \t\t<div class=\"clear\"></div>\n\t\t \t</div><!--/.new-gallery-item-->\n\t\t ';\n\t\t}\n\t\t\n\t $output .= '</div><!--/.cycle-slideshow-->';\n\t $output .= '</div><!--/#article-gallery-->';\n\t\t\n\t}\n\t\n\treturn $output;\n}", "title": "" }, { "docid": "2257b4cfa399218630c9f02b19546197", "score": "0.5095367", "text": "public function sortInput()\n {\n $this->jsonHeader();\n $adminId = (int)$_GET['adminId'];\n if ($adminId) {\n define('IN_ADMIN', 1);\n $_COOKIE['classified_session'] = $_COOKIE['admin_classified_session'];\n }\n\n $session = geoSession::getInstance();\n $session->initSession();\n\n $cart = geoCart::getInstance();\n //start up the cart\n $userId = ($adminId) ? (int)$_GET['userId'] : null;\n $cart->init(true, $userId);\n\n if (!$this->_validateCartStep()) {\n //invalid it seems?\n return;\n }\n\n //data to be returned\n $data = array();\n\n $image_id = (int)$_POST['image_id'];\n $display_order = (int)$_POST['sort'];\n\n $max = imagesOrderItem::getMaxImages();\n $msgs = $cart->db->get_text(1, 10);\n\n if (!$image_id || $display_order <= 0 || $display_order > $max) {\n //invalid\n return $this->_error($msgs[500684]);\n }\n\n //OK... get current images\n $oldImages = imagesOrderItem::getImagesCaptured();\n\n if (!$oldImages) {\n //hmm, could not get current images captured...\n return $this->_error($msgs[500684]);\n }\n $images_captured = array();\n $image_found = $slot_found = false;\n foreach ($oldImages as $i => $img) {\n if ((int)$img['id'] === $image_id) {\n //record once we come across the one being moved so we know it is\n //actually valid\n $image_found = true;\n }\n if ((int)$i == $display_order) {\n //we display this one here...\n $slot_found = true;\n $images_captured[] = array('type' => 1,'id' => $image_id);\n }\n if ((int)$img['id'] !== $image_id) {\n $images_captured[] = $img;\n }\n }\n if (!$image_found) {\n //oops, never found the one we are inserting...\n return $this->_error($msgs[500685]);\n }\n if (!$slot_found) {\n //We did find the image that is being moved, but did not find the\n //slot to move it to... It must be in range though, so just assume\n //it is on the end.\n $images_captured[] = array('type' => 1,'id' => $image_id);\n }\n //ok straighten out the indexes...\n array_unshift($images_captured, '');\n unset($images_captured[0]);\n\n //save images\n imagesOrderItem::setImagesCaptured($images_captured);\n\n $data['preview'] = $this->imagesBox();\n $data['msg'] = $msgs['500686'];\n echo $this->encodeJSON($data);\n }", "title": "" }, { "docid": "ffd9f19f5b04cfd31d6ff8d807e3bb01", "score": "0.5090786", "text": "public function sortableUpdating()\n {\n if ($this->hasSortableGroupChanged()) {\n $this->setNextPosition();\n }\n }", "title": "" }, { "docid": "e3772cd596fda3e61969c8ed9bc08876", "score": "0.5090231", "text": "function album_menu() {\n\tglobal $total_amount_albums,$show_statistics,$language_albums,$language_photos,$total_amount_images,$language_homepage,$home_page,$max_files,$language_search_cancel;\n\tglobal $show_dir_up,$language_up,$album_show,$order,$dir_names,$admin_link,$restrict_access,$language_logout,$visitor_password,$logged_in,$visitor_search;\n\techo \"<div id=\\\"bottommenu\\\"><ul>\";\n\tif ($admin_link=='') {\n\t\tif ($total_amount_albums!=0 && $show_statistics)\n\t\t\techo \"<div id=\\\"bottomstats\\\">$language_albums: $total_amount_albums | $language_photos: $total_amount_images</div>\";\n\t\tif ($home_page!='' && $order==0) {echo \"<li><a href=\\\"$home_page\\\" target=\\\"_top\\\">$language_homepage</a></li>\";}\n\t\tif ($show_dir_up) {echo \"<li><a href=\\\"../index.php\\\">$language_up</a></li>\\n\";}\n\t\tif (!$album_show && $order==0) {\n\t\t\tfor ($count=0;$count<count($dir_names);$count++) {\n\t\t\t\t$dir_name=$dir_names[$count];\n\t\t\t\tif (strpos($dir_names[$count],'/')!=false) {$dir_name=substr($dir_names[$count],3);}\n\t\t\t\tif (ereg(\"([0-9]{3})\",substr($dir_name,0,3))) {\n\t\t\t\t\tif (substr($dir_name,3,1)==' ' || substr($dir_name,3,1)=='_')\n\t\t\t\t\t\t$dir_name=trim(substr($dir_name,3));\n\t\t\t\t}\n\t\t\t\t$dir_name=str_replace('_',' ',$dir_name);\n\t\t\t\techo \"<li><a href=\\\"../\" . rawurlencode(substr($dir_names[$count],3)) . \"/index.php?$admin_link\\\">$dir_name</a></li>\\n\";\n\t\t\t}\n\t\t}\n\t}\n\tif ($restrict_access) {\n\t\tif ($admin_link!='')\n\t\t\techo \"<li><a href=\\\"index.php?logout=2\\\">$language_logout</a></li>\\n\";\n\t\telse\n\t\t\techo \"<li><a href=\\\"index.php?logout=1\\\">$language_logout</a></li>\\n\";\n\t} else if ($visitor_password && $logged_in) {\n\t\techo \"<li><a href=\\\"index.php?logout=1\\\">$language_logout</a></li>\\n\";\n\t}\n\techo \"</ul></div>\\n\";\n}", "title": "" }, { "docid": "1a362aaa2c3561c098c8cfd4841dcd64", "score": "0.50891083", "text": "function show_shop_rotator($showimg_arr)\n\t\t{\n\t\t\t$shop_ul_id = uniqid('shopmenu_');\n\t\t\t// get the list of rotating images\n\t\t\t$HTML_Content .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\tjQuery.noConflict();\n\t\t\t\t\t\t\t\tvar $j = jQuery;\n\t\t\t\t\t\t\t\t$j(document).ready(\n\t\t\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t\t$j(\\'ul#'.$shop_ul_id.'\\').innerfade({ \n\t\t\t\t\t\t\t\t\t\tspeed: 1000,\n\t\t\t\t\t\t\t\t\t\ttimeout: '.(4*1000).',\n\t\t\t\t\t\t\t\t\t\ttype: \\'sequence\\',\n\t\t\t\t\t\t\t\t\t\tcontainerheight: \\'60px\\'\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</script>';\n\t\t\t$HTML_Content .= '<ul id=\"'.$shop_ul_id.'\" >';\n\t\t\t$pass_type = 'image_gallerythumbpath';\t\n\t\t\tforeach ($showimg_arr as $k=>$row_shop)\n\t\t\t{\n\t\t\t\t$show_noimage = false;\n\t\t\t\tif ($row_shop['shopbrand_showimageofproduct']==0) // Case to check for images directly assigned to shop\n\t\t\t\t{\n\t\t\t\t\t// Calling the function to get the image to be shown\n\t\t\t\t\t$shopimg_arr = get_imagelist('prodshop',$row_shop['shopbrand_id'],$pass_type,0,0,1); \n\t\t\t\t\tif(count($shopimg_arr))\n\t\t\t\t\t{\n\t\t\t\t\t\t$exclude_catid \t= $shopimg_arr[0]['image_id']; // exclude id in case of multi images for category\n\t\t\t\t\t\t$HTML_image \t= show_image(url_root_image($shopimg_arr[0][$pass_type],1),$row_shop['shopbrand_name'],$row_shop['shopbrand_name'],'','',1);\n\t\t\t\t\t\t$show_noimage \t= false;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t}\n\t\t\t\telse // Case of check for the first available image of any of the products under this category\n\t\t\t\t{\n\t\t\t\t\t// Calling the function to get the id of products under current category with image assigned to it\n\t\t\t\t\t$cur_prodid = find_AnyProductWithImageUnderShop($row_shop['shopbrand_id']);\n\t\t\t\t\tif ($cur_prodid)// case if any product with image assigned to it under current category exists\n\t\t\t\t\t{\n\t\t\t\t\t\t// Calling the function to get the image to be shown\n\t\t\t\t\t\t$img_arr = get_imagelist('prod',$cur_prodid,$pass_type,0,0,1);\n\t\t\t\t\t\tif(count($img_arr))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$HTML_image = show_image(url_root_image($img_arr[0][$pass_type],1),$row_shop['shopbrand_name'],$row_shop['shopbrand_name'],'','',1);\n\t\t\t\t\t\t\t$show_noimage = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse// case if no products exists under current shop with image assigned to it\n\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t\t}\n\t\t\t\t\telse// case if no products exists under current shop with image assigned to it\n\t\t\t\t\t\t$show_noimage = true;\n\t\t\t\t}\n\t\t\t\tif($show_noimage==false)\n\t\t\t\t{\n\t\t\t\t\t$link = url_shops($row_shop['shopbrand_id'],$row_shop['shopbrand_name'],'');\n\t\t\t\t\t$link_start = $link_end = '';\n\t\t\t\t\tif($link!='')\n\t\t\t\t\t{\n\t\t\t\t\t\t$link_start = '<a href=\"'.$link.'\" title=\"'.$title.'\">';\n\t\t\t\t\t\t$link_end = '</a>';\n\t\t\t\t\t}\n\t\t\t\t\t$HTML_Content \t.= '<li>'.$link_start.$HTML_image.$link_end.'</li>';\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\t\t\t$HTML_Content .='</ul>';\n\t\t\treturn $HTML_Content;\n\t\t}", "title": "" }, { "docid": "8d0dc2881738b2e2206c2b1054fb103d", "score": "0.5088241", "text": "function get_images_fr_gallery($item,$img_width,$img_ht,$bool,$align,$root=null) {\n\tinclude_once($root.'galleryfiles/queries.php');\n\tlist($r_i,$n_i) = get_image($item);\n\twhile ($img = mysql_fetch_array($r_i)) {\n\t\tif ($bool === true) {\n\t\t\t$tb_ = \"tb/tb_\";\n\t\t}\n\t\t$filename = IMAGES_DIR.$tb_.$img['item_img'];\n\t\t$size[] = getimagesize($filename);\t\t\n\t\t//if (($size[0][0] > $size[0][1])) { \t\t\n\t\t\tif ($size[0][0] > $img_width) {\n\t\t\t\t$width = \" width='\".$img_width.\"' \";\n\t\t\t\tif (!($img_ht == '0')) $ht = \" height='\".$img_ht.\"' \";\n\t\t\t}\n\t\t//} \n\t\telse {\n\t\t\t//width is 0, height is 1\n\t\t\t\t$width = \" width = '\".$size[0][0].\"'\";\n//\t\t\t\t$ht = $size[0][1];\n\t\t}\n\t\t//create IMAGE constant to call in gallery.htm\n\t\treturn \"<img src='\".$filename.\"' \".$width.$ht.\" border = '0' align=\".$align.\" />\";\t\n\t\t//return $filename;\n\t}\n}", "title": "" } ]
97463c1ae3d717cb449f572bfd466582
Generated from a mysql data dump
[ { "docid": "bb56f62886c39416a94863b1906d4f53", "score": "0.0", "text": "public function run()\n {\n // using https://regexr.com and the 'list view'\n // with the regex:\n // /(INSERT INTO (.*))/g\n // and replacement pattern:\n // $this->execute(\"$1\");\\n\n\n $this->execute(\"INSERT INTO `cms_functions` (`id`, `parent_id`, `title_en`, `include`, `seq`, `created`, `created_by`, `modified`, `modified_by`, `alert`, `adminonly`, `visible`, `allusers`, `allcamps`) VALUES (35,0,'Free Shop','',1,NULL,NULL,NULL,NULL,0,0,1,0,0),(42,0,'Admin','',8,NULL,NULL,NULL,NULL,0,0,1,0,0),(43,42,'Users','cms_users',18,NULL,NULL,NULL,NULL,0,0,1,0,1),(44,155,'Settings','cms_settings',24,NULL,NULL,NULL,NULL,0,1,1,0,1),(45,155,'Texts','cms_translate',23,NULL,NULL,NULL,NULL,0,1,1,0,1),(50,155,'Manage menu functions','cms_functions',25,NULL,NULL,NULL,NULL,0,1,1,0,1),(67,42,'Manage products','products',17,NULL,NULL,NULL,NULL,0,0,1,0,0),(87,35,'Checkout','check_out',3,NULL,NULL,NULL,NULL,0,0,1,0,0),(90,99,'Boxes','stock',12,NULL,NULL,NULL,NULL,0,0,1,0,0),(91,35,'Find beneficiary','check_in',1,NULL,NULL,NULL,NULL,0,0,1,0,0),(92,35,'Give tokens to all','give2all',7,NULL,NULL,NULL,NULL,0,0,1,0,0),(96,128,'Sales reports','sales_list',14,NULL,NULL,NULL,NULL,0,0,1,0,0),(99,0,'Inventory','',5,NULL,NULL,NULL,NULL,0,0,1,0,0),(102,128,'Fancy graphs <sup>beta</sup>','fancygraphs',16,NULL,NULL,NULL,NULL,0,0,1,0,0),(110,35,'Stockroom','container-stock',5,NULL,NULL,NULL,NULL,0,0,1,0,0),(111,35,'Generate market schedule','market_schedule',6,NULL,NULL,NULL,NULL,0,0,1,0,0),(112,99,'Generate QR labels','qr',13,NULL,NULL,NULL,NULL,0,0,1,0,0),(113,0,'Actions','',7,NULL,NULL,NULL,NULL,0,0,1,0,0),(115,42,'Warehouses','locations',20,NULL,NULL,NULL,NULL,0,0,1,0,0),(116,110,'Containers List','printed_list_containers',2,NULL,NULL,NULL,NULL,0,0,1,1,0),(117,128,'Needed items <sup>beta</sup>','need',15,NULL,NULL,NULL,NULL,0,0,1,0,0),(118,35,'Manage beneficiaries','people',4,NULL,NULL,NULL,NULL,0,0,1,0,0),(121,0,'Hidden menu items','',10,NULL,NULL,NULL,NULL,0,0,0,1,0),(123,121,'Start page','start',26,NULL,NULL,NULL,NULL,0,0,0,1,0),(124,92,'Give tokens to selected families','give',3,NULL,NULL,NULL,NULL,0,0,1,1,0),(125,121,'User profile','cms_profile',27,NULL,NULL,NULL,NULL,0,0,0,1,0),(126,121,'Exit login as','exitloginas',28,NULL,NULL,NULL,NULL,0,0,0,1,0),(127,96,'Sales List Download','sales_list_download',9,NULL,NULL,NULL,NULL,0,0,1,1,0),(128,0,'Insight','',6,NULL,NULL,NULL,NULL,0,0,1,0,0),(129,117,'General stock','stock-list',10,NULL,NULL,NULL,NULL,0,0,1,1,0),(130,132,'Lists','food_lists',8,NULL,NULL,NULL,NULL,0,0,1,0,0),(131,0,'Services','',2,NULL,NULL,NULL,NULL,0,0,1,0,0),(132,0,'Bicycles / Sport','borrow',3,NULL,NULL,NULL,NULL,0,0,1,0,0),(140,130,'Borrow edit','borrowedititem',4,NULL,NULL,NULL,NULL,0,0,1,1,0),(144,130,'Borrow history ','borrowhistory',5,NULL,NULL,NULL,NULL,0,0,1,1,0),(145,148,'Library','library_inventory',10,NULL,NULL,NULL,NULL,0,0,1,0,0),(146,148,'Borrow books','library',11,NULL,NULL,NULL,NULL,0,0,1,0,0),(147,146,'Library history','libraryhistory',8,NULL,NULL,NULL,NULL,0,0,1,1,0),(148,0,'Library','',4,NULL,NULL,NULL,NULL,0,0,1,0,0),(149,132,'Laundry','laundry',9,NULL,NULL,NULL,NULL,0,0,1,0,0),(150,118,'All Residents export','people_export',1,NULL,NULL,NULL,NULL,0,0,1,1,0),(151,149,'Laundry No show','laundry_noshow',6,NULL,NULL,NULL,NULL,0,0,1,1,0),(152,146,'Laundry start new cycle','laundry_startcycle',7,NULL,NULL,NULL,NULL,0,0,1,1,0),(154,155,'Organisations','organisations',22,NULL,NULL,NULL,NULL,0,1,1,0,1),(155,0,'Boxwise Gods','',9,NULL,NULL,NULL,NULL,0,1,1,0,0),(156,42,'User groups','cms_usergroups',19,NULL,NULL,NULL,NULL,0,0,1,0,1),(157,42,'Bases','camps',21,NULL,NULL,NULL,NULL,0,1,1,0,1),(158,35,'Add beneficiary','people_add',2,NULL,NULL,NULL,NULL,0,0,1,0,0);\");\n $this->execute(\"INSERT INTO `cms_settings` (`id`, `category_id`, `type`, `code`, `description`, `options`, `value`, `hidden`, `created`, `created_by`, `modified`, `modified_by`) VALUES (83,1,'select','cms_language','Language used for CMS interface','en=English','en',1,NULL,NULL,NULL,NULL),(86,1,'text','mail_sender','Sender address for e-mails sent by Boxwise','','[email protected]',1,NULL,NULL,NULL,NULL),(87,1,'text','mail_sender_name','Sender name for e-mails sent by Boxwise','','Boxwise',1,NULL,NULL,NULL,NULL),(92,1,'text','apple-mobile-web-app-title','Title for Apple Mobile Web App','','Boxwise',1,NULL,NULL,NULL,NULL),(137,1,'text','dailyroutine','Last date the daily routine did run','','2019-06-26',1,NULL,NULL,NULL,NULL),(138,1,'text','installed','Date and time of installation and first run','','2016-23-11 9:00:00',1,NULL,NULL,NULL,NULL);\");\n $this->execute(\"INSERT INTO `cms_usergroups_levels` (`id`, `level`, `label`, `shortlabel`) VALUES (1,100,'Admin user - in charge of an organisation','Admin'),(2,10,'Coordinator - in charge of a base','Coordinator'),(3,5,'User - regular volunteer/employee','User');\");\n $this->execute(\"INSERT INTO `languages` (`id`, `visible`, `code`, `locale`, `name`, `strftime_dateformat`, `smarty_dateformat`, `seq`, `rtl`) VALUES (1,0,'nl','nl_NL','Dutch','%A %e %B %Y','%A %e %B %Y',1,0),(2,1,'en','en_GB','English','%A %B %e %Y','%A %B %e %Y',2,0),(3,1,'fr','fr_FR','French','%A %B %e %Y','%A %B %e %Y',4,0),(4,0,'de','de_DE','German','%A %e. %B %Y','%A %e. %B %Y',3,0),(5,1,'ar','ar_AE','Arabic','%A %e. %B %Y','%A %e. %B %Y',5,1),(6,1,'ckb','ckb_TR','Sorani / Central Kurdish','%A %e. %B %Y','%A %e. %B %Y',6,1),(8,1,NULL,NULL,'Urdu','%A %B %e %Y','%A %B %e %Y',7,1),(9,1,NULL,NULL,'Kurmanji / Northern Kurdish',NULL,NULL,9,0),(10,1,NULL,NULL,'Farsi',NULL,NULL,10,1),(11,1,NULL,NULL,'Pashto',NULL,NULL,11,1),(12,1,NULL,NULL,'Tigrinya',NULL,NULL,12,0),(13,1,NULL,NULL,'Amharic',NULL,NULL,13,0),(14,1,NULL,NULL,'Lingala',NULL,NULL,15,0),(15,1,NULL,NULL,'Somali',NULL,NULL,15,0),(16,1,NULL,NULL,'Dari',NULL,NULL,16,0);\");\n $this->execute(\"INSERT INTO `cms_users` (`id`, `pass`, `naam`, `organisation_id`, `email`, `is_admin`, `lastlogin`, `lastaction`, `created`, `created_by`, `modified`, `modified_by`, `resetpassword`, `language`, `deleted`, `cms_usergroups_id`, `valid_firstday`, `valid_lastday`) VALUES (1,'21232f297a57a5a743894a0e4a801fc3','some admin',NULL,'[email protected]',1,'2019-06-26 15:54:35','2019-06-26 15:58:11',NULL,NULL,NULL,NULL,'',2,'0000-00-00 00:00:00',NULL,NULL,NULL);\");\n $this->execute(\"INSERT INTO `genders` (`id`, `label`, `shortlabel`, `seq`, `created`, `created_by`, `modified`, `modified_by`, `male`, `female`, `adult`, `child`, `baby`, `color`) VALUES (1,'Female','Female',1,NULL,NULL,NULL,NULL,0,1,1,0,0,'female'),(2,'Male','Male',2,NULL,NULL,NULL,NULL,1,0,1,0,0,'male'),(3,'Unisex Adult','Unisex',3,NULL,NULL,NULL,NULL,1,1,1,0,0,'unisex'),(4,'Girl','Girl',4,NULL,NULL,NULL,NULL,0,1,0,1,0,'female'),(5,'Boy','Boy',5,NULL,NULL,NULL,NULL,1,0,0,1,0,'boy'),(6,'Unisex Child','Child',6,NULL,NULL,NULL,NULL,1,1,0,1,0,'unisex'),(9,'Unisex Baby','Baby',8,NULL,NULL,NULL,NULL,1,1,0,0,1,'baby'),(10,'-','',9,NULL,NULL,NULL,NULL,1,1,1,1,1,'default');\");\n $this->execute(\"INSERT INTO `need_periods` (`id`, `label`, `week_min`, `week_max`) VALUES (1,'1 mth to 3 mths',4,13),(2,'2 weeks to 6 weeks',2,6),(3,'2 mths to 6 mths',8,26);\");\n $this->execute(\"INSERT INTO `numbers` (`value`, `label`) VALUES (0,'none'),(1,'one'),(2,'two'),(3,'three'),(4,'four'),(5,'five'),(6,'six'),(7,'seven'),(8,'eight'),(9,'nine'),(10,'ten');\");\n $this->execute(\"INSERT INTO `product_categories` (`id`, `label`, `seq`) VALUES (1,'Underwear',1),(2,'Bottoms',2),(3,'Tops',3),(4,'Accessories',4),(5,'Shoes',5),(6,'Jackets',6),(7,'Skirts/Dresses',7),(8,'Baby',8),(9,'Other',9),(10,'Hygiene',10),(11,'Food',11);\");\n $this->execute(\"INSERT INTO `sizegroup` (`id`, `label`, `seq`) VALUES (1,'S, M, L, XL',2),(2,'Baby by age',100),(3,'Shoe sizes Female',50),(4,'Children by age',105),(5,'S, M, L',1),(6,'Mixed sizes',999),(7,'One size',1000),(8,'Shoe sizes Male',51),(9,'Shoe sizes children',52),(10,'S, M, L, XL and mixed',3),(11,'S, M, L and mixed',4),(12,'Diaper sizes',9999),(13,'Bra sizes',200),(14,'Baby by age (and mixed)',101),(15,'Children by age (and mixed)',106);\");\n $this->execute(\"INSERT INTO `sizes` (`id`, `label`, `sizegroup_id`, `portion`, `seq`, `created`, `created_by`, `modified`, `modified_by`) VALUES (1,'S',1,35,22,NULL,NULL,NULL,NULL),(2,'M',1,45,23,NULL,NULL,NULL,NULL),(3,'L',1,15,24,NULL,NULL,NULL,NULL),(4,'XL',1,5,25,NULL,NULL,NULL,NULL),(10,'2-3 years',4,14,154,NULL,NULL,NULL,NULL),(11,'4-5 years',4,14,155,NULL,NULL,NULL,NULL),(12,'6-8 years',4,21,156,NULL,NULL,NULL,NULL),(13,'9-12 years',4,29,157,NULL,NULL,NULL,NULL),(14,'20',9,7,99,NULL,NULL,NULL,NULL),(15,'21',9,7,100,NULL,NULL,NULL,NULL),(16,'22',9,7,101,NULL,NULL,NULL,NULL),(17,'23',9,7,102,NULL,NULL,NULL,NULL),(18,'24',9,7,103,NULL,NULL,NULL,NULL),(19,'25',9,7,104,NULL,NULL,NULL,NULL),(20,'26',9,7,105,NULL,NULL,NULL,NULL),(21,'27',9,7,106,NULL,NULL,NULL,NULL),(22,'28',9,7,107,NULL,NULL,NULL,NULL),(23,'29',9,7,108,NULL,NULL,NULL,NULL),(24,'30',9,7,109,NULL,NULL,NULL,NULL),(25,'31',9,7,110,NULL,NULL,NULL,NULL),(26,'32',9,7,111,NULL,NULL,NULL,NULL),(27,'33',9,7,112,NULL,NULL,NULL,NULL),(28,'34',3,1,62,NULL,NULL,NULL,NULL),(29,'35',3,2,63,NULL,NULL,NULL,NULL),(30,'36',3,5,64,NULL,NULL,NULL,NULL),(31,'37',3,9,65,NULL,NULL,NULL,NULL),(32,'38',3,24,66,NULL,NULL,NULL,NULL),(33,'39',3,25,67,NULL,NULL,NULL,NULL),(34,'40',3,18,68,NULL,NULL,NULL,NULL),(35,'41',3,10,69,NULL,NULL,NULL,NULL),(36,'42 and bigger',3,6,70,NULL,NULL,NULL,NULL),(43,'13-15 years',4,22,158,NULL,NULL,NULL,NULL),(44,'19-24 months',2,25,129,NULL,NULL,NULL,NULL),(45,'3-6 months',2,13,126,NULL,NULL,NULL,NULL),(47,'7-12 months',2,20,127,NULL,NULL,NULL,NULL),(48,'13-18 months',2,25,128,NULL,NULL,NULL,NULL),(51,'19',9,2,98,NULL,NULL,NULL,NULL),(52,'Mixed',6,100,199,NULL,NULL,NULL,NULL),(53,'S',5,35,10,NULL,NULL,NULL,NULL),(54,'M',5,45,11,NULL,NULL,NULL,NULL),(55,'L/XL',5,20,12,NULL,NULL,NULL,NULL),(56,'38 and smaller',8,1,80,NULL,NULL,NULL,NULL),(57,'39',8,2,81,NULL,NULL,NULL,NULL),(58,'40',8,5,82,NULL,NULL,NULL,NULL),(59,'41',8,9,83,NULL,NULL,NULL,NULL),(60,'42',8,24,84,NULL,NULL,NULL,NULL),(61,'43',8,25,85,NULL,NULL,NULL,NULL),(62,'44',8,18,86,NULL,NULL,NULL,NULL),(63,'45',8,10,87,NULL,NULL,NULL,NULL),(64,'46 and bigger',8,6,88,NULL,NULL,NULL,NULL),(65,'35',9,7,114,NULL,NULL,NULL,NULL),(66,'36 and bigger',9,7,115,NULL,NULL,NULL,NULL),(67,'34',9,7,113,NULL,NULL,NULL,NULL),(68,'One size',7,100,209,NULL,NULL,NULL,NULL),(69,'0-2 months',2,5,125,NULL,NULL,NULL,NULL),(70,'Mixed',11,0,52,NULL,NULL,NULL,NULL),(71,'Mixed',10,0,39,NULL,NULL,NULL,NULL),(72,'S',10,35,37,NULL,NULL,NULL,NULL),(73,'M',10,45,38,NULL,NULL,NULL,NULL),(74,'L',10,15,35,NULL,NULL,NULL,NULL),(75,'XL',10,5,36,NULL,NULL,NULL,NULL),(76,'L/XL',11,20,51,NULL,NULL,NULL,NULL),(77,'M',11,45,50,NULL,NULL,NULL,NULL),(78,'S',11,35,49,NULL,NULL,NULL,NULL),(79,'Size 1',12,0,219,NULL,NULL,NULL,NULL),(80,'Size 2 (3-5 kg)',12,34,220,NULL,NULL,NULL,NULL),(81,'Size 3 (6-9 kg)',12,33,221,NULL,NULL,NULL,NULL),(82,'Size 4 (10-18 kg)',12,33,222,NULL,NULL,NULL,NULL),(83,'Size 5',12,0,223,NULL,NULL,NULL,NULL),(84,'Size 6',12,0,224,NULL,NULL,NULL,NULL),(85,'75B',13,13,183,NULL,NULL,NULL,NULL),(86,'80B',13,13,184,NULL,NULL,NULL,NULL),(87,'85B',13,13,185,NULL,NULL,NULL,NULL),(88,'90b',13,13,186,NULL,NULL,NULL,NULL),(89,'95B',13,13,187,NULL,NULL,NULL,NULL),(90,'100C',13,13,188,NULL,NULL,NULL,NULL),(91,'D+ (big)',13,13,189,NULL,NULL,NULL,NULL),(92,'0-2 months',14,5,139,NULL,NULL,NULL,NULL),(93,'3-6 months',14,13,140,NULL,NULL,NULL,NULL),(94,'7-12 months',14,20,141,NULL,NULL,NULL,NULL),(95,'13-18 months',14,25,142,NULL,NULL,NULL,NULL),(96,'19-24 months',14,25,143,NULL,NULL,NULL,NULL),(97,'Mixed sizes',14,0,144,NULL,NULL,NULL,NULL),(98,'2-3 years',15,14,168,NULL,NULL,NULL,NULL),(99,'4-5 years',15,14,169,NULL,NULL,NULL,NULL),(100,'6-8 years',15,21,170,NULL,NULL,NULL,NULL),(101,'9-12 years',15,29,171,NULL,NULL,NULL,NULL),(102,'13-15 years',15,22,172,NULL,NULL,NULL,NULL),(103,'Mixed',15,0,173,NULL,NULL,NULL,NULL);\");\n $this->execute(\"INSERT INTO `tipofday` (`id`, `title`, `content`) VALUES (1,'Sorting lists','Most lists can be sorted anyway you like. Just click on the column title to sort the table on that column. Clicking another time on the same column will reverse the sort order.'),(2,'Undo a purchase','If a customer decides not to buy something after you made the purchase: check the item in the list of purchases and hit the red \\\\'Delete\\\\' button.'),(3,'Changing the amount of tokens','If you want to change the amount of tokens of a family/beneficiary, for example because you changed the amount of family members, you find the people in the \\\\'Check-in\\\\' section of the site, click the checkbox next to the family/beneficiary name and hit the \\\\'Give tokens\\\\' button. <br /><br /> You can enter an amount to be added to the family/beneficiary as a whole or an amount for each adult or child. And ofcourse, you can also enter a negative number.'),(4,'Mobile','Did you know that this Drop Shop system works perfectly on most smartphones? Just open \\\\'https://market.drapenihavet.no\\\\' in your browser.'),(5,'Quick purchase','If you want to quickly submit a form you can simply use the \\\\'cmd + enter\\\\' or \\\\'ctrl + enter\\\\' shortcut!'),(6,'Sorting','Did you know you that in a list you can sort multiple columns simultaneously by holding down the Shift key and clicking a second, third or even fourth column header!');\");\n $this->execute(\"INSERT INTO `translate_categories` (`id`, `name`) VALUES (13,'text'),(0,'something else')\");\n $this->execute(\"INSERT INTO `translate` (`id`, `category_id`, `type`, `code`, `description`, `nl`, `en`, `fr`, `hidden`, `created`, `created_by`, `modified`, `modified_by`, `deleted`) VALUES (485,13,'text','cms_login_email',NULL,'e-mailadres','E-mail address','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(486,13,'text','cms_login_password','','Wachtwoord','Password','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(487,13,'text','cms_login_submit',NULL,'Log in','Log in','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(488,13,'text','cms_login_autologin',NULL,'onthoud mij','Remember me','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(489,13,'text','cms_login_error_wrongpassword',NULL,'Wachtwoord is niet correct','Wrong password','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(490,13,'text','cms_login_error_usernotfound',NULL,'Een gebruiker met dit e-mailadres is niet gevonden.','A user with this e-mail address is not found','Utilisateur introuvable',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(491,13,'text','cms_login_pagetitle',NULL,'Inloggen','Login','connexion',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(492,13,'text','cms_menu_settings','','Instellingen','Settings','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(493,13,'text','cms_menu_logout','','Uitloggen','Logout','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(494,13,'text','cms_form_submit','','Opslaan en sluiten','Save and close','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(496,13,'text','cms_form_createdby','','Gemaakt door','Created by','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(497,13,'text','cms_form_ondate','','op','on','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(498,13,'text','cms_form_history_modified',NULL,'Gewijzigd door','Modified by','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(499,13,'text','cms_form_charactersleft',NULL,'tekens over van %n','characters left from %n','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(500,13,'text','cms_list_add',NULL,'Nieuw','New item','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(501,13,'text','cms_list_delete',NULL,'Verwijderen','Delete','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(502,13,'text','cms_list_hide',NULL,'Verbergen','Hide','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(503,13,'text','cms_list_show',NULL,'Tonen','Show','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(504,13,'text','cms_settings_category',NULL,'Categorie','Category','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(505,13,'text','cms_users_naam','','Naam','Name','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(506,13,'text','cms_users_email','','E-mail','E-mail','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(507,13,'text','cms_users_lastlogin',NULL,'Laatste login','Last login','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(508,13,'text','cms_users_new',NULL,'Nieuwe gebruiker','New user','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(509,13,'text','cms_users_password','','Wachtwoord','Password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(510,13,'text','cms_users_access',NULL,'Beschikbare functies','Available functions','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(511,13,'text','cms_settings_value',NULL,'Waarde','Value','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(512,13,'text','cms_settings_code',NULL,'Code','Code','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(513,0,'text','cms_settings','','Instellingen','Global Settings','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(514,13,'text','cms_settings_new',NULL,'Nieuwe instelling','New setting','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(515,13,'text','cms_settings_hidden',NULL,'Verborgen','Hidden','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(516,13,'text','cms_settings_type',NULL,'Type','Type','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(517,13,'text','cms_field_text',NULL,'Tekstregel','Line of text','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(518,13,'text','cms_field_textarea',NULL,'Tekstveld','Textarea','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(519,13,'text','cms_field_checkbox',NULL,'Checkbox','Checkbox','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(520,13,'text','cms_translates',NULL,'Teksten','Texts','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(521,13,'text','cms_translate_description',NULL,'Beschrijving','Description','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(522,13,'text','cms_translate_code',NULL,'Code','Code','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(523,13,'text','cms_translate_new',NULL,'Nieuwe tekst','New text','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(524,13,'text','cms_users','','Gebruikers','User Management','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(525,13,'text','cms_user','','Gebruiker','User','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(526,13,'text','cms_setting',NULL,'instelling','setting','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(527,13,'text','cms_translate',NULL,'tekst','text','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(528,13,'text','cms_form_new',NULL,'Nieuw','New','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(529,13,'text','cms_form_edit','','Wijzig','Edit','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(530,13,'text','cms_translate_type',NULL,'Type','Type','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(531,13,'text','cms_login_repeatpassword','','Herhaal wachtwoord','Repeat password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(532,13,'text','cms_login_forgotpassword',NULL,'Wachtwoord vergeten?','Forgot Password?','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(533,13,'text','cms_reset_pagetitle',NULL,'Reset wachtwoord','Reset Password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(534,13,'text','cms_reset_submit',NULL,'Reset','Reset','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(535,13,'text','cms_functions',NULL,'CMS Functies','CMS Functions','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(536,13,'text','cms_function',NULL,'CMS Functie','CMS Function','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(537,13,'text','cms_function_include',NULL,'Bestand','File','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(538,13,'text','cms_function_users',NULL,'Beschikbaar voor deze gebruikers','Available voor these users','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(539,13,'text','cms_form_cancel','','Annuleren','Cancel','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(542,13,'text','cms_email_salutation',NULL,'Beste','Dear','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(543,13,'textarea','cms_email_boilerplate','','Deze e-mail is verstuurd vanuit','You\\\\'ve received this email because you were created an account for Boxwise through {orgname}. If you think you got this email by mistake, please contact us at [mailto:[email protected]]. ','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(544,13,'textarea','cms_reset_mail','','Je hebt aangegeven dat je een nieuw wachtwoord wilt instellen voor het CMS op {sitename}.<br /><br />\\r\\n<a href=\\\"{link}\\\">Klik hier om een nieuw wachtwoord in te stellen</a><br /><br />\\r\\nHeb je geen nieuw wachtwoord aangevraagd, dan hoef je geen actie te ondernemen.\\r\\n','You have requested a new password for {sitename}.<br /><br />\\r\\n<a href=\\\"{link}\\\">Click here to enter a new password</a><br /><br />\\r\\nIf you didn\\\\'t requested this yourself, you don\\\\'t have to do anything.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(545,13,'text','cms_reset2_pagetitle',NULL,'Kies een nieuw wachtwoord','Choose a new password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00')\");\n $this->execute(\"INSERT INTO `translate` (`id`, `category_id`, `type`, `code`, `description`, `nl`, `en`, `fr`, `hidden`, `created`, `created_by`, `modified`, `modified_by`, `deleted`) VALUES (546,13,'text','cms_reset2_description',NULL,'Kies een wachtwoord dat niet te gemakkelijk is te raden. Niet je postcode, geboortedatum, de naam van je partner of combinaties van dat soort gegevens. Een goed wachtwoord bevat minimaal acht willekeurige letters, cijfers en leestekens.','Choose a password that is not too easy to guess. Don\\\\'t use your zipcode, date of birth, the name of your spouse or combinations of this kind of data. A good password contains of a minimum of eight characters, numbers or punctuations.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(547,13,'text','cms_reset2_submit',NULL,'Opslaan','Save','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(548,13,'text','cms_list_selectall',NULL,'Selecteer alle items','Select all items','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(549,13,'text','cms_settings_category',NULL,'Categorie','Category','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(551,13,'text','cms_reset_description',NULL,'Als je je wachtwoord niet meer weet, vul dan hier je e-mailadres in. Je krijgt dan direct een mail toegestuurd met daarin de mogelijkheid een nieuw wachtwoord aan te maken.','If you can\\\\'t remember your password, please fill in your e-mail address. You will receive an email with a link to create a new password.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(556,13,'text','cms_form_selectplaceholder',NULL,'Maak een keuze','Please select','Faire un choix',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(557,13,'text','cms_field_wysiwyg',NULL,'TinyMCE','TinyMCE','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(558,13,'text','cms_settings_enabled',NULL,'Ingeschakeld','Enabled','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(559,13,'text','cms_field_select',NULL,'Menu','Menu','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(560,13,'text','cms_settings_options',NULL,'Keuzes','Options','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(562,13,'text','cms_reset_notmatching',NULL,'De wachtwoorden zijn niet gelijk','The passwords do not match','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(563,13,'text','cms_reset_tooshort',NULL,'Het wachtwoord is te kort','The password is not long enough','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(564,13,'text','cms_list_copy',NULL,'Kopiëren','Copy','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(566,13,'text','cms_list_confirm_title','','Weet je het zeker?','Are you sure?','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(567,13,'text','cms_list_confirm_ok',NULL,'OK','OK','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(568,13,'text','cms_list_confirm_cancel','','Annuleren','Cancel','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(572,13,'text','cms_list_copysuccess',NULL,'Er is een kopie gemaakt van de geselecteerde rij(en)','A copy of the row(s) has been made','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(578,13,'text','cms_list_deletesuccess',NULL,'Onderdeel verwijderd','Item deleted','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(579,13,'text','cms_list_deleteerror',NULL,'De geselecteerde onderdelen (of een deel ervan) konden niet worden verwijderd.','The selected items (or some of them) could not be deleted.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(584,13,'text','cms_users_settings','','Persoonlijke instellingen','Personal settings','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(586,13,'text','cms_error',NULL,'Sorry, er is iets foutgegaan','Sorry, something went wrong','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(595,13,'text','cms_error_pleasereport',NULL,'Laatste login','Last login','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(600,13,'text','cms_error404',NULL,'De pagina die je probeert te openen bestaat niet.','The page you have requested does not exist.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(622,13,'text','tooltip_menutitle',NULL,'Deze titel wordt gebruikt als er in een menu naar deze pagina wordt verwezen. Hoe korter hoe beter.','This title is used when refering to this item in a menu. The shorter the better.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(625,13,'text','tooltip_pagetitle',NULL,'Dit is de titel bovenaan de pagina. Deze titel is erg belangrijk voor zoekmachines, gebruik dus de meest relevante trefwoorden.','This is the title on top of the page. This title is very important for search engines, so use the most important keywords here.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(626,13,'text','tooltip_windowtitle',NULL,'Deze tekst komt terug in de titelbalk van de browser. Voor de beste indexering gebruik je hier weer andere keywords dan in de paginatitel. De lengte van deze tekst is idealiter niet langer dan 64 tekens, inclusief de naam van de website.','This title will be visible in the title bar of the browser. For the best search engine results, use other keywords than you did in the pagetitle. This title should be no more than 64 characters, including the name of the website.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(627,13,'text','tooltip_metadescription',NULL,'Geef voor Google een beschrijving van deze pagina in maximaal 155 tekens. Een volzin is beter dan een reeks trefwoorden.','Google desires a short description of the page, to show in the search results. Stay within 155 characters.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(628,13,'text','cms_settings_language','','Taal','Language','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(629,13,'text','cms_form_save',NULL,'Opslaan','Save','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(630,13,'text','cms_form_modifiedby_copy',NULL,'Laatst gewijzigd door','Last modified by','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(637,13,'text','cms_users_sendlogin',NULL,'Stuur inloggegevens','Send login data','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(638,13,'text','cms_form_selectroot',NULL,'Beginpunt','Root','Faire un choix',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(641,13,'text','cms_form_choosefile',NULL,'Kies bestand','Choose file','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(642,13,'text','cms_form_chooseimage',NULL,'Kies afbeelding','Choose image','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(643,13,'text','cms_form_viewfile',NULL,'Bekijk bestand','View file','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(649,13,'text','tooltip_url','','Als je de URL leeg laat, maakt het systeem automatisch een goeie url voor je pagina. Je kan de URL veranderen door dit veld te ontgrendelen. Realiseer je wel dat door het veranderen van een URL bestaande verwijzingen naar deze pagina kunnen verdwijnen.','If you leave this field empty, the system will fill it in for you. If you want to change a value, you can unlock this field and do so. But realise that this can result in broken links.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(654,13,'text','cms_list_showhidesuccess',NULL,'Tonen/verbergen succesvol','','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(655,13,'text','cms_reset_mailsubject',NULL,'Nieuw wachtwoord','New password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(656,13,'textarea','cms_sendlogin_mail','','Hierbij ontvang je een wachtwoord om in te loggen op het systeem van {sitename}.<br /><br /> Je nieuwe wachtwoord is <strong>{password}</strong><br /><br /> Let op: Het systeem maakt onderscheid tussen hoofd- en kleine letters.<br /><br /> Als je bent ingelogd kan je het wachtwoord zelf wijzigen, door op je naam te klikken in de rechterbovenhoek en dan voor \\\\'Instellingen\\\\' te kiezen. Kies dan wel voor een niet al te makkelijk te raden password van minimaal acht tekens.','You are all set up with a Boxwise account to work with <strong>\\\\'{orgname}\\\\'</strong>! <br/> Please use this email address and the password below to log in to Boxwise ({sitename}) from the browser of your mobile or desktop device.<br /><br /> Your password is <strong>{password}</strong><br /><br /> We encourage you to update your password to something secure and memorable by logging in, clicking on your name in the upper right corner and choosing \\\\'Settings\\\\'. <br /> <br /> Let\\\\'s get distributing! <br /> The Boxwise Team ','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(657,13,'text','cms_sendlogin_mailsubject','','Nieuw wachtwoord','New password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(658,13,'text','cms_sendlogin_confirm',NULL,'De logingegevens zijn verstuurd.','Within a few minutes you will receive an e-mail with further instructions to reset your password.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(660,13,'text','cms_email_signature','','Met veel liefde...','Much love...','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(661,13,'text','buytickets',NULL,'Koop kaarten voor deze voorstelling','','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(662,13,'text','cms_form_changefile',NULL,'Wijzig bestand','Change file','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(663,13,'text','cms_form_changeimage',NULL,'Wijzig afbeelding','Change image','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(664,13,'text','cms_form_delete',NULL,'Verwijderen','Delete','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(665,13,'text','cms_form_wipe','','Wissen','Wipe','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(666,13,'text','cms_form_file_deletesuccess',NULL,'bestand verwijderd','File removed','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(667,13,'text','cms_form_file_deletefailure',NULL,'Er is iets mis gegaan in het verwijderen van het bestand','An error occurred while trying to remove the file','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(675,13,'text','cms_form_deletefileconfirmation',NULL,'Het bestand wordt uit dit item verwijderd. Weet je het zeker? (Het originele bestand blijft beschikbaar in de filemanager)','The file will be deleted. Are you sure? (The original file remains in the file manager)','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(676,13,'text','cms_form_changefile_msg',NULL,'Het bestand wordt pas bewaard nadat je op &quot;opslaan&quot; geklikt hebt.','The file will be saved after clicking &quot;save&quot;.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00');\");\n $this->execute(\"INSERT INTO `translate` (`id`, `category_id`, `type`, `code`, `description`, `nl`, `en`, `fr`, `hidden`, `created`, `created_by`, `modified`, `modified_by`, `deleted`) VALUES (677,13,'text','cms_form_changeimage_msg',NULL,'De afbeelding wordt pas bewaard nadat je op &quot;opslaan&quot; geklikt hebt.','The image will be saved after clicking &quot;save&quot;.','',0,NULL,NULL,NULL,NULL,'2017-04-10 19:54:00'),(679,13,'text','cms_users_loginas',NULL,'Inloggen als deze gebruiker','Login as this user','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(680,13,'text','cms_menu_exitloginas',NULL,'Terug naar %user%','Back to %user%','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(681,13,'text','cms_list_copyfailure',NULL,'Kopie kon niet worden gemaakt','A copy could not been made','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(682,13,'text','cms_list_copy_suffix',NULL,'(kopie)','(copy)','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(683,13,'text','cms_reset_success',NULL,'Je wachtwoord is aangepast','Your password has been changed','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(684,13,'text','cms_users_email_tooltip',NULL,'Je emailadres is tevens je loginnaam','Your e-mail address is also your loginname','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(685,13,'text','cms_users_password_change',NULL,'Wachtwoord aanpassen','Change password','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(686,13,'text','cms_users_password_tooltip',NULL,'Vul hier tweemaal het nieuwe wachtwoord in. Het wachtwoord moet minimaal 8 tekens lang zijn en bestaat ideaal uit een combinatie van letters (groot en klein), cijfers en/of leestekens. Het wachtwoord mag niet te makkelijk te raden zijn.','Please fill in the new password twice. The password should consist of letters (small and capital), numbers and/or punctuation. The password should at least be 8 characters long. Please do not use a password that is easily gueassable.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(687,13,'text','cms_settings_description',NULL,'Beschrijving','Description','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(688,13,'text','cms_form_createdunknown','','onbekend','unknown','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(689,13,'text','tooltip_url_locked',NULL,'Voor deze pagina kan je de URL zelf niet aanpassen.','For this page, you are not allowed to change the URL.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(690,13,'text','cms_form_view_modified','','Bekijk bewerkgeschiedenis','View edit history','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(691,13,'text','cms_form_modifiedby','','Laatst gewijzigd door','Last modified by','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(692,13,'text','cms_form_history_nodata',NULL,'Geen wijzigingen gevonden','No changes found','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(693,13,'text','cms_login_error_adminonly',NULL,'Geen toegang - gebruik het CMS op de live-versie van de website!','No access - please use the CMS on the live website','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(695,13,'text','cms_list_showhidesuccess',NULL,'Tonen/verbergen succesvol','Succesfully hidden/shown','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(696,13,'text','cms_translate_categorychanged',NULL,'De items zijn verplaatst naar een nieuwe categorie','The items have been moved to a new category','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(697,13,'text','cms_list_notexistingdo',NULL,'Deze functie is niet beschikbaar','This function is not available','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(698,13,'text','cms_brokenlinks_url',NULL,'Broken link','Broken link','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(699,13,'text','cms_brokenlinks_location',NULL,'Gevonden op','Found at','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(700,13,'text','cms_brokenlinks_error',NULL,'Foutcode','Error','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(867,13,'text','site_name','','Drop App','Drop App','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(868,13,'text','adults','','Volwassenen','Adults','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(869,13,'text','children','','kinderen','children','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(870,13,'text','container','','Container','Container','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(871,13,'text','coins','','Tokens','Tokens','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(872,13,'text','purchases','','Aankopen','Purchases','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(873,13,'text','transactions','','Transacties','Transactions','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(874,13,'text','product','','Product','Product','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(875,13,'text','size','','Maat','Size','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(876,13,'text','note','','Opmerking','Note','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(877,13,'text','handled_by','','Afgehandeld door','Handled by','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(878,13,'text','date','','Datum','Date','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(879,13,'text','Monday','','Maandag','Monday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(880,13,'text','Tuesday','','Dinsdag','Tuesday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(881,13,'text','Wednesday','','Woensdag','Wednesday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(882,13,'text','Thursday','','Donderdag','Thursday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(883,13,'text','Friday','','Vrijdag','Friday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(884,13,'text','Saturday','','Zaterdag','Saturday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(885,13,'text','Sunday','','Zondag','Sunday','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(886,13,'text','January','month','januari','January','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(887,13,'text','February','month','februari','February','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(888,13,'text','March','month','maart','March','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(889,13,'text','April','month','april','April','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(890,13,'text','May','month','mei','May','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(891,13,'text','June','month','juni','June','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(892,13,'text','July','month','juli','July','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(893,13,'text','August','month','augustus','August','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(894,13,'text','September','month','september','September','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(895,13,'text','October','month','oktober','October','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(896,13,'text','November','month','november','November','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(897,13,'text','December','month','december','December','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(898,13,'text','amount','','Hoeveelheid','Amount','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(899,13,'text','firstname','','Voornaam','First name','First name',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(900,13,'text','lastname','','Achternaam','Last name','Last name',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(901,13,'text','cms_list_undelete',NULL,'Herstellen','Recover','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(902,13,'text','cms_list_undeleteerror',NULL,'De geselecteerde onderdelen (of een deel ervan) konden niet worden hersteld.','The selected items (or some of them) could not be recovered.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(903,13,'text','cms_list_undeletesuccess',NULL,'Onderdeel hersteld','Item recovered','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(906,0,'text','bag_for_three','The color of a bag of vegetables for three persons','','Blue','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(907,0,'text','bag_for_one','The color of a bag of vegetables for one persons','','Yellow','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(908,0,'textarea','bicycle-rules','Rules for bicycle renting to be printed on the back of the Certificate','','Bikes are only available for beneficiaries of Nea Kavala. / You can only borrow a bike when you have succesfully finished the training and have signed the contract with us / To borrow a bike you hand over this certificate, you will get it back after returning the bike / You are responsible for your own safety and to bring back the bike in a clean and good state / You have to be 18 years old minimum to be able to borrow a bike. / At all times, bikes need to be back on the same day before 19:30. After 16:30 we will not start a new borrowing period. / The maximum borrowing period is three hours. / If you not follow these rules, we can ban you for two weeks and if you repeatedly not follow the rules we can ban you permanently.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(909,0,'text','listtitle_bread','Food list for bread','','Bread','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(910,0,'text','listtitle_dryfood','Food list for dry food','','Dry Food','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(911,0,'text','listtitle_vegetables','Food list for vegetables','','Vegetables','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(912,0,'textarea','workshop-rules','Rules for workshop access','','Workshop access is only available for beneficiaries of Nea Kavala. / You can access the workshop when you have succesfully finished the training and have signed the contract with us / To get access to the workshop and use tools you show us this card, you will get it back after returning the tools and leaving the workshop / You are responsible for your own safety and to return all tools in a clean and good state / You have to be 16 years old minimum. / Always return all the tools before closing time of the workshop (17:00) / If you not follow these rules, we can ban you for two weeks and if you repeatedly not follow the rules we can ban you permanently.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(913,0,'text','site_name','','','Boxwise','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00');\");\n $this->execute(\"INSERT INTO `units` (`id`, `label`, `longlabel`, `seq`, `created`, `created_by`, `modified`, `modified_by`) VALUES (1,'liter','liter',3,NULL,NULL,NULL,NULL),(2,'kg','kilogram',2,NULL,NULL,NULL,NULL),(3,'g','gram',1,NULL,NULL,NULL,NULL),(4,'piece','piece',4,NULL,NULL,NULL,NULL);\");\n }", "title": "" } ]
[ { "docid": "6623a18bdc17430a1118f7c645a032cb", "score": "0.67508775", "text": "public function createMySQLDump() {\n file_put_contents($this->tmpPath . '/' . $this->getMySQLFileName(), $this->classification->getMySQL());\n }", "title": "" }, { "docid": "b98c9f9d6abad682015ed1d364d20fbd", "score": "0.62210894", "text": "function datadump ($table) {\n\n # Creo la variabile $result\n $result .= \"# Dump of $table \\n\";\n $result .= \"# Dump DATE : \" . date(\"d-M-Y\") .\"\\n\\n\";\n\n # Conto i campi presenti nella tabella\n $query = mysql_query(\"select * from $table\");\n $num_fields = @mysql_num_fields($query);\n\n # Conto il numero di righe presenti nella tabella\n $numrow = mysql_num_rows($query);\n\n # Passo con un ciclo for tutte le righe della tabella\n for ($i =0; $i<$numrow; $i++)\n {\n $row = mysql_fetch_row($query);\n\n # Ricreo la tipica sintassi di un comune Dump\n $result .= \"INSERT INTO \".$table.\" VALUES(\";\n\n # Con un secondo ciclo for stampo i valori di tutti i campi\n # trovati in ogni riga\n for($j=0; $j<$num_fields; $j++) {\n $row[$j] = addslashes($row[$j]);\n $row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n if (isset($row[$j])) $result .= \"\\\"$row[$j]\\\"\" ; else $result .= \"\\\"\\\"\";\n if ($j<($num_fields-1)) $result .= \",\";\n }\n\n # Chiudo l'istruzione INSERT\n $result .= \");\\n\";\n }\n\n return $result . \"\\n\\n\\n\";\n}", "title": "" }, { "docid": "f94e59f1ca76851e682fe2c6d9edf609", "score": "0.5896063", "text": "function import_dump() {\n\n // do a backup\n if ($this -> options['verbose']) {\n echo \"Creating Backup...\\n\";\n }\n // TODO make the result here *.gz.bak, not *.bak.gz\n $filename = 'dump_' . date(\"y-m-d_H-i\") . '.sql.bak';\n $this -> create_dump($filename);\n\n // import dump\n if ($this -> options['verbose']) {\n echo \"Done.\\n\";\n echo \"Importing SQL...\\n\";\n }\n\n $query = gzfile($this -> command -> args['file']);\n $tmpfile = tempnam('./', 'tmp');\n file_put_contents($tmpfile, $query);\n unset($query);\n\n // @formatter:off\n\t\t$command = \"mysql --default-character-set=utf8 -h \" . $this -> fields['DB_HOST'] . \" -D \" . $this -> fields['DB_NAME'] . \" -u \"\n\t\t\t. $this -> fields['DB_USER'] . \" --password='\" . $this -> fields['DB_PASSWORD'] . \"' < \\\"\" . $tmpfile . \"\\\"\";\n\t\t// @formatter:on\n exec($command);\n unlink($tmpfile);\n\n if ($this -> options['verbose']) {\n echo \"Done.\\n\";\n }\n }", "title": "" }, { "docid": "29334d6d93464dce4dadb0e836666798", "score": "0.5871348", "text": "public function generate_data()\r\n\t{\r\n\t\t$out = \"\";\r\n\r\n\t\t$columns = $this->explain();\r\n\r\n\t\tif (!empty($columns))\r\n\t\t{\r\n\t\t\t$out .= '<pre>table: '.$this->table_name.\"<br />\";\r\n\t\t\t$out .= 'protected $data = array(<br />';\r\n\t\t\tforeach ($columns as $column => $type)\r\n\t\t\t{\r\n\t\t\t\t$out .= \"\\t\\t'\".$column.\"' => '',<br />\";\r\n\t\t\t}\r\n\t\t\t$out = rtrim($out,',<br />');\r\n\t\t\t$out .= \"<br />\\t\\t);</pre>\";\r\n\t\t}\r\n\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "b2df958acb0cdd7cb070f91df3374700", "score": "0.57217264", "text": "final private function createDbBackup()\n {\n $types = [\n 'tinyint',\n 'smallint',\n 'mediumint',\n 'int',\n 'bigint',\n 'float',\n 'double',\n 'decimal',\n 'real',\n ];\n\n $file = new SplFileObject(sprintf('%s%s.sql', $this->realTemporaryDirectory, $this->prefix), 'a+');\n\n $tables = $this->getTables();\n\n foreach ($tables as $table) {\n $sql = $this->connection->query(sprintf('SELECT * FROM %s', $table));\n $column = $sql->columnCount();\n $rows = $sql->rowCount();\n\n $result = sprintf('DROP TABLE IF EXISTS %s;', $table);\n\n $structure = $this->connection->query(sprintf('SHOW CREATE TABLE %s', $table));\n $row = $structure->fetch(PDO::FETCH_NUM);\n $result .= sprintf(\"\\n\\n%s;\\n\\n\", str_replace('CREATE TABLE', 'CREATE TABLE IF NOT EXISTS', $row[1]));\n unset($structure);\n\n $file->fwrite($result);\n $result = '';\n $type = [];\n\n if ($rows) {\n $result = sprintf('INSERT INTO %s (', $table);\n $columns = $this->connection->query(sprintf('SHOW COLUMNS FROM %s', $table));\n\n $count = 0;\n\n while ($row = $columns->fetch(PDO::FETCH_NUM)) {\n $type[$table][] = stripos($row[1], '(') ? stristr($row[1], '(', true) : $row[1];\n $result .= $row[0];\n\n $count++;\n if ($count < $columns->rowCount()) {\n $result .= ', ';\n }\n }\n unset($columns);\n\n $result .= ') VALUES';\n\n $file->fwrite($result);\n\n $result = '';\n }\n\n $count = 0;\n while ($row = $sql->fetch(PDO::FETCH_NUM)) {\n $result .= \"\\n\\t(\";\n\n for ($i = 0; $i < $column; $i++) {\n if (isset($row[$i]) && in_array($type[$table][$i], $types) && !empty($row[$i])) {\n $result .= $row[$i];\n } elseif (isset($row[$i])) {\n $result .= $this->connection->quote($row[$i]);\n } else {\n $result .= 'NULL';\n }\n\n if ($i < $column - 1) {\n $result .= ',';\n }\n }\n\n $count++;\n $result .= $count < $rows ? '),' : ');';\n\n $file->fwrite($result);\n\n $result = '';\n }\n\n $file->fwrite(\"\\n\\n\\n\\n\");\n }\n\n unset($file, $result, $tables, $sql, $column, $rows, $row);\n\n return $this;\n }", "title": "" }, { "docid": "ae7d05059fe96f8368d1b6445a8224bb", "score": "0.5665999", "text": "private function get_ddl_mysql($archivo)\r\n\t{\r\n\t\t$this->manejador_interface->mensaje('Procesando: ' . $archivo);\r\n\t\t$renglones = file($archivo);\r\n\t\t$sql = '';\r\n\t\tforeach($renglones as $renglon) {\r\n\t\t\t//Las secuencias\r\n\t\t\tif(preg_match(\"/^create\\ssequence/i\",$renglon)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t//Elimino los comentarios generales\r\n\t\t\tif(preg_match(\"/^\\s*--/\",$renglon)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t//Saco comentarios lineas\r\n\t\t\t$renglon = preg_replace(\"/--.*$/\",'',$renglon);\r\n\t\t\t//Saco comillas dobles\r\n\t\t\t$renglon = preg_replace(\"/\\\"/\",' ',$renglon);\r\n\t\t\t//Cambio la declaracion del TIMESTAMP\r\n\t\t\t$renglon = preg_replace(\"/(?<!default)\\stimestamp.*zone/i\",' timestamp ',$renglon);\r\n\t\t\t//Cambio la declaracion del TIME\r\n\t\t\t$renglon = preg_replace(\"/(?<!default)\\stime.*zone/i\",' time ',$renglon);\r\n\t\t\t//Pongo los VARCHAR que no tienen largo definido como text\r\n\t\t\t$renglon = preg_replace(\"/varchar(?!\\\\s?\\()/i\",'text',$renglon);\r\n\t\t\t//Marco el tipo de tabla como InnoDB\r\n\t\t\t$renglon = preg_replace(\"/^\\s*\\);\\s*$/\",\") ENGINE=InnoDB;\\n\",$renglon);\r\n\t\t\t//Saco la declaracion de constraints especifica de postgres\r\n\t\t\t$renglon = preg_replace(\"/DEFERRABLE|INITIALLY|IMMEDIATE/\",\"\",$renglon);\r\n\t\t\t//Tipos de datos\r\n\t\t\t$renglon = preg_replace(\"/\\Wint4\\W/\",\"integer\",$renglon);\r\n\t\t\t//Cambio las secuencias\r\n\t\t\t$renglon = preg_replace(\"/default\\s*nextval\\s*\\(.*\\)/i\",\" auto_increment \",$renglon);\r\n\r\n\r\n\t\t\t//fatan las enumeraciones\r\n\r\n\t\t\t//--- Temporales ---\t SHOW INNODB STATUS\r\n\r\n\t\t\t//No se puede llamar \"sql\" a una columna\r\n\t\t\t$renglon = preg_replace(\"/\\Wsql\\W/\",\"nosql\",$renglon);\r\n\t\t\t$renglon = preg_replace(\"/\\Witem\\s*varchar\\(60\\).*NOT NULL/\",\" item varchar(60) NOT NULL \",$renglon);\r\n\t\t\t$renglon = preg_replace(\"/\\Witem_id\\s*integer.*NULL/\",\" item_id integer NULL\",$renglon);\r\n\t\t\t$sql .= $renglon;\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "46a059b71288b78f0303e58c7b4dbc8a", "score": "0.56361914", "text": "public function dataToDatabase($data);", "title": "" }, { "docid": "7e119c49f442aef4ee0cc02012cfab03", "score": "0.5633672", "text": "public function create_dump_sql() {\n $driver = $this->em->getConfiguration()->getMetadataDriverImpl();\n $entities_names = $driver->getAllClassNames();\n\n $entities_metadata = array();\n\n foreach($entities_names as $name) {\n array_push(\n $entities_metadata, \n $this->em->getClassMetadata($name)\n );\n }\n\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($this->em);\n\n return $tool->getCreateSchemaSql($entities_metadata);\n }", "title": "" }, { "docid": "dc5c4ed808fbab39e6e647b8b3dc1757", "score": "0.56058705", "text": "function dbInstall($data) {\n\n\t\t$data = <<<EOD\n\t\t\tokbit_gate: ID int(10) unsigned NOT NULL auto_increment\n\t\t\tokbit_gate: TITLE varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: IP varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: SN varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: VER varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: MOD varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: STATUS int(2) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_gate: SUB_ID int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_gate: IP_SERVER varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_gate: UPDATED datetime\t\t\t\n\t\t\t\n\t\t\tokbit_devices: ID int(10) unsigned NOT NULL auto_increment\n\t\t\tokbit_devices: TITLE varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_devices: PARENT_ID int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_devices: SUB_ID int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_devices: DEVICE_ID int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_devices: DEVICE int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_devices: SN varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_devices: VER varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_devices: MOD varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_devices: STATUS int(2) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_devices: UPDATED datetime\n\n\t\t\tokbit_data: ID int(10) unsigned NOT NULL auto_increment\n\t\t\tokbit_data: TITLE varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_data: VALUE varchar(255) NOT NULL DEFAULT ''\n\t\t\tokbit_data: DEVICE_ID int(10) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_data: ETHERNET int(2) unsigned NOT NULL DEFAULT 0\n\t\t\tokbit_data: LINKED_OBJECT varchar(100) NOT NULL DEFAULT ''\n\t\t\tokbit_data: LINKED_PROPERTY varchar(100) NOT NULL DEFAULT ''\n\t\t\tokbit_data: LINKED_METHOD varchar(100) NOT NULL DEFAULT ''\n\t\t\tokbit_data: UPDATED datetime\nEOD;\n\t\tparent::dbInstall($data);\n\t}", "title": "" }, { "docid": "d1653bde14a84ac75910c36e62d4a49e", "score": "0.5575852", "text": "function load_mysql_json_export($data) {\n\n $pos = 0;\n $retval = array();\n $errors = array();\n echo(\"\\n<pre>\\n\");\n while ( $pos < strlen($data) ) {\n $nxt = strpos($data,'// ',$pos);\n if ( $nxt === false ) break;\n $com = strpos($data,'// ',$nxt+3);\n $start = strpos($data,'[{\"',$nxt+3);\n if ( $start === false ) break;\n if ( $com !== false && $com < $start ) {\n $pos = $com; // Skip to the next comment\n continue;\n }\n $name = trim(substr($data, $nxt+3,$start-$nxt-3));\n $pieces = explode('.',$name);\n if ( count($pieces) > 1 ) {\n $name = $pieces[count($pieces)-1];\n }\n $end = strpos($data,'\"}]',$start);\n if ( $end === false ) break;\n\n $json_str = substr($data, $start, 3+$end-$start);\n $json = json_decode($json_str, true);\n if ( $json === NULL ) {\n $errors[] = \"Unable to parse the $name JSON \".json_last_error();\n $pos = $end;\n continue;\n }\n\n $retval[$name] = $json;\n if ( count($json) < 1 ) {\n $pos = $end;\n continue;\n }\n\n $key = strtolower($name).'_id';\n if ( !isset($json[0][$key]) ) {\n $pos = $end;\n continue;\n }\n\n $table = array();\n foreach($json as $row) {\n if ( isset($row[$key]) && is_numeric($row[$key]) ) {\n $table[$row[$key]+0] = $row;\n }\n }\n $retval[$name.\"_table\"] = $table;\n $pos = $end;\n }\n // echo(\"<pre>\\n\"); print_r($retval); echo(\"</pre>\\n\");\n return $retval;\n}", "title": "" }, { "docid": "f9c9386c695490b11c8a7f720f99c9d1", "score": "0.5558425", "text": "public function getSqlBackup($tables){\n // Introduction information\n $re = '-- # A Mysql Backup System\n-- # Export created: '. date('Y/m/d') .' on ' . date('H:i:s'). '\n-- # Database : '. $this->mysql['dbname']. PHP_EOL;\n $re .= 'SET AUTOCOMMIT = 0 ;'. PHP_EOL;\n $re .= 'SET FOREIGN_KEY_CHECKS=0 ;'. PHP_EOL;\n\n // Cycle through each table\n foreach($tables as $table){\n // Add table information\n $re .= PHP_EOL .'-- # Tabel structure for table `' . $table . '`'. PHP_EOL;\n $re.= 'DROP TABLE IF EXISTS `'.$table.'`;'. PHP_EOL;\n\n // get and append table-shema into code\n $shema = $this->sqlExec('SHOW CREATE TABLE '.$table);\n $re.= $shema[0]['Create Table'] .';'. PHP_EOL;\n $shema =''; //free memory\n\n // Get content of each table\n $resql = $this->sqlExec('SELECT * FROM '. $table);\n if($this->num_rows >0){\n $nr = $this->num_rows;\n\n //get columns and start code that will insert data into table with columns got from 1st row\n $re .= PHP_EOL .'INSERT INTO `'.$table .'` (`'. implode('`, `', array_keys($resql[0])) .'`) VALUES ';\n\n //get data from each row and column to be added with insert\n $data_rows = [];\n for($i=0; $i<$nr; $i++){\n //get data of each column in row\n $data_cols = [];\n foreach($resql[$i] AS $k => $v) {\n $data_cols[] = is_numeric($v) ? $v :\"'\". str_ireplace([\"\\n\", \"\\r\"], '\\n', addcslashes($v, \"'\\\\\")) .\"'\";\n }\n $data_rows[] = '('. implode(', ', $data_cols) .')';\n $data_cols =''; //to free memory\n }\n $resql =''; //free memory\n $re .= implode(', '. PHP_EOL, $data_rows) .';'. PHP_EOL;\n $data_rows =''; //free memory\n }\n }\n $re .= PHP_EOL .'SET FOREIGN_KEY_CHECKS = 1; \nCOMMIT; \nSET AUTOCOMMIT = 1; '. PHP_EOL;\n\n return $re;\n }", "title": "" }, { "docid": "20accfaa11a932ef8294341ec1d6d0df", "score": "0.55365574", "text": "static function convertSQLFromMysql($line,$type='ddl')\n {\n return $line;\n }", "title": "" }, { "docid": "54f160f930c851782db27f79bad3df1f", "score": "0.5530228", "text": "public function update_dump_sql() {\n $driver = $this->em->getConfiguration()->getMetadataDriverImpl();\n $entities_names = $driver->getAllClassNames();\n\n $entities_metadata = array();\n\n foreach($entities_names as $name) {\n array_push(\n $entities_metadata, \n $this->em->getClassMetadata($name)\n );\n }\n\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($this->em);\n\n return $tool->getUpdateSchemaSql($entities_metadata);\n }", "title": "" }, { "docid": "9af4bd32de2104a936e5b50220b543d2", "score": "0.5524639", "text": "private function dumpDb()\n {\n $this->logger->progressMessage('Dumping database');\n\n $outfile = $this->storageDir . '99_obfuscated_data.sql';\n\n $this->db->dumpDbData($this->obfuscationDbName, $outfile);\n\n $this->logger->completeMessage('Dumped cleansed database');\n }", "title": "" }, { "docid": "eb8c738ff21b4d1eb91a78dfd758889d", "score": "0.5508522", "text": "function backup_tables()\n\t{\n\t\n\t\t$filename='database_backup_'.date(\"Y-m-d H:i:s\").'.sql';\n\t\tprint $filename;\n\t\t//sudo mysqldump -uroot -pgladdylight omelette > test.sql\n\t\t\n\t\t$result=exec('mysqldump -uroot -pgladdylight omelette > /var/www/Omelette/backups/'.$filename,$output);\n\t\tprint $result;\n\t\tif($output==''){print \"no output\";}\n\t\telse {print_r($output);}\n\t\t\n\t\t$sql=\"TRUNCATE TABLE properties\t;\" ;\n\t\t\n\t\t$properties=$this->simplesql($sql);\n\t\t\n\t\t$sql='INSERT INTO properties (widget,session_id,data) VALUES (\"Welcome\",\"1\",\"welcome\")';\n\t\t$properties=$this->simplesql($sql);\n\t\t\n\t}", "title": "" }, { "docid": "d57bc2c988ee4efa866a1ff899a6345d", "score": "0.55056477", "text": "function dbInstall($data) {\n $data = \"\n gw_device: ID int(10) unsigned NOT NULL auto_increment\n gw_device: DEVICE_ID varchar(10) NOT NULL\n gw_device: NAME varchar(255) NOT NULL DEFAULT ''\n gw_device: MEMBER_ID int(10) NOT NULL DEFAULT '1'\n gw_device: CREATED datetime\n gw_device: ONLINE int(3) unsigned NOT NULL DEFAULT '0'\n gw_device: LAST_ONLINE datetime\n gw_device: LAST_IP text\n gw_device: BATTERY int(3) unsigned NOT NULL DEFAULT '0'\n gw_device: ONHAND int(3) unsigned NOT NULL DEFAULT '0'\n gw_device: LINKED_OBJECT text\n \n gw_settings: ID int(10) unsigned NOT NULL auto_increment\n gw_settings: DEVICE_ID int(10) NOT NULL\n gw_settings: UPDATE_INTERVAL int(10)\n gw_settings: FLOWER int(10)\n gw_settings: SOS TEXT\n gw_settings: PROFILE int(3)\n \n gw_traffic: ID int(10) unsigned NOT NULL auto_increment\n gw_traffic: DEVICE_ID int(10) NOT NULL\n gw_traffic: DATE_TRAFFIC datetime\n gw_traffic: DOWNLOAD int(10) unsigned NOT NULL\n gw_traffic: UPLOAD int(10) unsigned NOT NULL\n \n gw_cmd: ID int(10) unsigned NOT NULL auto_increment\n gw_cmd: DEVICE_ID int(10) NOT NULL\n gw_cmd: DATA text\n gw_cmd: CREATED datetime\n gw_cmd: SENDED datetime\n \n gw_log: ID int(10) unsigned NOT NULL auto_increment\n gw_log: DEVICE_ID int(10) NOT NULL DEFAULT '0'\n gw_log: ADDED datetime\n gw_log: LAT float DEFAULT '0' NOT NULL\n gw_log: LON float DEFAULT '0' NOT NULL\n gw_log: ALT float DEFAULT '0' NOT NULL\n gw_log: DIRECTION float DEFAULT '0' NOT NULL\n gw_log: PROVIDER varchar(30) NOT NULL DEFAULT ''\n gw_log: SPEED float DEFAULT '0' NOT NULL\n gw_log: BATTLEVEL int(3) NOT NULL DEFAULT '0'\n gw_log: CHARGING int(3) NOT NULL DEFAULT '0'\n gw_log: ACCURACY float DEFAULT '0' NOT NULL\n \";\n parent::dbInstall($data);\n \n }", "title": "" }, { "docid": "9041a7bdb3112935e275ca0284ba3ded", "score": "0.5452515", "text": "abstract public function getSQL();", "title": "" }, { "docid": "fa069e1db4de714f71c0181611aef661", "score": "0.5443425", "text": "public function loadSql() {\n\t\t$json = $this->load();\n\t\t$sql_content = array();\n\t\t$types = array_keys($json);\n\t\t$nonIrreTables = array(\"pages\", \"tt_content\");\n\n\t\t// Generate SQL-Statements\n\t\tif ($types) {\n\t\t\tforeach ($types as $type) {\n\t\t\t\tif ($json[$type][\"sql\"]) {\n\n\t\t\t\t\t// If type/table is an irre table, then create table for it\n\t\t\t\t\tif (array_search($type, $nonIrreTables) === FALSE) {\n\t\t\t\t\t\t$sql_content[] = \"CREATE TABLE \" . $type . \" (\n\n\t\t\t\t\t\t\t uid int(11) NOT NULL auto_increment,\n\t\t\t\t\t\t\t pid int(11) DEFAULT '0' NOT NULL,\n\n\t\t\t\t\t\t\t tstamp int(11) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t crdate int(11) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t cruser_id int(11) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t starttime int(11) unsigned DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t endtime int(11) unsigned DEFAULT '0' NOT NULL,\n\n\t\t\t\t\t\t\t t3ver_oid int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_id int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_wsid int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_label varchar(255) DEFAULT '' NOT NULL,\n\t\t\t\t\t\t\t t3ver_state tinyint(4) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_stage int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_count int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_tstamp int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t t3ver_move_id int(11) DEFAULT '0' NOT NULL,\n\n\t\t\t\t\t\t\t sys_language_uid int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t l10n_parent int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t l10n_diffsource mediumblob,\n\n\t\t\t\t\t\t\t PRIMARY KEY (uid),\n\t\t\t\t\t\t\t KEY parent (pid),\n\t\t\t\t\t\t\t KEY t3ver_oid (t3ver_oid,t3ver_wsid),\n\t\t\t\t\t\t\t KEY language (l10n_parent,sys_language_uid),\n\n\t\t\t\t\t\t\t parentid int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t parenttable varchar(255) DEFAULT '',\n\t\t\t\t\t\t\t sorting\tint(11) DEFAULT '0' NOT NULL,\n\n\t\t\t\t\t\t );\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ($json[$type][\"sql\"] as $field) {\n\t\t\t\t\t\tif ($field) {\n\t\t\t\t\t\t\tforeach ($field as $table => $fields) {\n\t\t\t\t\t\t\t\tif ($fields) {\n\t\t\t\t\t\t\t\t\tforeach ($fields as $field => $definition) {\n\t\t\t\t\t\t\t\t\t\t$sql_content[] = \"CREATE TABLE \" . $table . \" (\\n\\t\" . $field . \" \" . $definition . \"\\n);\\n\";\n\n\t\t\t\t\t\t\t\t\t\t// every statement for pages, also for pages_language_overlay\n\t\t\t\t\t\t\t\t\t\tif ($table == \"pages\") {\n\t\t\t\t\t\t\t\t\t\t\t$sql_content[] = \"CREATE TABLE pages_language_overlay (\\n\\t\" . $field . \" \" . $definition . \"\\n);\\n\";\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Parentfield\n\t\t$sql_content[] = \"CREATE TABLE tt_content (\\n\\ttx_mask_content_parent int(11) unsigned NOT NULL DEFAULT '0'\\n);\\n\";\n\t\treturn $sql_content;\n\t}", "title": "" }, { "docid": "a64d29f92408360bfb870606feb18651", "score": "0.5419253", "text": "function _get_sql_file_footer() {\n\t\treturn \"\n \n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n\";\n\t}", "title": "" }, { "docid": "8483b356043abe0765a082444f17516f", "score": "0.54192406", "text": "function vmoodle_dump_database($vmoodle, $outputfile){\n\tglobal $CFG;\n\n\t// Separating host and port, if sticked.\n\tif (strstr($vmoodle->vdbhost, ':') !== false){\n\t\tlist($host, $port) = split(':', $vmoodle->vdbhost);\n\t} else {\n\t\t$host = $vmoodle->vdbhost;\n\t}\n\n\t// By default, empty password.\n\t$pass = '';\n\t$pgm = null;\n \n\tif ($vmoodle->vdbtype == 'mysql' || $vmoodle->vdbtype == 'mysqli'){ // MysQL.\n\t\t// Default port.\n\t\tif (empty($port)){\n\t\t\t$port = 3306;\n\t\t}\n\n\t\t// Password.\n\t\tif (!empty($vmoodle->vdbpass)){\n\t\t\t$pass = \"-p\".escapeshellarg($vmoodle->vdbpass);\n\t\t}\n\n\t\t// Making the command.\n\t\tif ($CFG->ostype == 'WINDOWS'){\n \t\t$cmd = \"-h{$host} -P{$port} -u{$vmoodle->vdblogin} {$pass} {$vmoodle->vdbname}\";\n \t\t$cmd .= \" > \" . $outputfile;\n \t} else {\n \t\t$cmd = \"-h{$host} -P{$port} -u{$vmoodle->vdblogin} {$pass} {$vmoodle->vdbname}\";\n \t\t$cmd .= \" > \" . escapeshellarg($outputfile);\n \t}\n\n\t\t// MySQL application (see 'vconfig.php').\n\t\t$pgm = (!empty($CFG->block_vmoodle_cmd_mysqldump)) ? stripslashes($CFG->block_vmoodle_cmd_mysqldump) : false;\n\t}\n\telse if ($vmoodle->vdbtype == 'postgres'){ // PostgreSQL.\n\t\t// Default port.\n\t\tif (empty($port)){\n\t\t\t$port = 5432;\n\t\t}\n\n\t\t// Password.\n\t\tif (!empty($vmoodle->vdbpass)){\n\t\t\t$pass = $vmoodle->vdbpass;\n\t\t}\n\n\t\t// Making the command, (if needed, a password prompt will be displayed).\n\t\tif ($CFG->ostype == 'WINDOWS'){\n \t\t$cmd = \" -d -b -Fc -h {$host} -p {$port} -U {$vmoodle->vdblogin} {$vmoodle->vdbname}\";\n \t\t$cmd .= \" > \" . $outputfile;\n \t} else {\n \t\t$cmd = \" -d -b -Fc -h {$host} -p {$port} -U {$vmoodle->vdblogin} {$vmoodle->vdbname}\";\n \t\t$cmd .= \" > \" . escapeshellarg($outputfile);\n \t}\n\n\t\t// PostgreSQL application (see 'vconfig.php').\n\t\t$pgm = (!empty($CFG->block_vmoodle_cmd_pgsqldump)) ? $CFG->vmoodle_cmd_pgsqldump : false ;\n\t}\n\n\tif(!$pgm){\n\t error(\"Database dump command not available\");\n\t\treturn false;\n\t} else {\n $phppgm = str_replace(\"\\\\\", '/', $pgm);\n $phppgm = str_replace(\"\\\"\", '', $phppgm);\n $pgm = str_replace('/', DIRECTORY_SEPARATOR, $pgm);\n\n\t if (!is_executable($phppgm)){\n \t error(\"Database dump command $phppgm does not match any executable\");\n \t\treturn false;\n\t }\n\t\t// Final command.\n\t\t$cmd = $pgm.' '.$cmd;\n\n\t\t// Prints log messages in the page and in 'cmd.log'.\n\t\tif ($LOG = fopen(dirname($outputfile).'/cmd.log', 'a')){\n\t\t\tfwrite($LOG, $cmd.\"\\n\");\n\t\t}\n\n\t\t// Executes the SQL command.\n\t\texec($cmd, $execoutput, $returnvalue);\n\t\tif ($LOG){\n\t\t\tforeach($execoutput as $execline) fwrite($LOG, $execline.\"\\n\");\n\t\t\tfwrite($LOG, $returnvalue.\"\\n\");\n\t\t\tfclose($LOG);\n\t\t}\n\t}\n\n\t// End with success.\n\treturn true;\n}", "title": "" }, { "docid": "670c66ed3d39417d6873beba49e4fd00", "score": "0.5397789", "text": "function _dump_table_data_sql_to_file($f, $table) {\n\n\t\t// todo: config values for these\n\t\t$rows_per_query = 500; // rows to read at a time from the DB\n\t\t$rows_per_line = 30;\n\t\t$bytes_per_line = 2000;\n\n\t\t$totalRows = $this->queryValue(\"SELECT count(1) FROM `\". $table['name'] .\"`\");\n\t\t$offset = 0;\n\t\t$lines = 0;\n\n\t\twhile( $offset < $totalRows ){\n\n\t\t\t$results = DB::query(\"SELECT * FROM `\". $table['name'] .\"` LIMIT $offset, $rows_per_query\");\n\n\t\t\t$offset += $rows_per_query;\n\t\t\t$rows = $bytes = 0;\n\n\t\t\t// Escape backslashes, PHP code, special chars\n\t\t\t$search = array('\\\\', \"'\", \"\\x00\", \"\\x0a\", \"\\x0d\", \"\\x1a\");\n\t\t\t$replace = array('\\\\\\\\', \"''\", '\\0', '\\n', '\\r', '\\Z');\n\n\t\t\tforeach ($results as $row) {\n\t\t\t\t// DB Escape the values.\n\t\t\t\t$items = array();\n\t\t\t\tforeach ($row as $key => $value) {\n\t\t\t\t\t$items[] = is_null($value) ? \"null\" : \"'\". str_replace($search, $replace, $value) .\"'\";\n\t\t\t\t}\n\n\t\t\t\t// If there is a row to be added.\n\t\t\t\tif ($items) {\n\t\t\t\t\t// Start a new line if we need to.\n\t\t\t\t\tif ($rows == 0) {\n\t\t\t\t\t\tfwrite($f, \"INSERT INTO `\". $table['name'] .\"` VALUES \");\n\t\t\t\t\t\t$bytes = $rows = 0;\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise add a comma to end the previous entry.\n\t\t\t\t\telse {\n\t\t\t\t\t\tfwrite($f, \",\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Write the data itself.\n\t\t\t\t\t$sql = implode(',', $items);\n\t\t\t\t\tfwrite($f, '('. $sql .')');\n\t\t\t\t\t$bytes += strlen($sql);\n\t\t\t\t\t$rows++;\n\n\t\t\t\t\t// Finish the last line if we've added enough items\n\t\t\t\t\tif ($rows >= $rows_per_line || $bytes >= $bytes_per_line) {\n\t\t\t\t\t\tfwrite($f, \";\\n\");\n\t\t\t\t\t\t$lines++;\n\t\t\t\t\t\t$bytes = $rows = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Finish any unfinished insert statements.\n\t\t\tif ($rows > 0) {\n\t\t\t\tfwrite($f, \";\\n\");\n\t\t\t\t$lines++;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $lines;\n\t}", "title": "" }, { "docid": "30484df2795e83a5764301243549dbd2", "score": "0.53808784", "text": "function vmoodle_get_database_dump_cmd($vmoodledata){\n global $CFG;\n\n\t// Checks if paths commands have been properly defined in 'vconfig.php'.\n\tif($vmoodledata->vdbtype == 'mysql') {\n\t\t$pgm = (!empty($CFG->block_vmoodle_cmd_mysql)) ? stripslashes($CFG->block_vmoodle_cmd_mysql) : false;\n\t}\n else if($vmoodledata->vdbtype == 'mysqli') {\n $pgm = (!empty($CFG->block_vmoodle_cmd_mysql)) ? stripslashes($CFG->block_vmoodle_cmd_mysql) : false;\n }\n\telse if($vmoodledata->vdbtype == 'postgres') {\n\t // needs to point the pg_restore command\n\t\t$pgm = (!empty($CFG->block_vmoodle_cmd_pgsql)) ? stripslashes($CFG->block_vmoodle_cmd_pgsql) : false;\n\t}\n\n\t// Checks the needed program.\n debug_trace(\"load_database_from_dump : checking database command\");\n\tif(!$pgm){\n\t error(\"Database command not configured\");\n\t\treturn false;\n\t}\n\n $phppgm = str_replace(\"\\\\\", '/', $pgm);\n $phppgm = str_replace(\"\\\"\", '', $phppgm);\n $pgm = str_replace(\"/\", DIRECTORY_SEPARATOR, $pgm);\n\n debug_trace('load_database_from_dump : checking command is available');\n\tif(!is_executable($phppgm)){\n\t print_error('databasecommanddoesnotmatchanexecutablefile', 'block_vmoodle', $phppgm);\n\t\treturn false;\n\t}\n\n\t// Retrieves the host configuration (more secure).\n\t$thisvmoodle = vmoodle_make_this();\n\tif (strstr($thisvmoodle->vdbhost, ':') !== false){\n\t\tlist($thisvmoodle->vdbhost, $thisvmoodle->vdbport) = split(':', $thisvmoodle->vdbhost);\n\t}\n\n\t// Password.\n\tif (!empty($thisvmoodle->vdbpass)){\n\t\t$thisvmoodle->vdbpass = '-p'.escapeshellarg($thisvmoodle->vdbpass).' ';\n\t}\n\n\t// Making the command line (see 'vconfig.php' file for defining the right paths).\n\tif($vmoodledata->vdbtype == 'mysql') {\n\t\t$sqlcmd\t= $pgm.' -h'.$thisvmoodle->vdbhost.(isset($thisvmoodle->vdbport) ? ' -P'.$thisvmoodle->vdbport.' ' : ' ' );\n\t\t$sqlcmd .= '-u'.$thisvmoodle->vdblogin.' '.$thisvmoodle->vdbpass;\n\t\t$sqlcmd .= $vmoodledata->vdbname.' < ';\n\t}\n else if($vmoodledata->vdbtype == 'mysqli') {\n $sqlcmd = $pgm.' -h'.$thisvmoodle->vdbhost.(isset($thisvmoodle->vdbport) ? ' -P'.$thisvmoodle->vdbport.' ' : ' ' );\n $sqlcmd .= '-u'.$thisvmoodle->vdblogin.' '.$thisvmoodle->vdbpass;\n $sqlcmd .= $vmoodledata->vdbname.' < ';\n }\n\telse if($vmoodledata->vdbtype == 'postgres') {\n\t\t$sqlcmd\t= $pgm.' -Fc -h '.$thisvmoodle->vdbhost.(isset($thisvmoodle->vdbport) ? ' -p '.$thisvmoodle->vdbport.' ' : ' ' );\n\t\t$sqlcmd .= '-U '.$thisvmoodle->vdblogin.' ';\n\t\t$sqlcmd .= '-d '.$vmoodledata->vdbname.' -f ';\n\t}\n\treturn $sqlcmd;\n}", "title": "" }, { "docid": "7b81bc3fcfa9beee2b34386f64280148", "score": "0.5379747", "text": "public function getUpSQL()\n {\n return array (\n 'ssdata' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `user`\n ADD `userGUID` VARCHAR(255) DEFAULT \\'\\' NOT NULL AFTER `password`;\n\nALTER TABLE `view_asset_allocation` DROP PRIMARY KEY;\n\nALTER TABLE `view_asset_allocation` CHANGE `id` `id` INTEGER NOT NULL;\n\nALTER TABLE `view_asset_allocation` ADD PRIMARY KEY (`id`);\n\nALTER TABLE `view_employees` DROP PRIMARY KEY;\n\nALTER TABLE `view_employees` CHANGE `Name` `Name` VARCHAR(66) NOT NULL;\n\nALTER TABLE `view_employees` ADD PRIMARY KEY (`Name`);\n\nALTER TABLE `view_quote` DROP PRIMARY KEY;\n\nALTER TABLE `view_quote` CHANGE `site` `site` VARCHAR(80) NOT NULL;\n\nALTER TABLE `view_quote` ADD PRIMARY KEY (`site`);\n\nALTER TABLE `view_roles` DROP PRIMARY KEY;\n\nALTER TABLE `view_roles` CHANGE `Name` `Name` VARCHAR(66) NOT NULL;\n\nALTER TABLE `view_roles` ADD PRIMARY KEY (`Name`);\n\nCREATE TABLE `sessions`\n(\n `id` INTEGER NOT NULL AUTO_INCREMENT,\n `userId` INTEGER NOT NULL,\n `session_guid` VARCHAR(64) DEFAULT \\'\\' NOT NULL,\n `created_at` DATETIME NOT NULL,\n `accessed` DATETIME NOT NULL,\n `ip_address` VARCHAR(64) DEFAULT \\'\\' NOT NULL,\n `browser` VARCHAR(64) DEFAULT \\'\\' NOT NULL,\n PRIMARY KEY (`id`),\n INDEX `sessions_FI_1` (`userId`)\n) ENGINE=MyISAM;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "ecb1c9ecaa5156f76ba36a0709420908", "score": "0.537431", "text": "public function getDownSQL()\n {\n return array (\n 'rokfor' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `_batch`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_books`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_contributions`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_data`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_fieldpostprocessor`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_formats`\n\n CHANGE `__user__` `__user__` TEXT;\n\nCREATE UNIQUE INDEX `_formats_u_9d86c7` ON `_formats` (`id`);\n\nALTER TABLE `_issues`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_log`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_pdf`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_plugins`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_rights`\n\n CHANGE `__user__` `__user__` TEXT;\n\nALTER TABLE `_templatenames`\n\n CHANGE `__user__` `__user__` TEXT;\n\nCREATE INDEX `id` ON `_templatenames` (`id`);\n\nALTER TABLE `_templates`\n\n CHANGE `__user__` `__user__` TEXT;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "595bcb1323309ddfddfc4927b070e33f", "score": "0.5371815", "text": "function _build_insert_sql(&$obj, $flag_cid=false)\n{\n\tforeach ($obj->gets() as $k => $v) \n\t{\t${$k} = $v;\t}\n\n\t$sql = 'INSERT INTO '.$this->_table.' (';\n\n\tif ( $flag_cid )\n\t{\n\t\t$sql .= 'cid, ';\n\t}\n\n\t$sql .= 'pid, ';\n\t$sql .= 'title, ';\n\t$sql .= 'imgurl, ';\n\t$sql .= 'cflag, ';\n\t$sql .= 'lflag, ';\n\t$sql .= 'tflag, ';\n\t$sql .= 'displayimg, ';\n\t$sql .= 'description, ';\n\t$sql .= 'catdescription, ';\n\t$sql .= 'catfooter, ';\n\t$sql .= 'groupid, ';\n\t$sql .= 'orders, ';\n\t$sql .= 'editaccess, ';\n\n\t$sql .= 'forum_id, ';\n\t$sql .= 'tree_order, ';\n\t$sql .= 'cids_parent, ';\n\t$sql .= 'cids_child, ';\n\t$sql .= 'link_count, ';\n\t$sql .= 'link_update, ';\n\n// aux\n\t$sql .= 'aux_int_1, ';\n\t$sql .= 'aux_int_2, ';\n\t$sql .= 'aux_text_1, ';\n\t$sql .= 'aux_text_2, ';\n\n\t$sql .= 'album_id, ';\n\n// image size\n\t$sql .= 'img_orig_width, ';\n\t$sql .= 'img_orig_height, ';\n\t$sql .= 'img_show_width, ';\n\t$sql .= 'img_show_height, ';\n\n// google map\n\t$sql .= 'gm_mode, ';\n\t$sql .= 'gm_latitude, ';\n\t$sql .= 'gm_longitude, ';\n\t$sql .= 'gm_zoom, ';\n\t$sql .= 'gm_type, ';\n\t$sql .= 'gm_icon, ';\n\t$sql .= 'gm_location, ';\n\n// dhtml\n\t$sql .= 'dohtml, ';\n\t$sql .= 'dosmiley, ';\n\t$sql .= 'doxcode, ';\n\t$sql .= 'doimage, ';\n\t$sql .= 'dobr ';\n\n\t$sql .= ') VALUES (';\n\n\tif ( $flag_cid )\n\t{\n\t\t$sql .= intval($cid).', ';\n\t}\n\n\t$sql .= intval($pid).', ';\n\t$sql .= $this->quote($title).', ';\n\t$sql .= $this->quote($imgurl).', ';\n\t$sql .= intval($cflag).', ';\n\t$sql .= intval($lflag).', ';\n\t$sql .= intval($tflag).', ';\n\t$sql .= intval($displayimg).', ';\n\t$sql .= $this->quote($description).', ';\n\t$sql .= $this->quote($catdescription).', ';\n\t$sql .= $this->quote($catfooter).', ';\n\t$sql .= $this->quote($groupid).', ';\n\t$sql .= intval($orders).', ';\n\t$sql .= $this->quote($editaccess).', ';\n\n\t$sql .= intval($forum_id).', ';\n\t$sql .= intval($tree_order).', ';\n\t$sql .= $this->quote($cids_parent).', ';\n\t$sql .= $this->quote($cids_child).', ';\n\t$sql .= intval($link_count).', ';\n\t$sql .= intval($link_update).', ';\n\n// aux\n\t$sql .= intval($aux_int_1).', ';\n\t$sql .= intval($aux_int_2).', ';\n\t$sql .= $this->quote($aux_text_1).', ';\n\t$sql .= $this->quote($aux_text_2).', ';\n\n// Notice [PHP]: Use of undefined constant album_id - assumed 'album_id'\n\t$sql .= intval($album_id).', ';\n\n// image size\n\t$sql .= intval($img_orig_width).', ';\n\t$sql .= intval($img_orig_height).', ';\n\t$sql .= intval($img_show_width).', ';\n\t$sql .= intval($img_show_height).', ';\n\n// google map\n\t$sql .= intval($gm_mode).', ';\n\t$sql .= floatval($gm_latitude).', ';\n\t$sql .= floatval($gm_longitude).', ';\n\t$sql .= intval($gm_zoom).', ';\n\t$sql .= intval($gm_type).', ';\n\t$sql .= intval($gm_icon).', ';\n\t$sql .= $this->quote($gm_location).', ';\n\n// dhtml\n\t$sql .= intval($dohtml).', ';\n\t$sql .= intval($dosmiley).', ';\n\t$sql .= intval($doxcode).', ';\n\t$sql .= intval($doimage).', ';\n\t$sql .= intval($dobr).' ';\n\n\t$sql .= ')';\n\n\treturn $sql;\n}", "title": "" }, { "docid": "97dd95e5c3455a2e30e81f89cb181a12", "score": "0.53433365", "text": "function _run()\n\t{\n\t\t// Check if we are already done\n\t\tif ($this->_getState() == 'postrun') {\n\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"JoomlapackDumperMysqlnew :: Already finished\");\n\t\t\t$this->_Step = \"\";\n\t\t\t$this->_Substep = \"\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark ourselves as still running (we will test if we actually do towards the end ;) )\n\t\t$this->setState('running');\n\n\t\t// Initialize local variables\n\t\t$db =& $this->_getDB();\n\t\tif($this->getError()) return;\n\n\t\tif( !is_object($db) || ($db === false) )\n\t\t{\n\t\t\t$this->setError(__CLASS__.'::_run() Could not connect to database?!');\n\t\t\treturn;\n\t\t}\n\n\t\t$outCreate\t= ''; // Used for outputting CREATE TABLE commands\n\t\t$outData\t= ''; // Used for outputting INSERT INTO commands\n\n\t\t$this->_enforceSQLCompatibility(); // Apply MySQL compatibility option\n\t\tif($this->getError()) return;\n\n\t\t// Touch SQL dump file\n\t\t$nada = \"\";\n\t\t$this->_writeline($nada);\n\n\t\t// Get this table's information\n\t\t$tableName = $this->_nextTable;\n\t\t$tableAbstract = trim( $this->_table_name_map[$tableName] );\n\t\t$dump_records = $this->_tables_data[$tableName]['dump_records'];\n\t\t\n\t\t// If it is the first run, find number of rows and get the CREATE TABLE command\n\t\tif( $this->_nextRange == 0 )\n\t\t{\n\t\t\tif($this->getError()) return;\n\t\t\t$outCreate = $this->_tables_data[$tableName]['create'];\n\t\t\tif( $dump_records )\n\t\t\t{\n\t\t\t\t// We are dumping data from a table, get the row count\n\t\t\t\t$this->_getRowCount( $tableAbstract );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We should not dump any data\n\t\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_INFO, \"Skipping dumping data of \" . $this->_nextTable);\n\t\t\t\t$this->_maxRange = 0;\n\t\t\t\t$this->_nextRange = 1;\n\t\t\t\t$outData = '';\n\t\t\t\t$numRows = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Ugly hack to make JoomlaPack skip over #__jp_temp\n\t\t// @todo Apply this in skip database table contents filters instead of here\n\t\tif( $tableAbstract == '#__jp_temp' )\n\t\t{\n\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_INFO, \"Skipping contents of table \" . $this->_nextTable);\n\t\t\t$this->_nextRange = $this->_maxRange + 1;\n\t\t\t$numRows = 0;\n\t\t}\n\n\t\t// Check if we have more work to do on this table\n\t\tif( ($this->_nextRange < $this->_maxRange) )\n\t\t{\n\t\t\t// Get the number of rows left to dump from the current table\n\t\t\t$sql = \"select * from `$tableAbstract`\";\n\t\t\t$db->setQuery( $sql, $this->_nextRange, JPROWSPERSTEP );\n\t\t\t$dataDump = $db->loadAssocList();\n\t\t\t$numTheseRows = count($dataDump);\n\t\t\tif($numTheseRows == 0)\n\t\t\t{\n\t\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_ERROR, \"Error while dumping \" . $this->_nextTable . \"; no records were returned!\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"Dumping $numTheseRows rows of \" . $this->_nextTable);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Only dump if we have more than 0 rows to dump\n\t\t\tif ($numTheseRows > 0)\n\t\t\t{\n\t\t\t\t$numRows = 0;\n\t\t\t\tforeach( $dataDump as $myRow ) {\n\t\t\t\t\t$numRows++;\n\t\t\t\t\t$numOfFields = count( $myRow );\n\t\t\t\t\t\t\n\t\t\t\t\tif( $numOfFields > 0 ) $outData .= \"INSERT INTO `\" . ($this->_DBOnly ? $tableName : $tableAbstract) . \"` VALUES (\";\n\t\t\t\t\t\t\n\t\t\t\t\t// Step through each of the row's values\n\t\t\t\t\t$fieldID = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t// Used in running backup fix\n\t\t\t\t\t$isCurrentBackupEntry = false;\n\n\t\t\t\t\t// Fix 1.2a - NULL values were being skipped\n\t\t\t\t\tif( $numOfFields > 0 ) foreach( $myRow as $value )\n\t\t\t\t\t{\n\t\t\t\t\t\t// The ID of the field, used to determine placement of commas\n\t\t\t\t\t\t$fieldID++;\n\n\t\t\t\t\t\t// Fix 2.0: Mark currently running backup as succesfull in the DB snapshot\n\t\t\t\t\t\tif($tableAbstract == '#__jp_stats')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($fieldID == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Compare the ID to the currently running\n\t\t\t\t\t\t\t\t$cube =& JoomlapackCUBE::getInstance();\n\t\t\t\t\t\t\t\t$isCurrentBackupEntry = ($cube->_statID == $value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ($fieldID == 6)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Treat the status field\n\t\t\t\t\t\t\t\t$value = $isCurrentBackupEntry ? 'complete' : $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Post-process the value\n\t\t\t\t\t\tif( is_null($value) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$outData .= \"NULL\"; // Cope with null values\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Accomodate if runtime magic quotes are present\n\t\t\t\t\t\t\t$value = get_magic_quotes_runtime() ? stripslashes( $value ) : $value;\n\t\t\t\t\t\t\t$outData .= $db->Quote($value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( $fieldID < $numOfFields ) $outData .= ', ';\n\t\t\t\t\t} // foreach\n\t\t\t\t\tif( $numOfFields ) $outData .=\");\\n\";\n\t\t\t\t} // for (all rows left)\n\t\t\t} // if numRows > 0...\n\t\t\t\t\n\t\t\t// Advance the _nextRange pointer\n\t\t\t$this->_nextRange += ($numRows != 0) ? $numRows : 1;\n\t\t\t\t\n\t\t\t$this->_Step = $tableName;\n\t\t\t$this->_Substep = $this->_nextRange . ' / ' . $this->_maxRange;\n\t\t} // if more work on the table\n\t\telse\n\t\t{\n\t\t\t// Tell the user we are done with the table\n\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"Done with \" . $this->_nextTable);\n\t\t\t\n\t\t\tif(count($this->_tables) == 0)\n\t\t\t{\n\t\t\t\t// We have finished dumping the database!\n\t\t\t\tJoomlapackLogger::WriteLog(_JP_LOG_INFO, \"Database has been successfully dumped to SQL file(s)\");\n\t\t\t\t$this->setState('postrun');\n\t\t\t\t$this->_Step = '';\n\t\t\t\t$this->_Substep = '';\n\t\t\t\t$this->_nextTable = '';\n\t\t\t\t$this->_nextRange = 0;\n\t\t\t} elseif(count($this->_tables) != 0) {\n\t\t\t\t// Switch tables\n\t\t\t\t$this->_nextTable = array_shift( $this->_tables );\n\t\t\t\t$this->_nextRange = 0;\n\t\t\t\t$this->_Step = $this->_nextTable;\n\t\t\t\t$this->_Substep = '';\n\t\t\t}\n\t\t}\n\n\t\t$this->_writeDump( $outCreate, $outData, $tableAbstract );\n\t\tif($this->getError()) return;\n\t\t$null = null;\n\t\t$this->_writeline($null);\n\t}", "title": "" }, { "docid": "567878152e32950fed903f3b4511201d", "score": "0.53425026", "text": "public function getDownSQL()\n {\n return array (\n 'ssdata' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `sessions`;\n\nALTER TABLE `user` DROP `userGUID`;\n\nALTER TABLE `view_asset_allocation` DROP PRIMARY KEY;\n\nALTER TABLE `view_asset_allocation` CHANGE `id` `id` INTEGER;\n\nALTER TABLE `view_asset_allocation` ADD ;\n\nALTER TABLE `view_employees` DROP PRIMARY KEY;\n\nALTER TABLE `view_employees` CHANGE `Name` `Name` VARCHAR(66);\n\nALTER TABLE `view_employees` ADD ;\n\nALTER TABLE `view_quote` DROP PRIMARY KEY;\n\nALTER TABLE `view_quote` CHANGE `site` `site` VARCHAR(80);\n\nALTER TABLE `view_quote` ADD ;\n\nALTER TABLE `view_roles` DROP PRIMARY KEY;\n\nALTER TABLE `view_roles` CHANGE `Name` `Name` VARCHAR(66);\n\nALTER TABLE `view_roles` ADD ;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "4fda2c3e64db5689822152c6f40d83bb", "score": "0.5292832", "text": "function Sql_buildSqlFile($out_file, $sql = '', $table = '') {\n\t$crlf=Lib_endOfLine();\n\n\t$out_handle = fopen($out_file, \"w\");\n\n\tfputs($out_handle,\"# Serveur: \" . $GLOBALS['serveur_mysql1'].\" BdD: \".$GLOBALS['db1'].\"$crlf\");\n\n\tfputs($out_handle,$crlf);\n\tfputs($out_handle,\"# --------------------------------------------------------$crlf\");\n\tfputs($out_handle,\"# DumpingData '\".$GLOBALS['prefix'].\"$table'$crlf\");\n\tfputs($out_handle,\"# --------------------------------------------------------$crlf\");\n\tfputs($out_handle,$crlf);\n\n\tfputs($out_handle,\"DELETE from \".$GLOBALS['prefix'].\"$table;$crlf\");\n\tfputs($out_handle,$crlf);\n\n\tif ($sql != \"\") {\n\t\t$sql = preg_replace('`;`',' ',$sql);\n\t} else {\n\t\t$sql = \"SELECT * FROM \".$GLOBALS['db1'].\".\".$GLOBALS['prefix'].$table;\t\n\t} \n\n\t$result = Sql_query($sql);\n\t$sql = \"\";\n\t\n\tif(!$result) {\n\t\techo $MSG[$lang]['ProblemeSql'];\n\t\techo $MSG['fr']['MessageBase']. mysql_errno().\" : \".mysql_error().\"<BR>\";\n\t\treturn;\n\t}\n\n\t$nb_lines = mysql_num_rows($result);\n\n\t//============================================================================\n\t// Si la table n'a pas de lignes, on continue avec la table suivante\n\t//============================================================================\n\tif ($nb_lines == 0)\n\t\treturn;\n\n\t//============================================================================\n\t// On construit la liste des champs pour eviter d'avoir des problemes d'INSERT\n\t//============================================================================\n\t$fields = \"(\";\n\t$list_fields = mysql_list_fields($GLOBALS['db1'], $GLOBALS['prefix'].$table);\n\t$columns = mysql_num_fields($list_fields);\n\tfor ($i = 0; $i < $columns; $i++)\n\t\t$fields .= (strcmp($fields,\"(\") == 0) ? mysql_field_name($list_fields, $i) : \",\".mysql_field_name($list_fields, $i);\n\t$fields .= \")\";\n\n\t$insert_table = \"INSERT INTO \".$GLOBALS['prefix'].\"$table $fields VALUES\";\n\t$insert_table = trim($insert_table);\n\n\t$i = 0;\n\twhile($i < $nb_lines) {\n\t\tfputs($out_handle,\"$insert_table $crlf\");\n\t\t$k = 0;\n\n\t\t//=============================================================\n\t\t// $lines_max represente le nombre de lignes maximum par INSERT\n\t\t// defini dans le conf.php\n\t\t//=============================================================\n\t\twhile($k < $GLOBALS['lines_max']){\n\t\t\t$row = mysql_fetch_row($result);\n\n\t\t\t$schema_insert = \"(\";\n\t\t\t@set_time_limit(60);\n\t\t\t$table_list = \"(\";\n\n\t\t\tfor($j=0; $j<mysql_num_fields($result);$j++)\n\t\t\t\t$table_list .= mysql_field_name($result,$j).\", \";\n\n\t\t\t$table_list = substr($table_list,0,-2);\n\t\t\t$table_list .= \")\";\n\n\t\t\tfor($j=0; $j<mysql_num_fields($result);$j++) {\n\t\t\t\tif(!isset($row[$j]))\n\t\t\t\t\t$schema_insert .= \" NULL,\";\n\n\t\t\t\telseif($row[$j] != \"\") {\n\t\t\t\t\t$dummy = \"\";\n\t\t\t\t\t// JPLt: Avant d'effectuer la boucle sur chaque ligne, on vérifie si les caractères à remplacer existent\n\t\t\t\t\tif (preg_match(\"/[\\\\\\'\\\"\\\\x00\\\\x0a\\\\x0d\\\\x08\\t\\\\x1a]/\", $row[$j])) {\n\t\t\t\t\t\t$srcstr = $row[$j];\n\t\t\t\t\t\tfor($xx=0; $xx < strlen($srcstr); $xx++) {\n\t\t\t\t\t\t\t$yy = strlen($dummy);\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\\\\") $dummy .= \"\\\\\\\\\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"'\") $dummy .= \"\\\\'\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\\"\") $dummy .= \"\\\\\\\"\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\x00\") $dummy .= \"\\\\0\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\x0a\") $dummy .= \"\\\\n\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\x0d\") $dummy .= \"\\\\r\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\x08\") $dummy .= \"\\\\b\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\t\") $dummy .= \"\\\\t\";\n\t\t\t\t\t\t\tif($srcstr[$xx] == \"\\x1a\") $dummy .= \"\\\\Z\";\n\t\t\t\t\t\t\tif(strlen($dummy) == $yy) $dummy .= $srcstr[$xx];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dummy = $row[$j];\n\t\t\t\t\t}\t\n\n\t\t\t\t\t$schema_insert .= \" '\".$dummy.\"',\";\n\t\t\t\t} else\n\t\t\t\t\t$schema_insert .= \" '',\";\n\t\t\t}\n\n\t\t\t$schema_insert = preg_replace(\"`,$`\", \"\", $schema_insert);\n\t\t\t$schema_insert .= \")\";\n\t\t\t$schema_insert = trim($schema_insert);\n\n\t\t\t//============================================================================\n\t\t\t// On ecrit dans le fichier temporaire\n\t\t\t//============================================================================\n\t\t\tif ($k == ($GLOBALS['lines_max']-1) || $i == ($nb_lines-1))\n\t\t\t\tfputs($out_handle,\"$schema_insert;$crlf\");\t\t\t\n\t\t\telse\n\t\t\t\tfputs($out_handle,\"$schema_insert,$crlf\");\t\t\t\n\n\t\t\t$k++;\n\t\t\t$i++;\n\t\t\tif ($i == $nb_lines) break;\n\t\t}\n\t}\n\n\tfclose($out_handle); \n}", "title": "" }, { "docid": "0188f63f7d68a889a858155184b378a1", "score": "0.52911687", "text": "protected abstract function get_detail_sql();", "title": "" }, { "docid": "f793ff7a5e78b867fcbcd9a477329373", "score": "0.52895707", "text": "private function prepare_sql_data() {\n\t\tglobal $wpdb;\n\n\t\tif ( $wpdb->use_mysqli ) {\n\t\t\t// phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info\n\t\t\t$mysql_server_type = mysqli_get_server_info( $wpdb->dbh );\n\t\t} else {\n\t\t\t// phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved\n\t\t\t$mysql_server_type = mysql_get_server_info( $wpdb->dbh );\n\t\t}\n\n\t\t$this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );\n\n\t\t$this->health_check_mysql_rec_version = '5.6';\n\n\t\tif ( stristr( $mysql_server_type, 'mariadb' ) ) {\n\t\t\t$this->is_mariadb = true;\n\t\t\t$this->health_check_mysql_rec_version = '10.0';\n\t\t}\n\n\t\t$this->mysql_min_version_check = version_compare( '5.5', $this->mysql_server_version, '<=' );\n\t\t$this->mysql_rec_version_check = version_compare( $this->health_check_mysql_rec_version, $this->mysql_server_version, '<=' );\n\t}", "title": "" }, { "docid": "16b4d9e1a5989f28a7a7aef599e1fb1c", "score": "0.5289178", "text": "abstract function getSQL();", "title": "" }, { "docid": "b980429115aae2b226327d38f07b0179", "score": "0.5278258", "text": "function mysql_data_to_php_data($mysql_data, $data_type) {\n $business_tables_metadata = Business_tables_metadata::get_singleton();\n\n if (is_null($mysql_data)) {\n return null;\n }\n\n if ($data_type === 'binary') {\n return $mysql_data;\n }\n\n $data_type_array = explode(':', $data_type, 2);\n\n $data_type_part1 = array_shift($data_type_array);\n switch ($data_type_part1) {\n case 'int':\n case 'pk':\n case 'fk':\n case 'pk_fk':\n $retour = (int) $mysql_data;\n break;\n\n case 'float':\n $retour = (float) $mysql_data;\n break;\n\n case 'string':\n case 'json':\n $retour = $mysql_data;\n break;\n\n case 'bool':\n if ($mysql_data === MYSQL_BOOL_TRUE_FROM_SERVER) {\n $retour = true;\n } elseif ($mysql_data === MYSQL_BOOL_FALSE_FROM_SERVER) {\n $retour = false;\n } else {\n trigger_error(\"Artefact error: Unknown MySQL boolean\", E_USER_ERROR);\n }\n break;\n\n case 'set':\n $retour = explode(',', $mysql_data);\n break;\n\n case 'date':\n $retour = new Mysql_date($mysql_data);\n break;\n\n case 'datetime':\n $retour = new Mysql_datetime($mysql_data);\n break;\n\n case 'interval':\n $retour = new Mysql_interval($mysql_data);\n break;\n\n case 'time':\n $retour = new Mysql_time($mysql_data);\n break;\n\n case 'timestamp':\n $retour = new Mysql_timestamp($mysql_data);\n break;\n\n case 'year':\n $retour = new Mysql_year($mysql_data);\n break;\n\n case 'enum_model_id':\n if (count($data_type_array) === 0) {\n trigger_error(\"Artefact error: Error in data type '\" . $data_type . \"'\", E_USER_ERROR);\n }\n\n $data_type_part2 = array_shift($data_type_array);\n $table_metadata = $business_tables_metadata->tables[$data_type_part2];\n $model_full_name = $table_metadata['business_full_name'];\n $retour = $model_full_name::find($mysql_data);\n break;\n\n default:\n trigger_error(\"Artefact error: Unknown data type '\" . $data_type . \"'\", E_USER_ERROR);\n break;\n }\n\n return $retour;\n }", "title": "" }, { "docid": "c8fc23940bc8dcee453505a260e8708f", "score": "0.52750355", "text": "public function apphp_db_install($sql_file, $plugin_prefix)\n {\n if (file_exists($sql_file)) {\n $fd = fopen($sql_file, 'rb');\n $restore_query = fread($fd, filesize($sql_file));\n fclose($fd);\n } else {\n $db_error = 'SQL file does not exist: '.$sql_file;\n\n return false;\n }\n $sql_array = [];\n $sql_length = strlen($restore_query);\n $pos = strpos($restore_query, ';');\n for ($i = $pos; $i < $sql_length; ++$i) {\n if ($restore_query[0] == '#') {\n $restore_query = ltrim(substr($restore_query, strpos($restore_query, \"\\n\")));\n $sql_length = strlen($restore_query);\n $i = strpos($restore_query, ';') - 1;\n continue;\n }\n if ($restore_query[($i + 1)] == \"\\n\") {\n for ($j = ($i + 2); $j < $sql_length; ++$j) {\n if (trim($restore_query[$j]) != '') {\n $next = substr($restore_query, $j, 6);\n if ($next[0] == '#') {\n // /*find out where the break position is so we can remove this line (#comment line)*/\n for ($k = $j; $k < $sql_length; ++$k) {\n if ($restore_query[$k] == \"\\n\") {\n break;\n }\n }\n $query = substr($restore_query, 0, $i + 1);\n $restore_query = substr($restore_query, $k);\n // /*join the query before the comment appeared, with the rest of the dump*/\n $restore_query = $query.$restore_query;\n $sql_length = strlen($restore_query);\n $i = strpos($restore_query, ';') - 1;\n continue 2;\n }\n break;\n }\n }\n if ($next == '') { // get the last insert query\n $next = 'insert';\n }\n if ((preg_match('/create/i', $next)) || (preg_match('/insert/i', $next)) || (preg_match('/drop t/i', $next))) {\n $next = '';\n $sql_array[] = substr($restore_query, 0, $i);\n $restore_query = ltrim(substr($restore_query, $i + 1));\n $sql_length = strlen($restore_query);\n $i = strpos($restore_query, ';') - 1;\n }\n }\n }\n for ($i = 0; $i < sizeof($sql_array); ++$i) {\n $next_new = explode('`', $sql_array[$i]);\n $get_query_type = substr($sql_array[$i], 0, 6);\n $str_sql_string = '';\n if (preg_match('/create/i', $get_query_type) || (preg_match('/insert/i', $get_query_type))) {\n $sql_array[$i] = str_replace($next_new[1], $plugin_prefix.$next_new[1], $sql_array[$i]); //add the database prefi to the query\n }\n $this->apphp_db_query($sql_array[$i]);\n }\n\n return true;\n }", "title": "" }, { "docid": "5eb67f4ef09708a42005a1ecc95b159e", "score": "0.5268688", "text": "public abstract function toSql();", "title": "" }, { "docid": "5f41f8e4d5ddb2ea6e2d0dfc7120f33e", "score": "0.5232627", "text": "function load_mysql_json_export($data) {\n\n // The format changes for the php JSON EXPORT plugins...\n\n // This version and earlier - the whole thing is not valid JSON\n // Export to JSON plugin for PHPMyAdmin @version 4.6.5.2\n\n // This version and later it is valid JSON but quite different\n // {\"type\":\"header\",\"version\":\"4.7.2\",\"comment\":\"Export to JSON plugin for PHPMyAdmin\"},\n\n $pos = 0;\n $tables = array();\n $retval = array();\n $errors = array();\n\n\n // echo(\"<pre>\\n\");\n try {\n $newformat = json_decode($data, true);\n } catch(Exception $e) {\n $newformat = null;\n }\n if ( $newformat !== null ) {\n foreach($newformat as $table) {\n if ( !isset($table['type']) || $table['type'] != \"table\" ) continue;\n $name = strtolower($table['name']);\n $retval[$name] = $table['data'];\n // echo(\"Name $name\\n\"); var_dump($table['data']); die('new format');\n }\n } else {\n $things = explode('//',$data);\n // echo(\"<pre>\\n\"); print_r($things);\n foreach($things as $thing) {\n $startpos = strpos($thing,'[{');\n $endpos = strpos($thing,'}]');\n if ( $startpos === false || $endpos === false ) {\n continue;\n }\n $thing = trim($thing);\n $pieces = explode(\"\\n\",$thing);\n // echo(\"==========\\n\"); print_r($pieces);\n if ( count($pieces) < 1 ) continue;\n $name = trim($pieces[0]);\n $chunks = explode('.',$name);\n if ( count($chunks) > 1 ) {\n $name = $chunks[count($chunks)-1];\n }\n $name = strtolower($name);\n // echo(\"name=$name\\n\");\n\n $json_str = substr($thing, $startpos-1, 2+$endpos-$startpos);\n // echo(\"json_str=$json_str\\n\");\n $json = json_decode($json_str, true);\n if ( $json === NULL ) {\n $errors[] = \"Unable to parse the $name JSON \".json_last_error();\n continue;\n }\n\n // echo(\"Name $name\\n\"); var_dump($json);\n $retval[$name] = $json;\n }\n }\n\n // Actually prepare the data for return\n foreach($retval as $name => $json ) {\n if ( count($json) < 1 ) continue;\n\n $key = strtolower($name).'_id';\n if ( !isset($json[0][$key]) ) continue;\n\n $table = array();\n foreach($json as $row) {\n if ( isset($row[$key]) && is_numeric($row[$key]) ) {\n $table[$row[$key]+0] = $row;\n }\n }\n $retval[$name.\"_table\"] = $table;\n }\n\n // echo(\"<pre>\\n\"); echo(\"=== retval ===\\n\"); print_r($retval); echo(\"</pre>\\n\"); die('retval');\n return $retval;\n}", "title": "" }, { "docid": "411619aa9ad7b3d1aaa3e396e665cef2", "score": "0.5232394", "text": "public function getDownSQL()\n {\n return array (\n 'zed' => '\nDROP TABLE IF EXISTS \"spy_product_image_set\" CASCADE;\n\nDROP SEQUENCE \"spy_product_image_set_pk_seq\";\n\nDROP TABLE IF EXISTS \"spy_product_image\" CASCADE;\n\nDROP SEQUENCE \"spy_product_image_pk_seq\";\n\nDROP TABLE IF EXISTS \"spy_product_image_set_to_product_image\" CASCADE;\n\nDROP SEQUENCE \"spy_product_image_set_to_product_image_pk_seq\";\n',\n);\n }", "title": "" }, { "docid": "ea33e1de572ca829c6c12df42b0e2e7b", "score": "0.5229662", "text": "function _get_sql_file_header() {\n\n\t\t// todo: fill in all the placeholders\n\n\t\t$module_version = self::$version;\n\t\t$ss_version = $this->CMSVersion();\n\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t$site_name = $this->SiteConfig()->Title;\n\t\t$mysql_version = $this->queryValue('SELECT @@VERSION');\n\n\t\treturn \"-- Backup/Restore (Silverstripe) MySQL Dump\n-- Backup/Restore Version: $module_version\n-- https://github.com/bcairns/silverstripe-backuprestore\n-- SilverStripe Version: $ss_version\n-- http://silverstripe.org/\n--\n-- Host: $host\n-- Site Name: $site_name\n-- Generation Time: \" . date('r') . \"\n-- MySQL Version: $mysql_version\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;\n\nSET SQL_MODE=\\\"NO_AUTO_VALUE_ON_ZERO\\\";\nSET NAMES utf8;\n\n\";\n\t}", "title": "" }, { "docid": "5a769e5c23ad1bdc24b03d9a4b308963", "score": "0.5224244", "text": "function createExportSqlStatement()\n {\n $sql = '';\n if ($this->numFields === 0) {\n $sql = 'SELECT * FROM ' . $this->tableName;\n } else {\n $sql = 'SELECT ';\n $array = $this->fields;\n for ($i = 0; $i < $this->numFields; $i++) {\n if ($i == $this->numFields - 1) {\n $sql .= $array[$i] . ' ';\n break;\n }\n $sql .= $array[$i] . ', ';\n }\n $sql .= 'FROM ' . $this->tableName;\n }\n // NOTE: sql statements were changed to make them more user friendly\n if (strcmp($this->tableName, \"puzzles\") === 0) {\n $sql .= ' ORDER BY puzzle_name';\n } else if (strcmp($this->tableName, \"characters\") === 0) {\n $sql = 'SELECT characters.character_value, words.word, characters.character_index FROM `characters` JOIN words ON characters.word_id=words.word_id ORDER BY words.word_id, characters.character_index';\n $this->fields = array(\"character_value\", \"word\", \"character_index\");\n } else if (strcmp($this->tableName, \"words\") === 0) {\n $sql = 'SELECT * FROM words ORDER BY word_id';\n $this->fields = array(\"No\", \"Words\", \"English_word\", \"image\");\n } else if (strcmp($this->tableName, \"puzzle_words\") === 0) {\n $sql = 'SELECT puzzles.puzzle_name, p.word, p.clue, p.position_in_name FROM puzzle_words p JOIN puzzles ON p.puzzle_id=puzzles.puzzle_id ORDER BY puzzles.puzzle_name, p.position_in_name';\n $this->fields = array(\"puzzle_name\", \"word\", \"clue\", \"position_in_name\");\n }\n $this->exportSql = $sql;\n }", "title": "" }, { "docid": "937f0a598ef7bd6d2a69de630ac5f820", "score": "0.52213454", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\nBEGIN;\n\nCREATE TABLE \"player\"\n(\n \"id\" serial NOT NULL,\n \"name\" VARCHAR(255) NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"part\"\n(\n \"id\" serial NOT NULL,\n \"name\" VARCHAR(255) NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"proprium\"\n(\n \"id\" serial NOT NULL,\n \"name\" VARCHAR(255) NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"item\"\n(\n \"id\" serial NOT NULL,\n \"name\" VARCHAR(255) NOT NULL,\n \"proprium_id\" INTEGER NOT NULL,\n \"part_id\" INTEGER NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"player_item\"\n(\n \"id\" serial NOT NULL,\n \"player_id\" INTEGER NOT NULL,\n \"item_id\" INTEGER NOT NULL,\n \"created_at\" TIMESTAMP NOT NULL,\n \"updated_at\" TIMESTAMP NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"player_deck\"\n(\n \"id\" serial NOT NULL,\n \"player_id\" INTEGER NOT NULL,\n \"player_item1_id\" INTEGER NOT NULL,\n \"player_item2_id\" INTEGER NOT NULL,\n \"player_item3_id\" INTEGER NOT NULL,\n \"player_item4_id\" INTEGER NOT NULL,\n \"player_item5_id\" INTEGER NOT NULL,\n \"created_at\" TIMESTAMP NOT NULL,\n \"updated_at\" TIMESTAMP NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nCREATE TABLE \"player_battle_log\"\n(\n \"id\" serial NOT NULL,\n \"player_id\" INTEGER NOT NULL,\n \"enemy_player_id\" INTEGER NOT NULL,\n \"win\" BOOLEAN NOT NULL,\n \"created_at\" TIMESTAMP NOT NULL,\n \"updated_at\" TIMESTAMP NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nALTER TABLE \"item\" ADD CONSTRAINT \"item_fk_9243eb\"\n FOREIGN KEY (\"part_id\")\n REFERENCES \"part\" (\"id\");\n\nALTER TABLE \"item\" ADD CONSTRAINT \"item_fk_f46ced\"\n FOREIGN KEY (\"proprium_id\")\n REFERENCES \"proprium\" (\"id\");\n\nALTER TABLE \"player_item\" ADD CONSTRAINT \"player_item_fk_97a1b7\"\n FOREIGN KEY (\"player_id\")\n REFERENCES \"player\" (\"id\");\n\nALTER TABLE \"player_item\" ADD CONSTRAINT \"player_item_fk_5cf635\"\n FOREIGN KEY (\"item_id\")\n REFERENCES \"item\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_97a1b7\"\n FOREIGN KEY (\"player_id\")\n REFERENCES \"player\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_player_item1\"\n FOREIGN KEY (\"player_item1_id\")\n REFERENCES \"player_item\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_player_item2\"\n FOREIGN KEY (\"player_item2_id\")\n REFERENCES \"player_item\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_player_item3\"\n FOREIGN KEY (\"player_item3_id\")\n REFERENCES \"player_item\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_player_item4\"\n FOREIGN KEY (\"player_item4_id\")\n REFERENCES \"player_item\" (\"id\");\n\nALTER TABLE \"player_deck\" ADD CONSTRAINT \"player_deck_fk_player_item5\"\n FOREIGN KEY (\"player_item5_id\")\n REFERENCES \"player_item\" (\"id\");\n\nALTER TABLE \"player_battle_log\" ADD CONSTRAINT \"player_battle_log_fk_player\"\n FOREIGN KEY (\"player_id\")\n REFERENCES \"player\" (\"id\");\n\nALTER TABLE \"player_battle_log\" ADD CONSTRAINT \"player_battle_log_fk_enemy_player\"\n FOREIGN KEY (\"enemy_player_id\")\n REFERENCES \"player\" (\"id\");\n\nCOMMIT;\n',\n);\n }", "title": "" }, { "docid": "2bd3c48bf3e16b512583e2df6e022cee", "score": "0.5207375", "text": "public function populateTable (){\n\t// $this->pdo->exec(\"INSERT INTO `sources`(rss) VALUES('')\");\n\t\t// $this->pdo->exec(\"INSERT INTO `sources`(rss) VALUES('')\");\n\t\t// $this->pdo->exec(\"INSERT INTO `sources`(rss) VALUES('')\");\n\t\t//$this->pdo->exec(\"INSERT INTO `sources`(rss) VALUES('')\");\n\t\t// $this->pdo->exec(\"INSERT INTO `sources`(rss) VALUES('')\");\n \t}", "title": "" }, { "docid": "4d6b1a980c89d578df936b8074d7935c", "score": "0.52042264", "text": "public function getUpSQL()\n {\n return array (\n 'rokfor' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\nSET sql_mode = \\'\\';\n\nALTER TABLE `_batch`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_books`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_contributions`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_data`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_fieldpostprocessor`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nDROP INDEX `_formats_u_9d86c7` ON `_formats`;\n\nALTER TABLE `_formats`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_issues`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_log`\n\n CHANGE `__user__` `__user__` INTEGER(4) DEFAULT NULL;\n\nALTER TABLE `_pdf`\n\n CHANGE `__user__` `__user__` INTEGER(4);\n\nALTER TABLE `_plugins`\n\n CHANGE `__user__` `__user__` INTEGER(4);\n\nALTER TABLE `_rights`\n\n CHANGE `__user__` `__user__` INTEGER(4);\n\nDROP INDEX `id` ON `_templatenames`;\n\nALTER TABLE `_templatenames`\n\n CHANGE `__user__` `__user__` INTEGER(4);\n\nALTER TABLE `_templates`\n\n CHANGE `__user__` `__user__` INTEGER(4);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "19924f14f950ac6fec3730efc2043b53", "score": "0.5194405", "text": "function exibirDataMysql($data)\n{\n\tlist ($dia, $mes, $ano) = explode ('/', $data);\n\t$data_mysql = $ano.'-'.$mes.'-'.$dia;\n\treturn $data_mysql;\n}", "title": "" }, { "docid": "e042494f92f36f45c1c511079be03739", "score": "0.51924556", "text": "public static function mysql(){return \n'INSERT INTO '.\\SYSTEM\\SQL\\system_page::NAME_MYS.' (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (?, ?, ?, ?, ?, ?, ?);';\n }", "title": "" }, { "docid": "324b051ac741c8bf58dab3343189e4fa", "score": "0.5189094", "text": "public function glitchDump(): iterable\n {\n yield 'text' => $this->_sql;\n yield 'values' => $this->_bindings;\n\n if ($this->_isExecuted) {\n yield 'property:%current' => $this->getCurrent();\n }\n }", "title": "" }, { "docid": "c84bf0ed098acbdd6e416d8d216097db", "score": "0.51874214", "text": "function migrar_ddl()\r\n\t{\r\n\t\t$this->manejador_interface->mensaje('Migrar DDL postgresql a la sintaxis de otros motores');\r\n\t\t$directorio = toba_modelo_nucleo::get_dir_ddl();\r\n\t\t$archivos = toba_manejador_archivos::get_archivos_directorio( $directorio, '|.*\\.sql|' );\r\n\t\tsort($archivos);\r\n\t\t//Migracion a MYSQL\r\n\t\t$dir = toba_modelo_nucleo::get_dir_ddl() . '/mysql/';\r\n\t\tforeach( $archivos as $archivo ) {\r\n\t\t\t$sql = $this->get_ddl_mysql($archivo);\r\n\t\t\ttoba_manejador_archivos::crear_archivo_con_datos($dir . basename($archivo), $sql);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cce5f6a2e400e15b5c76d5584df43757", "score": "0.5182382", "text": "function dbInstall($data)\n {\n /*\n zipatodevices -\n zipatocommands -\n */\n $data = <<<EOD\n zipatodevices: ID int(10) unsigned NOT NULL auto_increment\n zipatodevices: TITLE varchar(100) NOT NULL DEFAULT ''\n zipatodevices: UUID varchar(100) NOT NULL DEFAULT ''\n zipatodevices: MAINSPOWER varchar(100) NOT NULL DEFAULT '' \n zipatodevices: BATTERYLEVEL varchar(100) NOT NULL DEFAULT ''\n zipatodevices: ONLINESTATE varchar(100) NOT NULL DEFAULT ''\n\n zipatoendpoints: ID int(10) unsigned NOT NULL auto_increment\n zipatoendpoints: TITLE varchar(100) NOT NULL DEFAULT ''\n zipatoendpoints: UUID varchar(100) NOT NULL DEFAULT ''\n zipatoendpoints: DEVICE_ID int(10) NOT NULL DEFAULT '0' \n zipatoendpoints: ENDPOINT_TYPE varchar(100) NOT NULL DEFAULT ''\n\n zipatocommands: ID int(10) unsigned NOT NULL auto_increment\n zipatocommands: TITLE varchar(100) NOT NULL DEFAULT ''\n zipatocommands: UUID varchar(100) NOT NULL DEFAULT '' \n zipatocommands: VALUE varchar(255) NOT NULL DEFAULT ''\n zipatocommands: ENDPOINT_ID int(10) NOT NULL DEFAULT '0' \n zipatocommands: DEVICE_ID int(10) NOT NULL DEFAULT '0'\n zipatocommands: LINKED_OBJECT varchar(100) NOT NULL DEFAULT ''\n zipatocommands: LINKED_PROPERTY varchar(100) NOT NULL DEFAULT ''\n zipatocommands: UPDATED datetime\nEOD;\n parent::dbInstall($data);\n }", "title": "" }, { "docid": "a7c08fead4e246cf951dd57e634fa045", "score": "0.51755035", "text": "public function getUpSQL()\n {\n return array (\n 'zed' => '\nCREATE SEQUENCE \"spy_product_image_set_pk_seq\";\n\nCREATE TABLE \"spy_product_image_set\"\n(\n \"id_product_image_set\" INTEGER NOT NULL,\n \"name\" VARCHAR(255),\n \"fk_locale\" INTEGER NOT NULL,\n \"fk_product\" INTEGER,\n \"fk_product_abstract\" INTEGER,\n \"created_at\" TIMESTAMP,\n \"updated_at\" TIMESTAMP,\n PRIMARY KEY (\"id_product_image_set\"),\n CONSTRAINT \"fk_locale-fk_product-fk_product_abstract\" UNIQUE (\"fk_locale\",\"fk_product\",\"fk_product_abstract\")\n);\n\nCREATE SEQUENCE \"spy_product_image_pk_seq\";\n\nCREATE TABLE \"spy_product_image\"\n(\n \"id_product_image\" INTEGER NOT NULL,\n \"external_url_small\" VARCHAR(1024),\n \"external_url_large\" VARCHAR(1024),\n \"created_at\" TIMESTAMP,\n \"updated_at\" TIMESTAMP,\n PRIMARY KEY (\"id_product_image\")\n);\n\nCREATE SEQUENCE \"spy_product_image_set_to_product_image_pk_seq\";\n\nCREATE TABLE \"spy_product_image_set_to_product_image\"\n(\n \"id_product_image_set_to_product_image\" INTEGER NOT NULL,\n \"fk_product_image_set\" INTEGER NOT NULL,\n \"fk_product_image\" INTEGER NOT NULL,\n \"sort\" INTEGER NOT NULL,\n \"created_at\" TIMESTAMP,\n \"updated_at\" TIMESTAMP,\n PRIMARY KEY (\"id_product_image_set_to_product_image\"),\n CONSTRAINT \"fk_product_image_set-fk_product_image\" UNIQUE (\"fk_product_image_set\",\"fk_product_image\")\n);\n\nALTER TABLE \"spy_product_image_set\" ADD CONSTRAINT \"spy_product_image_set-fk_locale\"\n FOREIGN KEY (\"fk_locale\")\n REFERENCES \"spy_locale\" (\"id_locale\");\n\nALTER TABLE \"spy_product_image_set\" ADD CONSTRAINT \"spy_product_image_set-fk_product\"\n FOREIGN KEY (\"fk_product\")\n REFERENCES \"spy_product\" (\"id_product\");\n\nALTER TABLE \"spy_product_image_set\" ADD CONSTRAINT \"spy_product_image_set-fk_product_abstract\"\n FOREIGN KEY (\"fk_product_abstract\")\n REFERENCES \"spy_product_abstract\" (\"id_product_abstract\");\n\nALTER TABLE \"spy_product_image_set_to_product_image\" ADD CONSTRAINT \"spy_product_image_set_to_product_image-fk_product_image_set\"\n FOREIGN KEY (\"fk_product_image_set\")\n REFERENCES \"spy_product_image_set\" (\"id_product_image_set\");\n\nALTER TABLE \"spy_product_image_set_to_product_image\" ADD CONSTRAINT \"spy_product_image_set_to_product_image-fk_product_image\"\n FOREIGN KEY (\"fk_product_image\")\n REFERENCES \"spy_product_image\" (\"id_product_image\");\n',\n);\n }", "title": "" }, { "docid": "7bef604ae34960fa172f7b63ea0e27fd", "score": "0.51693606", "text": "public function getUpSQL()\n\t{\n\t\treturn array (\n 'rapila' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\n\nALTER TABLE `journal_comments` ADD\n(\n\t`updated_at` DATETIME,\n\t`created_by` INTEGER,\n\t`updated_by` INTEGER\n);\n\nCREATE INDEX `journal_comments_FI_2` ON `journal_comments` (`created_by`);\n\nCREATE INDEX `journal_comments_FI_3` ON `journal_comments` (`updated_by`);\n\nALTER TABLE `journal_entries` ADD\n(\n\t`updated_by` INTEGER\n);\n\nCREATE INDEX `journal_entries_FI_3` ON `journal_entries` (`updated_by`);\n\nALTER TABLE `journal_entry_images` ADD\n(\n\t`created_at` DATETIME,\n\t`updated_at` DATETIME,\n\t`created_by` INTEGER,\n\t`updated_by` INTEGER\n);\n\nCREATE INDEX `journal_entry_images_FI_3` ON `journal_entry_images` (`created_by`);\n\nCREATE INDEX `journal_entry_images_FI_4` ON `journal_entry_images` (`updated_by`);\n\nALTER TABLE `journals` ADD\n(\n\t`created_at` DATETIME,\n\t`updated_at` DATETIME,\n\t`created_by` INTEGER,\n\t`updated_by` INTEGER\n);\n\nCREATE INDEX `journals_FI_1` ON `journals` (`created_by`);\n\nCREATE INDEX `journals_FI_2` ON `journals` (`updated_by`);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n\t}", "title": "" }, { "docid": "8c2f6af4255379f64cf8aeb7d9895ab4", "score": "0.5166591", "text": "function data_description($sql)\n {\n $data = flayer::fdo()->read_one_sql($sql, false, \\PDO::FETCH_BOTH);\n return $data[0];\n }", "title": "" }, { "docid": "85cdcab7654b3ca1087ba8debc6bb4a5", "score": "0.5165443", "text": "function Insert_Generator($data,$table){\n if (key_exists('id',$data)){\n unset($data['id']);\n }\n array_pop($data);\n end($data);\n $lastkey = key($data);\n $sql=\"INSERT INTO $table (\";\n foreach ($data as $key => $value) {\n if($key!=$lastkey) {\n $sql .= $key . ',';\n }else{\n $sql .= $key . ') VALUES(';\n foreach ($data as $k => $val) {\n if($k!=$lastkey) {\n $sql .= '\\'' . $val . '\\',';\n }else{\n $sql .= '\\'' . $val . '\\')';\n }\n }\n }\n }\n return $sql;\n}", "title": "" }, { "docid": "afc639ec2ffec8dbd215353ee18696bf", "score": "0.5164725", "text": "public function run()\n {\n $sql = base_path('warna.sql');\n DB::unprepared(file_get_contents($sql));\n }", "title": "" }, { "docid": "0f15fa672dbe4d5cb9106a65bedc50e3", "score": "0.5162676", "text": "function dbInstall($data='') {\n/*\ndev_hvac_devices - \n*/\n $data = <<<EOD\n dev_hvac_devices: ID int(10) unsigned NOT NULL auto_increment\n dev_hvac_devices: TYPE varchar(10) NOT NULL DEFAULT ''\n dev_hvac_devices: TITLE varchar(100) NOT NULL DEFAULT ''\n dev_hvac_devices: DEVTYPE varchar(10) NOT NULL DEFAULT ''\n dev_hvac_devices: IP varchar(20) NOT NULL DEFAULT ''\n dev_hvac_devices: MAC varchar(20) NOT NULL DEFAULT ''\n dev_hvac_devices: CHTIME varchar(10) NOT NULL DEFAULT ''\n dev_hvac_devices: KEYS varchar(128) NOT NULL DEFAULT ''\n dev_hvac_devices: UPDATED datetime\n dev_hvac_commands: ID int(10) unsigned NOT NULL auto_increment\n dev_hvac_commands: TITLE varchar(100) NOT NULL DEFAULT ''\n dev_hvac_commands: VALUE TEXT NOT NULL DEFAULT ''\n dev_hvac_commands: DEVICE_ID int(10) NOT NULL DEFAULT '0'\n dev_hvac_commands: LINKED_OBJECT varchar(100) NOT NULL DEFAULT ''\n dev_hvac_commands: LINKED_PROPERTY varchar(100) NOT NULL DEFAULT ''\n dev_hvac_commands: LINKED_METHOD varchar(100) NOT NULL DEFAULT ''\nEOD;\n parent::dbInstall($data);\n }", "title": "" }, { "docid": "6bbf47a2344f66b8357c1fd4570d95db", "score": "0.5160701", "text": "function generate( $xmlfile )\n\t{\n\t\t$doc = simplexml_load_file( $xmlfile );\n\n\t\t$schema = '';\n\n\t\tforeach( $doc->database as $db ) {\n\t\t\t$schema .= \"--\\n\";\n\t\t\t$schema .= \"-- Database: \" . $db['name'] . \"\\n\";\n\t\t\t$schema .= \"--\\n\";\n\t\t\t$schema .= $this->gen_database( $db );\n\t\t\t$schema .= \"-- db \" . $db['name'] . \"\\n\";\n\t\t\tforeach( $db->user as $user ) {\n\t\t\t\tswitch( $this->dbtype ) {\n\t\t\t\tcase \"mysql\":\n\t\t\t\t\t$schema .= \"GRANT ALL ON \" . $db['name'] . \".* TO \" . $user['name'] . \"@localhost IDENTIFIED BY '\" . $user['passwd'] . \"';\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} \n\t\t\t$schema .= \"\\n\";\n\t\t}\n\n\t\t$schema .= \"--\\n\";\n\t\t$schema .= \"-- Tables:\\n\";\n\t\t$schema .= \"--\\n\";\n\t\tforeach( $doc->table as $table ) {\n\t\t\t$s = $this->gen_table( $table );\n\t\t\t$schema .= \"$s\\n\\n\"; \n\t\t} \n\n\t\t// add column\n\t\tforeach( $doc->add_column as $add ) {\n\t\t\t$s = $this->gen_add_column( $add );\n\t\t\t$schema .= \"$s;\\n\";\n\t\t}\n\n\t\t// rename \n\t\tforeach( $doc->rename as $ren ) {\n\t\t\t$s = $this->gen_rename( $ren );\n\t\t\t$schema .= \"$s;\\n\";\n\t\t}\n\n\t\t// drop\n\t\tforeach( $doc->drop as $drop ) {\n\t\t\t$s = $this->gen_drop( $drop );\n\t\t\t$schema .= \"$s;\\n\";\n\t\t}\n\t\t\n\t\t// execute sql\n\t\tforeach( $doc->execute as $exec ) {\n\t\t\tif( isset($exec['if-type'])) {\n\t\t\t\tif( $this->dbtype == $exec['if-type']) {\n\t\t\t\t\t$s = $exec['query'];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$s = $exec['query'];\n\t\t\t}\n\t\t\t$schema .= \"$s;\\n\"; \n\t\t}\n\n\t\t// add records\n\t\tforeach( $doc->record as $rec ) {\n\t\t\t$s = $this->gen_record( $rec );\n\t\t\t$schema .= \"$s;\\n\"; \n\t\t}\n\n\t\treturn $schema;\n\t}", "title": "" }, { "docid": "90f411a6dcf5268ab23efba223b3abd5", "score": "0.5155067", "text": "function mongodb_statistics_sql_migration_pushToSQL($row){\n db_merge('mongodb_node_counter')\n ->key(array('nid' => $row['nid']))\n ->fields(array(\n 'daycount' => $row['daycount'],\n 'totalcount' => $row['totalcount'],\n 'timestamp' => $row['timestamp'],\n 'daycountgen' => $row['daycountgen'],\n 'totalcountgen' => $row['totalcountgen'],\n 'timestampgen' => $row['timestampgen'],\n ))\n ->execute();\n \n}", "title": "" }, { "docid": "35d09e179f81fcf81405af0a3c91d7fe", "score": "0.51475435", "text": "public function run()\n {\n DataBase::unprepared(file_get_contents(database_path('seeds/sql/postal_codes.sql')));\n }", "title": "" }, { "docid": "0cf2f7011056815e12529fc26d861d32", "score": "0.5140707", "text": "public function getDownSQL()\n {\n return array (\n 'default' => '\nBEGIN;\n\nDROP TABLE IF EXISTS \"player\" CASCADE;\n\nDROP TABLE IF EXISTS \"part\" CASCADE;\n\nDROP TABLE IF EXISTS \"proprium\" CASCADE;\n\nDROP TABLE IF EXISTS \"item\" CASCADE;\n\nDROP TABLE IF EXISTS \"player_item\" CASCADE;\n\nDROP TABLE IF EXISTS \"player_deck\" CASCADE;\n\nDROP TABLE IF EXISTS \"player_battle_log\" CASCADE;\n\nCOMMIT;\n',\n);\n }", "title": "" }, { "docid": "0e8a6e760fee14b90c5b809c0f6118da", "score": "0.5124397", "text": "private function _buildStructure()\n {\n $this->_query('DROP INDEX tag_id_index');\n $this->_query('DROP INDEX tag_name_index');\n $this->_query('DROP INDEX cache_id_expire_index');\n $this->_query('DROP TABLE version');\n $this->_query('DROP TABLE cache');\n $this->_query('DROP TABLE tag');\n $this->_query('CREATE TABLE version (num INTEGER PRIMARY KEY)');\n $this->_query('CREATE TABLE cache (id TEXT PRIMARY KEY, content BLOB, lastModified INTEGER, expire INTEGER)');\n $this->_query('CREATE TABLE tag (name TEXT, id TEXT)');\n $this->_query('CREATE INDEX tag_id_index ON tag(id)');\n $this->_query('CREATE INDEX tag_name_index ON tag(name)');\n $this->_query('CREATE INDEX cache_id_expire_index ON cache(id, expire)');\n $this->_query('INSERT INTO version (num) VALUES (1)');\n }", "title": "" }, { "docid": "ea8efc246ca0612e18a1fe8ea561ddfb", "score": "0.5120539", "text": "function formataDataMySql($pData) {\r\n\tif (!empty($pData)) {\r\n\t\treturn substr($pData, 6, 4) . '-' . substr($pData, 3, 2) . '-' . substr($pData, 0, 2);\r\n\t} else {\r\n\t\treturn NULL;\r\n\t}\r\n}", "title": "" }, { "docid": "4b342faf16a17182267c364009dc90bf", "score": "0.5115174", "text": "public function run()\n {\n //\n $data = file_get_contents(__DIR__.'/propinsi.sql');\n $sql = explode(';', $data);\n\n for ($i=0; $i < count($data); $i++) { \n \tDB::unprepared($sql[$i]);\n \n }\n \n }", "title": "" }, { "docid": "50261491613ee8f9b2c80c38405ba7a3", "score": "0.511381", "text": "function create_backups() {\n\n\t\t$drop_products = \"DROP TABLE IF EXISTS old_products\";\n\n\t\t$this->DatabaseTransformer->query($drop_products);\n\n\n\n\t\t$products = 'CREATE TABLE IF NOT EXISTS old_products SELECT * FROM products';\n\n\t\t$this->DatabaseTransformer->query($products);\n\n\t\t\n\n\t\t// pro subproducts\n\n\t\t$drop_subproducts = \"DROP TABLE IF EXISTS old_subproducts\";\n\n\t\t$this->DatabaseTransformer->query($drop_subproducts);\n\n\t\t\n\n\t\t$subproducts = 'CREATE TABLE IF NOT EXISTS old_subproducts SELECT * FROM subproducts';\n\n\t\t$this->DatabaseTransformer->query($subproducts);\n\n\t\t\n\n\t\t// pro attributes\n\n\t\t$drop_attributes = \"DROP TABLE IF EXISTS old_attributes\";\n\n\t\t$this->DatabaseTransformer->query($drop_attributes);\n\n\t\t\n\n\t\t$attributes = 'CREATE TABLE IF NOT EXISTS old_attributes SELECT * FROM attributes';\n\n\t\t$this->DatabaseTransformer->query($attributes);\n\n\t\t\n\n\t\tdie('hotovo');\n\n\t}", "title": "" }, { "docid": "e6dfd54941eed606ed7df8a21b346abb", "score": "0.5111119", "text": "abstract public function getSql();", "title": "" }, { "docid": "affc9e53437bc6462c5f75cf16e2eba6", "score": "0.5105906", "text": "function backupTable_tourplan($data, $tablename){\n $output = '';\n \n foreach($data as $key => $value){\n $output = $output . \"INSERT INTO getservices (code, name) VALUES ('$key', '$value');\\n\";\n }\n file_put_contents(\"./backups/\" . $tablename . \".txt\", $output);\n\n}", "title": "" }, { "docid": "3551af07f86fef2a7ddd4b869aa57a67", "score": "0.51034594", "text": "function step_17()\n\t{\n\t\tif( !ipsRegistry::DB()->checkForTable('pfields_content') )\n\t\t{\n\t\t\t$SQL[] = \"CREATE TABLE \".ipsRegistry::dbFunctions()->getPrefix().\"pfields_content ( member_id mediumint(8) NOT NULL default 0, PRIMARY KEY (member_id) );\";\n\t\t}\n\n\t\tif( !ipsRegistry::DB()->checkForTable('pfields_data') )\n\t\t{\n\t\t\t$SQL[] = \"CREATE TABLE \".ipsRegistry::dbFunctions()->getPrefix().\"pfields_data (\n\t\t\t\t\t\t pf_id smallint(5) NOT NULL auto_increment,\n\t\t\t\t\t\t pf_title varchar(250) NOT NULL default '',\n\t\t\t\t\t\t pf_desc varchar(250) NOT NULL default '',\n\t\t\t\t\t\t pf_content text,\n\t\t\t\t\t\t pf_type varchar(250) NOT NULL default '',\n\t\t\t\t\t\t pf_not_null tinyint(1) NOT NULL default 0,\n\t\t\t\t\t\t pf_member_hide tinyint(1) NOT NULL default 0,\n\t\t\t\t\t\t pf_max_input smallint(6) NOT NULL default 0,\n\t\t\t\t\t\t pf_member_edit tinyint(1) NOT NULL default 0,\n\t\t\t\t\t\t pf_position smallint(6) NOT NULL default 0,\n\t\t\t\t\t\t pf_show_on_reg tinyint(1) NOT NULL default 0,\n\t\t\t\t\t\t pf_input_format text,\n\t\t\t\t\t\t pf_admin_only tinyint(1) NOT NULL default 0,\n\t\t\t\t\t\t pf_topic_format text,\n\t\t\t\t\t\t pf_group_id mediumint(4) unsigned NOT NULL,\n\t\t\t\t\t\t pf_icon varchar(255) default NULL,\n\t\t\t\t\t\t pf_key varchar(255) default NULL,\n\t\t\t\t\t\t pf_search_type varchar(5) NOT NULL default 'loose',\n\t\t\t\t\t\t pf_filtering TINYINT( 1 ) NOT NULL DEFAULT '0',\n\t\t\t\t\t\t PRIMARY KEY (pf_id)\n\t\t\t\t\t\t);\";\n\t\t}\n\n\t\tif( !ipsRegistry::DB()->checkForTable('warn_logs') )\n\t\t{\n\t\t\t$SQL[] = \"CREATE TABLE \".ipsRegistry::dbFunctions()->getPrefix().\"warn_logs (\n\t\t\t wlog_id int(10) NOT NULL auto_increment,\n\t\t\t wlog_mid mediumint(8) NOT NULL default 0,\n\t\t\t wlog_notes text,\n\t\t\t wlog_contact varchar(250) NOT NULL default 'none',\n\t\t\t wlog_contact_content text,\n\t\t\t wlog_date int(10) NOT NULL default 0,\n\t\t\t wlog_type varchar(6) NOT NULL default 'pos',\n\t\t\t wlog_addedby mediumint(8) NOT NULL default 0,\n\t\t\t PRIMARY KEY (wlog_id),\n\t\t\t KEY wlog_mid (wlog_mid, wlog_date)\n\t\t\t);\";\n\t\t}\n\n\t\t$SQL[] = \"alter table \".ipsRegistry::dbFunctions()->getPrefix().\"groups add g_attach_per_post int(10) NOT NULL default '0';\";\n\t\t$SQL[] = \"alter table \".ipsRegistry::dbFunctions()->getPrefix().\"topic_mmod add topic_approve tinyint(1) NOT NULL default '0';\";\n\t\t\n\t\t$SQL[] = \"alter table \".ipsRegistry::dbFunctions()->getPrefix().\"groups add g_can_msg_attach tinyint(1) NOT NULL default '0';\";\n\t\t$SQL[] = \"alter table \".ipsRegistry::dbFunctions()->getPrefix().\"pfields_data\n\t\t\t\tchange fid pf_id smallint(5) NOT NULL auto_increment,\n\t\t\t\tchange ftitle pf_title varchar(250) NOT NULL default '',\n\t\t\t\tchange fdesc pf_desc varchar(250) NOT NULL default '',\n\t\t\t\tchange fcontent pf_content text NULL,\n\t\t\t\tchange ftype pf_type varchar(250) NOT NULL default '',\n\t\t\t\tchange freq pf_not_null tinyint(1) NOT NULL default '0',\n\t\t\t\tchange fhide pf_member_hide tinyint(1) NOT NULL default '0',\n\t\t\t\tchange fmaxinput pf_max_input smallint(6) NOT NULL default '0',\n\t\t\t\tchange fedit pf_member_edit tinyint(1) NOT NULL default '0',\n\t\t\t\tchange forder pf_position smallint(6) NOT NULL default '0',\n\t\t\t\tchange fshowreg pf_show_on_reg tinyint(1) NOT NULL default '0',\n\t\t\t\tadd pf_input_format text NULL,\n\t\t\t\tadd pf_admin_only tinyint(1) NOT NULL default '0',\n\t\t\t\tadd pf_topic_format text NULL;\";\n\n\t\t\n\t\t$this->sqlcount = 0;\n\t\t\n\t\t$this->DB->return_die = 1;\n\t\t\n\t\tforeach( $SQL as $query )\n\t\t{\n\t\t\t$this->DB->allow_sub_select \t= 1;\n\t\t\t$this->DB->error\t\t\t\t= '';\n\t\t\t\t\t\t\n\t\t\t$this->DB->query( $query );\n\t\t\t\n\t\t\tif ( $this->DB->error )\n\t\t\t{\n\t\t\t\t$this->registry->output->addError( $query.\"<br /><br />\".$this->DB->error );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->sqlcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->registry->output->addMessage(\"Other tables altered, inserting data next...<br /><br />$this->sqlcount queries ran....\");\n\t\t$this->request['workact'] = 'step_18';\t\t\t\n\t}", "title": "" }, { "docid": "66c67151d74b553bafc5083c117ec46f", "score": "0.5098724", "text": "function vmoodle_load_database_from_template($vmoodledata) {\n\tglobal $CFG, $DB;\n\n\t// Gets the HTTP adress scheme (http, https, etc...) if not specified.\n\tif(is_null(parse_url($vmoodledata->vhostname, PHP_URL_SCHEME))){\n\t\t$vmoodledata->vhostname =\tparse_url($CFG->wwwroot, PHP_URL_SCHEME).'://'.$vmoodledata->vhostname;\n\t}\n\n\t$manifest =\tvmoodle_get_vmanifest($vmoodledata->vtemplate);\n\t$hostname = mnet_get_hostname_from_uri($CFG->wwwroot);\n\t$description = $DB->get_field('course', 'fullname', array('id' => SITEID)); \n\t$cfgipaddress = gethostbyname($hostname);\n\n // availability of SQL commands\n \n\t// Checks if paths commands have been properly defined in 'vconfig.php'.\n\tif($vmoodledata->vdbtype == 'mysql') {\n\t\t$createstatement = 'CREATE DATABASE'; \n\t}\n else if($vmoodledata->vdbtype == 'mysqli') {\n $createstatement = 'CREATE DATABASE'; \n }\n\telse if($vmoodledata->vdbtype == 'postgres') {\n\t\t$createstatement = 'CREATE SCHEMA'; \n\t}\n\n\t// SQL files paths.\n\t$separator\t=\tDIRECTORY_SEPARATOR;\n\t$osDataroot = str_replace('/', DIRECTORY_SEPARATOR, $CFG->dataroot);\n\t$templatesqlfile_path\t= $osDataroot.$separator.'vmoodle'.$separator.$vmoodledata->vtemplate.'_sql'.$separator.'vmoodle_master.sql';\n\t// Create temporaries files for replacing data.\n\t$temporarysqlfile_path\t= $osDataroot.$separator.'vmoodle'.$separator.$vmoodledata->vtemplate.'_sql'.$separator.'vmoodle_master.temp.sql';\n\n\t// Retrieves files contents into strings.\n debug_trace(\"load_database_from_dump : getting sql content\");\n\tif(!($dumptxt = file_get_contents($templatesqlfile_path))){\n\t print_error('nosql', 'block_vmoodle');\n\t return false;\n }\n\n\t// Change the tables prefix if required prefix does not match manifest's one (sql template).\n\tif ($manifest['templatevdbprefix'] != $vmoodledata->vdbprefix){\n\t\t$dumptxt = str_replace($manifest['templatevdbprefix'], $vmoodledata->vdbprefix, $dumptxt);\n\t}\n\t// fix special case on adodb_logsql table if prefix has a schema part (PostgreSQL)\n\tif (preg_match('/(.*)\\./', $vmoodledata->vdbprefix, $matches)){\n\t // we have schema, thus relocate adodb_logsql table within schema\n\t\t$dumptxt = str_replace('adodb_logsql', $matches[1].'.adodb_logsql', $dumptxt);\t\t \n\t}\n\n\t// Puts strings into the temporary files.\n debug_trace(\"load_database_from_dump : writing modified sql\");\n\tif(!file_put_contents($temporarysqlfile_path, $dumptxt)){\n\t print_error('nooutputfortransformedsql', 'block_vmoodle');\n\t return false;\n\t}\n\n\t// Creates the new database before importing the data.\n\n\t$sql = \"$createstatement $vmoodledata->vdbname\";\n debug_trace(\"load_database_from_dump : executing creation sql\");\n\tif(!$DB->execute($sql)){\n\t print_error('noexecutionfor','block_vmoodle', $sql);\n\t\treturn false;\n\t}\n\n $sqlcmd = vmoodle_get_database_dump_cmd($vmoodledata);\n\n\t// Make final commands to execute, depending on the database type.\n\t$import\t= $sqlcmd.$temporarysqlfile_path;\n\n\t// Execute the command.\n debug_trace(\"load_database_from_dump : executing feeding sql\");\n\n\texec($import, $output, $return);\n\n debug_trace(implode(\"\\n\", $output).\"\\n\");\n\n\t// Remove temporary files.\n\t//\tif(!unlink($temporarysqlfile_path))){\n\t//\t\treturn false;\n\t//\t}\n\n\t// End.\n debug_trace(\"load_database_from_dump : OUT\");\n\treturn true;\n}", "title": "" }, { "docid": "f4e6696a15fb3b3b0536beaa632765da", "score": "0.5093016", "text": "function getSQLDump(\r\n\t$menu_name = '',\t// non consistent default...\r\n\t$db_type = ''\r\n\t)\r\n{\r\n\t$SQLDump = '';\r\n\tfor ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) {\t// this counter scans all nodes of the menu\r\n\t\t$current_node[$this->tree[$cnt]['level']] = $cnt;\r\n\t\tif (!$this->tree[$cnt]['child_of_root_node']) {\r\n\t\t\t$this->tree[$cnt]['father_node'] = $current_node[$this->tree[$cnt]['level']-1];\r\n\t\t}\r\n\t\t$VALUES = '';\r\n\t\t$SQLDump .= 'INSERT INTO ';\r\n\t\t$SQLDump .= $this->tableName;\r\n\t\t$SQLDump .= ' (';\r\n\t\t$SQLDump .= $this->tableFields['id'] . ', ';\r\n\t\t$VALUES .= \"'\" . 10*$cnt . \"', \";\r\n\t\t$SQLDump .= $this->tableFields['parent_id'] . ', ';\r\n\t\tif (isset($this->tree[$cnt]['father_node']) && $this->tree[$cnt]['father_node'] != 0) {\r\n\t\t\t$VALUES .= \"'\" . 10*$this->tree[$cnt]['father_node'] . \"', \";\r\n\t\t} else {\r\n\t\t\t$VALUES .= \"'1', \";\r\n\t\t}\r\n\t\t$SQLDump .= $this->tableFields['text'] . ', ';\r\n\t\t$foobar = $this->tree[$cnt]['text'];\r\n\t\tif ($foobar != '') {\r\n\t\t\tif ($db_type != 'sqlite') {\r\n\t\t\t\t$foobar = addslashes($foobar);\r\n\t\t\t} else {\r\n\t\t\t\t$foobar = sqlite_escape_string($foobar);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$VALUES .= \"'$foobar', \";\r\n\t\t$SQLDump .= $this->tableFields['href'] . ', ';\r\n\t\t$VALUES .= \"'\" . $this->tree[$cnt]['href'] . \"', \";\r\n\t\tif ($this->tableFields['title'] != \"''\") {\r\n\t\t\t$SQLDump .= $this->tableFields['title'] . ', ';\r\n\t\t\t$foobar = $this->tree[$cnt]['title'];\r\n\t\t\tif ($foobar != '') {\r\n\t\t\t\tif ($db_type != 'sqlite') {\r\n\t\t\t\t\t$foobar = addslashes($foobar);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$foobar = sqlite_escape_string($foobar);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$VALUES .= \"'$foobar', \";\r\n\t\t}\r\n\t\tif ($this->tableFields['icon'] != \"''\") {\r\n\t\t\t$SQLDump .= $this->tableFields['icon'] . ', ';\r\n\t\t\t$VALUES .= \"'\" . $this->tree[$cnt]['icon'] . \"', \";\r\n\t\t}\r\n\t\tif ($this->tableFields['target'] != \"''\") {\r\n\t\t\t$SQLDump .= $this->tableFields['target'] . ', ';\r\n\t\t\t$VALUES .= \"'\" . $this->tree[$cnt]['target'] . \"', \";\r\n\t\t}\r\n\t\tif ($this->tableFields['orderfield'] != \"''\") {\r\n\t\t\t$SQLDump .= $this->tableFields['orderfield'] . ', ';\r\n\t\t\t$VALUES .= \"'\" . 10*$cnt . \"', \";\r\n\t\t}\r\n\t\tif ($this->tableFields['expanded'] != \"''\") {\r\n\t\t\t$SQLDump .= $this->tableFields['expanded'] . ', ';\r\n\t\t\t$this->tree[$cnt]['expanded'] = (int) $this->tree[$cnt]['expanded'];\r\n\t\t\t$VALUES .= \"'\" . $this->tree[$cnt]['expanded'] . \"', \";\r\n\t\t}\r\n\t\t$SQLDump = substr($SQLDump, 0, -2);\r\n\t\t$VALUES = substr($VALUES, 0, -2);\r\n\t\t$SQLDump .= \") VALUES ($VALUES);\\n\";\r\n\t}\r\n\treturn $SQLDump;\r\n}", "title": "" }, { "docid": "5d59fd6fe83ca435e90933438fe56a46", "score": "0.5077164", "text": "public function dbInsertData()\n\t{\n\t\t$json = json_decode(file_get_contents(\"assets/db/data.json\"),true);\n\t\t// [table][id-1][name]\n\t\t//var_dump($json);\n\t\t$returnstr = $this->dbInsertHomeData($json[\"Home\"]) . \" \";\n\t\t$returnstr .= $this->dbInsertModelsData($json[\"Models\"]) . \" \";\n\t\t$returnstr .= $this->dbInsertMiscData($json[\"Misc\"]) . \" \";\n\t\t$this->dbhandle = NULL;\n\t\treturn $returnstr;\n\t}", "title": "" }, { "docid": "c527cb781d81af4681767bd3568c571b", "score": "0.50755405", "text": "public function dumpTableStructure(string $tableName): string\n {\n $sql = $this->db->query('SHOW CREATE TABLE %', $tableName)\n ->fetchColumn('Create Table');\n\n $sql = preg_replace('~AUTO_INCREMENT=\\\\d+ ~i', '', $sql, 1);\n\n return $sql . ';';\n }", "title": "" }, { "docid": "b8c00cd7dbe42197e62f1d5adac10c36", "score": "0.50737655", "text": "function exportMysqlToCsv($table,$filename = 'export.csv')\n{\n $csv_terminated = \"\\n\";\n $csv_separator = \",\";\n $csv_enclosed = '\"';\n $csv_escaped = \"\\\\\";\n $sql_query = \"select * from $table\";\n \n // Gets the data from the database\n $result = mysql_query($sql_query);\n $fields_cnt = mysql_num_fields($result);\n \n \n $schema_insert = '';\n \n for ($i = 0; $i < $fields_cnt; $i++)\n {\n $l = $csv_enclosed . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed,\n stripslashes(mysql_field_name($result, $i))) . $csv_enclosed;\n $schema_insert .= $l;\n $schema_insert .= $csv_separator;\n } // end for\n \n $out = trim(substr($schema_insert, 0, -1));\n $out .= $csv_terminated;\n \n // Format the data\n while ($row = mysql_fetch_array($result))\n {\n $schema_insert = '';\n for ($j = 0; $j < $fields_cnt; $j++)\n {\n if ($row[$j] == '0' || $row[$j] != '')\n {\n \n if ($csv_enclosed == '')\n {\n $schema_insert .= $row[$j];\n } else\n {\n $schema_insert .= $csv_enclosed . \n\t\t\t\t\tstr_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j]) . $csv_enclosed;\n }\n } else\n {\n $schema_insert .= '';\n }\n \n if ($j < $fields_cnt - 1)\n {\n $schema_insert .= $csv_separator;\n }\n } // end for\n \n $out .= $schema_insert;\n $out .= $csv_terminated;\n } // end while\n \n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Content-Length: \" . strlen($out));\n // Output to browser with appropriate mime type, you choose ;)\n header(\"Content-type: text/x-csv\");\n //header(\"Content-type: text/csv\");\n //header(\"Content-type: application/csv\");\n header(\"Content-Disposition: attachment; filename=$filename\");\n echo $out;\n exit;\n \n}", "title": "" }, { "docid": "f949c5e63349a8a401266171f28df4dc", "score": "0.50712276", "text": "function Export_Database($host,$user,$pass,$name, $tables=false, $backup_name=false )\n {\n $mysqli = new mysqli($host,$user,$pass,$name);\n $mysqli->select_db($name);\n $mysqli->query(\"SET NAMES 'utf8'\");\n\n $queryTables = $mysqli->query('SHOW TABLES');\n while($row = $queryTables->fetch_row())\n {\n $target_tables[] = $row[0];\n }\n if($tables !== false)\n {\n $target_tables = array_intersect( $target_tables, $tables);\n }\n foreach($target_tables as $table)\n {\n $result = $mysqli->query('SELECT * FROM '.$table);\n $fields_amount = $result->field_count;\n $rows_num=$mysqli->affected_rows;\n $res = $mysqli->query('SHOW CREATE TABLE '.$table);\n $TableMLine = $res->fetch_row();\n $content = (!isset($content) ? '' : $content) . \"\\n\\n\".$TableMLine[1].\";\\n\\n\";\n\n for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0)\n {\n while($row = $result->fetch_row())\n { //when started (and every after 100 command cycle):\n if ($st_counter%100 == 0 || $st_counter == 0 )\n {\n $content .= \"\\nINSERT INTO \".$table.\" VALUES\";\n }\n $content .= \"\\n(\";\n for($j=0; $j<$fields_amount; $j++)\n {\n $row[$j] = str_replace(\"\\n\",\"\\\\n\", addslashes($row[$j]) );\n if (isset($row[$j]))\n {\n $content .= '\"'.$row[$j].'\"' ;\n }\n else\n {\n $content .= '\"\"';\n }\n if ($j<($fields_amount-1))\n {\n $content.= ',';\n }\n }\n $content .=\")\";\n //every after 100 command cycle [or at last line] ....p.s. but should be inserted 1 cycle eariler\n if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num)\n {\n $content .= \";\";\n }\n else\n {\n $content .= \",\";\n }\n $st_counter=$st_counter+1;\n }\n } $content .=\"\\n\\n\\n\";\n }\n //$backup_name = $backup_name ? $backup_name : $name.\"___(\".date('H-i-s').\"_\".date('d-m-Y').\")__rand\".rand(1,11111111).\".sql\";\n $backup_name = $backup_name ? $backup_name : $name.\".sql\";\n header('Content-Type: application/octet-stream');\n header(\"Content-Transfer-Encoding: Binary\");\n header(\"Content-disposition: attachment; filename=\\\"\".$backup_name.\"\\\"\");\n echo $content; exit;\n }", "title": "" }, { "docid": "a8f3f13d39cae02910d80dff900d422f", "score": "0.50644505", "text": "public function run() {\n\t\t\\DB::statement(\" INSERT INTO efectores.descentralizacion(id_efector,internet,factura_descentralizada,factura_on_line)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_efector,coalesce(internet,''N''),coalesce(factura_descentralizada,''N''),coalesce(factura_on_line,''N'')\n\t\t FROM efectores.descentralizacion')\n\t AS migracion(id_efector integer,\n internet character(1),\n factura_descentralizada character(1),\n factura_on_line character(1))\n);\");\n\t}", "title": "" }, { "docid": "0cea5742eecd3a78e5b0453228b70002", "score": "0.5062323", "text": "function allinea_db(){\n \tif ($this->attributes['TB']!='no'){\n\t\t\t$ret[0]=\"{$this->attributes['VAR']} NUMBER\";\n\t\t\t$ret[1]=\"D_{$this->attributes['VAR']} VARCHAR2(200)\";\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "title": "" }, { "docid": "ca2f10b8ac6a05619d2b0f80cb6869fd", "score": "0.5062314", "text": "private function _buildStructure()\n {\n \t$this->_query('BEGIN', true);\n \t$this->_query('DROP INDEX tag_id_index', true);\n \t$this->_query('DROP INDEX tag_name_index', true);\n \t$this->_query('DROP INDEX cache_id_expire_index', true);\n \t$this->_query('DROP TABLE version', true);\n \t$this->_query('DROP TABLE cache', true);\n \t$this->_query('DROP TABLE tag', true);\n \t$this->_query('CREATE TABLE version (num INTEGER PRIMARY KEY)', true);\n \t$this->_query('CREATE TABLE cache (id TEXT PRIMARY KEY, content BLOB, lastModified INTEGER, expire INTEGER)', true);\n \t$this->_query('CREATE TABLE tag (name TEXT, id TEXT)', true);\n \t$this->_query('CREATE INDEX tag_id_index ON tag(id)', true);\n \t$this->_query('CREATE INDEX tag_name_index ON tag(name)', true);\n \t$this->_query('CREATE INDEX cache_id_expire_index ON cache(id, expire)', true);\n \t$this->_query('INSERT INTO version (num) VALUES (1)', true);\n \t$this->_query('COMMIT', true);\n }", "title": "" }, { "docid": "e7e9564a3cce57790006c5ada4b0ca3b", "score": "0.5062211", "text": "public function getUpSQL()\n\t{\n\t\treturn array (\n 'propel' => '\n\n DROP TABLE IF EXISTS `collector_remember_key`;\n CREATE TABLE `collector_remember_key`\n (\n `ip_address` CHAR(15) NOT NULL,\n `collector_id` INTEGER NOT NULL,\n `remember_key` CHAR(32),\n `created_at` DATETIME,\n PRIMARY KEY (`ip_address`),\n INDEX `collector_remember_key_FI_1` (`collector_id`),\n CONSTRAINT `collector_remember_key_FK_1`\n FOREIGN KEY (`collector_id`)\n REFERENCES `collector` (`id`)\n ON DELETE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n ',\n );\n\t}", "title": "" }, { "docid": "8af4ec50b1d8a3f78a33ab2a08dfdbd5", "score": "0.5060802", "text": "abstract protected function create_db_structure();", "title": "" }, { "docid": "54c4094475f1963026714cd4227aa9b7", "score": "0.50603414", "text": "function convertDatabase() {\n\t\tglobal $wpdb;\n\n\t\t$dimensions\t\t\t= array('0','0');\n\t\t$flash\t\t\t\t= false;\n\n\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '$this->old_table_bannerize'\") == $this->old_table_bannerize ) {\n\t\t\t$sql = sprintf(\"SELECT * FROM `%s`\", $this->old_table_bannerize);\n\t\t} else if($wpdb->get_var(\"SHOW TABLES LIKE '$this->prev_table_bannerize'\") == $this->prev_table_bannerize) {\n\t\t\t$flash = true;\n\t\t\t$sql = sprintf(\"SELECT * FROM `%s`\", $this->prev_table_bannerize);\n\t\t}\n\t\t$old = $wpdb->get_results($sql);\n\n\t\tif($flash) {\n\t\t\tforeach($old as $olditem) {\n\t\t\t\t$sql = sprintf(\"INSERT INTO %s (`sorter`, `group`, `description`, `url`, `filename`, `target`, `realpath`, `width`, `height`, `clickcount`, `use_description`, `nofollow`, `trash`, `mime` ) \".\n\t\t\t\t\t\t\t\t\t\t\t\"VALUES('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')\", $this->table_bannerize,\n\t\t\t\t\t\t\t\t\t\t\t$olditem->sorter, $olditem->group, $olditem->description, $olditem->url,\n\t\t\t\t\t\t\t\t\t\t\t$olditem->filename, $olditem->target, $olditem->realpath, $olditem->width, $olditem->height, $olditem->clickcount, $olditem->user_description, $olditem->nofollow, $olditem->trash, $olditem->mime);\n\t\t\t\t$wpdb->query($sql);\n\t\t\t}\n\t\t} else {\n\t\t\tforeach($old as $olditem) {\n\t\t\t\tif(function_exists('getimagesize')) {\n\t\t\t\t\t$dimensions = @getimagesize( $olditem->realpath );\n\t\t\t\t\tif(!isset($dimensions)) {\n\t\t\t\t\t\t$dimensions = array('0','0');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$sql = sprintf(\"INSERT INTO %s (`sorter`, `group`, `description`, `url`, `filename`, `target`, `realpath`, `width`, `height`) \".\n\t\t\t\t\t\t\t\t\t\t\t\"VALUES('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')\", $this->table_bannerize,\n\t\t\t\t\t\t\t\t\t\t\t$olditem->sorter, $olditem->group, $olditem->description, $olditem->url,\n\t\t\t\t\t\t\t\t\t\t\t$olditem->filename, $olditem->target, $olditem->realpath, $dimensions[0], $dimensions[1]);\n\t\t\t\t$wpdb->query($sql);\n\t\t\t}\n\t\t}\n\n\t\t$this->dropOldDatabaseTable();\n\t\t$this->options['todo_upgrade'] = \"no\";\n\t\tupdate_option( $this->options_key, $this->options);\n\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<div class=\"wp_saidmade_box\">\n\t\t\t\t\t<p class=\"wp_saidmade_copy_info\"><?php _e('For more info and plugins visit', 'wp-bannerize') ?> <a href=\"http://www.saidmade.com\">Saidmade</a></p>\n\t\t\t\t\t<a class=\"wp_saidmade_logo\" href=\"http://www.saidmade.com/prodotti/wordpress/wp-bannerize/\">\n\t\t\t\t\t\t<?php echo $this->plugin_name ?> ver. <?php echo $this->version ?>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"wp_bannerize_info\"><?php _e('Results','wp-bannerize') ?></h3>\n\t\t\t\t<p class=\"wp_bannerize_info\"><?php _e('Ok, your old WP Bannerize Database Table has been convert succesfully! Please, press \"continue\" button to start with new WP Bannerize Release! Thank you for collaboration.','wp-bannerize') ?></p>\n\t\t\t\t<form class=\"wp_bannerize_form_action\" method=\"post\" action=\"\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Continue', 'wp-bannerize') ?>\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "59959edf1815c10c89a91081d59b689f", "score": "0.5055206", "text": "public function prepareFromSql();", "title": "" }, { "docid": "3580cf0192824c3db3d7c0a99bcce367", "score": "0.5043902", "text": "abstract public function toDatas();", "title": "" }, { "docid": "953a6d58928dc32d5e857762c2884c54", "score": "0.5042398", "text": "public function getDownSQL()\n {\n return array (\n 'cungfoo' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `region_ref`;\n\nDROP TABLE IF EXISTS `departement`;\n\nDROP TABLE IF EXISTS `region_ref_i18n`;\n\nDROP TABLE IF EXISTS `departement_i18n`;\n\nALTER TABLE `bon_plan_bon_plan_categorie` DROP FOREIGN KEY `bon_plan_bon_plan_categorie_FK_1`;\n\nALTER TABLE `bon_plan_bon_plan_categorie` DROP FOREIGN KEY `bon_plan_bon_plan_categorie_FK_2`;\n\nALTER TABLE `bon_plan_categorie_i18n` DROP FOREIGN KEY `bon_plan_categorie_i18n_FK_1`;\n\nALTER TABLE `bon_plan_etablissement` DROP FOREIGN KEY `bon_plan_etablissement_FK_1`;\n\nALTER TABLE `bon_plan_etablissement` DROP FOREIGN KEY `bon_plan_etablissement_FK_2`;\n\nALTER TABLE `bon_plan_i18n` DROP FOREIGN KEY `bon_plan_i18n_FK_1`;\n\nALTER TABLE `bon_plan_region` DROP FOREIGN KEY `bon_plan_region_FK_1`;\n\nALTER TABLE `bon_plan_region` DROP FOREIGN KEY `bon_plan_region_FK_2`;\n\nALTER TABLE `categorie_i18n` DROP FOREIGN KEY `categorie_i18n_FK_1`;\n\nALTER TABLE `category_type_hebergement_i18n` DROP FOREIGN KEY `category_type_hebergement_i18n_FK_1`;\n\nALTER TABLE `demande_annulation` DROP FOREIGN KEY `demande_annulation_FK_1`;\n\nALTER TABLE `destination_i18n` DROP FOREIGN KEY `destination_i18n_FK_1`;\n\nALTER TABLE `edito_i18n` DROP FOREIGN KEY `edito_i18n_FK_1`;\n\nALTER TABLE `etablissement` DROP FOREIGN KEY `etablissement_FK_1`;\n\nALTER TABLE `etablissement` DROP FOREIGN KEY `etablissement_FK_2`;\n\nALTER TABLE `etablissement_activite` DROP FOREIGN KEY `etablissement_activite_FK_1`;\n\nALTER TABLE `etablissement_activite` DROP FOREIGN KEY `etablissement_activite_FK_2`;\n\nALTER TABLE `etablissement_baignade` DROP FOREIGN KEY `etablissement_baignade_FK_1`;\n\nALTER TABLE `etablissement_baignade` DROP FOREIGN KEY `etablissement_baignade_FK_2`;\n\nALTER TABLE `etablissement_destination` DROP FOREIGN KEY `etablissement_destination_FK_1`;\n\nALTER TABLE `etablissement_destination` DROP FOREIGN KEY `etablissement_destination_FK_2`;\n\nALTER TABLE `etablissement_event` DROP FOREIGN KEY `etablissement_event_FK_1`;\n\nALTER TABLE `etablissement_event` DROP FOREIGN KEY `etablissement_event_FK_2`;\n\nALTER TABLE `etablissement_i18n` DROP FOREIGN KEY `etablissement_i18n_FK_1`;\n\nALTER TABLE `etablissement_point_interet` DROP FOREIGN KEY `etablissement_point_interet_FK_1`;\n\nALTER TABLE `etablissement_point_interet` DROP FOREIGN KEY `etablissement_point_interet_FK_2`;\n\nALTER TABLE `etablissement_service_complementaire` DROP FOREIGN KEY `etablissement_service_complementaire_FK_1`;\n\nALTER TABLE `etablissement_service_complementaire` DROP FOREIGN KEY `etablissement_service_complementaire_FK_2`;\n\nALTER TABLE `etablissement_situation_geographique` DROP FOREIGN KEY `etablissement_situation_geographique_FK_1`;\n\nALTER TABLE `etablissement_situation_geographique` DROP FOREIGN KEY `etablissement_situation_geographique_FK_2`;\n\nALTER TABLE `etablissement_thematique` DROP FOREIGN KEY `etablissement_thematique_FK_1`;\n\nALTER TABLE `etablissement_thematique` DROP FOREIGN KEY `etablissement_thematique_FK_2`;\n\nALTER TABLE `etablissement_type_hebergement` DROP FOREIGN KEY `etablissement_type_hebergement_FK_1`;\n\nALTER TABLE `etablissement_type_hebergement` DROP FOREIGN KEY `etablissement_type_hebergement_FK_2`;\n\nALTER TABLE `event_i18n` DROP FOREIGN KEY `event_i18n_FK_1`;\n\nALTER TABLE `idee_weekend_i18n` DROP FOREIGN KEY `idee_weekend_i18n_FK_1`;\n\nALTER TABLE `job_log` DROP FOREIGN KEY `job_log_FK_1`;\n\nALTER TABLE `mise_en_avant_i18n` DROP FOREIGN KEY `mise_en_avant_i18n_FK_1`;\n\nALTER TABLE `multimedia_etablissement` DROP FOREIGN KEY `multimedia_etablissement_FK_1`;\n\nALTER TABLE `multimedia_etablissement_i18n` DROP FOREIGN KEY `multimedia_etablissement_i18n_FK_1`;\n\nALTER TABLE `multimedia_etablissement_tag` DROP FOREIGN KEY `multimedia_etablissement_tag_FK_1`;\n\nALTER TABLE `multimedia_etablissement_tag` DROP FOREIGN KEY `multimedia_etablissement_tag_FK_2`;\n\nALTER TABLE `multimedia_type_hebergement` DROP FOREIGN KEY `multimedia_type_hebergement_FK_1`;\n\nALTER TABLE `multimedia_type_hebergement_i18n` DROP FOREIGN KEY `multimedia_type_hebergement_i18n_FK_1`;\n\nALTER TABLE `pays_i18n` DROP FOREIGN KEY `pays_i18n_FK_1`;\n\nALTER TABLE `personnage` DROP FOREIGN KEY `personnage_FK_1`;\n\nALTER TABLE `personnage_i18n` DROP FOREIGN KEY `personnage_i18n_FK_1`;\n\nALTER TABLE `point_interet_i18n` DROP FOREIGN KEY `point_interet_i18n_FK_1`;\n\nALTER TABLE `region` DROP FOREIGN KEY `region_FK_1`;\n\nALTER TABLE `region` DROP FOREIGN KEY `region_FK_2`;\n\nALTER TABLE `region_i18n` DROP FOREIGN KEY `region_i18n_FK_1`;\n\nALTER TABLE `service_complementaire_i18n` DROP FOREIGN KEY `service_complementaire_i18n_FK_1`;\n\nALTER TABLE `situation_geographique_i18n` DROP FOREIGN KEY `situation_geographique_i18n_FK_1`;\n\nALTER TABLE `tag_i18n` DROP FOREIGN KEY `tag_i18n_FK_1`;\n\nALTER TABLE `thematique_i18n` DROP FOREIGN KEY `thematique_i18n_FK_1`;\n\nALTER TABLE `theme_activite` DROP FOREIGN KEY `theme_activite_FK_1`;\n\nALTER TABLE `theme_activite` DROP FOREIGN KEY `theme_activite_FK_2`;\n\nALTER TABLE `theme_baignade` DROP FOREIGN KEY `theme_baignade_FK_1`;\n\nALTER TABLE `theme_baignade` DROP FOREIGN KEY `theme_baignade_FK_2`;\n\nALTER TABLE `theme_i18n` DROP FOREIGN KEY `theme_i18n_FK_1`;\n\nALTER TABLE `theme_personnage` DROP FOREIGN KEY `theme_personnage_FK_1`;\n\nALTER TABLE `theme_personnage` DROP FOREIGN KEY `theme_personnage_FK_2`;\n\nALTER TABLE `theme_service_complementaire` DROP FOREIGN KEY `theme_service_complementaire_FK_1`;\n\nALTER TABLE `theme_service_complementaire` DROP FOREIGN KEY `theme_service_complementaire_FK_2`;\n\nALTER TABLE `top_camping` DROP FOREIGN KEY `top_camping_FK_1`;\n\nALTER TABLE `type_hebergement` DROP FOREIGN KEY `type_hebergement_FK_1`;\n\nALTER TABLE `type_hebergement` DROP FOREIGN KEY `type_hebergement_FK_2`;\n\nALTER TABLE `type_hebergement_capacite_i18n` DROP FOREIGN KEY `type_hebergement_capacite_i18n_FK_1`;\n\nALTER TABLE `type_hebergement_i18n` DROP FOREIGN KEY `type_hebergement_i18n_FK_1`;\n\nALTER TABLE `ville` DROP FOREIGN KEY `ville_FK_1`;\n\nALTER TABLE `ville_i18n` DROP FOREIGN KEY `ville_i18n_FK_1`;\n\nALTER TABLE `vos_vacances_i18n` DROP FOREIGN KEY `vos_vacances_i18n_FK_1`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "58299a294e67a7f361d648417265dea7", "score": "0.5041477", "text": "protected function dump()\n {\n $this->write('-- '. date('c') . ' - ' . $this->config->db . '@' . $this->config->host, false);\n\n foreach ($this->tables as $table)\n {\n if (($structure = $this->pdo->query('SHOW CREATE TABLE `'.$table.'`')) === false)\n {\n throw new Exception('Unable to get the structure for \"'.$table.'\"');\n }\n\n $this->write(\"\\n\\n-- Table structure for table `{$table}`\\n\\n\", false);\n $this->write('DROP TABLE IF EXISTS `'.$table.'`');\n\n foreach ($structure as $row)\n {\n $this->write(end($row));\n }\n\n $this->write(\"\\n\\n-- Dumping data for table `{$table}`\\n\\n\", false);\n $this->write(\"LOCK TABLES `{$table}` WRITE\");\n\n $rows = $this->pdo->prepare('select * from `'.$table.'`');\n $rows->execute();\n\n while ($a = $rows->fetch(\\PDO::FETCH_ASSOC))\n {\n $this->write(\"INSERT INTO `{$table}` VALUES (\".implode(',', array_map(array($this, 'escape'), $a)).\")\");\n }\n\n $this->write('UNLOCK TABLES');\n }\n }", "title": "" }, { "docid": "ec6fcab4e6e10355d6af1ba73a526163", "score": "0.50344056", "text": "abstract public function dump();", "title": "" }, { "docid": "af23fd2d7b0fba6ebc834fb3a5c1a785", "score": "0.5030597", "text": "function writeToDB(){\n\t\t$sql = \"INSERT INTO `\" . $this->dbName . \"`.`\" . $this->tblName . \"` (timestamp, ip_address \";\n\t\tforeach($this->answers as $answer){\n\t\t\tif($answer[type]!=\"text\"){\n\t\t\t\t$sql .= \", question_\" . $answer[id];\n\t\t\t}\n\t\t}\n\t\t$sql .= \") VALUES ('\" . time() .\"','\" . $_SERVER['REMOTE_ADDR'] . \"'\";\n\t\tforeach($this->answers as $answer){\n\t\t\t$sql .= \",'\" . addslashes($answer[rawvalue]) . \"'\";\n\t\t}\n\t\t$sql .= \")\";\n\t\tmysql_query($sql);\n\t}", "title": "" }, { "docid": "c7b97d8f8c7d85ec916779bc57d7282c", "score": "0.50248814", "text": "function set_data ( $res ) {\n\n\t\twhile ($row = mysql_fetch_array($res, MYSQL_NUM)) {\n \n $this->data .= '<ss:Row>'.chr(10);\n\t\t\tfor($i = 0; $i < $this->num_fields; $i++) {\n\t\t\t\t(is_numeric($row[$i])) ? $p = 'Number' : $p = 'String';\n\t\t\t\t$this->data .= '<ss:Cell><Data ss:Type=\"'.$p.'\">'.htmlentities($row[$i]).'</Data></ss:Cell>'.chr(10);\n\t\t\t}\n\t\t\t$this->data .= '</ss:Row>'.chr(10);\n \n }\n\t\t\n\t\t$this->export();\n\t\n\t}", "title": "" }, { "docid": "bc835c05dbc5cf1d00becf901fdef7d4", "score": "0.50165105", "text": "function exibirDataMysql($data){ \n\tlist ($dia, $mes, $ano) = explode ('/', $data);\n\t$data_mysql = $ano.'-'.$mes.'-'.$dia;\n\treturn $data_mysql;\n}", "title": "" }, { "docid": "a322314621fd4c67424aba20c5bc06c9", "score": "0.5014636", "text": "public function mysql()\n {\n // Create a new table mapping ip -> lat/long\n $sql = '\n CREATE TABLE IF NOT EXISTS `statistics_ip_location` (\n `ip_location_id` bigint(20) NOT NULL AUTO_INCREMENT,\n `ip` varchar(50) NOT NULL,\n `latitude` varchar(50) NOT NULL,\n `longitude` varchar(50) NOT NULL,\n PRIMARY KEY (`ip_location_id`),\n UNIQUE KEY (`ip`)\n ) DEFAULT CHARSET=utf8;\n ';\n $this->db->query($sql);\n\n // Add a logical foreign key into the download table\n $this->db->query('ALTER TABLE `statistics_download` ADD COLUMN `ip_location_id` bigint(20) NOT NULL;');\n\n // Copy the entries from our old table into the new one\n $sql = $this->db->select()\n ->from(array('d' => 'statistics_download'), array('ip', 'latitude', 'longitude'))\n ->distinct();\n $rowSet = $this->db->fetchAll($sql);\n $ips = array();\n foreach ($rowSet as $row) {\n // key by ip so we don't have duplicate ips (violates unique constraint)\n $ips[$row['ip']] = array('latitude' => $row['latitude'], 'longitude' => $row['longitude']);\n }\n foreach ($ips as $ip => $location) {\n $data = array('ip' => $ip, 'latitude' => $location['latitude'], 'longitude' => $location['longitude']);\n $this->db->insert('statistics_ip_location', $data);\n $id = $this->db->lastInsertId('statistics_ip_location', 'ip_location_id');\n\n // Point the download table entries to the new entry\n $this->db->update('statistics_download',\n array('ip_location_id' => $id),\n array('ip = ?' => $ip));\n }\n\n // Drop the columns from the download table\n $this->db->query('ALTER TABLE `statistics_download` DROP `ip`;');\n $this->db->query('ALTER TABLE `statistics_download` DROP `latitude`;');\n $this->db->query('ALTER TABLE `statistics_download` DROP `longitude`;');\n\n // Add item id index to the download table for faster item statistics lookup\n $this->db->query('ALTER TABLE `statistics_download` ADD KEY (`item_id`);');\n // Add latitude index to the geolocation table for quick selection of blank entries\n $this->db->query('ALTER TABLE `statistics_ip_location` ADD KEY (`latitude`);');\n }", "title": "" }, { "docid": "b9a6d44ab84ffe99d11d51a23a8eed57", "score": "0.50100553", "text": "protected function getTableData($table){\n // Получаем список полей\n $fields = $this->getFields($table);\n if ($fields === false) return '';\n $_fieldList = '';\n foreach ($fields as &$field) {\n if (!empty($_fieldList)) {\n $_fieldList .= \", \";\n }\n $_fieldList .= $this->modx->escape($field['name']);\n }\n // Формируем sql\n $result = $this->modx->query('SELECT '.$_fieldList.' FROM '.$table);\n if (!is_object($result) || !$rows = $result->fetchAll(PDO::FETCH_NUM)) return '';\n $num_rows = count($rows);\n $num_cols = count($rows[0]);\n $sql = \"\\n--\\n-- \".$this->modx->lexicon('table_dump').\" `{$table}`\\n--\\n\\n\";\n\n $sql .= 'INSERT INTO `'. $table .\"` (\".$_fieldList;\n // Формируем данные для вывода\n $sql .= \") VALUES \\n\";\n for ($i = 0; $i < $num_rows; ++$i) {\n $sql .= \"(\";\n for ($j = 0; $j < $num_cols; ++$j) {\n if ( is_null($rows[$i][$j]) ) {\n $sql .= 'NULL';\n } elseif ($fields[$j]['type'] == 'string') {\n $val = '\\''.addslashes($rows[$i][$j]).'\\'';\n $sql .= strtr(\n $val,\n array(\"\\n\" => '\\n', \"\\r\" => '\\r', \"\\t\" => '\\t')\n );\n } elseif (!is_numeric($rows[$i][$j])) {\n $sql .= '\\''.$rows[$i][$j].'\\'';\n } else {\n $sql .= $rows[$i][$j];\n }\n if ($j != $num_cols-1) $sql .= \", \";\n }\n $sql .= \")\";\n if ($i != ($num_rows - 1)) {\n $sql .= \",\\n\";\n }\n }\n $sql .= \";\";\n return $sql;\n }", "title": "" }, { "docid": "e6e1e3bdaf701c72f46ee42bdcfbb550", "score": "0.50075674", "text": "public static function dump()\r\n\t{\r\n\t\tstatic::$tableinst->dump();\r\n\t}", "title": "" }, { "docid": "d689b8ecf6d3ba8a45d2ae55f2131ac2", "score": "0.50020677", "text": "public function healSchema()\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t\n\t\t// Fix missing tables\n\t\tif(!$this->tableExists('#__ak_profiles')) {\n\t\t\tif(!$this->runSQL($this->schemata['#__ak_profiles'])) return false;\n\t\t\tif(!$this->runSQL($this->schemata['default_profile'])) return false;\n\t\t}\n\t\tforeach(array('#__ak_stats','#__ak_acl','#__ak_storage') as $table) {\n\t\t\tif(!$this->tableExists($table)) {\n\t\t\t\tif(!$this->runSQL($this->schemata[$table])) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fix the #__ak_stats table (req. for upgrades from 3.0/.a1 to 3.1./3.1 releases)\n\t\tif(!$this->columnExists('#__ak_stats', 'total_size')) {\n\t\t\t$hasTagColumn = !$this->columnExists('#__ak_stats', 'tag');\n\t\t\t\n\t\t\t// Drop any existing #__ak_stats_bak table\n\t\t\tif(!$this->runSQL('DROP TABLE IF EXISTS `#__ak_stats_bak`')) {\n\t\t\t\tif($db->getErrorNum() != 1060) return false;\n\t\t\t}\n\t\t\t\n\t\t\t// Create a new #__ak_stats_bak table\n\t\t\t$sql = $this->schemata['#__ak_stats'];\n\t\t\t$sql = str_replace('#__ak_stats', '#__ak_stats_bak', $sql);\n\t\t\tif(!$this->runSQL($sql)) {\n\t\t\t\tif($db->getErrorNum() != 1060) return false;\n\t\t\t}\n\t\t\t\n\t\t\t// Copy existing data from #__ak_stats to #__ak_stats_bak\n\t\t\tif($hasTagColumn) {\n\t\t\t\t// Upgrade from 3.1.3 or later (has tag and filesexist columns)\n\t\t\t\t\t\t$sql = <<<ENDSQL\nINSERT IGNORE INTO `#__ak_stats_bak`\n\t(`id`,`description`,`comment`,`backupstart`,`backupend`,`status`,`origin`,`type`,`profile_id`,`archivename`,`absolute_path`,`multipart`,`tag`,`filesexist`)\nSELECT\n `id`,`description`,`comment`,`backupstart`,`backupend`,`status`,`origin`,`type`,`profile_id`,`archivename`,`absolute_path`,`multipart`,`tag`,`filesexist`\nFROM\n `#__ak_stats`;\nENDSQL;\n\t\t\t} else {\n\t\t\t\t// Upgrade from 3.1.2 or earlier\n\t\t\t\t$sql = <<<ENDSQL\nINSERT IGNORE INTO `#__ak_stats_bak`\n\t(`id`,`description`,`comment`,`backupstart`,`backupend`,`status`,`origin`,`type`,`profile_id`,`archivename`,`absolute_path`,`multipart`)\nSELECT\n `id`,`description`,`comment`,`backupstart`,`backupend`,`status`,`origin`,`type`,`profile_id`,`archivename`,`absolute_path`,`multipart`\nFROM\n `#__ak_stats`;\nENDSQL;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$this->runSQL($sql)) {\n\t\t\t\tif($db->getErrorNum() != 1060) return false;\n\t\t\t}\n\t\t\t\n\t\t\t// Drop the broken #__ak_stats table\n\t\t\tif(!$this->runSQL('DROP TABLE IF EXISTS `#__ak_stats`')) return false;\n\t\t\t\n\t\t\t// Create the #__ak_stats table afresh\n\t\t\tif(!$this->runSQL($this->schemata['#__ak_stats'])) return false;\n\t\t\t\n\t\t\t// Move data from the #__ak_stats_bak to the new #__ak_stats table\n\t\t\tif(!$this->runSQL('INSERT IGNORE INTO `#__ak_stats` SELECT * FROM `#__ak_stats_bak`')) return false;\n\t\t\t\n\t\t\t// Drop the #__ak_stats_bak table\n\t\t\tif(!$this->runSQL('DROP TABLE IF EXISTS `#__ak_stats_bak`')) return false;\n\t\t}\n\t\t\n\t\t// If we're still here, our schema is up-to-date!\n\t\treturn true;\n\t}", "title": "" }, { "docid": "24464d79b72b380b87c1fdc3dc5ec1ea", "score": "0.49835336", "text": "function dbInstall($data) {\r\n/*\r\nusbdevices - usbdevices\r\n*/\r\n $data = <<<EOD\r\n usbdevices: ID int(10) unsigned NOT NULL auto_increment\r\n usbdevices: TITLE varchar(255) NOT NULL DEFAULT ''\r\n usbdevices: SERIAL varchar(255) NOT NULL DEFAULT ''\r\n usbdevices: LOG text NOT NULL DEFAULT ''\r\n usbdevices: SCRIPT text NOT NULL DEFAULT ''\r\n usbdevices: SCRIPT_ID int(10) unsigned NOT NULL DEFAULT '0'\r\n usbdevices: LAST_FOUND datetime\r\n usbdevices: FIRST_FOUND datetime\r\n usbdevices: USER_ID int(10) NOT NULL DEFAULT '0'\r\nEOD;\r\n parent::dbInstall($data);\r\n }", "title": "" }, { "docid": "8669c6e000616ec16064ba64f732896e", "score": "0.4969578", "text": "function dbs_mysqldump_old() {\n\t$sql = \"SHOW TABLES;\";\n\t$result = mysql_query($sql);\n\tdbs_print_dump_message();\n\twhile ($row = mysql_fetch_row($result)) {\n\t\tdbs_mysqldump_table($row[0]);\n\t}\n\tmysql_free_result($result);\n}", "title": "" }, { "docid": "d5b3a2eaac5fe53d3bdeb66df791c07f", "score": "0.49621293", "text": "public function restoreSql($file, $remove = false)\n\t{\n\t\t$seldb = \"\";\n\t\t$sucess = false;\n//echo \"db: \" . $file;\n\t\tif ( $this->getFile($file) )\n\t\t{\n//echo \"paso11\";\n\n//\t\t\t$this->text = preg_replace(\"/###.* DATABASE DUMP COMPLETED ###/\", self::FIELDSEP, $this->text);\n//\t\t\t$this->text = preg_replace(\"/###_DATABASE_DUMP_COMPLETED_###/\", self::FIELDSEP, $this->text);\n\n\t\t\t// ignore database dump complete message\n//\techo \"paso\";\n\n// tamaño de memoria dinamica para asignacion de php.ini\n$tam_mem = strlen($this->text) * 3 / 1024;\n$tim_mem = $tam_mem / 10;\n\nini_set('max_execution_time', $tim_mem);\nini_set('max_input_time', $tim_mem);\nini_set('memory_limit', $tam_mem . 'M');\n\n\t\t\tforeach ($tt = explode(self::FIELDSEP, $this->text) as $query)\n\t\t\t{\n//echo \"paso21\";\n\t\t\t\tif ( !empty($query) )\n\t\t\t\t{\n//echo \"paso31\";\n\t\t\t\t\t$rs = mysql_query($query, $this->link);\n\t\t\t\n\t\t\t\t\tif ( strstr($query, \"CREATE DATABASE\") )\n\t\t\t\t\t{\n\t\t\t\t\t\t$seldb = substr($query, strpos($query,'`')+1, strlen($query));\n\t\t\t\t\t\t$seldb = substr($seldb, '0', strpos($seldb, \"`\"));\n\t\t\t\t\t\tmysql_select_db($seldb, $this->link);\n\t\t\t\t\t\t// could use query with \"use database \" and the name of database\n//echo \"paso41\";\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\t@mysql_close($this->link);\n\t\t\t$sucess = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sucess = false;\n\t\t\t//exit();\n\t\t}\n/*\t\t\n\t\t$dump = shell_exec('which mysql');\n\t\t$gdb = $dump.\" --host=\".$server.\" --user=\".$dbuser.\" --pass=\".$dbpass.\" --database=\".$seldb.\" < \".$file;\necho $gdb;\n\t\t@shell_exec( $gdb );\n*/\n\t\tif ( $remove ) {\n\t\t\t// se borra el archivo temporal\n\t\t\tunlink( $file );\n\t\t}\n\t\t\t\t\n\t\treturn $sucess;\n\t}", "title": "" }, { "docid": "08c38dbe7042960cb2431426999352e6", "score": "0.49495086", "text": "function tripal_core_install_sql($sql_file) {\n\n $chado_local = chado_dbschema_exists('chado');\n\n // determine the schema name.\n $chado_schema = tripal_get_schema_name('chado');\n $chado_dot = $chado_schema . '.';\n\n if ($chado_local) {\n db_query(\"set search_path to $chado_schema\");\n }\n print \"Loading $sql_file...\\n\";\n $lines = file($sql_file, FILE_SKIP_EMPTY_LINES);\n\n if (!$lines) {\n return 'Cannot open $schema_file';\n }\n\n $stack = array();\n $in_string = 0;\n $in_function = FALSE;\n $query = '';\n $i = 0;\n $success = 1;\n foreach ($lines as $line_num => $line) {\n $i++;\n $type = '';\n // find and remove comments except when inside of strings\n if (preg_match('/--/', $line) and !$in_string and !preg_match(\"/'.*?--.*?'/\", $line)) {\n $line = preg_replace('/--.*$/', '', $line); // remove comments\n }\n if (preg_match('/\\/\\*.*?\\*\\//', $line)) {\n $line = preg_replace('/\\/\\*.*?\\*\\//', '', $line); // remove comments\n }\n // skip empty lines\n if (preg_match('/^\\s*$/', $line) or strcmp($line, '')==0) {\n continue;\n }\n // Find SQL for new objects\n if (preg_match('/^\\s*CREATE\\s+TABLE/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'table';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*ALTER\\s+TABLE\\s+/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'alter_table';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*SET/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'set';\n }\n if (preg_match('/^\\s*CREATE\\s+SCHEMA/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'schema';\n }\n if (preg_match('/^\\s*CREATE\\s+SEQUENCE/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'sequence';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*CREATE\\s+(?:OR\\s+REPLACE\\s+)*VIEW/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'view';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*COMMENT/i', $line) and !$in_string and sizeof($stack)==0 and !$in_function) {\n $stack[] = 'comment';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*CREATE\\s+(?:OR\\s+REPLACE\\s+)*FUNCTION/i', $line) and !$in_string and !$in_function) {\n $in_function = TRUE;\n $stack[] = 'function';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*CREATE\\s+INDEX/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'index';\n }\n if (preg_match('/^\\s*INSERT\\s+INTO/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'insert';\n $line = preg_replace(\"/public\\./\", $chado_dot, $line);\n }\n if (preg_match('/^\\s*CREATE\\s+TYPE/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'type';\n }\n if (preg_match('/^\\s*GRANT/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'grant';\n }\n if (preg_match('/^\\s*CREATE\\s+AGGREGATE/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'aggregate';\n }\n if (preg_match('/^\\s*DROP\\s+FUNCTION/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'drop_function';\n }\n if (preg_match('/^\\s*DROP\\s+VIEW/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'drop_view';\n }\n if (preg_match('/^\\s*DROP\\s+INDEX/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'drop_index';\n }\n if (preg_match('/^\\s*DROP\\s+SEQUENCE/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'drop_seq';\n }\n if (preg_match('/^\\s*ALTER\\s+TYPE\\s+/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'alter_type';\n }\n if (preg_match('/^\\s*ALTER\\s+SEQUENCE\\s+/i', $line) and !$in_string and !$in_function) {\n $stack[] = 'alter_seq';\n }\n\n // determine if we are in a string that spans a line\n $matches = preg_match_all(\"/[']/i\", $line, $temp);\n $in_string = $in_string - ($matches % 2);\n $in_string = abs($in_string);\n\n // if we've reached the end of an object then pop the stack\n if (strcmp($stack[sizeof($stack)-1], 'table') == 0 and preg_match('/\\);\\s*$/', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'alter_table') == 0 and preg_match('/;\\s*$/', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'set') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'schema') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'sequence') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'view') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'comment') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'function') == 0) {\n\n if(preg_match('/LANGUAGE.*?;\\s*$/i', $line)) {\n $type = array_pop($stack);\n $in_function = FALSE;\n //print \"FUNCTION DONE ($i): $line\";\n }\n else if(preg_match('/\\$_\\$;\\s*$/i', $line)) {\n $type = array_pop($stack);\n $in_function = FALSE;\n //print \"FUNCTION DONE ($i): $line\";\n }\n else if(preg_match('/\\$\\$;\\s*$/i', $line)) {\n $type = array_pop($stack);\n $in_function = FALSE;\n // print \"FUNCTION DONE ($i): $line\";\n }\n else {\n // print \"FUNCTION ($i): $line\";\n }\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'index') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'insert') == 0 and preg_match('/\\);\\s*$/', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'type') == 0 and preg_match('/\\);\\s*$/', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'grant') == 0 and preg_match('/;\\s*$/', $line) and !$in_string) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'aggregate') == 0 and preg_match('/\\);\\s*$/', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'drop_function') == 0 and preg_match('/;\\s*$/i', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'drop_view') == 0 and preg_match('/;\\s*$/i', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'drop_index') == 0 and preg_match(\"/;\\s*$/i\", $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'drop_seq') == 0 and preg_match(\"/;\\s*$/i\", $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'alter_type') == 0 and preg_match('/;\\s*$/i', $line)) {\n $type = array_pop($stack);\n }\n elseif (strcmp($stack[sizeof($stack)-1], 'alter_seq') == 0 and preg_match('/;\\s*$/i', $line)) {\n $type = array_pop($stack);\n }\n // if we're in a recognized SQL statement then let's keep track of lines\n if ($type or sizeof($stack) > 0) {\n $query .= \"$line\";\n }\n else {\n throw new Exception(\"UNHANDLED $i, $in_string: $line\");\n }\n if (preg_match_all(\"/\\n/\", $query, $temp) > 1000) {\n throw new Exception(\"SQL query is too long. Terminating:\\n$query\\n\");\n }\n if ($type and sizeof($stack) == 0) {\n //print \"Adding $type: line $i\\n\";\n // rewrite the set search_path to make 'public' be 'chado', but only if the\n // chado schema exists\n if (strcmp($type, 'set') == 0 and $chado_local) {\n $query = preg_replace(\"/public/m\", $chado_schema, $query);\n }\n\n // execute the statement\n try {\n $result = db_query($query);\n }\n catch (Exception $e) {\n $error = $e->getMessage();\n throw new Exception(\"FAILED. Line $i, $in_string\\n$error:\\n$query\\n\\n\");\n }\n\n if (!$result) {\n $error = pg_last_error();\n throw new Exception(\"FAILED. Line $i, $in_string\\n$error:\\n$query\\n\\n\");\n }\n $query = '';\n }\n }\n tripal_core_chado_install_done();\n return $success;\n}", "title": "" }, { "docid": "8274b2039792ac0e55ec3f6b0c46650c", "score": "0.49489295", "text": "public function dataFromDatabase($data);", "title": "" }, { "docid": "e49c646ff5b2af9b3f418f967398eec2", "score": "0.4938894", "text": "public function getDownSQL()\n {\n return array (\n 'conf_booker_db' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `conferences`;\n\nALTER TABLE `participants` DROP FOREIGN KEY `participants_fk_69bd79`;\n\nALTER TABLE `participants` DROP FOREIGN KEY `participants_fk_2bf1ae`;\n\nDROP INDEX `participants_fi_69bd79` ON `participants`;\n\nDROP INDEX `participants_fi_2bf1ae` ON `participants`;\n\nALTER TABLE `participants`\n\n DROP PRIMARY KEY,\n\n ADD `name` VARCHAR(32) AFTER `id`,\n\n DROP `date`,\n\n DROP `user_id`,\n\n DROP `conf_id`,\n\n ADD PRIMARY KEY (`id`);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "a5081d2ac93216d168e4d66191e1b2bd", "score": "0.4937191", "text": "public function getUpSQL()\n {\n return array (\n 'mysql' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nRENAME TABLE `interface_type` TO `storage_interface_type`;\n\nALTER TABLE `motherboard_storage_interface_type` DROP FOREIGN KEY `motherboard_storage_interface_type_fk_aa1d06`;\n\nDROP INDEX `motherboard_storage_interface_type_fi_aa1d06` ON `motherboard_storage_interface_type`;\n\nCREATE INDEX `motherboard_storage_interface_type_fi_3d0d98` ON `motherboard_storage_interface_type` (`storage_interface_type_id`);\n\nALTER TABLE `motherboard_storage_interface_type` ADD CONSTRAINT `motherboard_storage_interface_type_fk_3d0d98`\n FOREIGN KEY (`storage_interface_type_id`)\n REFERENCES `storage_interface_type` (`id`);\n\nALTER TABLE `storage_device` DROP FOREIGN KEY `storage_device_fk_500d78`;\n\nDROP INDEX `storage_device_fi_500d78` ON `storage_device`;\n\nALTER TABLE `storage_device`\n\n CHANGE `interface_type_id` `storage_interface_type_id` INTEGER(7) NOT NULL;\n\nCREATE INDEX `storage_device_fi_3d0d98` ON `storage_device` (`storage_interface_type_id`);\n\nALTER TABLE `storage_device` ADD CONSTRAINT `storage_device_fk_3d0d98`\n FOREIGN KEY (`storage_interface_type_id`)\n REFERENCES `storage_interface_type` (`id`);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "4fbc5ae6b8e642ce86096b2f4b522162", "score": "0.49349836", "text": "public function getDownSQL()\n {\n return array (\n 'mysql' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nRENAME TABLE `storage_interface_type` TO `interface_type`;\n\nALTER TABLE `motherboard_storage_interface_type` DROP FOREIGN KEY `motherboard_storage_interface_type_fk_3d0d98`;\n\nDROP INDEX `motherboard_storage_interface_type_fi_3d0d98` ON `motherboard_storage_interface_type`;\n\nCREATE INDEX `motherboard_storage_interface_type_fi_aa1d06` ON `motherboard_storage_interface_type` (`storage_interface_type_id`);\n\nALTER TABLE `motherboard_storage_interface_type` ADD CONSTRAINT `motherboard_storage_interface_type_fk_aa1d06`\n FOREIGN KEY (`storage_interface_type_id`)\n REFERENCES `interface_type` (`id`);\n\nALTER TABLE `storage_device` DROP FOREIGN KEY `storage_device_fk_3d0d98`;\n\nDROP INDEX `storage_device_fi_3d0d98` ON `storage_device`;\n\nALTER TABLE `storage_device`\n\n CHANGE `storage_interface_type_id` `interface_type_id` INTEGER(7) NOT NULL;\n\nCREATE INDEX `storage_device_fi_500d78` ON `storage_device` (`interface_type_id`);\n\nALTER TABLE `storage_device` ADD CONSTRAINT `storage_device_fk_500d78`\n FOREIGN KEY (`interface_type_id`)\n REFERENCES `interface_type` (`id`);\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "4d7e93219d2ff794177dd142fbde744b", "score": "0.4933435", "text": "public function run() {\n\t\t\\DB::statement(\"INSERT INTO efectores.tipo_dependencia_administrativa(id_dependencia_administrativa,sigla,descripcion)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_dependencia_administrativa,sigla,descripcion\n\t\t FROM efectores.tipo_dependencia_administrativa')\n\t AS migracion(id_dependencia_administrativa integer,\n sigla character varying(4),\n descripcion character varying(50))\n);\");\n\t}", "title": "" }, { "docid": "eca0b911baa07b2037fca2dc4fc34655", "score": "0.49331275", "text": "private function sanitizeMysqlDump(string $mysqlDumpFilePath): void\n {\n $dump = file_get_contents($mysqlDumpFilePath);\n $dump = mb_convert_encoding($dump, 'UTF-8', 'windows-1252');\n $lines = explode(\"\\n\", $dump);\n\n $includedLines = [];\n foreach ($lines as $line) {\n $line = trim($line);\n if (strpos($line, 'KEY') === false) {\n if (strpos($line, ')') === 0) {\n $lastIndex = count($includedLines) - 1;\n $includedLines[$lastIndex] = rtrim($includedLines[$lastIndex], ',');\n }\n\n $line = preg_replace('/COLLATE\\s.*?(\\s|$)/', '', $line);\n $line = preg_replace('/CHARACTER\\sSET\\s.*?(\\s|$)/', '', $line);\n $line = str_replace(' unsigned', '', $line);\n $line = str_replace(\"\\\\'\", \"''\", $line);\n\n $includedLines[] = $line;\n }\n }\n\n file_put_contents($mysqlDumpFilePath, implode(\"\\n\", $includedLines));\n }", "title": "" }, { "docid": "9cd690cb91bef0df9f5e8fb01c856efc", "score": "0.49320656", "text": "function postDBConnection() {\n\t\t// Post connection setup\n\t\tswitch ($this->mType) {\n\t\t\tcase \"sybase\":\n\t\t\tcase \"mssql\":\n\t\t\t\t$this->mDb->Execute(\"set quoted_identifier on\");\n\t\t\t\tbreak;\n\t\t\tcase \"mysql\":\n\t\t\t\t$version = $this->getDatabaseVersion();\n\t\t\t\tif( ($version['major'] >= 4 && $version['minor'] >=1) || ($version['major'] >= 5) ) {\t\n\t\t\t\t\t$this->mDb->Execute(\"set session sql_mode='PIPES_AS_CONCAT'\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"postgres\":\n\t\t\t\t// Do a little prep work for postgres, no break, cause we want default case too\n\t\t\t\tif (defined(\"BIT_DB_PREFIX\") && preg_match( \"/\\./\", BIT_DB_PREFIX) ) {\n\t\t\t\t\t$schema = preg_replace(\"/[`\\.]/\", \"\", BIT_DB_PREFIX);\n\t\t\t\t\t// Assume we want to dump in a schema, so set the search path and nuke the prefix here.\n\t\t\t\t\t// $result = $this->mDb->Execute( \"SET search_path TO $schema,public\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "e83225eb663dac8386644a79da4eb338", "score": "0.49311894", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP INDEX `consultant_FI_2` ON `consultant`;\n\nALTER TABLE `consultant` CHANGE `internal_id` `group_id` INTEGER NOT NULL;\n\nALTER TABLE `consultant`\n ADD `password` VARCHAR(255) NOT NULL AFTER `crh_id`,\n ADD `email` VARCHAR(255) NOT NULL AFTER `group_id`,\n ADD `firstname` VARCHAR(255) NOT NULL AFTER `email`,\n ADD `lastname` VARCHAR(255) NOT NULL AFTER `firstname`,\n ADD `telephone` VARCHAR(255) AFTER `lastname`,\n ADD `mobile` VARCHAR(255) AFTER `telephone`,\n ADD `created_at` DATETIME AFTER `mobile`,\n ADD `updated_at` DATETIME AFTER `created_at`,\n ADD `tree_left` INTEGER AFTER `updated_at`,\n ADD `tree_right` INTEGER AFTER `tree_left`,\n ADD `tree_level` INTEGER AFTER `tree_right`,\n ADD `tree_scope` INTEGER AFTER `tree_level`;\n\nCREATE INDEX `consultant_I_2` ON `consultant` (`group_id`);\n\nCREATE UNIQUE INDEX `consultant_U_1` ON `consultant` (`email`);\n\nALTER TABLE `internal`\n ADD `descendant_class` VARCHAR(100) AFTER `tree_scope`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "131b44e72a265988e12b87e01ffadd0f", "score": "0.49307016", "text": "public function export()\n {\n $tableName = $this->db->quoteTableName($this->logTable);\n $sql = \"INSERT INTO $tableName ([[level]], [[category]], [[log_time]], [[prefix]], [[message]], [[model]], [[blame]])\n VALUES (:level, :category, :log_time, :prefix, :message, :model, :blame)\";\n $command = $this->db->createCommand($sql);\n foreach ($this->messages as $message) {\n list($text, $level, $category, $timestamp) = $message;\n $extracted = [\n 'msg' => '',\n 'model' => null,\n 'blame' => null,\n ];\n if (is_array($text) && (isset($text['msg']) || isset($text['model']) || isset($text['blame']))) {\n if (isset($text['msg'])) {\n if (!is_string($text['msg'])) {\n $extracted['msg'] = VarDumper::export($text['msg']);\n }\n else {\n $extracted['msg'] = $text['msg'];\n }\n }\n if (isset($text['model'])) {\n $extracted['model'] = $text['model'];\n }\n if (isset($text['blame'])) {\n $extracted['blame'] = $text['blame'];\n }\n }\n elseif (is_string($text)) {\n $extracted['msg'] = $text;\n }\n else {\n $extracted['msg'] = VarDumper::export($text);\n }\n $command->bindValues([\n ':level' => $level,\n ':category' => $category,\n ':log_time' => $timestamp,\n ':prefix' => $this->getMessagePrefix($message),\n ':message' => $extracted['msg'],\n ':model' => $extracted['model'],\n ':blame' => $extracted['blame'],\n ])->execute();\n }\n }", "title": "" }, { "docid": "aa2585e3bb57c16d159d3c45491bf4bc", "score": "0.49295163", "text": "function _get_tables_data()\n\t{\n\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"JoomlapackDumperMysqlnew :: Starting CREATE TABLE and dependency scanning\");\n\n\t\t// Get a database connection\n\t\t$db =& $this->_getDB();\n\t\tif($this->getError()) return;\n\n\t\t// Reset internal tables\n\t\t$this->_tables_data = array();\n\t\t$this->_dependencies = array();\n\t\t\n\t\t// Get a list of tables where their engine type is shown\n\t\t$sql = 'SHOW TABLE STATUS';\n\t\t$db->setQuery( $sql );\n\t\t$metadata_list = $db->loadRowList();\n\t\t\n\t\tforeach($metadata_list as $table_metadata)\n\t\t{\n\t\t\t// Skip over tables not included in the backup set\n\t\t\tif(!array_key_exists($table_metadata[0], $this->_table_name_map)) continue;\n\n\t\t\t// Basic information\n\t\t\t$table_name = $table_metadata[0];\n\t\t\t$table_abstract = $this->_table_name_map[$table_metadata[0]];\n\t\t\t$new_entry = array(\n\t\t\t\t'type'\t\t\t=> 'table',\n\t\t\t\t'dump_records'\t=> true\n\t\t\t);\n\t\t\t\n\t\t\tswitch($table_metadata[1])\n\t\t\t{\n\t\t\t\t// Views\n\t\t\t\tcase null:\n\t\t\t\t\t$new_entry['type'] = 'view';\n\t\t\t\t\t$new_entry['dump_records'] = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Merge tables\n\t\t\t\tcase 'MRG_MYISAM':\n\t\t\t\t\t$new_entry['type'] = 'merge';\n\t\t\t\t\t$new_entry['dump_records'] = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Tables whose data we do not back up (memory, federated and can-have-no-data tables)\n\t\t\t\tcase 'MEMORY':\n\t\t\t\tcase 'EXAMPLE':\n\t\t\t\tcase 'BLACKHOLE':\n\t\t\t\tcase 'FEDERATED':\n\t\t\t\t\t$new_entry['dump_records'] = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Normal tables\n\t\t\t\tdefault:\n\t\t\t\t\t// @todo Table Data Filter - set dump_records to FALSE if array belongs to those filters\n\t\t\t\t\tbreak;\n\t\t\t} // switch\n\t\t\t\n\t\t\t$dependencies = array();\n\t\t\t$new_entry['create'] = $this->_get_create($table_abstract, $table_name, $new_entry['type'], $dependencies);\n\t\t\t$new_entry['dependencies'] = $dependencies;\n\t\t\t$this->_tables_data[$table_name] = $new_entry;\n\t\t} // foreach\n\n\t\t// If we have MySQL > 5.0 add stored procedures, stored functions and triggers\n\t\t$verParts = explode( '.', $db->getVersion() );\n\t\tif ($verParts[0] == 5)\n\t\t{\n\t\t\t// Get a list of procedures\n\t\t\t$sql = 'SHOW PROCEDURE STATUS WHERE `Db`='.$db->Quote($this->_database);\n\t\t\t$db->setQuery( $sql );\n\t\t\t$metadata_list = $db->loadRowList();\n\t\t\t\n\t\t\tif(is_array($metadata_list))\n\t\t\tif(count($metadata_list))\n\t\t\tforeach($metadata_list as $entity_metadata)\n\t\t\t{\n\t\t\t\t// Skip over entities not included in the backup set\n\t\t\t\tif(!array_key_exists($entity_metadata[1], $this->_table_name_map)) continue;\n\t\n\t\t\t\t// Basic information\n\t\t\t\t$entity_name = $entity_metadata[1];\n\t\t\t\t$entity_abstract = $this->_table_name_map[$entity_metadata[1]];\n\t\t\t\t$new_entry = array(\n\t\t\t\t\t'type'\t\t\t=> 'procedure',\n\t\t\t\t\t'dump_records'\t=> false\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// There's no point trying to add a non-procedure entity\n\t\t\t\tif($entity_metadata[2] != 'PROCEDURE') continue;\n\t\t\t\t\n\t\t\t\t$dependencies = array();\n\t\t\t\t$new_entry['create'] = $this->_get_create($entity_abstract, $entity_name, $new_entry['type'], $dependencies);\n\t\t\t\t$new_entry['dependencies'] = $dependencies;\n\t\t\t\t$this->_tables_data[$entity_name] = $new_entry;\n\t\t\t} // foreach\n\t\t\t\n\t\t\t// Get a list of functions\n\t\t\t$sql = 'SHOW FUNCTION STATUS WHERE `Db`='.$db->Quote($this->_database);\n\t\t\t$db->setQuery( $sql );\n\t\t\t$metadata_list = $db->loadRowList();\n\t\t\t\n\t\t\tif(is_array($metadata_list))\n\t\t\tif(count($metadata_list))\n\t\t\tforeach($metadata_list as $entity_metadata)\n\t\t\t{\n\t\t\t\t// Skip over entities not included in the backup set\n\t\t\t\tif(!array_key_exists($entity_metadata[1], $this->_table_name_map)) continue;\n\t\n\t\t\t\t// Basic information\n\t\t\t\t$entity_name = $entity_metadata[1];\n\t\t\t\t$entity_abstract = $this->_table_name_map[$entity_metadata[1]];\n\t\t\t\t$new_entry = array(\n\t\t\t\t\t'type'\t\t\t=> 'function',\n\t\t\t\t\t'dump_records'\t=> false\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// There's no point trying to add a non-function entity\n\t\t\t\tif($entity_metadata[2] != 'FUNCTION') continue;\n\t\t\t\t\n\t\t\t\t$dependencies = array();\n\t\t\t\t$new_entry['create'] = $this->_get_create($entity_abstract, $entity_name, $new_entry['type'], $dependencies);\n\t\t\t\t$new_entry['dependencies'] = $dependencies;\n\t\t\t\t$this->_tables_data[$entity_name] = $new_entry;\n\t\t\t} // foreach\n\t\t\t\t\t\t\n\t\t\t// Get a list of triggers\n\t\t\t$sql = 'SHOW TRIGGERS';\n\t\t\t$db->setQuery( $sql );\n\t\t\t$metadata_list = $db->loadRowList();\n\t\t\t\n\t\t\tif(is_array($metadata_list))\n\t\t\tif(count($metadata_list))\n\t\t\tforeach($metadata_list as $entity_metadata)\n\t\t\t{\n\t\t\t\t// Skip over entities not included in the backup set\n\t\t\t\tif(!array_key_exists($entity_metadata[0], $this->_table_name_map)) continue;\n\t\n\t\t\t\t// Basic information\n\t\t\t\t$entity_name = $entity_metadata[0];\n\t\t\t\t$entity_abstract = $this->_table_name_map[$entity_metadata[0]];\n\t\t\t\t$new_entry = array(\n\t\t\t\t\t'type'\t\t\t=> 'trigger',\n\t\t\t\t\t'dump_records'\t=> false\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$dependencies = array();\n\t\t\t\t$new_entry['create'] = $this->_get_create($entity_abstract, $entity_name, $new_entry['type'], $dependencies);\n\t\t\t\t$new_entry['dependencies'] = $dependencies;\n\t\t\t\t$this->_tables_data[$entity_name] = $new_entry;\n\t\t\t} // foreach\n\t\t}\n\t\t\n\t\t// Only store unique values\n\t\tif(count($dependencies) > 0)\n\t\t\t$dependencies = array_unique($dependencies);\n\t}", "title": "" } ]
20a355b36b86f488d274733c33aeed33
Get value of mess1 > varchar(255)
[ { "docid": "9372438be7738822175ef73b66da68f6", "score": "0.7015053", "text": "public function getMess1() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(16, $this->_result)) return (string) $this->_result[16];\n\t\t\telse parent::throwGetColException('Not set UsersTemplatesModel::getMess1', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From UsersTemplatesModel::getMess1', __LINE__, __FILE__);\n\t}", "title": "" } ]
[ { "docid": "f9709b0d381558aaf3495934274771ef", "score": "0.6722656", "text": "public function getMess2() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(17, $this->_result)) return (string) $this->_result[17];\n\t\t\telse parent::throwGetColException('Not set UsersTemplatesModel::getMess2', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From UsersTemplatesModel::getMess2', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "c39be70222790345f576839c83679365", "score": "0.64853114", "text": "public function messageValue():string\n {\n switch ($this->entity->type) {\n case 1:\n switch ($this->entity->message){\n case 0:\n return 'No Disponible';\n break;\n case 1:\n return 'Libre';\n break;\n case 2:\n return 'Ocupado';\n break;\n default:\n return 'No Valido';\n break;\n }\n break;\n default:\n return $this->entity->message;\n break;\n }\n }", "title": "" }, { "docid": "8f136bcb969943b9fdd53efd33984683", "score": "0.6400347", "text": "public function getMess3() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(18, $this->_result)) return (string) $this->_result[18];\n\t\t\telse parent::throwGetColException('Not set UsersTemplatesModel::getMess3', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From UsersTemplatesModel::getMess3', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "c6131bf5f4422416b7b26dc2c237dd1f", "score": "0.61476976", "text": "public function getMess5() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(20, $this->_result)) return (string) $this->_result[20];\n\t\t\telse parent::throwGetColException('Not set UsersTemplatesModel::getMess5', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From UsersTemplatesModel::getMess5', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "310b4ccba6fac5e95d0b40d6f4fc2c48", "score": "0.60981023", "text": "public function getMsg()\n {\n $value = $this->get(self::MSG);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d1c11a0def664c644b053b2b31354565", "score": "0.60952437", "text": "public function getMsg()\n {\n $value = $this->get(self::MSG_);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "3e1d5199abcacb5a754b59cf15854a5e", "score": "0.6013696", "text": "public function getMess4() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(19, $this->_result)) return (string) $this->_result[19];\n\t\t\telse parent::throwGetColException('Not set UsersTemplatesModel::getMess4', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From UsersTemplatesModel::getMess4', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "b02066db1cdee4a48d14f7fa01b39043", "score": "0.6003943", "text": "public function getAddtext1() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(11, $this->_result)) return (string) $this->_result[11];\n\t\t\telse parent::throwGetColException('Not set CampaignPagesModel::getAddtext1', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignPagesModel::getAddtext1', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "7daefacf45ff030964f66838323c46cd", "score": "0.5942187", "text": "protected function MessageText() {\n\t$tMsgs = $this->MessageTable();\n\t$rcMsg = $tMsgs->Record_forOrder($this->GetKeyValue(),vctOrders::MT_INSTRUC);\n// \t$rcMsg->NextRow();\n\tif ($rcMsg->HasRows()) {\n\t return $rcMsg->MessageText();\n\t} else {\n\t return NULL;\n\t}\n }", "title": "" }, { "docid": "3cc4b32fe3a2d0bd7cd86621b4d91c3b", "score": "0.5925901", "text": "public function getMessage(){\n\t\treturn @$this->_message[$this->_position];\n\t}", "title": "" }, { "docid": "6f5c44bfc939f7b080e41792dd6105ef", "score": "0.5809281", "text": "public function getMessage()\n {\n $value = $this->get(self::message);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "5b0579ea17d88af5a86166c0a69038ca", "score": "0.58001095", "text": "public function cogerDetalleMensaje()\n {\n $table = $this->tipo == 'E' ? 'fe_emisiones' : 'fe_recepciones';\n $sql = \"SELECT mensaje FROM $table WHERE clave=? AND id_empresa=?\";\n $stmt = $this->container['db']->prepare($sql);\n $stmt->bind_param('si', $this->clave, $this->id);\n $stmt->execute();\n return $stmt->get_result()->fetch_row()[0];\n }", "title": "" }, { "docid": "43021a0a8e4af7d1cfcfea1735d10be3", "score": "0.5800046", "text": "static function getMesData($data) {\r\n\t\t$data = explode('-', $data);\r\n\t\treturn $data[1];\r\n\t}", "title": "" }, { "docid": "13fca22e315d6de8bd0d596b435fbfb4", "score": "0.57656956", "text": "public function getMessAspod() {\n return $this->messAspod;\n }", "title": "" }, { "docid": "6d5211c57e8f0bed837ac52bb9368f3c", "score": "0.57588446", "text": "public function getMessage()\n {\n return $this->infProt->getElementsByTagName('xMotivo')->item(0)->textContent;\n }", "title": "" }, { "docid": "d1bc1162362e14a02f574ac42d51e037", "score": "0.5713171", "text": "public function getRemittanceInfo1()\n {\n return (string) substr($this->getUserMessage(), 0, self::REMITTANCE_INFO_LENGTH);\n }", "title": "" }, { "docid": "9013b4791970dfe6c255474d78024709", "score": "0.57029057", "text": "public function getAddtext2() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(12, $this->_result)) return (string) $this->_result[12];\n\t\t\telse parent::throwGetColException('Not set CampaignPagesModel::getAddtext2', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignPagesModel::getAddtext2', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "e77b0b7e61798d3898538d64ca66baa9", "score": "0.5702071", "text": "function getMessage()\n\t{\n\t\treturn $this->getParseMessage( $this->msg ) ;\t\n\t}", "title": "" }, { "docid": "b750e1b5f1dc62bf1ff7a92fdbd8987c", "score": "0.56969357", "text": "function getMessageData($uid) {\n\t\t$fields = '*';\n \t\t$where = 'uid=\"'.intval($uid).'\" ';\n \t\t$where .= $this->cObj->enableFields($this->table);\n \t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields,$this->table,$where,$groupBy='',$orderBy='',$limit='1');\n\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n \t}", "title": "" }, { "docid": "92735e260341b786437b8548805aef1b", "score": "0.56831497", "text": "function MessageFromMessageCode($module, $code)\n{\n $db_conn = db_open();\n $table = \"msg_\" . $module;\n $res_message = pg_exec($db_conn, \"SELECT * FROM $table WHERE message_code = '$code'\");\n $arr_message = pg_fetch_array($res_message, 0);\n $message_desc = trim($arr_message[message_desc]);\n return $message_desc;\n}", "title": "" }, { "docid": "02b979a18a0c465754c89e89ee9eefc4", "score": "0.5608977", "text": "public function getMessage(){\n\t\t$message = $this->message ? $this->message : '';\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "d8f903c0a79dcfb6cbae054663aa9e8b", "score": "0.5599928", "text": "public function get_message();", "title": "" }, { "docid": "d8f903c0a79dcfb6cbae054663aa9e8b", "score": "0.5599928", "text": "public function get_message();", "title": "" }, { "docid": "6cff0c8f82a5bc4c713162a527fa982e", "score": "0.5509162", "text": "public function dameMensaje(){\n\t\t\treturn $this->_mensaje;\n\t\t}", "title": "" }, { "docid": "6cdcbfe200eb3d71c5c2dc2bd4fa749f", "score": "0.5508422", "text": "public function getMessageString();", "title": "" }, { "docid": "941fa060f851298d176958e5e999bb9f", "score": "0.55002886", "text": "public function getMessage()\n {\n if ($this->_fields['Message']['FieldValue'] == null) {\n $this->_fields['Message']['FieldValue'] = array();\n }\n return $this->_fields['Message']['FieldValue'];\n }", "title": "" }, { "docid": "5202d9c01c9bec352daee76dc3ea8010", "score": "0.54908735", "text": "public function getMessage(): ?string\n {\n return $this->data['MsgDescricao'];\n }", "title": "" }, { "docid": "7cf4934d805d4f4ee2af7cb01e8994e4", "score": "0.54835737", "text": "function GetSQLValueString($getColumn)\n\t{\n\t\t//return;\n\t\t$dataSchema = $this->dataSchema['data'];\n\t\t$structure = $this->SearchDataType($dataSchema, 'Field', $getColumn);\n\t\t$type = $structure[0]['Type'];\n\t\t$valueIn = $this->_[$getColumn];\n\t\t$valueOut = \"NULL\";\n\t\t\n\t\t// for debug and checking,\n\t\t// i don't kown why it must coding as $type===, otherwise $type='datetime' will cased as float/double\n\t\t$typeCaseAs = \"\";\n\t\t\n\t\tswitch (true) {\n\t\t\tcase strpos($type, \"char\") !== FALSE:\n\t\t\tcase strpos($type, \"varchar\") !== FALSE:\n\t\t\tcase strpos($type, \"text\") !== FALSE:\n\t\t\t\tif(strpos($valueIn, \"'\")==0 && strrpos($valueIn, \"'\")==strlen($valueIn)-1 && strlen($valueIn) != 1){\n\t\t\t\t\t$valueOut = $valueIn;\n\t\t\t\t}else{\n\t\t\t\t\t$valueOut = ($valueIn != \"\") ? \"'\" . $valueIn . \"'\" : NULL;\n\t\t\t\t}\n\n\t\t\t\t// $valueOut = $this->dbc->real_escape_string($valueIn);\n\n\t\t\t\t$typeCaseAs = \"text\";\n\n\t\t\t\tbreak;\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/integer-types.html\n\t\t\tcase $type === \"tinyint\": // -128 to 127, 0 to 255\n\t\t\tcase $type === \"smallint\": // -32768 to 32767, 0 to 65535\n\t\t\tcase $type === \"mediumint\": // -8388608 to 8388607, 0 to 16777215\n\t\t\tcase strpos($type, \"int\") !== FALSE: // -2147483648 to 2147483647, 0 to 4294967295\n\t\t\tcase $type === \"bigint\": // -9223372036854775808 to 9223372036854775807, 0 to 18446744073709551615\n\t\t\tcase strpos($type, \"year\") !== FALSE: // 1901 to 2155\n // both are cannot identify the $valueIn is NULL, always convert the NULL to 0 and return\n// $valueOut = ($valueIn != \"\" && $valueIn != null) ? intval($valueIn) : \"NULL\";\n//\t\t\t\t$valueOut = (is_null($valueIn) || $valueIn == \"\" || $valueIn == null) ? echo \"NULL\" : intval($valueIn);\n $valueOut = is_int($valueIn) || gettype($valueIn)==\"string\" ? intval($valueIn) : \"NULL\";\n \n\t\t\t\t$typeCaseAs = \"integer\";\n\t\t\t\tbreak;\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/fixed-point-types.html\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/floating-point-types.html\n\t\t\tcase strpos($type, \"float\") !== FALSE:\n\t\t\tcase strpos($type, \"double\") !== FALSE:\n\t\t\tcase strpos($type, \"decimal\") !== FALSE:\n//\t\t\t\t$valueOut = ($valueIn != \"\") ? doubleval($valueIn) : NULL;\n $valueOut = is_float($valueIn) ? doubleval($valueIn) : \"NULL\";\n\t\t\t\t$typeCaseAs = \"decimal\";\n\t\t\t\tbreak;\n\t\t\tcase $type===\"date\":\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t//$valueOut = date(\"Y-m-d\");\n\t\t\t\t\t$valueOut = NULL;\n\t\t\t\t\treturn $valueOut;\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d\", mktime(\n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t$tmpDate[\"month\"], \n\t\t\t\t\t\t\t$tmpDate[\"day\"], \n\t\t\t\t\t\t\t$tmpDate[\"year\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\t\t\t\t/*\n\t\t\t\tif(is_string($valueIn)){\n\t\t\t\t\t$valueOut = $valueIn;\n\t\t\t\t}else{\n\t\t\t\t\t$valueOut = ($valueIn != \"\") ? \"'\" . $valueIn . \"'\" : \"NULL\";\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$typeCaseAs = \"date\";\n\t\t\t\tbreak;\n\t\t\tcase $type===\"datetime\":\n\t\t\tcase $type===\"timestamp\":\n\t\t\t\t$valueOut = NULL;\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t//$valueOut = date(\"Y-m-d H:i:s\");\n\t\t\t\t\treturn $valueOut;\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d H:i:s\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d H:i:s\", mktime(\n\t\t\t\t\t\t\t$tmpDate[\"hour\"], \n\t\t\t\t\t\t\t$tmpDate[\"minute\"], \n\t\t\t\t\t\t\t$tmpDate[\"second\"], \n\t\t\t\t\t\t\t$tmpDate[\"month\"], \n\t\t\t\t\t\t\t$tmpDate[\"day\"], \n\t\t\t\t\t\t\t$tmpDate[\"year\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif(!is_null($valueOut) && !empty($valueOut))\n\t\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\n\t\t\t\t$typeCaseAs = \"datetime\";\n\n\t\t\t\tbreak;\n\t\t\tcase $type===\"time\":\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t$valueOut = date(\"H:i:s\");\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"H:i:s\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"H:i:s\", mktime(\n\t\t\t\t\t\t\t$tmpDate[\"hour\"], \n\t\t\t\t\t\t\t$tmpDate[\"minute\"], \n\t\t\t\t\t\t\t$tmpDate[\"second\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\t\t\t\t$typeCaseAs = \"time\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// echo \"value in:$valueIn, type:$type, entryType:$typeCaseAs, value out:$valueOut \\r\\n\";\n\t\treturn $valueOut;\n\t}", "title": "" }, { "docid": "bba86cb6b70c5d380ef0bed989bd9b00", "score": "0.5478729", "text": "function db2value($rec)\n {\n if (atkconfig('database') != 'oci9')\n return stripslashes($rec[$this->fieldName()]);\n else\n return $rec[$this->fieldName()];\n }", "title": "" }, { "docid": "eeca390a0f57c558c9159f4d6f3bf078", "score": "0.5468789", "text": "public function getMassage($id) {\n $data = $this->db->select(\"SELECT * FROM massage WHERE id_massage = :id_massage\", array(\n \":id_massage\" => $id\n ));\n return $data[0];\n }", "title": "" }, { "docid": "7d8f32c34939a0b8a3914f9b259f1f33", "score": "0.5454033", "text": "public function message()\n {\n $point = PointsModel::where('code', Request::get('id'))->first();\n return \"В точке работает пользователь {$point->operator_ldap}\";\n }", "title": "" }, { "docid": "23e239d08200bcaf038f35acdfe6ea4e", "score": "0.5453509", "text": "public function getCritereTexte1(): ?string {\n return $this->critereTexte1;\n }", "title": "" }, { "docid": "79fd36b4fd125817f96570d1394792be", "score": "0.5452537", "text": "function data_postOneDetail($id, $column){\n\t$result = \"\";\n\t$query = \"SELECT $column FROM messageboard WHERE id = \\\"$id\\\";\";\n\t$result = exec_scalar($query);\n\treturn $result;\n}", "title": "" }, { "docid": "705e4a5f766d7b6a42853f257645c77a", "score": "0.54472286", "text": "public function getMessageContent() :string {\n\t\treturn ($this->messageContent);\n\t}", "title": "" }, { "docid": "d79bfac0584b50d41ab348a5d9b12a01", "score": "0.5437222", "text": "public function get_data_string($query)\n\t\t{\n\t\t\tif ($query === NULL)\n\t\t\t\treturn \"error\";\n\t\t\t\n\t\t\t$query = $this->db->query($query);\n \treturn $query->result_array();\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "e7c43e561db5085c10bbbe9f82441d23", "score": "0.5435548", "text": "public function getMessage(): ?string {\n $val = $this->getBackingStore()->get('message');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'message'\");\n }", "title": "" }, { "docid": "7dcd6a598c96a576c34e428e09955e67", "score": "0.54263514", "text": "function getMessage() ;", "title": "" }, { "docid": "169cdb404c1b753e5b9e9fa0d12cbe4b", "score": "0.54245806", "text": "function getMessageIDByID($sup_id)\n {\n $stmt = \"SELECT\n sup_message_id\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"support_email\n WHERE\n sup_id=\" . Misc::escapeInteger($sup_id);\n $res = DB_Helper::getInstance()->getOne($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return \"\";\n } else {\n return $res;\n }\n }", "title": "" }, { "docid": "3c2bab3f9cbd75e0faf3341eb245982d", "score": "0.5422664", "text": "public function getTelegramMessage(): string;", "title": "" }, { "docid": "4ead33c37c64b36f7772dfeea48c2bbe", "score": "0.5419097", "text": "function messages_type_name($messages_type_id) {\n\n global $con;\n\n $queryB = $con->query(\"SELECT * FROM `messages_type` WHERE `id`='$messages_type_id' ORDER BY `id` ASC limit 1\");\n $row_select = mysqli_fetch_array($queryB);\n $title = $row_select['title'];\n return $title;\n}", "title": "" }, { "docid": "a73a7fc83299478f92372bdf5ef78ae5", "score": "0.54184765", "text": "function getSQLVal($sql)\r\n {\r\n $res=$this->db->query($sql);\r\n if($res)\r\n $row=$res->fetch(PDO::FETCH_NUM);\r\n else\r\n $row=array('');\r\n $res->closeCursor();\r\n return $row[0];\r\n }", "title": "" }, { "docid": "6d0e6583d9c41ffa570ce03b4b34aa3c", "score": "0.541015", "text": "public function getmessage():string\n\t {\n\t return $this->message;\n\t }", "title": "" }, { "docid": "2e387e02b352511144ac6fc4accb0b9d", "score": "0.5402688", "text": "public function getMessage()\n {\n if (array_key_exists('message', $this->_data)) { return $this->_data['message']; }\n return NULL;\n }", "title": "" }, { "docid": "ae000601d1a00b0c8a9b0152bf989a55", "score": "0.5398395", "text": "public function getMsg() \r\n\t{\r\n\t return $this->msg;\r\n\t}", "title": "" }, { "docid": "a5dc6cd8cb172801a10ed7f9319667c4", "score": "0.53951067", "text": "public function getRawMessage(): string|float|int\n {\n return $this->message;\n }", "title": "" }, { "docid": "34287fac1d51fbf13375282ad6f30511", "score": "0.53835225", "text": "private function Value() {\n\t\t// theoretically be some which only show up in xtac. This function\n\t\t// checks for those kinds of fields and displays the proper value.\n\t\treturn ($this->MysqlValue !== null)?\n\t\t\ttrim($this->MysqlValue):\n\t\t\ttrim($this->LdapValue);\n\t}", "title": "" }, { "docid": "d5f6a5e6d2ea9bd5f5a5ae8bdbeb3e02", "score": "0.5378965", "text": "public function message()\n {\n return \"تکراری می باشد{$this->columnName} فیلد \";\n }", "title": "" }, { "docid": "1dc5121c6a108673444c4b2c5e70bf22", "score": "0.5378801", "text": "public function getMsg() {\n\t\t$msg = '';\n\t\tswitch($this->getCode()) {\n\t\t\tcase 3001:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 3002:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 3003:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 3004:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 3005:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 3006:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 4001:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 9001:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tcase 9002:\n\t\t\t\t$msg = sprintf($this->errMsg[$this->code], $this->getMessage());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$msg = sprintf(\"%s\", $this->getMessage());\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "6c97d70bc15beadae0cf4e6bc4a56747", "score": "0.5374789", "text": "public function message() : string{\n\t\treturn $this->message;\n\t}", "title": "" }, { "docid": "e793aa83430780dc288b817eb4522fc4", "score": "0.53711146", "text": "public function getMessage() {\n return @$this->attributes['message'];\n }", "title": "" }, { "docid": "07a0c555b340928ec3955bd2a92f403d", "score": "0.5364122", "text": "public function getSaisieProprieteMess() {\n return $this->saisieProprieteMess;\n }", "title": "" }, { "docid": "50c9fe4ab242cfc51a48e2aa864ce3be", "score": "0.53603154", "text": "public function getStringValue() {}", "title": "" }, { "docid": "50c9fe4ab242cfc51a48e2aa864ce3be", "score": "0.53603154", "text": "public function getStringValue() {}", "title": "" }, { "docid": "50c9fe4ab242cfc51a48e2aa864ce3be", "score": "0.53603154", "text": "public function getStringValue() {}", "title": "" }, { "docid": "b625fe912caa4fd83acd82edfea2ef6a", "score": "0.53584194", "text": "public function getMsg () {\n\t\treturn $this->msg;\n\t}", "title": "" }, { "docid": "8ed04d54105581e44e07435ca12a01d2", "score": "0.5343734", "text": "public function getDataMessage()\n {\n return $this->message;\n }", "title": "" }, { "docid": "366e1c981c2ad3db1108617d6f428124", "score": "0.533922", "text": "public function getTexteMessage()\n\t {\n\t return $this->texteMessage;\n\t }", "title": "" }, { "docid": "07f56b438b0ffb31a39fde2e42ab002a", "score": "0.53369826", "text": "function getValue()\n {\n return (string) $this->_sValue;\n }", "title": "" }, { "docid": "bd98fd2ff0b7cdab46c0db2547d43671", "score": "0.5335927", "text": "private function actual_correlativo_en_maestro()\n {\n $this->abrirConexionPg();\n $this->sql = \"select tipo1 as correlativo from maestro where id=\" . $this->id_padre;\n $data = $this->ejecutarSentenciaPg(2);\n return $data[0]['correlativo'];\n }", "title": "" }, { "docid": "cea3b9865a5fcecc7cba34cbc8ac4e0b", "score": "0.5333396", "text": "public function message_display(){\n\t\t\n\t\t$this->db->query('SELECT * FROM message');\n\t\t\n\t\t$row=$this->db->resultset($query);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "80d5e96923b909daeb9c7bcc73a60dfd", "score": "0.53327274", "text": "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 }", "title": "" }, { "docid": "82aa45d031ad6f773fea37c594250aab", "score": "0.5329375", "text": "protected function _getValue() {\n\t\treturn (string) $this->_data['value'];\n\t}", "title": "" }, { "docid": "7ca5775ee7d4fe0eb244015148314138", "score": "0.5322189", "text": "public function getMessageId(): ?string {\n $val = $this->getBackingStore()->get('messageId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'messageId'\");\n }", "title": "" }, { "docid": "e30447a3cfc12ef97433e7a82d95f167", "score": "0.53149515", "text": "public function getMessage(): Trytes\n {\n return $this->message;\n }", "title": "" }, { "docid": "f3291a9af5bfad5096bd8a0b28646a04", "score": "0.53066057", "text": "public function getMessageId()\n {\n $value = $this->get(self::MESSAGEID);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "5e7e0b982fdd2f5f9dc97118384096c1", "score": "0.52935857", "text": "public function get($parameter) {\n $parameter = trim(strtoupper($parameter));\n\n if (array_key_exists($parameter, $this->message)) {\n return $this->message[$parameter];\n }\n else {\n return NULL;\n }\n }", "title": "" }, { "docid": "fd4fb4fa3ef3eb036c030e563eaa9753", "score": "0.52926916", "text": "public function getMessage()\n\t{\n\t\treturn $this->data['message'];\n\t}", "title": "" }, { "docid": "fd4fb4fa3ef3eb036c030e563eaa9753", "score": "0.52926916", "text": "public function getMessage()\n\t{\n\t\treturn $this->data['message'];\n\t}", "title": "" }, { "docid": "d4c8450c2c69a9115c61714cef59e04b", "score": "0.5290266", "text": "public function message()\n\t{\t\n\t\treturn $this->message;\n\t}", "title": "" }, { "docid": "3b32e2948278aaa4dec9efe4ac5668c9", "score": "0.52863926", "text": "public function getText () :?string\n {\n if ($this->getUpdateType () == 'edited_message'){\n $text = $this->content ['edited_message']['text'];\n }\n if ($this->getUpdateType () == 'channel_post'){\n $text = $this->content ['channel_post']['text'];\n }\n if ($this->getUpdateType () == 'edited_channel_post'){\n $text = $this->content ['edited_channel_post']['text'];\n }\n if ($this->getUpdateType () == 'inline_query'){\n $text = $this->content ['inline_query']['query'];\n }\n if ($this->getUpdateType () == 'chosen_inline_result'){\n $text = $this->content ['chosen_inline_result']['query'];\n }\n if ($this->getUpdateType () == 'callback_query'){\n $text = $this->content ['callback_query']['data'];\n }\n return $text ?? $this->content ['message']['text'] ?? '';\n }", "title": "" }, { "docid": "207a8ecef9157f8c9ab56524d4bf79ff", "score": "0.5277289", "text": "function getIdMessaggioDiRiferimento();", "title": "" }, { "docid": "07996682a6ceb032fea130d61d6ab61c", "score": "0.52769756", "text": "public function getParsedMessage(): int|float|string\n {\n $message = $this->getRawMessage();\n\n foreach ($this->getParameters() as $name => $value) {\n if (true === is_array($value)) {\n $value = implode(', ', $value);\n }\n\n $message = str_replace(':' . $name, (string) $value, (string) $message);\n }\n\n return $message;\n }", "title": "" }, { "docid": "defa099f49ba7a9c2498d23d3a276b58", "score": "0.5268866", "text": "public function getRemittanceInfo2()\n {\n return (string) substr($this->getUserMessage(), self::REMITTANCE_INFO_LENGTH, self::REMITTANCE_INFO_LENGTH);\n }", "title": "" }, { "docid": "18cd96263e4778a55249c8496c88e1c2", "score": "0.526356", "text": "public function val() {\n return substr($this->value, 2);\n }", "title": "" }, { "docid": "2d99e0ba74d1bd5d0816d198a964355f", "score": "0.52583563", "text": "function GetValueText()\r\n\t{\r\n\t\tswitch ($this->m_type)\r\n\t\t{\r\n\t\t\tcase 1: // text\t\r\n\t\t\tcase 5:\t// textarray\r\n\t\t\tcase 2: // radeo\r\n\t\t\tcase 3: // chekbox\r\n\t\t\t\treturn $this->m_value;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: // select\r\n\t\t\tcase 7: // list\r\n\t\t\t\treturn $this->m_valueList[$this->m_value];\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fcf01108b4a7f3a8f0e4932712fad1b0", "score": "0.5258295", "text": "public function getMessage()\n {\n return (string) $this->data->description;\n }", "title": "" }, { "docid": "eacc426703adc0ab80e740a89595e1b7", "score": "0.52554655", "text": "public function message()\n {\n return $this->msg;\n }", "title": "" }, { "docid": "eacc426703adc0ab80e740a89595e1b7", "score": "0.52554655", "text": "public function message()\n {\n return $this->msg;\n }", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.52521336", "text": "public function getMessage();", "title": "" } ]
20cff2b31d3f605516ffd288ef131584
Get attachment image URL.
[ { "docid": "8cf13f4d2618c557208f376c05713ae2", "score": "0.0", "text": "public function getImageUrl($size = 'thumbnail')\n {\n $res = wp_get_attachment_image_src($this->getId(), $size);\n return $res && isset($res[0]) ? $res[0] : null;\n }", "title": "" } ]
[ { "docid": "25de78e54c0111e74eabd57ad5970044", "score": "0.8178379", "text": "public function getAttachmentUrl()\n {\n return $this->storage->getAttachmentUrl($this->owner, $this->fieldName);\n }", "title": "" }, { "docid": "7ba288154e8be53821449c00cc40290c", "score": "0.7951645", "text": "public function getUrl(): string\n {\n if ($this->external && strpos($this->path, 'http') !== 0) {\n return $this->path;\n }\n return url('/attachments/' . $this->id);\n }", "title": "" }, { "docid": "8f66961c5b92437dec3f975c9e1d6c1b", "score": "0.7707357", "text": "protected function getUrl() {\n if ($this->_url != null) {\n return $this->_url;\n }\n\n if (empty($this->id)) {\n return null;\n }\n\n $this->_url = wp_get_attachment_url($this->id);\n return $this->_url;\n }", "title": "" }, { "docid": "7fe8356148099b9198a1c6aa47a2fc13", "score": "0.75612617", "text": "public function image_url()\r\n {\r\n if (! $this->image)\r\n return;\r\n\r\n return Storage::url($this->image);\r\n }", "title": "" }, { "docid": "32311ecfe58b0e9cc7d251652f354a0b", "score": "0.72710395", "text": "public function get_url()\n {\n return $this->imageUrl;\n }", "title": "" }, { "docid": "dd334e91662acea48805528511912a48", "score": "0.71988755", "text": "public function getUrlImage() {\r\n if ($this->urlImage === NULL) {\r\n $this->urlImage = Paperclip_Utils::createUrlView($this->imageId);\r\n if ($this->urlImage === NULL) {\r\n $this->urlImage = '';\r\n }\r\n }\r\n return $this->urlImage;\r\n }", "title": "" }, { "docid": "ea94850640847a165d5861df32163c08", "score": "0.7152822", "text": "public function getImageOfOfferUrl()\n {\n return $this->imageOfOfferUrl;\n }", "title": "" }, { "docid": "4129f38f47a93aa439c4812c514f6bbd", "score": "0.707232", "text": "public function get_full_image_url()\n {\n $img_path = url('/public/uploads/full/' . $this->post_img );\n return $img_path;\n }", "title": "" }, { "docid": "0775ba2cd24de44f5b4a8886f2b289e5", "score": "0.70259494", "text": "public function getImageLink()\n {\n return $this->imageLink;\n }", "title": "" }, { "docid": "131e4a2ad196c42d20132eae69899991", "score": "0.70247865", "text": "function attachment_image_url($post_id, $size){\n\t\t$image_id = get_post_thumbnail_id($post_id);\n\t\t$image_data = wp_get_attachment_image_src($image_id, $size, true);\n\t\techo isset($image_data[0]) ? $image_data[0] : '';\n\t}", "title": "" }, { "docid": "af368b7d1aea52e78cf8613f7fa48287", "score": "0.69530934", "text": "public function getUrl()\n {\n $attachedFileView = $this->getAttachedFileView();\n return $this->getUrlPath() . '/' . $this->getFileName($attachedFileView);\n }", "title": "" }, { "docid": "749a2e2a9f0e6755ad2558cfb49480ea", "score": "0.6941754", "text": "public function getThumbnailUrl() {\n return $this->getArticle()->getThumbnailUrl($this->_bSsl);\n }", "title": "" }, { "docid": "8231ba7c95aaa1b17830ffdfa9440fbc", "score": "0.6916277", "text": "public function image() {\n return $this->img_url;\n }", "title": "" }, { "docid": "8b8f1942a5947b95f6fa94976e64cdb2", "score": "0.6912287", "text": "public function getImageUrl()\r\n {\r\n return $this->_image_url;\r\n }", "title": "" }, { "docid": "52bb950277633b2ed9a7b5968858e67c", "score": "0.68866384", "text": "public function getImageUrl()\n {\n return $this->_imageUrl;\n }", "title": "" }, { "docid": "a27e0a9b7d4862a2fe659c223017b242", "score": "0.68851906", "text": "public function getImageUrl()\n\t{\n\t\treturn $this->image_url;\n\t}", "title": "" }, { "docid": "e729fd585fbd2b94c7872674a522051b", "score": "0.684265", "text": "public function getUrlImageThumb()\n {\n\n if (!empty($this->imageID)) {\n $urlImage = UniteFunctionsWPRev::getUrlAttachmentImage($this->imageID, UniteFunctionsWPRev::THUMB_MEDIUM);\n } else {\n\n //get from cache\n\n if (!empty($this->imageFilepath)) {\n $urlImage = UniteBaseClassRev::getImageUrl($this->imageFilepath, 200, 100, true);\n } else {\n $urlImage = $this->imageUrl;\n }\n }\n\n\n\n if (empty($urlImage)) {\n $urlImage = $this->imageUrl;\n }\n\n\n\n return($urlImage);\n }", "title": "" }, { "docid": "a4aaa78072194d17e2f3e8a673690e91", "score": "0.68299824", "text": "public function getImageImageAttribute()\n {\n ($this->image && \\File::exists(public_path('images/storage/partners'.$this->image)))\n ? $url = \\URL::asset('images/storage/partners'.$this->image)\n : $url = \\URL::asset('images/template/nopic.jpg');\n\n return $url;\n }", "title": "" }, { "docid": "bdec80766031a112aaa920ee1ed22aad", "score": "0.6775312", "text": "public function getDownloadUrlAttribute() {\n return url('/api/attachments/' . $this->id . '/file.' . $this->extension);\n }", "title": "" }, { "docid": "9681c0c9f21a428d817def0eeff828df", "score": "0.67617744", "text": "public function imageUrl()\n {\n if (!empty($this->image) && File::exists(public_path(config('constants.UPLOAD.IMAGE_LIST')) . '/' . $this->image)) {\n return asset(config('constants.UPLOAD.IMAGE_LIST') . '/' . $this->image);\n }\n return url(config('constants.DEFAULT.ITEM_IMAGE'));\n }", "title": "" }, { "docid": "425f0e806051a8d2c2a07e2ef235cc1e", "score": "0.6752079", "text": "public function getImageUri()\n {\n return $this->image_uri;\n }", "title": "" }, { "docid": "425f0e806051a8d2c2a07e2ef235cc1e", "score": "0.6752079", "text": "public function getImageUri()\n {\n return $this->image_uri;\n }", "title": "" }, { "docid": "2a7e6b8237b14e57268d485e586cb0ea", "score": "0.6702389", "text": "public function getImageUrl()\n {\n return $this->getProperty(\"ImageUrl\");\n }", "title": "" }, { "docid": "1ca35cc9f41f254fd6a396317b480a53", "score": "0.6697505", "text": "public function getImage()\n {\n $img = simplexml_load_string($this->xml)->xpath('//user/img');\n if (empty($img)) {\n return null;\n }\n return (string) $img[0]->attributes()->href;\n }", "title": "" }, { "docid": "bfa43aa16d617a70743cb6965571f55b", "score": "0.66863835", "text": "function inspiry_get_profile_image_url( $attach_data ) {\n\t\t$upload_dir = wp_upload_dir();\n\t\t$image_path_array = explode( '/', $attach_data[ 'file' ] );\n\t\t$image_path_array = array_slice( $image_path_array, 0, count( $image_path_array ) - 1 );\n\t\t$image_path = implode( '/', $image_path_array );\n\t\t$thumbnail_name = null;\n\t\tif ( isset( $attach_data[ 'sizes' ][ 'agent-image' ] ) ) {\n\t\t\t$thumbnail_name = $attach_data[ 'sizes' ][ 'agent-image' ][ 'file' ];\n\t\t} else {\n\t\t\t$thumbnail_name = $attach_data[ 'sizes' ][ 'thumbnail' ][ 'file' ];\n\t\t}\n\t\treturn $upload_dir[ 'baseurl' ] . '/' . $image_path . '/' . $thumbnail_name;\n\t}", "title": "" }, { "docid": "6c00c4c796ded6356f12202c4c1f612e", "score": "0.6660111", "text": "public function getPhotoUrl()\n {\n return $this->photoUrl;\n }", "title": "" }, { "docid": "9c37d95cb1b68f454ef79e69860fc53f", "score": "0.6641099", "text": "public function getRoomImageUrl(): string\n {\n return $this->imageUrl;\n }", "title": "" }, { "docid": "ad738724f7dad4252d006881935275b5", "score": "0.6629596", "text": "public function wp_get_attachment_url( $url, $attachment_id ) {\n\t\tif ( get_post_meta( $attachment_id, '_rsrgroup_media', true ) ) {\n\t\t\t$url = get_post_meta( $attachment_id, '_wp_attached_file', true );\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "2a8169ffed665251bfd874dacd0ffad1", "score": "0.6628673", "text": "function themeum_attachment_url($id){\n if(wp_get_attachment_image_src($id)){\n return wp_get_attachment_image_src($id);\n }else{\n return '';\n }\n}", "title": "" }, { "docid": "d7a8438da8e18dd23d446d067914daef", "score": "0.6627088", "text": "function szbl_get_image_url( $att_id = false, $size = 'full' )\n{\n\tif ( !$att_id )\n\t\treturn false;\n\n\t$img = wp_get_attachment_image_src( $att_id, $size );\n\n\treturn $img[0];\n}", "title": "" }, { "docid": "a5241e13473808f6ef82e907b97c05e1", "score": "0.66053206", "text": "public function getImageURL()\n\t{\n\t\t$path = Config::get('dream.paths.vote');\n\t\treturn url(\"{$path}/{$this->image}\");\n\t}", "title": "" }, { "docid": "506a402584b457e1e316382373e1df56", "score": "0.6595076", "text": "public function getPhotoUrlAttribute()\n {\n if ($value = $this->photo_path) {\n return filter_var($value, FILTER_VALIDATE_URL)\n ? url($value)\n : $value;\n }\n\n return $this->defaultPhotoUrl();\n }", "title": "" }, { "docid": "53d79ca4a5ca6311fbd88bce877224e5", "score": "0.6580961", "text": "public function getImageUrl() \n {\n $avatar = isset($this->preview_image) ? $this->preview_image : '../../default-thumb.jpg';\n return Yii::$app->urlManager->createUrl(Yii::$app->params['upload']['myphoto']['url']). $this->user_id . '/' . $avatar;\n }", "title": "" }, { "docid": "4f56fd2e71d86cd268093c0b21e8afc3", "score": "0.65742016", "text": "public function getUrl()\n {\n return $this->imageParam . CHtml::encode($this->filename);\n }", "title": "" }, { "docid": "7f05bdd8b119bb7a9b57875a6c88a021", "score": "0.6572466", "text": "protected function getAttachmentPath() {\n\t\treturn $this->AttachmentPath;\n\t}", "title": "" }, { "docid": "552f9b7392ff8606ac0cb585d3a6f7ee", "score": "0.6545406", "text": "public function getAttachment()\n {\n return $this->attachment;\n }", "title": "" }, { "docid": "3af0999b948789ece87556e467964bec", "score": "0.65256166", "text": "public function getImageUrlAttribute(): string\n {\n return Storage::url($this->image);\n }", "title": "" }, { "docid": "d1054530a6d0a629c1f24c8c7319a78d", "score": "0.6517711", "text": "public function getAttachmentMainDetails($attachment){\n $full_path= 'https://beta.development-majles.tech/'.$this->getMediaPath($attachment->media_id);\n \n $content = '<img src='.$full_path.'>';\n return $full_path;\n }", "title": "" }, { "docid": "0c387d07bb898d7d8296cbbd36e48c5a", "score": "0.6515959", "text": "public function getHostedThumbnail()\n {\n return $this->getHostedUrl($this->Thumbnail);\n }", "title": "" }, { "docid": "76c39b898d45402662abb8f2d88181c4", "score": "0.6515077", "text": "public function getLinkedInterconnectAttachment()\n {\n return isset($this->linked_interconnect_attachment) ? $this->linked_interconnect_attachment : '';\n }", "title": "" }, { "docid": "a397281aefe0b785b8ae628e0e569266", "score": "0.6501085", "text": "public function getCoverPhotoRemoteUrl(): string;", "title": "" }, { "docid": "713b83e583da9c721c8caa3ac54c25f9", "score": "0.64940196", "text": "public function imageSrc() {\n\t\t$currentImage = $this->urlSegment1 - 1;\n\t\treturn $this->chapterImages()->eq($currentImage)->url;\n\t}", "title": "" }, { "docid": "ea030e88101019d6188e853268861f17", "score": "0.6484521", "text": "public function getThumbnailUrl()\n {\n return $this->_thumbnailUrl;\n }", "title": "" }, { "docid": "33b9601005fa0fd12fa26d018d831ff3", "score": "0.64702094", "text": "public function getImage() {\n if ($this->image === NULL) {\n $props = $this->getProperties();\n $r = $props['image'];\n if (! $r) {\n $router = Router::getRouter();\n $this->image = $router->getUrl(self::$defaultImage);\n } else {\n $this->image = 'data:image/png;base64,' . $r;\n }\n } elseif ($this->image === 'data:image/png;base64,') {\n $router = Router::getRouter();\n $this->image = $router->getUrl(self::$defaultImage);\n }\n return $this->image;\n }", "title": "" }, { "docid": "3ba14396a15633f86f54985c3c0a6e45", "score": "0.646835", "text": "function auxin_get_attachment_url( $attach_id, $featured_img_size = \"medium\" ) {\n if( is_numeric( $attach_id ) ){\n $image_url = wp_get_attachment_image_src( $attach_id, $featured_img_size );\n return $image_url[0];\n }\n return '';\n}", "title": "" }, { "docid": "02f9e570e746016c7fa7ebac9d3b56cf", "score": "0.64643025", "text": "function themeum_attachment_url_full($id,$type){\n if(wp_get_attachment_image_src($id,$type)){\n return wp_get_attachment_image_src($id,$type);\n }else{\n return '';\n }\n}", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.64642", "text": "public function getImageUrl();", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.64642", "text": "public function getImageUrl();", "title": "" }, { "docid": "e6aab7ed78800bdcb8c6ecbf566a5491", "score": "0.6462645", "text": "public function getAttachmentPath()\n {\n return $this->storage->getFullFileName($this->owner, $this->fieldName);\n }", "title": "" }, { "docid": "d1ef3b29a3e95ea1493f28f663d3bb68", "score": "0.6452436", "text": "public function getImageSrc()\n {\n return sprintf($this->getRelativePath(), $this->image_file_name);\n }", "title": "" }, { "docid": "93f1d815d65624a5f4e1dbdb55682098", "score": "0.6426589", "text": "public function getImageUrlAttribute()\n {\n if (!$this->has_image) return null;\n return asset($this->imageDirectory . '/' . $this->imageFileName);\n }", "title": "" }, { "docid": "01f42a718a46879c3233a1ac77581c19", "score": "0.64239055", "text": "function auxin_get_the_attachment_url( $post_id, $img_size = \"medium\" ) {\n $post = get_post( $post_id );\n if( $post ){\n $image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $img_size );\n return $image_url[0];\n }\n return null;\n}", "title": "" }, { "docid": "b0e3ad97b56f9b46629fa7d44a5a5fe0", "score": "0.64227766", "text": "function mace_get_image_by_url( $image_url ) {\n\tglobal $wpdb;\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\n\treturn $attachment[0];\n}", "title": "" }, { "docid": "1e7f99ac1a91009328c76c8adaeb0dea", "score": "0.64161235", "text": "public function getThumbnailUrlAttribute(): string\n {\n if (env('APP_ENV') == 'production')\n return $this->cloudUrl();\n else\n return $this->defaultLocalUrl();\n }", "title": "" }, { "docid": "e46c349fdeac6e8ac5436eb8972dc1c3", "score": "0.64137775", "text": "public function getExternalPictureURL()\n {\n return $this->externalPictureURL;\n }", "title": "" }, { "docid": "1946b1688d57bbacc4a85ffaa5b8b9ec", "score": "0.6409643", "text": "public function getAttachment()\n {\n return isset($this->Attachment) ? $this->Attachment : null;\n }", "title": "" }, { "docid": "78a88357f12365e7b036c94b1c0935eb", "score": "0.6395481", "text": "public function getImageUrl()\n {\n // return a default image placeholder if your source avatar is not found\n $avatar = isset($this->avatar) ? $this->avatar : 'default_user.jpg';\n return Yii::$app->params['uploadUrl'] . $avatar;\n }", "title": "" }, { "docid": "68f17c9292ddaba3a161c2b856eb0b6d", "score": "0.63949025", "text": "public function getThumbUrlAttribute() {\n if ($this->has_thumb) {\n return url('/api/attachments/' . $this->id . '/thumb.' . $this->extension);\n }\n\n return url('/build/images/document.png');\n }", "title": "" }, { "docid": "f310317299097001d89f1547cd36d503", "score": "0.638821", "text": "public function getMediaUriAttribute()\n {\n switch($this->type){\n case self::TYPE_IMAGE:\n $file_type = MediaHelper::FILE_TYPE_MEDIA_IMAGE;\n break;\n case self::TYPE_VIDEO:\n $file_type = MediaHelper::FILE_TYPE_MEDIA_VIDEO;\n break;\n case self::TYPE_AVATAR:\n $file_type = MediaHelper::FILE_TYPE_MEDIA_AVATAR;\n break;\n default:\n return null;\n break;\n }\n\n $s3path = MediaHelper::getS3Path($file_type);\n\n return MediaHelper::getPublicUrl($s3path . '/' . $this->user_id . '/' . $this->name);\n }", "title": "" }, { "docid": "cace34bcc3f889ae788740c8b3ef4c77", "score": "0.63855135", "text": "public function getUrlThumbnail() {\r\n if ($this->urlThumbnail === NULL) {\r\n $this->urlThumbnail = Paperclip_Utils::createUrlThumbnail($this->imageId);\r\n if ($this->urlThumbnail === NULL) {\r\n $this->urlThumbnail = '';\r\n }\r\n }\r\n return $this->urlThumbnail;\r\n }", "title": "" }, { "docid": "446a102fa842fb8fb520a71f5003b892", "score": "0.6383908", "text": "public function getFileUrl() {\n return $this->scheme . '://' . $this->url . '/' . $this->fid;\n }", "title": "" }, { "docid": "4a24d67a0b2304abb53437ee87f1bea0", "score": "0.6380527", "text": "public function getThumbnailSrc()\n {\n return sprintf($this->getRelativePath(true), $this->thumbnail_file_name);\n }", "title": "" }, { "docid": "851443f67fb57127357c1af9892b8f2b", "score": "0.63625675", "text": "function windows_azure_storage_wp_get_attachment_url($url, $postID)\r\n{\r\n $mediaInfo = get_post_meta($postID, 'windows_azure_storage_info', true);\r\n\r\n if (!empty($mediaInfo)) {\r\n return $mediaInfo['url'];\r\n } else {\r\n return $url;\r\n }\r\n}", "title": "" }, { "docid": "1b152d38e1b66efeb0cd746671628fb1", "score": "0.6359451", "text": "public function getThumbnailUrl() {\n return $this->thumbnailURL;\n }", "title": "" }, { "docid": "00d9f4efb58c0e38e7f5cbd22a3c9ccf", "score": "0.63569796", "text": "public function getImage()\n {\n if (!$this->getData('image')) {\n return null;\n }\n\n $resizedImageUrl = $this->getResizedImageUrlForImage('image');\n return $resizedImageUrl;\n }", "title": "" }, { "docid": "89f43eae6199ade13c47a462e7d981bf", "score": "0.63566506", "text": "function pexeto_get_featured_image_url( $pid ) {\r\n\t\t$attachment = wp_get_attachment_image_src( get_post_thumbnail_id( $pid ), 'single-post-thumbnail' );\r\n\t\treturn $attachment[0];\r\n\t}", "title": "" }, { "docid": "68896e0462aad02f65efc021e761ce58", "score": "0.6351665", "text": "public function getAvatarUrl(): ?string\n {\n return $this->avatar ? self::UPLOAD_PATH . $this->id . '/' . $this->avatar : null;\n }", "title": "" }, { "docid": "0ea61d22befd62f376b3ae70ae1c1348", "score": "0.6346341", "text": "public function imageUrl(){\n return is_null($this->image) ? \"/img/bg-img/noimage.png\" : $this->image->url;\n }", "title": "" }, { "docid": "f5c4a0a84170840c8dec15ea692b6006", "score": "0.6330188", "text": "public function getImgUrlAttribute() {\n return $this->img_path?url(str_replace('public/', 'storage/', $this->img_path)):null;\n }", "title": "" }, { "docid": "57d855db7d02cca777c27eaf86d17af8", "score": "0.6323587", "text": "public function getRefImage() {\n return $this->refImage;\n }", "title": "" }, { "docid": "57d855db7d02cca777c27eaf86d17af8", "score": "0.6323587", "text": "public function getRefImage() {\n return $this->refImage;\n }", "title": "" }, { "docid": "6d22675c070eb49f8537011fd59962db", "score": "0.63227195", "text": "public function getPodcastFeedImageURL() {\n\t\t###############################\n\t\t\n\t\t# Generic Podcast Feed\n\t\t$feedImageURL = $this->podcastXML->channel[0]->image->url;\n\n\t\t# Compensate for iTunes weirdness\n\t\tif (empty($feedImageURL) || $feedImageURL == '/') {\n\t\t\t#channel/itunes:image[href]\n\t\t\t$feedImageURL = @$this->podcastXML->channel[0]->children(self::iTunesNamespace)->image->attributes('');\n\t\t\t$feedImageURL = $feedImageURL['href'];\n\t\t}\n\t\t\n # Always trim URLs\n $feedImageURL = trim($feedImageURL);\t\t\n\n\t\treturn (string) $feedImageURL;\n }", "title": "" }, { "docid": "9be05d7b21fba5635230a3c92a54ffaf", "score": "0.6313328", "text": "public function getDownloadUrl()\n {\n return $this->source['uri'];\n }", "title": "" }, { "docid": "808d570ef5a6ee45a352ee8c87c3773c", "score": "0.6311232", "text": "public function getReferFileUrlAttribute()\n {\n return !empty($this->refer_file) ? asset(Storage::url(\n UPLOAD_PATH . SLASH . str_singular($this->getTable()) . SLASH . $this->id . SLASH . $this->refer_file\n )) : null;\n }", "title": "" }, { "docid": "73de7e171077a7d4b1ac304e417a7004", "score": "0.6293356", "text": "public function getImageLinkAttribute()\n {\n if ($this->image) {\n return self::imagePath() . $this->image;\n }\n\n return '/assets/images/thumbnail.jpg';\n }", "title": "" }, { "docid": "d202020592e151535c09ed34c9516179", "score": "0.6289366", "text": "public function getURL()\n {\n return Yii::app()->params->relative_document_dir . $this->file_name;\n }", "title": "" }, { "docid": "6a980105414a270afa20f5437d7f4cec", "score": "0.62865615", "text": "public function getPicture_url()\n {\n return $this->picture_url;\n }", "title": "" }, { "docid": "4620dea3e1fecc8c5ee06b4e32b5efd9", "score": "0.6279909", "text": "public function getAvatarUrl()\n {\n return $this->avatar_url;\n }", "title": "" }, { "docid": "d4d003d9ed326b889d682cf8bd22fea7", "score": "0.6276794", "text": "public function getImageUrlAttribute()\r\n {\r\n return $this->image_url();\r\n }", "title": "" }, { "docid": "6f5df9ec919ecfab4661a1e45ab3baa5", "score": "0.6276121", "text": "public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $avatar = isset($this->ArchivoAdjunto) ? $this->ArchivoAdjunto : 'default_user.jpg';\n return Yii::$app->params['uploadUrl'] . $avatar;\n }", "title": "" }, { "docid": "52ed7f3825cc30cc5a06fe2639cc6492", "score": "0.6264384", "text": "public function get_backup_url() {\n\t\tif ( ! $this->is_valid() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn get_imagify_attachment_url( $this->get_raw_backup_path() );\n\t}", "title": "" }, { "docid": "f3b1b2d35f57a636130f9027c1680846", "score": "0.6260482", "text": "public function getWebLinkOriginalImagesPath() {\n global $wgArticleUrl;\n $creator_user_name = $this->user_name;\n $manuscripts_title = $this->posted_manuscript_title;\n return $wgArticleUrl . 'Special:OriginalImages' . '?image=' . $creator_user_name . '/' . $manuscripts_title;\n }", "title": "" }, { "docid": "8252694492a6640edf13034b2b7bd450", "score": "0.62471694", "text": "public function getImageUrlAttribute()\n\t{\n\t\treturn static::$path . $this->image;\n\t}", "title": "" }, { "docid": "10b30c6fb30f906e2e3a789ce7159492", "score": "0.62457156", "text": "public function getImageUrlAttribute()\n {\n return !empty($this->image) ? asset(Storage::url(\n UPLOAD_PATH . SLASH . str_singular($this->getTable()) . SLASH . $this->id . SLASH . $this->image\n )) : null;\n }", "title": "" }, { "docid": "597987ffd52d4725b0728864c8293b37", "score": "0.6241565", "text": "protected function getLink() {\n if ($this->_link != null) {\n return $this->_link;\n }\n\n if (empty($this->id)) {\n return null;\n }\n\n $this->_link = get_attachment_link($this->id);\n return $this->_link;\n }", "title": "" }, { "docid": "20361ad92adc935e17bb3e566933237f", "score": "0.6236292", "text": "public function getUrlImageAttribute()\n {\n return asset('storage/' . $this->image);\n }", "title": "" }, { "docid": "a3abd30bc8870489a93924627a78b1f8", "score": "0.6234733", "text": "public function getPhotoUrlAttribute()\n {\n return 'https://www.gravatar.com/avatar/'.md5(strtolower($this->email)).'.jpg?s=200&d=mm';\n }", "title": "" }, { "docid": "22d5c95fd7a4798221f76f2e1b3a919f", "score": "0.622987", "text": "public function getImage(){\n\t\treturn $this->__get('image');\n\t}", "title": "" }, { "docid": "4739cc5d82947910d99144a54167427f", "score": "0.6229095", "text": "public function getGetImageAttribute()\n {\n //Si la imagen existe\n if ($this->image)\n //Accedemos al public/storage\n return url(\"storage/$this->image\");\n }", "title": "" }, { "docid": "96afe59af3f6b658b31d2cc5c2e760f8", "score": "0.6228161", "text": "public function getimageurl() {\n //return \\Yii::$app->request->BaseUrl.'/uploads/'.$this->ID.'.jpg';\n\n /*$imgTemp = Yii::getAlias('@uploaded_files') . '/foto_anggota/temp/' . $this->ID . '.jpg';\n\n if (!file_exists($imgTemp)) {\n $image = '../../../uploaded_files/' .Yii::$app->params['pathFotoAnggota'] . '/temp/'.\"nophoto.jpg?timestamp=\" . rand();\n } else {\n $image = '../../../uploaded_files/' .Yii::$app->params['pathFotoAnggota'] . '/temp/'.$this->ID.\".jpg?timestamp=\" . rand();\n \n }*/\n if ($this->PhotoUrl) {\n $img = Yii::getAlias('@uploaded_files') . '/foto_anggota/' . $this->PhotoUrl;\n } else\n\n $img = Yii::getAlias('@uploaded_files') . '/foto_anggota/' . $this->ID;\n\n if (!file_exists($img)) {\n $image = '../../../uploaded_files/' .Yii::$app->params['pathFotoAnggota'] . '/'.\"nophoto.jpg?timestamp=\" . rand();\n } else {\n $image = '../../../uploaded_files/' .Yii::$app->params['pathFotoAnggota'] . '/'.$this->PhotoUrl.\"?timestamp=\" . rand();\n \n }\n\n return $image;\n\n }", "title": "" }, { "docid": "b300d8fd6e7ebcc2213c37b06df15139", "score": "0.6225332", "text": "function get_image_url()\n{\n $image_id = get_post_thumbnail_id();\n $image_url = wp_get_attachment_image_src($image_id, 'large');\n $image_url = $image_url[0];\n echo $image_url;\n}", "title": "" }, { "docid": "0729de7ecaad01eb8a9441626047f2f9", "score": "0.6224641", "text": "function pearl_get_image_url($id, $size = 'full')\r\r\n{\r\r\n\t$url = '';\r\r\n\tif (!empty($id)) {\r\r\n\t\t$image = wp_get_attachment_image_src($id, $size);\r\r\n\t\tif (!empty($image[0])) {\r\r\n\t\t\t$url = $image[0];\r\r\n\t\t}\r\r\n\t}\r\r\n\r\r\n\treturn $url;\r\r\n}", "title": "" }, { "docid": "ba80a5f2ff80c6dded6392b0bc8d11e6", "score": "0.6205093", "text": "public function getThumbnailUrlAttribute()\n {\n return !empty($this->thumbnail) ? asset(Storage::url(\n UPLOAD_PATH . SLASH . str_singular($this->getTable()) . SLASH . $this->id . SLASH . $this->thumbnail\n )) : null;\n }", "title": "" }, { "docid": "32382ccbf90c6e44f1d83d1987e159e6", "score": "0.62046844", "text": "function get_image_url() {\r\n$theImageSrc = wp_get_attachment_url(get_post_thumbnail_id($post_id));\r\nglobal $blog_id;\r\nif (isset($blog_id) && $blog_id > 0) {\r\n $imageParts = explode('/files/', $theImageSrc);\r\n if (isset($imageParts[1])) {\r\n $theImageSrc = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];\r\n }\r\n}\r\necho $theImageSrc;\r\n}", "title": "" }, { "docid": "d6e97c391a768a8b7ebf53f0a2f8be7e", "score": "0.6202564", "text": "public function get_image()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d40755727025f6e967434094ef6aa00a", "score": "0.61993504", "text": "public function getImage()\n {\n return $this->get('imagename');\n }", "title": "" }, { "docid": "10fe4bc69ca1488f2079fad776c7c569", "score": "0.6189491", "text": "public function getAvatar() {\n return $this->avatar == 'g-avatar' ? Gravatar::src($this->email, 200) : Storage::url($this->avatar);\n }", "title": "" }, { "docid": "bf3d9cebb306587de32f83375db6ca85", "score": "0.6189079", "text": "public function getImageUrlAttribute()\n {\n return asset('/storage/posts/covers/' . $this->attributes['image']);\n }", "title": "" }, { "docid": "648c4aa9b6b19cf23dd624861b75fc94", "score": "0.61869174", "text": "public function imageUrl(): string\n {\n return '/images/test-image.jpg';\n }", "title": "" }, { "docid": "913c09ab9869c64e922a6e067291a821", "score": "0.6185551", "text": "protected function backgroundImage() {\n if (isset($this->configuration['background_image_id'])) {\n return $this->fileUrlFromMediaId($this->configuration['background_image_id']);\n }\n else {\n return NULL;\n }\n }", "title": "" }, { "docid": "b48d26b29d81fba903e028ef260bdb11", "score": "0.6182874", "text": "public function getAvatarURL()\n\t{\n\t}", "title": "" } ]
cfbd0b812f8cff35f694441a52234070
Finds the Produk model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
[ { "docid": "ad668443eecd036b44b7647415487104", "score": "0.68779415", "text": "protected function findModel($id)\n {\n if (($model = Produk::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" } ]
[ { "docid": "8afeccaef06d856087a4c931a46472ca", "score": "0.7003899", "text": "public function loadModel($id)\n\t{\n\t\t$model=Produk::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "8afeccaef06d856087a4c931a46472ca", "score": "0.7003899", "text": "public function loadModel($id)\n\t{\n\t\t$model=Produk::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "9bc3954464b93db4eec1e61b087557f4", "score": "0.6989638", "text": "protected function findModel($id)\n {\n if (($model = PdmP11::findOne(['id_perkara' => $id])) !== null) {\n return $model;\n }/* else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }*/\n }", "title": "" }, { "docid": "4f512d53d4e8f9bab19ea5cb4f528f69", "score": "0.6827967", "text": "protected function findModel($id)\n {\n if (($model = PdmP21::findOne(['id_pengantar' => $id])) !== null) {\n return $model;\n } /* else {\n throw new NotFoundHttpException('The requested page does not exist.');\n } */\n }", "title": "" }, { "docid": "3126908f61481242bdfab698e47409bb", "score": "0.67989606", "text": "protected function findModel($KD_PROPINSI, $KD_DATI2, $KD_KECAMATAN, $KD_KELURAHAN, $KD_BLOK, $NO_URUT, $KD_JNS_OP, $THN_PAJAK_SPPT)\n {\n if (($model = Sppt::findOne(['KD_PROPINSI' => $KD_PROPINSI, 'KD_DATI2' => $KD_DATI2, 'KD_KECAMATAN' => $KD_KECAMATAN, 'KD_KELURAHAN' => $KD_KELURAHAN, 'KD_BLOK' => $KD_BLOK, 'NO_URUT' => $NO_URUT, 'KD_JNS_OP' => $KD_JNS_OP, 'THN_PAJAK_SPPT' => $THN_PAJAK_SPPT])) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "f89080a8b0c1db7722e374a4b00cc04f", "score": "0.66457593", "text": "public function findByKey(string $key): ?Model;", "title": "" }, { "docid": "f89080a8b0c1db7722e374a4b00cc04f", "score": "0.66457593", "text": "public function findByKey(string $key): ?Model;", "title": "" }, { "docid": "1470020619dcd479dc2d94995d2e42b4", "score": "0.6641108", "text": "protected function findModel($id) {\n if (($model = Kpiresult::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "d60d70a3ae934b73367758d22ccefdf0", "score": "0.66207623", "text": "protected function findModel($id)\r\n {\r\n if (($model = Project::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new HttpException(404, 'The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "9f8affd88c0690d6336b932920edc6a3", "score": "0.66084975", "text": "public function loadModel($id)\n\t{\n\t\t$model=Pdu::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('rdt','The requested page does not exist.'));\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "2fbc043fc1383a50054f701501678c1a", "score": "0.6604158", "text": "public function loadModel($id) {\n \n $model = ProtokolPenelitian::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "6bfde3534f925201a7fe1e957b1c1cc6", "score": "0.66040635", "text": "protected function findModel($id)\n {\n if (($model = Pkk5kadastr::findOne($id)) !== null) {\n return $model;\n } else {\n die('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "a5169f156306fb23a21ce68ac86b99c9", "score": "0.65971637", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = WiRequest::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "0ebc929444c168b6a7d9cb2338684b46", "score": "0.6576106", "text": "protected function findModel($chpu)\n {\n if (($model = Product::find()->where(['chpu' => $chpu, 'isDisabled' => Product::IS_ENABLED])->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "99878f2e473cf41a78b9f341b5fee499", "score": "0.6557844", "text": "public function loadModel($id) {\n $model = Produto::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "5db74a3e5e3a3d946dba09ee5731bcf6", "score": "0.65514755", "text": "protected function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "f311e184a0c431df2f2f6d4004114586", "score": "0.6542858", "text": "protected function findModel($PgID)\n\t{\n\t\tif (($model = Pages::findOne($PgID)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "ec1829aa0054d2e234f0390ad6cb2d02", "score": "0.6529", "text": "protected function findModel($id)\n {\n if (($model = Produto::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "cf92cdbb6a84a8ff12cd0f69375be2e3", "score": "0.6488691", "text": "public function loadModel($id)\n\t{\n\t\t$model=ExperiencePro::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "8a699c65faa4b8c1add18dbf8c47a429", "score": "0.6482964", "text": "protected function findModel($id)\n {\n if (($model = SigiPropietarios::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('base.labels', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "4633328cc192357b09abb258a942e4a9", "score": "0.6468385", "text": "public function loadModel($id)\n\t{\n\t\t$model=Proposal::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "60874956cd1d84b64725947c5903321e", "score": "0.6455948", "text": "protected function findModel($id) {\n\t\tif (($model = Complaint::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "e96e870ab39d6d884736c1ef49191435", "score": "0.64548326", "text": "public function loadModel($id)\n\t{\n\t\t$model=PracticasProfesionales::model()->findByPk($id);\n\t\tif($model===null)\n\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "347e4a5d6825484b31267f85914d3e61", "score": "0.6447033", "text": "protected function findModel($id){\n\t\tif (($model = JobApplication::findOne($id)) !== NULL){\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "title": "" }, { "docid": "5b3022d03db83ab5b2691bc19799f590", "score": "0.6445156", "text": "protected function findModel($id)\n\t{\n\t\t$model = Products::find()->where(['guid' => $id])->one();\n\t\tif ($model !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "8c09ad2441c56502759eff2dd097a9b6", "score": "0.64395684", "text": "protected function findModel($id)\n {\n if (($model = Key::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "2d42b19c978d9fe9bd35531513ad8862", "score": "0.64342225", "text": "public function loadModel($id) {\r\n\r\n $store_id = 1;\r\n if (!Yii::app()->user->isSuperAdmin) {\r\n $store_id = Yii::app()->user->storeId;\r\n }\r\n\r\n $criteria = new CDbCriteria();\r\n $criteria->compare('t.id', $id);\r\n $criteria->compare('t.store_id', $store_id);\r\n\r\n $model = ProductDetails::model()->with(array('productStockAvails', 'category', 'supplier', 'productGrade', 'productSize', 'productColor'))->find($criteria);\r\n\r\n if ($model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n return $model;\r\n }", "title": "" }, { "docid": "f62127968ed3cf3b40958ff7083772c8", "score": "0.6429164", "text": "public function loadModel($id)\n\t{\n\t\t$model=Peticion::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "85d11334e4868a81d2cb15522d1ac186", "score": "0.63882554", "text": "protected function findModel($id)\n {\n if (($model = KartuUjian::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "3ea2be32dae629183e2661fdb6541736", "score": "0.6382351", "text": "public function loadModel($id)\n\t{\n\t\t$model=ProductsShop::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "1717a76c43ae346e09a683271209b6d1", "score": "0.63728005", "text": "public function loadModel($id)\n\t{\n\t\t$model=Product::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "b06e1a124bc79014c28917f108de90d7", "score": "0.63562125", "text": "protected function findModel($id)\n\t{\n\t if (($model = MaterialCopiasAprovadas::findOne($id)) !== null) {\n\t return $model;\n\t } else {\n\t throw new NotFoundHttpException('A página solicitada não existe.');\n\t }\n\t}", "title": "" }, { "docid": "e34709144154834e3b6498b99c9d7d0f", "score": "0.6355517", "text": "public function loadModel($id)\n {\n $model = Equipe::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, Yii::t('smith', 'A página não existe.'));\n return $model;\n }", "title": "" }, { "docid": "080f1846d31315e0c4cd60a84ea543f9", "score": "0.6352712", "text": "public function loadModel($id)\n\t{\n\t\t$model=Products::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "88c90c83a124483bdf105a5c77312677", "score": "0.63469845", "text": "protected function findModel($id)\n {\n if (($model = Proposta::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "856ebfa5a3146d96b535fd2966e9efa9", "score": "0.6345272", "text": "protected function findModel($id)\n {\n if (($model = Purchplan::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "fb2c7246708b4b4f454218b18133be15", "score": "0.63394254", "text": "protected function findModel($id)\n {\n if (($model = Stockopname::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0de9c181baec2df2d0605d4c1fc82722", "score": "0.6335563", "text": "protected function findModel($id)\n {\n if (($model = ketidakpuasan::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "b0abafd60ae0e296ada40988776e1629", "score": "0.63338286", "text": "protected function findModel($id)\n {\n if (($model = Subkegiatan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "aff6819cc239b1d975bc6509eec38302", "score": "0.63090247", "text": "public function loadModel($id) {\n $model = Product::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "aff6819cc239b1d975bc6509eec38302", "score": "0.63090247", "text": "public function loadModel($id) {\n $model = Product::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "ccac0709b9c720034497b81cdfd98e98", "score": "0.63068914", "text": "public function findByKey(string $key, string $value): ?Model;", "title": "" }, { "docid": "8f59f62737b72c8c54a8d50cf6224535", "score": "0.6303873", "text": "protected function findModel($id)\n {\n if (($model = PrediksiKecamatan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "d38e25ecf190ec0da261d435bda0ebdb", "score": "0.63038343", "text": "public function loadModel($id)\n\t{\n\t\t$model=Kepindahan::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "ffd3c0b6133eb88b0d7337cc0cbd73ef", "score": "0.63035715", "text": "public function loadModel($id)\n\t{\n\t\t$model=Presupuesto::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "fe7f99ee38425cdca4479359ea950ff6", "score": "0.6299851", "text": "public function loadModel($id)\n\t{\n\t\t$model=Programa::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "15e87e2b243eb2654c8e16823f450de5", "score": "0.62966573", "text": "public function loadModel($id)\n\t{\n\t\t$model=Products::model()->findByPk($id);\n\t\t//$model=Products::model()->with('Catsub','BusinessUnit')->findByPk($id);\n\t\t\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "a5825621643ed0877b60a921b810194a", "score": "0.62914723", "text": "public function loadModel($id)\n\t{\n\t\t$model=Pagos::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "3448810043cc421384284a271d82b630", "score": "0.6290008", "text": "public function findByPK($pk){\n $pkConditions = $this->buildPKConditions($this->pk, $pk);\n return $this->findOne($pkConditions[0], $pkConditions[1]);\n }", "title": "" }, { "docid": "0b7f54d61636ea412cf53e6b9e56fdd7", "score": "0.6287228", "text": "protected function findModel($SID)\n\t{\n\t\tif (($model = Sizes::findOne($SID)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "34bda7c6a7a981807682a8154bfac682", "score": "0.6286403", "text": "public function loadModel($id)\n\t{\n\t\t$model=Patrimonio::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "4c2c311c31b22c508ae405b22ac5538b", "score": "0.6285548", "text": "protected function findModel($id)\n {\n if (($model = Penjualan::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "955b3e4cb5c6816ddded9d9b903f3387", "score": "0.6284449", "text": "public function loadModel($id)\n\t{\n\t\t$model=Pegawai::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "44b45eba896ef877e891908466db2640", "score": "0.6280314", "text": "public function loadModel($id)\n\t{\n\t\t$model=Proyecto::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "35ed75812298c0dd6cc0aa27ae6a7fb9", "score": "0.62789756", "text": "protected function findModel($id)\n {\n if (($model = AdminDaiProduct::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0a5f05ebf9c6be7da4100f319ec3c48d", "score": "0.6278052", "text": "protected function findModel($id)\n {\n if (($model = LaporanKegiatan::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "3d5f1307c611b4161b2232db4103f8c3", "score": "0.62629765", "text": "public function loadModel($id) {\n $model = SubProject::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "df6119b3fa55238b0caaf9810a7538e8", "score": "0.62604016", "text": "public function loadModel($id)\n\t\t{\n\t\t\t$model=ParaCobrar::model()->findByPk($id);\n\t\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\treturn $model;\n\t\t}", "title": "" }, { "docid": "1a80c879e2f5dc5c601a18a44a2ad25c", "score": "0.6259863", "text": "public function loadModel($id)\n\t{\n\t\t$model=Publikasi::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "305911f7738718150f6aabbbbfc753fa", "score": "0.62561125", "text": "protected function findModel($id)\n {\n if (($model = PREPCasillaSeccion::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "8fc91e845171b69bb0b424fc82a37c01", "score": "0.62518156", "text": "public function loadModel($id)\n\t{\n\t\t$model=GroupProduct::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "25e4bc95b1e138675ceaaea5bfb5e83f", "score": "0.6242053", "text": "public function loadModelByProposal($id) {\n $model = OutputPenelitian::model()->find('proposal_id = :pid', array('pid' => $id));\n /*if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n * \n */\n return $model;\n }", "title": "" }, { "docid": "88ab1cb73be99bd9c800c1092737f533", "score": "0.6240453", "text": "protected function findModel($id)\n {\n\t\tif (($model = AdminSheet::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "a66e2637723a128c6acdfcf9a62270ed", "score": "0.6237752", "text": "protected function findModel($id)\n {\n if (($model = Procedimientos::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n }", "title": "" }, { "docid": "4e339bc24049265356389dcab94a463c", "score": "0.62354517", "text": "public function loadModel($id)\n\t{\n\t\t$model=KlinikCustom::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "a87e7588a7ed2e3fc8a7a93d95a41e53", "score": "0.6235248", "text": "protected function findModel($id)\n{\nif (($model = IcsrVersionResponse::findOne($id)) !== null) {\nreturn $model;\n} else {\nthrow new HttpException(404, 'The requested page does not exist.');\n}\n}", "title": "" }, { "docid": "71420cad72295f86d9aca2bd04e9a03b", "score": "0.62331915", "text": "public function loadModel($id)\n\t{\n\t\t$model= PPPasienM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "b743c8cab107623c0a1e9510380680c8", "score": "0.62314844", "text": "public function loadModel($id) {\n $model = Supplier::model()->findByAttributes(array('supplier_id' => $id, 'company_id' => Yii::app()->user->company_id));\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n\n return $model;\n }", "title": "" }, { "docid": "d237569ee8ef32d2cdd53dc003f5ef3f", "score": "0.6229889", "text": "protected function findModel($dcn_id)\n\t{\n\t\tif (($model = Dcn::findOne($dcn_id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "4d66fcdbeffb37999ee9a36a9b4037bc", "score": "0.62294286", "text": "public function loadModel($id)\n\t{\n /*$criteria = new CDbCriteria; \n $criteria->addCondition('idproducto = '.$id);\n $criteria->addCondition('estado_idestado = 1');*/\n \n\t\t$model=Producto::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'Producto no existe o no se encuentra disponible.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "d4027bba1e57e631c6d096fe0e4994e4", "score": "0.62225205", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = Kus::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "12b6f47ec99dc1820416a0d360e8df4c", "score": "0.6220967", "text": "public function loadModel($id) {\n $model = Planificacion::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "e9645e8e8650e1cbad249a6295e3cf96", "score": "0.62178457", "text": "protected function findModel($id)\n {\n if (($model = Productos::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "8e87be7d3c1f2e69187bb2efc736bd0b", "score": "0.62174994", "text": "public function loadModel($id)\n\t{\n\t\t$model=Persona::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "2a020ad5cf56bcc29c83b7d1b312b0f2", "score": "0.6217254", "text": "protected function findModel($id)\n {\n if (($model = TblProductType::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "c369a079bcf6389f21132371c79948c2", "score": "0.62169737", "text": "public function loadModel($id)\n\t{\n\t\t$model=Productlot::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "cb0b305236a0ef8bd26212bc2fc5fafd", "score": "0.6216964", "text": "protected function findModel($Items_No, $property_id)\n {\n if (($model = ItemsHasProperty::findOne(['Items_No' => $Items_No, 'property_id' => $property_id])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "65bb847fde979776157c479f317c05d2", "score": "0.62161255", "text": "public function getPk()\n {\n $id = \\DataHandle\\Get::get('e');\n\n if ($id)\n {\n $model = static::$modelClass::findOneByPK($id);\n\n if ($model)\n {\n return static::getBrigdeOut($model);\n }\n else\n {\n throw new \\UserException('Impossível encontrar registro ' . $this->getPageUrl() . ' id ' . $id);\n }\n }\n\n throw new \\UserException('Impossível encontrar registro ' . $this->getPageUrl() . ' id ' . $id);\n }", "title": "" }, { "docid": "b1f37a39f2ca34d820221b6dac8dfec7", "score": "0.6215788", "text": "private final function find()\r\n {\r\n $data = $this->getData([$this->getPkName() => $this->getPK()]);\r\n\r\n if (!$data[0] || !$this->setAttributes($data[0])) {\r\n throw new Exception(\"invalid Pk\", 1);\r\n }\r\n }", "title": "" }, { "docid": "178ace23322b17b5cb5a5e25fa968528", "score": "0.6212993", "text": "protected function findModel($id)\n {\n if (($model = Cart::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "48d495e79cdd64c712b31269fdad74da", "score": "0.62128735", "text": "public function loadModel($id)\n\t{\n\t\t$model=AKPenjaminpasienM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "c8706f0f9446b64922e03eb238a1ec59", "score": "0.62114644", "text": "public function loadModel($id)\n\t{\n\t\t$model=Purchase::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "40cd56df1f61f45cfeb9220f5b5da719", "score": "0.6209922", "text": "protected function findModel($id)\n {\n if (($model = Operazione::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "12ecb34ecadf52e1be05e29bd4310a3a", "score": "0.62083054", "text": "protected function findModel($id)\n {\n if (($model = Compra::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "71c543b6c07dfd0d75ebee9b817e5688", "score": "0.62071", "text": "protected function findModel($id)\n {\n $model = Compra::findOne($id);\n if ($model) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "d1ab9beb99eb8a5e97e103eaf8a95fe1", "score": "0.62034523", "text": "public function find(int $id){\n $model = $this->model->find($id);\n if ($model) return $model;\n else throw new ModelNotFoundException(class_basename($this->model).\" not found\");\n }", "title": "" }, { "docid": "7d80c67c92be8ad1cb68b41d20aaaf01", "score": "0.62017834", "text": "public function loadModel($id)\n {\n $model=SingleEntryProfile::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "215433de28c1f585661f87821f284ff5", "score": "0.6199318", "text": "protected function findModel($id)\n {\n if (($model = Producto::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "a0bba8855c1ea788917655d2516b1116", "score": "0.61948246", "text": "public function loadModel($id)\n{\n$model=JugadorPosicionTorneo::model()->findByPk($id);\nif($model===null)\nthrow new CHttpException(404,'The requested page does not exist.');\nreturn $model;\n}", "title": "" }, { "docid": "5bb43fd528854f712412d44a256913c8", "score": "0.6193", "text": "protected function findModel($id)\n {\n if (($model = Proceso::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "f9c5139d66ba2b67044c50dc46873e24", "score": "0.6191255", "text": "public function loadModel($id)\n\t{\n\t\t$model=Templatecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "8dc567457834ece9a7b0126276862431", "score": "0.6189305", "text": "protected function findModel($id)\n {\n if (($model = AnnouncedPuResults::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "b83a875413d8d92f3559af97f27ca0eb", "score": "0.6188618", "text": "protected function findModel($id)\n {\n if (($model = Parcel::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "32db51d964ef04e8b92e357a959c19d6", "score": "0.618852", "text": "public function loadModel($id) {\n $model = Solicitudeskit::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "8b1c12a381ca3c55f9304ebfeb31eb9a", "score": "0.6187245", "text": "protected function findModel($id) {\n if (($model = Mapa::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0db97a78fba940667943ab128045a174", "score": "0.61870056", "text": "protected function findModel($id) {\n if (($model = Product::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0db97a78fba940667943ab128045a174", "score": "0.61870056", "text": "protected function findModel($id) {\n if (($model = Product::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0db97a78fba940667943ab128045a174", "score": "0.61870056", "text": "protected function findModel($id) {\n if (($model = Product::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "45cde6a7306178babdafb39af7ae51cd", "score": "0.61868894", "text": "protected function findModel($id)\n {\n if (($model = Prestadores::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "b70aa9239080ed8bb77c509349ff7064", "score": "0.6185161", "text": "protected function findModel($id)\n {\n if (($model = Production::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" } ]
18f44eb289f8d59e13c908b7718b34a2
Busca los mensajes por el campo delete_receiver exacto
[ { "docid": "e1c2aa88ae0c5b38b3741007f3c1d156", "score": "0.0", "text": "public function scopeDeleteReceiver($query, $delete) {\n \tif ($delete=='no') {\n \t\treturn $query->where('delete_receiver','=',0);\n \t}else if($delete=='si'){\n return $query->where('delete_receiver','=',1);\n }\n }", "title": "" } ]
[ { "docid": "c8980b7d0e8f0daf598215c3e2a0e0a2", "score": "0.72621596", "text": "public function deleteMessages();", "title": "" }, { "docid": "1e59070a0799c65393629eafc259d850", "score": "0.7056342", "text": "public function message_delete(){\n $spathSQL= $this->GLOBALS_INI[\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATH_MODEL\"] . \"message_delete.sql\";\n $this->resultat[\"espace_admin_message_delete\"]= $this->oBdd->treatDatas($spathSQL, array(\n \"id_message\" => $this->VARS_HTML[\"id_message\"]\n ));\n }", "title": "" }, { "docid": "ab2f3741404030a78bf796d0ed467a9f", "score": "0.67974967", "text": "public function deletMessages(Request $request){\n $mensagensids = $request->all();\n //verificar se tem algo para deletear, usei >1 para começar depois do token.\n if (count($mensagensids)>1){\n //percorrer a array dos ids e deletar.\n foreach ($mensagensids as $messageid){\n Message::destroy($messageid);\n }\n } else{\n return redirect(\"/messages\") -> with(\"success\", \"Nenhuma mensagem selecionada para exclusão\");\n }\n return redirect(\"/messages\") -> with(\"success\", \"As mensagens foram excluídas com sucesso.\");\n }", "title": "" }, { "docid": "32572d515c31fa186f57635deb26dc84", "score": "0.6778256", "text": "public function delete_msgs_post() {\n $msg_id = $this->input->post('msg_id');\n $this->check_empty($msg_id, 'Please enter msg id');\n \n $user_id = $this->input->post('user_id');\n $this->check_empty($user_id, 'Please enter user_id');\n\n $where_data = array(\n 'id' => $msg_id\n );\n\n $msg_exists = $this->common_model->findWhere($table = 'ws_messages', $where_data, $multi_record = False, $order = '');\n\n if ($msg_exists) {\n if ($msg_exists['sender_id'] == $user_id) {\n $msgpost_data = array('sender_deleted' => 0);\n } else {\n $msgpost_data = array('receiver_deleted' => 0);\n }\n $this->common_model->updateWhere('ws_messages', $where_data, $msgpost_data);\n } else {\n $data = array(\n 'status' => 0,\n 'data' => 'msg not exist'\n );\n }\n $data = array(\n 'status' => 1,\n 'data' => 'success'\n );\n $this->response($data, 200);\n }", "title": "" }, { "docid": "0f32450ad19cc5c3618035c45e7fa89b", "score": "0.66441226", "text": "public function deleteMessages($params);", "title": "" }, { "docid": "0f32450ad19cc5c3618035c45e7fa89b", "score": "0.66441226", "text": "public function deleteMessages($params);", "title": "" }, { "docid": "d9c71ecc59e0b6576b940e54d226d740", "score": "0.6420464", "text": "public function delete () {\n \n $id = (int) $_POST['id'];\n \n $sql = \"DELETE FROM message WHERE id = \" . $id . \" AND recipient = \" . $this->auth->user_id;\n $unchecked = $this->db->execute($sql);\n \n $this->post_construct();\n \n $this->render();\n }", "title": "" }, { "docid": "f5b575cc2b5c549e343155fbf45fcce2", "score": "0.64116013", "text": "public function removeMessage()\n {\n $afterTime = intval(env('TELEGRAM_BOT_DELETE_MESSAGE_AFTER', 10));\n $messages = $this->botUser->getOldMessages($afterTime);\n\n if (count($messages))\n foreach ($messages as $message) {\n $this->deleteMessage($message->group_id, $message->question_message_id);\n\n $this->botUser->set(array(\n 'group_id' => $message->group_id,\n 'user_id' => $message->user_id,\n 'question_message_id' => null,\n 'answer' => null\n ));\n\n echo \"group_id: {$message->group_id}, user_id: {$message->user_id}, question_message_id: {$message->question_message_id}<br>\";\n }\n else\n echo 'Not Messages!';\n }", "title": "" }, { "docid": "9b5069f07404a682187abf47e1351136", "score": "0.6337287", "text": "public function remove(){\n\t\t$this->autoRender = false;\n\t\t$id = $this->data[\"idMs\"]; \n\t\tif ($this->checkOwner($id)){\n\t\t//\techo \"co thang nay\"; \n\t\t\t$this->Message->deleteAll(array(\"ID\"=> $id)); \n\t\t}else echo \"fail\"; \n\t}", "title": "" }, { "docid": "fbdeba91579515ec5a37d36ba50397d4", "score": "0.6331731", "text": "public function delete() {\n global $DB;\n if ($this->id) {\n $DB->delete_records_select('local_umnglobalmessage', \"id=$this->id\");\n }\n }", "title": "" }, { "docid": "acd747458a26a7c9e2dc993af7e2a937", "score": "0.627152", "text": "public function cronDeleteMessages()\n\t{\n\t\t\n\t\t// an extra check:\n\t\tif (!Phpfox::getParam('mail.enable_cron_delete_old_mail')) return false;\n\t\t(($sPlugin = Phpfox_Plugin::get('mail.service_process_cronDeleteMessages_start')) ? eval($sPlugin) : false);\n\t\t\n\t\t$iTime = (Phpfox::getTime() - (Phpfox::getParam('mail.message_age_to_delete') * CRON_ONE_DAY));\n\t\t// delete from trashcan the ones already deleted\n\t\t$this->database()->update($this->_sTable, array('viewer_type_id' => 3), 'time_updated < ' . $iTime . ' AND viewer_type_id = 1');\n\t\t$this->database()->update($this->_sTable, array('owner_type_id' => 3), 'time_updated < ' . $iTime. ' AND owner_type_id = 1');\n\t\t\n\t\t(($sPlugin = Phpfox_Plugin::get('mail.service_process_cronDeleteMessages_end')) ? eval($sPlugin) : false);\t\t\n\t}", "title": "" }, { "docid": "366e8cf291ffdd93e391ec71144fc7a4", "score": "0.6244456", "text": "public function plugin_delete_card_message() {\n\t\tglobal $wpdb;\n\t\t$message_id = $_REQUEST['message_id'];\n\t\t$tbl_card_msg = $wpdb->prefix . 'card_messages';\n\t\t$sql = \"DELETE FROM {$tbl_card_msg} WHERE id={$message_id}\";\n\t\t$wpdb->query($sql);\n\t\texit;\n\t}", "title": "" }, { "docid": "0f4e5c7c9d63a09eb28a64b077cf4bc7", "score": "0.62354606", "text": "public function deleteMessage($ID)\n {\n $req = $this->_bdd->prepare('UPDATE receiver as r\n SET r.deleted = 1\n WHERE r.id_message = :id\n ');\n\n $req->bindValue(':id', $ID, PDO::PARAM_INT);\n $req->execute();\n }", "title": "" }, { "docid": "8dff3e1087c8e2b4f16434db9c23d0cd", "score": "0.62173134", "text": "function deleteMessage ($del) {\n\t\t\n\t\t\tFoodNutrientsAnalyzer::oldDb();\n\t\t\t\t\tmysql_query(\"DELETE FROM message WHERE id='$del'\");//delete all from status\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\theader('Location:message.php');\n\t\t\n\t\t\n\t\t}", "title": "" }, { "docid": "b024e6b458a4097a2c3deb25c64cf35d", "score": "0.6134872", "text": "function delete()\n\t{\n\t\t$cids = JRequest::getVar( 'cid', array(0), 'post', 'array' );\n\t\t\n\t\t//Check if the messages are for the right person -> if the user has the right to delete\n\t\t$db =& JFactory::getDBO();\n\t\t$thisuser =& JFactory::getUser();\n\t\t$db->setQuery(\"SELECT n FROM #__messaging WHERE idTo=\".$thisuser->id.\" ORDER BY date DESC\");\n\t\t\n\t\t$rows = $db->loadObjectList();\n\n\t\t$ids = array();\n\t\tforeach($rows as $row){\n\t\t\t$ids[$row->n] = 1;\n\t\t}\n\n\t\t$row =& $this->getTable();\n\n\t\tif (count( $cids ))\n\t\t{\n\t\t\tforeach($cids as $cid) {\n\t\t\t\tif(!isset($ids[$cid])){\t\t//Do not delete messages that are not for that person\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!$row->delete( $cid )) {\n\t\t\t\t\t$this->setError( $row->getErrorMsg() );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e2f0881b9c64abf33d47c4243b3c1837", "score": "0.6130334", "text": "public function deleteReadMessages()\n {\n Contact::where('view', '=', 1)->delete();\n return response(['msg' => ' تم حذف جميع الرسائل المقروءة'], 200);\n }", "title": "" }, { "docid": "3eb2bb55da372bbc9eaabf13cf239448", "score": "0.61119854", "text": "public function destroy($id)\n {\n $message = Message::find($id);\n if($message->sender_id == auth()->user()->id) {\n $message->sender_delete = \\Carbon\\Carbon::now();\n $message->save();\n } elseif($message->receiver == auth()->user()->id) {\n $message->receiver_delete = \\Carbon\\Carbon::now();\n $message->save();\n } elseif((!empty($message->sender_deleete)) && (!empty($message->receiver_delete))) {\n $message->delete();\n }\n\n return redirect('/contact')->with('success', 'Message deleted');\n }", "title": "" }, { "docid": "6a7f9dc93c17349a24a1e357826b1614", "score": "0.6099437", "text": "public function deleteMessage(Request $request){\n\n $idparty = $request->input('idparty');\n\n try {\n\n return Message::destroy([\n 'idparty' => $idparty,\n ]);\n \n } catch (QueryException $error) {\n \n $eCode = $error->errorInfo[1];\n \n if($eCode == 1062) {\n return response()->json([\n 'error' => \"No has podido borrar este mensaje\"\n ]);\n }\n \n }\n }", "title": "" }, { "docid": "b91453f6211d673487a41c1f8cf17d7b", "score": "0.6060252", "text": "public function delete_conversation_post() {\n $sender_id = $this->input->post('sender_id');\n $this->check_empty($sender_id, 'Please enter sender_id');\n\n $receiver_id = $this->input->post('receiver_id');\n $this->check_empty($receiver_id, 'Please enter receiver_id');\n\n $conversation_id = '';\n\n $wdata = $this->db->where(\"(sender_id='\" . $sender_id . \"' AND receiver_id='\" . $receiver_id . \"') OR (sender_id='\" . $receiver_id . \"' AND receiver_id='\" . $sender_id . \"')\", NULL, FALSE);\n \n $post_exists = $this->common_model->findWhere($table = 'ws_conversations', $wdata, $multi_record = False, $order = '');\n\n if ($post_exists) {\n if (($post_exists['sender_id'] == $sender_id && $post_exists['receiver_id'] == $receiver_id) || ($post_exists['sender_id'] == $receiver_id && $post_exists['receiver_id'] == $sender_id)) {\n \n if ($sender_id == $post_exists['sender_id'] && $post_exists['sender_status'] == $sender_id) {\n $post_data = array('sender_status' => 0);\n\n $msgpost_data = array('sender_deleted' => 0);\n $this->common_model->updateWhere('ws_messages', $where_data = array('conversation_id' => $conversation_id), $msgpost_data);\n\n } elseif ($sender_id == $post_exists['receiver_id'] && $post_exists['receiver_status'] == $sender_id) {\n $post_data = array('receiver_status' => 0);\n\n $msgpost_data = array('receiver_deleted' => 0);\n $this->common_model->updateWhere('ws_messages', $where_data = array('conversation_id' => $conversation_id), $msgpost_data);\n \n } else {\n $data = array(\n 'status' => 0,\n 'data' => 'failed'\n );\n }\n $where_data = array('id' => $post_exists['id']);\n $this->common_model->updateWhere('ws_conversations', $where_data, $post_data);\n\n $data = array(\n 'status' => 1,\n 'message' => 'success'\n );\n } else {\n $data = array(\n 'status' => 1,\n 'message' => 'User id does not belong to conversation'\n );\n }\n } else {\n $data = array(\n 'status' => 0,\n 'message' => 'No conversation'\n );\n }\n $this->response($data, 200);\n }", "title": "" }, { "docid": "ded47282b73edb69d0f8cc88305909e0", "score": "0.60052395", "text": "public function deleted(Message $message)\n {\n //\n }", "title": "" }, { "docid": "4dc5643bd27f4c8d8f7bdb428ed4754f", "score": "0.5991", "text": "function email_delete(){\r\n \r\n imap_delete($this->link, $this->msgid); \r\n\r\n }", "title": "" }, { "docid": "0ade3c2f2a4f92fc349f1f5ce870b8e8", "score": "0.59595114", "text": "public function deletemsg($id){\n\t\t$query = \"DELETE FROM message_table WHERE message_id = '$id'\";\n\t\t$deldata = $this->db->datadelete($query);\n\t\tif ($deldata) {\n\t\t\t$msg = \"<span class='success'> Successfully Deleted.</span>\";\n\t\t\treturn $msg;\n\t\t}\n\t\t}", "title": "" }, { "docid": "accc6b3945c6fe849f44f15c106c8927", "score": "0.59327275", "text": "public function dispatchDeleteMessage() {\n $this->papaya()->messages->dispatch(\n new PapayaMessageDisplayTranslated(\n PapayaMessage::TYPE_INFO, 'Dependency deleted.'\n )\n );\n }", "title": "" }, { "docid": "db3cdc1c1adac3bbfbaaa88041846081", "score": "0.5900371", "text": "function multipledeletemessage_inbox()\n\t{ $msgid=(implode(',',$_POST['delete']));\n\t\t$this->load->helper('url');\n\t\t$this->load->model('user_model');\n\t\t$this->user_model->multipledeletemsg($msgid);\n\t\tredirect('user/inbox');\n\t\t\n\t}", "title": "" }, { "docid": "6b0eef0d055973202bbecc8595effce6", "score": "0.5897413", "text": "function delete_messages_quest($question){\n $args = array(\n 'clause_where'=>array('ID_question'=>$question)\n );\n \n execute_sql(\"DELETE\", \"messages\", $args);\n }", "title": "" }, { "docid": "135ca086ed2cd6865b57fdd1e37f6d92", "score": "0.5834493", "text": "public function api_remove_messages() { \n $this->_checkVars ( array (\n 'member_big',\n 'id_msg' \n ) );\n \n $memBig = $this->api ['member_big'];\n $idMessage = $this->api ['id_msg'];\n \n $result = $this->ChatMessage->removeMessages ( $idMessage, $memBig );\n if ($result !== false) {\n \n $this->Member->rank($memBig,1); //rank +1 cancella msg chat\n $this->_apiOk ();\n } else {\n $this->_apiEr ( __('Errore. Messaggio non cancellato.') );\n }\n }", "title": "" }, { "docid": "5c22e99b9be9aacf41d278819acf2c31", "score": "0.5819018", "text": "public function service_deleteMessage($request, $response)\n {\n\n // resource laden\n $user = $this->getUser();\n $acl = $this->getAcl();\n $tpl = $this->getTpl();\n $resContext = $response->createContext();\n\n // load request parameters an interpret as flags\n $params = $this->getFlags($request);\n\n $messageId = $request->param('objid', Validator::EID);\n\n $resContext->assertNotNull(\n 'Missing the Message ID',\n $messageId\n );\n\n if ($resContext->hasError)\n throw new InvalidRequest_Exception();\n\n /* @var $model BuizMessage_Model */\n $model = $this->loadModel('BuizMessage');\n\n $model->deleteMessage($messageId);\n\n //wgt-table-buiz-groupware_message_row_\n $tpl->addJsCode(<<<JS\n \\$S('#wgt-table-buiz-groupware_message_row_{$messageId}').remove();\nJS\n );\n\n }", "title": "" }, { "docid": "14457cea5e352fb366fdf0d233a1bb1e", "score": "0.5804251", "text": "protected function logDeletionMessage() {\n $entity = $this->getEntity();\n $this->logger($entity->getEntityType()->getProvider())->notice('The @entity-type %label has been deleted.', [\n '@entity-type' => $entity->getEntityType()->getSingularLabel(),\n '%label' => $entity->label(),\n ]);\n }", "title": "" }, { "docid": "926c63dadda7546a6153c129b02010e8", "score": "0.5802469", "text": "public function DelMensaje ($input) {\n $adb = new MySQL();\n $con = $adb->Connect();\n \n # La sentencia SQL permite realizar la cadena de lo que queremos consultar.\n $sql = \"DELETE FROM mensajeria WHERE `id` = '$input'\";\n \n # Solicito la consulta.\n $query = $con->query($sql);\n \n # Devuelvo los datos\n return $query;\n \n # Cierro la conexión con la base de datos.\n $con->close();\n \n }", "title": "" }, { "docid": "b9c7a84cc9e01be33715c93ac325c501", "score": "0.5784867", "text": "function deleteMessages($personal_messages, $folder = null, $owner = null)\n{\n\t$db = database();\n\n\tif ($owner === null)\n\t{\n\t\t$owner = array(User::$info->id);\n\t}\n\telseif (empty($owner))\n\t{\n\t\treturn;\n\t}\n\telseif (!is_array($owner))\n\t{\n\t\t$owner = array($owner);\n\t}\n\n\tif ($personal_messages !== null)\n\t{\n\t\tif (empty($personal_messages) || !is_array($personal_messages))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($personal_messages as $index => $delete_id)\n\t\t{\n\t\t\t$personal_messages[$index] = (int) $delete_id;\n\t\t}\n\n\t\t$where = '\n\t\t\t\tAND id_pm IN ({array_int:pm_list})';\n\t}\n\telse\n\t{\n\t\t$where = '';\n\t}\n\n\tif ($folder === 'sent' || $folder === null)\n\t{\n\t\t$db->query('', '\n\t\t\tUPDATE {db_prefix}personal_messages\n\t\t\tSET \n\t\t\t\tdeleted_by_sender = {int:is_deleted}\n\t\t\tWHERE id_member_from IN ({array_int:member_list})\n\t\t\t\tAND deleted_by_sender = {int:not_deleted}' . $where,\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'is_deleted' => 1,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t);\n\t}\n\n\tif ($folder !== 'sent')\n\t{\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t// Calculate the number of messages each member's gonna lose...\n\t\t$db->fetchQuery('\n\t\t\tSELECT\n\t\t\t\tid_member, COUNT(*) AS num_deleted_messages, CASE WHEN is_read & 1 >= 1 THEN 1 ELSE 0 END AS is_read\n\t\t\tFROM {db_prefix}pm_recipients\n\t\t\tWHERE id_member IN ({array_int:member_list})\n\t\t\t\tAND deleted = {int:not_deleted}' . $where . '\n\t\t\tGROUP BY id_member, is_read',\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t)->fetch_callback(\n\t\t\tfunction ($row) use ($where) {\n\t\t\t\t// ...And update the statistics accordingly - now including unread messages!.\n\t\t\t\tif ($row['is_read'])\n\t\t\t\t{\n\t\t\t\t\tupdateMemberData($row['id_member'], array('personal_messages' => $where === '' ? 0 : 'personal_messages - ' . $row['num_deleted_messages']));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tupdateMemberData($row['id_member'], array('personal_messages' => $where === '' ? 0 : 'personal_messages - ' . $row['num_deleted_messages'], 'unread_messages' => $where === '' ? 0 : 'unread_messages - ' . $row['num_deleted_messages']));\n\t\t\t\t}\n\n\t\t\t\t// If this is the current member we need to make their message count correct.\n\t\t\t\tif (User::$info->id == $row['id_member'])\n\t\t\t\t{\n\t\t\t\t\tUser::$info->messages -= $row['num_deleted_messages'];\n\t\t\t\t\tif (!($row['is_read']))\n\t\t\t\t\t{\n\t\t\t\t\t\tUser::$info->unread_messages -= $row['num_deleted_messages'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\t// Do the actual deletion.\n\t\t$db->query('', '\n\t\t\tUPDATE {db_prefix}pm_recipients\n\t\t\tSET \n\t\t\t\tdeleted = {int:is_deleted}\n\t\t\tWHERE id_member IN ({array_int:member_list})\n\t\t\t\tAND deleted = {int:not_deleted}' . $where,\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'is_deleted' => 1,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t);\n\t}\n\n\t// If sender and recipients all have deleted their message, it can be removed.\n\t$remove_pms = array();\n\t$db->fetchQuery('\n\t\tSELECT\n\t\t\tpm.id_pm AS sender, pmr.id_pm\n\t\tFROM {db_prefix}personal_messages AS pm\n\t\t\tLEFT JOIN {db_prefix}pm_recipients AS pmr ON (pmr.id_pm = pm.id_pm AND pmr.deleted = {int:not_deleted})\n\t\tWHERE pm.deleted_by_sender = {int:is_deleted}\n\t\t\t' . str_replace('id_pm', 'pm.id_pm', $where) . '\n\t\tGROUP BY sender, pmr.id_pm\n\t\tHAVING pmr.id_pm IS null',\n\t\tarray(\n\t\t\t'not_deleted' => 0,\n\t\t\t'is_deleted' => 1,\n\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t)\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$remove_pms) {\n\t\t\t$remove_pms[] = $row['sender'];\n\t\t}\n\t);\n\n\tif (!empty($remove_pms))\n\t{\n\t\t$db->query('', '\n\t\t\tDELETE FROM {db_prefix}personal_messages\n\t\t\tWHERE id_pm IN ({array_int:pm_list})',\n\t\t\tarray(\n\t\t\t\t'pm_list' => $remove_pms,\n\t\t\t)\n\t\t);\n\n\t\t$db->query('', '\n\t\t\tDELETE FROM {db_prefix}pm_recipients\n\t\t\tWHERE id_pm IN ({array_int:pm_list})',\n\t\t\tarray(\n\t\t\t\t'pm_list' => $remove_pms,\n\t\t\t)\n\t\t);\n\t}\n\n\t// Any cached numbers may be wrong now.\n\tCache::instance()->put('labelCounts:' . User::$info->id, null, 720);\n}", "title": "" }, { "docid": "8ce237a65bccc528ec95f33e581172ae", "score": "0.5770867", "text": "public function deleteScheduledMessages($params);", "title": "" }, { "docid": "04bbeacd2a46d6188eeb569a4cb873e6", "score": "0.5714559", "text": "abstract public function DeleteMessage($index);", "title": "" }, { "docid": "3c9d99255f20ffbee3f5e4ae40be6dfc", "score": "0.5711736", "text": "private function _DELETE()\n {\n // Retrieve the payload and send with the friendId to the handler.\n $payload = json_decode(file_get_contents('php://input'), true);\n\n // /api/v2/Message/delete-message/{messageId} - delete a message between two users.\n if(count($this->args) == 1 && $this->verb == 'delete-message')\n {\n return \\Handlers\\Message::deleteMessage($this->args[0], $this->user);\n }\n // /api/v2/Message/delete-conversation/{friendId} - delete a message between two users.\n else if(count($this->args) == 1 && $this->verb == 'delete-conversation')\n {\n return \\Handlers\\Message::deleteConversation($payload, $this->args[0], $this->user);\n }\n // Unsupported handler\n else\n throw new \\Exception(\"No handler found for the GET resource of this URI, please check the documentation.\");\n\n }", "title": "" }, { "docid": "69b961e78be46dddbe681dcd80260d26", "score": "0.5706828", "text": "function delete_messages($source=NULL)\n\t{\n\t\tif($this->input->post('type')) $param['type'] = $this->input->post('type');\n\t\tif($this->input->post('current_folder')) $param['current_folder'] = $this->input->post('current_folder');\n\t\tif($this->input->post('id')) $param['id'][0] = $this->input->post('id');\n\t\tif(!is_null($source)) $param['source'] = $source;\n\t\tif($this->input->post('number')) $param['number'] = $this->input->post('number');\n\t\t\n\t\tif($param['source']=='outbox') $param['option'] = 'outbox';\n\t\telse\n\t\t{\n\t\t\t// check trash/permanent delete\n\t\t\tif (isset($param['current_folder']) && $param['current_folder']=='5') $param['option'] = 'permanent';\n\t\t\telse if (!isset($param['current_folder']) && $this->Kalkun_model->get_setting()->row('permanent_delete')=='true') $param['option'] = 'permanent';\n\t\t\telse $param['option'] = 'temp';\t\n\t\t}\n\t\t\t\t\n\t\tif($param['type']=='single' && $param['source']=='inbox')\n\t\t{\n\t\t\t$multipart['type'] = 'inbox';\n\t\t\t$multipart['option'] = 'check';\n\t\t\t$multipart['id_message'] = $param['id'][0];\n\t\t\t$tmp_check = $this->Message_model->get_multipart($multipart);\n\t\t\tif($tmp_check->row('UDH')!='')\n\t\t\t{\n\t\t\t\t$multipart['option'] = 'all';\n\t\t\t\t$multipart['udh'] = substr($tmp_check->row('UDH'),0,8);\n\t\t\t\t$multipart['phone_number'] = $tmp_check->row('SenderNumber');\t\t\t\t\t\n\t\t\t\tforeach($this->Message_model->get_multipart($multipart)->result() as $part):\n\t\t\t\t$param['id'][] = $part->ID;\n\t\t\t\tendforeach;\t\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t$this->Message_model->delete_messages($param);\n\t}", "title": "" }, { "docid": "915229c363ee13c593a3c563e8a93110", "score": "0.5700838", "text": "public function messages(){\n\t\t$this->user_model->get_messages();\n\n\t\t//$message_to_delete = $this->db->input('post');\n\t\t$id = $this->input->post('message_to_delete');\n\t\tif(isset($id)){\n\t\t\t$this->user_model->delete_message($id);\n\t\t}\n\t\t\n\n\t\t//echo $message_to_delete;\n\t\t// delete the messages\n\n\t\t$data['messages'] = $this->user_model->get_messages();\n\t\t$this->load->view('header');\n\t\t$this->load->view('user/message_user_view' , $data);\n\t}", "title": "" }, { "docid": "1c24891254d75ab44854b728aba49c2d", "score": "0.5698583", "text": "public function deleteMailreceivedAction($id, Request $request)\n {\n // On récupère notre entity manager\n $em = $this->getDoctrine()->getManager();\n\n // On récupère le mail received d'id $id\n $mail = $em->getRepository('MailsMailBundle:Mail')->findMailReceived($id, $this->getUser()->getCompany());\n\n if (null === $mail) {\n throw new NotFoundHttpException(\"Le courrier reçu d'id \".$id.\" n'existe pas.\");\n }\n\n // On crée un formulaire vide, qui ne contiendra que le champ CSRF\n // Cela permet de protéger la suppression de courrier contre cette faille\n $form = $this->createFormBuilder()->getForm();\n \n // Si la requête est en POST, le courrier sera supprimé\n if ($form->handleRequest($request)->isSubmitted() && $request->isMethod('POST')) {\n //On stocke la référence du courrier reçu dans une varable tampon\n $tempMailreceivedRef = $mail->getReference();\n\n // On supprime notre objet $mail dans la base de données\n $em->remove($mail);\n $em->flush();\n\n // On affiche un message de confirmation\n $request\n ->getSession()\n ->getFlashBag()\n ->add('success', 'Le courrier reçu de référence \"'.$tempMailreceivedRef.'\" a bien été supprimé.');\n\n //On détruit la variable tampon.\n unset($tempMailreceivedRef);\n \n // Puis on redirige vers l'accueil\n return $this->redirect($this->generateUrl('mails_core_home'));\n }\n // Si la requête est en GET, on affiche une page de confirmation avant de supprimer\n return array('mail' => $mail, 'form' => $form->createView());\n }", "title": "" }, { "docid": "8d8f09453091d339dda680268cae17e1", "score": "0.5676004", "text": "public function deleteMessage($id, $trigger = true);", "title": "" }, { "docid": "62e834e93d0d2911ac924c2f08afd08e", "score": "0.56697726", "text": "protected function _clean_up_msg() {\n\t\t$types = array('error', 'info', 'success', 'attention');\n\t\tforeach ($types as $type) {\n\t\t\tCookie::delete('message' . $type);\n\t\t}\n\n\t}", "title": "" }, { "docid": "31bd485a661ac0174fe2da80e193794b", "score": "0.56648916", "text": "public function deleteMessages($message){\n $sql = \"DELETE FROM message WHERE message_id = $message\";\n $result = $this->_db->exec($sql);\n return $result;\n }", "title": "" }, { "docid": "431a7a06378f0ce9fd6972ab5f63903b", "score": "0.56604457", "text": "function multipledeletemessage_sent()\n\t{ $msgid=(implode(',',$_POST['delete']));\n\t\t$this->load->helper('url');\n\t\t$this->load->model('user_model');\n\t\t$this->user_model->multipledeletemsg_sent($msgid);\n\t\tredirect('user/sentmessages');\n\t\t\n\t}", "title": "" }, { "docid": "91cdb991b18924a80ec7336b91c55563", "score": "0.56544137", "text": "Function DeleteMessage($message) {\n if ($this->state != \"TRANSACTION\")\n return($this->SetError(\"connection is not in TRANSACTION state\"));\n if ($this->PutLine(\"DELE $message\") == 0)\n return($this->SetError(\"Could not send the DELE command\"));\n $response = $this->GetLine();\n if (GetType($response) != \"string\")\n return($this->SetError(\"Could not get message delete command response\"));\n if ($this->Tokenize($response, \" \") != \"+OK\")\n return($this->SetError(\"Could not delete the message: \" . $this->Tokenize(\"\\r\\n\")));\n $this->must_update = 1;\n return(\"\");\n }", "title": "" }, { "docid": "b1053fcb09a85ddd656a54e1de84e13d", "score": "0.56535214", "text": "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('id');\n\t\t\t$message = $this->Phreezer->Get('Message',$pk);\n\n\t\t\t$message->Delete();\n\n\t\t\t$output = new stdClass();\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "f1979c0fc570a5b4bb5839d4134a3948", "score": "0.56508136", "text": "public function deleteAccountAction() {\n \n $user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createDeleteForm($user->getId());\n $request = $this->getRequest();\n \n if($request->isMethod('POST')) {\n \n $form->bindRequest($request);\n\n if ($form->isValid()) {\n \n $this->get('fenchy.messenger')->removeUserMessages();\n $em = $this->getDoctrine()->getManager();\n $messages = $em->getRepository('CunningsoftChatBundle:Message')->findBySenderOrReceiver($user);\n\n foreach($messages as $message) {\n\n if($message->getAuthor() == NULL) {\n if($message->getReceiver()->getId() === $user->getId()) {\n $em->remove($message); // remove if sender and receiver has been deleted\n }\n } elseif($message->getReceiver() == NULL) {\n if($message->getAuthor()->getId() == $user->getId()) {\n $em->remove($message); // remove if sender and receiver has been deleted\n }\n } else {\n if($message->getAuthor()->getId() == $user->getId()) {\n $em->remove($message); \n }\n \n if($message->getReceiver()->getId() == $user->getId()) {\n $em->remove($message);\n }\n }\n } \n // We have to flush because after chat remove we can remove user \n $em->flush();\n \n $em->remove($user);\n $em->flush();\n\n $this->get('session')->setFlash(\n 'positive',\n $this->get('translator')\n ->trans('user.account_deleted')\n );\n\n //$this->get('session')->set('gallery', array(1 => '', 2 => '', 3 => ''));\n \n return $this->redirect($this->generateUrl('fenchy_regular_user_settings_basic'));\n }\n\n $this->get('session')->setFlash(\n 'negative',\n $this->get('translator')\n ->trans('user.account_not_deleted')\n );\n \n }\n \n return $this->render(\"FenchyRegularUserBundle:Settings:deleteAccount.html.twig\", array(\n 'form' \t=> $form->createView(),\n 'entity'=> $user, \n ));\n \n }", "title": "" }, { "docid": "c15a703d85fa827f427601d2a8a0f8a7", "score": "0.5646959", "text": "function ciniki_musicfestivals_messageDelete(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'message_id'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Mail'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.messageDelete');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the current settings for the mail\n //\n $strsql = \"SELECT id, uuid, status, files \"\n . \"FROM ciniki_musicfestival_messages \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $args['message_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.musicfestivals', 'message');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['message']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.536', 'msg'=>'Mail does not exist.'));\n }\n $message = $rc['message'];\n\n if( $message['files'] != '' ) {\n $files = unserialize($message['files']);\n } else {\n $files = array();\n }\n\n //\n // Only allow deletes if message is unsent\n //\n if( $message['status'] > 30 ) {\n return array('stat'=>'warn', 'err'=>array('code'=>'ciniki.musicfestivals.484', 'msg'=>'Mail has already been sent.'));\n }\n\n //\n // Load the message refs\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_musicfestival_messagerefs \"\n . \"WHERE message_id = '\" . ciniki_core_dbQuote($ciniki, $args['message_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.musicfestivals', 'ref');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.491', 'msg'=>'Unable to load ref', 'err'=>$rc['err']));\n }\n $refs = isset($rc['rows']) ? $rc['rows'] : array();\n\n //\n // Check for any dependencies before deleting\n //\n\n //\n // Check if any modules are currently using this object\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectCheckUsed');\n $rc = ciniki_core_objectCheckUsed($ciniki, $args['tnid'], 'ciniki.musicfestivals.message', $args['message_id']);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.485', 'msg'=>'Unable to check if the mail is still being used.', 'err'=>$rc['err']));\n }\n if( $rc['used'] != 'no' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.486', 'msg'=>'The mail is still in use. ' . $rc['msg']));\n }\n\n //\n // Get the tenant storage directory\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'hooks', 'storageDir');\n $rc = ciniki_tenants_hooks_storageDir($ciniki, $args['tnid'], array());\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $tenant_storage_dir = $rc['storage_dir'];\n\n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDelete');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectDelete');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.musicfestivals');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Remove the objects\n //\n foreach($refs AS $ref) {\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.musicfestivals.messageref',\n $ref['id'], $ref['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.musicfestivals');\n return $rc;\n }\n }\n\n //\n // Remove the files\n //\n foreach($files as $fid => $file) {\n //\n // Remove file\n //\n $storage_filename = $tenant_storage_dir . '/ciniki.musicfestivals/messages/' \n . $message['uuid'][0] . '/' . $message['uuid'] . '_' . $file['filename'];\n if( is_file($storage_filename) ) {\n unlink($storage_filename);\n }\n unset($files[$fid]);\n }\n\n //\n // Remove the message\n //\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.musicfestivals.message',\n $args['message_id'], $message['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.musicfestivals');\n return $rc;\n }\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.musicfestivals');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'musicfestivals');\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "bbf823107898e1e1133c7b52a0b15e6f", "score": "0.56396705", "text": "public function deleteMessenger(Request $request)\n {\n if (Validator::make($request->all(), [\n 'name' => [\n 'required',\n Rule::in(['vk', 'inst', 'wapp', 'tlgrm']),\n ],\n ])->fails()) {\n return response()->json([\n 'success' => false,\n 'message' => 'all.error.hack',\n ]);\n };\n\n $messenger = $request->user()->{$request->name}();\n $messenger->dialogs()->get()->each(function(Dialog $dialog)\n {\n $dialog->authors()->each(function(Author $author) {\n if (count($author->dialogs()) === 1) {\n $author->delete();\n }\n });\n\n $dialog->delete();\n });\n\n $messenger->delete();\n\n return response()->json([\n 'success' => true,\n ]);\n }", "title": "" }, { "docid": "102fbed60402c92491019f3dc7346839", "score": "0.5639629", "text": "public function delete_contact_message_post()\n\t{\n\t\t$id = $this->input->post('id', true);\n\n\t\tif ($this->contact_model->delete_contact_message($id)) {\n\t\t\t$this->session->set_flashdata('success', trans(\"msg_message_deleted\"));\n\t\t} else {\n\t\t\t$this->session->set_flashdata('error', trans(\"msg_error\"));\n\t\t}\n\t}", "title": "" }, { "docid": "bf354810b0aa8566431b38a7a2c37bcf", "score": "0.56344396", "text": "public function deleteMessage(Request $request)\n {\n // $user = Auth::user();\n //\n\n return ['status' => '200 OK'];\n }", "title": "" }, { "docid": "b4579d03d213ba6a1f6790fe679d4173", "score": "0.5624002", "text": "public function delete( $message_id, $type_of_delete ) {\n\t\t\n\t\tif( $type_of_delete ) {\n\t\t\t$type_of_status = \"recipient_status\"; \n\t\t}else {\n\t\t\t$type_of_status = \"sender_status\";\n\t\t}\n\t\t\n\t\t$this->db->set($type_of_status, \"DELETED\" );\n\t\t\n\t\t$this->db->where('id', $message_id);\n\t\t\n\t\t$this->db->update('message');\n\t\t\n\t\tif($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "1efd50ee5af5d377bfd4b9b41ce17e66", "score": "0.56168056", "text": "public function deleteHandler();", "title": "" }, { "docid": "0b866a08f825c59b072c2112348d23fa", "score": "0.5613734", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::BtDeleting('Advertencia!!','¿Esta seguro de Eliminar este Registro?','/moto/'. $id . '/delete/');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "0d4bb6ba15009d0756cd859c5c76ccfb", "score": "0.55838406", "text": "public function deleteMessage(MessageInquire $inboxes){\n \n $inboxes->delete();\n \n return back();\n }", "title": "" }, { "docid": "6ac9624c8f7ecda1da9d855b1f74e18a", "score": "0.55805075", "text": "public function deleteAction()\n {\n $objrecordfun = new Extra_Ecs();\n $objReceiveonnet = new record_modReceiveonnet();\n $objconfig = new Extra_Init();\n $sNetReceiveRecordIDList = $this->_request->getParam('hdn_object_id_list', '');\n $sRetError = $objReceiveonnet->eCSNetReceiveRecordDelete($sNetReceiveRecordIDList);\n //Luu cac dieu kien tim kiem len session\n /*if(!isset($_SESSION['seArrParameter'])){\n $sfullTextSearch \t= trim($this->_request->getParam('txtfullTextSearch',''));\n $sRecordTypeId \t\t= $this->_request->getParam('recordType');\n $iPage\t\t\t\t= $this->_request->getParam('hdn_current_page',0);\n $iNumberRecordPerPage = $this->_request->getParam('cbo_nuber_record_page',0);\n if ($iPage <= 1){\n $iPage = 1;\n }\n if ($iNumberRecordPerPage == 0)\n $iNumberRecordPerPage = 15;\n $arrParaSet = array(\"iPage\"=>$iPage, \"iNumberRecordPerPage\"=>$iNumberRecordPerPage,\"sfullTextSearch\"=>$sfullTextSearch,\"sRecordTypeId\"=>$sRecordTypeId);\n $_SESSION['seArrParameter'] = $arrParaSet;\n }*/\n if ($sRetError != null || $sRetError != '') {\n echo \"<script type='text/javascript'> alert('Xo�?a hồ sơ thành công')</script>\";\n } else\n $this->_helper->redirector->gotoUrl('/record/receiveonnet/index/');\n }", "title": "" }, { "docid": "8d6a0a0ca9195a2b1c3c74063d14e6a4", "score": "0.5577911", "text": "function delete_messages($ids, $owner_id, $extra=\"\")\n \t{\n\t\t//-----------------------------------------\n \t\t// Basic WHERE\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( ! $extra )\n \t\t{\n \t\t\t$extra = \"mt_owner_id=$owner_id\";\n \t\t}\n \t\t\n \t\t$id_string = \"\";\n \t\t\n \t\tif ( is_array( $ids ) )\n \t\t{\n \t\t\tif ( ! count($ids) )\n \t\t\t{\n \t\t\t\treturn;\n \t\t\t}\n \t\t\t\n \t\t\t$id_string = 'IN ('.implode( \",\", $ids ).')';\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif ( ! $ids )\n \t\t\t{\n \t\t\t\treturn;\n \t\t\t}\n \t\t\t\n \t\t\t$id_string = '='.$ids;\n \t\t}\n \t\t\n \t\t//-----------------------------------------\n \t\t// Are these our messages?\n \t\t//-----------------------------------------\n \t\t\n \t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_msg_id, mt_read, mt_owner_id', 'from' => 'message_topics', 'where' => \"$extra AND mt_id $id_string\" ) );\n \t\t$this->ipsclass->DB->simple_exec();\n \t\t\n \t\t$final_ids = array();\n \t\t$final_mts = array();\n \t\t$unread\t = array();\n \t\t\n \t\twhile ( $i = $this->ipsclass->DB->fetch_row() )\n \t\t{\n \t\t\t$final_ids[ $i['mt_id'] ] = $i['mt_msg_id'];\n \t\t\t$final_mts[ $i['mt_id'] ] = $i['mt_id'];\n \t\t\t\n \t\t\tif( $i['mt_read'] == 0 AND $i['mt_owner_id'] > 0 )\n \t\t\t{\n\t \t\t\t$unread[ $i['mt_owner_id'] ] = intval($unread[ $i['mt_owner_id'] ]) + 1;\n \t\t\t}\n \t\t}\n\n \t\t//-----------------------------------------\n \t\t// Delete MT topics\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( count($final_mts) )\n \t\t{\n \t\t\t$this->ipsclass->DB->simple_construct( array( 'delete' => 'message_topics', 'where' => \"mt_id IN (\".implode( ',',$final_mts ).\")\" ) );\n \t\t\t$this->ipsclass->DB->simple_exec();\n \t\t}\n \t\t\n \t\t//-----------------------------------------\n \t\t// Update delete count\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( count($final_ids) )\n \t\t{\n \t\t\t$this->ipsclass->DB->simple_construct( array( 'update' => 'message_text', 'set' => \"msg_deleted_count=msg_deleted_count+1\", 'where' => \"msg_id IN (\".implode( ',',$final_ids ).\")\" ) );\n \t\t\t$this->ipsclass->DB->simple_exec();\n \t\t}\n \t\t\n \t\t//-----------------------------------------\n \t\t// Update new PM notifications\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( count($unread) )\n \t\t{\n\t \t\t$members = array();\n\t \t\t\n\t \t\t$this->ipsclass->DB->build_query( array( 'select' => 'new_msg,id', 'from' => 'members', 'where' => \"id IN(\" . implode( ',', array_keys($unread) ) .\")\" ) );\n\t \t\t$this->ipsclass->DB->exec_query();\n\t \t\t\n\t \t\twhile( $mem_pm_cnts = $this->ipsclass->DB->fetch_row() )\n\t \t\t{\n\t\t \t\t$members[ $mem_pm_cnts['id'] ] = $mem_pm_cnts['new_msg'];\n\t \t\t}\n\t \t\t\n\t \t\tforeach( $unread as $mid => $cnt )\n\t \t\t{\n\t\t \t\t$cur = $members[ $mid ];\n\t\t \t\t\n\t\t \t\tif( $cur < $cnt )\n\t\t \t\t{\n\t\t\t \t\t$cnt = $cur;\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\t$cnt = intval($cnt);\n\n\t \t\t\t$this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => \"new_msg=new_msg-{$cnt}, show_popup=0\", 'where' => \"id={$mid}\" ) );\n\t \t\t\t$this->ipsclass->DB->simple_exec();\n \t\t\t}\n \t\t\t\n \t\t\tunset($members);\n \t\t}\n \t\t\n \t\t//-----------------------------------------\n \t\t// Run through and delete dead msgs\n \t\t//-----------------------------------------\n \t\t\n \t\t$deleted_ids = array();\n \t\t$attach_ids = array();\n \t\t\n \t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'msg_id', 'from' => 'message_text', 'where' => 'msg_deleted_count >= msg_sent_to_count' ) );\n \t\t$this->ipsclass->DB->simple_exec();\n \t\t\n \t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n \t\t{\n \t\t\t$deleted_ids[] = $r['msg_id'];\n \t\t}\n \t\t\n \t\tif ( count($deleted_ids) )\n \t\t{\n \t\t\t$this->ipsclass->DB->simple_construct( array( 'delete' => 'message_text', 'where' => \"msg_id IN (\".implode( ',',$deleted_ids ).\")\") );\n \t\t\t$this->ipsclass->DB->simple_exec();\n \t\t\t\n \t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'attachments',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"attach_rel_module='msg' AND attach_rel_id IN (\".implode( ',',$deleted_ids ).\")\") );\n \t\t\t$this->ipsclass->DB->simple_exec();\n \t\t\n \t\t\twhile ( $a = $this->ipsclass->DB->fetch_row() )\n \t\t\t{\n \t\t\t\t$attach_ids[] = $a['attach_id'];\n \t\t\t\t\n \t\t\t\tif ( $a['attach_location'] )\n\t\t\t\t{\n\t\t\t\t\t@unlink( $this->ipsclass->vars['upload_dir'].\"/\".$a['attach_location'] );\n\t\t\t\t}\n\t\t\t\tif ( $a['attach_thumb_location'] )\n\t\t\t\t{\n\t\t\t\t\t@unlink( $this->ipsclass->vars['upload_dir'].\"/\".$a['attach_thumb_location'] );\n\t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif ( count($attach_ids) )\n \t\t\t{\n \t\t\t\t$this->ipsclass->DB->simple_construct( array( 'delete' => 'attachments', 'where' => \"attach_id IN (\".implode( ',',$attach_ids ).\")\") );\n \t\t\t\t$this->ipsclass->DB->simple_exec();\n \t\t\t}\n \t\t}\n \t}", "title": "" }, { "docid": "027ba8d652af9d3283690be02febb8b5", "score": "0.55764145", "text": "public static function deletePrivateMessage(): void\n {\n //Vérifier si l'utilisateur est connecté, sinon envoyer un message d'erreur.\n if (!$user = User::getUserSession()) {\n $obj = new stdClass();\n $obj->value = false;\n Router::json(json_encode($obj));\n }\n $message = new Message();\n $message->idUser = $user->idUser;\n $message->deletePrivateMsg();\n }", "title": "" }, { "docid": "7f6c11580014be2b741341a48b2c9565", "score": "0.5575691", "text": "function deleteMessageFunction($message_id, $message_thread_code) {\n\t$this->db->where('message_id', $message_id);\n \t$this->db->delete('message');\n \t\t\tredirect(base_url() . 'teacher/message/message_read/'.$message_thread_code , 'refresh');\n\t\n\t}", "title": "" }, { "docid": "34e376f90ca1641bb5f1d08d6333e11a", "score": "0.5568732", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::BtDeleting('Attention!!','êtes vous sûr de vouloir supprimer cet element?','/personnel/'. $id . '/delete');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "754a5dd68c3829310f56c9d8c572fe7e", "score": "0.5562887", "text": "function drop_message($request)\n {\n $validacion=\"is not authorized\";\n if ( isset($request->user) ) {\n $validacion = validarUsuario($request->user);\n if ($validacion<>1) {\n return new SoapFault('SOAP-ENV:Client', $validacion, 'Authentication module');\n }\n } else {\n return new SoapFault('SOAP-ENV:Client', $validacion, 'Authentication module');\n }\n $return = array();\n //var_dump($messages); exit();\n if ( !isset($request->messages->message) ) {\n return new SoapFault('SOAP-ENV:Client', $validacion, 'Authentication module');\n }\n $message = $request->messages->message;\n if ( is_object($message) ) {\n $message = array($message);\n }\n if ( is_array($message) ) {\n\n for ($i=0; $i < count($message); $i++) {\n $messageId = $message[$i]->message_id;\n //borrar los mensajes que se envian\n try {\n $respuesta = Mensaje::drop($messageId);\n } catch (Exception $e) {\n $respuesta = array(\n 'code'=>\"ERROR\",\n 'desc'=>\"\"//$e->getMessage()\n );\n }\n $data = array(\n 'message_id' => $messageId,\n 'result' => $respuesta\n );\n array_push($return, $data);\n }\n return $return;\n }\n }", "title": "" }, { "docid": "f1aa3d987e650adfcc60936ab13e273c", "score": "0.55530953", "text": "public function DeleteMsg($id,Request $request){\n $msg = Ajaxis::BtDeleting('Warning!!','Would you like to remove This?','/Seller/'. $id . '/delete');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "60d8b27f6e812d17adbdfc62888b2ae8", "score": "0.5551719", "text": "protected function getDeletionMessage() {\n $entity = $this->getEntity();\n return $this->t('The @entity-type %label has been deleted.', [\n '@entity-type' => $entity->getEntityType()->getSingularLabel(),\n '%label' => $entity->label() ?? $entity->id(),\n ]);\n }", "title": "" }, { "docid": "e6d5c7747e0c7f3ade8aa5edf6bca4a1", "score": "0.5549095", "text": "function delete_messages($id){\n $status = $this->db->delete('messages',array('id'=>$id));\n\t\t$db_error = $this->db->error();\n\t\tif (!empty($db_error['code'])){\n\t\t\techo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n\t\t\texit;\n\t\t}\n\t\treturn $status;\n }", "title": "" }, { "docid": "12bf2ccf72ba78916740eb85a0dd793d", "score": "0.55435914", "text": "function delete_contact_messages($id)\n {\n $message = ContactMessage::find($id);\n\n // delete data\n $message->delete();\n\n // return back\n return back()->with(\"message\", \"message deleted\");\n }", "title": "" }, { "docid": "0bc6c9aa53025a1a1546fdeb73270dbb", "score": "0.55351496", "text": "function delete() {\n\t\t\treturn $this->API->deleteDirectMessage($this->ID);\n\t\t}", "title": "" }, { "docid": "b2082901c0cae704b9ce528611ea2e04", "score": "0.5531435", "text": "public function deleteMsgAdmin($data){\n\t\t\n\t\t$this->db->update_batch('xref_notificaciones_condominio', $data, 'id'); \n\t\t\n\t}", "title": "" }, { "docid": "8b24e285d4c33b180b30c597c21c3696", "score": "0.5530192", "text": "function message_remove($message)\n\t{\n $message = escape_check($message);\n\n\tsql_query(\"DELETE FROM user_message WHERE message='{$message}'\");\n\tsql_query(\"DELETE FROM message WHERE ref='{$message}'\");\t\n\t}", "title": "" }, { "docid": "ac12f42e985a18711dc4379ca95570b1", "score": "0.55164635", "text": "public function clearAllMessages(Request $request)\n {\n // validate the info, create rules for the request\n $rules = array(\n 'user_id' => 'required',\n 'partner_id' => 'required'\n );\n\n // run the validation rules on the request data\n $validator = Validator::make($request->all(), $rules);\n\n // if the validator fails, response to client\n if ($validator->fails()) {\n // return response()->json([\"message\" => \"Invalid params: \".$validator->errors()->first()], 221);\n return response()->json([\"message\" => \"出事了,请重试。\"], 221);\n }\n\n //checking user existed\n $user = User::find($request->input('user_id'));\n if (!$user) \n {\n // return response()->json([\"message\" => \"User does not exist!\"], 222);\n return response()->json([\"message\" => \"出事了,请重试。\"], 222);\n }\n\n //checking partner existed\n $partner = User::find($request->input('partner_id'));\n if (!$partner) \n {\n // return response()->json([\"message\" => \"Partner does not exist!\"], 222);\n return response()->json([\"message\" => \"出事了,请重试。\"], 222);\n }\n\n //checking conversation \n $conversation = Conversation::where([\n ['user1_id','=',$user->id],\n ['user2_id','=',$partner->id],\n ])\n ->orWhere([\n ['user1_id','=',$partner->id],\n ['user2_id','=',$user->id],\n ])->first();\n if (!$conversation) \n {\n //if there is no message send before\n // return response()->json(array(\"message\" => \"Conversation does not exist!\"), 200);\n return response()->json(array(\"message\" => \"出事了,请重试。\"), 200);\n }\n\n //searching messages in conversation\n if(count($conversation->messages) > 0){\n foreach ($conversation->messages as $message) {\n if($message->deleter_id == 0){ //if on one had deleted the message\n $message->update(array('deleter_id'=> $user->id));\n }\n //if the partner had deleted the message, deleted it\n elseif ($message->deleter_id != $user->id) {\n $message->delete();\n }\n }\n }\n\n // return response()->json([\"message\" => \"Clear successful!\"], 200);\n return response()->json([\"message\" => \"成功了。\"], 200);\n }", "title": "" }, { "docid": "03f442c5dbb23ecd52fe07e75c23496c", "score": "0.5510753", "text": "public function bdd_effacer_vieux_messages($time_limit){\r\n\t\t if( $this->bdd == 'bdd'){\r\n\t\t $this->deleteSQLiteOldMessages($time_limit);\r\n }else{\r\n\t\t $this->deleteTXTOldMessages($time_limit);\r\n }\r\n }", "title": "" }, { "docid": "6cb5ba80c9fd63046131d999c0d5478f", "score": "0.5509136", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::BtDeleting('Attention!!','êtes vous sûr de vouloir supprimer cet element?','/thematique/'. $id . '/delete');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "f186e3bf3113f3d8202990a4395f01a5", "score": "0.55004555", "text": "function membership_message_members_deleted() {\n\tmembership_admin_message( '', __( 'Selected members deleted.', 'members' ) );\n}", "title": "" }, { "docid": "ece3bfcbaa9cf7879923241a22aeca66", "score": "0.54994327", "text": "function message_delete_by_id($item_id)\n\t{\n\t\t$delete = $this->message_model->delete_message($id,$user_id);\n\t\tif($delete)\n\t\t{\n\t\t\t$response = array(\n\t\t\t\t'state' => TRUE,\n\t\t\t\t'message' => 'Meddelandet är nu borttaget!'\n\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = array(\n\t\t\t\t'state' => FALSE,\n\t\t\t\t'message' => 'Något blev fel, försök igen!'\n\t\t\t\t);\n\t\t\t\n\t\t}\n\t\techo create_json($response);\n\t\texit;\n\t}", "title": "" }, { "docid": "a6cea3a387ae8c9a49488baf3621304b", "score": "0.54923534", "text": "public function DeleteMsg($id, Request $request)\n {\n $msg = Ajaxis::BtDeleting('Warning!!','Would you like to remove This?','/link/'. $id . '/delete');\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "e399523819b9913dddd19b3d9ad686da", "score": "0.5481919", "text": "function delete()\n {\n $error = false;\n $this->messagetype = '';\n $this->message = '';\n $redirect = JRequest::getVar( 'return' ) ? \n base64_decode( JRequest::getVar( 'return' ) ) : 'index.php?option=com_phplist&view='.$this->get('suffix');\n $redirect = JRoute::_( $redirect, false );\n\n $cids = JRequest::getVar('cid', array (0), 'request', 'array');\n foreach (@$cids as $cid)\n {\n \t$getdetails = explode( ',', trim($cid) );\n \t$details = new JObject();\n\t\t\t$details->userid = $getdetails[0];\n\t\t\t$details->listid = $getdetails[1];\n \t$action = PhplistHelperSubscription::removeUserFrom( $details );\n if (!$action)\n {\n $this->message .= $cid.',';\n $this->messagetype = 'notice';\n $error = true;\n }\n }\n\n if ($error)\n {\n $this->message = JText::_('UNSUBSCRIBE_FAILED') . \" - \" . $this->message;\n }\n else\n {\n $this->message = JText::_('SELECTED_ITEMS_SUCCESSFULLY_UNSUBSCRIBED');\n }\n\n $this->setRedirect( $redirect, $this->message, $this->messagetype );\n }", "title": "" }, { "docid": "0d56c4a9d92a7db05f298312debedebe", "score": "0.5478538", "text": "function delTicket(){\n\t\t/**\n\t $result = $this->client->deleteMessage([\n\t\t\t'QueueUrl' => $queueUrl, // REQUIRED\n\t\t\t'ReceiptHandle' => $result->get('Messages')[0]['ReceiptHandle'] // REQUIRED\n\t\t]); /**/\n\t}", "title": "" }, { "docid": "2b53593f90c8bc18ab7b187653fe16c3", "score": "0.54776686", "text": "public function delete()\r\n {\r\n // autorender off for view\r\n $this->autoRender = false;\r\n $messageId = $this->request->data['Message']['id'];\r\n //if message id exixt\r\n if (!empty($messageId)) {\r\n //--------- Post/Ajax request -----------\r\n if ($this->request->isPost() || $this->RequestHandler->isAjax()) {\r\n //delete message\r\n $success = $this->Message->delete($messageId, false);\r\n if ($success) {\r\n //return json success message\r\n $response = array('bug' => 0, 'msg' => 'success', 'vId' => $messageId);\r\n return json_encode($response);\r\n } else {\r\n //return json failure message\r\n $response = array('bug' => 1, 'msg' => 'failure');\r\n return json_encode($response);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "316fa1c12c8953a60202724b67cbc70e", "score": "0.54747057", "text": "function delete() {\n\t\t$query = '\n\t\t\tDELETE FROM '.system::getConfig()->getDatabase('comms').'.outboundMessagesEmbargo\n\t\t\tWHERE\n\t\t\t\trecipient = :Recipient\n\t\t\tLIMIT 1';\n\n\t\ttry {\n\t\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t\t$oStmt->bindValue(':Recipient', $this->_Recipient);\n\n\t\t\tif ( $oStmt->execute() ) {\n\t\t\t\t$oStmt->closeCursor();\n\t\t\t\t$this->reset();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tsystemLog::error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "147afd7586cd9be8c14b7094aaeb1758", "score": "0.5474059", "text": "public function getTodosErrosMensagens($separador = \" - \"){//<FAZER> melhorar retorno dessa mensagem e verificar padrao com o front\n\t\t\t$msgTodosErros = \"\";\n\t\t\tif($this->listaComMsgsErro == null)\n\t\t\t\treturn $msgTodosErros;\n\t\t\tforeach($this->listaComMsgsErro as $msgErro)\n\t\t\t\tprint_r($msgErro);\n\t\t\t\tif(isset($msgTodosErros)){\n\t\t\t\t\t$msgTodosErros .= $separador.$msgErro;}\n\t\t\t\telse\n\t\t\t\t\t$msgTodosErros .= $msgErro;\n\t\t\treturn $msgTodosErros;\n\t\t}", "title": "" }, { "docid": "c24b79bac818fc9aa18878551645b6a4", "score": "0.54724324", "text": "public function DeleteMsg($id)\n {\n $msg = Ajaxis::BtDeleting('Eliminar','¿Seguro que desea eliminar este anuncio?','/anuncio/'. $id . '/delete/');\n\n if(Request::ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "da7b8f04aa5c4a8d3b0e34a88784ef7f", "score": "0.54677826", "text": "public function massDeleteAction() {\n $messageIds = $this->getRequest()->getParam('simiconnector');\n\n if (!is_array($messageIds)) {\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));\n } else {\n try {\n foreach ($messageIds as $messageId) {\n $notice = Mage::getModel('simiconnector/siminotification')->load($messageId);\n $notice->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($bannerIds)));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "title": "" }, { "docid": "5d4be4b6b611e0a606d7b79dfb95f7d4", "score": "0.54650754", "text": "Function ResetDeletedMessages() {\n if ($this->state != \"TRANSACTION\")\n return($this->SetError(\"connection is not in TRANSACTION state\"));\n if ($this->PutLine(\"RSET\") == 0)\n return($this->SetError(\"Could not send the RSET command\"));\n $response = $this->GetLine();\n if (GetType($response) != \"string\")\n return($this->SetError(\"Could not get reset deleted messages command response\"));\n if ($this->Tokenize($response, \" \") != \"+OK\")\n return($this->SetError(\"Could not reset deleted messages: \" . $this->Tokenize(\"\\r\\n\")));\n $this->must_update = 0;\n return(\"\");\n }", "title": "" }, { "docid": "9a817535237639f3fedb3425781e623d", "score": "0.546488", "text": "public function DeleteMsg($id, Request $request) {\n\t\t$msg = Ajaxis::BtDeleting('Warning!!', 'Would you like to remove This?', '/portal/user/' . $id . '/delete');\n\n\t\tif ($request->ajax()) {\n\t\t\treturn $msg;\n\t\t}\n\t}", "title": "" }, { "docid": "910d10fd55ab0d29b383f33eeb300981", "score": "0.54646325", "text": "function Admin_Messages_delete()\n{\n // Get datbase setup - note that both pnDBGetConn() and pnDBGetTables()\n // return arrays but we handle them differently. For pnDBGetConn()\n // we currently just want the first item, which is the official\n // database handle. For pnDBGetTables() we want to keep the entire\n // tables array together for easy reference later on\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n\n // Create a new data dictionary object\n $dict = NewDataDictionary($dbconn);\n\n // Drop the table - for such a simple command the advantages of separating\n // out the SQL statement from the Execute() command are minimal, but as\n // this has been done elsewhere it makes sense to stick to a single method\n // create the data dictionaries SQL array\n\n\t// This array contains all the ncessary information to execute some sql \n\t// on any of the supported dbms platforms\n $sqlarray = $dict->DropTableSQL($pntable['message']);\n\n // Execute the sql that has been created\n $result = $dict->ExecuteSQLArray($sqlarray);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n if ($result != 2) {\n pnSessionSetVar('errormsg', _DELETETABLEFAILED);\n return false;\n }\n\n\t// Delete module variable\n\tpnModDelVar('Admin_Messages', 'itemsperpage');\n\n // Deletion successful\n return true;\n}", "title": "" }, { "docid": "46e81e41d4eb8faab06482f38bbe2489", "score": "0.5462646", "text": "public function sup_message() {\n $this->load->model('M_Message');\n\n //recuperation via la methode post\n\t\t$id_Message = $this->input->post('id_Message');\n\n\t\t\t\tforeach ($id_Message as $id_Message) \n //test si le parametre est vide\n if ($id_Message != \"\") {\n $this->M_Message->delete_message($id_Message);\n } \n \n //retour sur la page principale\n $base_url = base_url();\n header(\"location: \".$base_url.\"C_Tableau_de_bord\");\n\n }", "title": "" }, { "docid": "457a13405ffd26e6106289fa6fdb31dc", "score": "0.54625875", "text": "private function unsubscribeMessageHandler($text, $event) {\n\n try {\n $messageGroup = $this->detectMessageGroup(substr($text, 17, -9));\n } catch (Exception $e) {\n $message = new TextMessage('There is no group by the name ' . strtolower(substr($text, 17, -9)));\n return [$message];\n }\n\n try {\n list($id, $chatType) = $this->detectChatType($event);\n } catch (Exception $e) {\n $message = new TextMessage('Internal Error: Invalid Chat Type');\n return [$message];\n }\n\n // Remove recipient. Returns true on success, false or error string on failure.\n $status = $this->removeRecipient($id, $chatType, $messageGroup);\n\n if($status === true) {\n $message = new TextMessage(($chatType === 'user' ? 'You are ' : 'This ' . $chatType . ' is ') . 'no longer receiving messages from the \"' . $messageGroup . '\" group.');\n } else {\n echo $status;\n $message = new TextMessage(($status ?: 'An unknown error occurred.'));\n }\n return [$message];\n\n }", "title": "" }, { "docid": "3a6f9a684688203ac5b8dffbfd36f3df", "score": "0.54429454", "text": "function delete() {\n try {\n DB::beginWork('Deleting notification @ ' . __CLASS__);\n\n DB::execute('DELETE FROM ' . TABLE_PREFIX . 'notification_recipients WHERE notification_id = ?', $this->getId());\n parent::delete();\n\n DB::commit('Notification deleted @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to delete notification @ ' . __CLASS__);\n throw $e;\n } // try\n\n return true;\n }", "title": "" }, { "docid": "8551726f2e40482d56847f2e9d231529", "score": "0.5442849", "text": "public function deleteAction()\n\t{\n\t\t$returnData = array(\n\t\t\t\"success\"\t=> true,\n\t\t\t\"data\"\t=> \"留言成功,正在审核并等待回复,谢谢\"\n\t\t\t);\n\t\t//idtodelete\n\t\t$id = $this->getInput(\"idtodelete\");\n\t\tif($id <= 0)\n\t\t{\n\t\t\t$returnData['success'] = false;\n\t\t\t$returnData['data'] = \"不正确的删除\";\n\t\t\tprint_r(json_encode($returnData));\n\t\t\tdie;\n\t\t}\n\n\t\t//do delete\n\t\t$this->_getMessageBoardDS()->updateAsDeleted($id,$this->loginUser->uid);\n\n\t\t$returnData = array(\n\t\t\t\"success\"\t=> true,\n\t\t\t\"data\"\t=> \"删除成功, 页面将刷新\"\n\t\t\t);\n\n\t\tprint_r(json_encode($returnData));\n\t\tdie;\n\t}", "title": "" }, { "docid": "5df81f6c989560a511e44e20c225ae29", "score": "0.54412687", "text": "public function actionRemoveNotification(){\n $this->requirePostRequest();\n $this->requireAjaxRequest();\n\n $response = [\n 'success' => false,\n 'message' => 'could not find entry'\n ];\n if($entryId = craft()->request->getParam('id')){\n $userId = craft()->userSession->getUser()->id;\n\n $record = UsernotificationsRecord::model()->find('entryId = :entryId AND userId = :userId', array(\n 'entryId' => $entryId,\n 'userId' => $userId\n ));\n if($record){\n // user already removed the message... there must be something wrong or he/ she cheated :P\n // you can actually ignore this... just wanted to show you how to search for entries^^\n }else{\n $record = new UsernotificationsRecord();\n }\n\n $record->userId = $userId;\n $record->entryId = $entryId;\n\n if($record->save()){\n $response['success'] = true;\n $response['message'] = 'notification removed for user';\n }else{\n $response['message'] = 'could not save record';\n $response['errors'] = $record->getErrors();\n }\n }\n\n $this->returnJson($response);\n }", "title": "" }, { "docid": "0a1cd6fb5c09fa1453328efa9b089242", "score": "0.5435796", "text": "public function DeleteMsg($id)\n {\n $msg = Ajaxis::MtDeleting('Warning!!','Would you like to remove This?','/proveedore/'. $id . '/delete/');\n\n if(Request::ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "d080e3a6625e6d13a134b0e00a22ff38", "score": "0.54285514", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::MtDeleting('Warning!!','Would you like to remove This?','/website_domain/'. $id . '/delete');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "f0418fbb5227170d8418ed1321cf3cab", "score": "0.5423402", "text": "public function plugin_delete_msg_category() {\n\t\tglobal $wpdb;\n\t\t$category_id = $_REQUEST['category_id'];\n\t\t$tbl_msg_cats = $wpdb->prefix . 'msg_category';\n\t\t$sql = \"DELETE FROM {$tbl_msg_cats} WHERE id={$category_id}\";\n\t\t$wpdb->query($sql);\n\t\texit;\n\t}", "title": "" }, { "docid": "10590102d94a018065fba343b79e887c", "score": "0.54216874", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::MtDeleting('Warning!!','Would you like to remove This?','/egreso/'. $id . '/delete');\n\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "dd65eadd4d9de78b5ff22d85e1308ad7", "score": "0.5420322", "text": "public function deleted(DirectMessage $directMessage)\n {\n }", "title": "" }, { "docid": "ddbdf1450c7aea1eaf237e694e0593fd", "score": "0.54197836", "text": "public function destroy($id)\n {\n //Eliminar\n//$message=DB::table('messages')->where('id',$id)->delete();\n\n$message = $this->messages->destroy($id);\n//Redireccionar\nreturn redirect()->route('mensajes.index');\n\n\n }", "title": "" }, { "docid": "7febc01048760db9c602dccd229a62a5", "score": "0.54130197", "text": "public function getMessages($type=null, $remove=null){ }", "title": "" }, { "docid": "8f53169c9d1adba3a8b79adb9760e7d3", "score": "0.54088336", "text": "public function fnDeleteReceivedt(Request $req)\n {\n $receivedetailid = $req->receivedetailid;\n DB::table('receivedetail')->where('receivedetailid', $receivedetailid)->delete();\n $data = \"ການ​ລົບ​ສຳ​ເລັດ\";\n echo json_encode($data);\n }", "title": "" }, { "docid": "0daf3deaaf0c253c84780e5ba8e162c9", "score": "0.5406468", "text": "function message_user_remove($usermessage)\n {\n global $userref;\n\n $userref = escape_check($userref);\n $usermessage = escape_check($usermessage);\n\n sql_query(\"DELETE FROM user_message WHERE user = {$userref} AND ref = '{$usermessage}'\");\n }", "title": "" }, { "docid": "9fc3430c5c6574e580175e638fa09bcb", "score": "0.54054046", "text": "public function delallMessage($id,$data){\n \n $this->db->where('to', $id);\n $this->db->or_where('from', $id);\n //$this->db->where('from', $id);\n $this->db->update('messages', $data,array(\"from\"=>$id));\n //print_r($data); \n //die(); \n return 1; \n }", "title": "" }, { "docid": "17c43d2c61ae55b15c44cdba124c3696", "score": "0.5402246", "text": "protected function onDeleting(){\n \n }", "title": "" }, { "docid": "19e26d94014582628bf5a3d7a6c04451", "score": "0.5381394", "text": "public function DeleteMsg($id,Request $request)\n {\n $msg = Ajaxis::BtDeleting('Warning!!','Would you like to remove This?','/stat/'. $id . '/delete');\n if($request->ajax())\n {\n return $msg;\n }\n }", "title": "" }, { "docid": "8492e0ef3ee5696e193d85906451b5cb", "score": "0.53651863", "text": "function runEliminar(){\n $sql = 'DELETE FROM '.$this->Table .' WHERE '.$this->PrimaryKey.' = '.$this->_datos;\n $this->QuerySql($sql);\n //$_respuesta = array('Codigo' => 1, \"Mensaje\" => 'Se ha eliminado el item con &eacute;xito');\n echo 'Se ha eliminado el item con &eacute;xito';\n }", "title": "" }, { "docid": "c036952055852395cc9c52af8bbcce9b", "score": "0.5363442", "text": "public static function ctrEliminarcontactos()\n\t{\n\n\t\tif (isset($_POST[\"eliminarContacto\"])) {\n\n\t\t\t$tabla = \"no_registrados\";\n\t\t\t$valor = $_POST[\"id\"];\n\n\t\t\t$respuesta = ModeloFormularios::mdlEliminarRegistro($tabla, $valor);\n\n\t\t\treturn $respuesta;\n\t\t}\n\t\t/**\n\t\t * //* USABILIDAD ENTRE PUBLIC STATIC Y SOLO PUBLIC\n\t\t * Hay una gran diferencia entre usar solo public y usar public static, con solo public no me dejaba acceder a \n\t\t * la classe tranquilidamente no se todavia si no se puedo o si es por un error de sintaxis.\n\t\t * Pero con public static puedo colocar tranquilamente otro codigo como condicional \n\t\t * \n\t\t **/\n\t}", "title": "" }, { "docid": "ad8072caad60bf8d04a2f70b74c66c46", "score": "0.5358337", "text": "public function DeleteMessage($index)\n\t{\n\t\t// Do nothing !\n\t}", "title": "" }, { "docid": "3d7485589f22e6e3cb35a88975567972", "score": "0.5353023", "text": "public function _event_after_delete();", "title": "" } ]
c45fa4d338b5a408397f14fbfe8eefcb
Shortcut function to check the overwrite type
[ { "docid": "807fffd32412ad8cb92b6dc762790de8", "score": "0.0", "text": "public function isRole(): bool\n {\n return $this->getType() === static::TYPE_ROLE;\n }", "title": "" } ]
[ { "docid": "9a4ef7f434026b54649cdeb91e64e129", "score": "0.6852741", "text": "public function isOverwriteAllowed(): bool\n {\n return true;\n }", "title": "" }, { "docid": "9c7f55cb7b5c8667e04d4b4006c45310", "score": "0.6471327", "text": "public function isOverwrite()\n\t{\n\t\treturn $this->overwrite;\n\t}", "title": "" }, { "docid": "0324243fc964b58e479a5b3785826af0", "score": "0.6027163", "text": "public function getOverwriteMode();", "title": "" }, { "docid": "684657f7fe002244c5bbf2ed02800778", "score": "0.599592", "text": "public function canBeOverwritten(): bool {\n foreach (PLUGINS_DIRECTORIES as $base_dir) {\n $is_in_marketplace_dir = realpath($base_dir) !== false\n && realpath($base_dir) === realpath(GLPI_MARKETPLACE_DIR);\n\n $plugin_dir = $base_dir . '/' . $this->plugin_key;\n $found_in_dir = file_exists($plugin_dir . '/setup.php');\n\n if ($found_in_dir && !$is_in_marketplace_dir) {\n // Plugin will not be loaded from marketplace directory as\n // it has been found in an higher priority directory.\n // So it cannot be overrided.\n return false;\n } else if ($found_in_dir && $is_in_marketplace_dir) {\n return is_writable($plugin_dir);\n }\n\n if ($is_in_marketplace_dir) {\n // Current directory is GLPI_MARKETPLACE_DIR, meaning that following\n // checked directories will have a lower priority than GLPI_MARKETPLACE_DIR\n // in autoload process.\n // No need to check them.\n break;\n }\n }\n\n return self::hasWriteAccess();\n }", "title": "" }, { "docid": "14aecb910c27aadb7aa27cc4c80f1d4f", "score": "0.5935991", "text": "public function testDuplicateStrategyOverrideWithMatchingTypes(): void\n {\n $configuration = (new Configuration(Configuration::DUPLICATE_STRATEGY_OVERRIDE_SAME_TYPE))\n ->addType(self::object('DuplicatedName', ['f' => 'String']))\n ->addType(self::object('DuplicatedName', ['f' => 'String'])->setDescription('Second'));\n\n $errors = $this->getValidator()->validate($configuration);\n $this->assertCount(0, $errors);\n $this->assertCount(1, $configuration->getTypes());\n $this->assertEquals('Second', $configuration->getType('DuplicatedName')->getDescription());\n }", "title": "" }, { "docid": "fef4e7ed3f9895d3fc857e59aff8634b", "score": "0.5924834", "text": "public function overwrite($overwrite) {\n $this->_overwrite = ($overwrite === true);\n }", "title": "" }, { "docid": "a70f56870cd1f7f7f9ca3fbc85fdcae0", "score": "0.5914059", "text": "public function overwrite():bool\n {\n return $this->_overwrite;\n }", "title": "" }, { "docid": "66c17d989d9f15b6cbb216c6b5c51106", "score": "0.5810841", "text": "public function isOverrideAllowed();", "title": "" }, { "docid": "8ea1790b12568437fd092a55b4a6db3d", "score": "0.58100015", "text": "public function canAddFieldsToTCATypeAndReplaceExistingOnes() {}", "title": "" }, { "docid": "c8e5c34d2db2cc96cb606d90dcd626fe", "score": "0.57013124", "text": "private function checkType()\n {\n $this->err_extension = false;\n\n if ( !isset($this->file['name']) ) {\n $this->err_extension = true;\n\n return $this->err_extension;\n }\n\n $this->path_info = pathinfo($this->file['name']);\n\n if ( empty($this->path_info['extension']) ) {\n $this->err_extension = true;\n\n return $this->err_extension;\n }\n\n if ( !$this->extensions )\n $this->err_extension = false;\n\n elseif ( !in_array(strtolower($this->path_info['extension']), array_map('strtolower', $this->extensions)) )\n $this->err_extension = true;\n\n return $this->err_extension;\n }", "title": "" }, { "docid": "040926f7ff9ab64e24dd7def533457aa", "score": "0.56932265", "text": "public function testDuplicateStrategyOverrideWithUnmatchingTypes(): void\n {\n $configuration = (new Configuration(Configuration::DUPLICATE_STRATEGY_OVERRIDE_SAME_TYPE))\n ->addType(self::object('DuplicatedName', ['f' => 'String']))\n ->addType(self::input('DuplicatedName', ['f' => 'String']));\n\n $errors = $this->getValidator()->validate($configuration);\n $this->assertCount(1, $errors);\n $error = $errors->get(0);\n $this->assertEquals($error->getInvalidValue(), null);\n $this->assertMatchesRegularExpression('/Naming collision on name \"DuplicatedName\", found 2 types using it/', $error->getMessage());\n }", "title": "" }, { "docid": "10d503908835985f8919b764c3a032a4", "score": "0.5657163", "text": "public function hasOverride(): bool;", "title": "" }, { "docid": "e325a25090ca7487e249ec693288cd77", "score": "0.5597453", "text": "public function checkExtObj() {}", "title": "" }, { "docid": "e325a25090ca7487e249ec693288cd77", "score": "0.55971974", "text": "public function checkExtObj() {}", "title": "" }, { "docid": "792c27dcbf5db548ebbf6214dab23c25", "score": "0.54813457", "text": "public function allowOverwrite($setting = true) {\n\t\t$this->allow_overwrite = $setting;\n\t}", "title": "" }, { "docid": "06568991d21df3fc46742cc73e98f447", "score": "0.5481076", "text": "public function overwriteCode(): bool\n {\n return $this->overwriteCode;\n }", "title": "" }, { "docid": "395a8529d7e6ddc9da167fcb8c450c1c", "score": "0.54733515", "text": "function update_check_incompatibility($name, $type = 'module') {\n static $themes, $modules;\n\n // Store values of expensive functions for future use.\n if (empty($themes) || empty($modules)) {\n drush_include_engine('drupal', 'environment');\n $themes = _system_theme_data();\n $modules = module_rebuild_cache();\n }\n\n if ($type == 'module' && isset($modules[$name])) {\n $file = $modules[$name];\n }\n else if ($type == 'theme' && isset($themes[$name])) {\n $file = $themes[$name];\n }\n if (!isset($file)\n || !isset($file->info['core'])\n || $file->info['core'] != DRUPAL_CORE_COMPATIBILITY\n || version_compare(phpversion(), $file->info['php']) < 0) {\n return TRUE;\n }\n return FALSE;\n}", "title": "" }, { "docid": "e12b0165702988b4db7b7805e2e43c91", "score": "0.5461074", "text": "function wp_is_auto_update_enabled_for_type($type)\n {\n }", "title": "" }, { "docid": "5fb78eae23767bab228a45cd1d54bb48", "score": "0.54409194", "text": "private function checkForOverride()\n\t{\n\t\t$overrideFilePath = $this->getOverridePath() . '.php';\n\t\tif(file_exists($overrideFilePath)) {\n\t\t\treturn $overrideFilePath;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d47396a128cfb298d32bb7c2cf0baa6f", "score": "0.5429518", "text": "public function isPrependingType(): bool;", "title": "" }, { "docid": "2d43b30e51784cac4fe85797deb869f6", "score": "0.54163194", "text": "protected function checkIfNoConflictingExtensionIsInstalled() {}", "title": "" }, { "docid": "916d6f12bd015fe6b8fd710e0248c4b6", "score": "0.5386056", "text": "function testCompatible(){\n\t\tif($this->$imageAsset[\"type\"] == \"image/jpeg\" || $_FILES[\"image_upload_box\"][\"type\"] == \"image/pjpeg\"){\t\n\t\t\t$this->imgType = 'jpg';\n\t\t}\t\t\n\t\t// if uploaded image was GIF\n\t\tif($this->$imageAsset[\"type\"] == \"image/gif\"){\t\n\t\t\t$this->imgType = 'gif';\n\t\t}\t\n\t\t// if uploaded image was PNG\n\t\tif($this->$imageAsset[\"type\"] == \"image/x-png\"){\n\t\t\t$this->imgType = 'png';\n\t\t}\n\t\telse {\n\t\t\t$this->imgType = 'invalid';\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8056ed3dffd010c4deb34ca5f31ca50c", "score": "0.5356594", "text": "protected function _checkOverwriteState()\n {\n if (file_exists($this->_destination) && !$this->_options['overwriteDestination']) {\n throw new Streamwide_Media_Exception('The destination file already exists: '. $this->_destination);\n }\n\n return true;\n }", "title": "" }, { "docid": "c2d87fd0b9e5a406c22af51c0c4a7f77", "score": "0.5355088", "text": "public function setOverwrite($overwrite)\n {\n $this->overwrite = $overwrite;\n }", "title": "" }, { "docid": "8af28aaee8eab1aaad016147ec36618b", "score": "0.53361535", "text": "private static function backupExists($type)\r\n {\r\n $pattern = 'unknown-duplicator-type-set';\r\n\r\n switch ($type) {\r\n case DUPX_ServerConfigTypes::Apache:\r\n $pattern = '/.htaccess-.*-duplicator.bak/';\r\n break;\r\n case DUPX_ServerConfigTypes::IIS:\r\n $pattern = '/web.config-.*-duplicator.bak/';\r\n break;\r\n case DUPX_ServerConfigTypes::WordFence:\r\n $pattern = '/.user.ini-.*-duplicator.bak/';\r\n break;\r\n }\r\n\r\n if (is_dir(self::$rootPath)) {\r\n $dir = new DirectoryIterator(self::$rootPath);\r\n foreach ($dir as $file) {\r\n if ($file->isDot()) {\r\n continue;\r\n }\r\n if ($file->isFile()) {\r\n $name = $file->getFilename();\r\n if (strpos($name, '-duplicator.bak')) {\r\n if (preg_match($pattern, $name)) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "6bbc1936d5d1107c752ae6aae4f0e8fb", "score": "0.53211546", "text": "public function checkType()\n {\n\n if (!$this->isNewRecord) {\n\n // Dont allow changes of internal_name - Maybe not the best way to check it.\n $currentProfileField = ProfileField::model()->findByPk($this->id);\n if ($this->field_type_class != $currentProfileField->field_type_class) {\n $this->addError('field_type_class', Yii::t('UserModule.models_ProfileField', 'Field Type could not be changed!'));\n }\n } else {\n if (!key_exists($this->field_type_class, ProfileFieldType::getFieldTypes())) {\n $this->addError('field_type_class', Yii::t('UserModule.models_ProfileField', 'Invalid field type!'));\n }\n }\n }", "title": "" }, { "docid": "5a34eb4c65af29306a31b0295d5ec74c", "score": "0.53084034", "text": "public function canAddFieldsToTCATypeAfterExistingOnes() {}", "title": "" }, { "docid": "caf63b2cbe27b60b423ccf74ce1c7619", "score": "0.5251229", "text": "protected function _overwrite($name) {\n if ($this->_overwrite) {\n return TRUE;\n }\n if (is_file(\"$this->_path/$name\")) {\n Flash::error('Error: ya existe este fichero. Y no se permite reescribirlo');\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "e0474a9cabb06905691513bba1386cb7", "score": "0.5250431", "text": "public function getOverwrite()\n\t{\n\t\treturn $this->overwriteValue;\n\t}", "title": "" }, { "docid": "ed8c71661d9c1d519ba45581e0290ea7", "score": "0.52443075", "text": "public function setOverwriteMode($mode);", "title": "" }, { "docid": "b24edfcae8d037c4b9ceda33069d793d", "score": "0.52403396", "text": "public function isInCopyMode() {}", "title": "" }, { "docid": "e53154d8ad45ee061f4bf67cf8b1e734", "score": "0.52238786", "text": "function checkFileType() {\n\t\t$imageFileType = strtolower($imageFileType);\n if($imageFileType != \"pdf\" && $imageFileType != \"doc\" && $imageFileType != \"docx\") {\n return false;\n } \n else {\n return true;\n }\n }", "title": "" }, { "docid": "05dc3aaffe7fb82b8d85b2821089d0db", "score": "0.5198558", "text": "private function isMethodOverwritten(\\ReflectionClass $class)\n {\n // check that controller overwrites default ACL to some specific (at least we check that it was overwritten).\n $method = $class->getMethod(self::ACL_FUNC_NAME);\n try {\n $method->getPrototype();\n return true;\n } catch (\\ReflectionException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "110841b786e23a8c458b2dc73b48e68c", "score": "0.5197017", "text": "public function allowOverrideEntity(): bool;", "title": "" }, { "docid": "79b3b7605b16f16ac4e0fd01e77ba3f9", "score": "0.5192197", "text": "public function overwrite($value) {\n $this->_overwrite = (bool) $value;\n }", "title": "" }, { "docid": "dbc707dcacb3f5b122efc095831f493c", "score": "0.51877296", "text": "protected function checkType($type)\n\t{\n\t\t//return in_array($this->file_type, $this->type);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7b95f0b5384db4fe71cd0fe28b3623ea", "score": "0.5185817", "text": "public function hasOverride() : bool\n {\n return $this->override !== null;\n }", "title": "" }, { "docid": "e2bbf0d7744d56cfa9b6235c0c8185d5", "score": "0.51844376", "text": "public function hasShoptype(){\n return $this->_has(19);\n }", "title": "" }, { "docid": "1a3780584f2f096fd9a47869edea95b0", "score": "0.5183665", "text": "public function is_user_def();", "title": "" }, { "docid": "d8c50bb6b0448e3565d55d934bf3cf45", "score": "0.51551133", "text": "protected function isOverrideable($param) \n\t{\n\t\treturn self::$param_info[$param]['ovr'];\n\t}", "title": "" }, { "docid": "e57f46639f6ed28c548870963f7c377a", "score": "0.51474494", "text": "private function assertOverrideIsDefined()\n {\n if (null === $this->override) {\n throw new \\LogicException('Override has to be defined before edition.');\n }\n }", "title": "" }, { "docid": "5a5f3397e6d9faf7bb30617d96d67867", "score": "0.51450014", "text": "function existsItemStrict ($name, $type) {\n\t\tif (array_key_exists ('/'.$type.$name, $this->allConfigItems) or\n\t\t\tarray_key_exists ('/'.$type.$name, $this->allUserItems)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "ffdcab8b638aed45376b7b8c8d667286", "score": "0.5122949", "text": "public function canAddFieldsToTCATypeBeforeExistingOnes() {}", "title": "" }, { "docid": "c8b264be873b878fe8b99d2d1ccaa498", "score": "0.5119281", "text": "private function doTypesConflict(\\GraphQL\\Type\\Definition\\Type $type1, \\GraphQL\\Type\\Definition\\Type $type2) : bool\n {\n }", "title": "" }, { "docid": "1caf18ab95a64bcb57808ba4f30d46b3", "score": "0.5094589", "text": "protected function canBeManipulated()\n {\n return in_array($this->extension, ['jpg', 'jpeg', 'png', 'gif']);\n }", "title": "" }, { "docid": "a0d66e552db1dd2c5d713c76fb9c6f1e", "score": "0.5093545", "text": "function wp_is_auto_update_forced_for_item($type, $update, $item)\n {\n }", "title": "" }, { "docid": "df7f577edc21088234d07a7643f52468", "score": "0.5086719", "text": "public function isObsolete() {\n\n if($this->options['overwrite'] === true) return false;\n\n // try to use the original if resizing is not necessary\n if($this->options['width'] >= $this->source->width() &&\n $this->options['height'] >= $this->source->height() &&\n $this->options['crop'] == false &&\n $this->options['blur'] == false &&\n $this->options['upscale'] == false) return true;\n\n return false;\n\n }", "title": "" }, { "docid": "d069b4deff3434fadaed37d14d1a4af7", "score": "0.5085623", "text": "function is_set($item,$alter=false){\n\treturn isset($item)?$item:$alter;\n}", "title": "" }, { "docid": "551e24a0d7b9aa9bd189ff0811f0c903", "score": "0.50656193", "text": "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "title": "" }, { "docid": "be58f2422b2cca0a17326ac78480f6ca", "score": "0.50607264", "text": "function it_check_save_action( $id, $post_type = 'post', $no_inline_save = true ) {\n // to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return false;\n }\n\n if ( ! isset( $_POST['post_type'] ) ) {\n return false;\n }\n\n if ( $no_inline_save ) {\n if ( isset( $_POST['action'] ) && ( 'inline-save' == $_POST['action'] ) ) {\n return false;\n }\n }\n\n // Check permissions\n if ( $post_type == $_POST['post_type'] ) {\n\n if ( $post_type == 'page' ) {\n if ( ! current_user_can( 'edit_page', $id ) ) {\n return false;\n }\n } else {\n if ( ! current_user_can( 'edit_post', $id ) ) {\n return false;\n }\n }\n\n } else {\n // it's not our post type, we are good to go.\n return $post_id;\n }\n\n return true;\n\n }", "title": "" }, { "docid": "30d9c412234a3fd1b9607815f0cd0a94", "score": "0.50564957", "text": "function bxdev_drag_check_type($node){\n\tif($node->type == 'thrifted_product' && user_access('access image layout')){\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n}", "title": "" }, { "docid": "ffe41f1f0f6a409ec2b3c3b52e252f96", "score": "0.50443184", "text": "public function save()\n {\n\n if (!$this->dirty()) {\n return true;\n }\n $validTypes = array(1, 2, 3, 10, 11, 12, 13, 14, 21, 22);\n if (!in_array($this->Type, $validTypes)) {\n throw new Exception('Invalid file type!');\n }\n parent::save();\n }", "title": "" }, { "docid": "d5c83b0bcbf1470e59e56909053b4e1c", "score": "0.5029437", "text": "protected function checkExtension() {\n return true;\n }", "title": "" }, { "docid": "c0612a0531e0aca0c5fdd1545ad052f1", "score": "0.5026894", "text": "protected function validateOwner()\n {\n $value = $this->owner->getValue();\n if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) {\n return true;\n }\n $mime = $this->getConfig();\n return is_array($mime)? in_array($value['type'], $mime):\n $value['type'] == $mime;\n }", "title": "" }, { "docid": "1a2ff9c98726efb6b21225f807e2ebb8", "score": "0.5020377", "text": "function setOverWrite($reply){\n\t\tif(!is_bool($reply)){\n\t\t\t$reply = false;\n\t\t}\n\t\t\n\t\t$this->overWrite = $reply;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "150394734c4326a243855a2a958dbb96", "score": "0.5011779", "text": "public function isType($type){\n \n return ($this->type === $type);\n \n }", "title": "" }, { "docid": "7e9b6837c0b522153676ce95233d865d", "score": "0.5001008", "text": "public function canAddFieldsToAllTCATypesAfterExistingOnes() {}", "title": "" }, { "docid": "9ba1047b5ea7f6b3fb5aefc025a7e48e", "score": "0.5000699", "text": "protected function youCanOverrideThis(): bool {\n // Do something\n return true;\n }", "title": "" }, { "docid": "9ba1047b5ea7f6b3fb5aefc025a7e48e", "score": "0.5000699", "text": "protected function youCanOverrideThis(): bool {\n // Do something\n return true;\n }", "title": "" }, { "docid": "c6ba58794427587f3e80a1aa53c8ff2b", "score": "0.49917662", "text": "public function checkSubExtObj() {}", "title": "" }, { "docid": "c6ffd4f9641b917d5a348269f4d9f4e3", "score": "0.49914774", "text": "function has_handler($obj_type, $handler_type='') {\n if($handler_type) $handler_types = is_array($handler_type) ? $handler_type : array($handler_type);\n else $handler_types = array('add', 'edit', 'delete');\n foreach($handler_types as $type) {\n if(function_exists('pre_'.$type.'_'.$obj_type)) return 'pre_'.$type.'_'.$obj_type;\n if(function_exists('post_'.$type.'_'.$obj_type)) return 'post_'.$type.'_'.$obj_type;\n }\n return ''; \n}", "title": "" }, { "docid": "652d6333e6cbb48567246afe4835dc3e", "score": "0.49900007", "text": "private function replaceDocumentTypeToAccessibleType(): void\n\t{\n\t\t$replaces = [\n\t\t\tStoreDocumentTable::TYPE_ARRIVAL => StoreDocumentTable::TYPE_STORE_ADJUSTMENT,\n\t\t\tStoreDocumentTable::TYPE_STORE_ADJUSTMENT => StoreDocumentTable::TYPE_ARRIVAL,\n\t\t];\n\n\t\tforeach ($replaces as $baseType => $anotherType)\n\t\t{\n\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $baseType);\n\t\t\tif (!$can)\n\t\t\t{\n\t\t\t\t$this->canSelectDocumentType = false;\n\n\t\t\t\t// change current type\n\t\t\t\tif ($this->documentType === $baseType)\n\t\t\t\t{\n\t\t\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $anotherType);\n\t\t\t\t\tif ($can)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->documentType = $anotherType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5af64421aefd04b3b3fce04d2bb1ce58", "score": "0.4980435", "text": "public function isFilledType(){\n\t\tif ($_POST['typeAdd'] != '- Välj träningstyp -') {\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "0e80039cbc2310e2ea1f7574df3b6d44", "score": "0.4980081", "text": "protected function allowSkinCopy() {\n\t\tif (TYPO3_OS !== 'WIN') {\n\t\t\t$allowSkinCopy = TRUE;\n\t\t} else {\n\t\t\t$allowSkinCopy = FALSE;\n\t\t}\n\n\t\treturn $allowSkinCopy;\n\t}", "title": "" }, { "docid": "03d6c14a377f280d32248700b60f4bd2", "score": "0.49696457", "text": "function checkType($name, $type){\n $extension = pathinfo($name, PATHINFO_EXTENSION); //better way to get extension\n if (!empty($name)) {\n if (($extension == 'jpg' || $extension == 'png' || $extension == 'jpeg' || $extension == 'gif') && ($type == 'image/jpeg' || $type == 'image/png' || $type == 'image/jpg') || $type == 'image/gif') {\n return true;\n } else{\n echo 'Ce n\\'est pas une image';\n return false;\n }\n }\n }", "title": "" }, { "docid": "a429b72fddc35d9165e06b08f16c95f7", "score": "0.49688607", "text": "protected function _types() {\n return $this->_cond(\n !in_array($_FILES[$this->_name]['type'], $this->_types),\n 'el tipo de archivo no es válido'\n );\n }", "title": "" }, { "docid": "c5317165cea7a5d6e7a5fc05312dc13a", "score": "0.49470985", "text": "protected function verifyFormatCompatiblity()\n {\n $gdInfo = gd_info();\n\n switch ($this->format) {\n case 'GIF':\n $isCompatible = $gdInfo['GIF Create Support'];\n break;\n case 'JPG':\n case 'JPEG':\n $isCompatible = (isset($gdInfo['JPG Support']) || isset($gdInfo['JPEG Support'])) ? true : false;\n $this->format = 'JPEG';\n break;\n case 'PNG':\n case 'XBM':\n case 'XPM':\n case 'WBMP':\n $isCompatible = $gdInfo[$this->format . ' Support'];\n break;\n default:\n $isCompatible = false;\n break;\n }\n\n if (!$isCompatible) {\n $isCompatible = $gdInfo['JPEG Support'];\n\n if (!$isCompatible) {\n throw $this->triggerError(sprintf('Your GD installation does not support \"%s\" image types!', $this->format));\n }\n }\n }", "title": "" }, { "docid": "9b9d2bf469660cde6ffdcc7fbcde3895", "score": "0.49391928", "text": "function updateType($objectType) {\n\t\tthrow new CmisNotImplementedException(\"updateType\");\n\t}", "title": "" }, { "docid": "0a9554702c387389c7bad4c23fddef1b", "score": "0.49334008", "text": "function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "35ac008ff5d224c0468fee73deb17a8c", "score": "0.49319494", "text": "function check_file_type($source)\n{\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n return true;\n break;\n case 'application/vnd.ms-excel':\n return true;\n break;\n\n case 'application/vnd.ms-powerpoint':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.text':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return true;\n break;\n \n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\n return true;\n break;\n\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n return true;\n break;\n \n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "title": "" }, { "docid": "35ac008ff5d224c0468fee73deb17a8c", "score": "0.49319494", "text": "function check_file_type($source)\n{\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n return true;\n break;\n case 'application/vnd.ms-excel':\n return true;\n break;\n\n case 'application/vnd.ms-powerpoint':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.text':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return true;\n break;\n \n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\n return true;\n break;\n\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n return true;\n break;\n \n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "title": "" }, { "docid": "ad27e745a8adda031788a5ea8fe97b18", "score": "0.49234053", "text": "public function isNoValidationTypeDetermined($object): bool;", "title": "" }, { "docid": "ddcdea7ed04cca37d7aae720f2c536d6", "score": "0.49187684", "text": "public function can_auto_install( $type ) {\r\n\t\t$writable = false;\r\n\r\n\t\tif ( ! function_exists( 'get_filesystem_method' ) ) {\r\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/file.php';\r\n\t\t}\r\n\r\n\t\t// Are we dealing with direct access FS?\r\n\t\tif ( 'direct' == get_filesystem_method() ) {\r\n\t\t\tif ( 'plugin' == $type ) {\r\n\t\t\t\t$root = WP_PLUGIN_DIR;\r\n\t\t\t} elseif ( 'language' === $type ) {\r\n\t\t\t\t$root = is_dir( WP_LANG_DIR ) ? WP_LANG_DIR : WP_CONTENT_DIR;\r\n\t\t\t} else {\r\n\t\t\t\t$root = WP_CONTENT_DIR . '/themes';\r\n\t\t\t}\r\n\r\n\t\t\t$writable = is_writable( $root );\r\n\t\t}\r\n\r\n\t\t// If we don't have write permissions, do we have FTP settings?\r\n\t\tif ( ! $writable ) {\r\n\t\t\t$writable = defined( 'FTP_USER' )\r\n\t\t\t\t&& defined( 'FTP_PASS' )\r\n\t\t\t\t&& defined( 'FTP_HOST' );\r\n\t\t}\r\n\r\n\t\t// Lastly, if no other option worked, do we have SSH settings?\r\n\t\tif ( ! $writable ) {\r\n\t\t\t$writable = defined( 'FTP_USER' )\r\n\t\t\t\t&& defined( 'FTP_PUBKEY' )\r\n\t\t\t\t&& defined( 'FTP_PRIKEY' );\r\n\t\t}\r\n\r\n\t\treturn $writable;\r\n\t}", "title": "" }, { "docid": "86fdd900e3821fa9452e12ef2910fbbe", "score": "0.49108344", "text": "public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }", "title": "" }, { "docid": "78903415602da5efe084ef806a3bbaa4", "score": "0.49031204", "text": "public function typeIsOfSameInternalSize() : bool\n {\n return false;\n }", "title": "" }, { "docid": "a347b8bc124a6edbe8766a76d0e62433", "score": "0.49018803", "text": "public function handles($type)\n {\n return strtolower($type) == 'dropbox';\n }", "title": "" }, { "docid": "8ca075b6095258def42dd7dfbf642d61", "score": "0.48991457", "text": "public function setIsOverwrite( $aIsOverwritable )\n\t{\n\t\t$this->overwrite = $aIsOverwritable;\n\t}", "title": "" }, { "docid": "6e66489475996b76092f7ba0b50ece4d", "score": "0.4893408", "text": "private function check_duplicate( $el_type, $el_id ) {\n\t\t$res = false;\n\t\t$exp = explode( '_', $el_type );\n\t\t$_type = $exp[0];\n\t\tif ( in_array( $_type, array( 'post', 'tax' ) ) ) {\n\t\t\t$res = $this->duplicate_from_db( $el_id, $el_type, $_type );\n\t\t\tif ( $res ) {\n\t\t\t\t$fix_assignments = new WPML_Fix_Type_Assignments( $this->sitepress );\n\t\t\t\t$fix_assignments->run();\n\t\t\t\t$res = $this->duplicate_from_db( $el_id, $el_type, $_type );\n\t\t\t}\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "72a7373e22517662124261b7bb5eaba5", "score": "0.4891574", "text": "function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\"type\"])) {\n $file[\"format\"] = \"bdoc\";\n } else if ($file[\"type\"] === \"application/x-ddoc\") {\n $file[\"format\"] = \"ddoc\";\n } else {\n return FALSE;\n }\n\n return is_uploaded_file($file[\"tmp_name\"]);\n}", "title": "" }, { "docid": "ea00ed9b9ece0b52c85c8403f69a5fea", "score": "0.48895362", "text": "public function setOverwrite($on = true)\n\t{\n\t\t$this->overwriteValue = (bool) $on;\n\t}", "title": "" }, { "docid": "f14807aadbfd1334affada0239af2304", "score": "0.488891", "text": "public function isOverrided(string $template)\n {\n $directory = $this->getTemplateOverrideDirectory();\n\n if (!\\is_dir($directory)) {\n return false;\n }\n\n $templatePath = $directory . $template;\n\n return (\\is_file($templatePath));\n }", "title": "" }, { "docid": "609b135c18c6396a6fde44b9d66ff541", "score": "0.48870733", "text": "protected function overrideFiles()\n\t{\n\t\tif (version_compare(_PS_VERSION_, '1.5', '<') && $this->removeOverrideFiles())\n\t\t{\n\t\t\t/** Check if the override directories exists */\n\t\t\tif (!is_dir(_PS_ROOT_DIR_.'/override/classes/'))\n\t\t\t\tmkdir(_PS_ROOT_DIR_.'/override/classes/', 0777, true);\n\t\t\tif (!is_dir(_PS_ROOT_DIR_.'/override/controllers/'))\n\t\t\t\tmkdir(_PS_ROOT_DIR_.'/override/controllers/', 0777, true);\n\n\t\t\tforeach (self::getOverrideInfo() as $key => $params)\n\t\t\t\tif (file_exists(_PS_ROOT_DIR_.'/'.$params['dest']))\n\t\t\t\t\t$this->_errors[] = $this->l('This override file already exists, please merge it manually: ').$key;\n\t\t\t\telseif (!copy(_PS_MODULE_DIR_.'avalaratax/'.$params['source'], _PS_ROOT_DIR_.'/'.$params['dest']))\n\t\t\t\t\t\t$this->_erroors[] = $this->l('Error while copying the override file: ').$key;\n\t\t}\n\t\treturn !isset($this->_errors) || !$this->_errors || !count($this->_errors);\n\t}", "title": "" }, { "docid": "774d23ead654acfd5f91b3fedc13d801", "score": "0.48789713", "text": "public function testDuplicateForbiddenType(): void\n {\n $configuration = (new Configuration())\n ->addType(self::object('DuplicatedName', ['f' => 'String']))\n ->addType(self::object('DuplicatedName', ['f' => 'String']));\n\n $errors = $this->getValidator()->validate($configuration);\n $this->assertCount(1, $errors);\n $error = $errors->get(0);\n $this->assertNull($error->getInvalidValue());\n $this->assertMatchesRegularExpression('/Naming collision on name \"DuplicatedName\", found 2 types using it/', $error->getMessage());\n }", "title": "" }, { "docid": "eee7783cf623d9898780d9e01388b205", "score": "0.48730168", "text": "public function hasType($name);", "title": "" }, { "docid": "29b602f8e7dfcbb736c36bf6cb8172bc", "score": "0.4859146", "text": "public function type_exists($type)\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\treturn file_exists($module_path.'/'.$type);\n\t}", "title": "" }, { "docid": "81f4d05c9b8b2598d72079ce3d7aee53", "score": "0.4855813", "text": "public function hasType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "074a39511414932356836cb05044ddd6", "score": "0.4853344", "text": "function isUpload()\n {\n return ($this->type->getTypeName() == 'file');\n }", "title": "" }, { "docid": "c244f951c71edfd3784381b06154a451", "score": "0.4852162", "text": "public function canAddFieldsToAllTCATypesBeforeExistingOnes() {}", "title": "" }, { "docid": "b9d0fad65213468f5af42651514bb415", "score": "0.48518148", "text": "public function checkSubExtObj()\n {\n if (is_object($this->extObj)) {\n $this->extObj->checkExtObj();\n }\n }", "title": "" }, { "docid": "64643cedd8bad1afd8e9eac725f11f99", "score": "0.48504898", "text": "public function canAddFieldsToAllTCATypesRespectsPositionFieldInPalette() {}", "title": "" }, { "docid": "87305861429c704b3666e466ca1235bb", "score": "0.48502848", "text": "public function isFallback();", "title": "" }, { "docid": "c32ba21a51eb6ef737e4b09ebaeb7fcb", "score": "0.48469555", "text": "function wp_attachment_is($type, $post = \\null)\n {\n }", "title": "" }, { "docid": "559609dc54d21441d8d5302977f9f405", "score": "0.48419055", "text": "function wp_is_ini_value_changeable($setting)\n {\n }", "title": "" }, { "docid": "38a0c147ab392e06b7b1b2800ec32d3c", "score": "0.48407894", "text": "public function checkExtObj()\n {\n if (is_array($this->extClassConf) && $this->extClassConf['name']) {\n $this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);\n $this->extObj->init($this, $this->extClassConf);\n // Re-write:\n $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);\n }\n }", "title": "" }, { "docid": "361ce710cb6e2baf8a1e63613f39507e", "score": "0.48389393", "text": "public function isReplicable();", "title": "" }, { "docid": "22af15a43f7cbac7d0b3197c8a0d40dd", "score": "0.4833332", "text": "function rich_edit_exists()\n {\n }", "title": "" }, { "docid": "1d1d1ecbe9d9ea7ea083cc62bd74160d", "score": "0.48269618", "text": "public function canBeCopied() {}", "title": "" }, { "docid": "a7f0e81fdca2e8e0e65fb050625ffd75", "score": "0.48266762", "text": "function testDoNotGuessIfSpecified() {\n\t\t$result = $this->helper->__guessInputType('Test.foo', array('type' => 'bar'));\n\t\t$this->assertEqual($result, 'bar');\n\t}", "title": "" }, { "docid": "dd56471f4ce4cffc98932d9c288303be", "score": "0.48245487", "text": "public function isModified();", "title": "" }, { "docid": "bfcbf761ffebc3730ca749eefa83f8aa", "score": "0.48212564", "text": "public function canRegisterAContentObjectClassForATypoScriptName() {}", "title": "" }, { "docid": "68ae50db7c3e76812d4c8e1473e8dc36", "score": "0.48207885", "text": "public function testUpdateFieldsWrongType(): void { }", "title": "" } ]
a33368b3ff80ac4d8c275ca1510b66d9
Test should check edit program type modal with in house program type.
[ { "docid": "53aa8c95a9764c7c8c8f0745597cfbbf", "score": "0.84267855", "text": "public function test_should_check_edit_program_type_modal_with_in_house_program_type()\n {\n $this->programType->update(['code' => 'in_house_teledemand']);\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->assertVisible('@modal-content')\n ->assertInputValue('@program-type-edit-allocation', $this->programType->program_type_allocation)\n ->assertSelected('@program-type-edit-delivery-day', $this->programType->in_house_delivery_day)\n ->assertInputValue('@program-type-edit-date-shift', $this->programType->in_house_date_shift_days)\n ->assertInputValue('@program-type-edit-cpl', $this->programType->in_house_cpl)\n ->assertPresent('@program-type-edit-submit')\n ->assertPresent('@program-type-edit-close')\n ->press('@program-type-edit-close');\n });\n });\n }", "title": "" } ]
[ { "docid": "fa0bf510a4540be8c423b1179b1d9c4b", "score": "0.7845005", "text": "public function test_should_check_edit_program_type_modal_with_out_tasked_program_type()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->assertVisible('@modal-content')\n ->assertInputValue('@program-type-edit-allocation', $this->programType->program_type_allocation)\n ->assertPresent('@program-type-edit-close')\n ->assertPresent('@program-type-edit-submit');\n $modal->press('@program-type-edit-close');\n })\n ->waitUntilMissing('@program-type-edit-modal');\n });\n }", "title": "" }, { "docid": "61007e86f6d6b49a59dd22df20c1a014", "score": "0.7321391", "text": "public function test_should_update_program_type_with_in_house_program_type()\n {\n $this->programType->update(['code' => 'in_house_teledemand']);\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->type('@program-type-edit-allocation', mt_rand(1, 1000))\n ->click('@program-type-edit-start-date')\n ->waitFor('@program-type-edit-end-date')\n ->click('@program-type-edit-end-date')\n ->type('@program-type-edit-date-shift', mt_rand(1, 30))\n ->type('@program-type-edit-cpl', mt_rand(1, 100))\n ->radio('@program-type-edit-pacing', 'Normal')\n ->click('.custom-checkbox')\n ->press('@program-type-edit-submit');\n })\n ->waitFor('.toast-success')\n ->assertSee('The program type was updated successfully.');\n });\n }", "title": "" }, { "docid": "381213c5add0d2fcc563496d7bf09c4e", "score": "0.7142213", "text": "public function test_should_give_warning_on_update_program_type_with_same_data_with_in_house_program_type()\n {\n $this->programType->update(['code' => 'in_house_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->press('@program-type-edit-submit');\n })\n ->waitFor('.toast-warning')\n ->assertSee('Nothing changed in program type.');\n });\n }", "title": "" }, { "docid": "7f1f46f7aac46d40a53ca82810cbe38f", "score": "0.7004074", "text": "public function test_should_check_edit_partner_modal()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-partners-button')\n ->click('@edit-partners-button')\n ->assertPresent('@partner-edit-modal');\n foreach ($this->programType->partners as $partner) {\n $browser->assertSee($partner->partner_allocation)\n ->assertPresent('@partner-edit-modal')\n ->assertSee($partner->partner_cpl)\n ->assertSee($partner->partner_delivery_day)\n ->assertSee($partner->partner_date_shift_days);\n }\n $browser->press('@partner-edit-close')\n ->waitUntilMissing('@partner-edit-modal');\n });\n }", "title": "" }, { "docid": "a2a7f07179fd9fdb33c247519036ff2c", "score": "0.6835613", "text": "public function test_should_return_program_type_view_with_in_house_program_type()\n {\n $this->programType->update(['code' => 'in_house_email']);\n $response = $this->get('groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid);\n $response->assertViewIs('programTypes.show')->assertViewHas('programType');\n }", "title": "" }, { "docid": "b7f432202c4bcaf5494592a48e3f8f4a", "score": "0.65543574", "text": "public function test_should_check_program_type_view_with_in_house()\n {\n $this->programType->update(['code' => 'in_house_email']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@program-type-view')\n ->assertPresent('@group-view-back-button')\n ->assertSeeIn('@program-type-card', $this->programType->getCodeNameAttribute())\n ->assertSeeIn('@program-type-allocation', $this->programType->program_type_allocation)\n ->assertSeeIn('@program-type-date-range-start', parseDate($this->programType->program_type_date_range_start, 'm/d/Y'))\n ->assertSeeIn('@program-type-date-range-end', parseDate($this->programType->program_type_date_range_end, 'm/d/Y'))\n ->assertSeeIn('@in-house-date-shift-days', 'Delivery: ' . $this->programType->in_house_date_shift_days . ' days')\n ->assertSeeIn('@in-house-cpl', '$' . $this->programType->in_house_cpl)\n ->assertPresent('@edit-info-button')\n ->assertMissing('@edit-partners-button-button')\n ->assertMissing('@partner-data')\n ->assertPresent('@delete-info-and-sectors')\n ->assertSeeIn('@program-type-allocation', $this->programType->program_type_allocation)\n ->assertSeeIn('@in-house-delivery-day', $this->programType->in_house_delivery_day)\n ->assertSeeIn('@in-house-date-shift-days', $this->programType->in_house_date_shift_days)\n ->assertSeeIn('@in-house-cpl', $this->programType->in_house_cpl);\n });\n }", "title": "" }, { "docid": "35d17c9bb225f54501bf7b43100229b4", "score": "0.65491104", "text": "public function test_should_update_program_type_with_out_tasked_program_type()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->type('@program-type-edit-allocation', '51')\n ->click('@program-type-edit-start-date')\n ->waitFor('@program-type-edit-end-date')\n ->click('@program-type-edit-end-date')\n ->radio('@program-type-edit-pacing', 'Normal')\n ->check('.custom-checkbox')\n ->press('@program-type-edit-submit');\n })\n ->waitFor('.toast-success')\n ->assertSee('The program type was updated successfully.');\n });\n }", "title": "" }, { "docid": "b77fa9a1129113b0d744426fd80d5f7f", "score": "0.64337033", "text": "public function testEdit()\n {\n }", "title": "" }, { "docid": "2ec69d02a5f296da7e6b6c8dfc24b0e5", "score": "0.64062506", "text": "public function test_should_give_warning_on_update_program_type_with_same_data_with_out_tasked_program_type()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->click('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->press('@program-type-edit-submit');\n })\n ->waitFor('.toast-warning')\n ->assertSee('Nothing changed in program type.');\n });\n }", "title": "" }, { "docid": "d22d4c5d2ab3302751ea18e20e122c28", "score": "0.6389317", "text": "public function test_should_show_errors_for_empty_inputs_when_updating_program_type_with_out_tasked_program_type()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-info-button')\n ->press('@edit-info-button')\n ->whenAvailable('@program-type-edit-modal', function ($modal) {\n $modal->type('@program-type-edit-allocation', str_random(3))\n ->press('@program-type-edit-submit')\n ->assertSee('The overall allocation field is required and may only contain numeric characters.');\n });\n });\n }", "title": "" }, { "docid": "740f39a69a59e2568ee4e84c4f50dafd", "score": "0.6357721", "text": "public function testEditActiveWithCorrectInput()\n {\n // Reset to a factory db\n $this->resetDB();\n $this->adminLogin();\n factory(App\\Admin\\AdminSettings::class)->create();\n $this->visit('admin/settings/1/edit')\n ->see('Edit active quote function')\n ->see('Back to index')\n ->type('10', 'quantity_default')\n ->type(100, 'bom_line_default')\n ->type('1.75', 'bom_line_charge_per')\n ->type(150, 'smt_default')\n ->type('.25', 'smt_charge_per')\n ->type(10, 'tht_default')\n ->type(0, 'tht_charge_per')\n ->type(3, 'bga_default')\n ->type('1.50', 'bga_charge_per')\n ->type(2, 'sides_default')\n ->type(75, 'sides_charge_per')\n ->type(1, 'flat_fee_default')\n ->type(200, 'flat_fee_charge_per')\n ->type('1.25', 'function_x')\n ->type('0.05', 'function_b')\n ->type(2, '2_layer_sq_inch_price')\n ->type(600, '2_layer_base_price')\n ->type(3, '4_layer_sq_inch_price')\n ->type(700, '4_layer_base_price')\n ->type(4, '6_layer_sq_inch_price')\n ->type(900, '6_layer_base_price')\n ->type(5, '8_layer_sq_inch_price')\n ->type(1000, '8_layer_base_price')\n ->type(100, 'assembled_turn_day_1')\n ->type(90, 'assembled_turn_day_2')\n ->type(85, 'assembled_turn_day_3')\n ->type(80, 'assembled_turn_day_4')\n ->type(75, 'assembled_turn_day_5')\n ->type(100, 'unassembled_turn_day_1')\n ->type(90, 'unassembled_turn_day_2')\n ->type(85, 'unassembled_turn_day_3')\n ->type(80, 'unassembled_turn_day_4')\n ->type(75, 'unassembled_turn_day_5')\n ->press('submitQuoteForm')\n ->seePageIs('/admin/settings/3/edit')\n ->see('Edit active quote function')\n ->seeInDatabase('admin_settings', ['bom_line_charge_per' => '1.75'])\n ->seeInDatabase('admin_settings', ['active' => '0'])\n ->seeInDatabase('admin_settings', ['active' => '1']);\n }", "title": "" }, { "docid": "e77cdb865efe42a89c2c2a781d10f2d9", "score": "0.62821007", "text": "public function testEditModal(string $service, string $type) : void\n {\n //====================================================================//\n // Build Route Parameters\n $params = array(\n \"service\" => $service,\n \"type\" => $type,\n );\n\n //====================================================================//\n // Render Forced\n $crawler = $this->assertRouteWorks(\"splash_widgets_edit_widget\", $params);\n\n //====================================================================//\n // Verify Form is Here\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@name=\"splash_widgets_settings_form\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@id=\"splash_widgets_settings_form_options_Width\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@id=\"splash_widgets_settings_form_options_Color\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@name=\"splash_widgets_settings_form[options][Header]\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@name=\"splash_widgets_settings_form[options][Footer]\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@name=\"splash_widgets_settings_form[options][UseCache]\"]')->count()\n );\n\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@id=\"splash_widgets_settings_form_parameters\"]')->count()\n );\n $this->assertEquals(\n 1,\n $crawler->filterXpath('//*[@id=\"splash_widgets_settings_form_parameters_DatePreset\"]')->count()\n );\n }", "title": "" }, { "docid": "57e59b508aa7411d1b075b6511379cca", "score": "0.62028795", "text": "public function testEditConfirmationButton()\r\n {\r\n // Go to the edit page of a container\r\n $this->session->visit('http://localhost:8000/app_test.php/container/1/edit');\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n // find the text field for the serial number, and get its HTML (#appbundle_container_containerSerial is the input, not the div)\r\n $serialField = $page->find(\"css\",\"#appbundle_container_containerSerial\");\r\n\r\n // check that the field cannot be edited\r\n $this->assertTrue($serialField->hasAttribute('readonly'));\r\n\r\n // Click the unlock button\r\n $page->find('named', array('button', \"Unlock\"))->click();\r\n\r\n // check that the field can be edited\r\n $this->assertFalse($serialField->hasAttribute('readonly'));\r\n }", "title": "" }, { "docid": "a9d90e3e8ddc61c7697cfbefcac0510e", "score": "0.6178933", "text": "public function testEditForo(){\n $this->assertNotEmpty(editForo(2 , \"algo editado\" , \"Sin titulo\" , \"\"));\n }", "title": "" }, { "docid": "5445ffc9256fba5f3c3a17f7c50e9714", "score": "0.61601734", "text": "public function testEditActiveWithIncorrectInput()\n {\n // Reset to a factory db\n $this->resetDB();\n $this->adminLogin();\n factory(App\\Admin\\AdminSettings::class)->create();\n $this->visit('admin/settings/1/edit')\n ->see('Edit active quote function')\n ->see('Back to index')\n ->type('1.5', 'quantity_default')\n ->type('', 'bom_line_default')\n ->type('F', 'bom_line_charge_per')\n ->type(150, 'smt_default')\n ->type('.25', 'smt_charge_per')\n ->type(10, 'tht_default')\n ->type(0, 'tht_charge_per')\n ->type(3, 'bga_default')\n ->type('1.50', 'bga_charge_per')\n ->type(2, 'sides_default')\n ->type(75, 'sides_charge_per')\n ->type(1, 'flat_fee_default')\n ->type(200, 'flat_fee_charge_per')\n ->type('1.25', 'function_x')\n ->type('0.05', 'function_b')\n ->type(2, '2_layer_sq_inch_price')\n ->type(600, '2_layer_base_price')\n ->type(3, '4_layer_sq_inch_price')\n ->type(700, '4_layer_base_price')\n ->type(4, '6_layer_sq_inch_price')\n ->type(900, '6_layer_base_price')\n ->type(5, '8_layer_sq_inch_price')\n ->type(1000, '8_layer_base_price')\n ->type(100, 'assembled_turn_day_1')\n ->type(90, 'assembled_turn_day_2')\n ->type(85, 'assembled_turn_day_3')\n ->type(80, 'assembled_turn_day_4')\n ->type(75, 'assembled_turn_day_5')\n ->type(100, 'unassembled_turn_day_1')\n ->type(90, 'unassembled_turn_day_2')\n ->type(85, 'unassembled_turn_day_3')\n ->type(80, 'unassembled_turn_day_4')\n ->type(75, 'unassembled_turn_day_5')\n ->press('submitQuoteForm')\n ->seePageIs('/admin/settings/1/edit')\n ->see('Edit active quote function')\n ->see('Could not create new settings')\n ->see('The bom line default field is required.')\n ->see('The bom line charge per must be a number.')\n ->see('The quantity default must be an integer.')\n ->dontSeeInDatabase('admin_settings', ['bom_line_charge_per' => '1.75'])\n ->seeInDatabase('admin_settings', ['active' => '1'])\n ->dontSeeInDatabase('admin_settings', ['active' => '0']);\n }", "title": "" }, { "docid": "47818be106d575863e3e4054c14c10ca", "score": "0.61168635", "text": "public function test_should_update_program_type()\n {\n $programType = collect(factory(ProgramType::class)->make())\n ->except('code', 'ms_questions_group_uuid', 'ms_questions_group_synced', 'type', 'code_type', 'code_name', 'setup_notes', 'error_notes')->all();\n\n $response = $this->put('/program-types/' . $this->programType->uuid, $programType);\n\n $response->assertSuccessful()->assertExactJson([\n 'success' => 'The program type was updated successfully.',\n ]);\n\n $this->assertDatabaseHas('program_types', [\n 'program_type_allocation' => $programType['program_type_allocation'],\n 'in_house_cpl' => $programType['in_house_cpl'],\n 'in_house_date_shift_days' => $programType['in_house_date_shift_days'],\n 'pacing' => $programType['pacing'],\n 'questions_with_allocations' => json_encode($programType['questions_with_allocations']),\n 'program_type_date_range_start' => $programType['program_type_date_range_start'],\n 'program_type_date_range_end' => $programType['program_type_date_range_end'],\n ]);\n }", "title": "" }, { "docid": "18f6dad3bd27573585f0383d77c8c6da", "score": "0.60450155", "text": "public function testCommunicationEditSuccess()\r\n {\r\n $this->session->visit('http://localhost:8000/app_test.php/communication/2/edit');\r\n\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n //edit all the fields\r\n $page->find(\"css\",\"#appbundle_communication_type\")->selectOption('Email');\r\n $page->find(\"css\",\"#appbundle_communication_medium_1\")->click();\r\n $page->find(\"css\",\"#appbundle_communication_contactName\")->setValue(\"Adam\");\r\n $page->find(\"css\",\"#appbundle_communication_contactEmail\")->setValue('[email protected]');\r\n $page->find(\"css\",\"#appbundle_communication_contactPhone\")->setValue(\"222-222-2222\");\r\n $page->find(\"css\",\"#appbundle_communication_property\")->selectOption('123 Fake St');\r\n $page->find(\"css\",\"#appbundle_communication_category\")->selectOption(\"Misc\");\r\n $page->find(\"css\",\"#appbundle_communication_description\")->setValue(\"Some goof put a dune buggy in the recycling bin!\");\r\n\r\n //submit the form\r\n $page->find(\"css\",\"#btnSave\")->click();\r\n\r\n //check that we're on the view communication page\r\n $this->assertContains('View Communication',$page->find(\"css\",\"h2\")->getHtml());\r\n\r\n\r\n //Check that all the fields have changed\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Email\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Outgoing\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Adam\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"[email protected]\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"222-222-2222\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"123 Fake St\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Misc\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Some goof put a dune buggy in the recycling bin!\")));\r\n\r\n\r\n }", "title": "" }, { "docid": "3920e944d795372f7cf42d724894cf11", "score": "0.60330033", "text": "public function test_should_add_partner_in_edit_partner_modal()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n $partnerCount = $this->programType->partners->count() + 1;\n\n $this->browse(function (Browser $browser) use ($partnerCount) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-partners-button')\n ->click('@edit-partners-button')\n ->whenAvailable('@partner-edit-modal', function ($modal) use ($partnerCount) {\n $modal->waitFor('@add-partner-select')\n ->select('@add-partner-select')\n ->waitFor('@account-partners')\n ->waitFor('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(1) > input')\n ->type('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(1) > input', '22')\n ->type('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(2) > input', '12')\n ->waitFor('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(3) > select')\n ->select('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(3) > select')\n ->type('.partners:nth-child(' . $partnerCount . ') .row.mb-2 div:nth-child(4) input', '2')\n ->press('@partner-edit-submit');\n })\n ->waitFor('.toast-success')\n ->assertSee('The partner was updated successfully.');\n });\n }", "title": "" }, { "docid": "a76d2446b7f1dbea1bb6394712a55ca0", "score": "0.6013781", "text": "public function test_should_give_warning_on_update_partner_with_same_data()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-partners-button')\n ->click('@edit-partners-button')\n ->whenAvailable('@partner-edit-modal', function ($modal) {\n $modal->press('@partner-edit-submit');\n })\n ->waitFor('.toast-warning')\n ->assertSee('Nothing changed in partner.');\n });\n }", "title": "" }, { "docid": "9651886188ca2eed012e36684fb8ef7f", "score": "0.6009073", "text": "public function test_should_add_program_type_to_group()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid)\n ->waitFor('@program-type-add-button')\n ->click('@program-type-add-button')\n ->whenAvailable('@program-type-add-modal', function ($modal) {\n $modal->waitFor('@program-type-add-in_house_email')\n ->check('@program-type-add-in_house_email')\n ->pause(5000)\n ->select('@program-type-add-question-group')\n ->click('@program-type-add-submit');\n })\n ->waitFor('@group-setup-card')\n ->assertRouteIs('groups.show', $this->group->uuid . '/setup');\n });\n }", "title": "" }, { "docid": "db49ae9aeed756284abd9e75ac7f227b", "score": "0.6003462", "text": "public function testSetTypeEditBl() {\n\n $obj = new Clients();\n\n $obj->setTypeEditBl(\"typeEditBl\");\n $this->assertEquals(\"typeEditBl\", $obj->getTypeEditBl());\n }", "title": "" }, { "docid": "c50e6f9ed7b0bd9e94ecf0e243955a1b", "score": "0.5996737", "text": "public function testGetEdit()\n\t{\n\t\t$user = TestHelper::createUser(UserStatus::ACTIVE)->user;\n\n\t\t$this->be($user);\n\t\t$this->call('GET', \"user/edit/{$user->hash}\");\n\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('modal');\n\t\t$this->assertViewHas('fieldEdit');\n\t}", "title": "" }, { "docid": "0954cec9fa5a7305c3651c7f30c2685c", "score": "0.5987505", "text": "public function editWorkOrder(FunctionalTester $I)\n {\n $I->am(WorkOrdersPage::$mainActor);\n $I->wantTo('editar informacion de una orden de trabajo');\n \n // creo la orden de trabajo de prueba\n WorkOrdersPage::createWorkOrder($I);\n \n $I->amOnPage(WorkOrdersPage::$URL);\n \n // veo el registro en la tabla\n $I->see('1', 'tbody tr:first-child td a');\n $I->see(WorkOrdersPage::$createFormData['authorized_by'], 'tbody tr:first-child td');\n \n $I->click('1', WorkOrdersPage::$workOrderDetailsLink);\n \n $I->amOnPage(WorkOrdersPage::route('/1'));\n \n $I->see(WorkOrdersPage::$showTitle, WorkOrdersPage::$showTitleTag);\n \n $I->click(WorkOrdersPage::$editFormAccessBtn['txt'], WorkOrdersPage::$editFormAccessBtn['class']);\n \n $I->seeCurrentUrlEquals(WorkOrdersPage::route('/1/edit'));\n $I->see(WorkOrdersPage::$editPageTitle, WorkOrdersPage::$editPageTitleTag);\n \n $I->seeInFormFields(WorkOrdersPage::$editFormName, [\n 'authorized_by' => WorkOrdersPage::$createFormData['authorized_by'],\n 'vehicle_responsable' => WorkOrdersPage::$createFormData['vehicle_responsable'],\n 'vehicle_id' => WorkOrdersPage::$createFormData['vehicle_id'],\n 'destination' => WorkOrdersPage::$createFormData['destination'],\n 'work_description' => WorkOrdersPage::$createFormData['work_description'],\n 'internal_accompanists[]' => WorkOrdersPage::$createFormData['internal_accompanists'],\n 'external_accompanists[]' => WorkOrdersPage::$createFormData['external_accompanists']\n ]);\n \n $I->submitForm(WorkOrdersPage::$editFormName, WorkOrdersPage::$editFormData, WorkOrdersPage::$editFormButtonCaption);\n \n $I->seeCurrentUrlEquals(WorkOrdersPage::route('/1'));\n $I->see(WorkOrdersPage::$editFormSuccessMsg['txt'], WorkOrdersPage::$editFormSuccessMsg['class']);\n \n // compruebo los datos actualizados en la vista de sólo lectura (show)\n WorkOrdersPage::checkDataOnShowRoute(WorkOrdersPage::$editFormData, $I);\n \n // compruebo lo que no debe estar...\n $I->dontSee(WorkOrdersPage::$createFormData['external_accompanists'][0], WorkOrdersPage::$externalsAccompanistsLocation);\n $I->dontSee(WorkOrdersPage::$createFormData['external_accompanists'][1], WorkOrdersPage::$externalsAccompanistsLocation);\n }", "title": "" }, { "docid": "d1b3687a806abdf108526dec328a32b8", "score": "0.5980226", "text": "public function testEditBill()\n\t{\n\t\t$this->visit('')\n\t\t\t->click('Edit')\n\t\t\t->see('Edit:');\n\t}", "title": "" }, { "docid": "d6fddc29258e3292fc7e4c1c22457f7e", "score": "0.5953435", "text": "public function testEditSave()\n {\n $this->loadDataFixtures();\n $title = 'edited';\n\n // edit command\n $crawler = $this->callFormUrlValues(\n 'GET',\n '/command-scheduler/detail/rights/edit/1',\n array(\n 'user_host[title]' => $title\n )\n );\n\n // assert the command was changed\n $this->assertEquals($title, trim($crawler->filter('td')->eq(0)->text()));\n }", "title": "" }, { "docid": "af398c107ee61506adff0f48d9792cd4", "score": "0.5916428", "text": "function update_test_code($type='')\r\r\n\t{\r\r\n\t\tglobal $sql,$ns, $pref;\r\r\n\t\t$just_check = $type == 'do' ? FALSE : TRUE;\t\t// TRUE if we're just seeing whether an update is needed\r\r\n\t\t//--------------**************---------------\r\r\n\t\t// Add your test code in here\r\r\n\t\t//--------------**************---------------\r\r\n\r\r\n\t\t//--------------**************---------------\r\r\n\t\t// End of test code\r\r\n\t\t//--------------**************---------------\r\r\n\t\treturn $just_check;\r\r\n\t}", "title": "" }, { "docid": "ee2428863a9911667c921226c0c53449", "score": "0.5876384", "text": "public function testTaskEditMode()\n {\n $this->open('');\n \n // Display edit input\n $this->assertNotVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n $this->doubleClick(self::LOCATOR_TASK_LABEL.\"[1]\");\n $this->assertVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n \n // Edit the task & press enter\n $this->type(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", 'edited');\n $this->keyPressAndWait(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", self::KEY_ENTER);\n $this->assertNotVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n $this->assertText(self::LOCATOR_TASK_LABEL.\"[1]\", 'edited');\n \n // Edit task & fire blur event\n $this->doubleClick(self::LOCATOR_TASK_LABEL.\"[1]\");\n $this->assertVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n $this->type(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", 're-edited');\n $this->fireEventAndWait(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", \"blur\");\n $this->assertNotVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n $this->assertText(self::LOCATOR_TASK_LABEL.\"[1]\", 're-edited');\n }", "title": "" }, { "docid": "cc81b97db2a9ef4d8d1d7b9b523229e9", "score": "0.5861354", "text": "public function testEditGet(){\n $this->get('/project/edit/2')\n ->assertRedirect('/login');\n\n $this->actingAs($this->user)\n ->get(\"/project/edit/\".$this->project->ext_id)\n ->assertSuccessful()\n ->assertViewIs('layouts.project.edit')\n ->assertSee($this->project->name);\n }", "title": "" }, { "docid": "5d475e28599ed2f057d144260dabaa13", "score": "0.58607394", "text": "public function test_to_see_if_user_can_see_the_edit_form()\n {\n\n $response = $this->get('/customer/1/edit');\n\n $response->assertSeeText('Edit');\n $response->assertSeeText('First Name');\n }", "title": "" }, { "docid": "cf5173e9445264fc46bb8a63933c5bd3", "score": "0.58163387", "text": "public function test_should_update_partner()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-partners-button')\n ->click('@edit-partners-button')\n ->whenAvailable('@partner-edit-modal', function ($modal) {\n $modal->type('@partner-edit-allocation', mt_rand(1, 1000))\n ->type('@partner-edit-cpl', mt_rand(1, 100))\n ->press('@partner-edit-submit');\n })\n ->waitFor('.toast-success')\n ->assertSee('The partner was updated successfully.');\n });\n }", "title": "" }, { "docid": "16461edea0e8ac915254f232e512cc12", "score": "0.58130276", "text": "public function test_should_check_program_type_view_with_out_tasked()\n {\n $this->programType->update(['code' => 'out_tasked_email']);\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@program-type-view')\n ->assertPresent('@group-view-back-button')\n ->assertSeeIn('@program-type-card', $this->programType->getCodeNameAttribute())\n ->assertSeeIn('@program-type-allocation', $this->programType->program_type_allocation)\n ->assertSeeIn('@program-type-date-range-start', parseDate($this->programType->program_type_date_range_start, 'm/d/Y'))\n ->assertSeeIn('@program-type-date-range-end', parseDate($this->programType->program_type_date_range_end, 'm/d/Y'))\n ->assertPresent('@partner-heading')\n ->assertPresent('@edit-info-button')\n ->assertPresent('@edit-partners-button')\n ->assertPresent('@delete-info-and-sectors')\n ->assertPresent('@sector-dashboard');\n foreach ($this->programType->partners as $partner) {\n $browser->assertSeeIn('@partner-name' . $partner->id, $partner->ms_accounts_account_synced['info']['name'])\n ->assertSeeIn('@partner-allocation' . $partner->id, $partner->partner_allocation)\n ->assertSeeIn('@partner-delivery-day' . $partner->id, $partner->partner_delivery_day)\n ->assertSeeIn('@partner-date-shift-days' . $partner->id, $partner->partner_date_shift_days . ' days')\n ->assertSeeIn('@partner-cpl' . $partner->id, '$' . $partner->partner_cpl);\n }\n });\n }", "title": "" }, { "docid": "2a104c30c51e0ad53f4334d1fa006b59", "score": "0.57951325", "text": "public function edit(CompanyProgram $companyProgram)\n {\n //\n }", "title": "" }, { "docid": "d5b153471ba209cc82f73c4a3a56c870", "score": "0.5772632", "text": "public function testRoomEditing()\r\n\t{\r\n\t\tself::$helper->createRoom('name1', 1, 2, \"type1\", \" - Keine Zuordnung - \");\r\n\t\tself::$helper->createRoom('name2', 1, 2, \"type2\", \" - Keine Zuordnung - \");\r\n\r\n\t\t// edit room1: change name to name2 -> fail\r\n\t\tself::$helper->editRoom('name1', 'name2', 1, 2, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::className(\"ilFailureMessage\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#1 Editing of a room name to existing name has succeeded\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room1: change name to empty string -> fail\r\n\t\tself::$helper->editRoom('name1', '', 1, 2, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::className(\"ilFailureMessage\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#2 Editing of a room name to empty string has succeeded\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room1: change seats to empty string -> fail\r\n\t\tself::$helper->editRoom('name1', 'name1', 1, '', \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::className(\"ilFailureMessage\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#3 Editing of room seats to empty string has succeeded\" . $ex);\r\n\t\t}\r\n\t\t// edit room1: change seats to less than min seats -> fail\r\n\t\tself::$helper->editRoom('name1', 'name1', 2, 1, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::className(\"ilFailureMessage\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#4 Editing of room seats to less than min seats has succeeded\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room1: change seats to negative seats -> fail\r\n\t\tself::$helper->editRoom('name1', 'name1', 1, -1, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::className(\"ilFailureMessage\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#5 Editing of room seats negative seats has succeeded\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room1: change name to name3 -> success\r\n\t\tself::$helper->editRoom('name1', 'name3', 1, 2, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name3\"));\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name2\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#6 Editing of room name has failed\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room2: change name to name1 -> success\r\n\t\tself::$helper->editRoom('name2', 'name1', 1, 2, \"type2\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name3\"));\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name1\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#7 Editing of room name has failed\" . $ex);\r\n\t\t}\r\n\r\n\t\t// edit room1: change name to name2 -> success\r\n\t\tself::$helper->editRoom('name3', 'name2', 1, 2, \"type1\", \" - Keine Zuordnung - \");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name2\"));\r\n\t\t\tself::$webDriver->findElement(WebDriverBy::linkText(\"name1\"));\r\n\t\t}\r\n\t\tcatch (Exception $ex)\r\n\t\t{\r\n\t\t\t$this->fail(\"#8 Editing of room name has failed\" . $ex);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "93e49e0e513368b08e0f9b0d0a36e2cb", "score": "0.57691205", "text": "public function testCanEditModule()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user->id)\n ->visit('/modules')\n ->assertPathIs('/modules')\n ->click('@edit')\n ->pause('1000')\n ->type('name', Carbon::now()->timestamp)\n ->type('credits', rand(0, 10))\n ->select('term')\n ->select('test_type')\n ->select('coordinator')\n ->select('teachers[]')\n ->select('teachers[]')\n ->select('teachers[]')\n ->select('tags[]')\n ->select('tags[]')\n ->select('tags[]')\n ->click('button[type=\"submit\"]')\n ->pause('1000')\n ->assertPathIs('/modules');\n });\n }", "title": "" }, { "docid": "8b6ea965578f6dd8a9f280948b9ee273", "score": "0.57544875", "text": "public function editTest()\n {\n \t$this->assertTrue(true);\n \t$tipo = \"estrategias\";\n \t$data = [\n \t\t\t\t\"id\"=>1, \n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"orden\"=>1, \n\t\t\t\t\t\"semestre\"=>env('SEMESTRE'), \n//\t\t\t\t\t\"tipo\"=>$tipo,\n \t\t\t\t\"texto\"=>\"Lorem Ipsum\"\n\t\t\t\t];\n\t\t$estrategia = Estrategia::create($data);\n\t\t$this->assertDatabaseHas($tipo, [ \n\t\t\t\t\t\"id\"=>1,\n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"orden\"=>1, \n\t\t\t\t\t\"semestre\"=>env('SEMESTRE'),\n \t\t\t\t\"texto\"=>\"Lorem Ipsum\"\n\t\t\t\t]);\n\n\t\t$request = [\n\t\t\t\"new\"=> false,\n\t\t\t\"data\"=> [\n\t\t\t\t\"id\"=> \"1\",\n\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\"orden\"=>1, \n\t\t\t\t\"semestre\"=>env('SEMESTRE'), \n\t\t\t\t\"tipo\"=>\"estrategias\",\n\t\t\t\t\"data\"=>[\n\t\t\t\t\t\t[\"texto\"=>\"Nuevo texto\"],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\n\t\t$res = $this->json('POST', 'api/saveData', $request);\n\n $this->post('api/saveData', $request);\n\t\t$this->assertDatabaseHas('estrategias',[ \n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"orden\"=>1, \n\t\t\t\t\t\"semestre\"=>env('SEMESTRE'),\n \t\t\t\t\"texto\"=>\"Nuevo texto\"\n\t\t\t\t]);\n }", "title": "" }, { "docid": "7c51c061580b825ca47b8329186ad964", "score": "0.57365835", "text": "public function test_should_show_errors_for_empty_inputs_when_updating_partner()\n {\n $this->programType->update(['code' => 'out_tasked_teledemand']);\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid)\n ->waitFor('@edit-partners-button')\n ->press('@edit-partners-button')\n ->whenAvailable('@partner-edit-modal', function ($modal) {\n $modal->waitFor('@add-partner-select')\n ->select('@add-partner-select')\n ->type('@partner-edit-allocation', ' ')\n ->type('@partner-edit-cpl', ' ')\n ->type('@partner-edit-date-shift', 'a')\n ->press('@partner-edit-submit')\n ->waitFor('.text-danger')\n ->assertSee('The partner allocation field is required and may only contain numeric characters.')\n ->assertSee('The partner cpl field is required and may only contain numeric characters.')\n ->assertSee('The partner date shift days field is required and may only contain numeric characters.');\n });\n });\n }", "title": "" }, { "docid": "4d6aa90c86cbb9f9d519ad9ed3a2e9d4", "score": "0.57259136", "text": "public function edit(Program $program)\n {\n //\n }", "title": "" }, { "docid": "4d6aa90c86cbb9f9d519ad9ed3a2e9d4", "score": "0.57259136", "text": "public function edit(Program $program)\n {\n //\n }", "title": "" }, { "docid": "a56a297281088031ee03a1367ffb5239", "score": "0.57112664", "text": "public function testEditPrvogGlumca()\n {\n $this->browse(function (Browser $browser) {\n $selector='body > div > form > div:nth-child(3) > input[type=text]:nth-child(7)';\n $browser->visit('/actors') // odi na stranicu\n ->assertPresent('#actor-1-edit') // pogledaj da postoji ID actor-1-edit\n ->click('#actor-1-edit') // klikni na taj link\n ->assertPathIs('/actors/1/edit') // uvjeri se da su otisao na tu stranicu\n ->assertSee(\"Uredi glumice/glumca\") // uvjeri se da text postoji na toj stranici\n ->screenshot('edit-glumci'); // opali screen capture\n //TODO ne radi provjera pol;ja ->assertAttribute('first_name', 'value', 'Penelope');\n //->$browser->clickLink($linkText);\n });\n }", "title": "" }, { "docid": "4d4be285565feb59e4bfffc16393f73e", "score": "0.57027316", "text": "public function testCommunicationEditBrowse()\r\n {\r\n // Navigate to the home page\r\n $this->session->visit('http://localhost:8000/app_test.php/');\r\n\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n\r\n //browse to the property search page\r\n $page->find('css',\"#propertiesPage\")->click();\r\n\r\n //$this->session->wait(3000);\r\n\r\n //get the searchbox\r\n $searchbox = $page->find('css','#searchBox');\r\n //Type into the searchbox\r\n $searchbox->setValue(\"123 Fake Street\");\r\n $searchbox->keyPress('s');\r\n\r\n $this->session->wait(3000);\r\n\r\n //click the first row\r\n $page->find(\"css\",\".ui.table tbody tr:first-child\")->click();\r\n\r\n //click on the first communication\r\n $communicationRow = $page->find('css','.communications.ui.table tbody tr:first-child');\r\n\r\n $communicationRow->click();\r\n\r\n //click the edit button\r\n $page->find('named',array('content','Edit'))->click();\r\n\r\n //check that the header contains edit communication\r\n $this->assertContains('Edit Communication', $page->find('css','h2')->getHtml());\r\n\r\n //the communication has the same contact email in the field (just a field to check that they're the same one)\r\n $this->assertContains('[email protected]', $page->find('css','#appbundle_communication_contactEmail')->getValue());\r\n }", "title": "" }, { "docid": "28ad646b5e76b3f13e0bcf166f31be62", "score": "0.56967485", "text": "public function testVerifyValidateEdit()\n {\n $data = [\n 'id' => 1,\n 'adId' => 1,\n 'personalId' => 1,\n 'days' => 3,\n 'hours' => 10,\n 'value' => 39.5\n ];\n $form = new $this->classTested('edit');\n $form->setData($data);\n\n $this->assertTrue($form->isValid(), 'Form Package nao validou corretamente');\n $this->assertEquals($data, $form->getData(), 'Form nao retornou os dados corretamente');\n }", "title": "" }, { "docid": "5e91b53d5e583b4d1540f2a1d82540d3", "score": "0.5692876", "text": "public function testSeqWithEditAndAddSpecified()\n {\n // all others should use Edit setting\n $sequence = new Application_Model_TableViewSequence(self::ADD_AND_EDIT);\n\n $setting = $sequence->getSetTableForAdding();\n $this->assertSame($this->_add, $setting->getSettingName());\n $this->assertEquals($setting, $sequence->getReferenceSetTable());\n\n $setting = $sequence->getSetTableForModifying();\n $this->assertSame($this->_edit, $setting->getSettingName());\n\n $this->assertEquals($setting, $sequence->getSetTableForViewing());\n $this->assertEquals($setting, $sequence->getSetTableForSearching());\n $this->assertEquals($setting, $sequence->getSetTableForSearchResults());\n }", "title": "" }, { "docid": "362e7a99e56d3a1f0df076206e965b0d", "score": "0.56811804", "text": "public function testTaskEditByUserNoOwner()\n {\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => 'customer1',\n 'PHP_AUTH_PW' => 'pass',\n ]);\n $crawler = $client->request('GET', '/tasks/3/edit');\n $form = $crawler->filter('button[type=\"submit\"]')->form();\n $form['task[title]'] = 'custom';\n $form['task[content]'] = 'test custom';\n $client->submit($form);\n $crawler = $client->followRedirect();\n\n static::assertEquals(1, $crawler->filter('html:contains(\"La tâche ne vous appartient pas\")')->count());\n }", "title": "" }, { "docid": "e9003fe65c5e25765297a29cb815f5eb", "score": "0.56661505", "text": "public function testTaskEditByAdmin()\n {\n $client = $this->useAdmin();\n $crawler = $client->request('GET', '/tasks/1/edit');\n $form = $crawler->filter('button[type=\"submit\"]')->form();\n $form['task[title]'] = 'test';\n $form['task[content]'] = 'test admin';\n $client->submit($form);\n $crawler = $client->followRedirect();\n static::assertEquals(1, $crawler->filter(\n 'html:contains(\"modifiée\")')->count());\n }", "title": "" }, { "docid": "bd768c87de5228296806a94bc9587b19", "score": "0.5663931", "text": "public function testWalletEditForm()\n {\n $this->createUser();\n\n // Get ID of the first possible wallet and try to access the view form.\n $userid = auth()->user()->id;\n $wallet = Wallet::where('user_id', $userid)->first();\n\n $response = $this->get('/wallet/'.$wallet->id);\n $response->assertStatus(Response::HTTP_OK);\n $response->assertSessionHasNoErrors();\n\n // Navigate to wallet edit form.\n $view = $this->view('pages.wallet_edit', [\n 'wallet' => $wallet,\n 'name' => $wallet->name,\n 'id' => $wallet->id\n ]);\n $view->assertSee(__('My Wallets'));\n $view->assertSee(__('Transactions'));\n $view->assertSee(__('Log out'));\n $view->assertSee(__('Name').':');\n $view->assertSee(__('My first Virtual Wallet'));\n $view->assertSee(__('Save'));\n $view->assertSee(__('Delete'));\n $view->assertSee(__('Cancel'));\n }", "title": "" }, { "docid": "95360cd81687fab010a491918f19b61e", "score": "0.56638765", "text": "public function testEditSuccessful()\n {\n $this->addFactoryProduct();\n $this->assertEditProduct(200);\n }", "title": "" }, { "docid": "b6e55acf343e800365658a1168ae8432", "score": "0.5662584", "text": "public function testEdit()\n {\n /** @var Manufacturer $manufacturer */\n $manufacturer = Manufacturer::factory()->create();\n\n $response = $this->actingAs($this->user)->get(\n route('web.user.starcitizen.manufacturers.edit', $manufacturer->getRouteKey())\n );\n $response->assertStatus(static::RESPONSE_STATUSES['edit']);\n\n if ($response->status() === Response::HTTP_OK) {\n $response->assertViewIs('user.starcitizen.manufacturers.edit')\n //->assertDontSee(__('Keine Hersteller vorhanden'))\n ->assertSee(__('de_DE'))\n ->assertSee(__('en_EN'))\n ->assertSee($manufacturer->name)\n ->assertSee($manufacturer->name_short);\n }\n }", "title": "" }, { "docid": "3f59219cb4db9b82c9e455ec6656437f", "score": "0.565856", "text": "public function testEdit()\n {\n $status = TaskStatus::factory()->create();\n\n $response = $this->actingAs($this->user)\n ->get(route('task_statuses.edit', ['task_status' => $status]));\n $response->assertOk();\n }", "title": "" }, { "docid": "6edec6679819656f9c58066b85938667", "score": "0.5655917", "text": "public function testAllowAdminEditPE()\n {\n if ($this->getTestConfig()->getShopEdition() === 'EE') {\n $this->markTestSkipped('This test is for Community and Professional editions only.');\n }\n\n $oAdminView = oxNew('oxadminview');\n $this->assertTrue($oAdminView->UNITallowAdminEdit('xxx'));\n }", "title": "" }, { "docid": "8419ea4c74074cc907bc09a256c11896", "score": "0.56548554", "text": "public function test_edit_form() {\n $this->resetAfterTest();\n $instance = $this->enable_plugin();\n\n $formdata = ['name' => 'New name', 'clientid' => 'CLIENT', 'secret' => 'SECRET'];\n portfolio_admin_form::mock_submit($formdata);\n\n $form = new portfolio_admin_form('', array('plugin' => $this->pluginname,\n 'instance' => $instance, 'portfolio' => $instance->get('id'),\n 'action' => 'edit', 'visible' => $instance->get('visible')));\n $this->assertTrue($form->is_validated());\n $this->assertTrue($form->is_submitted());\n $data = $form->get_data();\n $this->assertEquals('edit', $data->action);\n $this->assertEquals($instance->get('visible'), $data->visible);\n $this->assertEquals($this->pluginname, $data->plugin);\n foreach ($formdata as $key => $value) {\n $this->assertEquals($value, $data->$key);\n }\n }", "title": "" }, { "docid": "cf5172d9e52c9784a3bd8ee5e426a5d2", "score": "0.5654342", "text": "public function testEditRequirement()\n {\n // $user = factory(App\\User::class)->create();\n $this->actingAs(self::$user)\n ->visit('/requirements')\n ->seePageIs('/requirements')\n ->see('newRequirement')\n ->click('newRequirement')\n ->type('requirementDescriptionEdited', 'description')\n ->press('submit');\n\n $this->seeInDatabase('TestRequirementHistory', [\n 'Name' => 'newRequirement',\n 'RequirementDescription' => 'requirementDescriptionEdited'\n ]);\n\n }", "title": "" }, { "docid": "f2bcd07e80bd1d56a69eccc319c0db7a", "score": "0.5644074", "text": "public function testCommunicationEditFailure()\r\n {\r\n $this->session->visit('http://localhost:8000/app_test.php/communication/2/edit');\r\n\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n // Disable browser validation\r\n $this->session->executeScript('javascript:for(var f=document.forms,i=f.length;i--;)f[i].setAttribute(\"novalidate\",i)');\r\n\r\n // make things super invalid\r\n $page->find(\"css\",\"#appbundle_communication_type\")->selectOption('...');\r\n $page->find(\"css\",\"#appbundle_communication_contactName\")->setValue(str_repeat(\"8\", 300));\r\n $page->find(\"css\",\"#appbundle_communication_contactEmail\")->setValue('Adam.cosmo@com');\r\n $page->find(\"css\",\"#appbundle_communication_contactPhone\")->setValue(\"2322-222 2222\");\r\n $page->find(\"css\",\"#appbundle_communication_category\")->selectOption(\"...\");\r\n $page->find(\"css\",\"#appbundle_communication_description\")->setValue(\"\");\r\n\r\n //submit the form\r\n $page->find(\"css\",\"#btnSave\")->click();\r\n\r\n //Check that a bunch of errors showed up\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Please select a type of communication\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Email must be in the format of '[email protected]'\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Contact name must be less than 255 characters\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Phone number must be in the format of ###-###-####\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Please select a category\")));\r\n $this->assertNotNull($page->find(\"named\",array(\"content\",\"Please provide a brief description of the communication\")));\r\n }", "title": "" }, { "docid": "215e9fafbfae8b90d5bbd19712c952c3", "score": "0.5641769", "text": "public function test_should_update_program_type_with_no_changes()\n {\n $programType = collect($this->programType)->only(['program_type_allocation', 'in_house_cpl', 'in_house_date_shift_days',\n 'in_house_delivery_day', 'pacing', 'pacing_through_days', 'questions_with_allocations', 'program_type_date_range_start', 'program_type_date_range_end', ])->all();\n\n $response = $this->put('/program-types/' . $this->programType->uuid, $programType);\n\n $response->assertSuccessful()->assertExactJson([\n 'info' => 'Nothing changed in program type.',\n ]);\n\n $this->assertDatabaseHas('program_types', [\n 'program_type_allocation' => $programType['program_type_allocation'],\n 'in_house_cpl' => $programType['in_house_cpl'],\n 'in_house_date_shift_days' => $programType['in_house_date_shift_days'],\n 'pacing' => $programType['pacing'],\n 'questions_with_allocations' => json_encode($programType['questions_with_allocations']),\n 'program_type_date_range_start' => $programType['program_type_date_range_start'],\n 'program_type_date_range_end' => $programType['program_type_date_range_end'],\n ]);\n }", "title": "" }, { "docid": "56317f9d4b95f74e2d7856b12f18223e", "score": "0.5641049", "text": "public function testEditaProyecto($gn_proyecto)\n\t{\n\t\t$arrDatos = array('nombre' => 'Proyecto editado '.date('h:i:s A'));\n\t\t$edicion = $gn_proyecto->editarProyecto($arrDatos, array('id'=>3));\n\t\t$this->assertNotFalse($edicion);\n\t}", "title": "" }, { "docid": "7bd96bd236ebfa188959b47ba9a8483c", "score": "0.56409", "text": "public function test_should_show_errors_for_empty_program_type_when_add_program_type_to_group()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/groups/' . $this->group->uuid)\n ->waitFor('@program-type-add-button')\n ->click('@program-type-add-button')\n ->whenAvailable('@program-type-add-modal', function ($modal) {\n $modal->press('@program-type-add-submit')\n ->waitFor('.invalid-feedback')\n ->assertSee('The selected program types must have at least 1 items.');\n });\n });\n }", "title": "" }, { "docid": "ba4a1ae3a763d1f505e3f3ceb690129e", "score": "0.56367636", "text": "public function testEditCard()\n {\n Auth::loginUsingId(1);\n $editLink = 'cards/edit/'.\\Crypt::encrypt(2);\n $this->visit($editLink)\n ->type('Test de description', '6')\n ->press('Enregistrer')\n ->seePageIs('searchHome')\n ->visit('cards/view/'.\\Crypt::encrypt(2))\n ->see('Test de description');\n }", "title": "" }, { "docid": "fa3f466b62aa1dea62af0e9a9a918639", "score": "0.5625826", "text": "public function test_createEditView() {\n\n }", "title": "" }, { "docid": "01ace4c3da4f8fa3b8bcded7e4622ac8", "score": "0.56014425", "text": "public function testEdit()\n {\n $client = static::createClient();\n $crawler = $client->request(\"GET\", \"/edit/\".$this->getLastInsertedId());\n \n if (!$client->getResponse()->isNotFound()) {\n $form = $crawler->selectButton(\"save_contact\")->form();\n $form->setValues($this->getContactTestExample());\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirection());\n }\n }", "title": "" }, { "docid": "014b8023db49d47be1d3fca96c9f4dd0", "score": "0.5596747", "text": "public function testEdit()\n {\n $this->visit('/admin/candidate/1/edit')\n ->submitForm($this->saveButtonText, $this->candidate)\n ->seePageIs('/admin/candidate')\n ;\n\n $this->seeInDatabase('candidates', $this->candidate);\n }", "title": "" }, { "docid": "51870862735b5f2759710657c55c3cfc", "score": "0.55859715", "text": "function testProcessEditSuccess() {\r\n $parameter = \"/testEdit\";\r\n $this->request->setAttribute(\"path\", $parameter);\r\n $this->assertTrue($this->actionController->process($this->request) == \"test_edit.tpl.html\");\r\n }", "title": "" }, { "docid": "d7c5e49a10123d373f990f56c4ccd0ca", "score": "0.558016", "text": "public function testAccessionEdit()\n {\n // Test user login\n //$user = ['email' => '[email protected]', 'password' => 'Password!32'];\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new accessionManagementPage())\n ->assertPathIs('/accessions')\n ->type('@search', 'MainTest_1000')\n ->assertSee('****FORCED FAIL****')\n ->click('@searchtopresult')\n ->assertSee('Associate Accessions')\n ->assertPathIs('/accessions/354')\n ->press('@actions-button')\n ->press('@actions-edit-menu')\n ->assertSee('Edit Accession - MainTest_1000')\n\n ->assertSee('****FORCED FAIL****');\n });\n }", "title": "" }, { "docid": "4ae761e56b5d551f9e620a8d01dd39e7", "score": "0.55798376", "text": "public function testEdit()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien Fournisseur de test\n\t\t$crawler = $client->request('GET', '/suppliers');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Fournisseur de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('h1:contains(\"Fournisseur de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--edit')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Modifier\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Enregistrer')->form();\n\t\t$form['flyd_dashboardbundle_supplier[job]'] \t= 'Job de test modifié ' . rand(1,4);\n\t\t$crawler = $client->submit($form);\t\n\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Supplier bien enregistré.\")')->count());\n\n\t}", "title": "" }, { "docid": "bb1885fb9340be7301853b5b1d9322d6", "score": "0.55495954", "text": "public function testEditAction(): void\n {\n $this->loginUser();\n\n $crawler = $this->client->request('GET', '/tasks/1/edit');\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n\n $form = $crawler->selectButton('Update')->form();\n $form['task[title]'] = 'letitredematache';\n $form['task[content]'] = 'lecontenuedematache';\n $this->client->submit($form);\n\n if ($this->client->getResponse()->isRedirection()) {\n $crawler = $this->client->followRedirect();\n }\n\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertEquals(1, $crawler->filter('div.alert-success')->count());\n }", "title": "" }, { "docid": "0bb9d48c508fcc49a9c7ababe1117e12", "score": "0.5549592", "text": "public function testEditInactiveSettings()\n {\n $this->resetDB();\n $this->adminLogin();\n factory(App\\Admin\\AdminSettings::class)->create();\n $this->visit('admin/settings/1/edit')\n ->see('Edit active quote function')\n ->see('Back to index')\n ->type('10', 'quantity_default')\n ->type(100, 'bom_line_default')\n ->type('1.75', 'bom_line_charge_per')\n ->type(150, 'smt_default')\n ->type('.25', 'smt_charge_per')\n ->type(10, 'tht_default')\n ->type(0, 'tht_charge_per')\n ->type(3, 'bga_default')\n ->type('1.50', 'bga_charge_per')\n ->type(2, 'sides_default')\n ->type(75, 'sides_charge_per')\n ->type(1, 'flat_fee_default')\n ->type(200, 'flat_fee_charge_per')\n ->type('1.25', 'function_x')\n ->type('0.05', 'function_b')\n ->type(2, '2_layer_sq_inch_price')\n ->type(600, '2_layer_base_price')\n ->type(3, '4_layer_sq_inch_price')\n ->type(700, '4_layer_base_price')\n ->type(4, '6_layer_sq_inch_price')\n ->type(900, '6_layer_base_price')\n ->type(5, '8_layer_sq_inch_price')\n ->type(1000, '8_layer_base_price')\n ->type(100, 'assembled_turn_day_1')\n ->type(90, 'assembled_turn_day_2')\n ->type(85, 'assembled_turn_day_3')\n ->type(80, 'assembled_turn_day_4')\n ->type(75, 'assembled_turn_day_5')\n ->type(100, 'unassembled_turn_day_1')\n ->type(90, 'unassembled_turn_day_2')\n ->type(85, 'unassembled_turn_day_3')\n ->type(80, 'unassembled_turn_day_4')\n ->type(75, 'unassembled_turn_day_5')\n ->press('submitQuoteForm')\n ->seePageIs('/admin/settings/3/edit')\n ->see('Edit active quote function')\n ->seeInDatabase('admin_settings', ['bom_line_charge_per' => '1.75'])\n ->seeInDatabase('admin_settings', ['active' => '0'])\n ->seeInDatabase('admin_settings', ['active' => '1'])\n ->visit('/admin/settings/1/edit')\n ->seePageIs('/admin/settings')\n ->see('Cannot edit inactive settings');\n }", "title": "" }, { "docid": "2b3f6d96c69bfb0ea8d5068b8ce236c0", "score": "0.5534372", "text": "public function edit(test $test)\n {\n //\n }", "title": "" }, { "docid": "909c6e3e491e144e6841267a75d0e7d5", "score": "0.55176187", "text": "public function getEdit()\n {\n $id = $this->inputId(\"id\");\n $test_case = TestCase::find($id);\n\n $this->add_raw_enum_dict(\"story_name\", \"story_id\", [$test_case->story]);\n $this->add_enum(\"test_case_type\");\n $story = $test_case->story;\n $project = $story->project;\n\n $this->share('story', $story);\n $this->share('story_comments', $story->comments);\n\n $this->add_raw_enum_dict('team_name', 'team_id', $project->teams, \"id\", \"team_name\");\n\n return parent::getEdit();\n }", "title": "" }, { "docid": "d587962ac698286de5c09b48873cf74b", "score": "0.55160624", "text": "public function testTaskEscapeEditMode()\n {\n $this->open('');\n $this->assertNotVisible(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\");\n $this->doubleClick(self::LOCATOR_TASK_LABEL.\"[1]\");\n $this->type(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", 'edited');\n $this->keyDown(self::LOCATOR_TASK_EDIT_INPUT.\"[1]\", self::KEY_ESCAPE);\n $this->assertVisible(self::LOCATOR_TASK_LABEL.\"[1]\");\n $this->assertText(self::LOCATOR_TASK_LABEL.\"[1]\", 'Rule the web');\n }", "title": "" }, { "docid": "a450e7e4d98a38441907e9acf1a3bedc", "score": "0.5515056", "text": "public function assertEditNodeOfType($type) {\n $node = (object) array('title' => 'Test Title', 'type' => $type);\n $saved = $this->nodeCreate($node);\n\n // Set internal browser on the node edit page.\n $url = $this->getMinkParameter('base_url') . '/node/' . $saved->nid . '/edit';\n $this->visitPath($url);\n $this->minkContext->assertResponseStatus(200);\n }", "title": "" }, { "docid": "62e556c9489d19bcd0295799cd95bb00", "score": "0.55037546", "text": "public function testAdminEditItem()\n {\n $client = static::createClient([], self::SERVER);\n\n $item = $client->getContainer()->get('doctrine')\n ->getRepository(Menu::class)\n ->findOneBy([\n 'url' => self::URL,\n 'locale' => self::LOCALE,\n ])->getId();\n\n $crawler = $client->request('GET', '/en/admin/menu/'.$item.'/edit');\n\n $form = $crawler->selectButton('Save changes')->form([\n 'menu[title]' => self::EDITED_TITLE,\n ]);\n\n $client->submit($form);\n $this->assertSame(Response::HTTP_FOUND, $client->getResponse()->getStatusCode());\n\n $editedItem = $client->getContainer()->get('doctrine')\n ->getRepository(Menu::class)->findOneBy([\n 'id' => $item,\n ]);\n\n $this->assertSame(self::EDITED_TITLE, $editedItem->getTitle());\n }", "title": "" }, { "docid": "4ea90130353945d2140feff5ce7c5922", "score": "0.5497814", "text": "public function testActiveSave()\n {\n \n }", "title": "" }, { "docid": "293b51ff86195df15eeca9a948637d2c", "score": "0.54950064", "text": "public function edit(DataTesting $dataTesting)\n {\n //\n }", "title": "" }, { "docid": "d87e426103151a7ff833ce767095300d", "score": "0.549263", "text": "public function edit(Emp_type $emp_type)\n {\n //\n }", "title": "" }, { "docid": "47b6c21fdcba0f460126b886589401a3", "score": "0.5492313", "text": "public function testCompleteScenario()\n {\n $client = static::createClient();\n\t\t\n TestTools::login($client);\n \n // Create a new entry in the database\n $crawler = $client->request('GET', '/admin/audiodownloadcode/');\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), \"Unexpected HTTP status code for GET /admin/audiodownloadcode/\");\n \n $crawler = $client->click($crawler->selectLink('Create a new entry')->link());\n\n // Fill in the form and submit it\n $form = $crawler->selectButton('Create')->form(array(\n 'ch212app_backendbundle_audiodownloadcodetype[code]' => 'Test',\n ));\n $client->submit($form);\n \n //Becareful if do not redirect. maybe test failed and left \"Test\" code in DB because couldnt delete it\n $crawler = $client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('td:contains(\"Test\")')->count(), 'Missing element td:contains(\"Test\")');\n\n // Edit the entity\n $crawler = $client->click($crawler->selectLink('Edit')->link());\n\n $form = $crawler->selectButton('Edit')->form(array(\n 'ch212app_backendbundle_audiodownloadcodetype[code]' => 'Foo',\n ));\n\n $client->submit($form);\n $crawler = $client->followRedirect();\n\n // Check the element contains an attribute with value equals \"Foo\"\n $this->assertGreaterThan(0, $crawler->filter('[value=\"Foo\"]')->count(), 'Missing element [value=\"Foo\"]');\n\n // Delete the entity\n $client->submit($crawler->selectButton('Delete')->form());\n $crawler = $client->followRedirect();\n\n // Check the entity has been delete on the list\n $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "10687d3ee328a864ad72d21d524c8aa3", "score": "0.5490337", "text": "public function testEdit() {\n $this->drupalGet('admin/commerce/config/product-bundle-types/default/edit');\n\n $bundle_item_type_field = $this->getSession()\n ->getPage()\n ->findField('bundleItemType');\n $this->assertFalse($bundle_item_type_field->hasAttribute('disabled'));\n $edit = [\n 'label' => 'Default!',\n 'description' => 'New description.',\n ];\n $this->submitForm($edit, t('Save'));\n $this->assertSession()\n ->pageTextContains('The product bundle type Default! has been successfully saved.');\n\n $product_bundle_type = ProductBundleType::load('default');\n $this->assertEquals($edit['label'], $product_bundle_type->label());\n $this->assertEquals($edit['description'], $product_bundle_type->getDescription());\n\n // Cannot change the bundle item type once a product bundle has been created.\n $product_bundle = $this->createEntity('commerce_product_bundle', [\n 'type' => 'default',\n 'title' => 'Test product bundle',\n ]);\n $this->drupalGet('admin/commerce/config/product-bundle-types/default/edit');\n $bundle_item_type_field = $this->getSession()\n ->getPage()\n ->findField('bundleItemType');\n $this->assertTrue($bundle_item_type_field->hasAttribute('disabled'));\n }", "title": "" }, { "docid": "2a9b81ee674a24fcbc56e0888870fa3c", "score": "0.54757935", "text": "public function testEditFormThenAddAndEditAgain() {\n $this->addMediaItems([0]);\n\n $this->assertSession()->elementExists('css', '[data-drupal-selector=\"edit-field-reference-override-selection-0\"]')->pressButton('Override media item in context of this test entity');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $modal = $this->getSession()->getPage()->find('css', '.ui-dialog');\n $modal->fillField('field_description[0][value]', 'Override 1');\n $this->getSession()->getPage()->find('css', '.ui-dialog button.form-submit')->click();\n $this->assertSession()->assertWaitOnAjaxRequest();\n\n $this->addMediaItems([1]);\n\n $this->assertSession()->elementExists('css', '[data-drupal-selector=\"edit-field-reference-override-selection-0\"]')->pressButton('Override media item in context of this test entity');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $modal = $this->getSession()->getPage()->find('css', '.ui-dialog');\n $this->assertSession()\n ->fieldValueEquals('field_description[0][value]', 'Override 1', $modal);\n }", "title": "" }, { "docid": "4ef44c3e56e9d3cb28dfb31432e01558", "score": "0.5469685", "text": "public function edit(Test $test)\n {\n //\n }", "title": "" }, { "docid": "4ef44c3e56e9d3cb28dfb31432e01558", "score": "0.5469685", "text": "public function edit(Test $test)\n {\n //\n }", "title": "" }, { "docid": "4ef44c3e56e9d3cb28dfb31432e01558", "score": "0.5469685", "text": "public function edit(Test $test)\n {\n //\n }", "title": "" }, { "docid": "226128a82406b53c29691d8e61ad71e9", "score": "0.54527086", "text": "public function testEditSave()\n {\n $client = static::createClient();\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/menu-item/edit/' . $this->getId());\n $buttonCrawlerNode = $crawler->selectButton('Submit');\n $form = $buttonCrawlerNode->form();\n $form->setValues(array(\n 'menu_item[label]' => \"menuItemEdit label\",\n ));\n\n $crawler = $client->submit($form);\n $this->assertEquals(1, $crawler->filter('ul.sortable')->count());\n }", "title": "" }, { "docid": "44143b14c8867e5e6b55f38227dffd94", "score": "0.5449268", "text": "public function testEdit()\n\t{\n\t\t$this->response->code = 200;\n\t\t$this->response->body = $this->sampleString;\n\n\t\t$hook = new stdClass;\n\t\t$hook->name = 'acunote';\n\t\t$hook->config = array('token' => '123456789');\n\t\t$hook->events = array('push', 'public');\n\t\t$hook->add_events = array('watch');\n\t\t$hook->remove_events = array('watch');\n\t\t$hook->active = true;\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('patch')\n\t\t\t->with('/repos/joomla/joomla-platform/hooks/42', json_encode($hook))\n\t\t\t->will($this->returnValue($this->response));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->edit('joomla', 'joomla-platform', 42, 'acunote', array('token' => '123456789'),\n\t\t\t\tarray('push', 'public'), array('watch'), array('watch')\n\t\t\t),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "title": "" }, { "docid": "fd4ebc65f6b77608a9e6731b6c695306", "score": "0.5447132", "text": "public function testEditProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Login')\n ->type('email', '[email protected]')\n ->type('password', 'abc123')\n ->press('Login')\n ->assertSee('Home')\n ->clickLink('My Account')\n ->clickLink('My Profile')\n ->assertSee('My Profile')\n ->assertSee('Raj')\n ->clickLink('Edit')\n ->assertSee('My Profile')\n ->type('fname','Joe')\n ->type('lname','Andy')\n ->type('body','I am a Graduate student')\n ->press('Save')\n ->assertSee('Updated Profile')\n ->clickLink('My Account')\n ->clickLink('Logout')\n ->assertTitle('Laravel');\n });\n }", "title": "" }, { "docid": "15077905cd679093bbf013b4706aad2d", "score": "0.54454833", "text": "public function testEditButtonOnView()\r\n {\r\n // Go to the edit page of a container\r\n $this->session->visit('http://localhost:8000/app_test.php/container/1');\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n $this->session->wait(1000);\r\n\r\n // Click the edit button\r\n $page->find('css', '#btnEdit')->click();\r\n\r\n $this->session->wait(1000);\r\n\r\n $this->assertTrue($this->session->getCurrentUrl() == 'http://localhost:8000/app_test.php/container/1/edit');\r\n }", "title": "" }, { "docid": "3620f62220b715b1f9d8fd6eef2a0a32", "score": "0.54425544", "text": "public function isEditAble() {}", "title": "" }, { "docid": "8c8c0ca0a2928f96265b8906f0708944", "score": "0.54394", "text": "public function test_editar_solicitud(){\n $solicitud = Solicitud::create($this->solicitud);\n //comprueba que la solicitud exista en la base de datos\n $this->assertDatabaseHas('solicituds', [\n 'id' => $solicitud['id'], \n ]);\n //el usuario debe estar autenticado y lo debe dirigir a la vista para editar la solicitud\n $response = $this->actingAs($this->solicitante)\n ->get(route('editar.solicitud',$solicitud['id']));\n //compruba que toda hay salido correcto\n $response->assertViewHas('solicitud');\n $response->assertSuccessful();\n }", "title": "" }, { "docid": "5a4228d585afc6b4e940af65f86b5efb", "score": "0.54338074", "text": "public function testPetitionUpdate()\n {\n $user = factory(App\\User::class)->create();\n\n $petition = $this->createAPetition($user->id);\n\n $this->actingAs($user)\n ->visit('/petition/1/edit') //verify correct values for fields on edit page\n ->see('asdf')\n ->see('sdfa')\n ->see('aaff')\n ->type('zzzz', 'title') //verify fields can be edited\n ->type('yyyy', 'summary')\n ->press('Save') //verify form saves and redirects\n ->seePageIs('/home')\n ->see('zzzz') //verify the updated title is visible on the list page\n ->visit('/petition/1/edit') //verify all the updated data is still visible when another edit is made\n ->see('zzzz')\n ->see('yyyy')\n ->see('aaff');\n }", "title": "" }, { "docid": "6d57ac3f21daa7b71374c6c607ae4247", "score": "0.5428602", "text": "public function testEditFailure()\n\t{\n\t\t$exception = false;\n\n\t\t$this->response->code = 500;\n\t\t$this->response->body = $this->errorString;\n\n\t\t$hook = new stdClass;\n\t\t$hook->name = 'acunote';\n\t\t$hook->config = array('token' => '123456789');\n\t\t$hook->events = array('push', 'public');\n\t\t$hook->add_events = array('watch');\n\t\t$hook->remove_events = array('watch');\n\t\t$hook->active = true;\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('patch')\n\t\t\t->with('/repos/joomla/joomla-platform/hooks/42', json_encode($hook))\n\t\t\t->will($this->returnValue($this->response));\n\n\t\ttry\n\t\t{\n\t\t\t$this->object->edit('joomla', 'joomla-platform', 42, 'acunote', array('token' => '123456789'),\n\t\t\t\tarray('push', 'public'), array('watch'), array('watch')\n\t\t\t);\n\t\t}\n\t\tcatch (DomainException $e)\n\t\t{\n\t\t\t$exception = true;\n\n\t\t\t$this->assertThat(\n\t\t\t\t$e->getMessage(),\n\t\t\t\t$this->equalTo(json_decode($this->errorString)->message)\n\t\t\t);\n\t\t}\n\t\t$this->assertTrue($exception);\n\t}", "title": "" }, { "docid": "c6600ea8f8ca99321ec96a48351a13b2", "score": "0.54280066", "text": "public function edit(labtest $labtest)\n {\n //\n }", "title": "" }, { "docid": "2986c161631c6b8b39a1a5622a799f38", "score": "0.54277194", "text": "public function testEditActionAccomplish()\n {\n $n = $this->createNews();\n $client = $this->createAuthClient();\n $editLink = $this->router->generate('sowp_newsmodule_news_edit', [\n 'slug' => $n->getSlug()\n ]);\n\n $client->request('GET', $editLink);\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), \"Response code shaould be 200 \");\n\n $form = $client->getCrawler()->selectButton(\"Edit\")->form();\n $values = $form->getValues();\n\n foreach ($values as $key => &$value) {\n $val = \\mt_rand();\n switch ($key) {\n case 'news[title]':\n $value .= 'Edited ' . $val;\n break;\n case 'news[content]':\n $value .= 'Edited ' . $val;\n break;\n default:\n break;\n }\n }\n\n $form->setValues($values);\n $client->submit($form);\n $this->assertEquals(302, $client->getResponse()->getStatusCode());\n $client->request('GET', $client->getResponse()->headers->get('Location'));\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n\n $clone = clone $client;\n $this->batchRevisionsListActionTest($clone);\n $this->batchDeleteActionTest($client);\n }", "title": "" }, { "docid": "bc9c9e4c04ffe15bcba510a5406f2c03", "score": "0.54261374", "text": "public function testPatientEdit()\n \t{\n \t\t$user = ParseUser::logIn(\"janet\", \"qwe123\");\n $response = $this->call('GET', 'patient/profile/edit');\n \t\t$this->assertViewHas('url');\n $this->assertViewHas('user', $user);\n ParseUser::logOut();\n \t}", "title": "" }, { "docid": "83d336d3a070415372e0936164c7a0ba", "score": "0.5422616", "text": "public function testPageUserEdit()\n {\n $this->visit('/users')\n ->click('Edit')\n ->seePageIs('/users/1/edit');\n }", "title": "" }, { "docid": "2dbdf45014adbb21f0883cd197797c52", "score": "0.5398533", "text": "public function test_edit()\n {\n $user = User::factory()->create();\n\n //Crear un repositorio con el id del usuario creado anteriormente\n $repository = Repository::factory()->create(['user_id' => $user->id]);\n \n $this->actingAs($user)\n ->get(\"repositories/$repository->id/edit\")\n ->assertStatus(200)\n ->assertSee($repository->url)\n ->assertSee($repository->description);\n }", "title": "" }, { "docid": "225f5db6fbf904d297bd41dcd8056da4", "score": "0.53954715", "text": "function edit(&$argsObj,&$tprojectMgr)\r\n{\r\n $tprojectInfo = $tprojectMgr->get_by_id($argsObj->tprojectID);\r\n\r\n $argsObj->tprojectName = $tprojectInfo['name'];\r\n $argsObj->projectOptions = $tprojectInfo['opt'];\r\n $argsObj->tcasePrefix = $tprojectInfo['prefix'];\r\n\r\n $k2l = array('color','notes', 'active','is_public','issue_tracker_enabled','reqmgr_integration_enabled','api_key'); \r\n foreach($k2l as $key)\r\n {\r\n $argsObj->$key = $tprojectInfo[$key];\r\n }\r\n \r\n $ui = new stdClass();\r\n $ui->main_descr=lang_get('title_testproject_management');\r\n $ui->doActionValue = 'doUpdate';\r\n $ui->buttonValue = lang_get('btn_save');\r\n $ui->caption = sprintf(lang_get('caption_edit_tproject'),$argsObj->tprojectName);\r\n return $ui;\r\n}", "title": "" }, { "docid": "9789698b17cf0d5f91dc27536f06ba8b", "score": "0.53930205", "text": "public function testEditPost() {\n $this->json('POST', \"/project/edit/\".$this->project->ext_id, [\n 'name' => 'phpUnitProject8',\n 'method' => 'Kanban'\n ])->assertStatus(401);\n\n $this->actingAs($this->user)->followingRedirects()\n ->json('POST', \"/project/edit/\".$this->project->ext_id, [\n 'name' => 'phpUnitProjecting',\n 'method' => 'Scrum'\n ])->assertSuccessful();\n }", "title": "" }, { "docid": "cd0e11a616f9e326b3277df698b5f214", "score": "0.5386872", "text": "public function test_it_can_update_clinic()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->admin, 'web-admin')\n ->visit(new UpdateClinicPage(Clinic::find(1)))\n ->assertSee('Update a clinic')\n ->select('clinic_type_id')\n ->type('name', 'johndoe')\n ->type('email', '[email protected]')\n ->type('phone', '0123456789')\n ->press('Update')\n ->assertPathIs('/admin/clinics')\n ->assertSee('The clinic has been updated');\n $this->assertDatabaseHas('clinics', ['name' => 'johndoe']); \n });\n \n }", "title": "" }, { "docid": "edc407d8ce710cff3b1e72303f014960", "score": "0.53868467", "text": "public function testCourseEditPage(): void\n {\n // init client\n $client = self::getClient();\n // init crawler\n $crawler = $client->request('GET', $this->getPath() . '/');\n $this->assertResponseOk();\n // go to first course on index page\n $link = $crawler->filter('a.card-link')->first()->link();\n $crawler = $client->click($link);\n $this->assertResponseOk();\n // go to edit course page\n $link = $crawler->filter('a.course-edit-button')->link();\n $crawler = $client->click($link);\n $this->assertResponseOk();\n // get edit form\n $form = $crawler->selectButton('course-save-button')->form();\n // get entity manager\n $entityManager = self::getEntityManager();\n // get course by code\n $course = $entityManager->getRepository(Course::class)->findOneBy(['code' => $form['course[code]']->getValue()]);\n // edit form\n $form['course[code]'] = 'TEST';\n $form['course[name]'] = 'Test course';\n $form['course[description]'] = 'Тестовый курс';\n // submit form\n $client->submit($form);\n // check redirect to course show page\n self::assertTrue($client->getResponse()->isRedirect($this->getPath() . '/' . $course->getId()));\n // follow redirect\n $client->followRedirect();\n $this->assertResponseOk();\n }", "title": "" }, { "docid": "014d8878e026d55ca0372ae2394e77a3", "score": "0.53846073", "text": "public function testItemEditData()\n {\n\n // Create item.\n $item = $this->_item();\n\n // Create servers.\n $server1 = $this->_server('Test Title 1', 'http://test1.org/fedora');\n $server2 = $this->_server('Test Title 2', 'http://test2.org/fedora');\n\n // Create Fedora object.\n $object = $this->_object($item, $server2);\n\n // Hit item edit.\n $this->dispatch('items/edit/' . $item->id);\n\n // Server:\n $this->assertXpath(\n '//select[@name=\"server\"]/option[@value=\"'.$server2->id.'\"]' .\n '[@selected=\"selected\"]'\n );\n\n // PID:\n $this->assertXpath(\n '//input[@id=\"pid\"][@name=\"pid\"][@value=\"pid:test\"]'\n );\n\n // Hidden fields:\n $this->assertXpath(\n '//input[@type=\"hidden\"][@name=\"saveddsids\"][@value=\"DC,content\"]'\n );\n $this->assertXpath(\n '//input[@type=\"hidden\"][@name=\"datastreamsuri\"]'\n );\n\n }", "title": "" }, { "docid": "5da18ce29afbc8dd62ba41225a764df8", "score": "0.53823656", "text": "public function isEditAction() {}", "title": "" }, { "docid": "7f4cf5a58237dccc83675bfb01d7f34f", "score": "0.5379898", "text": "public function test_should_return_program_type_view_with_out_tasked_program_type()\n {\n $response = $this->get('groups/' . $this->group->uuid . '/program-types/' . $this->programType->uuid);\n $response->assertViewIs('programTypes.show')->assertViewHas('programType');\n }", "title": "" }, { "docid": "83d25949eee60af7f5e1c825e3c3bf81", "score": "0.53779244", "text": "abstract function edit();", "title": "" }, { "docid": "46bcca2c8bc2624460ad0613cba4f3c1", "score": "0.53756106", "text": "public function testUserEditpageIsOk()\n {\n $this->logAdmin();\n\n /*recover the crawler in calling the request method with 2 parameters\n 1/ the http method 2/ the uri what we want to recover*/\n $crawler = $this->client->request('GET', '/users/7/edit');\n \n //recover the response with status code\n $response = $this->client->getResponse()->getStatusCode();\n \n //if user asked doesn't exist\n if($this->client->getResponse()->isNotFound())\n {\n //The test with the code status expected\n $this->assertSame(404,$response);\n }\n else\n {\n //recover the form to fill it\n $form = $crawler->selectButton('Modifier')->form();\n \n $form['user_edit[password][first]'] = 'passtest';\n $form['user_edit[password][second]'] = 'passtest';\n\n $form['user_edit[rolename]'] = 2; //ROLE_ADMIN\n //0 //null\n //1 //ROLE_USER\n\n //Submit the form\n $this->client->submit($form);\n \n //to can be able to watch the result\n $crawler = $this->client->followRedirect();\n \n //recover the response with status code\n $response = $this->client->getResponse()->getStatusCode();\n\n //The test with the code status expected\n $this->assertSame(200,$response);\n\n /*The test with the number of time that the element dom should be apear in first parameter\n , the dom element in second parameter*/\n $this->assertSame(1,$crawler->filter('div.alert.alert-success')->count());\n \n //To display the html code remove the double slash ahead the following line\n //echo $this->client->getResponse()->getContent();\n }\n }", "title": "" } ]
3c4deab39143ef8b84214f0a86977ab9
Returns entity map definition.
[ { "docid": "235251419e22edf73a5d521a56bc653e", "score": "0.59981364", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'PROFILE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_PROFILE_ID_FIELD'),\n\t\t\t),\n\t\t\t'EXT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_EXT_ID_FIELD'),\n\t\t\t),\n\t\t\t'ORDER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_ORDER_ID_FIELD'),\n\t\t\t),\n\t\t\t'STATE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateState'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_STATE_FIELD'),\n\t\t\t),\n\t\t\t'STATE_CODE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateStateCode'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_STATE_CODE_FIELD'),\n\t\t\t),\n\t\t\t'UNIX_TIMESTAMP' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_UNIX_TIMESTAMP_FIELD'),\n\t\t\t),\n\t\t\t'HUMAN_TIME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateHumanTime'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_HUMAN_TIME_FIELD'),\n\t\t\t),\n\t\t\t'FAKE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_FAKE_FIELD'),\n\t\t\t),\n\t\t\t'SHIPMENT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_SHIPMENT_ID_FIELD'),\n\t\t\t),\n\t\t\t'SHIPMENT_DATE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateShipmentDate'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_SHIPMENT_DATE_FIELD'),\n\t\t\t),\n\t\t\t'SHIPMENT_TIMESTAMP' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_SHIPMENT_TIMESTAMP_FIELD'),\n\t\t\t),\n\t\t\t'DELIVERY_NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateDeliveryName'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_DELIVERY_NAME_FIELD'),\n\t\t\t),\n\t\t\t'DELIVERY_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateDeliveryId'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_DELIVERY_ID_FIELD'),\n\t\t\t),\n\t\t\t'BOXES_SENT' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_BOXES_SENT_FIELD'),\n\t\t\t),\n\t\t\t'READY_TIME' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('ORDER_ENTITY_READY_TIME_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "f74109fbb40bbc3cc535622c96e1b71c", "score": "0.77658325", "text": "public function getMap()\n {\n return $this->entityMap;\n }", "title": "" }, { "docid": "ea330b26ac14a67168a5d6b72e361829", "score": "0.68023986", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('PARENT_ID', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_PARENT_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\BooleanField('ACTIVE', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_ACTIVE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\BooleanField('DELETED', array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DELETED_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CAL_TYPE', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateCalType'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_CAL_TYPE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('OWNER_ID', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_OWNER_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('NAME', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_NAME_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\DatetimeField('DATE_FROM', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DATE_FROM_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\DatetimeField('DATE_TO', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DATE_TO_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('TZ_FROM', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateTzFrom'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TZ_FROM_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('TZ_TO', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateTzTo'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TZ_TO_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('TZ_OFFSET_FROM', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TZ_OFFSET_FROM_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('TZ_OFFSET_TO', array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TZ_OFFSET_TO_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('DATE_FROM_TS_UTC', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DATE_FROM_TS_UTC_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('DATE_TO_TS_UTC', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DATE_TO_TS_UTC_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\BooleanField('DT_SKIP_TIME', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DT_SKIP_TIME_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('DT_LENGTH', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DT_LENGTH_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('CREATED_BY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_CREATED_BY_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\TextField('DESCRIPTION', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DESCRIPTION_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('PRIVATE_EVENT', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validatePrivateEvent'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_PRIVATE_EVENT_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('ACCESSIBILITY', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateAccessibility'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_ACCESSIBILITY_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('IMPORTANCE', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateImportance'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_IMPORTANCE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('IS_MEETING', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_IS_MEETING_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('MEETING_STATUS', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateMeetingStatus'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_MEETING_STATUS_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('MEETING_HOST', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_MEETING_HOST_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('MEETING', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_MEETING_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('LOCATION', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateLocation'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_LOCATION_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('REMIND', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateRemind'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_REMIND_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('COLOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateColor'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_COLOR_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('TEXT_COLOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateTextColor'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_TEXT_COLOR_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('RRULE', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateRrule'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_RRULE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\TextField('EXDATE', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_EXDATE_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('DAV_XML_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateDavXmlId'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DAV_XML_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CAL_DAV_LABEL', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_CAL_DAV_LABEL_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('DAV_EXCH_LABEL', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateDavExchLabel'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_DAV_EXCH_LABEL_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('VERSION', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVersion'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_VERSION_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('ATTENDEES_CODES', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateAttendeesCodes'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_ATTENDEES_CODES_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('RECURRENCE_ID', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_RECURRENCE_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('RELATIONS', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_RELATIONS_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\TextField('SEARCHABLE_CONTENT', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_SEARCHABLE_CONTENT_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('SECTION_ID', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_SECTION_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('G_EVENT_ID', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_G_EVENT_ID_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\DatetimeField('ORIGINAL_DATE_FROM', array(\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_ORIGINAL_DATE_FROM_FIELD'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('SYNC_STATUS', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateSyncStatus'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_SYNC_STATUS'),\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EVENT_TYPE', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateEventType'),\n\t\t\t\t'title' => Loc::getMessage('SECTION_ENTITY_EVENT_TYPE'),\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "f3bddf5f86d6f70ee3fccb9290658084", "score": "0.6769161", "text": "public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'id' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'autocomplete' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'name' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_NAME_FIELD'),\r\n\t\t\t),\r\n\t\t\t'income' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_INCOME_FIELD'),\r\n\t\t\t),\r\n\t\t\t'cost' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_COST_FIELD'),\r\n\t\t\t),\r\n\t\t\t'total_residents' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_TOTAL_RESIDENTS_FIELD'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "cd446b0a6d5ae3a606e5d7f28e2f0e87", "score": "0.6608667", "text": "public static function generateEntityMap()\n\t{\n\t\t$master_map = array();\n\t\t$glob = array_merge(\n\t\t\tUtil::rglob(ENTITY_GLOBAL_DIR . '**.ent'),\n\t\t\tUtil::rglob(ENTITY_LANG_DIR . '**.ent')\n\t\t);\n\n\t\tforeach ($glob as $file)\n\t\t{\n\t\t\t$entities = file_get_contents($file);\n\t\t\tpreg_match_all('/<!ENTITY\\s+([^\\s]*)\\s+(\"|\\')([^\\\\2]*)\\\\2\\s*>/Ui', $entities, $m);\n\n\t\t\tfor ($i = 0, $max = count($m[0]); $i < $max; $i++)\n\t\t\t{\n\t\t\t\t$v = str_replace(array(\"\\r\\n\", \"\\n\"), ' ', $m[3][$i]);\n\t\t\t\t$map[$m[1][$i]] = $v;\n\t\t\t}\n\n\t\t\t$master_map = array_merge($master_map, $map);\n\t\t}\n\n\t\tksort($master_map);\n\t\treturn $master_map;\n\t}", "title": "" }, { "docid": "fcf1ef838326b592860ef4f35166f547", "score": "0.6599194", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'DISCOUNT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_DISCOUNT_ID_FIELD'),\n\t\t\t),\n\t\t\t'PRODUCT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_PRODUCT_ID_FIELD'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_SITE_ID_FIELD'),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "2b69bf0e044e21c531963f999192dd31", "score": "0.658358", "text": "public static function defaultEntityMaps(){\n\t\t$entityMaps = array();\n\t\t$entityMaps[] = EntityMap::eager(\"getDependency_entity_id\");\n\t\treturn $entityMaps;\n\t}", "title": "" }, { "docid": "4f1dccd36fb7cf3bb5481a3f3201d672", "score": "0.65827924", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'GUEST_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'default_value' => new DateTime(),\n\t\t\t),\n\t\t\t'ENTITY_TYPE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "e447f6fb872e4e77bd9bed89b0615397", "score": "0.64811754", "text": "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_ID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('EVENT_ENTITY_ACTIVE_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('EVENT_ENTITY_NAME_FIELD'),\n ),\n 'EVENT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_EVENT_ID_FIELD'),\n ),\n new Main\\Entity\\ReferenceField(\n 'EVENT',\n 'Bp\\Template\\Tools\\Services\\Eventlist',\n array('=this.EVENT_ID' => 'ref.ID'),\n array('join_type' => 'LEFT')\n ),\n 'SERVICE_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_SERVICE_ID_FIELD'),\n ),\n new Main\\Entity\\ReferenceField(\n 'SERVICE',\n 'Bp\\Template\\Tools\\Services\\System',\n array('=this.SERVICE_ID' => 'ref.ID'),\n array('join_type' => 'LEFT')\n ),\n 'FUNCTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('EVENT_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('EVENT_ENTITY_DESCRIPTION_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.64415646", "text": "public function getMapping();", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.64415646", "text": "public function getMapping();", "title": "" }, { "docid": "9827e4d48d086dbe112149634fe04042", "score": "0.6355956", "text": "public function getMap()\n {\n return $this->container->getMapping();\n }", "title": "" }, { "docid": "dcb9019050d68ca1160f602d62134bcc", "score": "0.6328839", "text": "public static function getMap()\n {\n return array(\n 'ID' => new Entity\\IntegerField(\n 'ID', array(\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => 'ID'\n )\n ),\n 'CODE' => new Entity\\StringField(\n 'CODE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_BLOCK_CODE'),\n 'required' => true\n )\n ),\n 'LAST_BLOCK_ID' => new Entity\\IntegerField(\n 'LAST_BLOCK_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_LAST_BLOCK_ID'),\n 'required' => true,\n 'default_value' => 0\n )\n ),\n 'PARAMS' => new Entity\\StringField(\n 'PARAMS', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_BLOCK_PARAMS'),\n 'serialized' => true\n )\n ),\n 'CREATED_BY_ID' => new Entity\\IntegerField(\n 'CREATED_BY_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CREATED_BY_ID'),\n 'required' => true\n )\n ),\n 'MODIFIED_BY_ID' => new Entity\\IntegerField(\n 'MODIFIED_BY_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_MODIFIED_BY_ID'),\n 'required' => true\n )\n ),\n 'DATE_CREATE' => new Entity\\DatetimeField(\n 'DATE_CREATE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_CREATE'),\n 'required' => true\n )\n ),\n 'DATE_MODIFY' => new Entity\\DatetimeField(\n 'DATE_MODIFY', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_MODIFY'),\n 'required' => true\n )\n )\n );\n }", "title": "" }, { "docid": "fe1c3605e3606849e42ddcaf04bd5840", "score": "0.6307019", "text": "public static function getMap()\n {\n return array(\n 'id' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('IMAGE_ENTITY_ID_FIELD'),\n ),\n 'product_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('IMAGE_ENTITY_PRODUCT_ID_FIELD'),\n ),\n 'from_1c' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('IMAGE_ENTITY_FROM_1C_FIELD'),\n ),\n 'name_1c' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName1c'),\n 'title' => Loc::getMessage('IMAGE_ENTITY_NAME_1C_FIELD'),\n ),\n 'image' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateImage'),\n 'title' => Loc::getMessage('IMAGE_ENTITY_IMAGE_FIELD'),\n ),\n 'updated' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('IMAGE_ENTITY_UPDATED_FIELD'),\n ),\n 'order_' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('IMAGE_ENTITY_ORDER__FIELD'),\n ),\n 'dtype' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateDtype'),\n 'title' => Loc::getMessage('IMAGE_ENTITY_DTYPE_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "a0be7005f2c8cfe5aa3994b6276280cf", "score": "0.62895876", "text": "public function getModifiedEntities(): Map\n {\n return $this->modifiedEntities;\n }", "title": "" }, { "docid": "4774ddad95b15ded7e1cb43934d2b56a", "score": "0.6188045", "text": "public static function getMap() {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_ID_FIELD'),\n ),\n 'PARENT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_PARENT_ID_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_NAME_FIELD'),\n ),\n 'PARENT' => array(\n 'data_type' => 'Kit\\Opengraph\\OpengraphCategory',\n 'reference' => array('=this.PARENT_ID' => 'ref.ID'),\n ),\n 'TIMESTAMP_X' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_ENTITY_TIMESTAMP_X_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'SITE_ID' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_SITE_ID_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_SORT_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "d1994fbcb0bcfd16b4e0f369e486c09d", "score": "0.61805266", "text": "public static function getEntityRoadMap()\n\t{\n\t\treturn array(\n\t\t\t'main' => array(\n\t\t\t\t'name' => 'Bitrix\\Main\\Site',\n\t\t\t\t'pages' => array(\n\t\t\t\t\t'list' => array(\n\t\t\t\t\t\t'includedColumns' => array('SITE_NAME'/*, 'COUNT'*/)\n\t\t\t\t\t),\n\t\t\t\t\t'detail' => array(\n\t\t\t\t\t\t'includedColumns' => array()\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'additional' => array(\n\t\t\t\t\t'SITE_NAME' => array(\n\t\t\t\t\t\t'data_type' => 'string',\n\t\t\t\t\t\t'title' => Loc::getMessage('SALE_LOCATION_ADMIN_SITE_LOCATION_HELPER_ENTITY_SITE_NAME_FIELD')\n\t\t\t\t\t),\n\t\t\t\t\t/*\n\t\t\t\t\t'COUNT' => array(\n\t\t\t\t\t\t'data_type' => 'integer',\n\t\t\t\t\t\t'title' => Loc::getMessage('SALE_LOCATION_ADMIN_DEFAULT_SITE_HELPER_ENTITY_COUNT_FIELD')\n\t\t\t\t\t),\n\t\t\t\t\t*/\n\t\t\t\t),\n\t\t\t\t'primaryFieldName' => 'LID'\n\t\t\t),\n\t\t\t'link' => array(\n\t\t\t\t'name' => 'Bitrix\\Sale\\Location\\SiteLocation'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "962b68cb670fc9a92fb1a9105626930b", "score": "0.61683446", "text": "public static function getMap()\n {\n return array(\n 'id' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('STAT_ENTITY_ID_FIELD'),\n ),\n 'query_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_QUERY_ID_FIELD'),\n ),\n 'status_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_STATUS_ID_FIELD'),\n ),\n 'status_title' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateStatusTitle'),\n 'title' => Loc::getMessage('STAT_ENTITY_STATUS_TITLE_FIELD'),\n ),\n 'type_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_TYPE_ID_FIELD'),\n ),\n 'domen' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomen'),\n 'title' => Loc::getMessage('STAT_ENTITY_DOMEN_FIELD'),\n ),\n 'type_title' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateTypeTitle'),\n 'title' => Loc::getMessage('STAT_ENTITY_TYPE_TITLE_FIELD'),\n ),\n 'phone' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePhone'),\n 'title' => Loc::getMessage('STAT_ENTITY_PHONE_FIELD'),\n ),\n 'date_create' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDateCreate'),\n 'title' => Loc::getMessage('STAT_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'utm_source' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmSource'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_SOURCE_FIELD'),\n ),\n 'utm_medium' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmMedium'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_MEDIUM_FIELD'),\n ),\n 'utm_campaign' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmCampaign'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_CAMPAIGN_FIELD'),\n ),\n 'utm_term' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmTerm'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_TERM_FIELD'),\n ),\n 'utm_content' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmContent'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_CONTENT_FIELD'),\n ),\n 'utm_updated' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmUpdated'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_UPDATED_FIELD'),\n ),\n 'record_url' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateRecordUrl'),\n 'title' => Loc::getMessage('STAT_ENTITY_RECORD_URL_FIELD'),\n ),\n 'duration' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_DURATION_FIELD'),\n ),\n 'record_written' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_RECORD_WRITTEN_FIELD'),\n ),\n 'lead' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_LEAD_FIELD'),\n ),\n 'deal' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_DEAL_FIELD'),\n ),\n 'id_record_bx' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_ID_RECORD_BX_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "0b318f71257a534684c6ff55274afa6d", "score": "0.61660296", "text": "public static function getMap()\n {\n return [\n new Entity\\IntegerField(\n 'ID',\n [\n 'primary' => true,\n 'autocomplete' => true,\n 'column_name' => 'ID'\n ]\n ),\n new Entity\\IntegerField(\n 'AUTHOR_ID',\n [\n 'column_name' => 'AUTHOR_ID'\n ]\n ),\n new Entity\\IntegerField(\n 'BOOK_ID',\n [\n 'column_name' => 'BOOK_ID'\n ]\n ),\n ];\n }", "title": "" }, { "docid": "d064c197bb1fcab8f1f7c7e424c0a10a", "score": "0.6153944", "text": "public function getRenamedEntities(): Map\n {\n return $this->renamedEntities;\n }", "title": "" }, { "docid": "125640ba690701b1676be19280d54dbb", "score": "0.61152", "text": "public function getMapEntityType();", "title": "" }, { "docid": "a1f52da1b3a6967f8232ac73f6f3b0ac", "score": "0.6072978", "text": "public function getEntityMapper()\n\t{\n\t\tif ($this->entityMapper === null) {\n\t\t\t$this->setEntityMapper(new EntityMapper($this));\n\t\t}\n\t\treturn $this->entityMapper;\n\t}", "title": "" }, { "docid": "91ad16dd232e2009f62354a2676f8f16", "score": "0.605147", "text": "public static function getMap()\n {\n return array(\n 'KEY' => new Main\\Entity\\StringField('KEY',array(\n 'primary' => true)),\n 'VALUE' => new Main\\Entity\\StringField('VALUE'),\n );\n }", "title": "" }, { "docid": "d9b038e4875d32ab96442f7de68307fc", "score": "0.6047793", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t)),\n\t\t\tnew Main\\Entity\\IntegerField('FILE_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('FACE_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('CRM_ID'),\n\t\t\tnew Main\\Entity\\StringField('VK_ID'),\n\t\t\tnew Main\\Entity\\DatetimeField('FIRST_VISIT'),\n\t\t\tnew Main\\Entity\\DatetimeField('PRELAST_VISIT'),\n\t\t\tnew Main\\Entity\\DatetimeField('LAST_VISIT'),\n\t\t\tnew Main\\Entity\\IntegerField('LAST_VISIT_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('VISITS_COUNT'),\n\t\t);\n\t}", "title": "" }, { "docid": "5e107b5541c0b5f18c92ec70952120b6", "score": "0.6019974", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'title' => 'ID',\n\t\t\t\t'primary' => true\n\t\t\t)),\n\t\t\t'TITLE' => new Entity\\StringField('TITLE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_TITLE')\n\t\t\t)),\n\t\t\t'XML_ID' => new Entity\\StringField('XML_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_XML_ID')\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_TYPE')\n\t\t\t)),\n\t\t\t'ACCESS_CODES' => new Entity\\StringField('ACCESS_CODES', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_ACCESS_CODES'),\n\t\t\t\t'serialized' => true\n\t\t\t)),\n\t\t\t'ADDITIONAL_RIGHTS' => new Entity\\StringField('ADDITIONAL_RIGHTS', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_ADDITIONAL_RIGHTS'),\n\t\t\t\t'serialized' => true\n\t\t\t)),\n\t\t\t'CREATED_BY_ID' => new Entity\\IntegerField('CREATED_BY_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_CREATED_BY_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'CREATED_BY' => new Entity\\ReferenceField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t'Bitrix\\Main\\UserTable',\n\t\t\t\tarray('=this.CREATED_BY_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'MODIFIED_BY_ID' => new Entity\\IntegerField('MODIFIED_BY_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_MODIFIED_BY_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'MODIFIED_BY' => new Entity\\ReferenceField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t'Bitrix\\Main\\UserTable',\n\t\t\t\tarray('=this.MODIFIED_BY_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'DATE_CREATE' => new Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_CREATE'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'DATE_MODIFY' => new Entity\\DatetimeField('DATE_MODIFY', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_MODIFY'),\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}", "title": "" }, { "docid": "947057d49bdf8f38620b9c57ae8ac868", "score": "0.601048", "text": "public static function getMap(): array\n\t{\n\t\treturn [\n\t\t\tnew Entity\\IntegerField('LINE_ID', [\n\t\t\t\t'primary' => true\n\t\t\t]),\n\t\t\tnew Entity\\TextField('DATA', [\n\t\t\t\t'serialized' => true,\n\t\t\t]),\n\t\t\tnew Entity\\DatetimeField('EXPIRES', [\n\t\t\t\t'default_value' => new Type\\DateTime,\n\t\t\t]),\n\t\t\tnew Entity\\StringField('DATA_HASH', [\n\t\t\t\t'size' => 32\n\t\t\t]),\n\t\t];\n\t}", "title": "" }, { "docid": "e00c8c87fc10a9fd8c9174dfe5e0b9e1", "score": "0.59388006", "text": "public static function getMap()\n\t{\n\t\t$fieldsMap = array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t),\n\t\t\t'TITLE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y')\n\t\t\t),\n\t\t\t'ADDRESS' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'GPS_N' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'GPS_S' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'IMAGE_ID' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'LOCATION_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'DATE_MODIFY' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'MODIFIED_BY' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'PHONE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'SCHEDULE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'XML_ID' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t)\n\t\t);\n\n\t\treturn $fieldsMap;\n\t}", "title": "" }, { "docid": "3d1435c6a162c3217795a048f5a64101", "score": "0.5866566", "text": "public static function getMap()\n {\n if( isset(self::$map) )\n {\n return self::$map;\n }\n\n throw new E_OTS_NotLoaded();\n }", "title": "" }, { "docid": "88889738b67e7b680706a437a9b27731", "score": "0.58648646", "text": "private function getMapping() {\n\n if (!$this->mapping){\n $this->loadMapping();\n }\n\n return $this->mapping;\n\t}", "title": "" }, { "docid": "9df324b6eda35ee10cdf9f6897f43a6c", "score": "0.5841716", "text": "public function getAddedEntities(): Map\n {\n return $this->addedEntities;\n }", "title": "" }, { "docid": "aee7456286c315e7dcb5c0e7c52ce5ee", "score": "0.5821046", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'PERSON_TYPE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "451b69fdcd7cdf49072cdb587820c49e", "score": "0.5819763", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => [\n\t\t\t\t'primary' => true,\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ORDER_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ORDER' => [\n\t\t\t\t'data_type' => '\\Bitrix\\Sale\\Order',\n\t\t\t\t'reference' => [\n\t\t\t\t\t'=this.ORDER_ID' => 'ref.ID'\n\t\t\t\t]\n\t\t\t],\n\t\t\t'ENTITY_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ENTITY_TYPE_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'SORT' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => 0\n\t\t\t],\n\t\t\t'ROLE_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => 0\n\t\t\t],\n\t\t\t'IS_PRIMARY' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => ['N', 'Y'],\n\t\t\t\t'default_value' => 'N'\n\t\t\t]\n\t\t];\n\t}", "title": "" }, { "docid": "32b017c6a9fdf2bed9ad264e5d7f1a9b", "score": "0.58138925", "text": "public static function getMap() {\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_ID'),\n\t\t\t)),\n\t\t\t'PROFILE_ID' => new Entity\\IntegerField('PROFILE_ID', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_PROFILE_ID'),\n\t\t\t)),\n\t\t\t'IBLOCK_ID' => new Entity\\IntegerField('IBLOCK_ID', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_IBLOCK_ID'),\n\t\t\t)),\n\t\t\t'FIELD' => new Entity\\StringField('FIELD', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_FIELD'),\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_TYPE'),\n\t\t\t)),\n\t\t\t'PARAMS' => new Entity\\TextField('PARAMS', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_PARAMS'),\n\t\t\t)),\n\t\t\t'CONDITIONS' => new Entity\\TextField('CONDITIONS', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_CONDITIONS'),\n\t\t\t)),\n\t\t\t'DATE_MODIFIED' => new Entity\\DateTimeField('DATE_MODIFIED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELDS_FIELD_DATE_MODIFIED'),\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "27f36e5f70f33131235dcb0e169cf544", "score": "0.5797916", "text": "function jeo_the_map() {\r\n\tglobal $jeo;\r\n\treturn $jeo->map;\r\n}", "title": "" }, { "docid": "cf60f83939d83086773c1c70bf4bac22", "score": "0.5797163", "text": "public function createMapping();", "title": "" }, { "docid": "1500ecacecc933a5225294277c822760", "score": "0.5771515", "text": "public function definition()\n {\n return [\n 'world_map_id' => 1,\n 'x' => 0,\n 'y' => 0,\n 'danger_index' => (new DangerNoise())->random2D(0,0),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ];\n }", "title": "" }, { "docid": "f431e2530a714017214244345c340b10", "score": "0.5759112", "text": "function getParamMap($entityClass);", "title": "" }, { "docid": "e6b4f09f6a0afc38247a25296d456cbb", "score": "0.57459563", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'default_value' => new DateTime(),\n\t\t\t),\n\t\t\t'GID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'unique' => true,\n\t\t\t\t'default_value' => function(){\n\t\t\t\t\treturn GuestTable::generateGuestId();\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "9fc803a0a5563c069625d68a4510c1e4", "score": "0.56867117", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'BUCKET_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('FILE_HASH_ENTITY_BUCKET_ID_FIELD'),\n\t\t\t),\n\t\t\t'FILE_PATH' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFilePath'),\n\t\t\t\t'title' => Loc::getMessage('FILE_HASH_ENTITY_FILE_PATH_FIELD'),\n\t\t\t),\n\t\t\t'FILE_SIZE' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('FILE_HASH_ENTITY_FILE_SIZE_FIELD'),\n\t\t\t),\n\t\t\t'FILE_MTIME' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'title' => Loc::getMessage('FILE_HASH_ENTITY_FILE_MTIME_FIELD'),\n\t\t\t),\n\t\t\t'FILE_HASH' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateFileHash'),\n\t\t\t\t'title' => Loc::getMessage('FILE_HASH_ENTITY_FILE_HASH_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "8697304921e889d18db041fb7b3491bf", "score": "0.5685114", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRODUCT_ID' => new Main\\Entity\\IntegerField('PRODUCT_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRODUCT_ID_FIELD')\n\t\t\t)),\n\t\t\t'EXTRA_ID' => new Main\\Entity\\IntegerField('EXTRA_ID', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_EXTRA_ID_FIELD')\n\t\t\t)),\n\t\t\t'CATALOG_GROUP_ID' => new Main\\Entity\\IntegerField('CATALOG_GROUP_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_CATALOG_GROUP_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRICE' => new Main\\Entity\\FloatField('PRICE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRICE_FIELD')\n\t\t\t)),\n\t\t\t'CURRENCY' => new Main\\Entity\\StringField('CURRENCY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCurrency'),\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_CURRENCY_FIELD')\n\t\t\t)),\n\t\t\t'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'default_value' => function(){ return new Main\\Type\\DateTime(); },\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_TIMESTAMP_X_FIELD')\n\t\t\t)),\n\t\t\t'QUANTITY_FROM' => new Main\\Entity\\IntegerField('QUANTITY_FROM', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_QUANTITY_FROM_FIELD')\n\t\t\t)),\n\t\t\t'QUANTITY_TO' => new Main\\Entity\\IntegerField('QUANTITY_TO', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_QUANTITY_TO_FIELD')\n\t\t\t)),\n\t\t\t'TMP_ID' => new Main\\Entity\\StringField('TMP_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateTmpId'),\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_TMP_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRICE_SCALE' => new Main\\Entity\\FloatField('PRICE_SCALE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRICE_SCALE_FIELD')\n\t\t\t)),\n\t\t\t'CATALOG_GROUP' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'CATALOG_GROUP',\n\t\t\t\t'\\Bitrix\\Catalog\\Group',\n\t\t\t\tarray('=this.CATALOG_GROUP_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'ELEMENT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'ELEMENT',\n\t\t\t\t'\\Bitrix\\Iblock\\Element',\n\t\t\t\tarray('=this.PRODUCT_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'PRODUCT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'PRODUCT',\n\t\t\t\t'\\Bitrix\\Catalog\\Product',\n\t\t\t\tarray('=this.PRODUCT_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e8b1af7322e55f29a893711591c3e619", "score": "0.5679587", "text": "public static function getMap()\n\t{\n\t\t/*\n\t\t\tboolean (наследует ScalarField)\n\t\t\tdate (наследует ScalarField)\n\t\t\tdatetime (наследует DateField)\n\t\t\tenum (наследует ScalarField)\n\t\t\tfloat (наследует ScalarField)\n\t\t\tinteger (наследует ScalarField)\n\t\t\tstring (наследует ScalarField)\n\t\t\ttext (наследует StringField)\n\t\t */\n\t\treturn array(\n\t\t\t new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\DatetimeField('DATE_INSERT', array(\n\t\t\t\t\t'default_value' => new Type\\DateTime(),\n\t\t\t\t\t'title' => Loc::getMessage('DATE_INSERT'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t\t new Main\\Entity\\DatetimeField('DATE_EXEC', array(\n\t\t\t\t\t'title' => Loc::getMessage('DATE_EXEC'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('REVIEW_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('REVIEW_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('SUBSCRIBERS_CNT', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('SUBSCRIBERS_CNT'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('SENDMAIL_CNT', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('SENDMAIL_CNT'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t\t'title' => Loc::getMessage('SITE_ID'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t);\n\t}", "title": "" }, { "docid": "4d0661ab79b03f015d699c18ca4c29ef", "score": "0.5678039", "text": "public function getMappings();", "title": "" }, { "docid": "b48a8abcc0c8935b7f115e6b0190dcfd", "score": "0.56779194", "text": "public function map(): FactoryMapInterface;", "title": "" }, { "docid": "9389c324f8179eda4a415d791ff3644e", "score": "0.56602466", "text": "public function getMap()\r\n\t\t{\r\n\t\t\treturn $this->map;\r\n\t\t}", "title": "" }, { "docid": "64b8a02e2310e27e4b76acc7fd79c8c0", "score": "0.56526643", "text": "public function getMap()\n {\n return $this->map;\n }", "title": "" }, { "docid": "64b8a02e2310e27e4b76acc7fd79c8c0", "score": "0.56526643", "text": "public function getMap()\n {\n return $this->map;\n }", "title": "" }, { "docid": "2813088daf7968026abefb1c087e3bb8", "score": "0.56186503", "text": "abstract public function &getMap();", "title": "" }, { "docid": "ca60abae097654bf10eb3ee2f72aca41", "score": "0.5601125", "text": "public function getMap() {\t\t\n\t\tthrow new \\Exception(\"GetMap should be implemented by children\");\n\t}", "title": "" }, { "docid": "7f7d19214dc76f4c007e3fb9f9dec63b", "score": "0.559822", "text": "public function getAutoloadMap()\n {\n return $this->map;\n }", "title": "" }, { "docid": "4dfa30d4be0028c7519e367c2e6824b3", "score": "0.5579329", "text": "public static function getMap()\n {\n return array(\n 'id' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n ),\n 'region_id' => array(\n 'data_type' => 'integer',\n 'required' => true,\n ),\n 'name_ru' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateNameRu'),\n ),\n 'name_en' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateNameEn'),\n ),\n 'lat' => array(\n 'data_type' => 'float',\n 'required' => true,\n ),\n 'lon' => array(\n 'data_type' => 'float',\n 'required' => true,\n ),\n 'okato' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateOkato'),\n ),\n new ReferenceField(\n 'region',\n 'FourPaws\\App\\Geo\\Entity\\Table\\RegionTable',\n ['=this.region_id' => 'ref.id']\n ),\n );\n }", "title": "" }, { "docid": "bf4b79ca4bad9464f7970eae29d28f42", "score": "0.5577864", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'TITLE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateTitle'),\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_TITLE_FIELD'),\n\t\t\t\t'save_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getSaveModificator'),\n\t\t\t\t'fetch_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getFetchModificator'),\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_DESCRIPTION_FIELD'),\n\t\t\t\t'save_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getSaveModificator'),\n\t\t\t\t'fetch_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getFetchModificator'),\n\t\t\t),\n\t\t\t'DESCRIPTION_IN_BBCODE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t),\n\t\t\tnew EnumField('PRIORITY', array(\n\t\t\t\t'values' => array('0', '1', '2', 0, 1, 2), // see constants at CTasks\n\t\t\t\t'default_value' => '1', // CTasks::PRIORITY_AVERAGE\n\t\t\t)),\n\t\t\tnew EnumField('STATUS', array(\n\t\t\t\t'values' => array(\n\t\t\t\t\t1, 2, 3, 4, 5, 6, 7,\n\t\t\t\t\t'1', '2', '3', '4', '5', '6', '7',\n\t\t\t\t), // see constants at CTasks\n\t\t\t\t'default_value' => '2', // CTasks::STATE_PENDING\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_STATUS_FIELD'),\n\t\t\t)),\n\t\t\t'STAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_STAGE_ID_FIELD'),\n// 'validation' => array(__CLASS__, 'validateStageId'), // if need validate on exists\n\t\t\t),\n\t\t\t'RESPONSIBLE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_RESPONSIBLE_ID_FIELD'),\n\t\t\t),\n\t\t\t'DATE_START' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t),\n\t\t\t'DURATION_PLAN' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'DURATION_FACT' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\tnew EnumField('DURATION_TYPE', array(\n\t\t\t\t'values' => array('secs', 'mins', 'hours', 'days', 'weeks', 'monts', 'years'), // see constants at CTasks\n\t\t\t\t'default_value' => 'days', // CTasks::TIME_UNIT_TYPE_DAY\n\t\t\t)),\n\t\t\t'TIME_ESTIMATE' => array( // in seconds\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => '0',\n\t\t\t),\n\t\t\t'REPLICATE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t),\n\t\t\tnew DateTimeField('DEADLINE', array(\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_DEADLINE_FIELD'),\n\t\t\t)),\n\t\t\tnew DateTimeField('START_DATE_PLAN'),\n\t\t\tnew DateTimeField('END_DATE_PLAN'),\n\t\t\t'CREATED_BY' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('TASKS_TASK_ENTITY_CREATED_BY_FIELD'),\n\t\t\t),\n\t\t\tnew DateTimeField('CREATED_DATE'),\n\t\t\t'CHANGED_BY' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\tnew DateTimeField('CHANGED_DATE'),\n\t\t\t'STATUS_CHANGED_BY' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\tnew DateTimeField('STATUS_CHANGED_DATE'),\n\t\t\t'CLOSED_BY' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\tnew DateTimeField('CLOSED_DATE'),\n\t\t\tnew DateTimeField('ACTIVITY_DATE'),\n\t\t\t'GUID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateGuid'),\n\t\t\t),\n\t\t\t'XML_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateXmlId'),\n\t\t\t\t'title' => Loc::getMessage('TASKS_ENTITY_XML_ID_FIELD'),\n\t\t\t),\n\t\t\tnew EnumField('MARK', array(\n\t\t\t\t'values' => array('P', 'N'), // see constants at CTasks\n\t\t\t)),\n\t\t\t'ALLOW_CHANGE_DEADLINE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'ALLOW_TIME_TRACKING' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'TASK_CONTROL' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'ADD_IN_REPORT' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'GROUP_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => '0'\n\t\t\t),\n\t\t\t'PARENT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'FORUM_TOPIC_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'MULTITASK' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t),\n\t\t\t'FORKED_BY_TEMPLATE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'ZOMBIE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\t\t\t'MATCH_WORK_TIME' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t),\n\n\t\t\t// references\n\t\t\t'CREATOR' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\User',\n\t\t\t\t'reference' => array('=this.CREATED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'RESPONSIBLE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\User',\n\t\t\t\t'reference' => array('=this.RESPONSIBLE_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'PARENT' => array(\n\t\t\t\t'data_type' => 'Task',\n\t\t\t\t'reference' => array('=this.PARENT_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'SITE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\Site',\n\t\t\t\t'reference' => array('=this.SITE_ID' => 'ref.LID')\n\t\t\t),\n\t\t\t'MEMBERS' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Tasks\\Internals\\Task\\MemberTable',\n\t\t\t\t'reference' => array(\n\t\t\t\t\t'=this.ID'=>'ref.TASK_ID'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'RESULTS' => [\n\t\t\t\t'data_type' => ResultTable::class,\n\t\t\t\t'reference' => [\n\t\t\t\t\t'=this.ID'=>'ref.TASK_ID'\n\t\t\t\t],\n\t\t\t],\n\t\t\t(\n\t\t\t\tnew Reference(\n\t\t\t\t\t'SCENARIO',\n\t\t\t\t\tScenarioTable::class,\n\t\t\t\t\tJoin::on('this.ID', 'ref.TASK_ID')\n\t\t\t\t)\n\t\t\t)->configureJoinType('left'),\n\n\t\t\t// socialnetwork module should be present\n\t\t\t'GROUP' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Socialnetwork\\Workgroup',\n\t\t\t\t'reference' => array('=this.GROUP_ID' => 'ref.ID')\n\t\t\t),\n\n\t\t\t// obsolete, but required\n\t\t\t'OUTLOOK_VERSION' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => '1',\n\t\t\t),\n\n\t\t\t(new OneToMany(\"MEMBER_LIST\", MemberTable::class, \"TASK\"))->configureJoinType(\"inner\"),\n\t\t\t//todo\n\t\t\t(new ManyToMany(\"TAG_LIST\", LabelTable::class))\n\t\t\t\t->configureLocalReference(\"TASK\")\n\t\t\t\t->configureRemoteReference('TAG')\n\t\t\t\t->configureTableName('b_tasks_task_tag')\n\t\t\t\t->configureJoinType(\"inner\"),\n\n\t\t\t'EXCHANGE_ID' => [\n\t\t\t\t'data_type' => 'string',\n\t\t\t],\n\t\t\t'EXCHANGE_MODIFIED' => [\n\t\t\t\t'data_type' => 'string',\n\t\t\t],\n\t\t\t'DECLINE_REASON' => [\n\t\t\t\t'data_type' => 'string',\n\t\t\t],\n\t\t\t'DEADLINE_COUNTED' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t],\n\t\t\t(new Reference(\n\t\t\t\t'UTS_DATA',\n\t\t\t\tUtsTasksTaskTable::getEntity(),\n\t\t\t\t['this.ID' => 'ref.VALUE_ID']\n\t\t\t))->configureJoinType(Join::TYPE_LEFT),\n\n\t\t\t(new OneToMany(\n\t\t\t\t'RESULT',\n\t\t\t\tResultTable::class,\n\t\t\t\t'TASK'\n\t\t\t))->configureJoinType(Join::TYPE_LEFT),\n\n\t\t\t(new Reference(\n\t\t\t\t'CHECKLIST_DATA',\n\t\t\t\tCheckListTable::getEntity(),\n\t\t\t\t['this.ID' => 'ref.TASK_ID'],\n\t\t\t))->configureJoinType(Join::TYPE_LEFT)\n\t\t);\n\t}", "title": "" }, { "docid": "58fc1f3941beffd48d108800682b2310", "score": "0.55776256", "text": "public function getMap();", "title": "" }, { "docid": "aa00f75f6a28b6b201a230d5108583f1", "score": "0.55579066", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_NAME',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_NAME_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_ARTICLE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_ARTICLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew FloatField(\n\t\t\t\t'UF_PRICE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_PRICE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'UF_TOVAR_QUANTITY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_TOVAR_QUANTITY_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_ID_WAREHOUSE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_ID_WAREHOUSE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_PREW_TEXT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_PREW_TEXT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_DETAIL_TEXT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_DETAIL_TEXT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_BRAND',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_BRAND_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_MANUFACT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_MANUFACT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_MATERIAL',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_MATERIAL_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "title": "" }, { "docid": "b0ca7d46ac690ef9c42a8f1f004c170d", "score": "0.5550789", "text": "public function get_attributes_map();", "title": "" }, { "docid": "7c7ebd516221169ec9978e51a626e6e2", "score": "0.554249", "text": "public static function getMap()\n {\n return [\n 'ID' => ['data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => \"ID\"],\n 'TIMESTAMP_X' => ['data_type' => 'datetime', 'required' => true, 'title' => \"Дата изменения\"],\n 'MODULE_ID' => ['data_type' => 'string', 'title' => \"Модуль\"],\n 'HEIGHT' => ['data_type' => 'integer', 'title' => \"Высота\"],\n 'WIDTH' => ['data_type' => 'integer', 'title' => \"Ширина\"],\n 'FILE_SIZE' => ['data_type' => 'integer', 'title' => \"Размер файла\"],\n 'CONTENT_TYPE' => ['data_type' => 'string', 'title' => \"Тип контента\"],\n 'SUBDIR' => ['data_type' => 'string', 'title' => \"Поддериктория\"],\n 'FILE_NAME' => ['data_type' => 'string', 'title' => \"Название файла\"],\n 'ORIGINAL_NAME' => ['data_type' => 'string', 'title' => \"Оригинальное название\"],\n 'DESCRIPTION' => ['data_type' => 'string', 'title' => \"Описание\"],\n 'HANDLER_ID' => ['data_type' => 'string', 'title' => \"HANDLER_ID\"],\n 'EXTERNAL_ID' => ['data_type' => 'string', 'title' => \"EXTERNAL_ID\"],\n ];\n }", "title": "" }, { "docid": "8c07ef93fc63d001558a19d3e9f5b857", "score": "0.5526711", "text": "public function getMap() {\n return $this->_map;\n }", "title": "" }, { "docid": "44eb47d9439eda4e15527ae72d9cb3fa", "score": "0.55128026", "text": "public function attributeMap()\n {\n if ($this->dataMap === null) {\n if ($this->contentObject === null) {\n throw new ObjectDoesNotExist(\"No content object has been set, cannot load attribute map\");\n }\n if ($this->contentVersion !== null) {\n $this->dataMap = $this->contentVersion->dataMap();\n } else {\n $languageCode = $this->languageCode ? $this->languageCode : false;\n $this->dataMap = $this->contentObject->fetchDataMap(/*version*/false, $languageCode);\n }\n }\n return $this->dataMap;\n }", "title": "" }, { "docid": "5305c3a6dbdbd130493a884447cd3e45", "score": "0.5492478", "text": "public function getMapping() : array;", "title": "" }, { "docid": "bf60173a39cc56f2e5866f8eefb8f51e", "score": "0.5485022", "text": "public static function getMap(): array\n\t{\n//\t\t$fieldsMap = parent::getMap();\n\n\t\t$fieldsMap = [\n\t\t\t(new IntegerField('ID'))\n\t\t\t\t->configurePrimary()\n\t\t\t\t->configureAutocomplete(),\n\t\t\t(new StringField('NAME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureUnique()\n\t\t\t\t->configureSize(100)\n\t\t\t\t->configureFormat('/^[A-Z][A-Za-z0-9]*$/')\n\t\t\t\t->addValidator(new RegExp(\n\t\t\t\t\t'/(?<!Table)$/i'\n\t\t\t\t)),\n\t\t\t(new StringField('TABLE_NAME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureUnique()\n\t\t\t\t->configureSize(64)\n\t\t\t\t->configureFormat('/^[a-z0-9_]+$/')\n\t\t\t\t->addValidator([get_called_class(), 'validateTableExisting']),\n\t\t];\n\n\t\tContainer::getInstance()->getLocalization()->loadMessages();\n\n\t\t$fieldsMap[] = (new ORM\\Fields\\StringField('TITLE'))\n\t\t\t->configureTitle(Loc::getMessage('CRM_COMMON_TITLE'))\n\t\t\t->configureRequired();\n\t\t$fieldsMap[] = (new ORM\\Fields\\StringField('CODE'))\n\t\t\t->configureTitle(Loc::getMessage('CRM_COMMON_CODE'))\n\t\t\t->configureSize(255);\n\t\t//$fieldsMap[] = (new ORM\\Fields\\StringField('IMAGE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\IntegerField('CREATED_BY'))\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_ITEM_FIELD_CREATED_BY'))\n\t\t\t->configureRequired()\n\t\t\t->configureDefaultValue(static function()\n\t\t\t{\n\t\t\t\treturn Container::getInstance()->getContext()->getUserId();\n\t\t\t});\n\t\t$fieldsMap[] = (new ORM\\Fields\\IntegerField('ENTITY_TYPE_ID'))\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_ENTITY_TYPE_ID_TITLE'))\n\t\t\t->configureRequired()\n\t\t\t->configureUnique()\n\t\t\t->addValidator([static::class, 'validateEntityTypeId'])\n\t\t\t->configureDefaultValue(static function()\n\t\t\t{\n\t\t\t\t$nextId = static::getNextAvailableEntityTypeId();\n\t\t\t\tif(!$nextId)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidOperationException(Loc::getMessage('CRM_TYPE_ENTITY_TYPE_ID_LIMIT_ERROR'));\n\t\t\t\t}\n\n\t\t\t\treturn $nextId;\n\t\t\t});\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_CATEGORIES_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_CATEGORIES_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_STAGES_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_STAGES_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_BEGIN_CLOSE_DATES_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_BEGIN_CLOSE_DATES_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_CLIENT_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_CLIENT_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_USE_IN_USERFIELD_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_USE_IN_USERFIELD_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_LINK_WITH_PRODUCTS_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_LINK_WITH_PRODUCTS_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_CRM_TRACKING_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_CRM_TRACKING_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_MYCOMPANY_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_MYCOMPANY_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_DOCUMENTS_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_DOCUMENTS_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_SOURCE_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_SOURCE_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_OBSERVERS_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_OBSERVERS_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_RECYCLEBIN_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_RECYCLEBIN_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_AUTOMATION_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_AUTOMATION_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_BIZ_PROC_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_BIZ_PROC_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_SET_OPEN_PERMISSIONS'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('Y')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_SET_OPEN_PERMISSIONS_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_PAYMENTS_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_PAYMENTS_ENABLED_TITLE'));\n\t\t$fieldsMap[] = (new ORM\\Fields\\BooleanField('IS_COUNTERS_ENABLED'))\n\t\t\t->configureStorageValues('N', 'Y')\n\t\t\t->configureDefaultValue('N')\n\t\t\t->configureRequired()\n\t\t\t->configureTitle(Loc::getMessage('CRM_TYPE_TYPE_IS_COUNTERS_ENABLED_TITLE'));\n\n\t\treturn $fieldsMap;\n\t}", "title": "" }, { "docid": "0b2232c3bfc5d3823e6f58b3a24b0366", "score": "0.5481569", "text": "protected function getMap($mid)\n {\n $entity = $this->getRepository('Detail\\AlumniOrgMap')->find($mid);\n\n if (!$entity) {\n $message = 'Unable to find Map entity.';\n throw $this->createNotFoundException($message);\n }\n\n return $entity;\n }", "title": "" }, { "docid": "8f33fdc3dc5252bbe6bd9a9936af928b", "score": "0.54596895", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_TYPE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateIblockTypeId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_IBLOCK_TYPE_ID_FIELD'),\n\t\t\t),\n\t\t\t'LANGUAGE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'column_name' => 'LID',\n\t\t\t\t'validation' => array(__CLASS__, 'validateLanguageId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_LID_FIELD'),\n\t\t\t),\n\t\t\t'NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_NAME_FIELD'),\n\t\t\t),\n\t\t\t'SECTIONS_NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'column_name' => 'SECTION_NAME',\n\t\t\t\t'validation' => array(__CLASS__, 'validateSectionsName'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_SECTION_NAME_FIELD'),\n\t\t\t),\n\t\t\t'ELEMENTS_NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'column_name' => 'ELEMENT_NAME',\n\t\t\t\t'validation' => array(__CLASS__, 'validateElementsName'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_ELEMENT_NAME_FIELD'),\n\t\t\t),\n\t\t\t'LANGUAGE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\Localization\\Language',\n\t\t\t\t'reference' => array('=this.LID' => 'ref.LID'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "5f45fbe3d9f59a70ef2688716a0b7e69", "score": "0.5427821", "text": "function getMapper($entityClass);", "title": "" }, { "docid": "f33faeb7974d75ce42e1f1f6755105e4", "score": "0.5427338", "text": "protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'CODE', 'TITLE', 'TYPE', 'TPL_ID', 'DOMAIN_ID',\n\t\t\t'LANDING_ID_INDEX', 'LANDING_ID_404', 'LANDING_ID_503'\n\t\t);\n\t}", "title": "" }, { "docid": "313ccdddb856f2e7c23f6124049777d9", "score": "0.5422875", "text": "public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('LOCATION_ID'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\IntegerField('TYPE'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('VALUE'))\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(null, 255)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('LOCATION', LocationTable::class,\n\t\t\t\tJoin::on('this.LOCATION_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}", "title": "" }, { "docid": "215f5089bc8a8af4c26a8574f25e2e02", "score": "0.54167956", "text": "public function definition()\n {\n $mapCenterLatitude = -2.68496;\n $mapCenterLongitude = 113.95365;\n $minLatitude = $mapCenterLatitude - 3.9;\n $maxLatitude = $mapCenterLatitude + 3.9;\n $minLongitude = $mapCenterLongitude - 2.07;\n $maxLongitude = $mapCenterLongitude + 2.07;\n\n return [\n 'type_id' => $this->faker->numberBetween(1, 4),\n 'island_id' => $this->faker->numberBetween(1, 6),\n 'creator_id' => 1,\n 'is_active' => true,\n 'name_place' => $this->faker->firstName,\n 'slug' => Str::slug($this->faker->firstName),\n 'address' => $this->faker->address,\n 'provinsi' => $this->faker->lastName,\n 'kabupaten' => $this->faker->lastName,\n 'latitude' => $this->faker->latitude($minLatitude, $maxLatitude),\n 'longitude' => $this->faker->longitude($minLongitude, $maxLongitude),\n 'description' => $this->faker->text(1000),\n 'image' => 'https://picsum.photos/id/' . $this->faker->numberBetween(1, 100) . '/200/300'\n ];\n }", "title": "" }, { "docid": "54a76214982f661d07cddf9c25a630fd", "score": "0.54052377", "text": "public function getMapping() : array {\n\t\treturn $this->mapping;\n\t}", "title": "" }, { "docid": "1a26459d1d1bfbf9123ed9142f6c190b", "score": "0.5400693", "text": "public function getIdentityMap()\n {\n if (is_null($this->_identityMap)) {\n $this->_identityMap = new IdentityMap();\n }\n return $this->_identityMap;\n }", "title": "" }, { "docid": "7cb0b303571c8e18a86eeba06eaf37b3", "score": "0.53602237", "text": "public static function getMap() {\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_ID'),\n\t\t\t)),\n\t\t\t'ACTIVE' => new Entity\\StringField('ACTIVE', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_ACTIVE'),\n\t\t\t)),\n\t\t\t'NAME' => new Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_NAME'),\n\t\t\t)),\n\t\t\t'CODE' => new Entity\\StringField('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_CODE'),\n\t\t\t)),\n\t\t\t'DESCRIPTION' => new Entity\\TextField('DESCRIPTION', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DESCRIPTION'),\n\t\t\t)),\n\t\t\t'SORT' => new Entity\\IntegerField('SORT', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_SORT'),\n\t\t\t)),\n\t\t\t'SITE_ID' => new Entity\\StringField('SITE_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_SITE_ID'),\n\t\t\t)),\n\t\t\t'DOMAIN' => new Entity\\StringField('DOMAIN', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DOMAIN'),\n\t\t\t)),\n\t\t\t'IS_HTTPS' => new Entity\\StringField('IS_HTTPS', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_IS_HTTPS'),\n\t\t\t)),\n\t\t\t'PLUGIN' => new Entity\\StringField('PLUGIN', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_PLUGIN'),\n\t\t\t)),\n\t\t\t'FORMAT' => new Entity\\StringField('FORMAT', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_FORMAT'),\n\t\t\t)),\n\t\t\t'LAST_IBLOCK_ID' => new Entity\\IntegerField('LAST_IBLOCK_ID', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_LAST_IBLOCK_ID'),\n\t\t\t)),\n\t\t\t'LAST_SETTINGS_TAB' => new Entity\\StringField('LAST_SETTINGS_TAB', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_LAST_SETTINGS_TAB'),\n\t\t\t)),\n\t\t\t'PARAMS' => new Entity\\TextField('PARAMS', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_PARAMS'),\n\t\t\t)),\n\t\t\t'AUTO_GENERATE' => new Entity\\StringField('AUTO_GENERATE', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_AUTO_GENERATE'),\n\t\t\t)),\n\t\t\t'LOCKED' => new Entity\\StringField('LOCKED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_LOCKED'),\n\t\t\t)),\n\t\t\t'DATE_CREATED' => new Entity\\DatetimeField('DATE_CREATED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DATE_CREATED'),\n\t\t\t)),\n\t\t\t'DATE_MODIFIED' => new Entity\\DatetimeField('DATE_MODIFIED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DATE_MODIFIED'),\n\t\t\t)),\n\t\t\t'DATE_STARTED' => new Entity\\DatetimeField('DATE_STARTED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DATE_STARTED'),\n\t\t\t)),\n\t\t\t'DATE_LOCKED' => new Entity\\DatetimeField('DATE_LOCKED', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_DATE_LOCKED'),\n\t\t\t)),\n\t\t\t'SESSION' => new Entity\\TextField('SESSION', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_SESSION'),\n\t\t\t)),\n\t\t\t'LAST_EXPORTED_ITEM' => new Entity\\TextField('LAST_EXPORTED_ITEM', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_LAST_EXPORTED_ITEM'),\n\t\t\t)),\n\t\t\t'EXTERNAL_ID' => new Entity\\StringField('EXTERNAL_ID', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_EXTERNAL_ID'),\n\t\t\t)),\n\t\t\t'ONE_TIME' => new Entity\\StringField('ONE_TIME', array(\n\t\t\t\t'title' => Loc::getMessage('ACRIT_EXP_PROFILE_FIELD_ONE_TIME'),\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "3b779f615921715ac69a2de0deb2cc16", "score": "0.5357838", "text": "public function entity();", "title": "" }, { "docid": "0165d084615548d7dc956cef949bcea2", "score": "0.5344735", "text": "public function getMap() {\n\t\tif ($this->map === NULL) {\n\t\t\t$this->map = [];\n\t\t}\n return ($this->map);\n\t}", "title": "" }, { "docid": "c8360bb56a8599c97c2b6c59fc101ce0", "score": "0.5339604", "text": "protected abstract function getRawTemplateMap();", "title": "" }, { "docid": "80108df0b2fac7b8a062204fa8ab8a08", "score": "0.5328761", "text": "public static function getStaticDefinition() {\n\t\t#only for entities without dependency injection, activerecord like, e.g. new Article or Article::find();\n\t\treturn EntityManager::singleton()->get(get_called_class());\n\t}", "title": "" }, { "docid": "7fee77e727a444bdffd8941a01263401", "score": "0.5325065", "text": "private function eventEntityMappingDataProvider() {\n return [\n // No entity mapping.\n [],\n // Skip action.\n [\n 'action' => ManagerInterface::ACTION_SKIP,\n 'entity_type_id' => 'user',\n 'id' => 1,\n ],\n // Invalid action.\n [\n 'action' => 'unsupported-action',\n 'entity_type_id' => 'user',\n 'id' => 1,\n ],\n // Create action.\n // Entity that is not bundleable.\n [\n 'action' => ManagerInterface::ACTION_CREATE,\n 'entity_type_id' => 'user',\n ],\n // Entity that is bundleable and a bundle is provided.\n [\n 'action' => ManagerInterface::ACTION_CREATE,\n 'entity_type_id' => 'node',\n 'entity_bundle' => 'article',\n ],\n // Entity that is bundleable and a bundle is NOT provided.\n [\n 'action' => ManagerInterface::ACTION_CREATE,\n 'entity_type_id' => 'node',\n ],\n // Update action.\n [\n 'action' => ManagerInterface::ACTION_UPDATE,\n 'entity_type_id' => 'user',\n 'id' => 1,\n ],\n ];\n }", "title": "" }, { "docid": "cc15e268d7f19475118f1a3872565cf8", "score": "0.53219724", "text": "public function entities();", "title": "" }, { "docid": "2832aeef88eae0e77534ec3047c4bba0", "score": "0.53217363", "text": "public function getInner(): MapInterface\n {\n return $this->map;\n }", "title": "" }, { "docid": "93149be1792bdbe83278f0a1c4a0422b", "score": "0.53140336", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'CREATED_DATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'DATE_START' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t),\n\t\t\t'DATE_STOP' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'TASK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'MINUTES' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'SECONDS' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'SOURCE' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'COMMENT_TEXT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t),\n\n\t\t\t// references\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'TASK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Tasks\\Internals\\TaskTable',\n\t\t\t\t'reference' => array('=this.TASK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "275d97641c61ea30bc09dc767b0e3863", "score": "0.53000456", "text": "public function getInstanceMap(iterable $entities): array;", "title": "" }, { "docid": "44faf78d328df09bcadeb6c95ef5e512", "score": "0.5299729", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_MESSAGE_ID_FIELD'),\n\t\t\t),\n\t\t\t'PARAM_NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateParamName'),\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_NAME_FIELD'),\n\t\t\t),\n\t\t\t'PARAM_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateParamValue'),\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_VALUE_FIELD'),\n\t\t\t\t'save_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getSaveModificator'),\n\t\t\t\t'fetch_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getFetchModificator'),\n\t\t\t),\n\t\t\t'PARAM_JSON' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_JSON_FIELD'),\n\t\t\t\t'save_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getSaveModificator'),\n\t\t\t\t'fetch_data_modification' => array('\\Bitrix\\Main\\Text\\Emoji', 'getFetchModificator'),\n\t\t\t),\n\t\t\t'MESSAGE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Im\\Model\\MessageTable',\n\t\t\t\t'reference' => array('=this.MESSAGE_ID' => 'ref.ID'),\n\t\t\t\t'join_type' => 'INNER',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "5f4ca67f8cc13b36ad1149865a4e7dcd", "score": "0.5278651", "text": "public function properties(): MapInterface\n {\n return $this->properties;\n }", "title": "" }, { "docid": "eefe52aa7f2bc4b8a20ad831e5519730", "score": "0.5274723", "text": "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n ),\n 'USER' => array(\n 'data_type' => 'Bitrix\\Main\\UserTable',\n 'reference' => array('=this.USER_ID' => 'ref.ID'),\n ),\n 'DATE_SIGNED' => array(\n 'data_type' => 'datetime'\n ),\n );\n }", "title": "" }, { "docid": "3e9bf5fb2624198ceb219ebd3688b5cc", "score": "0.5273798", "text": "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'email' => array(\n 'type' => 'string',\n ),\n 'username' => array(\n 'type' => 'string',\n ),\n 'password' => array(\n 'type' => 'string',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'textpass' => array(\n 'type' => 'string',\n ),\n 'avatar' => array(\n 'type' => 'string',\n ),\n 'original_avatar' => array(\n 'type' => 'string',\n ),\n 'nickname' => array(\n 'type' => 'string',\n ),\n 'desc' => array(\n 'type' => 'string',\n ),\n 'province' => array(\n 'type' => 'string',\n ),\n 'city' => array(\n 'type' => 'string',\n ),\n 'dtvsp' => array(\n 'type' => 'string',\n ),\n 'device_id' => array(\n 'type' => 'string',\n ),\n 'referer' => array(\n 'type' => 'string',\n ),\n 'type' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "title": "" }, { "docid": "b6feec162532f991ee9bbf6a10d8508b", "score": "0.52705413", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'CODE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCode'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_CODE_FIELD'),\n\t\t\t),\n\t\t\t'SEQ_VALUE' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_SEQ_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "451bfa70d95638b80495f4e3c4848939", "score": "0.52687556", "text": "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "title": "" }, { "docid": "451bfa70d95638b80495f4e3c4848939", "score": "0.52687556", "text": "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "title": "" }, { "docid": "451bfa70d95638b80495f4e3c4848939", "score": "0.52687556", "text": "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "title": "" }, { "docid": "451bfa70d95638b80495f4e3c4848939", "score": "0.52687556", "text": "public function getEntity( )\n {\n\n return $this->entity;\n\n }", "title": "" }, { "docid": "b77735ad46fe36c7703267a37802902c", "score": "0.526069", "text": "public function getEntities();", "title": "" }, { "docid": "5dac36f386255c191037b166a26f827f", "score": "0.525877", "text": "public function getRemovedEntities(): Map\n {\n return $this->removedEntities;\n }", "title": "" }, { "docid": "45f69127cffd43582a49b1941caa14cb", "score": "0.525159", "text": "public function definition()\n {\n return [\n 'projectId' => Project::factory()->create()->id,\n 'localeId' => Locale::factory()->create()->id\n ];\n }", "title": "" }, { "docid": "d0c45ed3e36e2afe841e368da8732094", "score": "0.5248289", "text": "public function getFieldMapping();", "title": "" }, { "docid": "d0c45ed3e36e2afe841e368da8732094", "score": "0.5248289", "text": "public function getFieldMapping();", "title": "" }, { "docid": "37f1be7a716eae8d406efee2f9b20a2f", "score": "0.52360946", "text": "public function getAutoloadMap()\n {\n return $this->_aMap;\n }", "title": "" }, { "docid": "f2009379f4c66e20c9bf1dbb2be7c535", "score": "0.52357495", "text": "public function map()\n {\n $item = $this->item;\n\n $map = [];\n $map['#last_amended_date'] = $item['updated_at'];\n $map['#unique_id'] = $item['id'];\n $map['#agent_ref'] = $item['reference'];\n $map['#euro_price'] = intval($item['price'] * ($this->saleType() == 'holiday' ? 4 : 1));\n $map['#sale_type'] = $this->saleType();\n $map['#property_type'] = $this->property_type();\n $map['town'] = $item['location']['city'];\n $map['location_detail'] = $item['location']['district'];\n $map['province'] = $item['location']['state'];\n $map['description'] = $this->tranlatedText($item['description']);\n $map['images'] = $this->images();\n $map['#bedrooms'] = intval($item['rooms']);\n $map['#bathrooms'] = intval($item['baths']);\n $map['#pool'] = empty($item['features']['pool']) ? 0 : 1;\n $map['#aircon'] = empty($item['features']['air-conditioning']) ? 0 : 1;\n $map['#heating'] = empty($item['features']['heating']) ? 0 : 1;\n $map['#garage'] = empty($item['features']['garage']) ? 0 : 1;\n\n return $map;\n }", "title": "" }, { "docid": "a23b012aa85ba341fa9d6e74382ead87", "score": "0.5230763", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t],\n\t\t\t'TRACE_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t],\n\t\t\t'LEVEL' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t],\n\t\t\t'CODE' => [\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t],\n\t\t\t'SOURCE_CHILD_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t],\n\t\t\t'PROCESSED' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t\t'values' => [0, 1]\n\t\t\t],\n\t\t\t'TRACE' => [\n\t\t\t\t'data_type' => TraceTable::class,\n\t\t\t\t'reference' => ['=this.TRACE_ID' => 'ref.ID'],\n\t\t\t],\n\t\t\t'SOURCE_CHILD' => [\n\t\t\t\t'data_type' => SourceChildTable::class,\n\t\t\t\t'reference' => ['=this.SOURCE_CHILD_ID' => 'ref.ID'],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "59b01e8332478df4b5fa6b0bcf0e23ca", "score": "0.5220391", "text": "public function epGetClassMap();", "title": "" }, { "docid": "7d437807bfa3b267da51a8216bfc0c25", "score": "0.52198064", "text": "public function getEntity() {\n return $this->entity;\n }", "title": "" }, { "docid": "7d437807bfa3b267da51a8216bfc0c25", "score": "0.52198064", "text": "public function getEntity() {\n return $this->entity;\n }", "title": "" }, { "docid": "56dc71b2b24d1423d0a1ff610d092828", "score": "0.52104545", "text": "public function getProperties(): Map;", "title": "" }, { "docid": "ed379b5f703e1527f700748db4132458", "score": "0.52088845", "text": "public function epGetClassMap() {\n return $this->ep_cm;\n }", "title": "" }, { "docid": "ea12cbb5b7df19d72a23b4f4f088c87b", "score": "0.5207592", "text": "public static function getMap()\n\t{\n\t\t$fieldsMap = array(\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => '\\Bitrix\\Main\\User',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'GROUP_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true\n\t\t\t),\n\t\t\t'GROUP' => array(\n\t\t\t\t'data_type' => '\\Bitrix\\Socialnetwork\\Workgroup',\n\t\t\t\t'reference' => array('=this.GROUP_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'DATE_ADD' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t);\n\n\t\treturn $fieldsMap;\n\t}", "title": "" }, { "docid": "f5f6921e1d4829fd0d55a1d85399e42a", "score": "0.5206534", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array(\n\t\t\t\t\t'=this.USER_ID' => 'ref.ID'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t),\n\t\t\t'AVATAR' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'POINTS' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'RANK_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'NUM_POSTS' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'INTERESTS' => array(\n\t\t\t\t'data_type' => 'text'\n\t\t\t),\n\t\t\t'LAST_POST' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'SIGNATURE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'IP_ADDRESS' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'size' => 255\n\t\t\t),\n\t\t\t'REAL_IP_ADDRESS' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'size' => 255\n\t\t\t),\n\t\t\t'DATE_REG' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function(){return new DateTime();}\n\t\t\t),\n\t\t\t'LAST_VISIT' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function(){return new DateTime();}\n\t\t\t),\n\t\t\t'ALLOW_POST' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t),\n\t\t\t'SHOW_NAME' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t),\n\t\t\t'HIDE_FROM_ONLINE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"N\"\n\t\t\t),\n\t\t\t'SUBSC_GROUP_MESSAGE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"N\"\n\t\t\t),\n\t\t\t'SUBSC_GET_MY_MESSAGE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t)\n\t\t);\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "39393d1135f70ce6a5a4f5257cb447c7", "score": "0.0", "text": "public function edit($id)\n {\n //\n $user = User::find($id);\n $data = array(\n \"user\" => $user\n );\n\n //return view(\"edit\", $data);\n return response()->json($data);\n }", "title": "" } ]
[ { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.78924835", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.7810695", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.769519", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4bdbe4ff8aec98fee963bdf4dbf6da91", "score": "0.75132114", "text": "public function edit(FormBuilder $formBuilder, $course, Resource $resource)\n {\n //\n $edit = $formBuilder->create(\\App\\Forms\\Resource::class, [\n 'method' => 'PATCH',\n 'url' => route('resource.update', [$course, $resource->id]),\n 'model' => $resource,\n ]);\n //\n $delete = $formBuilder->create(\\App\\Forms\\DeleteForm::class, [\n 'method' => 'DELETE',\n 'url' => route('resource.destroy', [$course, $resource->id]),\n ]);\n $pageTitle = 'Edit Resource';\n return view('resources.formEdit', compact('edit','delete', 'pageTitle'));\n\n }", "title": "" }, { "docid": "93f7e624d9e32a9fbf006f4f83dae8a8", "score": "0.74871564", "text": "public function edit($id)\n {\n /*show edit form*/\n }", "title": "" }, { "docid": "1404e57fbb5774c03bfe25411f8fe287", "score": "0.73302686", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n \n $data = [\n 'resource' => $resource,\n ];\n\n return view('resources.edit-resource')->with($data);\n }", "title": "" }, { "docid": "ed0028dbd1fbb47ee337d77b8a651d9a", "score": "0.73022586", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/edit', compact('resource'));\n\t}", "title": "" }, { "docid": "4753e80c2af19bb37f8b9df0bf10829e", "score": "0.726226", "text": "public function edit( )\n\t{\n\t\t// show\n\t}", "title": "" }, { "docid": "2d0354bc64da2d977cfd60754017882b", "score": "0.72584474", "text": "public function edit($id)\n {\n $userdata = Resources::findOrFail($id);\n return view('admin.resource.edit', compact('userdata'));\n }", "title": "" }, { "docid": "8c5ec66a768a8406204fdc19e3dec141", "score": "0.72386426", "text": "public function edit($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Edit');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "f486aa2dad1b98a29b575e9dba22938d", "score": "0.7132497", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.edit')->with(compact('resource'));\n }", "title": "" }, { "docid": "654b96e5d414d66677bf1e3d1695b1d8", "score": "0.7120603", "text": "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "title": "" }, { "docid": "8640b0c244bf00ab3b420106f09d5eb1", "score": "0.71160936", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $form = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ecbdcecae7d17f5fd47a1b3471865b07", "score": "0.71144456", "text": "public function edit($resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n return view('laramanager::resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "ab1c5f00384bd443c0312a8cedd635d9", "score": "0.70970047", "text": "function edit() {\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$productId = KRequest::getInt('productId');\n\t\t$matrixId = KRequest::getInt('id');\n\n\t\t$view = $this->getDefaultViewForm();\n\t\t$view->setProductId($productId);\n\t\t$view->setMatrixId($matrixId);\n\t\t$view->display();\n\n\t}", "title": "" }, { "docid": "5df52742ed05bd924198604d4236743d", "score": "0.70601755", "text": "public function edit($id)\n {\n //$resource = Resource::findOrFail($id);\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n SyncService::SyncResourcesTable();\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "6c1e231bfb659c518730d45c158fa402", "score": "0.7041746", "text": "public function edit($id)\n\t{\n\t\t$resource = $this->repository->getResource($id);\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.edit', compact(['resource', 'menuTab']));\n\t}", "title": "" }, { "docid": "9c8836b3e3aa143dfa78083f839f6e60", "score": "0.70391995", "text": "public function editAction()\n {\n $request = $this->getRequest();\n\t\t$id = $request->getParam(\"id\");\n\n $form = new Application_Form_Book();\n $book = new Application_Model_Book();\n\t\t$mapper = new Application_Model_BookMapper();\n $mapper->find($id, $book);\n\t\t\n\t\t$form->populate($book);\n\t\t\n\t\t$this->view->form=$form;\n\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70033234", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69474626", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "0aee08a6c8d208457326de0c63ab1d93", "score": "0.69425774", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->revision->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['revision' => $this->revision]);\n\t}", "title": "" }, { "docid": "13550b89e98e00015a895299bc148377", "score": "0.69365096", "text": "public function editAction()\n {\n $assign_id = $this->_getParam('assign');\n $this->_includeForm($assign_id);\n }", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69348013", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6acf67aab48fd2b396026c0eeb096874", "score": "0.6913291", "text": "public function edit()\n {\n return view('prappo::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6913111", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "291ee83a27f023635ff2c99d1e9ea7a6", "score": "0.6904886", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'em' => $this->getDoctrine()->getManager(),\n 'action' => $this->generateUrl('resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn btn-primary',\n ),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "53a8dd3945e8d394e8af0378fcb0759a", "score": "0.68766063", "text": "public function edit($id)\n\t{\n // get\n $resident = Resident::find($id);\n\n // show the edit form and pass\n return View::make('residents.edit')\n ->with('resident', $resident);\n\t}", "title": "" }, { "docid": "b1f8a3dd503a02e69fbec578be1ee9d1", "score": "0.6865325", "text": "public function editForm($id)\n\t{\n\t\t$job = Job::find($id);\n\t\tif(!$job)\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\treturn View::make('admin.jobs.edit')->with(array(\n\t\t\t'title' => 'Edition de '.$job->name,\n\t\t\t'job' => $job\n\t\t));\n\t}", "title": "" }, { "docid": "6fe32e6f0c7ebd96d516ccbe60770da8", "score": "0.68651867", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'field');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "766ad0e46f9488ff1bb3e99bffd9b013", "score": "0.68605846", "text": "public function edit($id)\n {\n return view('formbuilder::edit');\n }", "title": "" }, { "docid": "3adf6e4a4db6770a78d161ea39e0d09a", "score": "0.68597305", "text": "public function editAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n $form = $model->getForm();\n $params = $request->getParams();\n\n $model->load($request->getParam('id'));\n\n $form->injectDependencies($model, $params);\n\n if (! $model->id) {\n $message = sprintf(self::MSG_LOAD_FAILURE, $this->_modelName);\n $this->flashAndRedirect($message, 'error', array(\n 'module' => $request->getModuleName(),\n 'controller' => $request->getControllerName(),\n 'action' => 'index',\n ));\n }\n\n if ($request->isPost()) {\n try {\n $this->_edit($model, $request);\n } catch (Zend_Exception $exception) {\n $get = $this->_getGetRequest();\n $this->flashAndRedirect($exception->getMessage(), 'error', $get);\n }\n }\n\n $this->view->form = $form;\n $this->view->model = $model;\n\n }", "title": "" }, { "docid": "d56e1574f0c5378fe3811673b7df8b42", "score": "0.6853364", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Associate';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "489dd9e64fb4a5c656aedbd3e14c8922", "score": "0.6849436", "text": "public function edit($id)\n\t{\n\t\t$question = Question::findOrFail($id);\n return view('admin.question.form', compact('question'));\n\t}", "title": "" }, { "docid": "9f631e40538fb44577d89db78f7348d8", "score": "0.68490803", "text": "public function edit($id)\n {\n\t\t$user = $this->repository->findOneById($id);\n\n return view($this->base . 'form',compact('user'));\n }", "title": "" }, { "docid": "ebdfabd30fdb198a4595764f3e45e18f", "score": "0.6835259", "text": "public function actionEdit()\n {\n $this->view->article = Article::findById((int)$_GET['id']);\n $this->view->display(__DIR__ . '/../../../templates/admin/edit.php');\n }", "title": "" }, { "docid": "8f4207c19a0c7a6f7e5ad8a14497a90f", "score": "0.68264955", "text": "public function edit($id)\n\t{\n\t\treturn \"Shows a form for editing a specific post\";\n\t}", "title": "" }, { "docid": "3968d721d2d6a0540f1d6feba20cef0c", "score": "0.6824088", "text": "public function edit($id)\n {\n return view('controllers.resource-controllers.edit', compact('id'));\n }", "title": "" }, { "docid": "43a06ccc90a0e604ffd06cacb786b0ff", "score": "0.682211", "text": "public function edit($id)\n\t{\n\t\t$student = $this->students->findById($id);\n return View::make('students._form', array('student' => $student, 'exists' => true));\n\n\t}", "title": "" }, { "docid": "dd6567bb75ad8b2f5dcd4461b639f0e6", "score": "0.6821583", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('formbuilder::form.edit',compact('form'));\n }", "title": "" }, { "docid": "ca5f52bec4884c7fcd8605fda797f2e0", "score": "0.6813522", "text": "public function edit($id)\n {\n $form =\\App\\Form::find($id);\n return view('form.edit',compact('form'));\n }", "title": "" }, { "docid": "07993cef1b04896170dffd4d46ed96aa", "score": "0.6813223", "text": "public function edit($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "42fefa0bb00f6a35ff461a006d5fb4fe", "score": "0.681089", "text": "public function editForm()\n {\n $data = [\n 'question' => App::get('database')->select('questions', 'id', $_GET['id']),\n 'answers' => App::get('database')->select('answers', 'answer_id', $_GET['id'])\n ];\n\n return view('questions.edit', compact('data'));\n }", "title": "" }, { "docid": "5dbf6a424144f5f1ea70f7e2584cb814", "score": "0.6806671", "text": "public function edit()\r\n {\r\n return view('admin::edit');\r\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.6804348", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "62c2bf22604789e0fe0631318bc4da7e", "score": "0.6795873", "text": "public function edit() {\n\t\t/* CHANGED - switched to url(\"id\") as $this->param(\"id\") is deprecated */\n\t $this->id = WaxUrl::get(\"id\");\n\t\tif(!$this->id) $this->id = $this->route_array[0];\n $this->model = new $this->model_class($this->id);\n \n\t\t$this->form = $this->render_partial(\"form\");\n\t\tif($_POST['cancel']) $this->redirect_to(Session::get(\"list_refer\"));\n\t\tif($_POST['save']) $this->save($this->model, \"edit\");\n\t\telse $this->save($this->model, Session::get(\"list_refer\"));\n\t}", "title": "" }, { "docid": "4d4b5c8d6ba885d863626bf0f1e99725", "score": "0.6792428", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('car' => $this->resource,\n \t\t\t\t\t\t\t\t 'categories' => Category::ClassListSelectInput(),\n \t\t\t\t\t\t\t\t 'carList' => Car::carListSelectOptions()\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "86d596efe1714c0e50410fc7134cd9e3", "score": "0.6791974", "text": "public function edit()\n {\n return view('berating::edit');\n }", "title": "" }, { "docid": "2147ded57d317abac917ded7bf4c5589", "score": "0.6790756", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'user.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "cadf80168cda3fc14631174ff8ec05e6", "score": "0.67702585", "text": "public function editAction()\n {\n $model = $this->_initModel();\n\n // make sure that the model exists before continuing\n if ($this->_getRequestedId() && !$model && !$model->getId()) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('This ' . $this->_getObjectLabel() . ' no longer exist or is corrupt.'));\n $this->_redirect('*/*/');\n } else {\n $this->_initAction()->renderLayout();\n }\n }", "title": "" }, { "docid": "b475fc8e937568a510257d6507f3a6e2", "score": "0.6770107", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('admin.product.form',[ 'product' => $product ]);\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.676094", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "ac62d8f04a855af96ee81ddcc7f43f6a", "score": "0.67512125", "text": "public function edit(): void\n {\n $this->showEditPage($this->getItem());\n }", "title": "" }, { "docid": "e87e608ddadfa3687caa6cc9477425cf", "score": "0.6747314", "text": "public function edit($id)\n {\n $is_edit = true;\n $product = Product::find($id);\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "f317696c87c55af5bdb2c774e7855698", "score": "0.6742636", "text": "public function edit(Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $page=Page::all();\n // return view('resource.edit',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "2a0de8686ce09f7bacd45838296d3aac", "score": "0.67410463", "text": "public function edit($id)\n {\n if(Gate::denies('familia-edit')){\n abort(403,\"Não autorizado!\");\n }\n\n $familia = Familia::find($id);\n\n return view('familias.form',compact('familia'));\n }", "title": "" }, { "docid": "6d0cd677e592e2179223532437971edd", "score": "0.6729273", "text": "public function edit($id)\n\t{\n return view($this->path . 'edit', ['record' => Record::find($id)] );\n\t}", "title": "" }, { "docid": "8ecab6633b0244e83acc1262c8f70524", "score": "0.6726292", "text": "public function edit($id)\n\t{\n\t\t$famoso = Famoso::find($id);\n\n\t\t// show the edit form and pass the object\n\t\treturn View::make('famoso.edit')\n\t\t\t->with('famoso', $famoso);\n\t}", "title": "" }, { "docid": "5e95479074ff3a4269a77c41326ace59", "score": "0.67248", "text": "public function editing(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"editing\");\n\t}", "title": "" }, { "docid": "e9232910411eba7ae6c98603663c9453", "score": "0.67211163", "text": "public function edit($id)\n {\n $company = Company::find($id);\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "73c3c8ef8ccb5ebffbd7c9d1617e5de2", "score": "0.67186904", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //BmDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view,\n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "1d24319a1462677632ee7717aa20a61d", "score": "0.6717305", "text": "public function edit($id)\n { \n \treturn view(\"gestion.formularios.edit\",[\"formulario\"=>Formulario::findOrFail($id)]); \n }", "title": "" }, { "docid": "2a667f76d35f0224dbbf223e12e110af", "score": "0.67093575", "text": "public function actionEdit($id)\n\t{\n\t\t$form = $this->getComponent('rightResourceForm');\n\t\t/* @var $form Form */\n\n\t\t$submit = $form->addSubmit(FormBuilder::SUBMIT_EDIT, 'upravit zdroj oprávnění');\n\t\t$submit->onClick[] = callback($this,'edit');\n\n\t\t$form->addSubmit('stortno', \"storno\")->setValidationScope(false)->onClick[] = callback($this,'formStorno');\n\t}", "title": "" }, { "docid": "4e3f60120231c9e9fb4516dda6cad799", "score": "0.6701199", "text": "public function edit($id)\n {\n $entity = Entity::query()->find($id);\n return view('crudgenerator::entities.edit', compact('entity'));\n }", "title": "" }, { "docid": "a7dded643ee65e6b9cf08ef89ee539b6", "score": "0.6701186", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->presentation->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['presentation' => $this->presentation]);\n\t}", "title": "" }, { "docid": "b3e1f1e6d5549bd781053c989eb1e847", "score": "0.66972214", "text": "public function edit($id)\n {\n $author = Author::find($id);\n return view('admin.author.form',['author' => $author]); \n }", "title": "" }, { "docid": "fe08627e9afbe6ed7f13f71f273030a1", "score": "0.6696401", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n return View::make('system.Employee.edit',compact(\"employee\"));\n\t}", "title": "" }, { "docid": "b8547be61d1a0bb98b26ec7de01610cd", "score": "0.668774", "text": "public function edit($id, FormBuilder $form_builder): Renderable\n {\n $existing_product = $this->product_repository->getById($id);\n\n $form = $form_builder->create('App\\Forms\\Product\\EditForm', [\n 'method' => 'PUT',\n 'url' => route('product.update'),\n 'model' => $existing_product\n ]);\n\n return view('product.modify', compact('form'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6682422", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.66796196", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "44ff363bc16fe7311c23454456531dbc", "score": "0.6679247", "text": "public function edit_item()\n {\n $this->check_authorization();\n \n $id = $this->get_arg('id', 0);\n $item = Item::find($id); \n $data['item'] = $item;\n $data['breadcrumbs'] = $this->generate_breadcrumbs(\n $item->category_id,\n array('/show_item?id='.$item->id => $item->name)\n );\n\n return new View('item_form', $data); \n }", "title": "" }, { "docid": "41567083a127c71ff96104505b7b5dec", "score": "0.6676899", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.666716", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6666833", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "adb01bd13a4dfbf550016516570e7b60", "score": "0.6665537", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('station' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "5fa4968110c48bd9bdcff5495b19f29a", "score": "0.6654247", "text": "public function edit()\n {\n return view('task::edit');\n }", "title": "" }, { "docid": "c13dfacb9aed13d70a670ff15ea907b6", "score": "0.6651044", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmpleadoBundle:Empleado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Empleado entity.');\n }\n\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n \n\n return $this->render('PanelBundle:Empleado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "58f55c0117c1a36e605cb5c2aabc68e3", "score": "0.6642671", "text": "public function edit() {\n\t\t$author = pick_arg(Author::class) ?: new Author;\n\t\treturn $this->viewEdit(compact('author'));\n\t}", "title": "" }, { "docid": "221efc99f3dd40c0f971d42862c5b218", "score": "0.6637486", "text": "public function edit($id)\n\t{\n\t\tif(!$this->autorizado) return Redirect::to('/login');\n\t\t$modelo = Modelo::find($id);\n\t\tif (is_null ($modelo))\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\t\treturn View::make('models.form')->with('modelo', $modelo);\n\t}", "title": "" }, { "docid": "b912d383bf373377209a233f3ceefe90", "score": "0.6630979", "text": "public function editAction($id) {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entity = $em->getRepository('MedicinaKernelBundle:Oficina')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('No se ha encontrado la oficina solicitada');\r\n }\r\n\r\n $editForm = $this->createForm(new OficinaType(), $entity);\r\n\r\n return $this->render('BackendBundle:Oficina:edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $editForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6629606", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "e69682a60ea811251468072e63bf80cb", "score": "0.6627009", "text": "public function showEditForm($id)\n\t{\n\t\t$post = Post::where('id', $id)->first();\n\t\treturn view('admin.post.edit', ['post' => $post]);\n\t}", "title": "" }, { "docid": "bb154b1db81c97b24dc305b03e48e156", "score": "0.66258526", "text": "function edit() {\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "4ba7055b2304ab3f588267e488d1cfb9", "score": "0.6623131", "text": "function viewedit(){\n $id=Request::read('id');\n \n $nota = $this->getModel()->getNota($id);\n $this->getModel()->addData('titulo', $nota->getTitulo());\n $this->getModel()->addData('contenido', $nota->getContenido());\n $this->getModel()->addData('favorito', $nota->getFavorito());\n $this->getModel()->addData('idNotas', $nota->getId());\n $this->getModel()->addData('idUsuario', $nota->getIdUsuario());\n $this->getModel()->addFile('form', 'sections/nota/formEdit.html');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.6620521", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "c9ce59f5b770500a9924cc8e0f97bf72", "score": "0.6619644", "text": "public function edit($id)\n {\n $resident = Resident::where('id','=',$id)->with('relatives')->first();\n return view('survey.family-member-form.edit', compact('resident'));\n }", "title": "" }, { "docid": "63720603ef56686d63e3133a9a3ec385", "score": "0.66143847", "text": "public function edit()\n {\n return view('mgdestino::edit');\n }", "title": "" }, { "docid": "09ca9097e9f59afd7ab61c2fa4368b57", "score": "0.661253", "text": "public function showEditForm($id)\r\r\n {\r\r\n $userinfo = User::findOrFail($id);\r\r\n return view('/auth/edituser', compact('userinfo'));\r\r\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6611915", "text": "public function edit($id);", "title": "" }, { "docid": "f77eec10d5891a2545e2b33ab8d59228", "score": "0.6610485", "text": "public function edit()\n {\n $company = Company::first();\n return view('company.edit',compact('company'));\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610249", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610249", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "9ec66c39b4a9570023bc9493ee748e0e", "score": "0.6607048", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(\n [\n 'user' => $this->toArray($this->findOr404()),\n 'check_icon' => '<li><ion-icon name=\"checkmark-outline\"></ion-icon></li>',\n 'close_icon' => '<ion-icon name=\"close-outline\"></ion-icon>'\n ]\n )\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "f1396c5dcd191e30f534693231be69da", "score": "0.6603662", "text": "public function edit()\n {\n return view('usersupplier::edit');\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.65986454", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "5f22addb2b8cf9ad635b7e8fa77bb71c", "score": "0.6596766", "text": "public function edit()\n {\n return view('mgcatalogos::edit');\n }", "title": "" }, { "docid": "751bc10498bcb4f6f6569034693a7061", "score": "0.65928566", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = SPM::find($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "bdaf931446dd96d9ab719a5b26c06691", "score": "0.6591597", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $form = $formBuilder->create(\\App\\Forms\\BookForm::class, [\n 'method' => 'PUT',\n 'url' => route('book.update',$id),\n ]);\n $books = Book::find($id);\n return view($this->folder.'.edit',compact('books','form'));\n }", "title": "" }, { "docid": "fbf7adc2631fd986ff97047f975f7733", "score": "0.6591146", "text": "public function formEdit($id)\n {\n //data poli berdasarkan id poli\n $poli = Poli::find($id);\n\n return view('poli.edit', compact('poli'));\n }", "title": "" }, { "docid": "300b72dd1771af8bcd33044e19ed0e2d", "score": "0.65877336", "text": "public function edit($id)\n\t{\n\t\t// get the nerd\n\t\t$user = Cliente::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('preinscrito.editar')\n\t\t\t->with('user', $user);\n\t}", "title": "" }, { "docid": "f39615b9da8997b13628876a6e82ad26", "score": "0.6585353", "text": "public function edit()\n {\n return view('bill::edit');\n }", "title": "" }, { "docid": "48a8ca09ce387a26578ef11260681196", "score": "0.65815216", "text": "public function editform($id){\n $cultivo = Cultivo::findOrFail($id);\n\n return view(\"editform\", compact(\"cultivo\"));\n }", "title": "" } ]
a2b1efef6bcc8cb2b03ea3e2aa936ebc
Set the value of Thumbnail Height
[ { "docid": "92571127f570ffdef911ace29eb95730", "score": "0.67987883", "text": "public function setThumbnailHeight($thumbnailHeight)\n {\n $this->thumbnailHeight = $thumbnailHeight;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "8303e4e157eba9e4f78b9c122a9c4576", "score": "0.76844245", "text": "public function getThumbnailHeight()\n {\n return $this->thumbnailHeight;\n }", "title": "" }, { "docid": "7a7d8212129581babae08bb414e689b6", "score": "0.7600855", "text": "public function getThumbnailHeight() {\n\t\treturn $this->thumbnail_height;\n\t}", "title": "" }, { "docid": "ff6a1131e82a0eeb1ab1f6dea4954b3f", "score": "0.74988955", "text": "public function setImageHeight($value)\n {\n $this->_image_height = $value;\n return $this;\n }", "title": "" }, { "docid": "166884e23a8c8303585c8ddcb0ba8454", "score": "0.74859494", "text": "function getThumbHeight()\n {\n return $this->thumbHeight;\n }", "title": "" }, { "docid": "c51bbaaf67bf9d266dc844ec66f8527a", "score": "0.7403191", "text": "public function setHeight($value);", "title": "" }, { "docid": "b779f2a7a09f41d2f166bdd3d12c9398", "score": "0.7332905", "text": "public function setImageHeight($height=100)\r\n\t{\r\n\t\t//height\r\n\t\t$this->image[\"sizey_thumb\"] = $height;\r\n\t\t$this->image[\"sizex_thumb\"] = ($this->image[\"sizey_thumb\"]/$this->image[\"sizey\"])*$this->image[\"sizex\"];\r\n\t}", "title": "" }, { "docid": "75088372b598bbc1994852c50716c3e8", "score": "0.7044367", "text": "public function setHeight($value)\n {\n $this->_height = intval($value);\n }", "title": "" }, { "docid": "f61174dfeda6017e6a8aa72be4a0f397", "score": "0.7027705", "text": "public function ImageThumbnail() { \n\t\treturn $this->HeroImage()->SetHeight(100); \n\t}", "title": "" }, { "docid": "7fbc5f87122b217110a04b571edcb17b", "score": "0.68892914", "text": "function get_height()\n\t\t{\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\tif(isset($_wp_additional_image_sizes[$this->config['size']]['width']))\n\t\t\t{\n\t\t\t\t$width = $_wp_additional_image_sizes[$this->config['size']]['width'];\n\t\t\t\t$height = $_wp_additional_image_sizes[$this->config['size']]['height'];\n\t\t\t}\n\t\t\telse if($width = get_option( $this->config['size'].'_size_w' ))\n\t\t\t{\n\t\t\t\t$height = get_option( $this->config['size'].'_size_h' );\n\t\t\t}\n\t\t\t\n\t\t\t$this->config['max-height']\t\t= $height;\n\t\t\t$this->config['default-height'] = (100/$width) * $height;\n\t\t}", "title": "" }, { "docid": "683e202908b3d2c8edb4153c63e3b365", "score": "0.67781067", "text": "public function setHeight($height);", "title": "" }, { "docid": "683e202908b3d2c8edb4153c63e3b365", "score": "0.67781067", "text": "public function setHeight($height);", "title": "" }, { "docid": "bd1f7d58c38fb2b219aa20b977977502", "score": "0.67565656", "text": "function convergence_add_image_size() {\r\n\tset_post_thumbnail_size(150, 85, false);\r\n\r\n\tupdate_option('thumbnail_size_w', 270);\r\n\tupdate_option('thumbnail_size_h', 150);\r\n\tupdate_option('thumbnail_crop', false);\r\n}", "title": "" }, { "docid": "ec1632a39005c03e6e0cbae9914186cd", "score": "0.6720997", "text": "public function setHeight( $val ) {\n $this->_height = abs( $val );\n }", "title": "" }, { "docid": "3276d700689f14351eae859dc9f82c80", "score": "0.6718554", "text": "public function add_thumb_size() {\n\t\tadd_image_size( 'gamos-profile', 260, 185, true );\n\t}", "title": "" }, { "docid": "4851d3d3e9807311181216024acec2da", "score": "0.65808463", "text": "public function resizeExactHeight(&$image, $newHeight);", "title": "" }, { "docid": "cdd14099deb36dfd69a83d95e5fdfe4b", "score": "0.65266204", "text": "public function height($value) {\n return $this->setProperty('height', $value);\n }", "title": "" }, { "docid": "7e73cf258dd164873b20b2397c0e4718", "score": "0.6524802", "text": "public function setHeight($value)\n {\n return $this->set(self::HEIGHT, $value);\n }", "title": "" }, { "docid": "7e73cf258dd164873b20b2397c0e4718", "score": "0.6524802", "text": "public function setHeight($value)\n {\n return $this->set(self::HEIGHT, $value);\n }", "title": "" }, { "docid": "fe93e0003c3871a88c87bb9cedc359b6", "score": "0.65224075", "text": "function getHeight() {\n $config = services::getService('config');\n\n // BILDGRÖSSE DES AUSGANGBILDES ERMITTELN\n $size = getimagesize($config->getSetting('doc_root').'images/uploads/_'.$this->name);\n \n $this->width = $size[0];\n $this->height = $size[1];\n return $this->height+32;\n }", "title": "" }, { "docid": "ad8fb79ecd6aeade259e5847c24e96fa", "score": "0.6479874", "text": "public function automaticallySetThumbnail();", "title": "" }, { "docid": "6a2e3819ce5c6b215e69421241f9ddfa", "score": "0.64231205", "text": "function setHeight(DynamicValue$p_height):void\n {\n $this->height=$p_height;\n }", "title": "" }, { "docid": "2af5e924541599da7f15ef932242d2f9", "score": "0.6381297", "text": "public function setPreviewPixelHeightValue($var)\n {\n $wrappedVar = is_null($var) ? null : new \\Google\\Protobuf\\Int64Value(['value' => $var]);\n return $this->setPreviewPixelHeight($wrappedVar);\n }", "title": "" }, { "docid": "0ae4011953f15f23c080d83a5825f66b", "score": "0.63763356", "text": "private function setDimensions()\n {\n list($width, $height) = getimagesize($this->filePath);\n\n if ($this->height === null) {\n $this->height = $height;\n }\n\n if ($this->width === null) {\n $this->width = $width;\n }\n }", "title": "" }, { "docid": "42ee4db15c656fea493c8f28fb0a0513", "score": "0.63733184", "text": "function thumbnail_setup() {\n\tadd_image_size( 'blog-thumb-80', 80, 80, true );\n\tadd_image_size( 'blog-thumb-120', 120, 120, true );\n\tadd_image_size( 'blog-thumb-160', 160, 160, true );\n\tadd_image_size( 'blog-content-thumb-300', 300, 200, true );\n\tadd_image_size( 'blog-content-thumb-600', 600, 400, true );\n\n\tadd_image_size( 'timeline-280', 280, 186, true );\n\tadd_image_size( 'timeline-560', 280 * 2, 186 * 2, true );\n\n\tadd_image_size( 'employee-main-300', 300, 999, false );\n\tadd_image_size( 'employee-main-600', 600, 999, false );\n}", "title": "" }, { "docid": "6e4529765c0386a7fa8d9387fb0c6489", "score": "0.6342387", "text": "private function _setHeight($value) {\n\t\tforeach($value as $i=>$item) {\n\t\t\tif(!@$this->_rows[$i][\"height\"]) $this->_rows[$i][\"height\"] = $item;\n\t\t}\n\t}", "title": "" }, { "docid": "99550a3026986356c6c97406d521ae95", "score": "0.63108915", "text": "public function height($value = null)\n\t{\n\t\t$this->attributes['height'] = $value;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3a3e94d69b5e55ef61e8c39397285c26", "score": "0.6293896", "text": "public function setHeight($height) {\n $this->height = (int) $height;\n }", "title": "" }, { "docid": "a041b2351d8d2c314479bf1d92b1b957", "score": "0.62884945", "text": "private function setHeight()\n {\n $this->height = max(\n count($this->teams) + 1,\n $this->rainbow->getHeight(),\n $this->cat->getHeight()\n );\n }", "title": "" }, { "docid": "ecfe2b6183760bbde17f8d416c9333f8", "score": "0.6276957", "text": "function setHeight($w)\n {\n $this->height = $w;\n }", "title": "" }, { "docid": "c2d71272934e980d7fe71ba94e731c71", "score": "0.6242433", "text": "protected function getThumbnailDimensions()\n {\n return [64, 64];\n }", "title": "" }, { "docid": "9bd7f230efa0e0276ca93391c31ba51c", "score": "0.6220356", "text": "public function setHeight($height)\n {\n $this->height = (int)$height;\n }", "title": "" }, { "docid": "438da37ad11d492cdc24da09c25a0645", "score": "0.6198531", "text": "public function getImageHeight()\n {\n return $this->_image_height;\n }", "title": "" }, { "docid": "4368e348357e17ffe2bf08569b75f84f", "score": "0.6182702", "text": "public function setHeight($height) {\r\n $this->height = $height;\r\n }", "title": "" }, { "docid": "3cc825fb5f59dadd9be13045a31bf6fb", "score": "0.6160938", "text": "public function setHeight($height)\n {\n $this->height = $height;\n }", "title": "" }, { "docid": "fc4bfe5b8cece40315725de44db9f707", "score": "0.6143652", "text": "public function height($param)\n\t{\n\t\t$this->height = $param; return $this;\n\t}", "title": "" }, { "docid": "9e11d3e9cff16cb1a766a394e10790b9", "score": "0.61374736", "text": "public function get_thumb_size()\n {\n return $this->videoThumbSize;\n }", "title": "" }, { "docid": "21b5d20091864bb3bf7bf5ec89836b79", "score": "0.6131357", "text": "public function setPixelHeightValue($var)\n {\n $wrappedVar = is_null($var) ? null : new \\Google\\Protobuf\\Int64Value(['value' => $var]);\n return $this->setPixelHeight($wrappedVar);\n }", "title": "" }, { "docid": "5451038134815fb577e44879cad6dee4", "score": "0.6119986", "text": "function wpvq_create_thumbnail() {\n\t\tadd_image_size( 'wpvq-square-answer', 300, 300, true);\n\t}", "title": "" }, { "docid": "02b4779c253b2e1d0556b9d18e251a0c", "score": "0.6104423", "text": "public function thumbnailY() { return $this->_m_thumbnailY; }", "title": "" }, { "docid": "eb506bd986e9241d15698f98d2036d73", "score": "0.6092623", "text": "function getHeight() {\n \n return imagesy($this->image);\n }", "title": "" }, { "docid": "c35e6ae44ef8ddf55c58ca00c0db4420", "score": "0.60897464", "text": "function resizeToHeight($height) { \n $ratio = $height / $this->getHeight();\n $width = $this->getWidth() * $ratio;\n $this->resize($width,$height);\n }", "title": "" }, { "docid": "0c04161ec365f5d214cb8c3c4cf0953c", "score": "0.6089322", "text": "public function getImageHeight() {\n if (isset($this->imageDetails[1])) {\n return $this->imageDetails[1];\n }\n return null;\n }", "title": "" }, { "docid": "52b607743f463f6c7e2b42bd58609966", "score": "0.6084618", "text": "public static function height($url, $height = 0, $watermark = false)\n\t{\n\t\treturn ImageHandler::thumb($url, null, $height, $watermark);\n\t}", "title": "" }, { "docid": "2e3beab6b8a38cdab567c35e031e2883", "score": "0.60826814", "text": "public function getImageHeight()\n {\n return $this->imageHeight;\n }", "title": "" }, { "docid": "5d9135c241240828a9e40caa23a962f6", "score": "0.60627943", "text": "function fb_add_thumb_value( $column_name, $post_id ) {\n\t\t\t\n\t\tif ( 'thumbnail' !== $column_name )\n\t\t\treturn;\n\t\t\n\t\t$width = (int) 35;\n\t\t$height = (int) 35;\n\t\t\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'order' => 'ASC', // DESC for the last image\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'post_parent' => get_the_ID(),\n\t\t\t'post_status' => NULL,\n\t\t\t'post_type' => 'attachment'\n\t\t);\n\t\t\n\t\t$attached_image = get_children( $args );\n\t\t\n\t\tif ( $attached_image ) {\n\t\t\tforeach ( $attached_image as $attachment_id => $attachment )\n\t\t\t\techo wp_get_attachment_image( $attachment_id, array( $width, $height ), TRUE );\n\t\t} else {\n\t\t\techo __( 'None' );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f1a78a3e0767aed80215b91aa02929d8", "score": "0.6052228", "text": "public function setHeight($var)\n {\n GPBUtil::checkInt32($var);\n $this->height = $var;\n\n return $this;\n }", "title": "" }, { "docid": "f1a78a3e0767aed80215b91aa02929d8", "score": "0.6052228", "text": "public function setHeight($var)\n {\n GPBUtil::checkInt32($var);\n $this->height = $var;\n\n return $this;\n }", "title": "" }, { "docid": "abca19515ba00c15e74d9666fd983528", "score": "0.6043443", "text": "function &height()\n {\n if ( file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\n {\n $size = getimagesize( $this->filePath( true ) );\n return $size[1];\n }\n else\n return 40;\n }", "title": "" }, { "docid": "67e6245fcaa64d2a342aca9d8a776640", "score": "0.6040834", "text": "function setImageResize($width, $height) {\r\n if($width > 0 && $height > 0){\r\n $this->iLeadingImageWidth = $width;\r\n $this->iLeadingImageHeight = $height;\r\n }\r\n }", "title": "" }, { "docid": "e40dc304fa272e7b2bc75887bb312965", "score": "0.6034726", "text": "public function setHeight( $height )\r\n\t{\r\n\t\t$this->height = $height;\r\n\t}", "title": "" }, { "docid": "bbea565354968da567c91048c2f73d03", "score": "0.602575", "text": "public function setArrowHeight($value) {\r\n $this->point->setVertSize($value);\r\n }", "title": "" }, { "docid": "159d04b12b7e45aa65775b6d0a1ef3a9", "score": "0.60016096", "text": "public function resizeToHeight(int $height): self;", "title": "" }, { "docid": "c0890b30281ca91e8813e86e9f65c8ff", "score": "0.5990864", "text": "public function setHeight($height)\n {\n $this->height = $height;\n }", "title": "" }, { "docid": "4ccf2e1d1b9452ab55b4ca047af8a18b", "score": "0.59744376", "text": "public function getHeight() {\n\t\t$title = $this->getTitle();\n\t\tif($title == 'History') {\n\t\t\t$this->set('height', '2');\n\t\t}\n\t\t$height = $this->get('height');\n\t\tif(empty($height)) {\n\t\t\t$this->set('height', '1');\n\t\t}\n\t\treturn $this->get('height');\n\t}", "title": "" }, { "docid": "ecea0b52aa113c9599d164037f0fcc18", "score": "0.59739095", "text": "public static function set_thumbnail( $width = 0, $height = 0, $crop = false ) {\n\t\tself::add_image_size( 'thumbnail', $width, $height, $crop );\n\t}", "title": "" }, { "docid": "008cf011940a43af07866aed1125f223", "score": "0.5961259", "text": "public function update_config( $ui )\n\t{\n\t\tSession::notice( _t( 'Maximum Thumbnail Dimension set.', 'photology' ) );\n\t\t$ui->save();\n\t}", "title": "" }, { "docid": "eff23ca503f9c896ae08a9bf8acad1d6", "score": "0.5955022", "text": "public function height($int) {\n\t\t$this->options['height'] = $int;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9793dbf82aa2f5b2b87f70c1710ab3e2", "score": "0.59517795", "text": "private function checkThumbSize()\n {\n if ($this->thumbWidth === null)\n $this->thumbWidth = $this->width;\n\n if ($this->thumbHeight === null)\n $this->thumbHeight = $this->height;\n }", "title": "" }, { "docid": "159d3bb48d0b7dffc1551f172d0db460", "score": "0.5928989", "text": "public function setThumbnailSize($width, $height, $crop = true) {\n\t\t$this->support('post-thumbnails');\n\t\tset_post_thumbnail_size($width, $height, $crop);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1ca6739c49805a831147419fc280835d", "score": "0.5898203", "text": "public function getImageHeight()\n {\n return $this->scopeConfig->getValue(\n 'lof_ajaxcart/success_popup/product_image_height',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "73afcd00b6c6653db568b1e89f14ae9e", "score": "0.5891119", "text": "private function adjustSize($width, $height) {\n $this->image->thumbnailImage($width, $height);\n $this->getDimensions();\n }", "title": "" }, { "docid": "1a59a1f10629562c3bc69321263eea5e", "score": "0.58562726", "text": "function opengraph_default_image_height( $image ) {\n\t$image = shwib_image('large');\n\n\treturn $image['height'];\n}", "title": "" }, { "docid": "05b1c81eb145d6cfa92e06ee52bf989e", "score": "0.5840426", "text": "public function height() {\n if ( $this->isImage() ) {\n return $this->image_dimensions['height'];\n }\n }", "title": "" }, { "docid": "b8cfeb2d113c662974d5a183bc2a8695", "score": "0.58354944", "text": "public function resize($size=100)\r\n\t{\r\n\t\tif ( $this->image[\"sizex\"] >= $this->image[\"sizey\"] ) {\r\n\t\t\t$this->image[\"sizex_thumb\"] = $size;\r\n\t\t\t$this->image[\"sizey_thumb\"] = ($this->image[\"sizex_thumb\"]/$this->image[\"sizex\"])*$this->image[\"sizey\"];\r\n\t\t} else {\r\n\t\t\t$this->image[\"sizey_thumb\"] = $size;\r\n\t\t\t$this->image[\"sizex_thumb\"] = ($this->image[\"sizey_thumb\"]/$this->image[\"sizey\"])*$this->image[\"sizex\"];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2d4e025ba63635de2bf1e2982ebb9bc9", "score": "0.5830314", "text": "private function add_image_sizes() {}", "title": "" }, { "docid": "10e3c94960bb9745d879f007ce85d52e", "score": "0.5821486", "text": "function _setHeight($height)\n {\n $this->_debug(\"Setting Height ($height) -> expanding bottom border\");\n $this->_bottom = $this->_top + $height;\n }", "title": "" }, { "docid": "e6c96e431b3cb7ca66a273dfe181692c", "score": "0.58199066", "text": "function resize_to_height($height) {\n\t\t$height = str_replace('px', '', $height);\n\t\t\n\t\t$ratio = $height / $this->get_height();\n\t\t$width = $this->get_width() * $ratio;\n\t\t$this->resize($width,$height);\n\t}", "title": "" }, { "docid": "c800ddc3f4f4390543e0a8cf5d9d257a", "score": "0.58073825", "text": "function getWidgetHeight() {\n return $this->getData('height');\n }", "title": "" }, { "docid": "14d95de5e845857839ab6a6a8dd39ad3", "score": "0.58042663", "text": "function modifyImageSizes() {\n // thumbnail\n update_option( 'thumbnail_size_w', 400 );\n update_option( 'thumbnail_size_h', 600 );\n update_option( 'thumbnail_crop', 0 );\n\n // medium\n update_option( 'medium_size_w', 800 );\n update_option( 'medium_size_h', 1200 );\n update_option( 'medium_crop', 0 );\n\n // large\n update_option( 'large_size_w', 1200 );\n update_option( 'large_size_h', 1800 );\n update_option( 'large_crop', 0 );\n}", "title": "" }, { "docid": "6378c9a2e103cfbed6cda2e1de0907e6", "score": "0.57957643", "text": "public function getThumbLgAttribute()\n {\n return Thumbnail::thumbnail($this->attributes['image'], 1200, 630, 'fit');\n }", "title": "" }, { "docid": "ace91546255c7f237db404595304a5a6", "score": "0.5779829", "text": "function get_height() {\n\t\treturn imagesy($this->image);\n\t}", "title": "" }, { "docid": "4b26c3cffdef8c2ee9e5611572617b0c", "score": "0.57656026", "text": "public function setHeight($sHeight) {\r\n\t\t$this->setAtributo(\"height\", $sHeight);\r\n\t}", "title": "" }, { "docid": "924406e2b39db2f4b436d6a20b2d6bb2", "score": "0.575857", "text": "private function setimage_dimension() {\n $i = 1;\n $max_width = 0;\n $max_height = 0;\n $current_width = 0;\n $current_height = 0;\n foreach ($this->info_img as $key => $image) {\n $current_width += $image[\"w\"] + $this->white_space;\n if ($i == $this->cols) {\n if ($max_width < $current_width) {\n $max_width = $current_width;\n }\n $current_width = 0;\n $i = 0;\n }\n $i++;\n }\n $i = 1;\n foreach ($this->info_img as $key => $image) {\n $tmp = $image[\"h\"] + $this->white_space;\n if ($current_height < $tmp) {\n $current_height = $tmp;\n }\n\n if ($i % $this->cols == 0 || $i == count($this->info_img)) {\n $max_height += $current_height;\n $current_height = 0;\n }\n $i++;\n }\n $this->image_dimension[\"w\"] = $max_width;\n $this->image_dimension[\"h\"] = $max_height;\n}", "title": "" }, { "docid": "0d5a5f898a84edc495e89c42f0e9772e", "score": "0.575612", "text": "public function test_maximum_height()\n\t{\n\t\t$this->value\n\t\t\t->source(Upload_Util::combine($this->test_local, 'source', 'logo.gif'))\n\t\t\t->save_to_temp();\n\n\t\tJam::validator_rule('uploaded', array('maximum_height' => 100))->validate($this->model, 'file', $this->value);\n\n\t\t$this->assertNotHasError($this->model, 'file', 'uploaded_maximum_height');\n\n\t\tJam::validator_rule('uploaded', array('maximum_height' => 20))->validate($this->model, 'file', $this->value);\n\n\t\t$this->assertHasError($this->model, 'file', 'uploaded_maximum_height');\n\t}", "title": "" }, { "docid": "2e8494cf953494e316137ad75be6fdaa", "score": "0.5740875", "text": "public function getHeight() {\n return $this->metaData['height'];\n }", "title": "" }, { "docid": "3d2353c3565d5f5532554fa7d0f171a4", "score": "0.5738925", "text": "public function height()\n {\n return $this->meta['height'];\n }", "title": "" }, { "docid": "11e06609ba5da51a37f1a080508f626b", "score": "0.57374173", "text": "public function setThumb(?PhotoSize $thumb): void\n {\n $this->thumb = $thumb;\n }", "title": "" }, { "docid": "d2aca4c6a0815d9856bcd7c0fdbf62f5", "score": "0.573462", "text": "public function getPreviewPixelHeightValue()\n {\n $wrapper = $this->getPreviewPixelHeight();\n return is_null($wrapper) ? null : $wrapper->getValue();\n }", "title": "" }, { "docid": "b7398b1c557aa06e68055e176ea97f88", "score": "0.57338095", "text": "public function setHeight(int $height): void\n {\n $this->height = $height;\n }", "title": "" }, { "docid": "e48372cf9ca6e102f5bc7e63e944810a", "score": "0.57249737", "text": "private function createThumbCustom($thumbnailsize, $thumbnailsize_height)\n {\n $srcW = $this->imageproperties[0];\n $srcH = $this->imageproperties[1];\n\n $newWidth = 0;\n $newHeight = 0;\n $x = 0;\n $y = 0;\n\n //only adjust if larger than max\n if ($srcW > $thumbnailsize && $srcH > $thumbnailsize_height) {\n // thumnail hiih bolomjtoi hemjeeg avi\n for ($i = 1; $i <= 100; $i++) {\n $newWidth = round($srcW * ($i / 100));\n $newHeight = round($srcH * ($i / 100));\n\n if ($thumbnailsize <= $newWidth && $thumbnailsize_height <= $newHeight) {\n\n $zWidth = $newWidth - $thumbnailsize;\n $zHeight = $newHeight - $thumbnailsize_height;\n\n $x = floor($zWidth / 2);\n $y = floor($zHeight / 2);\n\n break;\n }\n }\n $copy = imagecreatetruecolor($newWidth, $newHeight);\n imagecopyresampled($copy, $this->image, 0, 0, 0, 0, $newWidth, $newWidth, $srcW, $srcH)\n or die(\"Image copy failed.\");\n //destroy original\n imagedestroy($this->image);\n $this->image = $copy;\n\n // crop hiine\n $copy = imagecreatetruecolor($thumbnailsize, $thumbnailsize_height);\n imagecopyresampled($copy, $this->image, 0, 0, $x, $y, $newWidth, $newHeight, $newWidth, $newHeight)\n or die(\"Image copy failed.\");\n //destroy original\n imagedestroy($this->image);\n $this->image = $copy;\n }\n }", "title": "" }, { "docid": "0b56362e1fb217e03946685b6614a555", "score": "0.5715793", "text": "public function setHeight(int $height)\n\t{\n\t\t$this->config->height = $height;\n\t}", "title": "" }, { "docid": "97bafe0824934cc6f95e562c0e63c072", "score": "0.57056856", "text": "function townhub_get_thumbnail_sizes(){\n \tif(!townhub_get_option('enable_custom_sizes')) return;\n $option_sizes = array(\n \t'townhub-lgal'=>'thumb_size_opt_3',\n \t'townhub-listing-grid'=>'thumb_size_opt_4',\n \t'townhub-lcat-one'=>'thumb_size_opt_5',\n \t'townhub-lcat-two'=>'thumb_size_opt_6',\n \t'townhub-lcat-three'=>'thumb_size_opt_7',\n \t'townhub-post-grid'=>'thumb_size_opt_8',\n \t'townhub-featured-image'=>'thumb_size_opt_9',\n \t'townhub-single-image'=>'thumb_size_opt_10',\n \t'townhub-recent'=>'thumb_size_opt_11'\n );\n\n \tforeach ($option_sizes as $name => $opt) {\n \t\t$option_size = townhub_get_option($opt);\n \t\tif($option_size !== false && is_array($option_size)){\n \t\t\t$size_val = array(\n \t\t\t\t'width' => (isset($option_size['width']) && !empty($option_size['width']) )? (int)$option_size['width'] : (int)'9999',\n \t\t\t\t'height' => (isset($option_size['height']) && !empty($option_size['height']) )? (int)$option_size['height'] : (int)'9999',\n \t\t\t\t'hard_crop' => (isset($option_size['hard_crop']) && !empty($option_size['hard_crop']) )? (bool)$option_size['hard_crop'] : (bool)'0',\n \t\t\t);\n\n \t\t\tadd_image_size( $name, $size_val['width'], $size_val['height'], $size_val['hard_crop'] );\n \t\t}\n \t}\n }", "title": "" }, { "docid": "e5eca4862ff86247cc6e11912155f258", "score": "0.5694837", "text": "function kalium_blog_thumbnail_size_proportional( $size ) {\n\treturn 'large';\n}", "title": "" }, { "docid": "b0a8c35fce710476797292f15d89be08", "score": "0.5688006", "text": "public function cropHeight()\n {\n return $this->meta['crop_height'];\n }", "title": "" }, { "docid": "cb2f7a09aa21b9fd9d14b073cb0189ce", "score": "0.567867", "text": "public function height() : int\n {\n \tif ($this->is_image())\n \t{\n \t\tif ($this->_height < 0)\n \t {\n \t $res = getimagesize($this->_file);\n \t $this->_width = $res[0];\n \t $this->_height = $res[1];\n \t }\n \t return $this->_height;\n \t}\n \treturn $this->_height;\n }", "title": "" }, { "docid": "b3d9daf2376150c86fbfc0059909df32", "score": "0.56785095", "text": "public static function get_thumbnail_size() {\n\t\t$sizes = get_image_sizes();\n\n\t\tif ( isset( $sizes['thumbnail'] ) ) {\n\t\t\treturn $sizes['thumbnail'];\n\t\t}\n\n\t\treturn $img_size = reset( $sizes );\n\t}", "title": "" }, { "docid": "1357466b59bc97891e9b4ab9a3c2e8b3", "score": "0.56691873", "text": "public function height()\n {\n return imagesy($this->data);\n }", "title": "" }, { "docid": "5fe35dff0c05b064b1a61878bda315e6", "score": "0.5657433", "text": "public function prosize(int $width, int $height = 0) : Thumb;", "title": "" }, { "docid": "ba9003d65c9d88753c47d700b3861c75", "score": "0.5645375", "text": "function klippe_mikado_woocommerce_product_thumbnail_column_size() {\n\t\t$thumbs_number_meta = klippe_mikado_options()->getOptionValue( 'woo_number_of_thumb_images' );\n\t\t$thumbs_number = ! empty ( $thumbs_number_meta ) ? intval( $thumbs_number_meta ) : 4;\n\t\t\n\t\treturn apply_filters( 'klippe_mikado_number_of_thumbnails_per_row_single_product', $thumbs_number );\n\t}", "title": "" }, { "docid": "7e8d03a5bd1082266053fd20c0542bb8", "score": "0.5644078", "text": "public function set_post_thumbnail_sizes() {\r\n\t\tglobal $content_width;\r\n\t\tset_post_thumbnail_size( $content_width, $content_width / 2 ); // default Post Thumbnail dimensions\r\n\r\n\t\t$image_sizes = apply_filters( 'wolf_image_sizes', $this->options['images'] );\r\n\r\n\t\tif ( $image_sizes != array() ) {\r\n\t\t\tif ( function_exists( 'add_image_size' ) ) {\r\n\t\t\t\tforeach ( $image_sizes as $k => $v ) {\r\n\t\t\t\t\tadd_image_size( $k, $v[0], $v[1], $v[2] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "26c27c161379830c721afd6c619a0525", "score": "0.5643383", "text": "public function getMaxHeight(): int;", "title": "" }, { "docid": "000f4c315900446f800ab6a82eee447a", "score": "0.56420887", "text": "public function setHeightPixelsUnwrapped($var)\n {\n $this->writeWrapperValue(\"height_pixels\", $var);\n return $this;}", "title": "" }, { "docid": "1be1fbb7a819f13fbe388907a87f2447", "score": "0.5641032", "text": "public function getHeight() {\n return (int) imagesy($this->image);\n }", "title": "" }, { "docid": "5ce9e423bf47ffc5f38f83d3f51653d8", "score": "0.56403047", "text": "public function getThumbnailWidth()\n {\n return $this->thumbnailWidth;\n }", "title": "" }, { "docid": "5ed06213fe62e836f100417cfc1a666d", "score": "0.5630853", "text": "public function createThumbnail(){\n if(!$this->image) return;\n\n Image::make($this->image_path)\n ->fit(100, 100, function (Constraint $constraint){\n $constraint->upsize();\n })\n ->save($this->thumbnail_path);\n }", "title": "" }, { "docid": "de44b031ad47877799acf0536ef9059e", "score": "0.5630425", "text": "public function getPreviewPixelHeight()\n {\n return $this->preview_pixel_height;\n }", "title": "" }, { "docid": "e601d29beb3bb9279e5901eb5a1a6992", "score": "0.5622686", "text": "public function setThumbnail(\\PlusPhoto_Thumbnail $value=null)\n {\n return $this->set(self::THUMBNAIL, $value);\n }", "title": "" }, { "docid": "4b5e45a76e9f4d79d8760023de8b963d", "score": "0.56207937", "text": "public function height($height = 1)\n {\n $this->height = $height;\n return $this;\n }", "title": "" }, { "docid": "1de577d48831d104a29261f91bc77b85", "score": "0.56180555", "text": "public function setDimensions($width, $height);", "title": "" }, { "docid": "437d1e34fd871f085460021d0ab01327", "score": "0.5615665", "text": "public function setThumbnailUrl($thumbnailUrl);", "title": "" } ]
bd45615517c896bed9c2588f5ee878e6
$optional_params is an array that contains ORDER BY | ORDER | OFFSET | LIMIT
[ { "docid": "904b261496464beb8d667610a24e126f", "score": "0.5177536", "text": "protected function select ($fields, $constraints=null, $optional_params=null) : array {\n\t\t// e,g: SELECT fields FROM table WHERE constraints ORDER BY *ORDER BY* *ORDER* LIMIT *OFFSET*, *LIMIT*\n\t\t\n\t\t$fields = $this->joinConstraints(', ', $fields);\n\t\t$sql = \"SELECT $fields FROM $this->table\";\n\t\t\n\t\tif ( !is_null($constraints) ) {\n\t\t\t$constraints = $this->joinConstraints(' AND ', $constraints);\n\t\t\t$sql .= \" WHERE $constraints\";\n\t\t}\n\t\t\n\t\tif ( !is_null($optional_params) ) {\n\t\t\tforeach ($optional_params as $name => $value) {\n\t\t\t\t$$name = $value;\n\t\t\t}\n\t\t\t\n\t\t\tif ( !is_null($order_by) and !is_null($order) ) {\n\t\t\t\t$sql .= \" ORDER BY $order_by $order\";\n\t\t\t}\n\t\t\tif ( !is_null($offset) and !is_null($limit) ) {\n\t\t\t\t$sql .= \" LIMIT :offset, :limit\";\n\t\t\t}\n\t\t\t\n\t\t\t$req = $this->db->prepare($sql);\n\t\t\t\n\t\t\t$limit = (int) $limit;\n\t\t\t$offset = (int) $offset;\n\t\t\t\n\t\t\t$req->bindParam(':limit', $limit, PDO::PARAM_INT);\n\t\t\t$req->bindParam(':offset', $offset, PDO::PARAM_INT);\n\t\t} else {\n\t\t\t$req = $this->db->prepare($sql);\n\t\t}\n\t\t\n\t\t/* For testing */\n//\t\techo \"<pre>\";\n//\t\techo $sql;\n//\t\techo \"</pre>\";\n//\t\tdie();\n\t\t/* ----------- */\n\t\t\n\t\t$req->execute();\n\t\t\n\t\treturn $req->fetchAll();\n\t\t\n\t}", "title": "" } ]
[ { "docid": "76245c015738d69b5133d530a11c1dc2", "score": "0.6773861", "text": "private function _check_optional_parameters()\n\t{\n\t\t// Check if the sort parameter has been specified\n\t\tif ($this->api_service->verify_array_index($this->request, 'sort'))\n\t\t{\n\t\t\t$this->sort = ($this->request['sort'] == '0') ? 'ASC' : 'DESC';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->sort = 'DESC';\n\t\t}\n\n\t\t// Check if the limit parameter has been specified\n\t\tif ($this->api_service->verify_array_index($this->request, 'limit'))\n\t\t{\n\t\t\t$this->set_list_limit($this->request['limit']);\n\t\t}\n\n\t\t// Check if the orderfield parameter has been specified\n\t\tif ($this->api_service->verify_array_index($this->request, 'orderfield'))\n\t\t{\n\t\t\tswitch ($this->request['orderfield'])\n\t\t\t{\n\t\t\t\tcase \"incidentid\":\n\t\t\t\t\t$this->order_field = 'i.id';\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"locationid\":\n\t\t\t\t\t$this->order_field = 'i.location_id';\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"incidentdate\":\n\t\t\t\t\t$this->order_field = 'i.incident_date';\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->order_field = 'i.incident_date';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->order_field = 'i.incident_date';\n\t\t}\n\n\n\t\t// Check if the 'comments' parameter has been specified\n\t\tif ( ! $this->api_service->verify_array_index($this->request, 'comments'))\n\t\t{\n\t\t\t// Default to not including comments\n\t\t\t$this->comments = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->comments = $this->request['comments'];\n\t\t}\n\t}", "title": "" }, { "docid": "275eb24e19270c6c0a704b4878742db8", "score": "0.60368544", "text": "function BuildOrderClauses($params){\n\t\tif (isset($params[\"sortasc\"])) $this->PopulateOrderClausesFromParam($params[\"sortasc\"],\"ASC\");\n\t\tif (isset($params[\"sortdesc\"])) $this->PopulateOrderClausesFromParam($params[\"sortdesc\"],\"DESC\");\n\t}", "title": "" }, { "docid": "6cb8288a1695af18f7f722ca9e1ed9a4", "score": "0.5924875", "text": "private function _initParams($params=array()){\n\t\tUtils::debugTrace(__FILE__.\":\".__FUNCTION__.\":[\".__LINE__.\"]\", start);\n\t\t\n\t\t// Flag for variable re-initialization\n\t\t$this->_preExecute = true;\n\t\t// -------------------------------------------------------------------------------------\n\t\t// Must allow for a user defined order by clause.\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params['order-by'])||isset($params['orderBy'])){\n\t\t\t$this->_orderBy = (isset($params['order-by']))?$params[\"order-by\"]:$params['orderBy'];\n\t\t\tif (is_array($this->_orderBy)){\n\t\t\t\t$comma =\"\";\n\t\t\t\t\n\t\t\t\t$isInt=false;\n\t\t\t\tforeach ($this->_orderBy as $col => $direction) {\n\t\t\t\t\tif($col===\"0\"){\n\t\t\t\t\t\t$isInt=true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($isInt){\n\t\t\t\t\t\t$tmpSort .= $comma.$direction;// this is actually a column name with default sorting\n\t\t\t\t\t\t$comma =\",\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$tmpSort .= $comma.$col.\" \".$direction;\n\t\t\t\t\t\t$comma =\",\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_orderBy = $tmpSort;\n\t\t\t}\n\t\t}\n\t\t// -------------------------------------------------------------------------------------\n\t\t// If this is a direct update using the Update method get the set clause\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params['set'])){\n\t\t\t$this->_setClause = $params[\"set\"];\n\t\t}\n\t\telse\n\t\t\t$this->_setClause=array(); // default to empty array\n\t\t\t\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// If there are \"?\" markers for bind variables, the bind-variables must be included\n\t\t\t// so we check if they are present\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\tif (isset($params[\"bind-variables\"])||isset($params[\"bindVariables\"])){\n\t\t\t\t$this->_bindParams = (isset($params[\"bind-variables\"]))?$params[\"bind-variables\"]:$params[\"bindVariables\"];\n\t\t\t\tif (!is_array($this->_bindParams))\n\t\t\t\t\t$this->_bindParams = array($this->_bindParams);\n\t\t\t\t\t$this->_isParameterized = true;\n\t\t\t\t\t$this->_param_count = count($this->_bindParams);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->_isParameterized = false;\n\t\t\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params['group-by'])||isset($params['groupBy'])){\n\t\t\t$this->_groupBy = (isset($params['group-by']))?$params['group-by']:$params['groupBy'];\n\t\t}\n\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params['having'])){\n\t\t\t$this->_having = $params['having'];\n\t\t}\n\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// If custom sql was given then use it instead of building from objects and conditions\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"query\"])){\n\t\t\t$this->_fetchStmt = $params[\"query\"];\n\t\t\t$this->_rowPosition =0; // if otherwise, below will apply user defines\n\t\t\t$this->_isMoreRows = true;// starting from the top, if any\n\t\t\t$this->_action = array(); // clear all actions\n\t\t\t$this->_message = array(); // clear previous messages\n\t\t\t$this->_readOnly = true; // read only for custom sql, we don't know the objects\n\t\t}\n\t\t// -------------------------------------------------------------------------------------\n\t\t// Here we get the user information for building a fetch statment from the objects/conditions\n\t\t// -------------------------------------------------------------------------------------\n\t\telse\n\t\t{\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// Allow for a user defined SELECT list to be passed\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\tif (isset($params['select']) && !empty($params['select'])){\n\t\t\t\t\n\t\t\t\tif (strtolower(substr(trim($params[\"select\"]),0,6)) ==\"select\"){\n\t\t\t\t\t$params[\"select\"] = substr(trim($params[\"select\"]),6);\n\t\t\t\t}\n\t\t\t\t$this->_select = $params[\"select\"].' ';\n\t\t\t}\n\t\t\t\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// reset for new query\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t$this->_fetchStmt = null; // could add a execution history here if wanted, before clearing\n\t\t\t\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// If we only have one, then direct assignment is used\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\tif (isset($params[\"object\"])){\n\t\t\t\t// get the object name\n\t\t\t\t$this->_object = $params[\"object\"];\n\t\t\t}\n\t\t\t// If we only have one, then direct assignment is used\n\t\t\telse if (isset($params[\"objects\"])){\n\t\t\t\t// get the object name\n\t\t\t\t$this->_object = $params[\"objects\"];\n\t\t\t}\n\t\t\t\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// Let's examine various join possibilities\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\tif (isset($params[\"join\"])){\n\t\t\t\t// In MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n\t\t\t\t// (they can replace each other). In standard SQL, they are not equivalent.\n\t\t\t\t// INNER JOIN is used with an ON clause, CROSS JOIN is used otherwise.\n\t\t\t\t$this->_join[] = $params[\"join\"];\n\t\t\t\t$this->_joinType[] = \" INNER JOIN \";\n\t\t\t}\n\t\t\tif (isset($params[\"join-inner\"])||isset($params[\"innerJoin\"])){\n\t\t\t\t// In MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n\t\t\t\t// (they can replace each other). In standard SQL, they are not equivalent.\n\t\t\t\t// INNER JOIN is used with an ON clause, CROSS JOIN is used otherwise.\n\t\t\t\t$this->_join[] = (isset($params[\"join-inner\"]))?$params[\"join-inner\"]:$params[\"innerJoin\"];\n\t\t\t\t$this->_joinType[] = \" INNER JOIN \";\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($params[\"join-outer\"])||isset($params[\"outerJoin\"])){\n\t\t\t\t$this->_join[] = (isset($params[\"join-outer\"]))?$params[\"join-outer\"]:$params[\"outerJoin\"];\n\t\t\t\t$this->_joinType[] = \" LEFT OUTER JOIN \";\n\t\t\t}\n\t\t\tif (isset($params[\"join-left\"])||isset($params['leftJoin'])){\n\t\t\t\t$this->_join[] = ($params[\"join-left\"])?$params[\"join-left\"]:$params['leftJoin'];\n\t\t\t\t$this->_joinType[] = \" LEFT JOIN \";\n\t\t\t}\n\t\t\tif (isset($params[\"join-right\"])||isset($params[\"rightJoin\"])){\n\t\t\t\t$this->_join[] = (isset($params[\"join-right\"]))?$params[\"join-right\"]:$params[\"rightJoin\"];\n\t\t\t\t$this->_joinType[] = \" RIGHT JOIN \";\n\t\t\t}\n\t\t\t\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\t// Let's consume the object request \"Where\" conditions\n\t\t\t// -------------------------------------------------------------------------------------\n\t\t\tif (isset($params[\"conditions\"])||isset($params[\"where\"])) {\n\t\t\t\t$this->_conditions = (!empty($params[\"conditions\"]))?$params[\"conditions\"]:$params[\"where\"];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->_conditions = null;\n\t\t}\n\t\t// Reset the fetch counter\n\t\t$this->_fetchIter=0;\n\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// The number of rows to return in this fetch\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"top\"])){\n\t\t\t$match = array();\n\t\t\t$isFound = preg_match(\"/[0-9]+/\", $params[\"top\"],$match);// the +0 will convert to int and strip all possible injections\n\t\t\tif ($isFound>=1)\n\t\t\t\t$this->_top = $match[0];\n\t\t}\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"rows\"]) && !empty($params[\"rows\"])){\n\t\t\tif ($params[\"rows\"]==\"all\" || $params[\"rows\"] == selectAll)\n\t\t\t\t$this->_limit = 1000000;\n\t\t\t\telse\n\t\t\t\t\t$this->_limit = intval($params[\"rows\"]);// convert to int and strip all possible injections\n\t\t}\n\t\telse {\n\t\t\t$this->_limit = 1; // limit to one by default\n\t\t}\n\t\t// -------------------------------------------------------------------------------------\n\t\t// If we are scrolling through records then we need to know the row position\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"row-position\"])||isset($params[\"rowPosition\"])){\n\t\t\t// convert to int and strip all possible injections\n\t\t\t$this->_rowPosition = intval((isset($params[\"row-position\"]))?$params[\"row-position\"]:$params[\"rowPosition\"])-1;\n\t\t}\n\t\telse\n\t\t\t$this->_rowPosition = 0; // start at the first row by default\n\t\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// Get the database name, which in sybase can be different than owner\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"database\"]) && !empty($params[\"database\"]))\n\t\t\t$this->_database = $params[\"database\"];\n\t\telse\n\t\t\t$this->_database=null;// @todo determine if default appropriate\n\t\t\t\t\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// get the owner, if no owner assume it is the same as the database\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"schema\"]) && !empty($params[\"schema\"]))\n\t\t\t$this->_schema = $params[\"schema\"];\n\t\t\t\n\t\t// ----------------------------\n\t\t// CHECK FOR RE-INIT PARAMS\n\t\t// ----------------------------\n\t\tif ($this->_preExecute){\n\t\t\t// if we have already executed SQL then re-init the variables for the new selection criteria\n\t\t\tif (isset($this->_tempTable)){\n\t\t\t\t// let remove the temp table for this session to keep its size down\n\t\t\t\t$bitBucket = odbc_exec($this->_db, \"DROP TABLE \".$this->_tempTable);\n\t\t\t\t// now let's clear the temp table field\n\t\t\t\t$this->_tempTable = null;\n\t\t\t}\n\t\t\t\n\t\t\t// set all the other fields that don't need qualification\n\t\t\t$this->_accessed = false;\n\t\t\t$this->_action = array();\n\t\t\t$this->_affected_rows = null; // @todo this should be an array of each of the actions perhaps... :/\n\t\t\t$this->_createTempSQL = null;\n\t\t\t//if (isset($this->_dmlStmtHandle)) // This can cause segment faults so better safe to not use\n\t\t\t//odbc_free_result($this->_dmlStmtHandle);\n\t\t\t$this->_dmlStmtHandle = null;\n\t\t\t//if (isset($this->_fetchStmtHandle))\n\t\t\t//odbc_free_result($this->_fetchStmtHandle);\n\t\t\t$this->_fetchStmtHandle = null;\n\t\t\t$this->_field_count = 0;\n\t\t\t$this->_hasAutoInc = null;\n\t\t\t$this->_isMoreRows = null;\n\t\t\t$this->_keys = null;\n\t\t\t$this->_message = null;\n\t\t\t$this->_num_rows = 0;\n\t\t\t$this->_readOnly = false;\n\t\t\t$this->_tempTable = null;\n\t\t\t$this->_createTempSQL = null;\n\t\t\t$this->_preExecute = true;\n\t\t}\n\t\t\n\t\t// -------------------------------------------------------------------------------------\n\t\t// Allow for a operation to be read-only defined by the programmer\n\t\t// However, only single objects can have CRUD functionality\n\t\t// -------------------------------------------------------------------------------------\n\t\tif (isset($params[\"read-only\"])||isset($params[\"readOnly\"])){\n\t\t\t$this->_readOnly = true;\n\t\t}\n\t\t\n\t\t// ----------------------------------------------------------\n\t\t// Check for the pagination request\n\t\t// If the paginator is requested it takes precedence over\n\t\t// the 'rows' and 'row-position' parameters\n\t\t// ----------------------------------------------------------\n\t\tif (isset($params['paginate']) && !empty($params['paginate'])){\n\t\t\t$this->_paginate = true;\n\t\t\t$this->_rowPosition = Paginator::getRowStartRange()-1;// zero offset\n\t\t\tif (empty($params[\"rows\"])) // use default if no override\n\t\t\t\t$this->_limit = Paginator::getRowsPerPage();\n\t\t\telse // if override always set it over the derived paginator value\n\t\t\t\t$this->_limit = intval($params[\"rows\"]);\n\t\t\tif (isset($params[paginateStyle]) && $params[paginateStyle]==indeterminate){\n\t\t\t\tPaginator::initSet(array(paginateStyle => indeterminate));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ---------------------------------------\n\t\t// Check if this sql should be \"cached\"\n\t\t// ---------------------------------------\n\t\tif (isset($params['cache']) && !empty($params['cache'])){\n\t\t\t$this->_cache = $params['cache'];\n\t\t}\n\t\t\n\t\tif (isset($params[\"no-metrix\"])){\n\t\t\t$this->traceMetrix = false;\n\t\t}\n\t\telse {\n\t\t\t$this->traceMetrix = true;\n\t\t}\n\t\tif (isset($params[\"metrix-name\"])){\n\t\t\t$this->metrixName = $params[\"metrix-name\"];\n\t\t}\n\t\tif (isset($params[\"name\"])){\n\t\t\t$this->queryName = $params[\"name\"];\n\t\t}\n\t\tUtils::debugTrace(__FILE__.\":\".__FUNCTION__.\":[\".__LINE__.\"]\", end);\n\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "4cd95ca20aeda7acaf735902b3a36f0a", "score": "0.5796486", "text": "protected function get_parameter_order()\n {\n }", "title": "" }, { "docid": "b30d90d1168d5a91de210887f5f74ff5", "score": "0.5644099", "text": "public function getQueryWithPositionalParameters();", "title": "" }, { "docid": "21e03c4748c280abe3b2e0d0e0cf1891", "score": "0.5635851", "text": "protected function prepareOrderByStatement() {}", "title": "" }, { "docid": "44f05851ec90c7aebd38ba8758aeb9d4", "score": "0.5595453", "text": "public function setDefaultOrder($params = array())\r\n {\r\n if (WITH_SPHINX)\r\n {\r\n /*\r\n * @weight \t\t- weight of record which finded in sphinx indexes\r\n * @geodist \t\t- distance between coordinates of geoanchor and coordinates of group\r\n * creation_date - date of group creation\r\n * member_count \t- count of members at group\r\n * name \t\t\t- group name\r\n */\r\n $this->defaultOrder = 'creation_date DESC, name ASC';\r\n $user = Zend_Registry::get('User');\r\n if ($user->getId()) { // authenticated user\r\n if (!empty($this->keywords)) {\r\n $this->defaultOrder = '@weight DESC, member_count DESC';\r\n } else {\r\n if (!empty($params['city'])) {\r\n if (is_array($params['city']) && count($params['city']) > 1) {\r\n $this->defaultOrder = 'member_count DESC, name ASC';\r\n } else {\r\n $this->defaultOrder = '@geodist ASC, member_count DESC';\r\n }\r\n } else {\r\n $this->defaultOrder = '@geodist ASC, member_count DESC';\r\n $this->paramsOrder = array('order'=>'proximityme', 'direction'=>'asc');\r\n }\r\n }\r\n } else { // anonimous\r\n if (!empty($this->keywords)) {\r\n $this->defaultOrder = '@weight DESC, member_count DESC';\r\n } else {\r\n if (!empty($params['city'])) {\r\n if (is_array($params['city']) && count($params['city']) > 1) {\r\n $this->defaultOrder = 'member_count DESC, name ASC';\r\n } else {\r\n $this->defaultOrder = '@geodist ASC, member_count DESC';\r\n }\r\n } else {\r\n $this->defaultOrder = 'member_count DESC, name ASC';\r\n $this->paramsOrder = array('order'=>'members', 'direction'=>'desc');\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $this->defaultOrder = 'vgie.creation_date DESC, vgie.name ASC';\r\n $user = Zend_Registry::get('User');\r\n if ($user->getId()) { // authenticated user\r\n if (!empty($this->keywords)) {\r\n $this->defaultOrder = 'SUM(vgtu.w) DESC, members_cnt DESC';\r\n } else {\r\n if (!empty($params['city'])) {\r\n $this->defaultOrder = 'city_distance ASC, members_cnt DESC';\r\n } else {\r\n $this->defaultOrder = 'user_city_distance ASC, members_cnt DESC';\r\n $this->paramsOrder = array('order'=>'proximityme', 'direction'=>'asc');\r\n }\r\n }\r\n } else { // anonimous\r\n if (!empty($this->keywords)) {\r\n $this->defaultOrder = 'SUM(vgtu.w) DESC, members_cnt DESC';\r\n } else {\r\n if (!empty($params['city'])) {\r\n $this->defaultOrder = 'city_distance ASC, members_cnt DESC';\r\n } else {\r\n $this->defaultOrder = 'members_cnt DESC, vgie.name';\r\n $this->paramsOrder = array('order'=>'members', 'direction'=>'desc');\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b7d047ff01a508dc2c7741b9898a9e7e", "score": "0.552797", "text": "function reader_optional_param_array($name, $default, $type) {\n $optional_param_array = 'optional_param';\n if (function_exists('optional_param_array')) {\n switch (true) {\n case (isset($_POST[$name]) && is_array($_POST[$name])): $optional_param_array = 'optional_param_array'; break;\n case (isset($_GET[$name]) && is_array($_GET[$name])) : $optional_param_array = 'optional_param_array'; break;\n }\n }\n return $optional_param_array($name, $default, $type);\n}", "title": "" }, { "docid": "dff59ebbd1f896d50a6d8f2b3dc0d7da", "score": "0.5521388", "text": "public function getExtraParams()\n {\n $data = array();\n $extraParams = array('search', 'order', 'per-page', 'page');\n $request = $this->getRequest();\n\n foreach ($extraParams as $param) {\n if ($request->getParam($param)) {\n $data[$param] = $request->getParam($param);\n }\n }\n\n if (count($data)) {\n $get = str_replace('&amp;', '&', http_build_query($data));\n if (strlen(trim($get, '?'))) {\n return '?' . $get;\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "2b93543c0ab1203e6de530cb44fb6450", "score": "0.549667", "text": "public function testPrepareOrderWithoutAnyParam()\n {\n $oLinks = oxNew('oxList');\n $oLinks->init('oxLinks');\n\n $oAdminList = $this->getProxyClass('oxAdminList');\n $oAdminList->setNonPublicVar('_oList', $oLinks);\n $sResultSql = $oAdminList->UNITprepareOrderByQuery('');\n\n $this->assertEquals('', trim($sResultSql));\n }", "title": "" }, { "docid": "4f421ffce52338250f23fef92f45135e", "score": "0.5489895", "text": "public static function get_datatable_params( $data ){\n if ( isset( $data ) && is_array( $data ) ) {\n global $mydb;\n \n $arr_order = array();\n if( isset( $data['order'] ) && !empty( $data['order'] ) && !empty( $data['columns'] ) ){\n foreach ( $data['order'] as $odr_key => $odr_val ) {\n $str_order = $data['columns'][$odr_val['column']]['name'];\n $str_order .= ' ' . $odr_val['dir'];\n $arr_order[] = $str_order;\n }\n }\n \n $user_param = array(\n 'order_by' => implode( ', ', $arr_order ),\n 'offset' => ( ( isset( $data['start'] ) && $data['start'] > 0 ) ? $data['start'] : 0 ),\n 'limit' => ( ( isset( $data['length'] ) && $data['length'] > 0 ) ? $data['length'] : 10 ),\n 'search' => ( ( isset( $data['search']['value'] ) && !empty( $data['search']['value'] ) ) ? $data['search']['value'] : '' ),\n );\n \n return $user_param;\n }\n }", "title": "" }, { "docid": "a486554149a11fc763820767cbd45df7", "score": "0.54832906", "text": "protected function getOptionalArguments() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "062f9f62f2b3d5229d71ac58ccdfb277", "score": "0.54596436", "text": "public abstract function getQueryOrderby();", "title": "" }, { "docid": "49b2cd1d1842d839abbc461559ae32c8", "score": "0.54114306", "text": "public function testItDoesNotComplainAboutMissingOptionalArguments()\n {\n $this->markTestIncomplete('todo');\n }", "title": "" }, { "docid": "c2ddb3ff776f0643efc824151854b152", "score": "0.5400215", "text": "private function prepareConstrains()\n {\n $this->offset = isset($_GET['offset']) ? $_GET['offset'] : 0;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : 25;\n $this->orderBy = isset($_GET['orderBy']) ? $_GET['orderBy'] : 'id';\n $this->orderDir = isset($_GET['orderDir']) ? $_GET['orderDir'] : 'desc';\n }", "title": "" }, { "docid": "51c86b1fcd190011516ce180787eb99f", "score": "0.53929126", "text": "public function addOptional(array $optional)\n\t{\n\t\t$this->optional = array_merge($this->optional, $optional);\n\t}", "title": "" }, { "docid": "ddb9a4e9c39e199aee12802e5309cecd", "score": "0.5371954", "text": "protected function add_order_by_params($query_args, $from_arg, $id_cell)\n {\n }", "title": "" }, { "docid": "68643925ffbe08c60abe13f4e221b92d", "score": "0.5370117", "text": "public function setOptional($optional)\n\t{\n\t\t$this->optional = $optional;\n\t}", "title": "" }, { "docid": "68643925ffbe08c60abe13f4e221b92d", "score": "0.5370117", "text": "public function setOptional($optional)\n\t{\n\t\t$this->optional = $optional;\n\t}", "title": "" }, { "docid": "ddb9a4e9c39e199aee12802e5309cecd", "score": "0.5369855", "text": "protected function add_order_by_params($query_args, $from_arg, $id_cell)\n {\n }", "title": "" }, { "docid": "b7dcd2714edd6688fa666ea55d7c474e", "score": "0.5341168", "text": "function search_by_many_params($searchParam = NULL, $curr_page_no = \"\"){\r\n\t\r\n\t\t$display_items = NO_OF_RECORDS_PER_PAGE;\t\t\r\n\r\n\t\tif ($curr_page_no != NULL){\r\n\t\t\tif ($curr_page_no == 1){\r\n\t\t\t\t$start_no_sql = 0;\r\n\t\t\t\t$end_no_sql = $display_items;\r\n\t\t\t}else{\t\t\t\t\t\t\t\r\n\t\t\t\t$start_no_sql = ($curr_page_no - 1) * $display_items;\r\n\t\t\t\t$end_no_sql = $display_items;\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t $start_no_sql = 0;\r\n\t\t\t $end_no_sql = $display_items;\t\t\r\n\t\t}\r\n\t\t$limit = \" Limit {$start_no_sql}, {$end_no_sql}\";\t\t\t\t\r\n\t\r\n\t\t$whereCondition = \"\";\r\n\t\tif ($searchParam != NULL){\r\n\t\t\tif (is_array($searchParam)){\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ($searchParam['genre'] != \"\"){\r\n\t\t\t\t\t$whereCondition .= \" AND movie_categories.genre LIKE '\" .$searchParam['genre'].\"%'\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($searchParam['title'] != \"\"){\r\n\t\t\t\t\t$whereCondition .= \" AND movies.movie_name LIKE '%\".$searchParam['title'].\"%'\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($searchParam['description'] != \"\"){\r\n\t\t\t\t\t$whereCondition .= \" AND movies.movie_description LIKE '%\".$searchParam['description'].\"%'\";\r\n\t\t\t\t}\r\n\t\t\t\tif (($searchParam['dateFrom'] != \"\") && ($searchParam['dateTo'] != \"\")){\r\n\t\t\t\t\t$whereCondition .= \" AND movies.movie_published BETWEEN \" . $searchParam['dateFrom'] . \" AND \" . $searchParam['dateTo'];\r\n\t\t\t\t}elseif (($searchParam['dateFrom'] != \"\") && ($searchParam['dateTo'] == \"\")){\r\n\t\t\t\t\t$whereCondition .= \" AND movies.movie_published BETWEEN \" . $searchParam['dateFrom'] . \" AND \" . date(\"y-m-d\");\t\t\t\t\r\n\t\t\t\t}elseif (($searchParam['dateFrom'] == \"\") && ($searchParam['dateTo'] != \"\")){\r\n\t\t\t\t\t$whereCondition .= \" AND movies.movie_published BETWEEN \" . date(\"y-m-d\") . \" AND \" . $searchParam['dateTo'];\t\t\t\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$whereCondition .= \"\";\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$query = \"SELECT movies.id AS id, movies.movie_name AS title, movies.genre_id AS genre_id, movie_categories.genre AS genre, movies.thumbanail_image AS thumb_image, movies.hit_count AS hit_count\r\n\t\t\t\t\t\t\tFROM movies, movie_categories\r\n\t\t\t\t\t\t\tWHERE movies.genre_id = movie_categories.genre_id \" . $whereCondition . $limit;\t\t\r\n\t\t\t}\r\n\t\t}\t\t\t\t\t\r\n\t\t$result = mysql_query($query);\r\n\t\tif ($result){\r\n\t\t\t$searchedContent = array();\r\n\t\t\t$i=0;\r\n\t\t\twhile($row = mysql_fetch_array($result)){\r\n\t\t\t\t$searchedContent[$i]['id'] = $row['id'];\r\n\t\t\t\t$searchedContent[$i]['title'] = $row['title'];\r\n\t\t\t\t$searchedContent[$i]['genre'] = $row['genre'];\r\n\t\t\t\t$searchedContent[$i]['genre_id'] = $row['genre_id'];\t\t\t\t\t\t\r\n\t\t\t\t$searchedContent[$i]['thumb_image'] = $row['thumb_image'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$searchedContent[$i]['hit_count'] = $row['hit_count'];\t\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$i++;\r\n\t\t\t}\r\n\t\t\treturn $searchedContent;\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "acfbbe530ae68f5c4c7d9c0c5f3b3cbb", "score": "0.532553", "text": "function pdoPagedQuery($sql, &$queryvalues, $searchfields=array(), $orderfields=false, $params=false) {\n global $DEFAULT_PAGE_LENGTH;\n if ( $params == false ) $params = $_GET;\n if ( $orderfields == false ) $orderfields = $searchfields;\n\n $searchtext = '';\n if ( count($searchfields) > 0 && isset($params['search_text']) ) {\n for($i=0; $i < count($searchfields); $i++ ) {\n if ( $i > 0 ) $searchtext .= \" OR \";\n $searchtext .= $searchfields[$i].\" LIKE :SEARCH\".$i;\n $queryvalues[':SEARCH'.$i] = '%'.$params['search_text'].'%';\n }\n }\n\n $ordertext = '';\n if ( isset($params['order_by']) && pdoMatchColumns($params['order_by'], $orderfields) ) { \n $ordertext = $params['order_by'].\" \";\n if ( isset($params['desc']) && $params['desc'] == 1) {\n $ordertext .= \"DESC \";\n }\n } else if ( count($orderfields) > 0 ) {\n $ordertext = $orderfields[0].\" \";\n }\n\n $page_start = isset($params['page_start']) ? $params['page_start']+0 : 0;\n if ( $page_start < 0 ) $page_start = 0;\n $page_length = isset($params['page_length']) ? $params['page_length']+0 : $DEFAULT_PAGE_LENGTH;\n if ( $page_length < 0 ) $page_length = 0;\n\n $desc = '';\n if ( isset($params['desc']) ) { \n $desc = $params['desc']+0;\n }\n\n $limittext = '';\n if ( $page_start < 1 ) {\n $limittext = \"\".($page_length+1);\n } else {\n $limittext = \"\".$page_start.\", \".($page_length+1);\n }\n\n // Fix up the SQL Query\n $newsql = $sql;\n if ( strlen($searchtext) > 0 ) {\n if ( strpos($sql,\"WHERE\" ) !== false ) {\n $newsql = str_replace(\"WHERE\", \"WHERE ( \".$searchtext.\" ) AND \", $newsql);\n } else {\n $newsql .= \"\\nWHERE ( \".$searchtext.\" ) \";\n }\n }\n if ( strlen($ordertext) > 0 ) {\n $newsql .= \"\\nORDER BY \".$ordertext.\" \";\n }\n if ( strlen($limittext) > 0 ) {\n $newsql .= \"\\nLIMIT \".$limittext.\" \";\n }\n return $newsql . \"\\n\";\n}", "title": "" }, { "docid": "5b543a0314ad5d14d017c3735beafae4", "score": "0.5320902", "text": "public function setOptional($optional) {\n\t\t$this->optional = $optional;\n\t}", "title": "" }, { "docid": "226d80341232e55713a824ed6031dc4f", "score": "0.53146905", "text": "public function setSearchParams(array $params=null)\n {\n if(is_null($params)){\n throw new \\Exception(MISSING_ARGUMENTS);\n }\n\n //passed parameters\n //max_id = str_id ->returns results less than max_id\n $array = ['tag','latitude','longitude','geocode','max_id'];\n\n foreach ( $params as $key => $value ) {\n\t\t\tif ( in_array( $key, $array ) && !empty($value)){\n\t\t\t\t$$key = $value;\n\t\t\t}\n\t\t}\n $stringArr = [];\n if(!empty($tag)){\n $stringArr[] = \"#\" . $tag;//hash tag might be ommited\n }\n if(!empty($max_id)){\n $stringArr[] = \"max_id=\" . $max_id;//search for less..than\n }\n if(!empty($since_id)){\n $stringArr[] = \"since_id=\" . $since_id;//search for - greater..than\n }\n if($this->setGeolocation == true ){\n //wise to add distance\n if(!empty($latitude) && !empty($longitude)){\n $stringArr[] = 'geocode=' . $latitude . ',' .$longitude;\n }\n if(!empty($geocode)){\n $stringArr[] = 'geocode=' . $geocode;\n }\n }\n if(!empty($this->setLang)){\n $stringArr[] = 'lang=' . $this->setLang;\n }\n if(!empty($this->resultType)){\n $stringArr[] = 'result_type=' . $this->resultType;\n }\n //number of photos and photo filters are crucial\n if(!empty($this->numberOfPhotos)){\n $stringArr[] = 'count=' . $this->numberOfPhotos;\n }\n if(!empty($this->photoFilters)){\n $stringArr[] = $this->photoFilters;\n }\n\n $string = implode('&', $stringArr);\n\n $string = $this->delimiter . $string ;\n $search = array('#', ',', '+', ':');\n $replace = array('%23', '%2C', '%2B', '%3A');\n $string = str_replace($search, $replace, $string);\n\n $this->searchParams = $string ;\n\n $this->buildOauth();\n return $this;\n }", "title": "" }, { "docid": "2dd1b85acf6c4f27cc4a5231b22d726a", "score": "0.5314009", "text": "function aDBc_get_order_by_sql_arg($default_order_by){\n\t\t$order_by = \" ORDER BY \" . $default_order_by . \" ASC\";\n\t\tif(!empty($_GET['orderby'])){\n\t\t\t$order_by = \" ORDER BY \" . esc_sql($_GET['orderby']);\n\t\t\t$order_by .= empty($_GET['order']) ? \" ASC\" : \" \" . esc_sql($_GET['order']);\n\t\t}\n\n\t\treturn $order_by;\n}", "title": "" }, { "docid": "530ca73afd7bf3e993547f05ba588522", "score": "0.5312567", "text": "public function setParamOrderByUser(array $params = []): void\n {\n $validParams = [];\n foreach ($params as $key => $value) {\n $name = (is_int($key)) ? $value : $key;\n\n try {\n $this->checkParamName($name);\n $name = $this->getAliasParam($name);\n $validParams[] = $name;\n } catch (Throwable $e) {\n unset($e);\n $this->log[] = \"Parameter $name do not exists\";\n\n continue;\n }\n }\n $this->paramOrderByUser = $validParams;\n }", "title": "" }, { "docid": "2050d5a7ee03edf70227eb9ec676dfea", "score": "0.5307522", "text": "public function getParamsData($params)\n {\n if (\n isset($params['id'])\n && isset($params['status'])\n ) {\n return $params['status'] != 'All' ? $this->model->where(function($qry) use ($params) {\n $qry->whereHas('order',function ($q) use ($params) {\n $q->where(['status' => $params['status']]);\n });\n })->where('order_id', $params['id'])->with('order')->paginate(10) : $this->model->where('order_id', $params['id'])->with('order')->paginate(10) ;\n } elseif (isset($params['status'])) {\n return $params['status'] != 'All' ? $this->model->where(function($qry) use ($params) {\n $qry->whereHas('order',function ($q) use ($params) {\n $q->where(['status' => $params['status']]);\n });\n })->with('order')->paginate(10): $this->model->with('order')->latest()->paginate(10);\n } elseif(\n isset($params['read'])\n && isset($params['limit'])\n ) {\n return $this->model->where('read', $params['read'])->limit($params['limit'])->with('order')->latest()->paginate($params['limit']);\n } elseif(isset($params['limit'])) {\n return $this->model->limit($params['limit'])->with('order')->latest()->paginate($params['limit']);\n } elseif(isset($params['id'])) {\n return $this->model->where('order_id', $params['id'])->with('order')->paginate(10);\n }\n\n return [];\n }", "title": "" }, { "docid": "37f248269790b0517aa49a5881b41f77", "score": "0.53033423", "text": "private function setParamOrderByUser(array $params = []): void\n {\n $validParams = [];\n foreach ($params as $key => $value) {\n $name = (is_int($key)) ? $value : $key;\n if (!$this->isValidParamName($name)) {\n $this->log[] = \"Parameter $name do not exists\";\n continue;\n }\n $name = $this->getAliasParam($name);\n $validParams[] = $name;\n }\n $this->paramOrderByUser = $validParams; /* @phpstan-ignore-line */\n }", "title": "" }, { "docid": "2b33d69d03bb3138baa5a072aafa56c7", "score": "0.5301515", "text": "public function testPrepareOrderByQueryByInternalParam()\n {\n $oListObject = $this->getMock(\\OxidEsales\\Eshop\\Application\\Model\\Links::class, array(\"isMultilang\", \"getLanguage\", \"getCoreTableName\"));\n $oListObject->expects($this->once())->method('isMultilang')->will($this->returnValue(true));\n $oListObject->expects($this->once())->method('getLanguage')->will($this->returnValue(1));\n $oListObject->expects($this->once())->method('getCoreTableName')->will($this->returnValue(\"oxlinks\"));\n\n $oList = $this->getMock(\\OxidEsales\\Eshop\\Core\\Model\\ListModel::class, array(\"getBaseObject\"));\n $oList->expects($this->any())->method('getBaseObject')->will($this->returnValue($oListObject));\n\n $sTable = getViewName('oxlinks', 1);\n\n $oAdminList = $this->getProxyClass('oxAdminList');\n $oAdminList->setNonPublicVar('_oList', $oList);\n $oAdminList->setNonPublicVar('_sDefSortField', 'oxactive');\n $sResultSql = $oAdminList->UNITprepareOrderByQuery('');\n\n $this->assertEquals(\"order by `$sTable`.`oxactive` desc\", trim($sResultSql));\n }", "title": "" }, { "docid": "eadb5bc9bc11f3a2204db94f856055ec", "score": "0.530052", "text": "public function get_query_params()\n {\n }", "title": "" }, { "docid": "ff9d8872aaada3c9e547c7be3058f04a", "score": "0.52990633", "text": "protected function buildJsonParameters(array $required, array $optional): array\n {\n foreach ($required as $key => $value) {\n if (empty($value)) {\n throw new Exception(sprintf('Required parameter \\'%s\\' is missing..', $key));\n }\n }\n\n $json = $required;\n\n foreach ($optional as $key => $value) {\n if (!empty($value) || false === $value) {\n $json[$key] = $value;\n }\n }\n\n return $json;\n }", "title": "" }, { "docid": "c30126a27f593ad9ed4dc15fa02322a9", "score": "0.527771", "text": "function params($model = null) {\n\t\tif (empty($model)) {\n\t\t\t$model = $this->defaultModel();\n\t\t}\n\t\tif (!isset($this->params['paging']) || empty($this->params['paging'][$model])) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->params['paging'][$model];\n\t}", "title": "" }, { "docid": "2a5ca1e09761a4266cd8337cc32832ba", "score": "0.5271005", "text": "protected function add_order_by_sql_params($query_args)\n {\n }", "title": "" }, { "docid": "11f2b0e8ed2b87b900d3f300ce53e120", "score": "0.52554846", "text": "public function testSelectOrderByAssociativeArrayContainingExtraExpressions(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage(\n 'Passing extra expressions by associative array (`\\'id\\' => \\'desc -- Comment\\'`) ' .\n 'is not allowed to avoid potential SQL injection. ' .\n 'Use QueryExpression or numeric array instead.'\n );\n\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->orderBy([\n 'id' => 'desc -- Comment',\n ]);\n }", "title": "" }, { "docid": "84878f88a3cd01504a21f1e15ddaa3f6", "score": "0.5255183", "text": "public function fetchBy($params)\r\n {\r\n }", "title": "" }, { "docid": "6a15cd542d2a0d793367d6d4a029110c", "score": "0.52469295", "text": "function get_all_employee($params = array())\n{\n try {\n $this->db->where('employeeStatus !=','removed');\n $this->db->order_by('employeeId', 'desc');\n if(isset($params) && !empty($params)){\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('employee')->result_array();\n } catch (Exception $ex) {\n throw new Exception('Employee_model model : Error in get_all_employee function - ' . $ex);\n } \n}", "title": "" }, { "docid": "41ae59a619de5b8d2fd8fe692718a100", "score": "0.5233818", "text": "public function all(array $optional = []): Response;", "title": "" }, { "docid": "4a21e38a38f8c54acb2770be3a9c16e1", "score": "0.5233499", "text": "function getQueryOrder()\n{\n // order=true : Descending\n // order=false (Or anything other than true) : Ascending\n \n if (isset($_GET['order']) && $_GET['order'] === 'true') return 'DESC';\n \n return 'ASC';\n}", "title": "" }, { "docid": "16c4f15aeeee58f19286b33b71936a86", "score": "0.5231213", "text": "public function prepareQuery(&$params, &$fields, &$sorting, &$joins, &$condition)\n {\n }", "title": "" }, { "docid": "df1022f28fc08cc609bf38737bfbb9d0", "score": "0.5209361", "text": "public function getPositionalQueryParameters();", "title": "" }, { "docid": "7738e6a6d8c97b557d88f802188816d1", "score": "0.520219", "text": "function _params()\n {\n return array('limit' => array('name' => _(\"Number of activities to display\"),\n 'type' => 'int',\n 'default' => 10));\n }", "title": "" }, { "docid": "fbf557d9c075a5ad0662caa91c662ee5", "score": "0.5197843", "text": "public function select($table, array $optional = null, array $params = null){\n\n if (is_null($optional)){\n $optional = array();\n }\n\n $fields = (isset($optional['fields']) ? $optional['fields'] : '*');\n $where = (isset($optional['where']) ? $optional['where'] : null);\n $order = (isset($optional['order']) ? $optional['order'] : null);\n $limit = (isset($optional['limit']) ? $optional['limit'] : null);\n $offset = (isset($optional['offset']) ? $optional['offset'] : null);\n\n $query =\n 'SELECT '.$fields.' FROM '.$table\n .(!is_null($where) ? ' WHERE '.$where : '')\n .(!is_null($order) ? ' ORDER BY '.$order : '')\n .(!is_null($offset) ? ' OFFSET '.$offset : '')\n .(!is_null($limit) ? ' LIMIT '.$limit : '');\n\n if ($this->query($query, $params) == false){\n return false;\n }\n\n return $this->countRows();\n }", "title": "" }, { "docid": "0e379863b871523b533587c1b2011255", "score": "0.5185739", "text": "abstract function PQuery($tblname,$where,$field,$urlopt='',$ord='id',$dc='desc',$defield='id',&$page=1,$size=10);", "title": "" }, { "docid": "7b280b6db71eb123fab50f3f29fd276e", "score": "0.51614654", "text": "protected function setOffsetAndLimit(){\r\n $parameters = $this->request->getQueryParams();\r\n $this->offset = !empty($parameters['offset']) ? (int)filter_var($parameters['offset'], FILTER_SANITIZE_NUMBER_INT) : 0;\r\n if((!empty($parameters['limit']) && (int)$parameters['limit'] <= DEFAULT_DB_LIMIT) ){\r\n $this->limit = (int)filter_var($parameters['limit'], FILTER_SANITIZE_NUMBER_INT);\r\n }else{\r\n $this->limit = DEFAULT_DB_LIMIT;\r\n }\r\n }", "title": "" }, { "docid": "353d75d1c26f1a98870e257bc8397927", "score": "0.51614237", "text": "public function get($params) {\r\n // print_r($params->pagination);\r\n if (isset($params->select_values)) {\r\n $select_values = $params->select_values;\r\n }\r\n\r\n $dest_table_as = $params->dest_table_as;\r\n\r\n if (isset($params->join_tables)) {\r\n $join_tables = $params->join_tables;\r\n }\r\n\r\n if(isset($params->like_where_tables)){\r\n $where_tables = $params->like_where_tables;\r\n }\r\n\r\n if (isset($params->where_tables)) {\r\n $where_tables = $params->where_tables;\r\n }\r\n if (isset($params->where_tables_like)) {\r\n $where_tables_like = $params->where_tables_like;\r\n }\r\n if (isset($params->or_where_tables)) {\r\n $or_where_tables = $params->or_where_tables;\r\n }\r\n\r\n if (isset($params->order_by)) {\r\n $order_by = $params->order_by;\r\n }\r\n\r\n if (isset($params->limit)) {\r\n $limit = $params->limit;\r\n }\r\n\r\n if (isset($params->pagination)) {\r\n $pagination = $params->pagination;\r\n }\r\n\r\n foreach ($select_values as $each_select) {\r\n $select[] = $this->db->select($each_select);\r\n }\r\n\r\n\r\n $from = $this->db->from($dest_table_as);\r\n\r\n if ((isset($join_tables))) {\r\n foreach ($join_tables as $each_join) {\r\n $join = $this->db->join($each_join['join_with'], $each_join['join_on'], $each_join['join_type']);\r\n }\r\n }\r\n if ((isset($where_tables))) {\r\n foreach ($where_tables as $each_where) {\r\n $where = $this->db->where($each_where['where_column'], $each_where['where_value']);\r\n }\r\n }\r\n\r\n if ((isset($where_tables_like))) {\r\n foreach ($where_tables_like as $each_where) {\r\n $where_like = $this->db->like($each_where['where_column'], $each_where['where_value']);\r\n }\r\n }\r\n\r\n if ((isset($or_where_tables))) {\r\n foreach ($or_where_tables as $each_where) {\r\n $or_where = $this->db->or_where($each_where['where_column'], $each_where['where_value']);\r\n }\r\n }\r\n if ((isset($order_by))) {\r\n foreach ($order_by as $each_order_by) {\r\n $order = $this->db->order_by($each_order_by['order_column'], $each_order_by['order_type']);\r\n }\r\n }\r\n\r\n if ((isset($limit))) {\r\n $limit = $this->db->limit($limit);\r\n }\r\n\r\n if ((isset($pagination))) {\r\n //offset => how many datas allowed to get\r\n //start => start on array n\r\n $pagination = $this->db->limit($pagination['offset'],$pagination['start']);\r\n }\r\n\r\n $query = $this->db->get();\r\n $res = $query->result();\r\n if ($query == TRUE) {\r\n $response = OK_STATUS;\r\n // $data = array(\"response\" => $response, \"results\" => $res,\"sql\" => $this->db->last_query());\r\n $data = array(\"response\" => $response, \"results\" => $res);\r\n } else {\r\n $response = FAIL_STATUS;\r\n $data = array(\"response\" => $response, \"results\" => $res);\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "29c4b8fc04e23b83766f0854841d55b2", "score": "0.51491606", "text": "function aDBc_get_limit_offset_sql_args(){\n\t\t$page_number = 1;\n\t\tif(!empty($_GET['paged'])){\n\t\t\t$page_number = absint($_GET['paged']);\n\t\t}\n\n\t\t// Identify items per page to display\n\t\t$per_page = 50;\n\t\tif(!empty($_GET['per_page'])){\n\t\t\t$per_page = absint($_GET['per_page']);\n\t\t}\n\n\t\t// Prepare LIMIT and OFFSET\n\t\t$offset = ($page_number - 1) * $per_page;\n\t\t$limit_offset = \" LIMIT $offset,$per_page\";\n\n\t\treturn $limit_offset;\n}", "title": "" }, { "docid": "814c097ffcad4e39cc6c1d88e6aa7952", "score": "0.51388067", "text": "protected function setDefaultSearchParams()\n {\n $this->searchParams = array_merge(array(\n 'returnType' => self::$RETURN_TYPE_LEGACY,\n ), $this->searchParams);\n }", "title": "" }, { "docid": "1106cd57080bcb7d204d72137c0b76b7", "score": "0.51331997", "text": "protected function getOptionalOptions() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "4fdebb564d597a3304f6cbd2e12aa809", "score": "0.5129616", "text": "protected function prepareParams()\n {\n $attributes = ['id', 'parentId', 'score', 'weight', 'version', 'class'];\n\n foreach ($attributes as $attribute) {\n if (($value = $this->{$attribute}) !== null) {\n $this->andWhere(Db::parseParam($attribute, $value));\n }\n }\n\n if (($value = $this->element) !== null) {\n $this->andWhere(Db::parseParam('elementId', $value));\n }\n\n if ($this->dateCalculated !== null) {\n $this->andWhere(Db::parseDateParam('dateCalculated', $this->dateCalculated));\n }\n }", "title": "" }, { "docid": "cf012b2b23d996712c72e3f2728c8d62", "score": "0.51270944", "text": "protected function queryOffset()\n {\n if (isset($this->key[\"params\"][\"limit\"]) && $this->key[\"params\"][\"offset\"] != -1) {\n $this->sqlQuery .= \" LIMIT :offset, :limit\"; /* this is the short syntax */\n }\n\n }", "title": "" }, { "docid": "12e539a12e0ad1b6f545d21dd52f3b55", "score": "0.51267", "text": "public function paginate($params)\n {\n\n $sort_by = isset($params['sort_by']) ? $params['sort_by'] : 'created_at';\n $order = isset($params['order']) ? $params['order'] : 'desc';\n $page_length = isset($params['page_length']) ? $params['page_length'] : config('config.page_length');\n $keyword = isset($params['keyword']) ? $params['keyword'] : null;\n $status = isset($params['status']) ? $params['status'] : 0;\n $start_date = isset($params['start_date']) ? $params['start_date'] : null;\n $end_date = isset($params['end_date']) ? $params['end_date'] : null;\n $query = $this->data;\n return $query->orderBy($sort_by, $order)->paginate($page_length);\n }", "title": "" }, { "docid": "88518d031b3fd42cf82ac5fee000b178", "score": "0.51260614", "text": "public function getRecordsetFromObjectQuery($extra='',$limit=-1,$offset=-1);", "title": "" }, { "docid": "d1f66ff61cc69b99094b024eee883953", "score": "0.5116307", "text": "protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $this->status = isset($_GET['status']) ? (int)$_GET['status'] : 0;\r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }", "title": "" }, { "docid": "ae42bf07e2869d693dad7b8ee9f8830b", "score": "0.51149744", "text": "public function params(array|StructuredQuery|null $params): static\n {\n $this->use('params', $params);\n return $this;\n }", "title": "" }, { "docid": "d9b983a7160e0e0ef3fa1916d1d468dc", "score": "0.5113884", "text": "public function setPaginationData($params){\n\n\n }", "title": "" }, { "docid": "33a4918c8ab28d7ad12036dcfcb81b8a", "score": "0.5109649", "text": "public function set_query_params($params)\n {\n }", "title": "" }, { "docid": "cad02e17a3886635c4305331802ac525", "score": "0.5100886", "text": "public function findSimple($params, $limit = 0, $offset = 0, $orderBy = false, &$total = null, $columns = ['id']) {\n $platform = $this->getAdapter()->getPlatform();\n $whereParams = array();\n foreach ($params as $param) {\n if ($param instanceof \\Zend\\Db\\Sql\\Expression) {\n $set = $param->getExpression();\n } else {\n $set = $platform->quoteIdentifierChain($param[0]) . ' ' . $param[1] . ' ';\n if (isset($param[2])) {\n $set .= $this->quoteValue($param[2]);\n } else {\n $set .= 'NULL';\n }\n }\n\n $whereParams [] = $set;\n }\n\n $where = '';\n if (!empty($whereParams)) {\n $where = 'where ' . implode(' AND ', $whereParams);\n }\n\n if (!is_null($total)) {\n $total = $this->query('select count(*) cnt from `' . $this->table . '` ' . $this->findJoin . ' ' . $where)->current()->cnt;\n }\n $tColumns = [];\n foreach ($columns as $column) {\n if (is_array($column)) {\n $tColumns [] = '`' . $column[0] . '`.`' . $column[1] . '`'; //to get columns from different tables when join\n } else {\n if ($column == '*')\n $tColumns [] = '`' . $this->table . '`.*'; //to get all table columns\n else\n $tColumns [] = '`' . $this->table . '`.`' . $column . '`';\n }\n }\n $result = $this->query('select ' . implode(', ', $tColumns) . ' from `' . $this->table . '` ' . $this->findJoin . ' ' .\n $where .\n ($orderBy ? ' order by ' . $orderBy : '') .\n ($limit ? ' limit ' . ((int) $offset) . ', ' . ((int) $limit) : '')\n );\n\n return $result;\n }", "title": "" }, { "docid": "500b367228e8d8593e35e797fa16e8e2", "score": "0.50978285", "text": "#[@test]\n public function castMultipleOptionalParameterMissing() {\n $this->loadFromRequest(array(\n 'orderdate' => '',\n 'shirt_size' => 'S',\n 'shirt_qty' => 1,\n 'notify_me' => array('send'),\n 'person_ids' => array('1549', '1552')\n ));\n $this->assertFalse($this->handler->errorsOccured());\n $this->assertEquals(array(0, 0), $this->wrapper->getValue('options'));\n }", "title": "" }, { "docid": "2bbdede72f8cd3ed85ac9e9580ca138b", "score": "0.5095893", "text": "function f($req, $opt = null, ...$params) {\n printf('$req: %d; $opt: %d; number of params: %d'.\"<br>\",\n $req, $opt, count($params));\n}", "title": "" }, { "docid": "93dcf86afd88c985b73ddd2f2c0fc412", "score": "0.5095514", "text": "private function additionalParameters(array $params,array $extra, $extraDefaults=[]){\n $params=array_merge($params,$extra);\n\n $params=$this->addDefaultValues($params, $extraDefaults);\n\n return $params;\n }", "title": "" }, { "docid": "b20a3d83beb31ceb2149731b1d64c327", "score": "0.50884306", "text": "private function set_args( $params ) {\n\n\t\tif ( empty( $params ) ) { return; }\n\n\t\t$args = array();\n\n\t\t$args['no_found_rows']\t\t\t= true;\n\t\t$args['orderby'] \t\t\t\t= $params['order'];\n\t\t$args['posts_per_page'] \t\t= absint( $params['quantity'] );\n\t\t$args['post_status'] \t\t\t= 'publish';\n\t\t$args['post_type'] \t\t\t\t= 'job';\n\t\t$args['update_post_term_cache'] = false;\n\n\t\tunset( $params['order'] );\n\t\tunset( $params['quantity'] );\n\t\tunset( $params['listview'] );\n\t\tunset( $params['singleview'] );\n\n\t\tif ( empty( $params ) ) { return $args; }\n\n\t\tif ( ! empty( $params['location'] ) ) {\n\n\t\t\t$args['meta_query'][]['key'] \t\t= 'job-location';\n\t\t\t$args['meta_query'][]['value'] \t\t= $params['location'];\n\n\t\t\tif ( is_array( $params['location'] ) ) {\n\n\t\t\t\t$args['meta_query'][]['compare'] = 'IN';\n\n\t\t\t}\n\n\t\t\tunset( $params['location'] );\n\n\t\t}\n\n\t\t$args = wp_parse_args( $params, $args );\n\n\t\treturn $args;\n\n\t}", "title": "" }, { "docid": "81dfab62fc70cebbb9c9c12639715665", "score": "0.50866234", "text": "function query(array $arr = null)\n {\n }", "title": "" }, { "docid": "5111caf645fb8ee05288108e9f1bac28", "score": "0.50850874", "text": "function osc_get_all_get_params($exclude_array = '') {\n if (!is_array($exclude_array)) $exclude_array = array();\n\n $exclude_array[] = session_name();\n $exclude_array[] = 'error';\n $exclude_array[] = 'x';\n $exclude_array[] = 'y';\n\n $get_url = '';\n\n foreach ( $_GET as $k => $v ) {\n if ( !in_array($k, $exclude_array) ) {\n $get_url .= $k;\n\n if ( !empty($v) ) {\n $get_url .= '=' . rawurlencode($v);\n }\n\n $get_url .= '&';\n }\n }\n\n return $get_url;\n }", "title": "" }, { "docid": "a472df45aadfb58c69cd67f6131e2c6e", "score": "0.50848943", "text": "private function mapRequest($params)\n {\n if (isset($params['current'])) {\n $this->pageCurrent = $params['current'];\n }\n\n if (isset($params['limit'])) {\n $this->pageLimit = $params['limit'];\n }\n $this->pageSkip = ($this->pageCurrent - 1) * $this->pageLimit;\n }", "title": "" }, { "docid": "55b298e7ea72830ab9c18c4900fa2991", "score": "0.50793874", "text": "abstract protected function prepareParams();", "title": "" }, { "docid": "9c2883b060951abe6f7c256d49f91223", "score": "0.5075251", "text": "public function setOrderBy( $q_1, array $params = [] ){\n\n //get latest forums acc to order field and direction passed\n if(array_key_exists('by_order', $params) && !empty($params['by_order'])) {\n $q_1->orderBy('forum.'.$params['by_order'], $params['by_order_direction']);\n }\n\n //set order of forums i.e most trending\n if(array_key_exists('by_trending', $params) && !empty($params['by_trending'])) {\n $q_1->orderBy('forum.'.$params['by_trending'], $params['by_trending_direction']);\n }\n ////get latest comments of forum acc to id\n /* if(array_key_exists('by_forum_id', $params) && $params['by_forum_id']) {\n $q_1->orderBy('forum_comments.created_at', 'DESC');\n }*/\n }", "title": "" }, { "docid": "62ee34b7b283cc2c69e7d456b4823454", "score": "0.5071157", "text": "public function fetchAll($params = []);", "title": "" }, { "docid": "5ea84fd370965c2f796275c7d827950c", "score": "0.5065779", "text": "public function testGetUnorderedParameterMissing()\n {\n $urlCfg = new ezcUrlConfiguration();\n $urlCfg->basedir = 'mydir/';\n $urlCfg->script = 'index.php';\n $urlCfg->addUnorderedParameter( 'language' );\n\n // should have been http://www.example.com/mydir/index.php/(language)/en\n $url = new ezcUrl( 'http://www.example.com/mydir/index.php//en', $urlCfg );\n $this->assertEquals( null, $url->getParam( 'language' ) );\n }", "title": "" }, { "docid": "42e81d2d17ecf3ef88a3195df5c12ed7", "score": "0.50596297", "text": "function oos_get_all_get_parameters($aExclude = '')\n{\n\n if (!is_array($aExclude)) $aExclude = array();\n $aParameters = array('p', 'error', 'rewrite', 'c', 'm', 'page', 'infex.php', 'history_back', 'gclid', 'x', 'y');\n\n $sUrl = '';\n if (is_array($_GET) && (count($_GET) > 0)) {\n foreach ($_GET as $sKey => $sValue) {\n if (!empty($sValue)) {\n if ( ($sKey != oos_session_name()) && (!in_array($sKey, $aParameters)) && (!in_array($sKey, $aExclude)) ) {\n $sUrl .= $sKey . '=' . rawurlencode($sValue) . '&amp;';\n }\n }\n }\n }\n\n return $sUrl;\n}", "title": "" }, { "docid": "61ae151f9fb41e74830cb4ec5a1e853b", "score": "0.5058021", "text": "function si_exhibition_get_pager_parameters() {\n $show = isset($_GET['show']) ? $_GET['show'] : 'all';\n $sort = isset($_GET['sort']) ? $_GET['sort'] : 'asc';\n $limit = isset($_GET['limit']) ? $_GET['limit'] : 10;\n $page = isset($_GET['page']) ? $_GET['page'] : 0;\n return array($show, $sort, $limit, $page);\n}", "title": "" }, { "docid": "27227ba3f88d7147ae385d9625f6549a", "score": "0.5041084", "text": "private function convertParams(&$params, &$fetchmode = null)\n {\n // compat check, the params and fetchmode parameters used to have the opposite order\n if (!is_array($params)) {\n if (is_array($fetchmode)) {\n if ($params === null) {\n $tmp = DbInterface::DB_FETCHMODE_DEFAULT;\n } else {\n $tmp = $params;\n }\n $params = $fetchmode;\n $fetchmode = $tmp;\n } elseif ($params !== null) {\n $fetchmode = $params;\n $params = array();\n }\n }\n\n // can't use isset() as 0 may be null\n if (array_key_exists(0, $params)) {\n array_unshift($params, false);\n unset($params[0]);\n }\n }", "title": "" }, { "docid": "99076bd3800e87a4770b5a8159d3eb9d", "score": "0.5022841", "text": "private function prepareRequestParams( $search_by, $endpoint, $actions = array(), $params = array() ) {\n\t\t$return = $endpoint;\n\n\t\tif ( $search_by ) {\n\t\t\t$return .= '/' . $search_by;\n\t\t}\n\n\t\tif ( ! empty( $actions ) && is_array( $actions ) ) {\n\t\t\t$return_params = implode( '/', $actions );\n\t\t\t$return .= '/' . $return_params;\n\t\t}\n\n\t\tif ( ! empty( $params ) && is_array( $params ) ) {\n\t\t\t$return .= '?';\n\t\t\t$i = 0;\n\t\t\tforeach ( $params as $param => $value ) {\n\t\t\t\tif ( $i > 0 ) {\n\t\t\t\t\t$return .= '&';\n\t\t\t\t}\n\t\t\t\t$return .= $param . '=' . $value;\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "e2ef42faa50a4a2c66d2f68fa912bd15", "score": "0.5022567", "text": "private function applyLimit() {\n if (!isset($this->limitValue) || is_null($this->limitValue)) {\n return;\n }\n\n $this->query .= ' limit '.$this->limitValue;\n\n if (!isset($this->offsetValue) || is_null($this->offsetValue)) {\n return;\n }\n\n $this->query .= ' offset '.$this->offsetValue;\n }", "title": "" }, { "docid": "284d63055b98ed21ff7372b9b1d261c0", "score": "0.50192606", "text": "protected function _addQueryWhere($params=array()) {\n\t\t\t$fields = count($params) ? $params : $this->_req_query_fields;\n\t\n\t\t\tforeach ($fields as $k => $v) {\n\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$this->db->where_in($this->table . '.' . $k, $v);\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where($this->table . '.' . $k, $v);\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\n\t}", "title": "" }, { "docid": "0b6d7498c80be261b1c970c2813d5db6", "score": "0.50121164", "text": "function sortByGET($get){\n if(!$get['sort']){\n $result = simpleQuery(\"SELECT * FROM tunes\");\n }else if ($get['sort_title'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY tune_title ASC;\");\n }else if ($get['sort_type'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY tune_type ASC;\");\n }else if ($get['sort_metre'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY metre ASC;\");\n }else if ($get['sort_length'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY default_note_length ASC;\");\n }else if ($get['sort_composer'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY composer ASC;\");\n }else if ($get['sort_source'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY source ASC;\");\n }else if ($get['sort_transcriber'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY transcriber ASC;\");\n }else if ($get['sort_country'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY country ASC;\");\n }else if ($get['sort_author_id'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY author_id ASC;\");\n }else if ($get['sort_instrument'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY instrument ASC;\");\n }else if ($get['sort_key'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY `key` ASC;\");\n }else if ($get['sort_body'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY body ASC;\");\n }else if ($get['sort_rank'] == 'asc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY rank ASC;\"); \n }else if ($get['sort_title'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY tune_title DESC;\");\n }else if ($get['sort_type'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY type DESC;\");\n }else if ($get['sort_metre'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY metre DESC;\");\n }else if ($_GET['sort_length'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY length DESC;\");\n }else if ($get['sort_composer'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY composer DESC;\");\n }else if ($get['sort_nationality'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY nationality DESC;\");\n }else if ($get['sort_author_id'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY author_id DESC;\");\n }else if ($get['sort_instrument'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY instrument DESC;\");\n }else if ($get['sort_key'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY `key` DESC;\");\n }else if ($get['sort_body'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY body DESC;\");\n }else if ($get['sort_rank'] == 'desc'){\n $result = simpleQuery(\"SELECT * FROM tunes ORDER BY rank DESC;\");\n }\n}", "title": "" }, { "docid": "e6eaeaf86600d65d886203477f014453", "score": "0.5009557", "text": "protected function processExtendedSearchParameters() {}", "title": "" }, { "docid": "d7c4b5553452a98f5c4d8191c638a466", "score": "0.5006447", "text": "public function fetchAll(array $params = array());", "title": "" }, { "docid": "78025de8ae25af55f6bde24287a68202", "score": "0.50063676", "text": "private function addSolrParams($params) {\n\n // Loop through conditions to add them into the query.\n foreach ($params as $param) {\n // Set the condition in the query.\n $this->query->setOption('solr_param_' . $param['parameter'], $param['value']);\n }\n }", "title": "" }, { "docid": "96dfb9920d013bf5330929ede7ab7fac", "score": "0.50003767", "text": "public function testFetchOrderInvalidRequestParameter()\n {\n echo \"\\n <<<<<< Fetch Order Invalid request parameters>>>>>> \\n\";\n \n $requestParams = [\n \"limit\" => 10,\n \"page\" => 0\n ];\n\n $this->json('GET', '/orders', $requestParams)->assertJsonStructure([\n 'errors' => [\n 'page',\n ]]);\n }", "title": "" }, { "docid": "087acdb3b15377048985ffce946506e0", "score": "0.4995433", "text": "public function getParams()\n {\n return $this->optionalParameter;\n }", "title": "" }, { "docid": "5897462e9f03443d27a50086fd7a7d7c", "score": "0.4995184", "text": "public function sortBy(string|array $params)\n {\n $sortString = $params;\n\n if (is_array($params)) {\n $sortString = implode(',', $params);\n }\n\n $this->query()->add('sort', $sortString);\n }", "title": "" }, { "docid": "dccd59f1c6ec353954d574fc982e65d2", "score": "0.49906972", "text": "function selectQueryBuilder($selectTable, $selectCols, $whereStmtParams, $orderStmtParams, $joinStmtParams, $showHeading = false, $subsql_ret = false, &$cnt = 1, $returnType = 'assoc') {\n $rows = array();\n $wherestr = $orderstr = $joinstr = $groupstr = \"\";\n $whereVals = array();\n $query = \"\";\n $tableName = $this->databaseStructPtr->getTableName($selectTable);\n $allCols = $this->databaseStructPtr->getTableCols($selectTable);\n\n if (is_array($whereStmtParams)) {\n foreach ($whereStmtParams as $whereStmtKey => $whereStmt) {\n $whereStmt['colname'] = trim($whereStmt['colname']);\n $conditionop = '';\n if ($whereStmtKey > 0) //if there is only one WHERE statement, there is no need for conditional operators!\n {\n if (strpos($whereStmt['colname'], 'OR ') !== FALSE && strpos($whereStmt['colname'], 'OR ') == 0) //true only if OR occurs at the start of the whereStmt\n {\n $splitWhere = explode(\" \", $whereStmt['colname']);\n $conditionop = ' OR ';\n $whereStmt['colname'] = trim($splitWhere[1]);\n } else {\n $conditionop = ' AND ';\n }\n\n }\n\n if (strpos($whereStmt['colname'], \".\")) {\n $wherecolname = explode(\".\", $whereStmt['colname']);\n $processedCol = $this->databaseStructPtr->getColName($wherecolname[0], $wherecolname[1]);\n } else\n $processedCol = $this->databaseStructPtr->getColName($tableName, $whereStmt['colname']);\n\n\n//\t\t\t\t// @todo checkpages if(!empty($whereStmt['colval'])) //why should this matter?\n//\t\t\t\tmight have the answer.. this could be used for statements like colname=vehicle_id whereop=IS NOT NULL...\n//so if the third param is empty, then the else case is invoked.. problem is now we used raw params which we processed to the required format.. so this method might not work\n {\n if (is_array($whereStmt['colval']) && !empty($whereStmt['colval'])) // for statements like vehicle_id IN (1,5,6)\n {\n if (array_key_exists('subsql', $whereStmt['colval'])) {\n $subsql = $whereStmt['colval']['subsql'];\n\n $subsql_query = $this->selectQueryBuilder($subsql['tableName'], $subsql['selectCols'], $subsql['whereParams'], null, null, null, true, $cnt);\n //echo $subsql;\n //$subWhereParams[]=array('colname'=>'districts.depot_id','whereop'=>'=','colval'=>$currentDistrict['depot_id']);\n// \t\t\t\t\t\t\t$subSql=array('subsql'=>array('tableName'=>'districts','whereParams'=>$subWhereParams));\n\n $whereVals = array_merge($whereVals, $subsql_query[0]);\n $whereclauses[] = $conditionop . $processedCol . \" \" . $whereStmt['whereop'] . \" (\" . $subsql_query[1] . \") \";\n } else {\n $whereprepholder = '(';\n foreach ($whereStmt['colval'] as $val) {\n $whereprepholders[] = \"$$cnt\";\n $whereVals[] = $val;\n $cnt++;\n\n }\n\n $whereprepholder .= implode(\",\", $whereprepholders) . ')';\n $whereclauses[] = $conditionop . $processedCol . \" \" . $whereStmt['whereop'] . \" \" . $whereprepholder;\n }\n } else {\n if (trim($whereStmt['whereop']) == 'LIKE')\n $whereclauses[] = $conditionop . \"lower($processedCol) \" . $whereStmt['whereop'] . \" LOWER($$cnt)\";\n else if (trim($whereStmt['whereop']) == 'IS')\n $whereclauses[] = $conditionop . $processedCol . ' ' . $whereStmt['whereop'] . ' ' . $whereStmt['colval'];\n else\n $whereclauses[] = $conditionop . $processedCol . $whereStmt['whereop'] . \"$$cnt\";\n\n if (trim($whereStmt['whereop']) != 'IS') {\n $whereVals[] = $whereStmt['colval'];\n $cnt++;\n\n }\n }\n\n\n }\n // @todo checkpages What is the use case scenario for this condition? check pages/*.php for this condition\n// \t\t\t\telse\n// \t\t\t\t{\n// \t\t\t\t\t$whereclauses[]=$processedCol.\" \".$whereStmt['whereop'].\" \";\n// \t\t\t\t}\n\n }\n $wherestr = ' WHERE ' . implode(' ', $whereclauses);\n\n\n }\n if (is_array($joinStmtParams)) {\n foreach ($joinStmtParams as $joinStmt) {\n //continue here\n\n $typeJoin = $joinStmt['jointype'];\n $joinTable = $joinStmt['jointable'];\n\n $joinStmtColumns = array();\n\n foreach ($joinStmt[\"joinColumns\"] as $joinColumns) {\n\n $leftTableCol = explode(\".\", $joinColumns[0]);\n $rightTableCol = explode(\".\", $joinColumns[1]);\n $processedTableLeft = $this->databaseStructPtr->getTableName($leftTableCol[0]);\n $processedColLeft = $this->databaseStructPtr->getColName($leftTableCol[0], $leftTableCol[1]);\n $processedTableRight = $this->databaseStructPtr->getTableName($rightTableCol[0]);\n $processedColRight = $this->databaseStructPtr->getColName($rightTableCol[0], $rightTableCol[1]);\n $joinStmtColumns[] = $processedColLeft . ' = ' . $processedColRight;\n }\n $joinClauses[] = $typeJoin . ' ' . $joinTable . ' ON ' . implode(\" AND \", $joinStmtColumns);\n //echo \"<br>inner \".$typeJoin.' '.$joinTable.' ON '.$processedTableLeft.\".\".$processedColLeft.' = '.$processedTableRight.\".\".$processedColRight;\n\n }\n\n $joinstr = ' ' . implode(' ', $joinClauses);\n }\n\n if (is_array($orderStmtParams)) {\n\n foreach ($orderStmtParams as $orderStmt) {\n $processedCol = $this->databaseStructPtr->getColName($tableName, $orderStmt['colname']);\n $orderType = $orderStmt['ordertype'];\n $orderclauses[] = $processedCol . \" \" . $orderType;\n\n }\n\n $orderstr = ' ORDER BY ' . implode(' , ', $orderclauses);\n\n }\n $groupStmtParams = null;\n //@todo 20160801 implementation pending\n if (isset($groupStmtParams) && is_array($groupStmtParams)) {\n\n foreach ($groupStmtParams as $groupStmt) {\n $processedCol = $this->databaseStructPtr->getColName($tableName, $groupStmt['colname']);\n $groupclauses[] = $processedCol . \" \";\n\n }\n\n $groupstr = ' GROUP BY ' . implode(' , ', $groupclauses);\n\n }\n\n if (!is_array($selectCols)) {\n if (is_array($joinStmtParams)) {\n $allJoinCols = $allCols;\n foreach ($joinStmtParams as $joinStmt) {\n $joinTable = $joinStmt['jointable'];\n $joinColsNew = $this->databaseStructPtr->getTableCols($joinTable);\n\n// \t\t\t\t\tif(isset($joinStmt['joinAlias']))\n// \t\t\t\t\t{\n// \t\t\t\t\t\tforeach($joinStmt['joinAlias'] as $jalias)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t\t$params=explode('.'$jalias);\n// \t\t\t\t\t\t\t//@todo continue here if you want to pass ALIAS as the last argument of a join statement..\n//\t\t\t\t\t\t\t\t\tarray('INNER JOIN','depots',array(array('vehicles.depot_id','depots.depot_id')),array('depots.name AS dname'))\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\tprint_r($this->databaseStructPtr->getTableCols ( $joinTable));\n// \t\t\t\t\t\tprint_r($joinStmt['joinAlias']);\n\n// \t\t\t\t\t}\n $allJoinCols = array_merge($allJoinCols, $joinColsNew);\n }\n $query = \"SELECT \" . implode(',', $allJoinCols) . \" FROM \" . $tableName . $joinstr . $wherestr . $orderstr;\n\n } else\n $query = \"SELECT \" . implode(',', $allCols) . \" FROM \" . $tableName . $joinstr . $wherestr . $orderstr;\n\n } else {\n $selectColsProcessed = array();\n foreach ($selectCols as $eachCol)\n $selectColsProcessed[] = $this->databaseStructPtr->getColName($tableName, trim($eachCol));\n $query = \"SELECT \" . implode(',', $selectColsProcessed) . \" FROM \" . $tableName . $joinstr . $wherestr . $orderstr; //@todo 20160801 add groupstr here\n }\n\n if ($subsql_ret) {\n return array($whereVals, $query);\n }\n\n //else\n// \t\t\techo $query.\"<br>\"; print_r($whereVals);\n $this->prepare($query);\n $this->execute($whereVals);\n\n if (!$this->result) {\n throw new Exception(\"Datenbank Abfrage fehler\");\n return false;\n }\n\n $rows = array();\n\n if ($showHeading === true) {\n\n $rows [] = $this->databaseStructPtr->getTableHeadings($tableName, $selectCols);\n }\n\n while ($row = $this->fetchArray()) {\n if (!is_array($row)) continue;\n $rows [] = $row;\n }\n\n return $rows;\n\n\n }", "title": "" }, { "docid": "454b93dc2935776a7ec6d049a86ff3bd", "score": "0.49873394", "text": "function ol_sort_price_with_pagination() {\n\tif ( empty( $_GET['min-price'] ) || empty( $_GET['max-price'] ) ) {\n\t\treturn '';\n\t}\n\n\treturn '&min-price=' . esc_html( $_GET['min-price'] ) . '&max-price=' . esc_html( $_GET['max-price'] );\n}", "title": "" }, { "docid": "84249838138b1b06c2eb3cea1c3ee8c2", "score": "0.49852917", "text": "static function prepareFromRequest($paramsNeedle=array()) {\n $params = null;\n $request = new Zend_Controller_Request_Http();\n foreach ($paramsNeedle as $param) {\n $coockie = $request->getParam($param, \"all\");\n if ($coockie && $coockie != \"all\") {\n $filterClass = \"Application_Model_\" . ucfirst($param);\n $filter = new $filterClass();\n $filterValue = $filter->getByAlias($coockie);\n if ($filterValue) {\n $params[$param] = $filterValue;\n }\n }\n }\n\n $params[\"sort\"] = $request->getCookie(\"sort\");\n\n return $params;\n }", "title": "" }, { "docid": "00287bd768f14586c32ce57f2e72616a", "score": "0.49804866", "text": "function setOrder($initCol)\n{\n if(isset($_GET['order'])){\n $order = $_GET['order'];\n }else{\n $order = $initCol;\n }\n return($order);\n}", "title": "" }, { "docid": "74c444a32203c19f7731f636ebe696e6", "score": "0.49765664", "text": "private function __createRequestCriterions($params)\n {\n extract($params);\n $criterions = array(\n 'url' => \"http://%$pattern%\",\n 'criterions' => array(\n \"ORDER BY\" => \"CDate ASC\",\n ),\n );\n if (!empty($searchUserId)) {\n $criterions['criterions']['WHERE']['AND'][] = \"`User_Id`=$searchUserId\";\n }\n if (!empty($siteId)) {\n $criterions['criterions']['WHERE']['AND'][] = \"`Site_Id`=\\\"$siteId\\\"\";\n }\n if (!empty($limit)) {\n $criterions['criterions']['LIMIT'] = implode(', ', $limit);\n }\n if (!empty($criterions['criterions']['WHERE']['AND'])) {\n $criterions['criterions']['WHERE'] = implode(' AND ', $criterions['criterions']['WHERE']['AND']);\n }\n\n return $criterions;\n }", "title": "" }, { "docid": "ac3f30dfcaeee1561283ac1aec9e7e46", "score": "0.49747074", "text": "function succulents_qodef_get_query_order_by_array( $first_empty = false, $additional_elements = array() ) {\n\t\t$orderBy = array();\n\t\t\n\t\tif ( $first_empty ) {\n\t\t\t$orderBy[''] = esc_html__( 'Default', 'succulents' );\n\t\t}\n\t\t\n\t\t$orderBy['date'] = esc_html__( 'Date', 'succulents' );\n\t\t$orderBy['ID'] = esc_html__( 'ID', 'succulents' );\n\t\t$orderBy['menu_order'] = esc_html__( 'Menu Order', 'succulents' );\n\t\t$orderBy['name'] = esc_html__( 'Post Name', 'succulents' );\n\t\t$orderBy['rand'] = esc_html__( 'Random', 'succulents' );\n\t\t$orderBy['title'] = esc_html__( 'Title', 'succulents' );\n\t\t\n\t\tif ( ! empty( $additional_elements ) ) {\n\t\t\t$orderBy = array_merge( $orderBy, $additional_elements );\n\t\t}\n\t\t\n\t\treturn $orderBy;\n\t}", "title": "" }, { "docid": "aed7aa3552971de29b70cc4662edfc85", "score": "0.49733084", "text": "public function _params()\n {\n $params = $this->input->param();\n if (empty($params)) {\n $params = [];\n }\n\n if (empty($params['limit'])) {\n $params['limit'] = self::LISTLIMIT;\n }\n\n if (empty($params['offset'])) {\n $params['offset'] = 0;\n }\n\n if (!empty($params['p']) && is_numeric($params['p']) && $params['p'] > 0) {\n $params['offset'] = ($params['p'] - 1) * $params['limit'];\n } else {\n unset($params['p']);\n }\n\n return $params;\n }", "title": "" }, { "docid": "add0dd741ba2fd43b7d362a877fa688d", "score": "0.49726817", "text": "public function __construct(array $params = [])\n {\n $this->page($params['page'] ?? 1);\n $this->limit($params['limit'] ?? 20);\n $this->total($params['total'] ?? 0);\n }", "title": "" }, { "docid": "3a83ffc81e8b171af5d41bc1339c93ca", "score": "0.49687743", "text": "public function testParamOrder()\n {\n // Param verification failed\n $verification_failed_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n ]);\n\n $verification_failed_response\n ->assertStatus(422);\n\n // A param for age\n $agd_response_success =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'age'\n ]);\n\n $agd_response_success\n ->assertStatus(200)\n ->assertSeeTextInOrder([\n 'age'\n ]);\n\n // A param for metacritic score\n $metacritic_review_score_response_success =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'metacritic_review_score'\n ]);\n\n $metacritic_review_score_response_success\n ->assertStatus(200)\n ->assertSeeTextInOrder([\n 'metacritic_review_score'\n ]);\n\n // A param for steam_user_review_score\n $steam_user_review_score_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'steam_user_review_score'\n ]);\n\n $steam_user_review_score_response\n ->assertStatus(200)\n ->assertSeeTextInOrder([\n 'steam_user_review_score'\n ]);\n\n // A param for steam_user_review_count\n $steam_user_review_count_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'steam_user_review_count'\n ]);\n\n $steam_user_review_count_response\n ->assertStatus(200)\n ->assertSeeTextInOrder([\n 'steam_user_review_count'\n ]);\n\n // A param for released at\n $released_at_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'released_at'\n ]);\n\n $released_at_response\n ->assertStatus(200)\n ->assertSeeTextInOrder([\n 'steam_user_review_score'\n ]);\n\n // A param for created at\n $created_at_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'created_at'\n ]);\n\n $created_at_response\n ->assertStatus(200);\n\n // A param for updated at\n $updated_at_response =\n $this->json('get', '/api/v3/game/list', [\n 'order' => 'desc',\n 'order_field' => 'updated_at'\n ]);\n\n $updated_at_response\n ->assertStatus(200);\n }", "title": "" }, { "docid": "aec13bc1b838ad71a482665ab2794885", "score": "0.49648148", "text": "public function optional_param($p,$d='')\n\t{\n\t\t$v = $this->_request->getParam($p);\n\t\tif(null === $v)return $d;\n\t\telse return $v;\n\t}", "title": "" }, { "docid": "22fa41456a2b913d7b023206d8199d95", "score": "0.49599135", "text": "public function params($count, $default = null)\n {\n $params = $this->params;\n if (count($params) - $count > 0) {\n $text = implode(' ', array_slice($params, $count - 1));\n $params = array_slice($params, 0, $count - 1);\n $params[] = $text;\n }\n if (count($params) < $count) {\n $array = is_array($default);\n for ($i = count($params); $i < $count; $i++) {\n $params[$i] = $array ? $default[$i] : $default;\n }\n }\n return $params;\n }", "title": "" }, { "docid": "6438a7e4dd4a1507238632af0dff36c7", "score": "0.49538788", "text": "function findAndOrder($table, $cond = array(), $limit = 0, $fields = array(), $order_fields = array(), $order = 'ASC') {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d1a656c7aebc0309b1ff3a046c22fdbc", "score": "0.4951917", "text": "public function getUpdateQueryWithPositionalParameters();", "title": "" }, { "docid": "992c6b2cebd6e133cc7ce496a6b02761", "score": "0.49400038", "text": "abstract protected function _buildQueryParamsArray();", "title": "" }, { "docid": "c833a9fad210393ac01b2a0342a80af5", "score": "0.49370065", "text": "function require_params(...$list_of_params) {\n foreach ($list_of_params as $param)\n if (!array_key_exists($param, $_REQUEST) || strlen($_REQUEST[$param]) == 0) return false;\n return true;\n}", "title": "" }, { "docid": "2b19df4a0379a7d012fedbe864632c93", "score": "0.49358168", "text": "public function getAllPaginated(array $searchParams, ?int $quantity): LengthAwarePaginator;", "title": "" }, { "docid": "788b33a7b65c043fb6cb1cc9afa1581b", "score": "0.4934515", "text": "public function setDefaultQueryParams(array $params)\n {\n $params = array_merge($this->defaultQueryParams, $params);\n $this->defaultQueryParams = $params;\n }", "title": "" }, { "docid": "5a8b7e861b59e2cd7216374f5bb2dacd", "score": "0.4933881", "text": "function DBOselectUploads($params=null)\n{\n $db = DBOconnect();\n $offset = $params['offset'] ?? 0;\n $limit = $params['limit'] ?? 20;\n $filter = $params['filter'] ?? null;\n $orderby = $params['orderby'] ?? 'id';\n $order = $params['order'] ?? 'DESC';\n Logger::Tlog (['function' => __FUNCTION__, 'line' => __LINE__, 'message' => $params]);\n if ($filter) {\n $table = $filter['table'] ?? 'up';\n $col = $filter['col'] ?? 'name';\n if (!isset($filter['value'])) {\n die('Value is not set when filter uploads');\n }\n $value = $filter['value'];\n $stmt = $db->prepare(\"SELECT us.name `user`, us.avatar, up.id, up.name, up.rating, up.isPrivate FROM `users` us JOIN `uploads` up ON us.id=up.userid WHERE {$table}.{$col}='{$value}' ORDER BY up.{$orderby} {$order} LIMIT {$offset}, {$limit}\");\n } else {\n $stmt = $db->prepare(\"SELECT us.name `user`, us.avatar, up.id, up.name, up.rating, up.isPrivate FROM `users` us JOIN `uploads` up ON us.id=up.userid ORDER BY up.{$orderby} {$order} LIMIT {$offset}, {$limit}\");\n }\n $stmt->execute();\n Logger::Tlog (['function' => __FUNCTION__, 'line' => __LINE__, 'message' => $stmt]);\n $res = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $res;\n}", "title": "" }, { "docid": "adc0c65c6fe7121a4fb307e6d70a9cdb", "score": "0.49288386", "text": "function getRequiredOrderBy() {\n\t\treturn null;\n\t}", "title": "" } ]
ce642c048ffd2d86219ff963f6b486d9
esta funcion arroja directamente el precio publico
[ { "docid": "6e6499621de0195bf67ab14dd37b9e04", "score": "0.0", "text": "function porciento2($porC,$neto){\r\n // a partir del precio neto y el % de utilidad y en formato de decimales\r\n return number_format($neto/((100-$porC)/100), 2, '.', '');\r\n //return $neto/((100-$porC)/100);\r\n}", "title": "" } ]
[ { "docid": "d49720ab442f1b9301675bbad685c8c6", "score": "0.6848798", "text": "public function peserta();", "title": "" }, { "docid": "b158388b79f64cb26bcdacd1a197d4a3", "score": "0.65354925", "text": "public function obtenerPrecio();", "title": "" }, { "docid": "14088626e2c735d5268ae945b24d0396", "score": "0.64342654", "text": "function obtener_publicaciones_espera_revison_bakcend($data){\r\n\r\n $titulo = \"\";\r\n if(isset($data['titulo']) && $data['titulo'] != \"\" && $data['titulo'] != NULL){\r\n $titulo = \" AND pr.titulo LIKE '%$data[titulo]%' \";\r\n }\r\n $emailP2W = \"\";\r\n $emailEMPRESA = \"\";\r\n if(isset($data['email']) && $data['email'] != \"\" && $data['email'] != NULL){\r\n $emailP2W = \" AND u.email = '$data[email]' \";\r\n $emailEMPRESA = \" AND u.correo = '$data[email]' \";\r\n }\r\n\r\n $fecha_actual = intval(microtime(true));\r\n\r\n $date = date(\"Y-m-d H:i:s\",$fecha_actual);\r\n\r\n parent::conectar();\r\n \r\n $enEspera = parent::consultaTodo(\"SELECT * FROM (SELECT u.nombreCompleto as nombre_usuario, u.email as email, u.telefono as telefono ,pr.id, pr.uid, pr.empresa, pr.tipo, pr.tipoSubasta,pr.producto,pr.marca,\r\n pr.modelo, pr.titulo,pr.descripcion, pr.categoria, pr.subcategoria, pr.condicion_producto,pr.garantia, \r\n pr.estado,pr.cantidad,pr.moneda_local,pr.precio,pr.precio_usd,pr.precio_publicacion,pr.precio_usd_publicacion,\r\n pr.oferta,pr.porcentaje_oferta,pr.porcentaje_tax,pr.exposicion,pr.cantidad_exposicion,pr.envio,pr.id_direccion,\r\n pr.pais,pr.departamento,pr.ciudad,pr.latitud,pr.longitud,pr.codigo_postal,\t\r\n pr.direccion, pr.keywords,pr.foto_portada,pr.url_video,pr.portada_video,pr.cantidad_vendidas,\r\n pr.fecha_creacion,pr.fecha_actualizacion,pr.ultima_venta,\t\r\n pr.genero,pr.tiene_colores_tallas,pr.id_productos_revision_estados,\r\n pre.nombre_es AS revision_estado_es, pre.nombre_en AS revision_estado_en \r\n FROM productos_revision AS pr JOIN productos_revision_estados AS pre \r\n ON pr.id_productos_revision_estados = pre.id \r\n JOIN peer2win.usuarios as u\r\n ON pr.uid = u.id AND pr.empresa = 0\r\n WHERE pr.id_productos_revision_estados = 0 $titulo $emailP2W\r\n\r\n UNION SELECT u.razon_social as nombre_usuario, u.correo as email, u.telefono as telefono, pr.id, pr.uid, pr.empresa, pr.tipo, pr.tipoSubasta,pr.producto,pr.marca,\r\n pr.modelo, pr.titulo,pr.descripcion, pr.categoria, pr.subcategoria, pr.condicion_producto,pr.garantia, \r\n pr.estado,pr.cantidad,pr.moneda_local,pr.precio,pr.precio_usd,pr.precio_publicacion,pr.precio_usd_publicacion,\r\n pr.oferta,pr.porcentaje_oferta,pr.porcentaje_tax,pr.exposicion,pr.cantidad_exposicion,pr.envio,pr.id_direccion,\r\n pr.pais,pr.departamento,pr.ciudad,pr.latitud,pr.longitud,pr.codigo_postal,\t\r\n pr.direccion, pr.keywords,pr.foto_portada,pr.url_video,pr.portada_video,pr.cantidad_vendidas,\r\n pr.fecha_creacion,pr.fecha_actualizacion,pr.ultima_venta,\t\r\n pr.genero,pr.tiene_colores_tallas,pr.id_productos_revision_estados,\r\n pre.nombre_es AS revision_estado_es, pre.nombre_en AS revision_estado_en \r\n FROM productos_revision AS pr JOIN productos_revision_estados AS pre \r\n ON pr.id_productos_revision_estados = pre.id\r\n JOIN buyinbig.empresas as u\r\n ON pr.uid = u.id AND pr.empresa = 1 \r\n WHERE pr.id_productos_revision_estados = 0 $titulo $emailEMPRESA) as un ORDER BY un.id DESC;\r\n \");\r\n parent::cerrar();\r\n if($enEspera){\r\n $numXpagina = 9;\r\n $hasta = $data['pag']*$numXpagina;\r\n $desde = ($hasta-$numXpagina)+1;\r\n $respuesta = [];\r\n for($i = 0; $i<$hasta; $i++){\r\n if($i < count($enEspera)){\r\n if(($i + 1) >= $desde && ($i + 1) <= $hasta){\r\n $publicacion_fecha = date(\"Y-m-d H:i:s\",floatval($enEspera[$i]['fecha_actualizacion'])/1000);\r\n $fecha_update = strtotime($publicacion_fecha);\r\n $fecha_hoy = strtotime($date);\r\n $diferencia_dias = abs($fecha_hoy - $fecha_update)/(60*60*24);\r\n $enEspera[$i]['dias_espera'] = $diferencia_dias;\r\n array_push($respuesta, $enEspera[$i]);\r\n }\r\n }\r\n }\r\n $num_paginas = count($enEspera)/$numXpagina;\r\n $num_paginas = ceil($num_paginas);\r\n return array(\"status\" => \"success\",\"data\"=>$respuesta, \"pagina\" => $data['pag'], \"total_paginas\" => $num_paginas);\r\n } \r\n return array(\"status\" => \"fail\", \"mensaje\"=>\"error al obtener publicaciones\");\r\n }", "title": "" }, { "docid": "0f23ee8a3b8772efb0ddb5036ba6c905", "score": "0.6427383", "text": "function capturaPresupuesto(){\n $this->procedimiento='pre.ft_presup_partida_ime';\n $this->transaccion='PRE_CAPPRES_REP';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_partida','id_partida','int4');\n $this->setParametro('id_moneda','id_moneda','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "4e735b62c753130863d5eedbcec61704", "score": "0.6358521", "text": "function apagarProduto()\n{\n \n}", "title": "" }, { "docid": "063ced5f03627ba9fa8df11c575f97b7", "score": "0.6109399", "text": "public static function permisos()\n {\n }", "title": "" }, { "docid": "f7628b6881f7b03e4d955094b5ad4be4", "score": "0.61049116", "text": "public function obtenerPublicaciones(){\n $sql = \"SELECT * FROM publicacion WHERE habilitado = 1\";\n $secciones = $this->db->querySelectSecciones($sql);\n $resultado = false;\n if($secciones){\n $resultado = $secciones;\n }\n return $resultado;\n }", "title": "" }, { "docid": "335cca059441e16a928577cb44fcbfaa", "score": "0.6051309", "text": "function aplicarAcuerdo2011004(){\n\n\t\t$vecesMotivo1=0;\n\t\t$vecesMotivo2=0;\n $tres=0;\n if ($this->estadoEstudiante=='A'||$this->estadoEstudiante=='B')\n {\n $this->estadoEstudiante='B';\n }else\n {\n $this->estadoEstudiante='J';\n }\n if(isset($this->estudiantesPrueba[$this->codigoEstudiante]))\n {\n foreach($this->estudiantesPrueba[$this->codigoEstudiante] as $anioperiodo=>$motivo)\n {\n if($motivo['PROMEDIO'][0]<320&&$anioperiodo>20111)\n {\n $vecesMotivo1++;\n }\n if(strpos($motivo['MOTIVO'][0],'2')!== false&&$anioperiodo>20111)\n {\n $vecesMotivo2++;\n }\n }\n }\n\t\tif(($vecesMotivo1>=4)||($vecesMotivo2>=4)){\n\t\t\t$this->estadoEstudiante='U';\n if($vecesMotivo1>=4)\n {$this->causal+=100;}\n if($vecesMotivo2>=4)\n {$this->causal+=20;}\n\t\t}\n\t\tif(isset($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]))\n {\n foreach($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante] as $clave=>$numeroVeces)\n {\n //se busca el total de veces q tiene espacio perdido en todos los periodos incluido el actual\n if($numeroVeces==3)\n {\n $setenta=$this->validarSetentaPorciento($this->codigoEstudiante);\n if(!$setenta)\n {\n $this->estadoEstudiante='U';\n $tres++;\n }\n }elseif($numeroVeces>=4)\n {\n $this->estadoEstudiante='U';\n $tres++;\n }\n }\n }\n if($tres>0){$this->causal+=3;}\n if($this->renovaciones=='ok')\n {\n \n }else\n {\n $this->causal+=5000;\n $this->estadoEstudiante='U';\n }\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cf5662deec0888eaad0cd468e2ddb4fb", "score": "0.6035734", "text": "public function okruzi();", "title": "" }, { "docid": "b4055ef9020fea3e477a9acc7cb0d7d6", "score": "0.60304654", "text": "function generaPrecio($moneda){\n \n $moneda = explode(\"/\", $moneda);\n \n $cambio = \"http://65.181.127.143/ss/q.php?symbols=\".$moneda[0].$moneda[1]; //esta url nos devuelve el tipo de cambio de venta y compra\n $cambioJSON = file_get_contents($cambio);\n $cambios = json_decode($cambioJSON);\n// $valor = explode(\" \", $cambios[0]);\n\n return $cambios;\n}", "title": "" }, { "docid": "e932fecf0e2abc3fa1b68244acbadf53", "score": "0.60279775", "text": "function get_publicaciones_pendientes() {\n\t$publicaciones = get_publicaciones_pendientes_dao();\n\t$publicaciones = construir_publicaciones($publicaciones);\n\treturn $publicaciones;\n}", "title": "" }, { "docid": "ca26cf0041d6da07e99bc125ef74b7fb", "score": "0.6022636", "text": "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "title": "" }, { "docid": "652a4a3fcaf498c3196533c463b34c63", "score": "0.602193", "text": "public function originPicture_portefolio()\r\n{\r\n return $this->_originPicture_portefolio;\r\n}", "title": "" }, { "docid": "8da9b26eef6e15fecb85158efd0d8f1f", "score": "0.60167944", "text": "function dame_publicacion($idPubli,$db){\n//devuelve un json\n $usuario = dame_cookie();\n\n //slecciona todo sobre esa publicación\n //la imagen se guarda con la ruta de ../imagenes_pub/ejemplo.jpg\n $consul = \"SELECT * FROM publicacion WHERE id_publicacion='$idPubli'\";\n $resp = mysqli_query($db,$consul);\n $row = mysqli_fetch_assoc($resp);\n\n //busca si el usuario actual, ya reaccionó a la publicación\n $consulta = \"SELECT * FROM reaccion WHERE id_publi_reac='$idPubli' AND id_usu_reac='$usuario'\";\n $re = mysqli_query($db,$consulta);\n $fila = mysqli_fetch_assoc($re);\n if(isset($fila[\"tipo_reac\"]))\n $tipoReac = $fila[\"tipo_reac\"];\n else\n $tipoReac = \"null\";\n\n //sabiendo el id_autor(número de cuenta), busca su nombre de usuario\n $usu = $row[\"id_autor\"];\n //si el autor es igual a la cookie, puede concluir\n if($usu==$usuario)\n $esAutor = \"true\";\n else\n $esAutor = \"false\";\n\n $consul = \"SELECT nomus,id_usuario FROM usuario WHERE id_usuario='$usu'\";\n $re = mysqli_query($db,$consul);\n $regis = mysqli_fetch_array($re);\n $nomUs = $regis[0];\n\n //si no hay denuncia genera un json para el ajax de publicacion.js\n $json = \"{\n \\\"autor\\\":\\\"\".$nomUs.\"\\\",\n \\\"estado\\\":\\\"\".$row[\"estado\"].\"\\\",\n \\\"imagen\\\":\\\"\".$row[\"imagen_publi\"].\"\\\",\n \\\"publicacion\\\":\\\"\".$row[\"publicacion\"].\"\\\",\n \\\"esAutor\\\":\\\"$esAutor\\\",\n \\\"usuReac\\\":\\\"$tipoReac\\\",\n \\\"denuncia\\\":\\\"\".$row[\"denuncia_p\"].\"\\\",\n \\\"idAutor\\\":\\\"\".$usu.\"\\\"\n }\";\n return $json;\n}", "title": "" }, { "docid": "f6593f1d64bbe588afeef7b3a7bfa17a", "score": "0.60070455", "text": "function verificarPresupuesto(){\n $this->procedimiento='pre.ft_presup_partida_ime';\n $this->transaccion='PRE_VERPRE_IME';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_partida','id_partida','int4');\n $this->setParametro('id_moneda','id_moneda','int4');\n $this->setParametro('monto_total','monto_total','numeric');\n $this->setParametro('sis_origen','sis_origen','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "a3c96cc934158bffc70121a926a3e980", "score": "0.59809184", "text": "protected static function obtenerMetodosPublicos() {\n if (preg_match_all('/function\\s+?(.+?)\\(/', self::$_archivo, $array)) {\n self::$_metodos_publicos = $array[1];\n }\n }", "title": "" }, { "docid": "6ff51190842d1d79d460c6bee44b97b1", "score": "0.5977683", "text": "public function getPropiedadPlazaLibre()\n {\n /*\n puede ser una plaza propia o una cedida.\n */\n $gesAsistentes = new \\asistentes\\model\\entity\\GestorAsistente();\n $err_txt = '';\n\n $id_activ = $this->getId_activ();\n $mi_dl = \\core\\ConfigGlobal::mi_delef();\n\n $propiedad = array();\n $pl_propias = $this->getPlazasPropias();\n\n if ($pl_propias > 0) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $mi_dl);\n if ($ocu < $pl_propias) {\n $propiedad[\"$mi_dl>$mi_dl\"] = \"$mi_dl ($ocu de $pl_propias)\";\n } else {\n $err_txt = _(\"Ya están todas las plazas ocupadas\");\n }\n }\n\n // Si no quedan, ver si dispongo de otras\n if (empty($propiedad)) {\n //Conseguidas\n $gesActividadPlazas = new \\actividadplazas\\model\\entity\\GestorActividadPlazas();\n // plazas de calendario de cada dl\n $cActividadPlazas = $gesActividadPlazas->getActividadesPlazas(array('id_activ' => $id_activ));\n foreach ($cActividadPlazas as $oActividadPlazas) {\n $id_dl_otra = $oActividadPlazas->getId_dl();\n $dl_otra = $this->getDlText($id_dl_otra);\n\n $json_cedidas = $oActividadPlazas->getCedidas();\n if (!empty($json_cedidas)) {\n $aCedidas = json_decode($json_cedidas, TRUE);\n foreach ($aCedidas as $dl_2 => $num_plazas) {\n if ($mi_dl == $dl_2) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $dl_otra);\n if ($ocu < $num_plazas) {\n $propiedad[\"$dl_otra>$dl_2\"] = \"$dl_otra ($ocu de $num_plazas)\";\n }\n }\n }\n }\n }\n }\n if (empty($propiedad)) {\n $rta['success'] = FALSE;\n $rta['mensaje'] = $err_txt;\n } else {\n $rta['success'] = TRUE;\n $rta['mensaje'] = $err_txt;\n $rta['propiedad'] = $propiedad;\n }\n\n return $rta;\n }", "title": "" }, { "docid": "18b42263b15aeeaeadf253f2318bc3ae", "score": "0.5965515", "text": "public function getPublicacionesPendientesByUsuarioName($nombre_usuario)\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n //buscamos el id del usuario segun el nombre de usuario introducido\r\n $ssql2 = \"SELECT * FROM usuario u WHERE u.Nombre = '$nombre_usuario'\";\r\n $usuario = mysql_fetch_assoc(mysql_query($ssql2,$conn));\r\n $usuario_id = $usuario['id'];\r\n $query = \"SELECT * FROM publicacion p WHERE p.id_usuario = '$usuario_id'\r\n AND p.Estado = 2\";\r\n //variable que almacenará las publicaciones de el usuario\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publicaciones = mysql_query($query,$conn); \r\n return $publicaciones; \r\n }", "title": "" }, { "docid": "d1d44f389e0bdd3d7fb4f36a78a18fa9", "score": "0.5955836", "text": "public function getAllPublicacionesPendientes()\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n $ssql2 =\"SELECT * FROM publicacion WHERE Estado = 2\";\r\n //variable que almacenará las publicaciones pendientes\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publicaciones = mysql_query($ssql2,$conn); \r\n return $publicaciones; \r\n }", "title": "" }, { "docid": "9060382d68ca5af1d0449a8d502ab7d9", "score": "0.5934947", "text": "function piero() {\n\n echo \"-->Questa è la mia funzione<-- </br>\"; //testiamo il funzionamento\n }", "title": "" }, { "docid": "984ddc9a508eed78a4c7279639d6c4ec", "score": "0.59186053", "text": "function reportePOA (){\n $this->objFunc=$this->create('MODPresupuesto');\n $dataSource=$this->objFunc->reportePOA();\n $this->dataSource=$dataSource->getDatos();\n\n $nombreArchivo = uniqid(md5(session_id()).'[Reporte-POA]').'.pdf';\n $this->objParam->addParametro('orientacion','L');\n $this->objParam->addParametro('tamano','LETTER');\n $this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n\n $this->objReporte = new RPoaPDF($this->objParam);\n $this->objReporte->setDatos($this->dataSource);\n $this->objReporte->generarReporte();\n $this->objReporte->output($this->objReporte->url_archivo,'F');\n\n\n $this->mensajeExito=new Mensaje();\n $this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado', 'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n $this->mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n }", "title": "" }, { "docid": "e25259599bee647501f14846fb7748df", "score": "0.59061116", "text": "function mo_creaTAblaPublica(){\n $con_numRows = \"SELECT COUNT(T.IDPUBLICACION) NUM_FIL FROM FINAL_PUBLICACION T WHERE T.TITULO\";\n \n $consulta1 = \"SELECT T.IDPUBLICACION, T.TITULO, T.FECHA_PUBLICACION, T.AUTOR FROM FINAL_PUBLICACION T WHERE T.TITULO\";\n $orderBy = \"T.TITULO\";\n\n $colNames = array('ID PUBLICACION', 'TITULO', 'FECHA PUBLICACION', 'AUTOR','','FINAL_EJERCICIO');\n $colnamesSQL = array('IDPUBLICACION', 'TITULO', 'FECHA_PUBLICACION', 'AUTOR');\n \n return mo_getTablaData($con_numRows,$consulta1,$colNames,$colnamesSQL,$orderBy);\n }", "title": "" }, { "docid": "9afc4bb361db590beb79798504bce3e0", "score": "0.5892999", "text": "public function Poks()\n {\n }", "title": "" }, { "docid": "9afc4bb361db590beb79798504bce3e0", "score": "0.5892999", "text": "public function Poks()\n {\n }", "title": "" }, { "docid": "f891378e10d48a9b96dc308e0b1b6947", "score": "0.58895105", "text": "function habilitarPago(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_HABPAG_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('id_depto_tes','id_depto_tes','int4');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "68d70d189d412557a0a1383cc7b5f98e", "score": "0.5884284", "text": "function calculaPVP ($idProducto, $precio_sin_recargo, $iva) {\n\t//$precioProd = calculaPrecioConRecargo($idProducto, $precio_sin_recargo);\n\t\n\t$recargoProd = calculaRecargoProducto($idProducto);\n\t$descRecargo = calculaDescuentoRecargoUsuario ();\n\t$precioProd = $precio_sin_recargo;\n\t\n\tif ($recargoProd && $recargoProd>0.01) {\n\t\tif ($descRecargo > 0) {\n\t\t\t$recargoProd = round(($recargoProd - ($recargoProd*$descRecargo/100)), 2);\n\t\t}\n\t\t$precioProd = $precioProd + ($precioProd * $recargoProd / 100);\n\t} \n\t\n\treturn round(($precioProd + ($precioProd * $iva / 100)), 2);\n}", "title": "" }, { "docid": "3f6c555295a2b45930cd554eee7aac1d", "score": "0.5858359", "text": "function f_getPresupuestoPortal($frm) {\n \n // Instancia de la clase Apartamentos.\n global $oApars;\n $aAp = $oApars->getApartamentos();\n \n \n // Obtiene valores del formulario.\n $can = $frm['cantidad']; // Cantidad a cobrar.\n $por = $frm['portal']; // Portal seleccionado.\n $tco = $frm['tipocoef']; // Tipo de coeficiente a aplicar.\n $mes = $frm['meses']; // Meses para pagar.\n\n // Calculos previos.\n $sumageneral = 0;\n $numgarajes = 0;\n foreach($aAp as $apa => $aApar) {\n if($aApar[0] == $por) {\n $sumageneral += $aApar[6]; // Suma los coeficientes generales del bloque.\n }\n $numgarajes += $aApar[12]; // Numero total de plazas de garaje.\n }\n $coefgar = 100 / $numgarajes; // Coeficiente para un garaje.\n\n // Tipo de coeficiente.\n switch($tco) {\n case 1: $tipo = \"Coeficiente general aplicado al portal\"; break;\n case 2: $tipo = \"Coeficiente general\"; break;\n case 3: $tipo = \"Coeficiente de $numgarajes plazas de garaje\"; break;\n default: $tipo = \"Coeficiente de portal\"; break;\n }\n\n // Inicializa las sumas: apartamento, metros, coeficiente y cuota.\n $sumApa = 0; $sumMe2 = 0; $sumPag = 0; $sumCob = 0; $sumEub = 0; \n \n // Titulo de los datos.\n $fApa = f_getPresupuestoTituloPortal($frm);\n \n // Recorre los apartamentos.\n foreach ($aAp as $apa => $aApar) {\n //array('0 portal','1 piso','2 letra','3 tipo','4 metros','5 terraza','6 coeficiente','7 coef.blo','8 finca','9 numreg','10 refcat','11 metcat','12 numgar')\n\n // En el coeficiente por plazas de garaje solo mostrara los que tengan plaza de garaje asignada.\n $mostrar = true;\n if($tco == 3) {\n $mostrar = ($aApar[12] > 0) ? true : false;\n }\n\n // Muestra solo los apartamentos elegidos.\n if($mostrar) {\n\n // Solo saca los apartamentos del portal seleccionado.\n if($aApar[0] == $por) {\n // Fila del apartamento.\n $fApa .= \"<tr>\";\n\n // Codigo del apartamento, opcional.\n if (isset($frm['codigo'])) {\n $fApa .= \"<td>$apa</td>\";\n }\n\n // Nombre del apartamento, se muestra siempre.\n $fApa .= \"<td>\" . $aApar[0] . \"-\" .$aApar[1] . $aApar[2] . \"</td>\"; \n $sumApa++;\n\n // Metros cuadrados, opcional.\n if(isset($frm['metros'])) {\n $fApa .= \"<td class=\\\"text-right\\\">\" . number_format($aApar[4],2,',','.') . \" m<sup>2</sup></td>\";\n $sumMe2 += $aApar[4];\n }\n\n // Coeficiente, opcional. \n switch($tco) {\n case 1: // Coeficiente general aplicado al bloque.\n $coef = $aApar[6] * 100 / $sumageneral;\n $deci = 4;\n break; \n case 2: // Coeficiente general.\n $coef = $aApar[6];\n $deci = 4;\n break; \n case 3: // Coeficiente por plaza de garaje.\n $coef = $aApar[12] * $coefgar; \n $deci = 2;\n break;\n default: // Coeficiente de bloque.\n $coef = $aApar[7]; \n $deci = 2;\n break; \n }\n\n if(isset($frm['coeficientes'])) {\n $fApa .= \"<td class=\\\"text-right\\\">\" . number_format($coef,$deci,',','.') . \" %</td>\";\n $sumCob += $coef;\n }\n\n // Total a pagar, se muestra siempre.\n $pagar = $coef * $can / 100;\n $fApa .= \"<td class=\\\"text-right successcolor\\\">\" . number_format($pagar,2,',','.') . \" €</td>\";\n $sumPag += $pagar;\n\n // Cuota a pagar, se muestra siempre.\n $cuotab = ($coef * $can) / ($mes * 100);\n $fApa .= \"<td class=\\\"text-right successcolor\\\">\" . number_format($cuotab,2,',','.') . \" €</td>\";\n $sumEub += $cuotab;\n \n // Cierra las filas.\n $fApa .= \"</tr>\";\n }\n }\n }\n \n // Pone las sumas.\n $fApa .= ($frm['sumas']) ? f_getPresupuestoSumasPortal($frm, $sumApa, $sumMe2, $sumCob, $deci, $sumPag, $sumEub) : \"\";\n \n // Devuelve todos los datos.\n $mesestxt = ($mes == 1) ? \"mes\" : \"meses\";\n $fApa = \"<h4><a name=\\\"inicio\\\"></a>Cuotas mensuales del <b>portal $por</b> para $mes $mesestxt</h4><table class=\\\"table table-condensed table-ultra\\\">$fApa</table>\";\n $fApa .= (isset($frm['coeficientes'])) ? \"<i>(1) $tipo</i>\" : \"\";\n return $fApa;\n}", "title": "" }, { "docid": "aa692583eb59c27c5b315f73d8414f62", "score": "0.585737", "text": "function solicitarDevPag(){\r\n $this->procedimiento='tes.ft_cuotas_devengadas_ime';\r\n $this->transaccion='TES_SOL_DEVENG_IME';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\r\n $this->setParametro('id_depto_conta','id_depto_conta','int4');\r\n $this->setParametro('estado_interfaz','estado_interfaz','varchar');\r\n $this->setParametro('accion','accion','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "189f49f222c2040b7c80d76fb857cbb5", "score": "0.5857143", "text": "function get_precio1($id) {\n\t\t$u = new Producto();\n\t\t//Buscar en la base de datos\n\t\t$u->get_by_id($id);\n\t\tif ($u->c_rows == 1) {\n\t\t\treturn $u->precio1;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "6aadec4c2f53a9674a71e0627a31e29e", "score": "0.5854457", "text": "public function getPrecio_viaje()\r\r\n {\r\r\n return $this->precio_viaje;\r\r\n }", "title": "" }, { "docid": "a178c8fc8cafd2f117cb42211393d09e", "score": "0.58230436", "text": "public function getPublicacionById($publicacion_id)\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n $query = \"SELECT * FROM publicacion p WHERE p.id = '$publicacion_id'\";\r\n //variable que almacenará las publicaciones de el usuario\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publication = mysql_fetch_assoc(mysql_query($query,$conn)); \r\n return $publication; \r\n }", "title": "" }, { "docid": "361e377dc3f3c5f3662015027b42e36d", "score": "0.5778777", "text": "function aplicarMotivoPromedio(){\n\t\t$motivo=0;\n\t\tswitch($this->acuerdoEstudiante){\n\t\t\tcase '2011004':\n\t\t\t\tif($this->promedioEstudiante<320){//cambiar por la consulta de nota aprobatoria\n\t\t\t\t\t$motivo=100;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//acuerdos 1993027 y 2009007\n\t\t\t\tif($this->promedioEstudiante<300){//cambiar por la consulta de nota aprobatoria\n\t\t\t\t\t$motivo=100;\n\t\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\treturn $motivo;\n\n\t}", "title": "" }, { "docid": "6204e33aa4117025e813bbe3f3caa854", "score": "0.5769577", "text": "function calculaPVPUsuario ($idProducto, $precio_sin_recargo, $iva, $usuario) {\n\t$recargoProd = calculaRecargoProducto($idProducto);\n\t$descRecargo = calculaDescuentoRecargoUsuarioConcreto ($usuario);\n\t$precioProd = $precio_sin_recargo;\n\t\n\tif ($recargoProd && $recargoProd>0.01) {\n\t\tif ($descRecargo > 0) {\n\t\t\t$recargoProd = round(($recargoProd - ($recargoProd*$descRecargo/100)), 2);\n\t\t}\n\t\t$precioProd = $precioProd + ($precioProd * $recargoProd / 100);\n\t} \n\t\n\treturn round(($precioProd + ($precioProd * $iva / 100)), 2);\n}", "title": "" }, { "docid": "f2f33e1def920017981c1525a652affb", "score": "0.5764885", "text": "function getPublicKeyFromPrimo(): string {\n $primo = new PrimoClient([\n 'apiKey' => ALMA_API_KEY,\n 'region' => ALMA_REGION,\n 'vid' => '',\n 'scope' => 'default_scope'\n ]);\n return $primo->getPublicKey();\n}", "title": "" }, { "docid": "f7739981716e78f5992466e61a84174a", "score": "0.574288", "text": "public function getPublicacionesAprobadasByUsuarioName($nombre_usuario)\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n //buscamos el id del usuario segun el nombre de usuario introducido\r\n $ssql2 = \"SELECT * FROM usuario u WHERE u.Nombre = '$nombre_usuario'\";\r\n $usuario = mysql_fetch_assoc(mysql_query($ssql2,$conn));\r\n $usuario_id = $usuario['id'];\r\n $query = \"SELECT * FROM publicacion p WHERE p.id_usuario = '$usuario_id'\r\n AND p.Estado = 1\";\r\n //variable que almacenará las publicaciones de el usuario\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publicaciones = mysql_query($query,$conn); \r\n return $publicaciones; \r\n }", "title": "" }, { "docid": "c43b2559c339b98f586766bc5d2e3552", "score": "0.57418054", "text": "function procesaPago($total){\n\t$iva = 1.18;\n\tfunction calculaIvaPago($iva){\n\t\treturn \"cargando IVA $iva\\n\";\n\t}\n\treturn \"procesando pago por $total\\n\";\n}", "title": "" }, { "docid": "b18e09a890d3e4507809a2cbb58663fd", "score": "0.57348585", "text": "function f_getPresupuesto($frm) {\n \n // Instancia de la clase Apartamentos.\n global $oApars;\n $aAp = $oApars->getApartamentos();\n \n // Obtiene valores del formulario.\n $gen = $frm['general'];\n $p[1] = $frm['portal1'];\n $p[2] = $frm['portal2'];\n $p[3] = $frm['portal3'];\n $p[4] = $frm['portal4'];\n $p[5] = $frm['portal5'];\n $p[6] = $frm['portal6'];\n $p[7] = $frm['portal7'];\n $p[8] = $frm['portal8'];\n $p[9] = $frm['portal9'];\n $p[10] = $frm['portal10'];\n $p[11] = $frm['portal11'];\n $p[12] = $frm['portal12'];\n $p[13] = $frm['portal13'];\n $p[14] = $frm['portal14'];\n $p[15] = $frm['portal15'];\n $mes = $frm['meses'];\n \n // Inicializa las sumas.\n $bloApa = 0; $bloMe2 = 0; $bloCof = 0; $bloEuf = 0; $bloCob = 0; $bloEub = 0; $bloCuo = 0;\n $sumApa = 0; $sumMe2 = 0; $sumCof = 0; $sumEuf = 0; $sumCob = 0; $sumEub = 0; $sumCuo = 0;\n \n // Si no hay sumas pone el titulo inicial solamente.\n $portal = \"\";\n $fApa = (!$frm['sumas']) ? f_getPresupuestoTitulo(\"Apartamentos\", $frm) : \"\";\n \n // Recorre los apartamentos.\n foreach ($aAp as $apa => $aApar) {\n //array('0 portal','1 piso','2 letra','3 tipo','4 metros','5 terraza','6 coeficiente','7 coef.blo','8 finca','9 numreg','10 refcat','11 metcat','12 numgar')\n \n // Mira si hay cambio de portal.\n if($portal != $aApar[0] && $frm['sumas']) {\n // Pone las sumas.\n $fSumb = f_getPresupuestoSumas($frm, \"Portal $portal: \", $bloApa, $bloMe2, $bloCof, $bloEuf, $bloCob, $bloEub, $bloCuo);\n \n // Pone a cero las sumas.\n $bloApa = 0; $bloMe2 = 0; $bloCof = 0; $bloEuf = 0; $bloCob = 0; $bloEub = 0; $bloCuo = 0;\n $fApa .= ($portal) ? $fSumb : \"\";\n $portal = $aApar[0];\n \n // Pone el titulo del portal.\n $fApa .= f_getPresupuestoTitulo(\"Portal \" . $aApar[0], $frm);\n }\n \n // Inicia la fila del apartamento.\n $fApa .= \"<tr>\";\n \n // Codigo del apartamento, opcional.\n if (isset($frm['codigo'])) {\n $fApa .= \"<td>$apa</td>\";\n }\n \n // Nombre del apartamento, se muestra siempre.\n $fApa .= \"<td>\" . $aApar[0] . \"-\" .$aApar[1] . $aApar[2] . \"</td>\";\n $bloApa++; \n $sumApa++;\n \n // Metros cuadrados, opcional.\n if(isset($frm['metros'])) {\n $fApa .= \"<td class=\\\"text-right\\\">\" . number_format($aApar[4],2,',','.') . \" m<sup>2</sup></td>\";\n $bloMe2 += $aApar[4]; \n $sumMe2 += $aApar[4];\n }\n \n // Coeficiente general, opcional.\n if(isset($frm['coeficientes'])) {\n $fApa .= \"<td class=\\\"text-right\\\">\" . number_format($aApar[6],4,',','.') . \" %</td>\";\n $bloCof += $aApar[6]; \n $sumCof += $aApar[6];\n }\n \n // Cuota general, se muestra siempre.\n $cuotaf = ($aApar[6] * $gen) / ($mes * 100);\n $fApa .= \"<td class=\\\"text-right successcolor\\\">\" . number_format($cuotaf,2,',','.') . \" €</td>\";\n $bloEuf += $cuotaf; \n $sumEuf += $cuotaf; \n\n // Coeficiente de bloque, opcional.\n if(isset($frm['coeficientes'])) {\n $fApa .= \"<td class=\\\"text-right\\\">\" . number_format($aApar[7],2,',','.') . \" %</td>\";\n $bloCob += $aApar[7]; \n $sumCob += $aApar[7];\n } \n \n // Cuota escalera, se muestra siempre.\n $cuotab = ($aApar[7] * $p[$aApar[0]]) / ($mes * 100);\n $fApa .= \"<td class=\\\"text-right successcolor\\\">\" . number_format($cuotab,2,',','.') . \" €</td>\";\n $bloEub += $cuotab;\n $sumEub += $cuotab;\n \n // Suma de las cuotas.\n $cuotatot = $cuotaf + $cuotab;\n $fApa .= \"<td class=\\\"text-right successcolor\\\">\" . number_format($cuotatot,2,',','.') . \" €</td>\";\n $bloCuo += $cuotatot;\n $sumCuo += $cuotatot;\n \n // Cierra las filas.\n $fApa .= \"</tr>\";\n }\n \n // Sumas del ultimo portal y totales.\n $fApa .= ($frm['sumas']) ? f_getPresupuestoSumas($frm, \"Portal $portal: \", $bloApa, $bloMe2, $bloCof, $bloEuf, $bloCob, $bloEub, $bloCuo) : \"\";\n $fApa .= ($frm['sumas']) ? f_getPresupuestoSumas($frm, \"Total: \", $sumApa, $sumMe2, $sumCof, $sumEuf, $sumCob, $sumEub, $sumCuo) : \"\";\n \n // Devuelve todos los datos.\n return \"<h4><a name=\\\"inicio\\\"></a>Cuotas mensuales para un presupuesto de $mes meses.</h4><table class=\\\"table table-condensed table-ultra\\\">$fApa</table>\";\n}", "title": "" }, { "docid": "64a1bc586a6fe7af28d1bde1b35bea17", "score": "0.57293487", "text": "public function get_publicaciones() {\n\t\t$this->query = \"CALL SP_Obtener_Publicaciones()\";\n\t\t\n\t\t$this->get_results_from_query();\n\t\t\n\t\t$publicaciones = $this->rows;\n\t\t/*\n\t\techo \"<pre>\";\n\t\techo json_encode($publicaciones);\n\t\techo \"</pre>\";\n\t\t * */\n\t\treturn $publicaciones;\n\t}", "title": "" }, { "docid": "b9097a0cb1afad2c9a0ce97a4a3eb06c", "score": "0.5711506", "text": "function aplicarAcuerdo1993027(){\n if ($this->estadoEstudiante=='A'||$this->estadoEstudiante=='B')\n {\n $this->estadoEstudiante='B';\n }else\n {\n $this->estadoEstudiante='J';\n }\n\t\tif(isset($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]))\n {\n foreach($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante] as $clave=>$numeroVeces)\n {\n //se busca el total de veces q tiene espacio perdido en todos los periodos incluido el actual\n if($numeroVeces==3)\n {\n $setenta=$this->validarSetentaPorciento($this->codigoEstudiante);\n if(!$setenta)\n {\n $this->estadoEstudiante='Z';\n $this->causal=3;\n }\n }elseif($numeroVeces>=4)\n {\n $this->estadoEstudiante='Z';\n $this->causal=3;\n }\n }\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4f624a1800835f9c7d5fc9ef1e83dec7", "score": "0.56950605", "text": "function reportePOA(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPPOA_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n $this->captura('id_objetivo','int4');\n $this->captura('id_objetivo_fk','int4');\n $this->captura('codigo','varchar');\n $this->captura('nivel_objetivo','int4');\n $this->captura('hijos','int4');\n $this->captura('nietos','int4');\n $this->captura('hermanos','int4');\n $this->captura('sw_transaccional','varchar');\n $this->captura('cantidad_verificacion','numeric');\n $this->captura('unidad_verificacion','varchar');\n $this->captura('ponderacion','numeric');\n $this->captura('fecha_inicio','date');\n $this->captura('tipo_objetivo','varchar');\n $this->captura('descripcion','varchar');\n $this->captura('linea_base','varchar');\n $this->captura('indicador_logro','varchar');\n\n $this->captura('periodo_ejecucion','varchar');\n $this->captura('producto','varchar');\n $this->captura('fecha_fin','date');\n\n $this->captura('gestion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "7eedef9190f0ca1294d0a2ab9d8bcc9b", "score": "0.5682526", "text": "function reporteObPlanProrra()\r\n {\r\n $this->procedimiento = 'tes.f_obligacion_pp_prorrateo';\r\n $this->transaccion = 'TES_ROPPPRO_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('fecha_ini', 'fecha_ini', 'date');\r\n $this->setParametro('fecha_fin', 'fecha_fin', 'date');\r\n //$this->setParametro('tipo', 'tipo', 'varchar');\r\n //$this->setParametro('monto_mayor', 'monto_mayor', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('ult_est_pp', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('nro_cuota', 'numeric');\r\n $this->captura('estado_pp', 'varchar');\r\n $this->captura('tipo_cuota', 'varchar');\r\n $this->captura('nro_cbte', 'varchar');\r\n $this->captura('c31', 'varchar');\r\n $this->captura('monto_ejecutar_mo', 'numeric');\r\n $this->captura('ret_garantia', 'numeric');\r\n $this->captura('liq_pagable', 'numeric');\r\n $this->captura('desc_ingas', 'varchar');\r\n $this->captura('codigo_cc', 'varchar');\r\n $this->captura('partida', 'varchar');\r\n $this->captura('codigo_categoria', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n\r\n// var_dump($this->respuesta);exit;\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "bbded4e0ff5c818ecb44d452d36adbc3", "score": "0.568075", "text": "function creaPolizaAutomaticaIVA($segmento,$sucursal,$numeroformap,$idpoliza,$idbeneficiario,$concuentas,$beneficiario,$idDocumento,$concepto,$fecha,$numerocheque,$bancodestino,$cuentadestino,$idbancaria,$cuentabeneficiariob,$importe,$referencia,$formapago,$tc,$statusanticipo=0,$idUser=0){\n\t$Exercise = $this->ChequesModel->getExerciseInfo();\n\tif( $Ex = $Exercise->fetch_assoc() ){\n\t\t$idorg = $Ex['IdOrganizacion'];\n\t\t$idejer = $Ex['IdEx'];\n\t\t$idperio = $Ex['PeriodoActual'];}\n\t$info = $this->ChequesModel->infoConfiguracion();\n\t\t\n\t\tif( isset($_COOKIE['ejercicio']) ){\n\t\t\t$idperio = $_COOKIE['periodo'];\n\t\t\t$idejer = $this->ChequesModel->idex($_COOKIE['ejercicio'],'cont');\n\t\t}\n\t\telse{\n\t\t\tif(!$info['RFC']==\"\"){\n\t\t\t\t$idejer = $this->ChequesModel->idex($info['EjercicioActual'],'cont');\n\t\t\t\t$idperio = $info['PeriodoActual'];\n\t\t\t}\n\t\t}\n\t\t$cuentasConf = $this->ChequesModel->configCuentas();\n\t\t\n\t\tif($idbeneficiario==1){\n\t\t\t$dato = $this->ChequesModel->datosproveedor( $beneficiario);\n\t\t\t$rfc = $dato['rfc'];\n\t\t\t$tipo = \"2-\";\n\t\t\t\n\t\t}elseif($idbeneficiario==5){//clientebeneficiario\n\t\t\t$dato = $this->ChequesModel->clienteInfo( $beneficiario);\n\t\t\t$rfc = $dato['rfc'];\n\t\t\t$tipo = \"1-\";\n\t\t}\n\t\telseif($idbeneficiario==2){//empleado\n\t\t\t$dato = $this->ChequesModel->datosempleados($beneficiario);\n\t\t\t$rfc = $dato['rfc'];\n\t\t\t$tipo = \"\";\n\t\t}else{//traspaso rfc organizacion\n\t\t\t$rfc = $cuentasConf['RFC'];\n\t\t\t$tipo = \"\";\n\t\t\t$idbeneficiario=6;\n\t\t}\n\t\t\n\t\t//pato\n\t\t$cuenta = explode('//', $idbancaria);//$b['idbancaria'].\"//\".$b['account_id'].\"//\".$b['coin_id']\n\t\t$datosBeneficiario = explode('/', $cuentabeneficiariob);//$b['account_id'].\"/\".$b['currency_id']\n\t\t$cuentacontable = $cuenta[1];\n\t\t$cuentabeneficiario = $datosBeneficiario[0];\n\t\t$idbancaria = $cuenta[0];\n\t\t$cuentamoneda = $cuenta[2];\n\t\t$modenaCuentaBene = $datosBeneficiario[1];\n\t\t$fecha = date('Y-m-d', strtotime($fecha));\n\t\t$xml=\"\";//$segmento=1;$sucursal=1;\n\t\tif($idpoliza>0){\n\t\t\t\n\t\t\t$importAntes = $this->ChequesModel->importMovBancoPoliza($idDocumento, $cuentacontable);\n\t\t\t$sinmov = $this->ChequesModel->eliminaMovimientosPoliza($idDocumento);\n\t\t\tif($sinmov==1){\n\t\t\t\tif(($importAntes['importe'] != $importe) || ($importAntes['beneficiario'] != $beneficiario)){\n\t\t\t\t\t$this->ChequesModel->inactivaRelacionPrv($idpoliza);\n\t\t\t\t}\n\t\t\t\t$poli = $this->ChequesModel->savePoliza($referencia,$idpoliza,$idorg, $idejer, $idperio, 2, $concepto, $fecha, $beneficiario, $numeroformap, $rfc, $bancodestino, $cuentadestino, $idbancaria,$idDocumento,$idbeneficiario,$statusanticipo,$idUser);\n\t\t\t\t$numPoliza['id'] = $idpoliza;\n\t\t\t}\n\t\t}else{\n\t\t\t$poli = $this->ChequesModel->savePoliza($referencia,0,$idorg, $idejer, $idperio, 2, $concepto, $fecha, $beneficiario, $numeroformap, $rfc, $bancodestino, $cuentadestino, $idbancaria,$idDocumento,$idbeneficiario,$statusanticipo,$idUser);\n\t\t\t$numPoliza = $this->ChequesModel->getLastNumPoliza();\n\t\t}\n\t\tif( $poli == 0 ){\n\t\t\t\n\t\t\t//$numPoliza = $this->ChequesModel->getLastNumPoliza();\n\t\t\t$rutapoli \t= $this->path('../cont/').\"xmls/facturas/\" . $numPoliza['id'];\n\t\t\tif(!file_exists($rutapoli))\n\t\t\t{\n\t\t\t\tmkdir ($rutapoli, 0777);\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\t/* MOVIMIENTO EXT */\n\t\t\t\tif($cuentamoneda!=1){\n\t\t\t\t\t$ban = $this->ChequesModel->InsertMov($numPoliza['id'], 1, $segmento, $sucursal, $cuentacontable, \"Abono M.E\",$importe, $concepto,$tipo, $xml, $referencia, $formapago,$tc);\n\t\t\t\t\t$ban = $this->ChequesModel->InsertMov($numPoliza['id'], 1, $segmento, $sucursal, $cuentacontable, \"Abono\", number_format(floatval($importe * $tc),2,'.',''), $concepto,$tipo, $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t\t\n\t\t\t\t\t$importedll = $importe;\n\t\t\t\t\t$importe = number_format(floatval($importe * $tc),2,'.','');\n\t\t\t\t}\n\t\t\t\t/* FIN MOV EXT */\n\t\t\t\telse{\n\t\t\t\t\t$ban = $this->ChequesModel->InsertMov($numPoliza['id'], 1, $segmento, $sucursal, $cuentacontable, \"Abono\", $importe, $concepto,$tipo, $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t}\n\t\t\t\n\t\t\tif($ban==true){\n\t\t\t\t\t/* MOVIMIENTO EXT */\n\t\t\t\tif($modenaCuentaBene!=1){\n\t\t\t\t\tif($cuentamoneda==1){\n\t\t\t\t\t\t$importedll = number_format(floatval($importe / $tc),2,'.','');\n\t\t\t\t\t}\n\t\t\t\t\t$bene = $this->ChequesModel->InsertMov($numPoliza['id'], 2, $segmento, $sucursal, $cuentabeneficiario, \"Cargo M.E.\", $importedll, $concepto,$tipo.$beneficiario, $xml, $referencia, $formapago,$tc);\n\t\t\t\t\t$bene = $this->ChequesModel->InsertMov($numPoliza['id'], 2, $segmento, $sucursal, $cuentabeneficiario, \"Cargo\", $importe, $concepto,$tipo.$beneficiario, $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t/* FIN MOV EXT */\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t$bene = $this->ChequesModel->InsertMov($numPoliza['id'], 2, $segmento, $sucursal, $cuentabeneficiario, \"Cargo\", $importe, $concepto,$tipo.$beneficiario, $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t}\n\t\t\t\tif($bene==true){\n\t\t\t\t\t$iva = $importe / 1.16;\n\t\t\t\t\t$iva = $iva * .16;\n\t\t\t\t\tif($concuentas){\n\t\t\t\t\t\t$ivapen = $this->ChequesModel->InsertMov($numPoliza['id'], 3, $segmento, $sucursal, $cuentasConf['CuentaIVAPendientePago'], \"Abono\", number_format($iva,2,'.',''), $concepto,'2-', $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t\t\t$ivapagado = $this->ChequesModel->InsertMov($numPoliza['id'], 4, $segmento, $sucursal, $cuentasConf['CuentaIVApagado'], \"Cargo\", number_format($iva,2,'.',''), $concepto,'2-', $xml, $referencia, $formapago,'0.0000');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* mov xml a poliza */\n\t\t$cont= 0;$xmlsvalidos = array();\n\t\t\t$dirOrigen = $this->path('../cont/').\"xmls/facturas/documentosbancarios/\".$idDocumento;\n\t\t\tif ($vcarga = opendir($dirOrigen)){\n\t\t\t\twhile($file = readdir($vcarga)){\n\t\t\t\tif($file != '.' AND $file != '..' AND $file != '.DS_Store' AND $file != '.file'){\n\t\t\t\t\t\n\t\t\t\t\t\tif (!is_dir($dirOrigen.'/'.$file)){\n\t\t\t\t\t\t\tif(copy($dirOrigen.'/'.$file, $rutapoli.'/'.$file)){\n\t\t\t\t\t\t\tif(!in_array($file, $xmlsvalidos)){\n\t\t\t\t\t\t\t\t$xmlsvalidos[]= $file;\n\t\t\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\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\tif($cont>0){\n\t\t\t\tforeach($xmlsvalidos as $rutaxml){\n\t\t\t\t\t$uuid = explode('_', $rutaxml);\n\t\t\t\t\t$uuid = str_replace('.xml', '', $uuid[2]);\n\t\t\t\t\t$mov = $this->ChequesModel->movimientosPoliza($idDocumento);\n\t\t\t\t\tif(!$uuid){\n\t\t\t\t\t\t$uuid = str_replace('.xml', '', $rutaxml);\n\t\t\t\t\t}\n\t\t\t\t\tif($mov->num_rows>0){\n\t\t\t\t\t\twhile($row = $mov->fetch_array()){\n\t\t\t\t\t\t\tif($cont>1){\n\t\t\t\t\t\t\t\t$this->ChequesModel->movMultipleFactUpdate($row['Id'], $row['IdPoliza'], $row['NumMovto'],$rutaxml, $uuid );\n\t\t\t\t\t\t\t}elseif($cont==1){\n\t\t\t\t\t\t\t/* verifica si existen datos en el grupo\n\t\t\t\t\t\t\t * si si solo agrega al grupo otro xml\n\t\t\t\t\t\t\t * sino almacena no agrega al grupo y solo ase refrencia directa al mov */\n\t\t\t\t\t\t\t\t$grupo = $this->ChequesModel->verificagrupo($row['IdPoliza']);\n\t\t\t\t\t\t\t\tif($grupo==1){\n\t\t\t\t\t\t\t\t\t$this->ChequesModel->movMultipleFactUpdate($row['Id'], $row['IdPoliza'], $row['NumMovto'],$rutaxml, $uuid );\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$this->ChequesModel->movUUID($uuid, $row['Id'],$rutaxml);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* fin referencia encuentra */\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\t}\n\t\t\t}\n\t\t/* mov xml a poliza */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn $numPoliza['id'];\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n}", "title": "" }, { "docid": "d46d77000099ac3ddfc5203ddcf06c93", "score": "0.56800985", "text": "function siguienteEstadoPresupuesto(){\n $this->procedimiento = 'pre.ft_presupuesto_ime';\n $this->transaccion = 'PRE_SIGESTP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "f7f2cb1f209595277d652a41764a6588", "score": "0.56762326", "text": "function getThePanIno($price_,$dataUsage_){\n\theader('Content-type: application/json');\n\t\n\t//set the price if it has phone.\n\t$planPrice=$price_;\n\t$data=$dataUsage_;\n\t\n\t\t$Ofer='{\n \"name\": \"Simple Starter Plan\",\n \"description\": \"Get a single line with unlimited talk, text and up to '.$data.' of 4G LTE data.\",\n \"dataEnabled\": true,\n \"type\": \"prepaid\",\n \"price\": '.$planPrice.',\n \"company\": {\n \"name\": \"virgen\",\n \"logo\": \"/logo/url.jpg (300x300 pixels)\",\n \"publicityMessage\": \"Companity specific publicity message\"\n }\n}';\n\t\techo($Ofer);\n\n\t\t\n\t}", "title": "" }, { "docid": "e11a76505e669d3e9d911980d16d08a0", "score": "0.56694233", "text": "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Modulo allievi\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2997807d280675995147fd6bbf88b43b", "score": "0.56617725", "text": "function insertarPresupuesto(){\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PRE_PRE_INS';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_tipo_cc','id_tipo_cc','int4');\n $this->setParametro('id_uo','id_uo','int4');\n $this->setParametro('id_gestion','id_gestion','int4');\n $this->setParametro('tipo_pres','tipo_pres','varchar');\n $this->setParametro('descripcion','descripcion','varchar');\n $this->setParametro('sw_consolidado','sw_consolidado','varchar');\n $this->setParametro('id_categoria_prog','id_categoria_prog','int4');\n $this->setParametro('fecha_inicio_pres','fecha_inicio_pres','date');\n $this->setParametro('fecha_fin_pres','fecha_fin_pres','date');\n\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "03c99b28ebe6f57f0e477783eba7d0a1", "score": "0.56606746", "text": "function paginarProductos($argProducto, $precioMin, $precioMax, $argTipo){\n $pagina = isset($_GET['pagina']) ? (int)$_GET['pagina']: 1; //la pagina actual si es cualquier cosa es la primera sino la que sigue\n $registosPorPagina = 10; //cantidad de registros por pagina\n $inicio = ($pagina>0)?(($pagina * $registosPorPagina)- $registosPorPagina): 0;//la pagina inicio para la divicion de del paginador\n\n if (empty($precioMin) && empty($precioMax) && empty($argProducto) && empty($argTipo)) {\n global $controlador;\n\n $filas = $controlador->getProductosPaginadorSimple($inicio, $registosPorPagina);\n $totalRegistros = $controlador->getProductosCantidadSimple();\n\n $cantidadPaginas = ceil($totalRegistros/$registosPorPagina);\n if ($totalRegistros > 0) {\n $publicacion = new Publicaciones();\n\n function contadores($dato){\n switch ($dato) {\n case $dato < 5 || $dato == 0:\n $text = \"\n <span class=\\\"badge badge-pill badge-danger\\\">\".$dato.\"</span>\n \";\n break;\n case $dato >= 5 && $dato < 10 :\n $text = \"\n <span class=\\\"badge badge-pill badge-warning\\\">\".$dato.\"</span>\n \";\n break;\n default:\n $text = \"\n <span class=\\\"badge badge-pill badge-success\\\">\".$dato.\"</span>\n \";\n break;\n }\n return $text;\n }\n\n foreach ($filas as $fila) {\n if ($publicacion->esPublicacion($fila['ProductoId'])) {\n echo \"\n <tr class=\\\"table-danger\\\">\n <th scope=\\\"row\\\">\".$fila['ProductoId'].\"</th>\n <td>\".$fila['nombre'].\"</td>\n <td>\".$fila['precio'].\"$</td>\n <td>\".$fila['ganancia'].\"%</td>\n <td>\".($fila['precio']+(($fila['ganancia']*$fila['precio'])/100)).\"$</td>\n <td>\".$fila['categoria'].\"</td>\n <td>\".$fila['tipo'].\"</td>\n <td>\".$fila['descripcion'].\"</td>\n <td>\".contadores($fila['cantidad']).\"</td>\n <td></td>\n <td><a target=\\\"_blank\\\" href=\\\"../../\".$fila['URL'].\"\\\">img</a></td>\n <td>\n <form method= \\\"post\\\" action=\\\"publicar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <input type=\\\"hidden\\\" name=\\\"tipó\\\" value=\\\"\".$fila['tipo'].\"\\\">\n <input type=\\\"hidden\\\" name=\\\"descripcion\\\" value=\\\"\".$fila['descripcion'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"\\\">\n <img src=\\\"../../Media/outline_done_black_19dp.png\\\">\n </button>\n </form>\n <td>\n <td>\n <form method=\\\"post\\\" action=\\\"eliminar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n </td>\n \";\n }\n else{\n echo \"\n <tr>\n <th scope=\\\"row\\\">\".$fila['ProductoId'].\"</th>\n <td>\".$fila['nombre'].\"</td>\n <td>\".$fila['precio'].\"$</td>\n <td>\".$fila['ganancia'].\"%</td>\n <td>\".($fila['precio']+(($fila['ganancia']*$fila['precio'])/100)).\"$</td>\n <td>\".$fila['categoria'].\"</td>\n <td>\".$fila['tipo'].\"</td>\n <td>\".$fila['descripcion'].\"</td>\n <td>\".contadores($fila['cantidad']).\"</td>\n <td><a href=\\\"detalle.php?producto=\".$fila['ProductoId'].\"&tipo=\".$fila['tipo'].\"\\\">detalle</a></td>\n <td><a target=\\\"_blank\\\" href=\\\"../../\".$fila['URL'].\"\\\">img</a></td>\n <td>\n <form method= \\\"post\\\" action=\\\"despublicar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n <td>\n <td>\n <form method= \\\"post\\\" action=\\\"eliminar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n </td>\n \";\n }\n }\n //el paginador\n echo \"</tbody></table><nav class=\\\"paginacion\\\" id=\\\"paginacionVentas\\\"><ul>\";\n \t\t\t\t\tif ($pagina == 1) {\n \t\t\t\t\t\techo \"<li><a>-</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t$numero = $pagina - 1;\n \t\t\t\t\t\techo \"<li><a href=\\\"index.php?pagina=\".$numero.\"\\\"><</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\tfor($i=1; $i<=$cantidadPaginas; $i++){\n \t\t\t\t\t\t\t\techo \"<li id=\\\"\".$i.\"\\\"><a href=\\\"index.php?pagina=\".$i.\"\\\">\".$i.\"</a></li>\";\n }\n \t\t\t\t\tif ($pagina == $cantidadPaginas) {\n \t\t\t\t\t\techo \"<li><a>-</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t$numero = $pagina + 1;\n \t\t\t\t\t\techo \"<li><a href=\\\"index.php?pagina=\".$numero.\"\\\">></></li>\";\n \t\t\t\t\t}\n \t\t\t\techo \"</ul></nav>\";\n }\n else{\n echo \"<div class=\\\"alert alert-warning\\\" role=\\\"alert\\\">\n no hay registros!!\n </div>\";\n }\n $retorno = array($pagina, $cantidadPaginas);\n return $retorno;\n }\n else {\n global $controlador;\n\n $filas = $controlador->getProductosFiltro($inicio, $registosPorPagina, $argProducto, $precioMin, $precioMax, $argTipo);\n $totalRegistros = $controlador->getProductosFiltroCantidad($argProducto, $precioMin, $precioMax, $argTipo);\n\n $cantidadPaginas = ceil($totalRegistros/$registosPorPagina);\n if (empty($filas)) {\n $publicacion = new Publicaciones();\n\n foreach ($filas as $fila) {\n $almacen = new Almacen();\n $almacen = $almacen->setAlmacenNumeroAlmacen($fila['ProductoId']);\n $contadorCantidad = 0;\n\n if (!empty($almacen) || $almacen > 0) {\n foreach($almacen as $contador){\n $contadorCantidad = $contadorCantidad + $contador['cantidad'];\n switch ($contadorCantidad) {\n case $contadorCantidad < 5:\n $text = \"\n <span class=\\\"badge badge-pill badge-danger\\\">\".$contadorCantidad.\"</span>\n \";\n break;\n case $contadorCantidad < 10 && $contadorCantidad >= 5 :\n $text = \"\n <span class=\\\"badge badge-pill badge-warning\\\">\".$contadorCantidad.\"</span>\n \";\n break;\n default:\n $text = \"\n <span class=\\\"badge badge-pill badge-success\\\">\".$contadorCantidad.\"</span>\n \";\n break;\n }\n }\n }\n else {\n $text = \"<span class=\\\"badge badge-pill badge-danger\\\">\".$contadorCantidad.\"</span>\";\n }\n\n if ($publicacion->esPublicacion($fila['ProductoId'])) {\n echo \"\n <tr class=\\\"table-danger\\\">\n <th scope=\\\"row\\\">\".$fila['ProductoId'].\"</th>\n <td>\".$fila['nombre'].\"</td>\n <td>\".$fila['precio'].\"$</td>\n <td>\".$fila['ganancia'].\"%</td>\n <td>\".($fila['precio']+(($fila['ganancia']*$fila['precio'])/100)).\"$</td>\n <td>\".$fila['marca'].\"</td>\n <td>\".$fila['tipo'].\"</td>\n <td>\".$fila['descripcion'].\"</td>\n <td>\".$text.\"</td>\n <td></td>\n <td><a target=\\\"_blank\\\" href=\\\"../../\".$fila['URL'].\"\\\">img</a></td>\n <td>\n <form method= \\\"post\\\" action=\\\"publicar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <input type=\\\"hidden\\\" name=\\\"tipó\\\" value=\\\"\".$fila['tipo'].\"\\\">\n <input type=\\\"hidden\\\" name=\\\"descripcion\\\" value=\\\"\".$fila['descripcion'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"\\\">\n <img src=\\\"../../Media/outline_done_black_19dp.png\\\">\n </button>\n </form>\n <td>\n <td>\n <form method= \\\"post\\\" action=\\\"eliminar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n </td>\n \";\n }\n else{\n echo \"\n <tr>\n <th scope=\\\"row\\\">\".$fila['ProductoId'].\"</th>\n <td>\".$fila['nombre'].\"</td>\n <td>\".$fila['precio'].\"$</td>\n <td>\".$fila['ganancia'].\"%</td>\n <td>\".($fila['precio']+(($fila['ganancia']*$fila['precio'])/100)).\"$</td>\n <td>\".$fila['marca'].\"</td>\n <td>\".$fila['tipo'].\"</td>\n <td>\".$fila['descripcion'].\"</td>\n <td>\".$text.\"</td>\n <td><a href=\\\"detalle.php?producto=\".$fila['ProductoId'].\"&tipo=\".$fila['tipo'].\"\\\">detalle</a></td>\n <td><a target=\\\"_blank\\\" href=\\\"../../\".$fila['URL'].\"\\\">img</a></td>\n <td>\n <form method= \\\"post\\\" action=\\\"despublicar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n <td>\n <td>\n <form method= \\\"post\\\" action=\\\"eliminar.php\\\">\n <input type=\\\"hidden\\\" name=\\\"idProducto\\\" value=\\\"\".$fila['ProductoId'].\"\\\">\n <button type=\\\"submit\\\" class=\\\"close\\\" aria-label=\\\"Close\\\">\n <span aria-hidden=\\\"true\\\">&times;</span>\n </button>\n </form>\n </td>\n \";\n }\n }\n //el paginador\n echo \"</tbody></table><nav class=\\\"paginacion\\\" id=\\\"paginacionVentas\\\"><ul>\";\n \t\t\t\t\tif ($pagina == 1) {\n \t\t\t\t\t\techo \"<li><a>-</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t$numero = $pagina - 1;\n \t\t\t\t\t\techo \"<li><a href=\\\"index.php?pagina=\".$numero.\"&producto=\".$argProducto.\"&precioMin=\".$precioMin.\"&precioMax=\".$precioMax.\"&tipo=\".$argTipo.\"\\\"><</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\tfor($i=1; $i<=$cantidadPaginas; $i++){\n \t\t\t\t\t\t\t\techo \"<li id=\\\"\".$i.\"\\\"><a href=\\\"index.php?pagina=\".$i.\"&producto=\".$argProducto.\"&precioMin=\".$precioMin.\"&precioMax=\".$precioMax.\"&tipo=\".$argTipo.\"\\\">\".$i.\"</a></li>\";\n }\n \t\t\t\t\tif ($pagina == $cantidadPaginas) {\n \t\t\t\t\t\techo \"<li><a>-</></li>\";\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t$numero = $pagina + 1;\n \t\t\t\t\t\techo \"<li><a href=\\\"index.php?pagina=\".$numero.\"&producto=\".$argProducto.\"&precioMin=\".$precioMin.\"&precioMax=\".$precioMax.\"&tipo=\".$argTipo.\"\\\">></></li>\";\n \t\t\t\t\t}\n \t\t\t\techo \"</ul></nav>\";\n }\n else{\n echo \"<div class=\\\"alert alert-warning\\\" role=\\\"alert\\\">\n no hay registros!! no hay busqueda\n </div>\";\n }\n $retorno = array($pagina, $cantidadPaginas);\n return $retorno;\n }\n}", "title": "" }, { "docid": "7c74c6f033eba1098c5a485056ad61d1", "score": "0.5654345", "text": "public function getAllPublicacionesByUsuarioName($nombre_usuario)\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n //buscamos el id del usuario segun el nombre de usuario introducido\r\n $ssql2 = \"SELECT * FROM usuario u WHERE u.Nombre = '$nombre_usuario'\";\r\n $usuario = mysql_fetch_assoc(mysql_query($ssql2,$conn));\r\n $usuario_id = $usuario['id'];\r\n $query = \"SELECT * FROM publicacion p WHERE p.id_usuario = '$usuario_id'\";\r\n //variable que almacenará las publicaciones de el usuario\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publicaciones = mysql_query($query,$conn); \r\n return $publicaciones; \r\n }", "title": "" }, { "docid": "69d026d9011dd8885d1f577314043546", "score": "0.5645823", "text": "function modificarPresupPartida(){\n\t\t$this->procedimiento='pre.ft_presup_partida_ime';\n\t\t$this->transaccion='PRE_PREPAR_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_presup_partida','id_presup_partida','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('fecha_hora','fecha_hora','timestamp');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('importe','importe','numeric');\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}", "title": "" }, { "docid": "2443c270fd4ac7d2e5ea801e5728811f", "score": "0.56396633", "text": "function pretenido($Sesion){\n\treturn $Sesion->get_var(\"pretenido\");\n}", "title": "" }, { "docid": "058732fa8162dd1ef6ad1c8bc53c5651", "score": "0.56395334", "text": "public function perfilusuario() {\n\t\tif (!$this->session->userdata(\"login\")) {\n\t\t\tredirect('clogin');\n\t\t}\n\t\t$this->session->time = time();\n\n\t\t$this->layout->js(array(public_url('script/perfilusuario.js')));\n\n\t\t$idempleado = $this -> session -> userdata('s_idempleado');\n\t\t$parametros = array(\n\t\t\t'@idempleado' => $idempleado\n\t\t);\n\t\t$this->load->model('mperfilusuario');\n\t\t$resumenperfil= $this->mperfilusuario->getresumenperfil($parametros);\t\n\t\t\n\t\t$data['vista'] = 'DInternos';\n\t\t$data['datos_perfil'] = $resumenperfil;\n\t\t$data['content_for_layout'] = 'seguridad/vperfilusuario';\n $this->parser->parse('seguridad/vprincipal',$data);\n\n\t}", "title": "" }, { "docid": "37bdae821d5118ea1458101f512a0193", "score": "0.5638597", "text": "public function getVacaP($idEmp, $fecSal, $fecIni, $proceso)\n {\n // 6 id proceso de vacaciones sum( round( ( (c.devengado) / 360 ) * 30, 0 ) ) as promedio \n $result=$this->adapter->query(\"select \n case when sum( c.devengado ) is null then \n 0 \n else \n round( ( sum( c.devengado ) / 360 ) * 30 , 0 ) \n end as promedio \nfrom n_nomina a \n inner join n_nomina_e b on b.idNom=a.id\n inner join n_nomina_e_d c on c.idInom=b.id\n inner join n_conceptos d on d.id=c.idConc\n inner join n_conceptos_pr e on e.idConc=d.id \n inner join a_empleados f on f.id=b.idEmp \nwhere c.idConc != 122 and e.idProc = \".$proceso.\" # Procesos para liquidacion final o vacas pagadas \n\nand a.fechaI >= '\".$fecIni.\"' and a.fechaF <= '\".$fecSal.\"' \n\n and b.idEmp=\".$idEmp ,Adapter::QUERY_MODE_EXECUTE);\n $datos = $result->toArray();\n return $datos; \n }", "title": "" }, { "docid": "fbb7a82d1089d62a892541d07c318cd5", "score": "0.5631771", "text": "function insertarPresupPartida(){\n\t\t$this->procedimiento='pre.ft_presup_partida_ime';\n\t\t$this->transaccion='PRE_PREPAR_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('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('fecha_hora','fecha_hora','timestamp');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('importe','importe','numeric');\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}", "title": "" }, { "docid": "affed7f854cb29f0cd02afee82215a13", "score": "0.5628935", "text": "function setPrecioRetazo() {\n\n}", "title": "" }, { "docid": "aacdbda35e19a4d84db3d58b6022aa30", "score": "0.56155944", "text": "function anteriorEstadoPresupuesto(){\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PR_ANTEPR_IME';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('obs','obs','varchar');\n $this->setParametro('estado_destino','estado_destino','varchar');\n\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b922f950b5165dc86be857d2c9190df4", "score": "0.5593857", "text": "public function getPizzas()\n {\n }", "title": "" }, { "docid": "f61aa0e5a6a05ac583201ce193fa993a", "score": "0.5586718", "text": "function modificarPresupuesto(){\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PRE_PRE_MOD';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n\n $this->setParametro('id_tipo_cc','id_tipo_cc','int4');\n $this->setParametro('id_uo','id_uo','int4');\n $this->setParametro('id_gestion','id_gestion','int4');\n\n $this->setParametro('tipo_pres','tipo_pres','varchar');\n $this->setParametro('descripcion','descripcion','varchar');\n $this->setParametro('sw_consolidado','sw_consolidado','varchar');\n $this->setParametro('id_categoria_prog','id_categoria_prog','int4');\n $this->setParametro('fecha_inicio_pres','fecha_inicio_pres','date');\n $this->setParametro('fecha_fin_pres','fecha_fin_pres','date');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "ec63b6dc121cd37dde0fe1cf24a7168a", "score": "0.5580926", "text": "function ampliarRendicion(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_ime';\n\t\t$this->transaccion='CD_AMPCDREN_IME';\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_doc','id_cuenta_doc','int4');\n\t\t$this->setParametro('dias_ampliado','dias_ampliado','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}", "title": "" }, { "docid": "5c3b6850f5c7766c56a2d7bc47ec7b1f", "score": "0.5576049", "text": "public function publicacionesNormales(){\n return $this->publicaciones()->where('destacada', '=', '0')->orderBy('codigo_publicacion', 'desc');\n }", "title": "" }, { "docid": "2122d1c6585de5f893b40d9a9446ba4d", "score": "0.5573869", "text": "function consultarTotalPagoPersonal($fechaini, $fechafin, $cedula, $cargo, $tarifa){\n $resultado = false;\n $query = \"SELECT p.cedula cedula , p.nombre nombre, p.apellido apellido, SUM(r.tiempo*$tarifa)monto, tc.cargo\n FROM PERSONAL p, VUELO_PERSONAL vp, VUELO v, RUTA r, TIPO_CARGO tc\n WHERE p.cedula = vp.PERSONAL_cedula\n AND p.cedula = '\".$cedula.\"'\n AND v.id = vp.VUELO_id\n AND r.sitioSalida = v.RUTA_sitioSalida\n AND r.sitioLlegada = v.RUTA_sitioLlegada\n AND tc.id = vp.cargo\n AND vp.cargo =$cargo\n AND p.habilitado = 1\n AND v.fecha BETWEEN '\" . $fechaini . \"' AND '\" . $fechafin . \"'\";\n $recurso = $this->transaccion->realizarTransaccion($query);\n $resultado = mysql_fetch_array($recurso);\n return $resultado[monto];\n }", "title": "" }, { "docid": "46312b649433a204f9c5671f0d005179", "score": "0.5571278", "text": "function listarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_PRE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('id_centro_costo','int4');\n\t\t$this->captura('codigo_cc','text');\n\t\t$this->captura('tipo_pres','varchar');\n\t\t$this->captura('estado_pres','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('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$this->captura('estado','varchar');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('desc_tipo_presupuesto','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('movimiento_tipo_pres','varchar');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('obs_wf','varchar');\n\t\t$this->captura('sw_consolidado','VARCHAR');\n\t\t$this->captura('id_categoria_prog','int4');\n\t\t$this->captura('codigo_categoria','varchar');\n\t\t$this->captura('mov_pres','varchar');\n\t\t$this->captura('momento_pres','varchar');\n\t\t$this->captura('id_uo','int4');\n\t\t$this->captura('codigo_uo','varchar');\n\t\t$this->captura('nombre_uo','varchar');\n\t\t$this->captura('id_tipo_cc','int4');\n\t\t$this->captura('desc_tcc','varchar');\n\t\t$this->captura('fecha_inicio_pres','date');\n\t\t$this->captura('fecha_fin_pres','date');\n\t\t$this->captura('codigo_tcc','varchar');\n\t\t$this->captura('descripcion_tcc','varchar');\n\t\t$this->captura('estado_reg_uo','varchar');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();//echo $this->consulta;exit;\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "5514e9e6da4717812e78a43305466cb3", "score": "0.55689645", "text": "function reporteCertificacionP(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPCERPRE_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\n $this->captura('id_cp', 'int4');\n $this->captura('centro_costo', 'varchar');\n $this->captura('codigo_programa', 'varchar');\n $this->captura('codigo_proyecto', 'varchar');\n $this->captura('codigo_actividad', 'varchar');\n $this->captura('codigo_fuente_fin', 'varchar');\n $this->captura('codigo_origen_fin', 'varchar');\n\n $this->captura('codigo_partida', 'varchar');\n $this->captura('nombre_partidad', 'varchar');\n $this->captura('codigo_cg', 'varchar');\n $this->captura('nombre_cg', 'varchar');\n $this->captura('precio_total', 'numeric');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n $this->captura('nombre_entidad', 'varchar');\n $this->captura('direccion_admin', 'varchar');\n $this->captura('unidad_ejecutora', 'varchar');\n $this->captura('codigo_ue', 'varchar');\n $this->captura('firmas', 'varchar');\n $this->captura('justificacion', 'varchar');\n $this->captura('codigo_transf', 'varchar');\n $this->captura('unidad_solicitante', 'varchar');\n $this->captura('funcionario_solicitante', 'varchar');\n $this->captura('fecha_soli', 'date');\n $this->captura('gestion', 'integer');\n $this->captura('codigo_poa', 'varchar');\n $this->captura('codigo_descripcion', 'varchar');\n $this->captura('tipo', 'varchar');\n\n $this->captura('nombre_categoria', 'varchar');\n $this->captura('fecha_certificacion', 'varchar');\n $this->captura('fecha_certificacion_por_generar', 'varchar');\n $this->captura('fecha_solicitud', 'date');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "4f2d704337430287b80f5f975ab901c4", "score": "0.5568589", "text": "public function getVacaPd($idEmp, $fecSal,$fecIni, $proceso)\n {\n // 6 id proceso de vacaciones sum( round( ( (c.devengado) / 360 ) * 30, 0 ) ) as promedio \n $result=$this->adapter->query(\"select \n d.nombre, c.devengado , a.fechaI, a.fechaF \nfrom n_nomina a \n inner join n_nomina_e b on b.idNom=a.id\n inner join n_nomina_e_d c on c.idInom=b.id\n inner join n_conceptos d on d.id=c.idConc\n inner join n_conceptos_pr e on e.idConc=d.id \n inner join a_empleados f on f.id=b.idEmp \nwhere c.idConc != 122 and e.idProc = \".$proceso.\" # Procesos para liquidacion final o vacas pagadas \n\nand a.fechaI >= '\".$fecIni.\"' and a.fechaF <= '\".$fecSal.\"' \n\n and b.idEmp=\".$idEmp ,Adapter::QUERY_MODE_EXECUTE);\n $datos = $result->toArray();\n return $datos; \n }", "title": "" }, { "docid": "7acc3f997e1c110dc122f4b81aa5378c", "score": "0.55662185", "text": "public function lieu_portefolio()\r\n{\r\n return $this->_lieu_portefolio;\r\n}", "title": "" }, { "docid": "3ff82b040f4f6c20118b145befe275ee", "score": "0.556496", "text": "public function getOsPublicidade()\n {\n return $this->os_publicidade;\n }", "title": "" }, { "docid": "6eed7fd617e0df3508da00e46b31945e", "score": "0.5547868", "text": "function f_getAsistentesVotacion($fecha, $num=1) {\n global $oApars, $oProps; //$oPers;\n \n $aApars = $oApars->getApartamentos();\n $oVots = new Votaciones();\n $oVotx = new Votacion($fecha, $num);\n $oVota = (!$oVots->existeVotacion($fecha, $num)) ? f_cargarAsistentesJunta($oVotx) : $oVotx;\n \n $opc1 = ($oVota->getOpcion1()) ? $oVota->getOpcion1() : \"Opc. 1\";\n $opc2 = ($oVota->getOpcion2()) ? $oVota->getOpcion2() : \"Opc. 2\";\n $opc3 = ($oVota->getOpcion3()) ? $oVota->getOpcion3() : \"Opc. 3\";\n $opc4 = ($oVota->getOpcion4()) ? $oVota->getOpcion4() : \"Opc. 4\";\n \n $portal = \"\";\n $tabla = \"<table id=\\\"tablavot\\\" class=\\\"table table-sm\\\">\";\n \n // Recorre los apartamentos de la urbanizacion.\n foreach ($aApars as $apa => $aApartamento) {\n \n // Cabecera para un nuevo portal.\n if ($portal != $aApartamento[0]) {\n $portal = $aApartamento[0];\n $tabla .= f_cabeceraTablaAsistentes($portal, $opc1, $opc2, $opc3, $opc4);\n }\n \n $aProp = $oProps->getNombrePropietarioApartamentoFecha($apa, $fecha); // array('codpers'=>array('persona','date','fecha','orden'))\n $iProp = $oProps->getCodigoPropietarioApartamentoFecha($apa, $fecha); // codpers\n $aApPr = $oProps->getCodigosPropiedadesPersonaFecha($iProp, $fecha); // array(apa1,apa2...)\n \n $sApPr = \"[\" . implode(\",\", $aApPr) . \"]\"; // Codigos en formato [1,2,3]\n \n // Datos de la votacion.\n $aVoto = $oVota->getVoto($apa); // array('asis','vota','pres','res1','res2','res3','res4')\n \n $ch1 = ($aVoto[0] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Asiste.\n $ch2 = ($aVoto[1] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Tiene voto.\n $ch3 = ($aVoto[2] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Presente.\n \n $op1 = ($aVoto[3] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Resultado 1.\n $op2 = ($aVoto[4] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Resultado 2.\n $op3 = ($aVoto[5] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Resultado 3.\n $op4 = ($aVoto[6] == 'S') ? \"checked=\\\"checked\\\"\" : \"\"; // Resultado 4.\n \n $bch = ($aVoto[0] != 'S') ? \"disabled=\\\"disabled\\\"\" : \"\";\n $bop = ($aVoto[0] != 'S' || $aVoto[1] != 'S' || $aVoto[2] != 'S') ? \"disabled=\\\"disabled\\\"\" : \"\";\n \n $nom = $aProp[$iProp];\n $onc = \"js_marcarOpc(this.id, $apa, $sApPr, this.checked);\";\n $onk = f_nombresApartamentosMultiples($apa, $aApPr);\n \n // Fila con los datos de la votacion de un apartamento.\n $tabla .= f_datosTablaAsistentes($apa, $aApartamento, $nom, $onc, $onk, $ch1, $ch2, $ch3, $bch, $sApPr, $op1, $op2, $op3, $op4, $bop);\n }\n return \"<a name=\\\"iniciolista\\\">&nbsp;</a>$tabla</table><a name=\\\"finallista\\\">&nbsp;</a>\";\n}", "title": "" }, { "docid": "684958b3c11c7f0e3c6eebcad1cd93bf", "score": "0.5538972", "text": "function cl_tipoidentificacaocredor() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipoidentificacaocredor\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0026d642b0552bf6025b6e14c9908aa9", "score": "0.5537", "text": "function Create($titulo,$texto,$url_archivo,$id_producto,$autor,$tipo_publicacion){\n $conexion=happy_BD::Connect();\n $conexion->SetAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n //CAPTURAMOS LA FECHA DEL SISTEMA\n $fecha_creacion=date(\"Y-m-d\");\n \n \n //crear el quiery que vamos a realizar.\n $consulta= \"INSERT INTO publicacion (titulo,texto,url_archivo,id_producto,autor,tipo_publicacion,fecha_creacion) values(?,?,?,?,?,?,?)\";\n $query=$conexion->prepare($consulta);\n $query->execute(array($titulo,$texto,$url_archivo,$id_producto,$autor,$tipo_publicacion,$fecha_creacion));\n\n\n\t\n happy_BD::Disconnect();\n }", "title": "" }, { "docid": "6c8ba34c4f069efd1f0f86ee5ec23dd2", "score": "0.55311024", "text": "function rep_pagos_pr_pdf()\n\t{\n\t\tglobal $ruta;\n\t\t# Obtener los datos\n\t\t# obtener el nombre de la empresa\n\t\t$empresa=$this->db->select('razon_social')->where('id',(int)$_POST['empresa'])->get('empresas')->result_array();\n\t\tif(count($empresa)==0)\n\t\t\tshow_error('La empresa especificada no existe');\n\t\t$empresa=array_pop($empresa);\n\t\t$data['empresa']=$empresa['razon_social'];\n\t\t# obtener el nombre del espacio\n\t\t$espaciof=$this->db->select('tag')->where('id',(int)$_POST['espacio'])->get('espacios_fisicos')->result_array();\n\t\tif(count($espaciof)==0)\n\t\t\tshow_error('El espacio especificado no existe');\n\t\t$espaciof=array_pop($espaciof);\n\t\t$data['espacio']=$espaciof['tag'];\n\t\t# obtener los datos de las cuentas\n\t\t$data['cuentas']=array();\n\t\t$cuentas=$this->db->select('id,banco,numero_cuenta')->get('ccuentas_bancarias')->result_array();\n\t\tif(count($cuentas)==0)\n\t\t\tshow_error('No existen cuentas registradas');\n\t\tforeach($cuentas as &$cuenta)\n\t\t\t$data['cuentas'][$cuenta['id']]=array('banco'=>$cuenta['banco'],'cuenta'=>$cuenta['numero_cuenta']);\n\t\t# filtrar empresa\n\t\t$filtro = array();\n\t\t//$filtro[]=\"pagos.estatus_general_id = 1\"; # 15/05/2010 18:24:26 no tiene el campo\n\t\t$filtro[]=\"usuarios.empresas_id = '{$_POST['empresa']}'\";\n\t\t# filtrar espacio fisico\n\t\t$filtro[]=\"usuarios.espacio_fisico_id = '{$_POST['espacio']}'\";\n\t\t# filtrar fecha\n\t\t$fecha1 = $this->input->post('fecha1');\n\t\t$fecha2 = $this->input->post('fecha2');\n\t\t$campof='pagos.fecha';\n\t\tif($fecha1 != false)\n\t\t{\n\t\t\tlist($d,$m,$a) = explode(\" \",$fecha1);\n\t\t\t$fecha1 = sprintf('%04d-%02d-%02d',$a,$m,$d);\n\t\t}\n\t\tif($fecha2 != false)\n\t\t{\n\t\t\tlist($d,$m,$a) = explode(\" \",$fecha2);\n\t\t\t$fecha2 = sprintf('%04d-%02d-%02d',$a,$m,$d);\n\t\t}\n\t\t$f1 = false;\n\t\t$f2 = false;\n\t\tif($fecha1 == date(\"Y-m-d\",strtotime($fecha1)))\n\t\t\t$f1 = true;\n\t\tif($fecha2 == date(\"Y-m-d\",strtotime($fecha2)))\n\t\t\t$f2 = true;\n\t\tif($f1 && $f2){\n\t\t\tif(strcmp($fecha2,$fecha1) > 0)\n\t\t\t\t$filtro[] = \"($campof >= '$fecha1' and $campof <= '$fecha2')\";\n\t\t\telseif(strcmp($fecha2,$fecha1) < 0)\n\t\t\t$filtro[] = \"($campof >= '$fecha2' and $campof <= '$fecha1')\";\n\t\t\telse\n\t\t\t\t$filtro[] = \"$campof = '$fecha1'\";\n\t\t}\n\t\telseif($f1)\n\t\t$filtro[] = \"$campof = '$fecha1'\";\n\t\telseif($f2)\n\t\t$filtro[] = \"$campof = '$fecha2'\";\n\t\t# formar cadena para el WHERE\n\t\tif (count($filtro))\n\t\t\t$where = implode(\" and \", $filtro);\n\t\telse\n\t\t\t$where = \"\";\n\t\t# formar cadena de orden\n\t\t$nivel = array();\n\t\t$nivel[]=(int)$_POST['nivel_1'];\n\t\t$nivel[]=(int)$_POST['nivel_2'];\n\t\t$campos = array();\n\t\tforeach ($nivel as $niv){\n\t\t\tswitch($niv){\n\t\t\t\tcase 1: $campos[] = 'fecha'; break;\n\t\t\t\tcase 2: $campos[] = 'monto_pagado desc'; break;\n\t\t\t}\n\t\t}\n\t\tif (count($campos))\n\t\t\t$order_by = \" ORDER BY \".implode(\",\", $campos).\" \";\n\t\telse\n\t\t\t$order_by = \"\";\n\t\t# obtener la lista de proveedores requeridos\n\t\t$this->db->select('id,razon_social as nombre');\n\t\tif((int)$_POST['proveedor']>0)\n\t\t\t$this->db->where('id',(int)$_POST['proveedor']);\n\t\t$proveedores=$this->db->order_by('nombre')->get('cproveedores')->result_array();\n\t\t#obtener los datos para cada proveedor\n\t\t$n=0;\n\t\tforeach($proveedores as &$proveedor)\n\t\t{\n\t\t\t$sql=\"SELECT pagos.id, DATE_FORMAT(pagos.fecha,'%d-%m-%Y') AS fecha, pagos.cuenta_origen_id, pagos.cuenta_destino_id, pagos.numero_referencia, pagos.monto_pagado, pr_facturas.folio_factura, usuarios.nombre FROM soleman.pr_facturas LEFT JOIN soleman.pagos ON (pr_facturas.id = pagos.pr_factura_id) LEFT JOIN soleman.usuarios ON (usuarios.id = pagos.usuario_id) WHERE (pagos.id > 0 AND pr_facturas.cproveedores_id = '\".$proveedor['id'].\"' AND $where) $order_by\";\n\t\t\t$proveedor['pagos']= $this->db->query($sql)->result_array();\n\t\t\t$n+=count($proveedor['pagos']);\n\t\t}\n\t\tif($n==0)\n\t\t\tshow_error(\"No hay datos que cumplan con los criterios\");\n\t\t# periodo del reporte\n\t\tif($f1 || $f2)\n\t\t{\n\t\t\tif($f1 && !$f2) $fecha2=$fecha1;\n\t\t\tif(!$f1 && $f2) $fecha1=$fecha2;\n\t\t\t$fecha1=date(\"d-m-Y\",strtotime($fecha1));\n\t\t\t$fecha2=date(\"d-m-Y\",strtotime($fecha2));\n\t\t\t$data['periodo']=$fecha1.' a '.$fecha2;\n\t\t}\n\t\telse\n\t\t\t$data['periodo']='A LA FECHA '.date(\"d-m-Y\");\n\t\t# pasar datos faltantes a la vista y cargar la vista\n\t\t$data['proveedores']=$proveedores;\n\t\t$data['n']=$n;\n\t\t$data['title']=$this->input->post('title');\n\t\t$this->load->view(\"$ruta/rep_pagos_pr_pdf\", $data);\n\t}", "title": "" }, { "docid": "a534f36fb89b5e9469ee3069a496b370", "score": "0.55309033", "text": "function salva_info_utente()\n {\n }", "title": "" }, { "docid": "a1a270361d83ddaa54c1667e2f045ab8", "score": "0.5529362", "text": "function pago_proveedores($factura, $num_cia_pago = NULL) {\n\t$query = \"\";\t\t\t// Variable para lamacenar todos los querys de pago a proveedores\n\n\t// [30-Dic-2013] Query para OpenBravo\n\t$query_ob = '';\n\n\t// Declaración de variables\n\t$fac_x_cheque = 10;\t\t// Número de facturas pagadas por cheque (aplica al proceso normal)\n\t$folio_cheque = 0;\t\t// Folio para el cheque (aplica al proceso normal)\n\t$monto_min = 0;\n\n\t$num_cia = NULL;\t\t// Última compañía revisada\n\t$num_cia_aplica = NULL;\n\t$num_proveedor = NULL;\t// Último proveedor revisado\n\t$anio = NULL;\t\t\t// Último año\n\t$num_fac = 0;\t\t\t// Número de facturas actual para el cheque\n\t$importe_cheque = 0;\t// Importe del cheque\n\n\t$fac_count = 0;\t\t\t// Contador de facturas\n\t$che_count = 0;\t\t\t// Contador de cheques\n\t$trans_cont = 0;\t\t// Contador de transferencias\n\n\t$cosgastos = NULL;\t\t// Código de gasto para el cheque\n\t$nombre_gasto = NULL;\t// Nombre del gasto para el cheque\n\n\tfor ($i=0; $i<count($factura); $i++) {\n\t\t// Verificar el cambio de compañía o de proveedor o máximo número de facturas para un cheque\n\t\t// [07-Jul-2008] Ahora también se verifica el cambio del código de gasto\n\t\t// [21-Ene-2013] Verificar el cambio de año\n\t\tif ($factura[$i]['num_cia'] != $num_cia_aplica || $factura[$i]['num_proveedor'] != $num_proveedor || $factura[$i]['anio'] != $anio || $factura[$i]['codgastos'] != $codgastos || $num_fac == $fac_x_cheque) {\n\t\t\t// Organizar datos para almacenar cheque\n\t\t\tif ($num_cia != NULL && $num_proveedor != NULL && $anio != NULL && $codgastos != NULL && $num_fac > 0 && $num_fac <= $fac_x_cheque) {\n\t\t\t\t// Si el importe del cheque es mayor o igual al monto minimo, generarlo\n\t\t\t\tif ($importe_cheque >= $monto_min) {\n\t\t\t\t\t// Datos para la tabla de 'cheques'\n\t\t\t\t\t$cheque[$che_count]['cod_mov'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? 41 : 5;\n\t\t\t\t\t$cheque[$che_count]['num_proveedor'] = $num_proveedor;\n\t\t\t\t\t$cheque[$che_count]['num_cia'] = $num_cia;\n\t\t\t\t\t$cheque[$che_count]['a_nombre'] = $nombre_proveedor;\n\t\t\t\t\t$cheque[$che_count]['concepto'] = $nombre_gasto;\n\t\t\t\t\t$cheque[$che_count]['facturas'] = $facturas;\n\t\t\t\t\t$cheque[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t$cheque[$che_count]['folio'] = $folio_cheque;\n\t\t\t\t\t$cheque[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t\t\t$cheque[$che_count]['iduser'] = $_SESSION['iduser'];\n\t\t\t\t\t$cheque[$che_count]['imp'] = \"FALSE\";\n\t\t\t\t\t$cheque[$che_count]['codgastos'] = $codgastos;\n\t\t\t\t\t$cheque[$che_count]['proceso'] = \"TRUE\";\n\t\t\t\t\t$cheque[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\t\t\t\t\t$cheque[$che_count]['poliza'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? \"TRUE\" : \"FALSE\";\n\t\t\t\t\t$cheque[$che_count]['site']\t\t\t\t = 'TRUE';\n\n\t\t\t\t\tif ($_SESSION['pmp']['cuenta'] == 2 && $trans) {\n\t\t\t\t\t\t$transfer[$trans_cont]['num_cia'] = $num_cia;\n\t\t\t\t\t\t$transfer[$trans_cont]['num_proveedor'] = $num_proveedor;\n\t\t\t\t\t\t$transfer[$trans_cont]['folio'] = $folio_cheque;\n\t\t\t\t\t\t$transfer[$trans_cont]['importe'] = number_format($importe_cheque,2,\".\",\"\");\n\t\t\t\t\t\t$transfer[$trans_cont]['fecha_gen'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t\t$transfer[$trans_cont]['tipo'] = !$san ? \"TRUE\" : \"FALSE\";\n\t\t\t\t\t\t$transfer[$trans_cont]['status'] = \"0\";\n\t\t\t\t\t\t$transfer[$trans_cont]['folio_archivo'] = 0;\n\t\t\t\t\t\t$transfer[$trans_cont]['cuenta'] = 2;\n\t\t\t\t\t\t$transfer[$trans_cont]['gen_dep'] = 'TRUE';\n\t\t\t\t\t\t$trans_cont++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($_SESSION['pmp']['cuenta'] == 1 && $trans) {\n\t\t\t\t\t\t$transfer[$trans_cont]['num_cia'] = $num_cia;\n\t\t\t\t\t\t$transfer[$trans_cont]['num_proveedor'] = $num_proveedor;\n\t\t\t\t\t\t$transfer[$trans_cont]['folio'] = $folio_cheque;\n\t\t\t\t\t\t$transfer[$trans_cont]['importe'] = number_format($importe_cheque,2,\".\",\"\");\n\t\t\t\t\t\t$transfer[$trans_cont]['fecha_gen'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t\t$transfer[$trans_cont]['tipo'] = \"FALSE\";\n\t\t\t\t\t\t$transfer[$trans_cont]['status'] = \"0\";\n\t\t\t\t\t\t$transfer[$trans_cont]['folio_archivo'] = 0;\n\t\t\t\t\t\t$transfer[$trans_cont]['cuenta'] = 1;\n\t\t\t\t\t\t$transfer[$trans_cont]['concepto'] = \"PAGO FOLIO $folio_cheque\";\n\t\t\t\t\t\t$transfer[$trans_cont]['gen_dep'] = \"TRUE\";\n\t\t\t\t\t\t$trans_cont++;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Datos para la tabla de 'estado_cuenta'\n\t\t\t\t\t$cuenta[$che_count]['num_cia'] = $num_cia;\n\t\t\t\t\t$cuenta[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t$cuenta[$che_count]['concepto'] = $facturas;\n\t\t\t\t\t$cuenta[$che_count]['tipo_mov'] = \"TRUE\";\n\t\t\t\t\t$cuenta[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t\t\t$cuenta[$che_count]['cod_mov'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? 41 : 5;\n\t\t\t\t\t$cuenta[$che_count]['folio'] = $folio_cheque;\n\t\t\t\t\t$cuenta[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t\t\t// Datos para la tabla de folios_cheque\n\t\t\t\t\t$folio[$che_count]['folio'] = $folio_cheque;\n\t\t\t\t\t$folio[$che_count]['num_cia'] = $num_cia;\n\t\t\t\t\t$folio[$che_count]['reservado'] = \"FALSE\";\n\t\t\t\t\t$folio[$che_count]['utilizado'] = \"TRUE\";\n\t\t\t\t\t$folio[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t$folio[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t\t\t// Datos para la tabla de movimiento_gastos\n\t\t\t\t\t$gasto[$che_count]['codgastos'] = $codgastos;\n\t\t\t\t\t$gasto[$che_count]['num_cia'] = $num_cia;\n\t\t\t\t\t$gasto[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t\t$gasto[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t\t\t$gasto[$che_count]['concepto'] = \"PAGO PROVEEDOR: $num_proveedor FAC.: $facturas\";\n\t\t\t\t\t$gasto[$che_count]['captura'] = \"TRUE\";\n\t\t\t\t\t$gasto[$che_count]['factura'] = \"\";\n\t\t\t\t\t$gasto[$che_count]['folio'] = $folio_cheque;\n\t\t\t\t\t$gasto[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t\t\tif ($num_cia_pago > 0) {\n\t\t\t\t\t\t$query .= \"INSERT INTO pagos_otras_cias (num_cia, folio, cuenta, num_cia_aplica, fecha) VALUES ($num_cia, $folio_cheque, {$_SESSION['pmp']['cuenta']}, $num_cia_aplica, '{$_SESSION['pmp']['fecha_cheque']}');\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Almacenar datos en la tabla de 'facturas_pagadas'\n\t\t\t\t\t$query .= $GLOBALS['db']->multiple_insert(\"facturas_pagadas\", $fac_pag);\n\n\t\t\t\t\t// Borrar facturas pagadas de pasivo\n\t\t\t\t\t$query .= \"DELETE FROM pasivo_proveedores WHERE id IN (\";\n\t\t\t\t\tfor ($f=0; $f<$fac_count; $f++)\n\t\t\t\t\t\t$query .= $fac_del[$f] . ($f < $fac_count - 1 ? \",\" : \");\\n\");\n\n\t\t\t\t\t// Actualizar saldo en libros\n\t\t\t\t\t//$query .= \"UPDATE saldos SET saldo_libros = saldo_libros - $importe_cheque WHERE num_cia = $num_cia;\\n\";\n\t\t\t\t\t$query .= \"UPDATE saldos SET saldo_libros = saldo_libros - $importe_cheque WHERE num_cia = $num_cia AND cuenta = {$_SESSION['pmp']['cuenta']};\\n\";\n\n\t\t\t\t\t// Imcrementar número de folio\n\t\t\t\t\t$folio_cheque++;\n\t\t\t\t\t// Incrementar contador de cheques\n\t\t\t\t\t$che_count++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Verificar el cambio de compañía\n\t\t\tif ($factura[$i]['num_cia'] != $num_cia_aplica) {\n\t\t\t\t// Cambiar la compañía\n\t\t\t\t$num_cia = $num_cia_pago > 0 ? $num_cia_pago : $factura[$i]['num_cia'];\n\t\t\t\t$num_cia_aplica = $factura[$i]['num_cia'];\n\t\t\t\t// Resetear número de proveedor\n\t\t\t\t$num_proveedor = NULL;\n\t\t\t\t// Resetear codigo de gastos\n\t\t\t\t$codgastos = NULL;\n\t\t\t\t// Resetear año\n\t\t\t\t$anio = NULL;\n\t\t\t\t// Resetear contador de facturas a cero\n\t\t\t\t$num_fac = 0;\n\t\t\t\t// Resetear importe de cheque a cero\n\t\t\t\t$importe_cheque = 0;\n\n\t\t\t\t// Obtener el último folio para los cheques de esta cuenta\n\t\t\t\t//$sql = \"SELECT \\\"folio\\\" FROM \\\"folios_cheque\\\" WHERE \\\"num_cia\\\" = $num_cia ORDER BY \\\"folio\\\" DESC LIMIT 1\";\n\t\t\t\t$sql = \"SELECT \\\"folio\\\" FROM \\\"folios_cheque\\\" WHERE \\\"num_cia\\\" = $num_cia AND \\\"cuenta\\\" = {$_SESSION['pmp']['cuenta']} ORDER BY \\\"folio\\\" DESC LIMIT 1\";\n\t\t\t\t$result = $GLOBALS['db']->query($sql);\n\t\t\t\t$folio_cheque = ($result) ? $result[0]['folio'] + 1 : 51;\n\t\t\t}\n\n\t\t\t// Cambiar proveedor\n\t\t\t$num_proveedor = $factura[$i]['num_proveedor'];\n\t\t\t$nombre_proveedor = $factura[$i]['nombre'];\n\t\t\t$codgastos = $factura[$i]['codgastos'];\n\t\t\t$anio = $factura[$i]['anio'];\n\t\t\t$trans = $factura[$i]['trans'] == \"t\" && $_SESSION['pmp']['tipo_pago'] != 1 ? TRUE : FALSE;\n\t\t\t$san = $factura[$i]['san'] == \"t\" ? TRUE : FALSE;\n\t\t\t$tipo_saldo = $factura[$i]['trans'] == \"t\" ? \"saldo_real\" : \"saldo\";\n\n\t\t\t/*\n\t\t\t@ [22-Ene-2013] La cantidad de facturas por pago ahora esta definida en el catalogo de proveedores\n\t\t\t*/\n\n\t\t\t$fac_x_cheque = $factura[$i]['facturas_por_pago'];\n\n\t\t\t/*\n\t\t\t@ [21-May-2013] Para oficinas y talleres solo se hara un cheque por factura\n\t\t\t*/\n\t\t\tif (in_array($num_cia, array(700, 800))) {\n\t\t\t\t$fac_x_cheque = 1;\n\t\t\t}\n\n\t\t\t// Si el proveedor es el 13 (Pollos Guerra) cambiar el número de facturas por cheque a 20, si no, regresarlo a 10 [DESCONTINUADO]\n\t\t\t/*if (in_array($num_proveedor, array(13, 482)))\n\t\t\t\t$fac_x_cheque = 20;\n\t\t\telse if (in_array($num_proveedor, array(991))) {\n\t\t\t\t$fac_x_cheque = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$fac_x_cheque = 10;*/\n\n\t\t\t// Vaciar variables que almacenan facturas\n\t\t\tunset($fac_pag);\n\n\t\t\t// Resetear contador de registros de facturas a cero\n\t\t\t$fac_count = 0;\n\t\t\t// Resetear contador de facturas a cero\n\t\t\t$num_fac = 0;\n\t\t\t// Resetear importe de cheque a cero\n\t\t\t$importe_cheque = 0;\n\t\t\t// Resetear concepto del cheque\n\t\t\t$facturas = \"\";\n\t\t}\n\n\t\t// Proceso de generado de cheque\n\t\t// Se considera el caso de el máximo número de facturas pagadas por un cheque\n\t\tif ($num_fac < $fac_x_cheque) {\n\t\t\t// Sumar importe de factura al importe del cheque\n\t\t\t$importe_cheque = round($importe_cheque,2) + round($factura[$i]['total'],2);\n\n\t\t\t// Factura a borrar de pasivo\n\t\t\t$fac_del[$fac_count] = $factura[$i]['id'];\n\t\t\t$fac_pollos[$fac_count] = $factura[$i]['num_fact'];\n\n\t\t\t// Organizar datos para almacenar factura en la tabla de facturas_pagadas\n\t\t\t$fac_pag[$fac_count]['num_cia'] = $num_cia;\n\t\t\t$fac_pag[$fac_count]['num_proveedor'] = $num_proveedor;\n\t\t\t$fac_pag[$fac_count]['num_fact'] = $factura[$i]['num_fact'];\n\t\t\t$fac_pag[$fac_count]['codgastos'] = $factura[$i]['codgastos'];\t// ESTE CAMPO FALTA AGREGARLO A LA TABLA DE 'pasivo_proveedores'\n\t\t\t$fac_pag[$fac_count]['total'] = $factura[$i]['total'];\n\t\t\t$fac_pag[$fac_count]['descripcion'] = $factura[$i]['descripcion'];\n\t\t\t$fac_pag[$fac_count]['fecha'] = $factura[$i]['fecha_mov'];\n\t\t\t$fac_pag[$fac_count]['fecha_cheque'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t$fac_pag[$fac_count]['folio_cheque'] = $folio_cheque;\n\t\t\t$fac_pag[$fac_count]['proceso'] = \"TRUE\";\t\t\t\t\t\t// Proceso automático\n\t\t\t$fac_pag[$fac_count]['imp'] = \"FALSE\";\n\t\t\t$fac_pag[$fac_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t// Agregar el número de factura al concepto del cheque\n\t\t\tif ($fac_count > 0)\n\t\t\t\t$facturas .= \" \";\n\t\t\t$facturas .= /*str_pad(*/$factura[$i]['num_fact']/*, 7, '0', STR_PAD_LEFT)*/;\n\n\t\t\t$codgastos = $factura[$i]['codgastos'];\n\t\t\t$nombre_gasto = $factura[$i]['nombre_gasto'];\n\n\t\t\t// Incrementar contador de facturas\n\t\t\t$fac_count++;\n\t\t\t// Incrementar contador de facturas por cheque\n\t\t\t$num_fac++;\n\t\t}\n\t}\n\n\t// Organizar datos para almacenar cheque\n\tif ($num_cia != NULL && $num_proveedor != NULL && $anio != NULL && $codgastos != NULL && $num_fac > 0 && $num_fac <= $fac_x_cheque) {\n\t\t// Si el importe del cheque es mayor o igual al monto minimo, generarlo\n\t\tif ($importe_cheque >= $monto_min) {\n\t\t\t// Datos para la tabla de 'cheques'\n\t\t\t$cheque[$che_count]['cod_mov'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? 41 : 5;\n\t\t\t$cheque[$che_count]['num_proveedor'] = $num_proveedor;\n\t\t\t$cheque[$che_count]['num_cia'] = $num_cia;\n\t\t\t$cheque[$che_count]['a_nombre'] = $nombre_proveedor;\n\t\t\t$cheque[$che_count]['concepto'] = $nombre_gasto;\n\t\t\t$cheque[$che_count]['facturas'] = $facturas;\n\t\t\t$cheque[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t$cheque[$che_count]['folio'] = $folio_cheque;\n\t\t\t$cheque[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t$cheque[$che_count]['iduser'] = $_SESSION['iduser'];\n\t\t\t$cheque[$che_count]['imp'] = \"FALSE\";\n\t\t\t$cheque[$che_count]['codgastos'] = $codgastos;\n\t\t\t$cheque[$che_count]['proceso'] = \"TRUE\";\n\t\t\t$cheque[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\t\t\t$cheque[$che_count]['poliza'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? \"TRUE\" : \"FALSE\";\n\t\t\t$cheque[$che_count]['site']\t\t\t\t = 'TRUE';\n\n\t\t\tif ($_SESSION['pmp']['cuenta'] == 2 && $trans) {\n\t\t\t\t$transfer[$trans_cont]['num_cia'] = $num_cia;\n\t\t\t\t$transfer[$trans_cont]['num_proveedor'] = $num_proveedor;\n\t\t\t\t$transfer[$trans_cont]['folio'] = $folio_cheque;\n\t\t\t\t$transfer[$trans_cont]['importe'] = number_format($importe_cheque,2,\".\",\"\");\n\t\t\t\t$transfer[$trans_cont]['fecha_gen'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t$transfer[$trans_cont]['tipo'] = !$san ? \"TRUE\" : \"FALSE\";\n\t\t\t\t$transfer[$trans_cont]['status'] = \"0\";\n\t\t\t\t$transfer[$trans_cont]['folio_archivo'] = 0;\n\t\t\t\t$transfer[$trans_cont]['cuenta'] = 2;\n\t\t\t\t$transfer[$trans_cont]['gen_dep'] = 'TRUE';\n\t\t\t\t$trans_cont++;\n\t\t\t}\n\t\t\telse if ($_SESSION['pmp']['cuenta'] == 1 && $trans) {\n\t\t\t\t$transfer[$trans_cont]['num_cia'] = $num_cia;\n\t\t\t\t$transfer[$trans_cont]['num_proveedor'] = $num_proveedor;\n\t\t\t\t$transfer[$trans_cont]['folio'] = $folio_cheque;\n\t\t\t\t$transfer[$trans_cont]['importe'] = number_format($importe_cheque,2,\".\",\"\");\n\t\t\t\t$transfer[$trans_cont]['fecha_gen'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t\t$transfer[$trans_cont]['tipo'] = \"FALSE\";\n\t\t\t\t$transfer[$trans_cont]['status'] = \"0\";\n\t\t\t\t$transfer[$trans_cont]['folio_archivo'] = 0;\n\t\t\t\t$transfer[$trans_cont]['cuenta'] = 1;\n\t\t\t\t$transfer[$trans_cont]['concepto'] = \"PAGO FOLIO $folio_cheque\";\n\t\t\t\t$transfer[$trans_cont]['gen_dep'] = \"TRUE\";\n\t\t\t\t$trans_cont++;\n\t\t\t}\n\n\t\t\t// Datos para la tabla de 'estado_cuenta'\n\t\t\t$cuenta[$che_count]['num_cia'] = $num_cia;\n\t\t\t$cuenta[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t$cuenta[$che_count]['concepto'] = $facturas;\n\t\t\t$cuenta[$che_count]['tipo_mov'] = \"TRUE\";\n\t\t\t$cuenta[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t$cuenta[$che_count]['cod_mov'] = /*$_SESSION['pmp']['cuenta'] == 2 && */$trans ? 41 : 5;\n\t\t\t$cuenta[$che_count]['folio'] = $folio_cheque;\n\t\t\t$cuenta[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t// Datos para la tabla de folios_cheque\n\t\t\t$folio[$che_count]['folio'] = $folio_cheque;\n\t\t\t$folio[$che_count]['num_cia'] = $num_cia;\n\t\t\t$folio[$che_count]['reservado'] = \"FALSE\";\n\t\t\t$folio[$che_count]['utilizado'] = \"TRUE\";\n\t\t\t$folio[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t$folio[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\t$gasto[$che_count]['codgastos'] = $codgastos;\n\t\t\t$gasto[$che_count]['num_cia'] = $num_cia;\n\t\t\t$gasto[$che_count]['fecha'] = $_SESSION['pmp']['fecha_cheque'];\n\t\t\t$gasto[$che_count]['importe'] = number_format($importe_cheque, 2, \".\", \"\");\n\t\t\t$gasto[$che_count]['concepto'] = \"PAGO PROVEEDOR: $num_proveedor FAC.: $facturas\";\n\t\t\t$gasto[$che_count]['captura'] = \"TRUE\";\n\t\t\t$gasto[$che_count]['factura'] = \"\";\n\t\t\t$gasto[$che_count]['folio'] = $folio_cheque;\n\t\t\t$gasto[$che_count]['cuenta'] = $_SESSION['pmp']['cuenta'];\n\n\t\t\tif ($num_cia_pago > 0) {\n\t\t\t\t$query .= \"INSERT INTO pagos_otras_cias (num_cia, folio, cuenta, num_cia_aplica, fecha) VALUES ($num_cia, $folio_cheque, {$_SESSION['pmp']['cuenta']}, $num_cia_aplica, '{$_SESSION['pmp']['fecha_cheque']}');\\n\";\n\t\t\t}\n\n\t\t\t// Almacenar datos en la tabla de 'facturas_pagadas'\n\t\t\t$query .= $GLOBALS['db']->multiple_insert(\"facturas_pagadas\", $fac_pag);\n\n\t\t\t// Borrar facturas pagadas de pasivo\n\t\t\t$query .= \"DELETE FROM pasivo_proveedores WHERE id IN (\";\n\t\t\tfor ($f=0; $f<$fac_count; $f++)\n\t\t\t\t$query .= $fac_del[$f] . ($f < $fac_count - 1 ? \",\" : \");\\n\");\n\n\t\t\t// Actualizar saldo en libros\n\t\t\t//$query .= \"UPDATE saldos SET saldo_libros = saldo_libros - $importe_cheque WHERE num_cia = $num_cia;\\n\";\n\t\t\t$query .= \"UPDATE saldos SET saldo_libros = saldo_libros - $importe_cheque WHERE num_cia = $num_cia AND cuenta = {$_SESSION['pmp']['cuenta']};\\n\";\n\n\t\t\t// Imcrementar número de folio\n\t\t\t$folio_cheque++;\n\t\t\t// Incrementar contador de cheques\n\t\t\t$che_count++;\n\t\t}\n\t}\n\n\t// Insertar datos en la base\n\t$query .= $GLOBALS['db']->multiple_insert(\"cheques\",$cheque);\n\t$query .= $GLOBALS['db']->multiple_insert(\"folios_cheque\",$folio);\n\t$query .= $GLOBALS['db']->multiple_insert(\"estado_cuenta\",$cuenta);\n\t$query .= $GLOBALS['db']->multiple_insert(\"movimiento_gastos\",$gasto);\n\tif (isset($transfer)) $query .= $GLOBALS['db']->multiple_insert(\"transferencias_electronicas\",$transfer);\n\n\treturn array($query, $query_ob);\n}", "title": "" }, { "docid": "6f77f166aa4e54602895b2021fed022f", "score": "0.55252594", "text": "function reporteInformacionP(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPINFPRE_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\n $this->captura('id_cp', 'int4');\n $this->captura('centro_costo', 'varchar');\n $this->captura('codigo_programa', 'varchar');\n $this->captura('codigo_proyecto', 'varchar');\n $this->captura('codigo_actividad', 'varchar');\n $this->captura('codigo_fuente_fin', 'varchar');\n $this->captura('codigo_origen_fin', 'varchar');\n\n $this->captura('codigo_partida', 'varchar');\n $this->captura('nombre_partidad', 'varchar');\n $this->captura('codigo_cg', 'varchar');\n $this->captura('nombre_cg', 'varchar');\n $this->captura('precio_total', 'numeric');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n $this->captura('nombre_entidad', 'varchar');\n $this->captura('direccion_admin', 'varchar');\n $this->captura('unidad_ejecutora', 'varchar');\n $this->captura('codigo_ue', 'varchar');\n $this->captura('firmas', 'varchar');\n $this->captura('justificacion', 'varchar');\n $this->captura('codigo_transf', 'varchar');\n $this->captura('unidad_solicitante', 'varchar');\n $this->captura('funcionario_solicitante', 'varchar');\n $this->captura('fecha_soli', 'date');\n $this->captura('gestion', 'integer');\n $this->captura('codigo_poa', 'varchar');\n $this->captura('codigo_descripcion', 'varchar');\n $this->captura('tipo', 'varchar');\n\n $this->captura('nombre_categoria', 'varchar');\n\n $this->captura('nro_directorio', 'varchar');\n $this->captura('nro_nota', 'varchar');\n $this->captura('nro_nota2', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "38b1858ce838204dfcd3e3fd38bd8e29", "score": "0.55239683", "text": "function aggiungiProdotto($nome, $marca, $tipo, $quantita, $prezzo=0, $prezzoRiv=0) {\n\tcleanString($nome);\n\tif($nome === \"\") {return FALSE;} //un Prodotto senza nome, marca e tipo non ha senso\n\tcleanString($marca);\n\tif($marca === \"\") {return FALSE;}\n\tcleanString($tipo);\n\tif($tipo === \"\") {return FALSE;}\n\tif($quantita === \"\" || $quantita <= 0) {return FALSE;}\n\tif(!checkPrezzo($prezzo)) {$prezzo=0;}\n\tif(!checkPrezzo($prezzoRiv)) {$prezzoRiv=0;}\n\treturn eseguiQuery(\"INSERT Prodotti(Nome, Marca, Tipo, Quantita, Prezzo, PRivendita) VALUES('$nome', '$marca', '$tipo', $quantita, $prezzo, $prezzoRiv)\");\n}", "title": "" }, { "docid": "872443583d73adb08dd0ab14b3887d11", "score": "0.5518644", "text": "function reporteCertificacionPMod(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPCERPRE_MOD_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\n $this->captura('id_cp', 'int4');\n $this->captura('centro_costo', 'varchar');\n $this->captura('codigo_programa', 'varchar');\n $this->captura('codigo_proyecto', 'varchar');\n $this->captura('codigo_actividad', 'varchar');\n $this->captura('codigo_fuente_fin', 'varchar');\n $this->captura('codigo_origen_fin', 'varchar');\n\n $this->captura('codigo_partida', 'varchar');\n $this->captura('nombre_partidad', 'varchar');\n $this->captura('codigo_cg', 'varchar');\n $this->captura('nombre_cg', 'varchar');\n $this->captura('precio_total', 'numeric');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n $this->captura('nombre_entidad', 'varchar');\n $this->captura('direccion_admin', 'varchar');\n $this->captura('unidad_ejecutora', 'varchar');\n $this->captura('codigo_ue', 'varchar');\n $this->captura('firmas', 'varchar');\n $this->captura('justificacion', 'varchar');\n $this->captura('codigo_transf', 'varchar');\n $this->captura('unidad_solicitante', 'varchar');\n $this->captura('funcionario_solicitante', 'varchar');\n $this->captura('fecha_soli', 'date');\n $this->captura('gestion', 'integer');\n\n $this->captura('tipo_ajuste', 'varchar');\n $this->captura('correlativo', 'integer');\n $this->captura('tipo_proceso', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "baac06b941b4a1e169ba1b0d47eb39b7", "score": "0.5517685", "text": "abstract public function getInfoProduk();", "title": "" }, { "docid": "c78b84ba158580b87f8ef978bfde2ab5", "score": "0.5517572", "text": "function aprobarPlanes()\n {\n $this->procedimiento = 'ssig.ft_plan_ime';\n $this->transaccion = 'SSIG_SSIGPAPR_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_gestion', 'id_gestion', 'int4');\n $this->setParametro('aprobado', 'aprobado', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "cf3634a9435a310eabd8a10266badfaa", "score": "0.55153435", "text": "function dar_permisos_publicacion(Array $data){\r\n parent::conectar();\r\n $result = parent::consultaTodo(\"SELECT * FROM productos_permisos_publicar WHERE uid = '$data[uid]' AND empresa = '$data[empresa]';\");\r\n parent::cerrar(); \r\n if(!$result){\r\n if(count($result) <= 0){\r\n parent::conectar();\r\n $permisoRegistro = parent::queryRegistro(\"INSERT INTO productos_permisos_publicar(uid,empresa) VALUES('$data[uid]','$data[empresa]');\");\r\n parent::cerrar(); \r\n if($permisoRegistro){\r\n return array(\"status\" => \"success\",\"mensaje\" => \"se registraron permisos al usuario\");\r\n }else{\r\n return array(\"status\" => \"fail\", \"mensaje\" => \"error al registrar permisos\");\r\n }\r\n }else{\r\n return array(\"status\" => \"fail\", \"mensaje\" => \"el usuario ya tiene permisos registrados\");\r\n } \r\n }\r\n return array(\"status\" => \"fail\", \"mensaje\" => \"hubo un error\"); \r\n }", "title": "" }, { "docid": "c6aeffe433faa1826f8a0066037b079d", "score": "0.5514939", "text": "function crearComercio($p){\n // creo comercio\n $c = R::dispense(\"comercios\");\n $c[\"cuit\"] = $p[\"cuit\"];\n $c[\"razon_social\"] = $p[\"razon_social\"];\n $c[\"nombre\"] = $p[\"nombre\"];\n $c[\"dni_titular\"] = $p[\"dni_titular\"];\n $c[\"nombre_titular\"] = $p[\"nombre_titular\"];\n $c[\"mail\"] = $p[\"mail\"];\n $c[\"telefono_fijo\"] = $p[\"telefono_fijo\"];\n $c[\"telefono_celular\"] = $p[\"telefono_celular\"];\n // [comercio]\n $c[\"domicilio_comercio_calle\"] = $p[\"domicilio_comercio_calle\"];\n $c[\"domicilio_comercio_altura\"] = $p[\"domicilio_comercio_altura\"];\n $c[\"domicilio_comercio_observacion\"] = $p[\"domicilio_comercio_observacion\"];\n $c[\"domicilio_comercio_cpa\"] = $p[\"domicilio_comercio_cpa\"];\n $c[\"domicilio_comercio_provincia\"] = $p[\"domicilio_comercio_provincia\"];\n $c[\"domicilio_comercio_localidad\"] = $p[\"domicilio_comercio_localidad\"];\n // [legal]\n $c[\"domicilio_legal_calle\"] = $p[\"domicilio_legal_calle\"];\n $c[\"domicilio_legal_altura\"] = $p[\"domicilio_legal_altura\"];\n $c[\"domicilio_legal_observacion\"] = $p[\"domicilio_legal_observacion\"];\n $c[\"domicilio_legal_cpa\"] = $p[\"domicilio_legal_cpa\"];\n $c[\"domicilio_legal_provincia\"] = $p[\"domicilio_legal_provincia\"];\n $c[\"domicilio_legal_localidad\"] = $p[\"domicilio_legal_localidad\"];\n // [real]\n $c[\"domicilio_real_calle\"] = $p[\"domicilio_real_calle\"];\n $c[\"domicilio_real_altura\"] = $p[\"domicilio_real_altura\"];\n $c[\"domicilio_real_observacion\"] = $p[\"domicilio_real_observacion\"];\n $c[\"domicilio_real_cpa\"] = $p[\"domicilio_real_cpa\"];\n $c[\"domicilio_real_provincia\"] = $p[\"domicilio_real_provincia\"];\n $c[\"domicilio_real_localidad\"] = $p[\"domicilio_real_localidad\"];\n // [/domicilio]\n $c[\"observacion\"] = $p[\"observacion\"];\n $c[\"rubro\"] = $p[\"rubro\"];\n $c[\"convenio\"] = $p[\"convenio\"];\n $c[\"fecha_alta\"] = date(\"Ymd\");\n $c[\"estado\"] = true;\n $id_comercio = R::store($c);\n // creo usuario\n $u = R::dispense(\"user\");\n $u[\"user\"] = $p[\"user\"];\n $u[\"pass\"] = md5($p[\"pass\"]);\n $u[\"level\"] = 3; // ESTO DEBERIA ESTAR EN LA BD, QUIENES SON COMERCIO; y FINANCIERA\n $u[\"titular\"] = $p[\"nombre_titular\"];\n $u[\"dni\"] = $p[\"dni_titular\"];\n $u[\"id_comercio\"] = $id_comercio;\n R::store($u);\n response(200,\"comercio creado exitosamente\",[\"exito\" => true, \"id\" => $id_comercio, \"ret\" => $p]);\n}", "title": "" }, { "docid": "b7379fe574125a9a1ad8d7a049a782c8", "score": "0.551182", "text": "function calcPrestamo($monto, $num_cuota, $tope_sgte_mes = 20) {\n\n // variables 02\n $multiplo = floor($monto / $num_cuota); //ok\n $valor_multiplo = $multiplo * $num_cuota;\n $residuo = 0;\n\n //codicion de residuo\n if ($monto > $valor_multiplo):\n $residuo = $monto - $valor_multiplo;\n endif;\n\n $bandera_sgte_mes = false;\n if ($residuo > $tope_sgte_mes): //$residuo es mayor a 20\n $bandera_sgte_mes = true;\n else:\n $bandera_sgte_mes = false;\n endif;\n\n\n //DATOS A GUARDAR BD\n $cuota_arreglo = array();\n for ($i = 0; $i < $num_cuota; $i++):\n $cuota_arreglo[$i]['monto'] = ($valor_multiplo / $num_cuota);\n if (($num_cuota - 1) == $i): // ultima cuaota de pago\n $cuota_arreglo[$i]['monto'] = ($valor_multiplo / $num_cuota) + $residuo;\n endif;\n endfor;\n\n\n if ($bandera_sgte_mes == true): //SIGUIENTE MES CASO EXEPCION\n $i_count = count($cuota_arreglo);\n $cuota_arreglo[$i_count]['monto'] = $residuo;\n endif;\n\n return $cuota_arreglo;\n}", "title": "" }, { "docid": "64a1c9c6484982ae92422e2dda4103a0", "score": "0.55100864", "text": "public static function getPublics(){\n\t\t$sql = \"select * from \".self::$tablename.\" where ES_PUBLICO=1\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new BuyData());\n\t}", "title": "" }, { "docid": "05338f1395fff8091cc806705146ba6b", "score": "0.5503083", "text": "function rezosocios_autoriser() {\n}", "title": "" }, { "docid": "67d15156ab6034b5b2f5512f2ceb5b7f", "score": "0.5502199", "text": "function castello_iva($_ivadiversa, $_castiva, $pagina, $_pg, $datidoc, $LINGUA, $desciva, $dati)\n{\n//per prima cosa passiamo l'inclusione dei files vars.php\n\trequire \"../../setting/vars.php\";\n\t// includiamo il file delle lingue\n\tinclude \"../librerie/$LINGUA\";\n\trequire_once \"../librerie/lib_html.php\";\n\trequire_once \"../librerie/motore_anagrafiche.php\";\n\t//dobbiamo inserire le spese di trasporto nel castelletto iva\n\t//considerando le spese sono con iva 20%\n\tif ($dati['datareg'] < $DATAIVA)\n\t{\n\t\t$ivasis = $ivasis - 1;\n\t}\n\n\tif ($_ivadiversa != \"2\")\n\t{\n\t\t$_castiva[$ivasis] = ($_castiva[$ivasis] + (($dati['imballo'] + $dati['trasporto'] + $dati['spesevarie'] + $dati['sp_bancarie']) - $dati['scoinco']));\n\t}\n\t//riordino l castello iva\n\tarsort($_castiva);\n\n\techo \"<TD WIDTH=134 colspan=\\\"2\\\">\\n\";\n\techo \"<table align=\\\"center\\\" width=\\\"100%\\\" border=\\\"0\\\">\\n\";\n\techo \"<tr><td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI001</I></FONT></FONT></td>\";\n\techo \"<td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI002</I></FONT></FONT></td>\";\n\techo \"<td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI003</I></FONT></FONT></td>\";\n\techo \"</tr>\";\n\n\tif ($pagina == $_pg)\n\t{\n\t\t// se il cliente e esente lo faccio apparire\n\t\tif ($_ivadiversa == \"2\")\n\t\t{\n\t\t\techo \"<tr><td align=center colspan=3><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">$desciva</font></td></tr>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Visualizzo tatali iva diverse\n\t\t\twhile (@list($indice, $valore) = each($_castiva))\n\t\t\t{\n\t\t\t\t$_aliquota = tabella_aliquota(\"singola_aliquota\", $indice, $_percorso);\n\t\t\t\t$_ivasep = number_format((($valore * $_aliquota) / 100), $dec, '.', '');\n\n\t\t\t\tif ($indice != \"\")\n\t\t\t\t{\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td ALIGN=RIGHT><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">\" . number_format(($valore), $decdoc) . \"</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"<td ALIGN=right><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">$indice</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"<td ALIGN=RIGHT><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">\" . number_format(($_ivasep), $decdoc) . \"</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\techo \"</table></TD>\";\n}", "title": "" }, { "docid": "4014ee71d9a5e1a526cb88fb558b8a7f", "score": "0.5501289", "text": "function cl_procandamint() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procandamint\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "b147a605dce4da7e3af72326eb1e3131", "score": "0.54977995", "text": "public function parce();", "title": "" }, { "docid": "e113464e7aceda6db3f3f2f4024f2d08", "score": "0.5494002", "text": "public function getultimaspublicaciones()\r\n {\r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n $query = \"SELECT * FROM publicacion p where p.id_categoria IN (select id from categoria where isEstatico = false) and p.Estado = 1 ORDER BY p.FechaMod Desc limit 6\";\r\n //variable que almacenará las publicaciones de el usuario\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $publication = mysql_query($query,$conn); \r\n return $publication; \r\n }", "title": "" }, { "docid": "3e1d10cb9da158137925a6b74d8e4a40", "score": "0.54895335", "text": "public function getAPejabatPublik()\n {\n return $this->a_pejabat_publik;\n }", "title": "" }, { "docid": "b37aa3f4d92235e5f42ff5f0bfb5c71e", "score": "0.54862463", "text": "public static function preModif(){\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$r=PensumServicio::obtener(PostGet::obtenerPostGet('codigoPensum'));\n\t\t\t//\tvar_dump($r);\n\t\t\t\t$mensaje=\"Pensum\";\n\t\t\t\tVista::asignarDato('pensum',$r);\n\t\t\t//\tvar_dump($r);\n\t\t\t\tVista::asignarDato('estatus',1);\n\t\t\t\tVista::asignarDato('mensaje',$mensaje);\n\t\t\t\tVista::mostrar();\n\t\t\t}\n\t\t\tcatch (Exception $e){\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "856fd230af704149e25f4414230d9136", "score": "0.5481436", "text": "public function getPublicacionesPorFecha()\n\t{\n\t\t$subq = Publicacion::select([\\DB::raw('DATE(\"PUBL_FECHACREADO\") as fecha'), 'PUBL_ID'])\n\t\t\t->where(\\DB::raw('DATE(\"PUBL_FECHACREADO\")'), '>=', \\Carbon\\Carbon::now()->subWeeks(3));\n\n\t\t$data = \\DB::table( \\DB::raw(\"({$subq->toSql()}) as subq\") )\n\t\t\t->mergeBindings($subq->getQuery())\n\t\t\t->select([\n\t\t\t\t'fecha', \n\t\t\t\t\\DB::raw('COUNT(\"PUBL_ID\") as count')\n\t\t\t])\n\t\t\t->groupBy('fecha')\n\t\t\t->orderBy('fecha');\n\n\t\treturn $data->get()->toJson();\n\t}", "title": "" }, { "docid": "343cb6e6bc2c0b36b4d16ac8a8b02bd8", "score": "0.54772085", "text": "function listarPresupuestoCmb(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PRE_CBMPRES_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->captura('id_centro_costo','int4');\n $this->captura('estado_reg','VARCHAR');\n $this->captura('id_ep','int4');\n $this->captura('id_gestion','int4');\n $this->captura('id_uo','int4');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('usr_reg','VARCHAR');\n $this->captura('usr_mod','VARCHAR');\n $this->captura('codigo_uo','VARCHAR');\n $this->captura('nombre_uo','VARCHAR');\n $this->captura('ep','TEXT');\n $this->captura('gestion','INTEGER');\n $this->captura('codigo_cc','text');\n $this->captura('nombre_programa','VARCHAR');\n $this->captura('nombre_proyecto','VARCHAR');\n $this->captura('nombre_actividad','VARCHAR');\n $this->captura('nombre_financiador','VARCHAR');\n $this->captura('nombre_regional','VARCHAR');\n $this->captura('tipo_pres','VARCHAR');\n $this->captura('cod_act','VARCHAR');\n $this->captura('cod_fin','VARCHAR');\n $this->captura('cod_prg','VARCHAR');\n $this->captura('cod_pry','VARCHAR');\n $this->captura('estado_pres','VARCHAR');\n $this->captura('estado','VARCHAR');\n $this->captura('id_presupuesto','int4');\n $this->captura('id_estado_wf','int4');\n $this->captura('nro_tramite','VARCHAR');\n $this->captura('id_proceso_wf','int4');\n $this->captura('movimiento_tipo_pres','VARCHAR');\n $this->captura('desc_tipo_presupuesto','VARCHAR');\n $this->captura('sw_oficial','VARCHAR');\n $this->captura('sw_consolidado','VARCHAR');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "a226d3e4079e7c835cb519302e7f7fee", "score": "0.5477165", "text": "function cl_avaliacaogrupoperguntaresposta() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaogrupoperguntaresposta\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "80f704c832ee519a9d65e33fd782934f", "score": "0.5466702", "text": "public function mostrar_prestamos_controlador($pagina_actual,$n_registros,$privilegio,$url,$tipo,$fecha_inicio,$fecha_final){\n $pagina_actual=mainModelo::limpiar_cadena($pagina_actual);\n $n_registros=mainModelo::limpiar_cadena($n_registros);\n $privilegio=mainModelo::limpiar_cadena($privilegio);\n\n $url=mainModelo::limpiar_cadena($url);\n $url=SERVER_URL.$url.\"/\";\n\n $tipo=mainModelo::limpiar_cadena($tipo);\n $fecha_inicio=mainModelo::limpiar_cadena($fecha_inicio);\n $fecha_final=mainModelo::limpiar_cadena($fecha_final);\n $tabla=\"\";\n\n //Si $pagina_actual no viene definida o no es un numero ...será 1\n $pagina= (isset($pagina_actual) && $pagina_actual>0) ? (int)$pagina_actual : 1 ;\n $inicio= ($pagina>0) ? (($pagina*$n_registros)-$n_registros) : 0 ;\n\n if($tipo==\"Busqueda\"){\n if(mainModelo::verificar_fecha($fecha_inicio) || mainModelo::verificar_fecha($fecha_final)){\n return '\n <div class=\"alert alert-danger text-center\" role=\"alert\">\n <p><i class=\"fas fa-exclamation-triangle fa-5x\"></i></p>\n <h4 class=\"alert-heading\">¡Ocurrió un error inesperado!</h4>\n <p class=\"mb-0\">Lo sentimos, no podemos realizar la busqueda ya que ha ingresado una fecha incorrecta.</p>\n </div>\n ';\n exit();\n }\n }\n\n $campos=\"prestamo.prestamo_id,prestamo.prestamo_codigo,prestamo.prestamo_fecha_inicio,prestamo.prestamo_fecha_final,prestamo.prestamo_total,prestamo.prestamo_pagado,prestamo.prestamo_estado,prestamo.usuario_id,prestamo.cliente_id,cliente.cliente_nombre,cliente.cliente_apellido\";\n\n\n if($tipo==\"Busqueda\" && $fecha_inicio!=\"\" && $fecha_final!=\"\"){\n \n $consulta=\"SELECT SQL_CALC_FOUND_ROWS $campos FROM prestamo INNER JOIN cliente ON prestamo.cliente_id=cliente.cliente_id WHERE (prestamo.prestamo_fecha_inicio BETWEEN '$fecha_inicio' AND '$fecha_final') ORDER BY prestamo.prestamo_fecha_inicio DESC LIMIT $inicio,$n_registros\";\n \n }else{\n //Listas préstamos por estados\n $consulta=\"SELECT SQL_CALC_FOUND_ROWS $campos FROM prestamo INNER JOIN cliente ON prestamo.cliente_id=cliente.cliente_id WHERE prestamo.prestamo_estado='$tipo' ORDER BY prestamo.prestamo_fecha_inicio DESC LIMIT $inicio,$n_registros\";\n }\n\n $conexion=mainModelo::conectar();\n\n $datos = $conexion->query($consulta);\n\n $datos = $datos->fetchAll();\n\n $total=$conexion->query(\"SELECT FOUND_ROWS()\");\n $total = (int)$total->fetchColumn();//Nos dice el total de columnas---\n\n //ceil() para redondear el numero de paginas---\n $Npaginas=ceil($total/$n_registros);\n\n $tabla.='<div class=\"table-responsive\">\n <table class=\"table table-dark table-sm\">\n <thead>\n <tr class=\"text-center roboto-medium\">\n <th>#</th>\n <th>CLIENTE</th>\n <th>FECHA DE PRÉSTAMO</th>\n <th>FECHA DE ENTREGA</th>\n <th>TIPO</th>\n <th>ESTADO</th>\n <th>FACTURA</th>';\n if($privilegio==1 || $privilegio == 2){\n $tabla.='<th>ACTUALIZAR</th>';\n }\n if($privilegio==1){\n $tabla.='<th>ELIMINAR</th>';\n }\n $tabla.=' </tr>\n </thead>\n <tbody>';\n\n //Comprobamos que exitan registros para mostrarlos---\n if($total>=1 && $pagina<=$Npaginas){\n //Mostramos los registros dentro de la tabla---\n $contador=$inicio+1;\n $reg_inicio=$inicio+1;\n\n //Formateamos las fechas\n foreach($datos as $row){\n\n $tabla.=\n '<tr class=\"text-center\">\n <td>'.$contador.'</td>\n <td>'.$row['cliente_nombre'].' '.$row['cliente_apellido'].'</td>\n <td>'.date(\"d-m-Y\",strtotime($row['prestamo_fecha_inicio'])).'</td>\n <td>'.date(\"d-m-Y\",strtotime($row['prestamo_fecha_final'])).'</td>\n <td>'.$row['prestamo_estado'].'</td>';\n\n if($row['prestamo_pagado']<$row['prestamo_total']){\n\n $tabla.='<td>Pendiente:<span class=\"badge badge-danger\">'.MONEDA.number_format(($row['prestamo_total']-$row['prestamo_pagado']),2,'.','').'</span></td>';\n }else{\n\n $tabla.='<td><span class=\"badge badge-light\">Cancelado</span></td>';\n }\n\n $tabla.='\n <td>\n <a href=\"'.SERVER_URL.'facturas/invoice.php?id='.mainModelo::encryption($row['prestamo_id']).'\" class=\"btn btn-info\" target=\"_blank\">\n <i class=\"fas fa-file-pdf\"></i>\n </a>\n </td>\n ';\n\n if($privilegio==1 || $privilegio == 2){\n\n if($row['prestamo_estado']==\"Finalizado\" && $row['prestamo_pagado']==$row['prestamo_total'] ){\n\n $tabla.='<td>\n <button class=\"btn btn-success\" disabled>\n <i class=\"fas fa-sync-alt\"></i>\n </button>\n </td>';\n }else{\n $tabla.='<td>\n <a href=\"'.SERVER_URL.'reservation-update/'.mainModelo::encryption($row['prestamo_id']).'/\" class=\"btn btn-success\">\n <i class=\"fas fa-sync-alt\"></i>\n </a>\n </td>';\n }\n \n \n }\n if($privilegio==1){\n $tabla.='<td>\n <form class=\"FormularioAjax\" action=\"'.SERVER_URL.'ajax/prestamoAjax.php\" method=\"POST\" data-form=\"delete\" autocomplete=\"off\">\n <input type=\"hidden\" name=\"prestamo_codigo_del\" value=\"'.mainModelo::encryption($row['prestamo_codigo']).'\">\n <button type=\"submit\" class=\"btn btn-warning\"><i class=\"far fa-trash-alt\"></i></button>\n </form>\n </td>';\n }\n $tabla.='</tr>';\n $contador++;\n }\n $reg_final=$contador-1;\n\n }else{\n if($total>=1){\n //Si el usuario ingresa en una pagina que no existe pero si hay registro---\n $tabla.='<tr class=\"text-center\"><td colspan=\"9\">\n <a href=\"'.$url.'\" class=\"btn btn-raised btn-primary btn-sm\">Haga click para recargar el listado</a>\n </td></tr>';\n\n }else{\n //Si no hay registros---\n $tabla.='<tr class=\"text-center\"><td colspan=\"9\">No hay registros en el sistema</td></tr>';\n\n }\n \n }\n\n $tabla.='</tbody></table></div>'; \n \n // if($total>=1 && $pagina<=$Npaginas){\n \n // }\n\n //Agregar botones--- \n if($total>=1 && $pagina<=$Npaginas){\n $tabla.='<p class=\"text-right\">Mostrando prestamos '.$reg_inicio.' al '.$reg_final.' de un total de ' .$total.'</p>';\n $tabla.=mainModelo::paginador_tablas($pagina,$Npaginas,$url,7);\n }\n \n return $tabla;\n\n }", "title": "" }, { "docid": "de3c4f776a71091faf057984c34f38dc", "score": "0.5464155", "text": "public function AgregarP()\n\n\t\t{\n\t\t\t\t\t session_start();\n\n\t\t\t$this->vista('paginas/Rproducto');\n\t\t\t# code...\n\t\t}", "title": "" }, { "docid": "2f196c721a21458ee4934a57aa625cda", "score": "0.546295", "text": "abstract protected function nacionalidades();", "title": "" }, { "docid": "3226fdb5a3fd54b49ee69319b4b470c6", "score": "0.5460755", "text": "function cl_projmelhorias() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"projmelhorias\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "b0eb62e833c2bfb8fd6d833b398f33f4", "score": "0.5457596", "text": "static public function ctrCrearPoliticaProcedimiento(){\n\t\tif(isset($_POST[\"accionPoliticaProcedimiento\"]) && $_POST[\"accionPoliticaProcedimiento\"] == \"crear\"){\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\t\t\t\n\t\t\t$tabla1 = 'vtaca_politica_procedimiento';\n\t\t\t$tabla2 = 'vtade_politica_procedimiento';\n\t\t\t$codPoliticaProcedimiento = maximoCodigoTabla($tabla1,'cod_politica','');\n\t\t\t$datos = array(\"cod_politica\" => $codPoliticaProcedimiento,\n\t\t\t\t\t\t \"dsc_politica\" => ms_escape_string(trim($_POST[\"nombrePoliticaProcedimiento\"])),\n\t\t\t\t\t\t \"cod_usr_registro\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_registro\" => $fechaActual);\n\t\t\t$rutaGlobal = realpath(dirname(__FILE__));\n\t\t\t$rutaGlobal = rutaGlobal($rutaGlobal);\n\t\t\t$arrayArchivo = [];\n\t\t\t$arrayNombreArchivo = [];\n\t\t\t$numLineaArchivo = [];\n\t\t\t$arrayUsrRegistro = [];\n\t\t\t$arrayFchRegistro = [];\n\t\t\t$item = \"dsc_politica\";\n\t\t\t$valor = ms_escape_string(trim($_POST[\"nombrePoliticaProcedimiento\"]));\n\t\t\t$entrada = \"validarNombreRepetido\";\n\t\t\t$nombre = ModeloPoliticaProcedimiento::mdlMostrarPoliticaProcedimiento($tabla1,$item,$valor,$entrada);\n\t\t\tif($nombre['contador'] == 0){\n\t\t\t\tif($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"][0] != ''){\n\t\t\t\t\tfor ($i=0; $i < count($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"]) ; $i++) {\n\t\t\t\t\t\t$fileArchivo = $_FILES[\"archivoPoliticaProcedimiento\"];\n\t\t\t\t\t\t$nombreRutaArchivo = $codPoliticaProcedimiento.\"-\".($i+1).\"-\".ms_escape_string(trim($fileArchivo[\"name\"][$i]));\n\t\t\t\t\t\tarray_push($arrayArchivo,$nombreRutaArchivo);\n\t\t\t\t\t\tarray_push($arrayNombreArchivo,ms_escape_string(trim($fileArchivo[\"name\"][$i])));\n\t\t\t\t\t\tarray_push($numLineaArchivo, $i+1);\n\t\t\t\t\t\tarray_push($arrayUsrRegistro,$_SESSION[\"cod_trabajador\"]);\n\t\t\t\t\t\tarray_push($arrayFchRegistro,$fechaActual);\n\t\t\t\t\t}//for\t\t\t\t\n\t\t\t\t}//if\n\t\t\t\t$respuesta = ModeloPoliticaProcedimiento::mdlIngresarPoliticaProcedimiento($tabla1,$tabla2,$datos,$numLineaArchivo,$arrayArchivo,$arrayNombreArchivo,$arrayUsrRegistro,$arrayFchRegistro,$codPoliticaProcedimiento);\n\t\t\t\tif($respuesta == \"ok\"){\n\t\t\t\t\tif($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"][0] != ''){\n\t\t\t\t\t\tfor ($i=0; $i < count($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"]) ; $i++) {\n\t\t\t\t\t\t\t$nombreRutaArchivo = $codPoliticaProcedimiento.\"-\".($i+1).\"-\".trim(utf8_decode($fileArchivo[\"name\"][$i]));\n\t\t\t\t\t\t\t$ruta = $rutaGlobal.\"/archivos/politica-procedimiento/\".$nombreRutaArchivo;\n\t\t\t\t\t\t\tmove_uploaded_file($fileArchivo[\"tmp_name\"][$i], $ruta);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$respuesta = \"nombreRepetido\";\n\t\t\t}\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "title": "" }, { "docid": "30b7a80921ef7a6c468ff0a8a98d5ba2", "score": "0.54506433", "text": "function cl_pontocom() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pontocom\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c6682efeda099c93ad7bc5caf3b02c41", "score": "0.5449844", "text": "function cl_placaixaprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"placaixaprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a437d69d073806b803a634619b3504f4", "score": "0.5446103", "text": "function calculaPVPSinDescuento ($idProducto, $precio_sin_recargo, $iva) {\n\t$recargoProd = calculaRecargoProducto($idProducto);\n\t$precioProd = $precio_sin_recargo;\n\t\n\tif ($recargoProd && $recargoProd>0.01) {\n\t\t$precioProd = $precioProd + ($precioProd * $recargoProd / 100);\n\t} \n\t\n\treturn round(($precioProd + ($precioProd * $iva / 100)), 2);\n}", "title": "" }, { "docid": "a5175eb8a9eb41301f918a09439daad4", "score": "0.54450077", "text": "function f_grabarPropietario($apa, $per, $ord, $baj) {\n $oPro = new Propiedad($apa);\n $oPro->setPropietario($per, $baj, $ord);\n return $oPro->grabarPropietarios();\n}", "title": "" }, { "docid": "e6585e767898c24c2b1ffac9857fd881", "score": "0.54364794", "text": "public function get_todas_noticias_publicadas()\n {\n \treturn $this->noticiasRepo->get_todas_noticias_publicadas();\n }", "title": "" }, { "docid": "d7df4e4a34f9993a850c7646a94b8035", "score": "0.5435384", "text": "function necesarios() {\n \n}", "title": "" } ]
a136799a94d034494c3221e23ab4a9e0
Validate Request (as currently set) $dt = syck_load(file_get_contents('apidefs.yml')); file_put_contents('methods.dat', serialize($dt));
[ { "docid": "071ccf2842b0009c3bd03b9f11973df5", "score": "0.0", "text": "protected function _validateRequest($method)\n {\n // get proper map\n $map = $this->_loadMethodValidationMap();\n \n // fixup stack\n $stack = $this->method_stack;\n if (empty($stack[1]))\n $stack[1] = '_default';\n \n // get method\n $val_methods = $map[$stack[0]][$stack[1]];\n if (! $val_methods || ! array_key_exists($method, $val_methods))\n throw new PBAPI_Exception('invalid method: ' . $method, $this);\n \n // get parameters\n $val_params = $val_methods[$method];\n if ($val_params)\n {\n // look for unknown parameters (if parameters are specified)\n $unknowns = array_diff_key($this->params, $val_params);\n if (count($unknowns))\n throw new PBAPI_Exception('unknown parameters: ' . implode(', ', array_keys($unknowns)), $this);\n \n // look for missing required parameters\n $missing = array_diff_key($val_params, $this->params);\n if (count($missing))\n {\n foreach ($missing as $key => $val)\n {\n if ($val != 'required')\n unset($missing[$key]);\n if ($key == 'aid' || $key == 'mid' || $key == 'uid' || $key == 'tagid') // todo somehow do this\n // better\n unset($missing[$key]); // also skip stuff we're catching already\n }\n if (count($missing))\n throw new PBAPI_Exception(\n 'missing required parameters: ' . implode(', ', array_keys($missing)), \n $this);\n }\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "4b4171fb99f124445b29a73c8ceda748", "score": "0.5992012", "text": "private function check_valid_api() {\n\t\n\t\tglobal $fs_schema;\n\t\t\n\t\t$settings = $fs_schema->data->settings();\n\t\t\n\t\tswitch ( $settings[ 'fs_schema_integration' ] ) {\n\t\t\n\t\t\tcase 'BRP':\n\t\t\t\n\t\t\t\t// ..1.2..\n\t\t\t\tupdate_option( 'fs_schema_valid_key', strpos ( base64_decode ('Li5lYzY1YTVlNTZkZmQ0OTA4YjBhOTI4NDJkOThhMGRiYy4xYTA3ZmNlMWFjMjI0YTY2OWRjYWUwMjQxMmJjZDA4NC42YThhYTRjMWM2ZDg0ZTNmOWQxN2NlZDJhZTViZWM5My4zOTdmZGFlYzAwMGM0ZTMyODJiYzI1ODVkYjVmYTJiZS40OWY0YzhkNmI4OTg0NGEzYmJiMmEzYTgwMDg1NjE4Yi5lODVjMDYzYTI1MjQ0MmNjOTQ1MmIzMTA1MzM1NDkzZC4zZGI2NTQ4ODIxODM0NTEzYjc2MDZkZjBlYTIzZDQ2MS4u'), '.'.$settings[ 'fs_booking_bpi_api_key' ].'.' ) );\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 'PROFIT':\n\t\t\t\n\t\t\t\t// ..1.2..\n\t\t\t\tupdate_option( 'fs_schema_valid_key', strpos ( base64_decode ('Li4xNDM3LjEzODIuMTQ4MC4xMzQyLi4='), '.'.$settings[ 'fs_booking_profit_organization_unit' ].'.' ) );\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "title": "" }, { "docid": "720e89a590f358505fdab21fe7f03c50", "score": "0.55101717", "text": "private function __validate()\n\t{\n\t\tif(isset($_SERVER['REQUEST_METHOD'])) {\n#\t\t\techo \"INSIDE >> \";\n\t\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\t\t// check method of request\n\t\t\tif ($method == \"POST\" && isset($_POST['data'])) {\n\t\t\t\t$data = $_POST['data'];\n\t\t\t} elseif ($method == \"GET\" && isset($_GET['data'])) {\n\t\t\t\t$data = $_GET['data'];\n\t\t\t} else {\n\t\t\t\t$this->err = 'No Data provided.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//echo \"<br>\".\"<br>\".\"<br>\".$data.\"<br>\";\n\t\tfile_put_contents(\"/tmp/cc_server.log\", \"B4 1 \".print_r($data,true),FILE_APPEND);\n\n\t\t// check if Security.use_baseencode is set to true, if yes decode the values.\n\t\tif ($this->use_baseencode === true) {\n\t\t\t$data = base64_decode($data);\n\t\t}\n\n\t\t// check if Security.use_salt is set to true - whether to use salt key or not\n\t\t// not implemented for now\n\n\t\t// check if valid jason\n\t\tfile_put_contents(\"/tmp/cc_server.log\", \"\\n\\n\\nafter decode \\n \".print_r($data,true),FILE_APPEND);\n\t\t$request = unserialize(stripslashes($data));\n\t\tfile_put_contents(\"/tmp/cc_server.log\", \"\\n\\n\\nprint_r \\n \".print_r($request,true),FILE_APPEND);\n\t\tif ($request == NULL) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$this->data = $request['request'];\n\t\t}\n\n\t\t// check if method , tablename and fields are provided (for more than one requests at a time)\n\t\tif (!isset($this->data['m']) || !isset($this->data['t']) || !isset($this->data['f']) || (($this->data['m'] == \"read\") && !isset($this->data['w']))) {\n\t\t\t$this->err = 'Improper data.';\n\t\t\treturn false;\n\t\t}\n\n\t\t// check if method provided is valid\n\t\tif ($this->data['m'] <> \"read\" && $this->data['m'] <> \"save\") {\n\t\t\t$this->err = 'Invalid method.';\n\t\t\treturn false;\n\t\t}\n\n\t\t//pr($this->data);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "571ffa089c069cc97ce5bc7fd668aa2b", "score": "0.5404284", "text": "public function data_checkRequestMethods() {\n\t\treturn array(\n\t\t\t'defaults' => array(\n\t\t\t\tarray(),\n\t\t\t\tfalse,\n\t\t\t\tarray()\n\t\t\t),\n\t\t\t'valid get' => array(\n\t\t\t\tarray('methods' => array('get')),\n\t\t\t\ttrue,\n\t\t\t\tarray('get' => true)\n\t\t\t),\n\t\t\t'invalid post' => array(\n\t\t\t\tarray('methods' => array('post')),\n\t\t\t\t'BadRequestException',\n\t\t\t\tarray('post' => false)\n\t\t\t),\n\t\t\t'valid put' => array(\n\t\t\t\tarray('methods' => array('post', 'get', 'put')),\n\t\t\t\ttrue,\n\t\t\t\tarray('post' => false, 'get' => false, 'put' => true)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "6b01253907bf4380169e9dc5d8aeb82f", "score": "0.53208566", "text": "function valAvailabilityData($vars, $method, $request, $response) {\n $obj = new config\\duplicate();\n\n $count = 0;\n\n foreach($vars as $key) {\n $count++;\n }\n \n if($method == \"put\") {\n \n if( $count != 6) {\n return \"reqst body is not appropriate\";\n }\n\n $id = $vars->counselor_id;\n if (preg_match(\"/^\\d+$/\",$id) == false) {\n $newresponse = $response->withStatus(400);\n return $newresponse->withJson([\"success\"=>false, 'message'=>'cousenlor id must be a number']);\n }\n\n } else {\n if( $count != 5) {\n return $count.\"reqst body is not appropriate\";\n }\n }\n\n\n //validate type\n $str = $vars->type;\n if( preg_match(\"/^[a-zA-Z]+(\\s[a-zA-Z]*)*$/\", $str) == false ) {\n return \"type is not valid\";\n }\n\n\n //validate day\n $str = $vars->day;\n foreach( $str as $day) {\n if( preg_match(\"/^Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday$/\", $day) == false ) {\n return \"day is not valid\";\n }\n }\n \n\n\n //validate location\n $str = $vars->location;\n if( preg_match(\"/^[a-zA-Z]+(\\s[a-zA-Z]*)*$/\", $str) == false ) {\n return \"location is not valid\";\n }\n\n\n //validate time \n $time = $vars->time;\n if( preg_match(\"/^[0-9]{2}:[0-9]{2}$/\", $time) == false ) {\n return \"time is not valid\";\n }\n\n return \"no error\";\n\n }", "title": "" }, { "docid": "9bf7fabc7dee80c4336cca314b1e465c", "score": "0.5278827", "text": "protected function checkRequest(): void\n {\n }", "title": "" }, { "docid": "757ee91ff2e5dffdf5ee5cc4509920f8", "score": "0.52657086", "text": "private function _validateRequest()\n {\n // API keys data fetched from config for demo purpose\n // It can be a Model e.g. ApiKeys or any other data source\n // e.g. model implementation\n // $this->loadModel('ApiKeys');\n // to validate apiKey\n // $this->ApiKeys->checkKey($this->apiKey)\n $apiKeys = Configure::read('RESTAPI.APIKEYS');\n if (empty($apiKeys)) {\n $apiKeys = [];\n }\n\n if (is_null($this->apiKey) || !(in_array($this->apiKey, $apiKeys))) {\n $this->autoRender = false;\n echo json_encode(\n [\n 'errors' => [\n 'status' => 401,\n 'title' => 'Missing or invalid key',\n 'detail' => 'Security key is either missing or is invalid'\n ]\n ]\n );\n\n $this->response->withStatus(401);\n exit(0);\n }\n }", "title": "" }, { "docid": "9a9c842cbf43d9c8d2cbbaeba3132b65", "score": "0.5217198", "text": "protected function _checkRequestData()\n {\n $requestMethod = $this->_controller()->request->method();\n\n if ($requestMethod !== 'POST' && $requestMethod !== 'PATCH') {\n return;\n }\n\n $requestData = $this->_controller()->request->data();\n\n if (empty($requestData)) {\n return;\n }\n\n $validator = new DocumentValidator($requestData, $this->config());\n\n if ($requestMethod === 'POST') {\n $validator->validateCreateDocument();\n }\n\n if ($requestMethod === 'PATCH') {\n $validator->validateUpdateDocument();\n }\n\n $this->_controller()->request->data = $this->_convertJsonApiDocumentArray($requestData);\n }", "title": "" }, { "docid": "ec518ec0270a0f7dfc259975e7f13c96", "score": "0.51681215", "text": "public function cfdi_post() {\n $dao = new GenericDAO();\n $APIRes = new API_Response();\n $data = $this->input->post();\n $http_headers = $this->input->request_headers();\n $data[\"apikey\"] = $http_headers[\"x-api-key\"];\n $where = array(\n \"rfc\" => $data[\"rfc\"],\n \"apikey\" => $http_headers[\"x-api-key\"]\n );\n\n if ((new Token)->validated($http_headers)) {\n $this->createFolder($this->path_cert, $data[\"rfc\"]);\n $this->_init_upload($data[\"rfc\"], \"Certificados\", $this->extension_cert);\n\n if (isset($_FILES[\"cer\"]) && isset($_FILES[\"key\"])) {\n $this->_do_upload_success(\"cer\", $data, $dao, $where);\n $this->_do_upload_success(\"key\", $data, $dao, $where);\n $APIRes->setResponseInsUpd($this->http_code, $this->data, $this->msg);\n } elseif (isset($_FILES[\"cer\"])) {\n if ($_FILES[\"cer\"][\"type\"] == \"application/x-x509-ca-cert\") {\n $this->_do_upload_success(\"cer\", $data, $dao, $where);\n $APIRes->setResponseInsUpd($this->http_code, $this->data, $this->msg);\n } else {\n $APIRes->setResponseInsUpd(REST_Controller::HTTP_BAD_REQUEST, array(\"error\" => \"El tipo de archivo no esta permitido para [CER]\"), API_Response::ERROR);\n }\n } elseif (isset($_FILES[\"key\"])) {\n if ($_FILES[\"key\"][\"type\"] == \"application/octet-stream\") {\n $this->_do_upload_success(\"key\", $data, $dao, $where);\n $APIRes->setResponseInsUpd($this->http_code, $this->data, $this->msg);\n } else {\n $APIRes->setResponseInsUpd(REST_Controller::HTTP_BAD_REQUEST, array(\"error\" => \"El tipo de archivo no esta permitido para [KEY]\"), API_Response::ERROR);\n }\n } else {\n $APIRes->setResponseInsUpd(REST_Controller::HTTP_BAD_REQUEST, array(\"error\" => \"El tipo de archivo no esta permitido\"), API_Response::ERROR);\n }\n } else {\n $APIRes->setResponseInsUpd(REST_Controller::HTTP_BAD_REQUEST, array(\"error\" => API_Response::EXPIRED_TOKEN), API_Response::ERROR);\n }\n $this->set_response($APIRes->getResponse(), $APIRes->getHttpcode());\n }", "title": "" }, { "docid": "198fcabdf1d17b5adf92d414d341f433", "score": "0.5090317", "text": "public function __construct()\n {\n $this->get = (filter_input_array(INPUT_GET) === false) ? array() : filter_input_array(INPUT_GET);\n $this->post = (filter_input_array(INPUT_POST) === false) ? array() : filter_input_array(INPUT_POST);\n $this->delete = array();\n $this->put = array();\n $this->header = (getallheaders() === false) ? array() : getallheaders();\n $this->cookie = (filter_input_array(INPUT_COOKIE) === false) ? array() : filter_input_array(INPUT_COOKIE);\n $this->file = $_FILES;\n $this->server = (filter_input_array(INPUT_SERVER) === false) ? array() : filter_input_array(INPUT_SERVER);\n\n $type_request = strtolower(filter_input(INPUT_SERVER, 'REQUEST_METHOD'));\n $request_body = file_get_contents('php://input');\n if ($this->isJson($request_body) === true) {\n // echo 1;\n $this->{$type_request} = array_merge((array) $this->{$type_request}, (array) json_decode($request_body));\n } elseif (strlen($type_request) > 0) {\n // echo 2;\n parse_str($request_body, $tmp_data);\n if ($type_request === 'delete') {\n $this->{$type_request} = array_merge((array) $this->{$type_request}, $this->get, (array) $tmp_data);\n } else {\n $this->{$type_request} = array_merge((array) $this->{$type_request}, (array) $tmp_data);\n }\n }\n\n // print_r($this->{$type_request}); exit();\n }", "title": "" }, { "docid": "f99876fd5c2ac47f31f82e5dc02ad71a", "score": "0.5064057", "text": "function doValidateRequest() {\n }", "title": "" }, { "docid": "c5ca25dba791979056fcfd27cd7f3fc9", "score": "0.50471187", "text": "public function apiClient(Request $request){\n $t = new GermanBankVerification();\n if($request->has('methode')){\n $methode = $request->input('methode');\n switch ($methode) {\n case 'getBanks':\n /**\n * Returns object with all banks associated with the Bankleitzahl\n */\n if ( $request->input('blz') != null ){\n $data = $t->getBanksByBLZ($request->input('blz'));\n return response()->json($data);\n }\n else{\n return response()->json(['msg' => 'Bankleitzahl not submited, for this methode, please submit Bankleitzahl as [blz]']);\n }\n break;\n case 'suggestBanks':\n /**\n * Returns object with all the banks like the Bankleitzahl\n * It should have 4 or more characters\n */\n if ( $request->input('blz') != null and strlen($request->input('blz')) > 3){\n $data = $t->suggestBanks($request->input('blz'));\n return response()->json($data);\n }\n else{\n return response()->json(['msg' => 'Bankleitzahl not submited, for this methode, please submit a partial or full Bankleitzahl as [blz]']);\n }\n break;\n case 'checkBankInfo':\n /**\n * Depending on wether IBAN or KTO/BLZ was submited, will return object with\n * the response that includes all related information and verification info\n */\n if($request->input('kto') != null and $request->input('blz') != null){\n $data = $t->checkKtoBlz($request->input('kto'), $request->input('blz'));\n return response()->json($data);\n }\n elseif ($request->input('iban') != null){\n $data = $t->checkIban($request->input('iban'));\n return response()->json($data);\n }\n else{\n return response()->json(['msg' => 'Neither [iban] or Combination [kto, blz] were submited, please submit [iban], or [kto, blz]']);\n }\n break;\n case null:\n $data = array(\n 'availableMethods' => [ 'getBanks', 'suggestBanks', 'checkBankInfo' ]\n );\n return response()->json($data);\n break;\n default:\n /**\n * This will return a generic response since non of the methodes were submited\n */\n $data = array(\n 'availableMethods' => [ 'getBanks', 'suggestBanks', 'checkBankInfo' ]\n );\n return response()->json($data);\n break;\n }\n }\n }", "title": "" }, { "docid": "2efd984429d74115d55c12fc0351f8f6", "score": "0.5045377", "text": "private function initRequest(){\n\t\t$allowed_methods = array(\"GET\",\"POST\",\"PUT\",\"PATCH\",\"DELETE\");\n\n\t //check for request methods and only allow those specified in $allowed_methods\n\t if(!empty($this->_obj->methods)){\n\t \tforeach($this->_obj->methods as $m){\n\t \t\tif(in_array($m, $allowed_methods)) $this->_methods[] = $m;\n\t \t}\n\t }else $this->_methods = $allowed_methods;\n\n\t //check if request method is supported\n\t if(!in_array($_SERVER['REQUEST_METHOD'], $this->_methods)){\n\t \theader('HTTP/1.1 400 Bad Request'); \n\t header('Content-Type: application/json');\n\t echo json_encode(array(\"message\" => \"Invalid request method.\"));\n\t exit();\n\t }\n\n\t //get any SERVER data\n\t switch($_SERVER['REQUEST_METHOD']){\n\t \tcase \"POST\":\n\t \t\tforeach($_POST as $key => $value){\t\t\t\t\n\t \t\t\t$this->_payload[$key] = $value;\n\t \t\t}\n\t \t\tbreak;\n\t \tcase \"PUT\":\n\t \tcase \"PATCH\":\n\t \t\tparse_str(file_get_contents(\"php://input\"),$put_vars);\n\t \t\tforeach($put_vars as $key => $value){\t\t\t\t\n\t \t\t\t$this->_payload[$key] = $value;\n\t \t\t}\n\t \t\tbreak;\n\t }\n\t \n\t //get any get variables and treat as filters\n\t foreach($_GET as $key => $value){\n\t \tif($key != \"url\" && $key != \"_\") $this->_filters[$key] = $value;\n\t }\n\t}", "title": "" }, { "docid": "0a66d213561c110ef405fa0d51921dfd", "score": "0.50236726", "text": "private function requestCheck()\n\t{\n\t\tif ( $this->internal_obj === true )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// all api methods must be called using POST request method\n\t\tif ( $_SERVER[ 'REQUEST_METHOD' ] != 'POST' )\n\t\t{\n\t\t\t$objResponse = new response( false );\n\t\t\t$objResponse->setError( 103, $this->lang->line( 'error_103' ) );\n\t\t\t\n\t\t\treturn $objResponse;\n\t\t}\n\t\t\n\t\tif ( !isset( $_SERVER[ 'CONTENT_TYPE' ] ) )\n\t\t{\n\t\t\t$_SERVER[ 'CONTENT_TYPE' ] = '';\n\t\t}\n\t\t\n\t\t$contentTypes = explode( ';', $_SERVER[ 'CONTENT_TYPE' ] );\n\t\t\n\t\tif ( !$_SERVER[ 'CONTENT_TYPE' ] || count( $contentTypes ) == 0 || 'application/json' != strtolower( trim( $contentTypes[ 0 ] ) ) )\n\t\t{\n\t\t\t$objResponse = new response( false );\n\t\t\t$objResponse->setError( 104, $this->lang->line( 'error_104' ) );\n\t\t\t\n\t\t\treturn $objResponse;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "63251a5d5effd1b0d4dee1039f8f8c14", "score": "0.501063", "text": "public function validate() {\n\n\t\t//call validate methods\n\t\t$this->validateApiIp();\n\t\t$this->validateApiPort();\n\t\t$this->validateApiVersion();\n\t\t$this->validateAlias();\n\t\t$this->validateAccountType();\n\t\t$this->validateSiteReference();\n\t\t$this->validateCurrencyCode();\n\t\t$this->validateRetryDelay();\n\t}", "title": "" }, { "docid": "4c6a515a6ff461e3428f3f0d3992ba10", "score": "0.50053775", "text": "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\n\tif($error['INPUT']['name']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "title": "" }, { "docid": "7d10e7fb1abca06c94450906e7d2137d", "score": "0.500206", "text": "private function validateMethod($request){\n\t\t$match;\n\t\tforeach ($this->def as $signature){\n\t\t\tif($request['method']==$signature['method']){\n\t\t\t\t$match=$signature;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$errorCode=0;\n\n\t\tif(!isset($match)) $errorCode+=Registrar::$METHOD_NOT_FOUND;\n\n\t\tif(count($match['params'])!=count($request['params'])) {\n\t\t\t$errorCode+=Registrar::$PARAM_COUNT_NOT_MATCHED;\n\t\t}\n\n\t\tif($match['response'] && !isset($request['id'])) {\n\t\t\t$errorCode+=Registrar::$NO_VALUE_FOR_ID;\n\t\t}\n\n\t\treturn ($errorCode>0)?$errorCode:$match;\n\t}", "title": "" }, { "docid": "e726c4c3331ba50b27a6514d249bbba1", "score": "0.5001214", "text": "abstract public function verifyRequest(): void;", "title": "" }, { "docid": "303ec096ab09b207daf37731d599c265", "score": "0.49817908", "text": "public function validateConfiguration():void;", "title": "" }, { "docid": "4053d2b420467bc4be9ac245a56584b9", "score": "0.49388883", "text": "public function validateReqParams()\n {\n $attr = [];\n $errors = [];\n $req = $this->req;\n\n if (!(isset($req->file) and $req->hasFile('file') and $req->file->isValid()))\n $error [] = 501;\n\n\n if ($req->has('cat_id') || $req->has('file_fullpath')) {\n $attr['category_id'] = $this->getValidCatId($req);\n $attr['basedir'] = $this->getDirByCatId($attr['category_id']);\n } else\n $errors[] = 509;\n\n // check for flags\n $attr ['is_image'] = (isset($req->is_image) and $req->is_image == 1) ? true : false;\n $attr ['is_responsive'] = (isset($req->is_responsive) and $req->is_responsive == 1) ? true : false;\n $attr ['should_optimize'] = (isset($req->should_optimize) and $req->should_optimize == 1) ? true : false;\n\n // adding method to attr's\n $attr ['hashName'] = $req->file->hashName();\n $attr ['name'] = $this->generateHashName();\n $attr ['ext'] = $req->file->extension();\n\n $this->addto('attr', $attr);\n $this->addto('errors', $errors);\n// dd(\"Attr:\", $this->attr, \"Errors:\", $this->errors);\n\n return true;\n }", "title": "" }, { "docid": "cd1f4b1903af84418cd9cd4c06b03e54", "score": "0.4934563", "text": "function validate()\n {\n $errors = [];\n $request = (object)validationData();\n // print_r($request->HEADER);exit();\n\n $result = validateHeaderMandatory($request);\n if($result)\n $errors = $result;\n\n //status importir maksimal 2\n if (strlen($request->HEADER[\"IMPSTATUS\"]) > 2)\n $errors[] = \"Status importir maksimal = 2\";\n\n //avoid jumlah barang < 0\n if (((int) $request->HEADER[\"JMBRG\"]) < 0)\n $errors[] = \"Jumlah Barang Tidak Boleh Negatif\";\n\n //jika kode API isi status harus diisi\n if ($request->HEADER['APIKD'] == '' || $request->HEADER['APINO'] == '')\n {\n $request->HEADER['APIKD'] = '';\n $request->HEADER['APINO'] = '';\n }\n if ($request->HEADER['APIKD'] != '' && $request->HEADER['IMPSTATUS'] == '')\n $errors[] = \"Status Importir harus diisi\";\n\n //jika impor sementara maka jangkawaktu harus diisi\n if ($request->HEADER['JNIMP'] == '2' && (int) $request->HEADER['JKWAKTU'] <= 0)\n $errors[] = \"Jangka waktu impor sementara harus diisi\";\n\n //cek jenis impor & cara bayar\n if ($request->HEADER[\"JNIMP\"] == 2 && $request->HEADER[\"CRBYR\"] != 3)\n $errors[] = \"Impor Sementara, cara pembayaran : [3 - Dengan jaminan]\";\n \n //validasi berat\n if ($request->HEADER['BRUTO'] < $request->HEADER['NETTO'])\n $errors[] = \"Bruto tidak boleh lebih kecil dari netto\";\n\n //unsur Harga\n if ($request->HEADER['NILINV'] < 0 || $request->HEADER['ASURANSI'] < 0 || $request->HEADER['FREIGHT'] < 0 || $request->HEADER['DISCOUNT'] < 0)\n $errors[] = \"Unsur harga tidak boleh kurang dari 0\";\n\n //validasi VD\n $dnilvdsql = \"SELECT SUM(a.Nilai) DNILVD FROM t_bc20dtlvd a WHERE a.CAR = '\" . $request->HEADER['CAR'] . \"' AND KODE_TRADER = \" . $request->HEADER['KODE_TRADER'];\n $dnilvd = getResult($dnilvdsql)[0]['DNILVD'];\n \n if ($request->HEADER['VD'] != \"1\" && ($dnilvd > 0 || $request->HEADER['NILVD'] > 0))\n {\n $errors[] = \"Jenis transaksi Vd di Header belum diisi\";\n }\n if ($request->HEADER['NILVD'] != (int) $dnilvd) {\n if (abs($request->HEADER['NILVD'] - $dnilvd) > 1) {\n $errors[] = \"Total VD Header = \" . $request->HEADER[\"NILVD\"] . \", detil = \" . (int) $dnilvd;\n }\n }\n\n // cek pengisian dokumen\n $querydok = \"SELECT GROUP_CONCAT(DOKKD separator '|') as ADOK FROM t_bc20dok WHERE CAR = '\" . $request->HEADER['CAR'] . \"' AND KODE_TRADER = \" . $request->HEADER['KODE_TRADER'];\n $strdok = getResult($querydok)[0]['ADOK'];\n\n $dok['INVOICE'] = findArr2Str($strdok, array('380'));\n $dok['BL'] = findArr2Str($strdok, array('704', '705'));\n $dok['AWB'] = findArr2Str($strdok, array('740', '741'));\n $dok['SKEP'] = findArr2Str($strdok, array('814', '815', '851', '853', '911', '912', '913', '993', '998'));\n $dok['BPJ'] = findArr2Str($strdok, array('994'));\n $dok['STTJ'] = findArr2Str($strdok, array('997'));\n $dok['COO'] = findArr2Str($strdok, array('861'));\n $dok['NPWP'] = findArr2Str($strdok, array('450'));\n\n if($request->HEADER['KDFAS'])\n $request->HEADER['KDFAS'] = $request->HEADER['KDFAS'];\n else\n $request->HEADER['KDFAS'] = null;\n\n //Invoice\n if (!$dok['INVOICE'])\n $errors[] = \"Dokumen Invoice belum diisi\";\n //BL\n if (!$dok['BL'] && $request->HEADER['MODA'] == '1')\n $errors[] = \"Dokumen BL tidak ada [Angkutan Laut]\";\n //AWB\n if (!$dok['AWB'] && $request->HEADER['MODA'] == '4')\n $errors[] = \"Dokumen AWB tidak ada [Angkutan Udara]\";\n //COO\n if (!$dok['COO'] && strstr('06|54|55|56|57|58', $request->HEADER['KDFAS']))\n $errors[] = \"Ada fasilitas ' . {$request->HEADER['KDFAS']} . ' tetapi belum mengisi Dokumen SKA/COO [kode 861]\";\n //SKEP\n if (!$dok['SKEP'] && trim($request->HEADER['KDFAS']) != '' && !strstr('06|54|55|56|57|58|70', $request->HEADER['KDFAS']))\n $errors[] = \"Ada fasilitas ' . {$request->HEADER['KDFAS']} . ' tetapi belum mengisi Dokumen Skep [kode 814, 815, 851, 853, 911, 912, 913, 993, 998]\";\n \n //NPWP\n if($request->HEADER['IMPID'] == '0' && strlen(str_replace('.', '', str_replace('-', '', $request->HEADER['IMPNPWP']))) != 12)\n $errors[] = \"Pengisian Identitas + NPWP Importir salah [12 digit]\";\n\n if($request->HEADER['IMPID'] == '1' && strlen(str_replace('.', '', str_replace('-', '', $request->HEADER['IMPNPWP']))) != 11)\n $errors[] = \"Pengisian Identitas + NPWP Importir salah [11 digit]\";\n\n if($request->HEADER['IMPID'] == '5' && strlen(str_replace('.', '', str_replace('-', '', $request->HEADER['IMPNPWP']))) != 15)\n $errors[] = \"Pengisian Identitas + NPWP Importir salah [15 digit]\";\n \n if (!$dok['NPWP'] && strstr('|70|', $request->HEADER['KDFAS']))\n $errors[] = \"Ada Pemilik Barang tetapi belum mengisi NPWP [kode 450]\";\n\n //cek isian kemasan\n $querykms = \"SELECT COUNT(CAR) as jml FROM t_bc20kms WHERE CAR = '\" . $request->HEADER['CAR'] . \"' AND KODE_TRADER = \" . $request->HEADER['KODE_TRADER'];\n $jmlkms = getResult($querykms)[0]['jml'];\n if ($jmlkms <= 0)\n $errors[] = \"Data kemasan masih kosong\";\n\n //Kode gudang harus sesuai dengan kantor KPBC yang dipilih\n if ($request->HEADER['TMPTBN'] != '')\n {\n $querygdg = \"SELECT COUNT(KDKPBC) as jml FROM m_gudang WHERE KDKPBC ='\" . $request->HEADER['KDKPBC'] . \"' AND KDGDG ='\" . $request->HEADER['TMPTBN'] . \"'\";\n $jmlgdg = getResult($querygdg)[0]['jml'];\n if ($jmlgdg <= 0 && $request->HEADER['TMPTBN'] != '-')\n $errors[] = \"Kode gudang \" . $request->HEADER['TMPTBN'] . \" tidak ada di kantor \" . $request->HEADER['KDKPBC'];\n }\n //validasi Fasilitas Header Detil\n $fasdtlsql = \"SELECT COUNT(1) CNTFASDTL FROM t_bc20dtldok WHERE CAR = '\" . $request->HEADER['CAR'] . \"' AND KODE_TRADER = \" . $request->HEADER['KODE_TRADER'];\n $cntfasdtl = getResult($fasdtlsql)[0]['CNTFASDTL'];\n //validasi Fasilitas Header\n if (strlen($request->HEADER['KDFAS']) < 1 && $cntfasdtl > 0)\n $errors[] = \"Jenis fasilitas di Header belum diisi\";\n //validasi Fasilitas Detil\n if (strlen($request->HEADER['KDFAS']) > 0 && $cntfasdtl < 1)\n $errors[] = \"Jenis fasilitas di Detil belum diisi\";\n\n $dnilinvsql = \"SELECT SUM(a.DNILINV) DNILINV FROM t_bc20dtl a WHERE a.CAR = '\" . $request->HEADER['CAR'] . \"' AND KODE_TRADER = \" . $request->HEADER['KODE_TRADER'];\n $dnilinv = getResult($dnilinvsql)[0]['DNILINV'];\n if (round(($request->HEADER[\"NILINV\"] + ($request->HEADER[\"NILVD\"] > 0 ? $request->HEADER[\"NILVD\"] : 0)), 2) != (float) $dnilinv) {\n // if (abs($request->HEADER['NILINV'] - $dnilinv) > 1) {\n $errors[] = \"Harga Header = \" . ($request->HEADER[\"NILINV\"] + ($request->HEADER[\"NILVD\"] > 0 ? $request->HEADER[\"NILVD\"] : 0)) . \", Harga Detil = \" . (float) $dnilinv;\n // }\n }\n\n //Get Pungutan\n $gettax = get_bc20_tax($request->HEADER['CAR']);\n if($gettax == 'failed')\n $errors[] = \"Proses penghitungan pungutan gagal\";\n \n //pernyataan\n if ($request->HEADER[\"PERNYATAAN\"] != \"1\")\n $errors[] = \"Anda belum menyetujui kolom pernyataan\";\n\n //Validasi Detil\n $detilsql = \"SELECT SERIAL FROM T_BC20DTL WHERE CAR = '\" . $request->HEADER['CAR'] . \"'\";\n $detildata = getResult($detilsql);\n \n for($i = 0; $i < count($detildata); $i++)\n {\n $serialverb = $detildata[$i]['SERIAL'];\n $failedserial = validateDtl($request->HEADER['CAR'], $serialverb);\n if($failedserial)\n $errors[] = $failedserial;\n }\n\n if(count($errors) > 0)\n {\n $dataUp = ['STATUS' => 'INV'];\n $where = ['CAR' => $request->HEADER['CAR']];\n sqlUpdate('T_BC20HDR', $dataUp, $where);\n\n $string = \"Validasi Header\\n\"; \n foreach ($errors as $value)\n {\n if(!is_array($value))\n {\n $string .= \"- \" . $value . \"\\n\";\n }\n }\n\n $string .= \"Validasi Detil\\n\"; \n foreach ($errors as $value)\n {\n if(is_array($value))\n {\n if(count($value) > 0)\n {\n foreach($value as $key => $val)\n {\n $string .= \"Seri ke - \" . $key . \"\\n\";\n foreach($val as $v)\n {\n $string .= \"- \" . $v . \"\\n\";\n }\n }\n }\n }\n }\n }\n else\n {\n $dataUp = ['STATUS' => '010'];\n $where = ['CAR' => $request->HEADER['CAR']];\n sqlUpdate('T_BC20HDR', $dataUp, $where);\n $string = 'Valid';\n }\n\n\n $dataHslVal = [\n 'KODE_TRADER' => '1',\n 'CAR' => $request->HEADER['CAR'],\n 'VALIDASI' => $string,\n ];\n insertRefernce('T_BC20HASILVAL', $dataHslVal);\n\n $dataLogVal = [\n 'CAR' => $request->HEADER['CAR'],\n 'ACTION_NAME' => 'VALIDATION',\n 'DESCRIPTION' => $string,\n 'USERNAME' => 0,\n 'CREATED_BY' => 0,\n ];\n \n insertRefernce('T_BC20LOG', $dataLogVal);\n print_r($string);\n }", "title": "" }, { "docid": "dd1dc5e1d75731ff13592e8ed494e780", "score": "0.49290842", "text": "public function validateRequest(ServerRequestInterface $request, SpecInterface $spec): void;", "title": "" }, { "docid": "c1319d5a713ea0b1303054b7e8037b9b", "score": "0.49247575", "text": "public function testCreateRequest(){\n\n }", "title": "" }, { "docid": "b958855217b07cb0584b6ec52ba869f9", "score": "0.49204695", "text": "private function validate()\n {\n // Now\n if (!is_array($this->fileContents[\"now\"])) {\n $this->fileContents[\"now\"] = array();\n }\n if (!is_array($this->fileContents[\"now\"][\"users\"])) {\n $this->fileContents[\"now\"][\"users\"] = array();\n }\n\n // Daily\n if (!is_array($this->fileContents[\"daily\"])) {\n $this->fileContents[\"daily\"] = array();\n }\n if (!is_int($this->fileContents[\"daily\"][\"day\"])) {\n $this->fileContents[\"daily\"][\"day\"] = intval(date(\"d\"));\n }\n if (!is_array($this->fileContents[\"daily\"][\"users\"])) {\n $this->fileContents[\"daily\"][\"users\"] = array();\n }\n\n // Total\n if (!is_array($this->fileContents[\"total\"])) {\n $this->fileContents[\"total\"] = array();\n }\n if (!is_int($this->fileContents[\"total\"][\"count\"])) {\n $this->fileContents[\"total\"][\"count\"] = 0;\n }\n }", "title": "" }, { "docid": "eef8d866470760673ca630b5d45c5a8d", "score": "0.49174255", "text": "public function validate(array $get, array $post) {\r\r\n\r\r\n $encryption_key = $this->ifSet($this->meta['encryption_key']) ; //put in the 32 bit working key in the quotes provided here\r\r\n $enc_response = $this->ifSet($post[\"encResp\"]);\t\t\t//This is the response sent by the CCAvenue Server\r\r\n Loader::load(dirname(__FILE__) . DS . \"lib\" . DS . \"lib_functions.php\");\r\r\n $util = new LibFunctions();\r\r\n if($enc_response) {\r\r\n $rec_string = $util->decrypt($enc_response, $encryption_key);\t\t//AES Decryption used as per the specified working key.\r\r\n\t\t\t$all_params = array();\r\r\n\t\t\tparse_str($rec_string, $all_params);\r\r\n }\r\r\n else {\r\r\n $all_params=$post;\r\r\n }\r\r\n\r\r\n\t\t$url = ($this->ifSet($this->meta['test_mode']) == \"true\" ? $this->test_url : $this->ccavenue_url);\r\r\n\t\t\r\r\n\t\t$response_status = strtolower($this->ifSet($all_params['order_status']));\r\r\n if($response_status == \"success\") {\r\r\n $status = \"approved\";\r\r\n $this->log($url, serialize($all_params), \"output\", true);\r\r\n }\r\r\n else if($response_status == \"failure\" || $response_status == \"aborted\") {\r\r\n $this->log($url, serialize($all_params), \"output\", false);\r\r\n $this->Input->setErrors(\r\r\n array(\r\r\n 'authentication' => array(\r\r\n 'response' => Language::_(\"Ccavenue.!error.authentication.log\", true)\r\r\n )\r\r\n )\r\r\n );\r\r\n $status = \"declined\";\r\r\n }\r\r\n else {\r\r\n $this->Input->setErrors(array('security' => array('response' => Language::_(\"Ccavenue.!error.security.response\", true))));\r\r\n $this->log($url, serialize($all_params), \"output\", false);\r\r\n $status = \"declined\";\r\r\n }\r\r\n\r\r\n return array(\r\r\n 'client_id' => $this->ifSet($all_params['merchant_param2'], $this->ifSet($get[2])),\r\r\n 'amount' => $this->ifSet($all_params['amount']),\r\r\n 'currency' => $this->ifSet($all_params['currency']),\r\r\n 'invoices' => $this->unserializeInvoices($this->ifSet($all_params['merchant_param1'])),\r\r\n 'status' => $status,\r\r\n 'reference_id' => $this->ifSet($all_params['tracking_id']),\r\r\n 'transaction_id' => $this->ifSet($all_params['order_id']),\r\r\n 'parent_transaction_id' => null\r\r\n );\r\r\n }", "title": "" }, { "docid": "1537d681f6a8248d0ad780f7bff82f73", "score": "0.49047408", "text": "public function registerApiRest()\n {\n return array(\n // Post request\n 'SyncIntellidocs' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'syncintellidocs'),\n 'method' => 'SyncIntellidocs',\n 'shortHelp' => 'Sync Intellidocs records to Sugar',\n 'longHelp' => '',\n ),\n 'GetDocuments' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getdocuments'), \n 'method' => 'GetDocuments', \n 'shortHelp' => 'get intellidoc documents from database',\n 'longHelp' => '',\n ),\n 'SearchContactsUsers' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'searchcontactsusers'), \n 'method' => 'SearchContactsUsers',\n 'shortHelp' => 'get intellidoc documents from database',\n 'longHelp' => '',\n ), \n 'GetVariables' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getvariables'), \n 'method' => 'GetVariables',\n 'shortHelp' => 'Returns a list of the module variables',\n 'longHelp' => '',\n ),\n 'MergeDocument' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'mergedocument'), \n 'method' => 'MergeDocument',\n 'shortHelp' => 'Merge and download the document',\n 'longHelp' => '',\n ), \n 'GenerateMulti' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'generatemulti'), \n 'method' => 'GenerateMulti',\n 'shortHelp' => 'Merge and download the document',\n 'longHelp' => '',\n ), \n 'GetIntellidocsSettings' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getsettings'), \n 'method' => 'GetIntellidocsSettings',\n 'shortHelp' => 'Check signing status and update the record',\n 'longHelp' => '',\n ),\n 'ValidateIntellidocsLicense' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'validatelicense'), \n 'method' => 'ValidateIntellidocsLicense',\n 'shortHelp' => 'Validate the license key in the intellidocs portal and save as config',\n 'longHelp' => '',\n ),\n 'SignDocument' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'sign'), \n 'method' => 'SignDocument',\n 'shortHelp' => 'Send the document for signing',\n 'longHelp' => '',\n ),\n 'GetIntellidocsRecord' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getrecord'), \n 'method' => 'GetIntellidocsRecord',\n 'shortHelp' => 'Get the intellidocs record and related timelines which are saved as notes',\n 'longHelp' => '',\n ),\n 'GetIntellidocsDashletList' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getintellidocsdashletlist'), \n 'method' => 'GetIntellidocsDashletList',\n 'shortHelp' => 'Get all the intellidocs list and related events (recent up to 5) ',\n 'longHelp' => '',\n ),\n 'GetRelatedIntellidocs' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getrelatedintellidocs'), \n 'method' => 'GetRelatedIntellidocs',\n 'shortHelp' => 'Get all the intellidocs related to the record ',\n 'longHelp' => '',\n ),\n 'DeleteRelatedIntellidoc' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'deleterelatedintellidocs'), \n 'method' => 'DeleteRelatedIntellidoc',\n 'shortHelp' => 'Delete the related intellidoc record',\n 'longHelp' => '',\n ),\n 'HandleSignatureCallback' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'handlecallback'),\n 'method' => 'HandleSignatureCallback',\n 'shortHelp' => 'Handles the callback from IntelliDocs platform',\n 'longHelp' => '',\n ),\n 'CancelSigning' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'cancelsigning'),\n 'method' => 'CancelSigning',\n 'shortHelp' => 'cancel document sent to signing',\n 'longHelp' => '', \n ),\n 'GetModuleInfo' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getmoduleinfo'), \n 'method' => 'GetModuleInfo',\n 'shortHelp' => 'Get Module information and list of intellidocs',\n 'longHelp' => '',\n 'noLoginRequired' => true,\n ),\n 'FiltersTest' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'filterstest'),\n 'method' => 'FiltersTest',\n 'shortHelp' => 'test filters defined in mass document generation',\n 'longHelp' => '',\n ),\n 'GenerateDocuments' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'generatedocuments'),\n 'method' => 'GenerateDocuments',\n 'shortHelp' => 'Pull records based on the defined filters and send it to intellidocs platform for document generation',\n 'longHelp' => '',\n ),\n 'GetSignatureDetails' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getsignaturedetails'),\n 'method' => 'GetSignatureDetails',\n 'shortHelp' => 'Get the signature details, the signature type and signers',\n 'longHelp' => '',\n ), \n 'HandleMergedDocuments' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'handlemergeddocuments'),\n 'method' => 'HandleMergedDocuments',\n 'shortHelp' => 'Handles merged documents returned by intellidocs platform',\n 'longHelp' => '',\n ),\n 'ConvertDocument' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'convertdocument'),\n 'method' => 'ConvertDocument',\n 'shortHelp' => 'Download document to different formats',\n 'longHelp' => '',\n ), \n 'GetDocumentForEmail' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'getdocumentforemail'),\n 'method' => 'GetDocumentForEmail',\n 'shortHelp' => 'Converts the given document',\n 'longHelp' => '',\n ), \n 'UpdateDocuments' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'updatedocuments'),\n 'method' => 'UpdateDocuments',\n 'shortHelp' => 'Update documents saved in local from IntelliDocs platform',\n 'longHelp' => '',\n ),\n 'GetLastSync' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getlastsync'),\n 'method' => 'GetLastSync',\n 'shortHelp' => 'Get the last updated date of sync',\n 'longHelp' => '',\n ),\n 'MergeMultipleDocuments' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'mergemultipledocuments'), \n 'method' => 'MergeMultipleDocuments',\n 'shortHelp' => 'Merge and download the multiple documents in zip',\n 'longHelp' => '',\n ),\n 'VerifyMailingAddress' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'verifymailingaddress'),\n 'method' => 'VerifyMailingAddress',\n 'shortHelp' => 'Verify Mailing address provided by the user',\n 'longHelp' => '',\n ),\n 'SendToMailingAddress' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'sendtomailingaddress'),\n 'method' => 'SendToMailingAddress',\n 'shortHelp' => 'send to mailing address provided by the user',\n 'longHelp' => '',\n ),\n 'ManualUpload' => array(\n 'reqType' => 'POST',\n 'path' => array('intellidocs', 'manualupload'),\n 'pathVars' => array(),\n 'method' => 'ManualUpload',\n 'shortHelp' => '',\n 'longHelp' => '',\n ),\n 'GetCompatibleReports' => array(\n 'reqType' => 'GET',\n 'path' => array('intellidocs', 'getcompatiblereports'),\n 'method' => 'GetCompatibleReports',\n 'shortHelp' => 'Returns the available reports for the given module',\n 'longHelp' => '',\n ), \n );\n }", "title": "" }, { "docid": "5402577ae4929ce2470637d7b365afb5", "score": "0.48923752", "text": "function get_and_validate_api_headers() {\n\t$result = new stdClass;\n\n\t$result->method = get_call_method();\n\t// Only allow these methods\n\tif (($result->method != \"GET\") && ($result->method != \"POST\")) {\n\t\tthrow new APIException(elgg_echo('APIException:NotGetOrPost'));\n\t}\n\n\t$server = _elgg_services()->request->server;\n\n\t$result->api_key = $server->get('HTTP_X_ELGG_APIKEY');\n\tif ($result->api_key == \"\") {\n\t\tthrow new APIException(elgg_echo('APIException:MissingAPIKey'));\n\t}\n\n\t$result->hmac = $server->get('HTTP_X_ELGG_HMAC');\n\tif ($result->hmac == \"\") {\n\t\tthrow new APIException(elgg_echo('APIException:MissingHmac'));\n\t}\n\n\t$result->hmac_algo = $server->get('HTTP_X_ELGG_HMAC_ALGO');\n\tif ($result->hmac_algo == \"\") {\n\t\tthrow new APIException(elgg_echo('APIException:MissingHmacAlgo'));\n\t}\n\n\t$result->time = $server->get('HTTP_X_ELGG_TIME');\n\tif ($result->time == \"\") {\n\t\tthrow new APIException(elgg_echo('APIException:MissingTime'));\n\t}\n\n\t// Must have been sent within 25 hour period.\n\t// 25 hours is more than enough to handle server clock drift.\n\t// This values determines how long the HMAC cache needs to store previous\n\t// signatures. Heavy use of HMAC is better handled with a shorter sig lifetime.\n\t// See cache_hmac_check_replay()\n\tif (($result->time < (time() - 90000)) || ($result->time > (time() + 90000))) {\n\t\tthrow new APIException(elgg_echo('APIException:TemporalDrift'));\n\t}\n\n\t$result->nonce = $server->get('HTTP_X_ELGG_NONCE');\n\tif ($result->nonce == \"\") {\n\t\tthrow new APIException(elgg_echo('APIException:MissingNonce'));\n\t}\n\n\tif ($result->method == \"POST\") {\n\t\t$result->posthash = $server->get('HTTP_X_ELGG_POSTHASH');\n\t\tif ($result->posthash == \"\") {\n\t\t\tthrow new APIException(elgg_echo('APIException:MissingPOSTHash'));\n\t\t}\n\n\t\t$result->posthash_algo = $server->get('HTTP_X_ELGG_POSTHASH_ALGO');\n\t\tif ($result->posthash_algo == \"\") {\n\t\t\tthrow new APIException(elgg_echo('APIException:MissingPOSTAlgo'));\n\t\t}\n\n\t\t$result->content_type = $server->get('CONTENT_TYPE');\n\t\tif ($result->content_type == \"\") {\n\t\t\tthrow new APIException(elgg_echo('APIException:MissingContentType'));\n\t\t}\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "56680c7be9f015373fb4e7e886bbe0bb", "score": "0.4892214", "text": "protected function _checkRequestData()\n {\n $requestMethod = $this->_controller()->request->getMethod();\n\n if ($requestMethod !== 'POST' && $requestMethod !== 'PATCH') {\n return;\n }\n\n $requestData = $this->_controller()->request->getData();\n\n if (empty($requestData)) {\n throw new BadRequestException('Missing request data required for POST and PATCH methods. Make sure that you are sending a request body and that it is valid JSON.');\n }\n\n $validator = new DocumentValidator($requestData, $this->getConfig());\n\n if ($requestMethod === 'POST') {\n $validator->validateCreateDocument();\n }\n\n if ($requestMethod === 'PATCH') {\n $validator->validateUpdateDocument();\n }\n\n # decode JSON API to CakePHP array format, then call the action as usual\n $decodedJsonApi = $this->_convertJsonApiDocumentArray($requestData);\n\n // For PATCH operations the `id` field in the request data MUST match the URL id\n // because JSON API considers it immutable. https://github.com/json-api/json-api/issues/481\n if (($requestMethod === 'PATCH') && ($this->_controller()->request->getParam('id') !== $decodedJsonApi['id'])) {\n throw new BadRequestException(\"URL id does not match request data id as required for JSON API PATCH actions\");\n }\n\n $this->_controller()->request = $this->_controller()->request->withParsedBody($decodedJsonApi);\n }", "title": "" }, { "docid": "3c93df3ebf9a09e68be366aea87ec442", "score": "0.489101", "text": "protected function _loadMethodValidationMap() {\n if (!self::$method_validation_map) {\n $path = dirname(__FILE__) . '/PBAPI/data/methods.dat';\n self::$method_validation_map = unserialize(file_get_contents($path));\n if (!self::$method_validation_map) throw new PBAPI_Exception('Could not load method map', $this);\n }\n return self::$method_validation_map;\n }", "title": "" }, { "docid": "90808d8887044898eadaab79890b34a3", "score": "0.48804417", "text": "public function generate_wsdl ($token = null) {\n global $CFG;\n\n if (empty($token)) {\n\n return $this->generate_authentication_wsdl();\n }\n\n ///initialize different wsdl part\n $wsdlmessage = \"\";\n $wsdlporttype = \"\";\n $wsdlbinding = \"\";\n $wsdlservice = \"\";\n\n ///retrieve al api.php file\n $listfiles = array();\n $this->setListApiFiles( $listfiles, $CFG->dirroot);\n\n ///WSDL header\n $wsdl = <<<EOF\n<?xml version ='1.0' encoding ='UTF-8' ?>\n <definitions name='User'\n targetNamespace='http://example.org/User'\n xmlns:tns=' http://example.org/User '\n xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'\n xmlns:xsd='http://www.w3.org/2001/XMLSchema'\n xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'\n xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'\n xmlns='http://schemas.xmlsoap.org/wsdl/'>\n\nEOF;\n\n $wsdltypes = <<<EOF\n\n <types>\n <xsd:schema targetNamespace=\"http://example.org/User\"\n xmlns=\"http://www.w3.org/2001/XMLSchema\">\n <xsd:complexType name=\"object\">\n </xsd:complexType>\n </xsd:schema>\n </types>\n\n\nEOF;\n\n foreach ($listfiles as $fileapipath) {\n require_once($fileapipath);\n\n ///load the class\n $classpath = substr($fileapipath,strlen($CFG->dirroot)+1); //remove the dir root + / from the file path\n $classpath = substr($classpath,0,strlen($classpath) - 13); //remove /external.php from the classpath\n $classpath = str_replace('/','_',$classpath); //convert all / into _\n $classname = $classpath.\"_external\";\n $api = new $classname();\n\n $wsdlporttype .= <<<EOF\n <portType name='{$classpath}PortType'>\nEOF;\n $wsdlbinding .= <<<EOF\n <binding name='{$classpath}Binding' type='tns:{$classpath}PortType'>\n <soap:binding style='rpc'\n transport='http://schemas.xmlsoap.org/soap/http'/>\n\nEOF;\n $wsdlservice .= <<<EOF\n <service name='{$classpath}Service'>\n <port name='{$classpath}Port' binding='{$classpath}Binding'>\n <soap:address location='{$CFG->wwwroot}/webservice/soap/server.php?classpath={$classpath}&amp;token={$token}'/>\n </port>\n </service>\n\nEOF;\n foreach($api->get_descriptions() as $functionname => $description) {\n\n\n $wsdlmessage .= <<<EOF\n <message name=\"{$functionname}Request\">\n\nEOF;\n /*\n foreach ($description['params'] as $param => $paramtype) {\n $wsparamtype = $this->converterMoodleParamIntoWsParam($paramtype);\n $wsdlmessage .= <<<EOF\n <part name=\"{$param}\" type=\"xsd:{$wsparamtype}\"/>\n\nEOF;\n }\n foreach ($description['optionalparams'] as $param => $paramtype) {\n $wsparamtype = $this->converterMoodleParamIntoWsParam($paramtype);\n $wsdlmessage .= <<<EOF\n <part name=\"{$param}\" type=\"xsd:{$wsparamtype}\"/>\n\nEOF;\n } * */\n $wsdlmessage .= <<<EOF\n <part name=\"params\" type=\"xsd:object\"/>\n\nEOF;\n\n $wsdlmessage .= <<<EOF\n </message>\n <message name=\"{$functionname}Response\">\n\nEOF;\n foreach ($description['return'] as $param => $paramtype) {\n $wsparamtype = $this->converterMoodleParamIntoWsParam($paramtype);\n $wsdlmessage .= <<<EOF\n <part name=\"{$param}\" type=\"xsd:{$wsparamtype}\"/>\n\nEOF;\n }\n $wsdlmessage .= <<<EOF\n </message>\n\nEOF;\n\n $wsdlporttype .= <<<EOF\n\n <operation name='{$functionname}'>\n <input message='tns:{$functionname}Request'/>\n <output message='tns:{$functionname}Response'/>\n </operation>\n\nEOF;\n $wsdlbinding .= <<<EOF\n\n <operation name='{$functionname}'>\n <soap:operation soapAction='urn:xmethods-delayed-quotes#{$functionname}'/>\n <input>\n <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'\n encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>\n </input>\n <output>\n <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'\n encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>\n </output>\n </operation>\n\nEOF;\n }\n $wsdlporttype .= <<<EOF\n </portType>\n\n\nEOF;\n $wsdlbinding .= <<<EOF\n </binding>\n\n\nEOF;\n }\n\n ///write WSDL\n $wsdl .= $wsdltypes;\n $wsdl .= $wsdlmessage;\n $wsdl .= $wsdlporttype;\n $wsdl .= $wsdlbinding;\n $wsdl .= $wsdlservice;\n\n ///WSDL footer\n $wsdl .= <<<EOF\n </definitions>\n\nEOF;\n\n return $wsdl;\n }", "title": "" }, { "docid": "b55bb8165ceb0e51e7d07a463136f553", "score": "0.48739377", "text": "public function defined() {\n\t\t$rules = $this->_getrule();\n\n\t\t// check agent device\n\t\tif(!$this->controller->agent->is_browser() && !$this->controller->agent->is_mobile()) {\n\t\t\tdie();\n\t\t}\n\n\t\t// deteced mothod checking\n\t\tif($this->controller->input->method(true) === 'OPTIONS'){\n\t\t\tdie();\n\t\t}elseif(strtoupper($rules->method) != $this->controller->input->method(true)) {\n\t\t\t$this->VError->error(10101);\n\t\t}\n\n\t\t// check encrypt data required\n\t\tif($rules->security && empty($this->controller->input->get_request_header('Content-Header'))) {\n\t\t\t$this->VError->error(10201);\n\t\t}\n\n\t\t// check authenticate required\n\t\tif($rules->authenticate && empty($this->controller->input->get_request_header('Authenticate'))) {\n\t\t\t$this->VError->error(10301);\n\t\t}\n\t}", "title": "" }, { "docid": "fcb990c5e3e28cf8393262058cb00148", "score": "0.48609796", "text": "public function post_rules()\n {\n if($this->is($this->api_base)){\n return [\n 'tour_id' => 'integer',\n 'step' => 'required|integer',\n 'days' => 'numeric',\n 'hours' => 'numeric',\n 'minutes' => 'numeric',\n 'playfield_type' => 'string',\n 'playfield_id' => 'integer'\n ];\n }\n if($this->is(\"$this->api_base/sort\")){\n return [\n 'sort_order' => 'array'\n ];\n }\n }", "title": "" }, { "docid": "2de9abf5d90622cbcc34794470997352", "score": "0.48602214", "text": "private static function _loadDefinitions()\n {\n if (!file_exists(__DIR__ . DS . self::DEFINITIONS_FILE)) {\n static::_generateUpToDateMimeArray();\n } else {\n self::$_mimeDefinitions = parse_ini_file(__DIR__ . DS . self::DEFINITIONS_FILE, true, INI_SCANNER_NORMAL);\n }\n \n if (count(self::$_mimeDefinitions['types']) == 0) {\n static::_generateUpToDateMimeArray();\n }\n }", "title": "" }, { "docid": "0e34cccb172a530232c17fd87a8a162c", "score": "0.48526108", "text": "function verifyRequiredParams($required_fields,$app){\n $error = false;\n\n //Error fields are blank\n $error_fields = \"\";\n\n //Getting the request parameters \n $request_params = array();\n\n //Hnadling PUT request parameters\n //if($_SERVER['REQUEST_METHOD'] == 'PUT'){\n \n //Getting the app instance \n $app = \\Slim\\Slim::getInstance();\n\n // parse_str($app->request->getBody(),$request_params);\n // $request_params = $data;\n // }\n\n //Looping through all parameters\n foreach($required_fields as $fields){\n\n //if(!isset($request_params[$fields]) || strlen(trim($request_params[$fields]))<=0){\n if( null === $app->request->post($fields) || strlen(trim($app->request->post($fields))) <=0){ \n $error = true;\n //file_put_contents(\"logfile\", \"raja\".$request_params.\"\\n\",FILE_APPEND);\n //Concatnating the missing parameters in error fileds \n $error_fields .= $fields.',';\n //file_put_contents(\"logfile\", $app->request->post($fields).\"\\n\",FILE_APPEND);\n\n }\n\n }\n\n if($error){\n //Creating response array\n $response = array();\n\n //Getting app instance \n $app = \\Slim\\Slim::getInstance();\n\n //Adding values to a response \n $response[\"error\"] = true;\n $resonse[\"message\"] = 'Required fields(s) '. substr($error_fields,0,-2).'is missing or empty';\n\n echoResponse(400,$response,$app);\n\n\n //Stopping the app \n $app->stop();\n\n }\n }", "title": "" }, { "docid": "2b1ce541363e8df0294395f3d83b3303", "score": "0.484822", "text": "public function checkData()\n {\n if (!$this->page->request->isPost()) {\n header('HTTP/1.1 400 Not post request');\n exit;\n }\n\n $post = $this->page->request->post;\n if (empty($post->data)) {\n if (!($data = file_get_contents('php://input'))) {\n header('HTTP/1.1 400 Bad data');\n exit;\n }\n } else {\n $data = $post->data;\n }\n\n if (!($json = json_decode($data, true))) {\n header('HTTP/1.1 400 Bad data');\n exit;\n }\n\n if (isset($json['nameValuePairs'])) {\n $json = $json['nameValuePairs'];\n }\n\n $this->json = $json;\n }", "title": "" }, { "docid": "dee43ad7ab6cea943fc1ac1a08017875", "score": "0.48475137", "text": "public function loadYmlDefinitions()\n {\n $data = $this->builder->getData();\n $this->assertTrue(is_array($data));\n }", "title": "" }, { "docid": "0d0db36c77e7d823af1513039fe5f956", "score": "0.48472747", "text": "protected function _loadMethodValidationMap()\n {\n if (! self :: $method_validation_map)\n {\n $path = dirname(__FILE__) . '/PBAPI/data/methods.dat';\n self :: $method_validation_map = unserialize(file_get_contents($path));\n if (! self :: $method_validation_map)\n throw new PBAPI_Exception('Could not load method map', $this);\n }\n return self :: $method_validation_map;\n }", "title": "" }, { "docid": "8199830526102579319db792697d6639", "score": "0.48452187", "text": "public static function handleApiRequest(): void\n {\n $authToken = $_SERVER[\"HTTP_X_AUTH_TOKEN\"] ?? null;\n $method = $_SERVER[\"HTTP_X_API_METHOD\"] ?? \"\";\n $postData = json_decode(file_get_contents(\"php://input\"), true);\n if (!is_array($postData)) {\n $postData = [];\n }\n self::handleApiRequestInternal($method, $authToken, $postData)->send();\n }", "title": "" }, { "docid": "a8bc6f1ef49a18e3a27bc162acad6fff", "score": "0.48426998", "text": "public function processAPI() {\n \tif (method_exists($this, $this->endpoint)) {\n \t\t\treturn $this->_response($this->validateAndApplyFunction($this->endpoint, $this->args)); \n \t \t \t}\n return $this->_response($this->{'invalidEndpoint'}(), 404);\n \t}", "title": "" }, { "docid": "6309fe9b3dce88d01fdcd2423b34d747", "score": "0.48355192", "text": "function api() {\n \n switch ($_SERVER['REQUEST_METHOD']) {\n case \"GET\":\n //die;\n $html = $this->getForm();\n echo $html;\n die;\n break;\n case \"POST\":\n echo 1;\n die;\n $array_data = array(\n 'fullname' => $this->request->post('si_contact_name'),\n 'email_address' => $this->request->post('si_contact_email'),\n 'name_of_your_project' => $this->request->post('si_contact_subject'),\n 'project_type' => $this->request->post('si_contact_ex_field1'),\n 'company_name' => $this->request->post('si_contact_ex_field2'),\n 'address' => $this->request->post('si_contact_ex_field3'),\n 'city_state_zip' => $this->request->post('si_contact_ex_field4'),\n 'phone' => $this->request->post('si_contact_ex_field5'),\n 'website_url' => $this->request->post('si_contact_ex_field6'),\n 'type_of_website' => $this->request->post('si_contact_ex_field7'),\n 'project_budget' => $this->request->post('si_contact_ex_field10'),\n 'website_example' => $this->request->post('si_contact_ex_field11'),\n 'note_or_comment' => $this->request->post('si_contact_ex_field12'),\n 'time_contactf' => $this->request->post('si_contact_ex_field14'),\n 'how_did_youhear' => $this->request->post('si_contact_ex_field15'),\n );\n $table_name = 'quote';\n $quote_model = new Quote();\n $quote_model->addQuote($array_data, $table_name);\n break;\n case \"DELETE\":\n echo 'del';\n break;\n case \"PUT\":\n echo 'put';\n break;\n }\n die;\n }", "title": "" }, { "docid": "ec72fab541e38fcfdb7e8c7da516c686", "score": "0.482307", "text": "public function rules()\n {\n\n $request = [\n 'description' => 'nullable|string',\n 'link' => 'nullable|string',\n 'team' => 'nullable',\n 'team.*.first_name' => 'required|string',\n 'team.*.last_name' => 'required|string',\n 'team.*.position' => 'required|string',\n 'team.*.email' => 'required|email',\n 'team.*.gender' => 'required|in:male,female',\n\n 'stage_id' => 'bail|required|integer|exists:solution_stages,id',\n // 'status_id' => 'bail|required|integer|exists:solution_statuses,id',\n\n 'pitch_deck_file_id' => 'bail|required|integer|exists:files,id,deleted_at,NULL',\n 'business_model_file_id' => 'bail|required|integer|exists:files,id,deleted_at,NULL',\n 'cover_photo_file_id' => 'bail|nullable|integer|exists:files,id,deleted_at,NULL',\n 'video_file_id' => 'bail|nullable|integer|exists:files,id,deleted_at,NULL',\n ];\n if(request()->isMethod('PUT')){\n }else{\n $request['title'] = 'required|string|unique:solutions,title';\n }\n return $request;\n }", "title": "" }, { "docid": "d4f285e355137279325b98fdb3575201", "score": "0.4822202", "text": "private function loadAPI(){\n\n $dir_path = __DIR__;\n $dir_path = str_replace(\"\\\\\",\"/\",$dir_path);\n\n //include the needed libraries\n //require_once self::getAPIRootPath().'libraries/Spreadsheet/vendor/autoload.php';\n\n //include all API classes\n require_once $dir_path.\"/APIHandler.php\";\n require_once $dir_path.\"/Authenticator.php\";\n require_once $dir_path.\"/Client.php\";\n require_once $dir_path.\"/Item.php\";\n\n require_once $dir_path.\"/Helper/Validator.php\";\n require_once $dir_path.\"/Helper/Cipher.php\";\n require_once $dir_path.\"/Helper/Database.php\";\n\n require_once $dir_path.\"/Exception/APIHandlerException.php\";\n require_once $dir_path.\"/Exception/DatabaseException.php\";\n\n }", "title": "" }, { "docid": "364dcfafd28af8c205c167f7c5c2e240", "score": "0.481623", "text": "abstract function getAPIFormattedRequest();", "title": "" }, { "docid": "a57dff734c68d47bcf35b61c7bde3c57", "score": "0.48106876", "text": "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n if((int)method_exists($this,$func) > 0)\n {\n $this->$func();\n }\n else\n {\n //$this->response($this->json([\"msg\" => \"Bad Request\"]),400); // If the method not exist with in this class, response would be \"Page not found\".\n if(isset($_GET['namespace'])){\n $dir = $_SERVER['DOCUMENT_ROOT'].'/LearnAPI/api/apis/'.$_GET['namespace'];\n $file = $dir.'/'.$func.'.php';\n //die(print(file_exists($file)));\n if(file_exists($file)){\n include $file;\n $this->current_call = Closure::bind(${$func}, $this, get_class());\n $this->$func();\n } else {\n $this->response($this->json(['error'=>'method_not_found']),404);\n }\n } else {\n //we can even process functions without namespace here.\n $this->response($this->json(['error'=>'method_not_found']),404);\n }\n }\n }", "title": "" }, { "docid": "23f5e689c86a73f71377fdbea02027ae", "score": "0.48061207", "text": "public function code(Request $request, $api_id) {\n $latest_version = APIVersion::select('id')->where('api_id',$api_id)->orderby('created_at','desc')->first();\n $api_version = APIVersion::where('id','=',$latest_version->id)->orderBy('created_at', 'desc')->first();\n\n $post_data = $request->all();\n if(!isset($post_data['updated_at']) && !isset($post_data['force']) ){\n abort(403, $api_version);\n }\n\n $first = Carbon::parse($post_data['updated_at']);\n $second = Carbon::parse($api_version->updated_at);\n\n if(is_null($api_version) || $api_version->stable){\n $api_version = new APIVersion();\n $api_version->api_id = $api_id;\n }else if(!($first->gte($second) || isset($post_data['force']))){\n abort(409, $api_version);\n }\n $api_version->files = $request->input('files');\n $api_version->functions = $request->functions;\n $api_version->resources = $request->resources;\n $api_version->options = $request->options;\n if ($request->has('routes')) {\n $api_version->routes = $request->routes;\n }\n $api_version->user_id = null;\n $api_version->save();\n return $api_version;\n }", "title": "" }, { "docid": "4fa077ea95e898af3e12c3b25ef76cf0", "score": "0.48031104", "text": "public function validate() {\n\t\t$rules = explode('|', $this->properties['rules']);\n\t\tforeach ($rules as $rule) {\n\t\t\tif (preg_match(\"/(.*?)\\[(.*?)\\]/\", $rule, $match)) {\n\t\t\t\t$rule = $match[1];\n\t\t\t\t$params = explode(',', $match[2]);\n\t\t\t\t$args = array_merge(array(Request::post($this->properties['fieldname'])), $params);\n\t\t\t} else $args = array(Request::post($this->properties['fieldname']));\n\t\t\tif (!function_exists($rule)) {\n\t\t\t\tif (file_exists(ROOT.DS.'app'.DS.'controllers'.DS.'validate'.DS.$rule.'.php'))\n\t\t\t\t\trequire(ROOT.DS.'app'.DS.'controllers'.DS.'validate'.DS.$rule.'.php');\n\t\t\t\telseif (file_exists(ROOT.DS.'vault'.DS.'controllers'.DS.'validate'.DS.$rule.'.php'))\n\t\t\t\t\trequire(ROOT.DS.'vault'.DS.'controllers'.DS.'validate'.DS.$rule.'.php');\n\t\t\t}\n\t\t\t$this->properties['error'] = call_user_func_array($rule, $args);\n\t\t\tif ($this->properties['error']) return false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "189e6b5768e3c65f97a150da66a4cee2", "score": "0.47976375", "text": "public function processApi() {\n\t\t\tif(isset($_REQUEST['x']) && $_REQUEST['x']!=\"\"){\n\t\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\", $_REQUEST['x'])));\n\t\t\t\tif((int)method_exists($this,$func) > 0) {\n\t\t\t\t\t$this->$func();\n\t\t\t\t} else {\n\t\t\t\t\techo 'processApi - method not exist';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'processApi - method not exist';\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "51cba79bb6ff527ae622bbe7f6f3d7b5", "score": "0.47848165", "text": "private function methodRequest()\n {\n $this->method = $this->getMethod();\n $this->data = $this->getRequestData();\n\n $this->array['error'] = '';\n $this->array['logged'] = false;\n }", "title": "" }, { "docid": "dfed040172658d9a5661b3e654aeb2aa", "score": "0.47834504", "text": "public function validate()\n {\n $raw=file_get_contents(\"php://input\");\n $post=json_decode($raw,true);\n if($post===false){\n return false;\n }else{\n if(!isset($post['txid'],$post['currency'],$post['time'],$post['amount'])){\n return false;\n }\n if(!isset($_SERVER['HTTP_NONCE'],$_SERVER['HTTP_TIMESTAMP'],$_SERVER['HTTP_APPKEY'],$_SERVER['HTTP_SIGNATURE'])){\n return false;\n }\n $nonce=$_SERVER['HTTP_NONCE'];\n $timestamp=$_SERVER['HTTP_TIMESTAMP'];\n $appkey=$_SERVER['HTTP_APPKEY'];\n $signature=$_SERVER['HTTP_SIGNATURE'];\n $txid=$post['txid'];\n $currency=$post['currency'];\n $amount=$post['amount'];\n if(strcasecmp($appkey,$this->appkey)!=0){\n return false;\n }\n $localsignature=sha1($this->appsecret.$nonce.$timestamp.$txid.$amount.$currency);\n if(strcasecmp($localsignature,$signature)!=0){\n return false;\n }\n return true;\n\n \n }\n\n \n }", "title": "" }, { "docid": "9f91ccafef50c91af7671a61ea1045d9", "score": "0.47785228", "text": "public function wrong_request_method()\n {\n $url = '/api/v1';\n $data = [\n 'method' => 'rates',\n 'params' => 'USD,EUR',\n ];\n\n $response = $this->withHeader('Authorization', 'Bearer ' . env('API_TOKEN'))->post($url, $data);\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "e21dab3aab24583db5c3f1bda26ced8d", "score": "0.477639", "text": "private function requestValidate(){\n\n return request()->validate([\n 'title' => ['bail','required','min:5','max:255'],\n 'body' => ['required','min:10','max:255'],\n 'vacancy' => ['required'],\n 'published' => ['sometimes'],\n 'priority' => ['required'],\n 'published_at' => ['required'],\n 'tags' => ['exists:tags,id'],\n 'cover_image' => 'sometimes|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n\n ]);\n }", "title": "" }, { "docid": "7ab1f0897aa2011deab7acdcb83ccd78", "score": "0.4772532", "text": "public function saveInApi(): void\n\t{\n\t\tthrow new \\App\\Exceptions\\AppException('Method not implemented');\n\t}", "title": "" }, { "docid": "07d9b7b3a4e0ad50085d50151a414fab", "score": "0.47691235", "text": "public function put_rules()\n {\n if($this->is(\"$this->api_base/*\")){\n return [\n 'tour_id' => 'integer',\n 'step' => 'integer',\n 'days' => 'numeric',\n 'hours' => 'numeric',\n 'minutes' => 'numeric',\n 'playfield_type' => 'string',\n 'playfield_id' => 'integer',\n 'tour_id' => 'exists:tours,id'\n ];\n }\n }", "title": "" }, { "docid": "3fce9065f5423d987dc637c6fc372005", "score": "0.47679666", "text": "public function rules()\n {\n // FIXME: make separate class for ApiRequest\n $baseRules = [\n 'type' => 'required|in:'.implode(',', array_flip(trans('motor-revision::backend/tickets.types'))),\n 'status' => 'nullable|in:'.implode(',', array_flip(trans('motor-revision::backend/tickets.at_home_stati'))),\n ];\n $type = $this->get('type');\n switch ($this->get('type')) {\n case 'at_home':\n return $baseRules + [\n $type.'.handle' => 'nullable',\n $type.'.name' => 'required',\n $type.'.address' => 'required',\n $type.'.zip' => 'required',\n $type.'.city' => 'required',\n $type.'.country' => 'required',\n $type.'.email' => 'required|email',\n $type.'.comment' => 'nullable',\n $type.'.internal_comment' => 'nullable',\n $type.'.access_key' => 'nullable',\n $type.'.shirt_size' => 'nullable|in:'.implode(',', array_flip(trans('motor-revision::backend/tickets.shirt_sizes'))),\n ];\n break;\n case 'subsidized':\n return $baseRules + [\n $type.'.handle' => 'nullable',\n $type.'.name' => 'required',\n $type.'.address' => 'required',\n $type.'.zip' => 'required',\n $type.'.city' => 'required',\n $type.'.country' => 'required',\n $type.'.email' => 'required|email',\n $type.'.comment' => 'nullable',\n $type.'.transportation' => 'nullable',\n ];\n break;\n case 'supporter':\n return $baseRules + [\n $type.'.handle' => 'nullable',\n $type.'.name' => 'required',\n $type.'.address' => 'required',\n $type.'.zip' => 'required',\n $type.'.city' => 'required',\n $type.'.country' => 'required',\n $type.'.email' => 'required|email',\n $type.'.comment' => 'nullable',\n $type.'.internal_comment' => 'nullable',\n $type.'.company' => 'nullable',\n $type.'.vat_id' => 'nullable',\n $type.'.is_anonymous' => 'nullable|boolean',\n $type.'.amount' => 'nullable|in:'.implode(',', array_flip(trans('motor-revision::backend/tickets.amounts'))),\n $type.'.shirt_size' => 'nullable|in:'.implode(',', array_flip(trans('motor-revision::backend/tickets.shirt_sizes'))),\n ];\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "47609887ce994c7f0dc9656e0b4f15b5", "score": "0.4763172", "text": "public function test()\n {\n $app = Application::getFacadeApplication();\n $val = $app->make('helper/validation/strings');\n $num = $app->make('helper/validation/numbers');\n $fil = $app->make('helper/validation/file');\n\n // loop through all the fields in the array, and run whatever validation\n // the validate parameter says is required\n foreach ($this->fields as $f) {\n $validate = $f->validate;\n $field = isset($f->field) ? $f->field : null;\n $fieldValue = isset($this->data[$field]) ? $this->data[$field] : null;\n switch ($validate) {\n case self::VALID_NOT_EMPTY:\n if (!$val->notempty($fieldValue)) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_TOKEN:\n $vt = $app->make('helper/validation/token');\n if (!$vt->validate($f->value)) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_INTEGER:\n if ((!$num->integer($fieldValue)) && ($val->notempty($fieldValue))) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_INTEGER_REQUIRED:\n if (!$num->integer($fieldValue)) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_UPLOADED_IMAGE:\n if ((!$fil->image($this->files[$field]['tmp_name'])) && ($this->files[$field]['tmp_name'] != '')) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_UPLOADED_IMAGE_REQUIRED:\n if (!$fil->image($this->files[$field]['tmp_name'])) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_UPLOADED_FILE:\n if ((!$fil->file($this->files[$field]['tmp_name'])) && ($this->files[$field]['tmp_name'] != '')) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_UPLOADED_FILE_REQUIRED:\n if (!$fil->file($this->files[$field]['tmp_name'])) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n case self::VALID_EMAIL:\n if (!$app->make(EmailValidator::class)->isValid($fieldValue)) {\n $this->fieldsInvalid[] = $f;\n }\n break;\n }\n }\n\n $this->setErrorsFromInvalidFields();\n\n return count($this->fieldsInvalid) == 0;\n }", "title": "" }, { "docid": "16e7c3b2b9f131cf116dac1e712b817d", "score": "0.47620746", "text": "public function validateMethod()\n {\n if (!$this->method) {\n throw new DTCMException('HTTP method not specified.');\n }\n\n if (!in_array($this->method, ['GET', 'POST', 'DELETE', 'PUT'])) {\n throw new DTCMException('Invalid HTTP method specified.');\n }\n }", "title": "" }, { "docid": "c9488f54b7516e365eed96d5f72b7811", "score": "0.47568673", "text": "public function setupApiRequest()\n\t{\n\t\tglobal $Security;\n\n\t\t// Check security for API request\n\t\tIf (ValidApiRequest()) {\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "a61046d6420cb0d72e3c8bac7435e993", "score": "0.4753638", "text": "public function beforeSave()\n {\n $this->setParams([\n 'url' => $this->getFieldsetDataValue('api_url'),\n 'apiKey' => $this->getFieldsetDataValue('api_key'),\n 'version' => $this->getValue()\n ]);\n\n $this->validateApiVersion($this->api, $this->getValue());\n\n parent::beforeSave();\n }", "title": "" }, { "docid": "6158353bfa39314069f431a67df3d8f9", "score": "0.47470495", "text": "protected function _checkRequestData(): void\n {\n $requestMethod = $this->_controller()->getRequest()->getMethod();\n $isRelationshipAction = $this->_checkIsRelationshipsRequest();\n\n if (\n ($requestMethod !== 'POST' && $requestMethod !== 'PATCH' && $requestMethod !== 'DELETE') ||\n ($requestMethod === 'DELETE' && !$isRelationshipAction)\n ) {\n return;\n }\n\n $requestData = $this->_controller()->getRequest()->getData();\n\n if (empty($requestData)) {\n throw new BadRequestException(\n 'Missing request data required for POST and PATCH methods, ' .\n 'as well as DELETE methods to relationship endpoints. ' .\n 'Make sure that you are sending a request body and that it is valid JSON.'\n );\n }\n\n $validator = new DocumentValidator($requestData, $this->getConfig());\n\n if ($isRelationshipAction) {\n $relationshipValidator = new DocumentRelationshipValidator($requestData, $this->getConfig());\n $relationshipValidator->validateUpdateDocument();\n } else {\n if ($requestMethod === 'POST') {\n $validator->validateCreateDocument();\n }\n\n /** @psalm-suppress TypeDoesNotContainType */\n if ($requestMethod === 'PATCH' || $requestMethod === 'DELETE') {\n $validator->validateUpdateDocument();\n }\n }\n\n // decode JSON API to CakePHP array format, then call the action as usual\n $decodedJsonApi = $this->_convertJsonApiDocumentArray($requestData);\n\n $exception = null;\n if ($requestMethod === 'PATCH' && !$isRelationshipAction) {\n // For normal PATCH operations the `id` field in the request data MUST match the URL id\n // because JSON API considers it immutable. https://github.com/json-api/json-api/issues/481\n $exception = $this->_request()->getParam('id') !== $decodedJsonApi['id'];\n }\n\n if ($exception) {\n throw new BadRequestException(\n 'URL id does not match request data id as required for JSON API PATCH actions'\n );\n }\n\n $this->_controller()->setRequest($this->_controller()->getRequest()->withParsedBody($decodedJsonApi));\n }", "title": "" }, { "docid": "28cac75d06aec33db1b05a05a38f2065", "score": "0.47363678", "text": "private function secureInputData(){\n\n if($this->serviceContainer['request']->requestUrn){\n $this->serviceContainer['request']->requestUrn = $this->serviceContainer['gatekeeper']->secureString($this->serviceContainer['request']->requestUrn);\n }\n if($this->serviceContainer['request']->requestBody){\n $this->serviceContainer['request']->requestBody = $this->serviceContainer['gatekeeper']->secureBody($this->serviceContainer['request']->requestBody);\n }\n\n }", "title": "" }, { "docid": "460348a6a8ba69c527033f9a4e368161", "score": "0.47233832", "text": "public function __construct($request) {\n header(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: *\");\n header(\"Content-Type: application/json\");\n\n $this->args = explode('/', rtrim($request, '/'));\n $this->endpoint = array_shift($this->args);\n if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\n $this->verb = strtolower(array_shift($this->args));\n }\n\t\t\n\t\t$logging = new Logging();\n\t\t$docEntrada = array();\n\t\t$docEntrada['endpoint'] = $request;\n\t\t$docEntrada['message'] = json_decode(file_get_contents('php://input'), true);\n $logging->guardaDocumentoEntrada($docEntrada);\n\n\n $this->method = $_SERVER['REQUEST_METHOD'];\n if ($this->method == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {\n if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'DELETE') {\n $this->method = 'DELETE';\n } else if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'PUT') {\n $this->method = 'PUT';\n } else {\n throw new Exception(\"Unexpected Header\");\n }\n }\n\n switch($this->method) {\n case 'DELETE':\n case 'POST':\n $this->request = $this->_cleanInputs($_POST);\n\t\t\t$this->document= json_decode(file_get_contents('php://input'), true);\n break;\n case 'GET':\n $this->request = $this->_cleanInputs($_GET);\n break;\n case 'PUT':\n $this->request = $this->_cleanInputs($_GET);\n $this->file = file_get_contents(\"php://input\");\n break;\n default:\n $this->_response('Invalid Method', 405);\n break;\n\t\t}\n\t\t\n\t\t$this->publicKey=\"-----BEGIN PUBLIC KEY-----\\n\";\n\t\t$this->publicKey=$this->publicKey.\"MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxtMJaVdleLw2Ata++6Tq\\n\";\n\t\t$this->publicKey=$this->publicKey.\"VPib8VYVJ5ctbTrl/W18W/33JVVU8eyt/yMnIFOIPz6DIYFZSwkpBmWQDNOTPWZk\\n\";\n\t\t$this->publicKey=$this->publicKey.\"+SHf/X1foEqvJMaqkHe4FT7+EqXyED8aL3KBHkOakExt2VPcn4J0crBxmveRr6Pl\\n\";\n\t\t$this->publicKey=$this->publicKey.\"yMx08Q8WskAt2O8MCfq5JwD2zePUCwMW79Ls/6iq6OrOg7WZob9oEOE4zhBRsTU7\\n\";\n\t\t$this->publicKey=$this->publicKey.\"FwxOG5X9Hrr6MnxuLzAIl1W4bYbODHYRQzvMIyS+yBbVEcwezvo3ziLJGPBK7539\\n\";\n\t\t$this->publicKey=$this->publicKey.\"fCpfaEEDoRuGE17DxNYFdZi91dBecGT8lNPt9TQsdamvboeJHLJ9ynZth8XesqmA\\n\";\n\t\t$this->publicKey=$this->publicKey.\"qRaL4hJdA2B8vRU+IWn+eWNBq8KyUnX/JgsBhrKXx7v0bboyptlAEOAXM8RAsNrZ\\n\";\n\t\t$this->publicKey=$this->publicKey.\"dwgBvclJ86mGhQlQOshT+kHSmOV2JL/FKhcuCThyurKivgDVnnYZccloaoiAfXvT\\n\";\n\t\t$this->publicKey=$this->publicKey.\"xYdlcOTYitqmCZdEkffzJuTJL/jv4ljg0mgcwHzomPgsoaDugQqxJ3/1Z8x0an46\\n\";\n\t\t$this->publicKey=$this->publicKey.\"kgdprB/XPIBtqVVJ7KaSgLkwmzUR6aRfYbF4A0O3QJzZOKfFZT7m4Hzgulo2Temb\\n\";\n\t\t$this->publicKey=$this->publicKey.\"o+nimnH0u31nF1JkQZr0Y1KTSMM90imjaJLj863SBcDPpULI8V5nYnq4W6tnTkA/\\n\";\n\t\t$this->publicKey=$this->publicKey.\"kynbO7obFBEn1sfPXD+J68UCAwEAAQ==\\n\";\n\t\t$this->publicKey=$this->publicKey.\"-----END PUBLIC KEY-----\\n\";\n }", "title": "" }, { "docid": "361f08d904e48a0c0b98a37e550eefcb", "score": "0.4722799", "text": "function dak_event_add_xmlrpc_methods($methods) {\n error_log(\"Add xmlrpc methods\");\n \n $methods['dak_event_ping'] = 'dak_event_ping';\n\n //global $dak_event_xmlrpc_methods;\n\n // foreach ($dak_event_xmlrpc_methods as $xmlrpc_method => $php_method) {\n // $methods[$xmlrpc_method] = $php_method;\n // }\n //error_log(print_r($_POST, true));\n\n return $methods;\n\n}", "title": "" }, { "docid": "0ff4a11cd1337b7e18c4a983833490b4", "score": "0.4721426", "text": "public function validateSecret(Request $request): void;", "title": "" }, { "docid": "e5188dc8c2db3fa82a7b907e109d9d7c", "score": "0.47129554", "text": "function create_module_api($data) {\n\t//Creating strings to add to the api/index.php inside \n\t//$new_api = \"require_once('SimpleAuth.php');\\nrequire_once('../modules/\" . $data['module_name'] . \"/\" . $data['module_name'] . \".model.php');\";\n\t$set_api = \"\\$r->addAPIClass('\" . $data['class_name'] . \"');\\n\\$r->handle();\";\n\t$file = file_get_contents('../../api/index.php');\n\tif (!strpos(file_get_contents('../../api/index.php'), \"\\$r->addAPIClass('\" . $data['class_name'] . \"');\") !== false) {\n\t\t//If string of the API not found, include t the api/index.php\n\t\t// Do tag replacements or whatever you want\n\t\t//$file = str_replace(\"require_once('SimpleAuth.php');\", $new_api, $file);\n\t\t$file = str_replace('$r->handle();', $set_api, $file);\n\t\t//save it back\n\t\tfile_put_contents('../../api/index.php', $file);\n\t}\n}", "title": "" }, { "docid": "ad974a127a3b5d27393646dde7a530be", "score": "0.47099933", "text": "function validar_datos(){\r\n\t\t// validar nombre, version, creacion ...\r\n\t}", "title": "" }, { "docid": "aac803c041bd64618df18bb1b7c0fa60", "score": "0.47095373", "text": "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['status'] = $validate->validInteger($request->element('status'));\n\t$error['INPUT']['ipp'] = $validate->validPlusInteger($request->element('ipp'),$amessages['items_per_page']);\n\tif($error['INPUT']['status']['error'] || $error['INPUT']['ipp']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "title": "" }, { "docid": "24fd6bdb2e87457e06aa7f5e2529fbc7", "score": "0.47051018", "text": "public function testKycChecksRespond()\n {\n }", "title": "" }, { "docid": "37c5e5f8c2a7dce498275050f1fd24a4", "score": "0.47007662", "text": "function checkload_post()\n {\n $response = array('status' => 'failed', 'message' => '');\n\n $rs = $this->model->insert_docs($this->post('type_id'));\n if ($rs) {\n $response['status'] = \"success\";\n }\n\n return $this->response($response);\n }", "title": "" }, { "docid": "a356b04129a8a4b3ffae88771c247dfd", "score": "0.4695761", "text": "public function setRequestData(): void;", "title": "" }, { "docid": "fc0fe99f32227bca8b6e86e0076f8a45", "score": "0.46934056", "text": "public static function processRequest() {\r\n global $sru_fcs_params;\r\n \r\n if (function_exists('xdebug_start_error_collection')) {\r\n xdebug_start_error_collection();\r\n } \r\n if ($sru_fcs_params->operation == \"explain\" || $sru_fcs_params->operation == \"\") {\r\n explain();\r\n } else if ($sru_fcs_params->operation == \"scan\") {\r\n scan();\r\n } else if ($sru_fcs_params->operation == \"searchRetrieve\") {\r\n search();\r\n }\r\n}", "title": "" }, { "docid": "ea1e8fb0c30d18727883204db8d607a2", "score": "0.46916538", "text": "public static function validate() {}", "title": "" }, { "docid": "52c7e40fd88c0e2cc1fc1f3ac3dd6d7a", "score": "0.4690914", "text": "public function testDefinition(): void\n {\n $reflection = new ReflectionObject($this->fixture);\n\n self::assertTrue($reflection->hasMethod('getLicenses'));\n self::assertArrayHasKey('0', $reflection->getMethod('getLicenses')->getParameters());\n self::assertEquals('path', $reflection->getMethod('getLicenses')->getParameters()[0]->getName());\n self::assertEquals('string', (string) $reflection->getMethod('getLicenses')->getParameters()[0]->getType());\n self::assertEquals('array', (string) $reflection->getMethod('getLicenses')->getReturnType());\n\n self::assertTrue($reflection->hasMethod('getName'));\n self::assertEquals('string', (string) $reflection->getMethod('getName')->getReturnType());\n }", "title": "" }, { "docid": "c675b98ad26b34c8bc45849e4bb27d21", "score": "0.46907863", "text": "function verifyRequiredParams($required_fields) {\n $error = false;\n $error_fields = \"\";\n $request_params = array();\n $request_params = $_REQUEST;\n // Handling PUT request params\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\n $app = \\Slim\\Slim::getInstance();\n parse_str($app->request()->getBody(), $request_params);\n }\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error = true;\n $error_fields .= $field . ', ';\n }\n }\n if ($error) {\n // Required field(s) are missing or empty\n // echo error json and stop the app\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n $response[\"error\"] = true;\n $response[\"message\"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty';\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "a75dae079adaa49c73786858dce77621", "score": "0.46895328", "text": "abstract protected function apiCall($file, $options);", "title": "" }, { "docid": "44baaac584b372beaf1e49127a85d4e0", "score": "0.46861878", "text": "public function store(Request $request)\n {\n //table[,column[,ignore value[,ignore column[,where column,where value]...]]]\n $this->validate($request, [\n 'name' => \"required|string|unique:api_endpoints,name,NULL,NULL,api_id,$request->api_id\",\n 'relative_url' => \"required|string|unique:api_endpoints,relative_url,NULL,NULL,api_id,$request->api_id\",\n 'method' => 'required|in:GET,POST,PUT,PATCH,DELETE',\n 'json' => 'required|json',\n 'api_id' => 'required',\n 'field_ok' => 'required',\n 'code_ok' => 'required'\n ], [], [\n 'name' => 'Nome',\n 'relative_url' => 'URL Relativa',\n 'method' => 'Método',\n 'json' => '',\n 'api_id' => 'API',\n 'field_ok' => 'Campo',\n 'code_ok' => 'Código de Retorno'\n ]);\n\n $apiEndpoint = new ApiEndpoint([\n 'name' => $request->name,\n 'relative_url' => $request->relative_url,\n 'method' => $request->method,\n 'json' => $request->json,\n 'api_id' => $request->api_id,\n 'body' => $request->body,\n 'field_ok' => $request->field_ok,\n 'code_ok' => $request->code_ok\n\n ]);\n\n $apiEndpoint->save();\n\n return response()->json(['redirect' => route('api_endpoints.index')]);\n }", "title": "" }, { "docid": "62eca0c7d44b44a9e81fd9fddef344c6", "score": "0.46834227", "text": "public function validateResponse()\r\n {\r\n\r\n }", "title": "" }, { "docid": "0ff434986401dbf308573405a9852244", "score": "0.46821636", "text": "public function store(Request $request)\n {\n //\n \n if($request->input('BC15_FORMATTYP') == 'KEEP'){\n $validate = $this->validate;\n unset($validate['BC15_FIXEDVAL']); \n }else{\n $validate = $this->validate;\n }\n\n\n $this->validate($request, $validate);\n \n // $data = BC_MODELTOPIC::create( $request->all() );\n // dd($request->all()); exit;\n $model = new BC_MODELTOPIC();\n // $model->BC15_MODELCD = \"55\";\n // $model->BC15_TOPICSCHK = \"55\";\n $data = $request->all();\n $data['BC15_USRUPD'] = date(\"Y-m-d H:i:s\");\n $model->fill( $data );\n // $model->timestamps = false;\n $data = $model->save();\n\n $response = [\n 'message' => 'create successfully!',\n 'data' => $data,\n 'success' => $data ? true : false\n ];\n\n return $response;\n }", "title": "" }, { "docid": "f6f6e6f0056cc5733f22b4a4d3636619", "score": "0.4677626", "text": "public function validate() {\n\n $response = $this->sendValidationRequest();\n\n $this->vatId['isValid'] = $response->valid;\n $this->vatId['companyName'] = $response->name !== '---' ? $response->name : null;\n $this->vatId['companyAddress'] = $response->address !== '---' ? $response->address : null;\n }", "title": "" }, { "docid": "3cb5a238c34ae729c9437d4cd37e2655", "score": "0.46727315", "text": "protected function includeCheck(){\n\n header('Content-Type: application/json');\n $headers = apache_request_headers();\n\n $err = $this->checkRequest($_SERVER,$headers);\n if(!empty($err)){\n http_response_code(400);\n echo json_encode($err);\n exit();\n }\n }", "title": "" }, { "docid": "702dd358c8ef31e349dd515523e4975b", "score": "0.46719146", "text": "public function validateResponse();", "title": "" }, { "docid": "744a760ab7b83b4f07ee5bcab49f8f50", "score": "0.4671436", "text": "public function validateAccess(APIRequest $request): bool;", "title": "" }, { "docid": "b67637cea9e043013c5e1177eadaad0e", "score": "0.46634826", "text": "function herd($path, $method = 'GET',array $data =null, $key ='ufwjkhh66ahkx2skjbhana')\n {\n //$this->responseCode = null;\n // $this->getPort($this->url.$path);\n $data = json_encode($data);\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_USERPWD, $key.':x');\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_URL, 'https://www.bugherd.com/api_v2/'.$path.'.json');\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\n curl_setopt($curl, CURLOPT_HEADER,0);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n \n\n $httpHeader = array();\n $httpHeader[] = 'Content-Type: application/json';\n curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeader);\n\n switch ($method) {\n case 'POST':\n curl_setopt($curl, CURLOPT_POST, 1);\n if (isset($data)) {curl_setopt($curl, CURLOPT_POSTFIELDS, $data);}\n break;\n case 'PUT':\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n if (isset($data)) {curl_setopt($curl, CURLOPT_POSTFIELDS, $data);}\n break;\n case 'DELETE':\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n default: // GET\n break;\n }\n $response = curl_exec($curl);\n \n \n curl_close($curl);\n\n if ($response) {\n return json_decode($response,true);\n }\n\n return true;\n }", "title": "" }, { "docid": "faf844292053b0305f48134558d2ec42", "score": "0.46621913", "text": "public function testKycChecksGet()\n {\n }", "title": "" }, { "docid": "d0c72e1cb48e6fcf06c8710bb6be4716", "score": "0.46608028", "text": "private function checkMethodExist(){\n\t\t\n\t\t\n\t\tif(isset($this->url_array[1])):\n\t\t\n\t\t\n\t\t\tif(method_exists($this->controller,$this->url_array[1])):\n\t\t\t\n\t\t\t\n\t\t\t$this->method = $this->url_array[1];\n\t\t\t$this->unset_url_query(1);\n\t\t\t\n\t\t\t\n\t\t\tendif;\n\t\t\n\t\t\n\t\tendif;\n\t\t\n\t\t\n\t\t$this->checkPassedParams();\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "71e461f8290407d76a793c1d2a81f2e5", "score": "0.46592158", "text": "public function handleRequests() {\n $sections = tdb::getInstance()->getAll ( 'sections', 'section_level','1','order_num', 'asc' );\n foreach ( $sections as $k=>$v ) {\n $this->allowed_sections [] = $v [ 'section_name' ];\n }\n array_pop ( $this->allowed_sections ); //remove empty last item\n\n //add hidden sections to allowed_sections \n $hidden = tdb::getInstance()->getAll ( 'sections', 'section_level','-1','order_num', 'asc' );\n array_pop ( $hidden ); //remove empty last item\n foreach ( $hidden as $k=>$v ) {\n $this->allowed_sections [] = $v [ 'section_name' ];\n }\n\n //check GET [0] \n if ( $_GET['g0'] == 'ajax' ) {\n\n //do nothing so url can use .getjson\n $this->section ['section_name'] = 'ajax';\n\n } elseif ( ( $_GET['g0'] == 'cron' ) || ( $_GET [ 1 ] == 'cron' ) ){\n\n //$_SERVER ['argv'] [0] is the script that calls the cron job\n\n //when running a CRON job, $_GET [ 1 ], , $_GET [ 2 ], , $_GET [ 3 ] are set from $argv via definitions.php\n $g1 = ( isset ( $_GET['g1'] ) ) ? $_GET['g1'] : $_GET [ 2 ];\n $g2 = ( isset ( $_GET['g2'] ) ) ? $_GET['g2'] : $_GET [ 3 ] ;\n\n\n $this->section ['section_name'] = 'cron';\n if ( ( $g1 == 'batch' ) && ( $g2 == CRON_BATCH_PASSWORD ) )\n {\n $this->section ['action'] = 'batch';\n }\n elseif ( $g1 == 'updateDbImageSizes' ) \n {\n $this->section ['action'] = 'updateDbImageSizes';\n }\n\n } elseif ( !isset( $_GET['g0'] ) ) {\n\n $this->section[ 'section_name' ] = 'home';\n $this->is_faulty_getvar = false;\n\n } else {\n\n\n if ( in_array ( $_GET['g0'] , $this->allowed_sections ) ) {\n\n // genFuncs::getInstance()->spit ( 'sub name: ' + $this->s [ 'subsect' ] [ 'section_name' ] );\n $this->section = tdb::getInstance()->getRow ( 'sections', 'section_name', $_GET['g0'] );\n\n }\n\n if ( $_GET['g1'] ) {\n\n //only allow the subsects for the current section\n $result = tdb::getInstance()->getAll ( 'sections', 'parent_id', $this->section [ 'section_id' ] );\n\n foreach ( $result as $k=>$v ) {\n $this->allowed_subsects [] = $v [ 'section_name' ];\n if ( $_GET['g1'] == $v ['section_name'] ) {\n $this->section['subsect'] = tdb::getInstance()->getRow ( 'sections', 'section_id', $v[ 'section_id' ] );\n }\n }\n\n }\n }\n\n if ( isset( $_GET['g2'] ) ) {\n\n $this->section['2'] = $_GET['g2'];\n\n }\n\n if ( isset( $_GET['g3'] ) ) {\n\n $this->section['3'] = $_GET['g3'];\n\n }\n if ( isset( $_GET['g4'] ) ) {\n $this->section['4'] = $_GET['g4'];\n }\n\n }", "title": "" }, { "docid": "f9fef6f0dca15e9f340726028eadfbf2", "score": "0.4659167", "text": "public function rules(Request $request)\n {\n $data = $request->all();\n // dd($data);\n switch ($this->method()) {\n\n case 'POST':\n {\n $rules = [\n 'delivery_terms' => 'required',\n ]; \n return $rules;\n }\n case 'PATCH':\n {\n\n $rules = [\n 'delivery_terms' => 'required',\n ]; \n return $rules;\n }\n }\n }", "title": "" }, { "docid": "a2e530040c15782b78c8e88d3e8d9302", "score": "0.46571684", "text": "private function checkData(){\n $this->datavalidator->addValidation('name','req',$this->text('e16'));\n $this->datavalidator->addValidation('name','maxlen=50',$this->text('e17'));\n $this->datavalidator->addValidation('text','req',$this->text('e15'));\n $this->datavalidator->addValidation('text','maxlen=300',$this->text('e9'));\n $this->datavalidator->addValidation('filename','maxlen=256',$this->text('e4'));\n $this->datavalidator->addValidation('x','req',$this->text('e14'));\n $this->datavalidator->addValidation('x','numeric',$this->text('e14'));\n $this->datavalidator->addValidation('y','req',$this->text('e14'));\n $this->datavalidator->addValidation('y','numeric',$this->text('e14'));\n $this->datavalidator->addValidation('url','maxlen=1000',$this->text('e10'));\n $this->datavalidator->addValidation('url','regexp=/^[^\\n\\r\\|]+\\|\\|[^\\n\\r\\|]+([\\n\\r][^\\n\\r\\|]+\\|\\|[^\\n\\r\\|]+)*$/',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e11'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e12'));\n }\n $this->datavalidator->addValidation('active','req',$this->text('e13'));\n\n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "f8d8edc37b52e8b77d5e58fc75f89ef7", "score": "0.4649119", "text": "public function saveRequest($data, $user_id)\n { \n $EASRequestApprover = new EASRequestApprover;\n\n //Get request code depending on the request type except for RFCs\n //Assign the corresponding request_code depending on what is filed\n if( $data['filing_type'] == 'QAC')\n {\n $this->req_code ='Req-021';\n $this->rfc_scheme = $data['payment_scheme'];\n $this->rfc_contamt = (float)str_replace(',','',$data['contract_amount']);\n $remarks = $data['remarks'];\n\n }\n else if( $data['filing_type'] == 'RFR')\n {\n $this->req_code ='Req-014';\n $this->re_reasons = $data['reasons'];\n $remarks = $data['remarks'];\n\n if( $data['nature_reopening']['0'] == 'Code-001')\n {\n $this->re_nature = 'Forfeiture';\n $this->re_first = date('m/d/Y', strtotime($data['first_reminder']));\n $this->re_second = date('m/d/Y', strtotime($data['second_reminder']));\n $this->re_notice = date('m/d/Y', strtotime($data['notice_of_forfeiture']));\n $this->re_amort = $data['number_of_amortization_paid'];\n $this->re_nature = 'Forfeiture';\n }\n else if( $data['nature_reopening']['0'] == 'Code-002')\n {\n $nature_and_req_code = explode(':', $data['rfc_ref_no']);\n $this->rfc_refno = $nature_and_req_code[0]; \n $this->re_nature = 'RFC - ' . $nature_and_req_code[1];\n }\n }\n else if( $data['filing_type'] == 'RFC')\n {\n $request_code = explode('+', $data['input_hidden_req_ref']);\n\n $this->req_code = $request_code['0'];\n $this->rfc_from = $data['from'];\n $this->rfc_to = $data['to'];\n $this->rfc_scheme = $data['payment_scheme'];\n $this->rfc_note = $data['req_note'];\n $remarks = $this->rfc_note;\n }\n\n $this->rfc_code = $this->getNewRequestCode($data['filing_type']);\n $this->rfc_DOR = date('Y-m-d h:i:s', strtotime($data['date_filed']));\n $this->project_no = $data['project_type'];\n $this->lot_no = $data['lot_code'];\n $this->rfc_model = $data['model_type'];\n $this->rfc_landarea = $data['lot_area']; /*to check*/\n $this->rfc_floorarea = $data['floor_area'];\n $this->rfc_name = $data['owners_name']; /*to check*/\n $this->app_code = $user_id;\n $this->rfc_stat= 'Pending';\n $this->sales_date = date('Y-m-d', strtotime($data['date_reserved']));\n \n //Save request\n $this->save();\n\n //Save approver\n if( $data['filing_type'] == 'RFC')\n {\n $EASRequestApprover->saveRequestApprovers($this->req_code, $this->rfc_code, $data['approvers'], \n $data['close_codes'], $remarks, $user_id, $data['attachment_type'],\n $data['other_attachment']);\n }\n else\n {\n $EASRequestApprover->saveRequestApprovers($this->req_code, $this->rfc_code, $data['approvers'], \n $data['close_codes'], $remarks, $user_id);\n }\n\n return $this->rfc_code;\n }", "title": "" }, { "docid": "7cc29f1a7401b2116d09263bc94ffe84", "score": "0.46463537", "text": "function verifyRequiredParams($required_fields) {\n $error = false;\n $error_fields = \"\";\n $request_params = array();\n $request_params = $_REQUEST;\n // Handling PUT request params\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\n $app = \\Slim\\Slim::getInstance();\n parse_str($app->request()->getBody(), $request_params);\n }\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error = true;\n $error_fields .= $field . ', ';\n }\n }\n\n if ($error) {\n // Required field(s) are missing or empty\n // echo error json and stop the app\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n $response[\"error\"] = true;\n $response[\"message\"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty';\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "7cc29f1a7401b2116d09263bc94ffe84", "score": "0.46463537", "text": "function verifyRequiredParams($required_fields) {\n $error = false;\n $error_fields = \"\";\n $request_params = array();\n $request_params = $_REQUEST;\n // Handling PUT request params\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\n $app = \\Slim\\Slim::getInstance();\n parse_str($app->request()->getBody(), $request_params);\n }\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error = true;\n $error_fields .= $field . ', ';\n }\n }\n\n if ($error) {\n // Required field(s) are missing or empty\n // echo error json and stop the app\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n $response[\"error\"] = true;\n $response[\"message\"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty';\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "7cc29f1a7401b2116d09263bc94ffe84", "score": "0.46463537", "text": "function verifyRequiredParams($required_fields) {\n $error = false;\n $error_fields = \"\";\n $request_params = array();\n $request_params = $_REQUEST;\n // Handling PUT request params\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\n $app = \\Slim\\Slim::getInstance();\n parse_str($app->request()->getBody(), $request_params);\n }\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error = true;\n $error_fields .= $field . ', ';\n }\n }\n\n if ($error) {\n // Required field(s) are missing or empty\n // echo error json and stop the app\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n $response[\"error\"] = true;\n $response[\"message\"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty';\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "660e5125b52850931ce5a5c5477fd3b6", "score": "0.46384865", "text": "protected function cleanRequest()\n\t{\n\n\t\t$_RAW = array();\n\n\t\t($this -> method == 'PUT' || $this -> method == 'DELETE') && parse_str(file_get_contents('php://input'), $_RAW);\n\n\t\tforeach(array($_GET, $_POST, $_RAW, $_COOKIE, $_SERVER) as $req)\n\t\t{\n\n\t\t\tif (get_magic_quotes_gpc())\n\t\t\t{\n\n\t\t\t $strip_slashes_deep = function ($value) use (&$strip_slashes_deep) {\n\t\t\t return is_array($value) ? array_map($strip_slashes_deep, $value) : stripslashes($value);\n\t\t\t };\n\n\t\t\t $req = array_map($strip_slashes_deep, $req);\n\n\t\t\t}\n\n\t\t\tforeach($req as $key => $val)\n\t\t\t{\n\n\t\t\t $entities = function ($value) use (&$entities) {\n\t\t\t return is_array($value) ? array_map($entities, $value) : htmlentities($value, ENT_QUOTES, 'UTF-8');\n\t\t\t };\n\n\t\t\t\t$this -> values[$key] = $entities($val);\n\n\t\t\t}\n\n\t\t}\n\n\t\tunset($_GET);\n\t\tunset($_POST);\n\t\tunset($_RAW);\n\t\tunset($_COOKIE);\n\n\t}", "title": "" }, { "docid": "0ad2016164a386c876f6954919ddc87f", "score": "0.4633452", "text": "public function testIsHttpMethods(): void\n {\n $request = new ServerRequest();\n\n $request = $request->withEnv('REQUEST_METHOD', 'GET');\n $this->assertTrue($request->is('get'));\n\n $request = $request->withEnv('REQUEST_METHOD', 'POST');\n $this->assertTrue($request->is('POST'));\n\n $request = $request->withEnv('REQUEST_METHOD', 'PUT');\n $this->assertTrue($request->is('put'));\n $this->assertFalse($request->is('get'));\n\n $request = $request->withEnv('REQUEST_METHOD', 'DELETE');\n $this->assertTrue($request->is('delete'));\n $this->assertTrue($request->isDelete());\n\n $request = $request->withEnv('REQUEST_METHOD', 'delete');\n $this->assertFalse($request->is('delete'));\n }", "title": "" }, { "docid": "8abe3b9f87d234d063d2ab3ce26d0a9c", "score": "0.46327388", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n break;\n case 'DELETE':\n break;\n case 'POST':\n {\n return [\n 'datainicio' => 'required|date_format:d/m/Y',\n 'datafinal' => 'required|date_format:d/m/Y|after:datainicio',\n ];\n break;\n }\n case 'PUT':\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n\n }", "title": "" }, { "docid": "d09218e502fcad3c77f4da9f2be70b90", "score": "0.46287853", "text": "protected function prepareInput(){\n\t\tif(!$this->checkWSDL($this->server.$this->wsdl))\n\t\t\t return $this->response = $this->_errorHandler->return_error('server.connection_error');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "222aef9ed1c7e8157ec734b67feafe21", "score": "0.46285284", "text": "public function setupApiRequest()\n\t{\n\t\tglobal $Security;\n\n\t\t// Check security for API request\n\t\tIf (ValidApiRequest()) {\n\t\t\tif ($Security->isLoggedIn()) $Security->TablePermission_Loading();\n\t\t\t$Security->loadCurrentUserLevel(Config(\"PROJECT_ID\") . $this->TableName);\n\t\t\tif ($Security->isLoggedIn()) $Security->TablePermission_Loaded();\n\t\t\t$Security->UserID_Loading();\n\t\t\t$Security->loadUserID();\n\t\t\t$Security->UserID_Loaded();\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "632a25455801d2eccc842d4ff9828bb1", "score": "0.4627504", "text": "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t/*$error['INPUT']['parent_id'] = $validate->pasteString($request->element('parent_id'));*/\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\t/*$error['INPUT']['sort_type'] = $validate->pasteString($request->element('sort_type'));\n\t$error['INPUT']['sort_dir'] = $validate->pasteString($request->element('sort_dir'));*/\n\t$error['INPUT']['display'] = $validate->pasteString($request->element('display'));\n\t$error['INPUT']['ipp'] = $validate->validInteger($request->element('ipp'),$amessages['items_per_page']);\n\t/*$error['INPUT']['landing'] = $validate->pasteString($request->element('landing'));\n\tif($error['INPUT']['landing']['value']) $error['INPUT']['landing_page'] = $validate->validString($request->element('landing_page'),$amessages['landing_page']);*/\n\t\n\tif($error['INPUT']['name']['error'] || $error['INPUT']['ipp']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "title": "" }, { "docid": "17b6ca4a6ab52e92a6e6fcd51af19c13", "score": "0.46258628", "text": "function getRequestArray($request_text){\n $http_methods=['GET','PUT','HEAD','PATCH','DELETE','POST'];\n $request_text =htmlspecialchars(substr($request_text,1,-1), ENT_QUOTES); #remove trailing and leading quotes\n $request_arr=preg_split(\"/[\\s]+/\",$request_text); \n $protocol = end($request_arr);\n $protocol_arr= explode(\"/\",$protocol);\n if(!empty($protocol_arr) && $protocol_arr[0]==\"HTTP\"){\n array_pop($request_arr);\n }else{\n $protocol_arr[0]=\"N/A\";\n $protocol_arr[1]=\"\";\n }\n if(in_array($request_arr[0],$http_methods)){\n $method=$request_arr[0];\n array_shift($request_arr);\n }else{\n $method=\"N/A\";\n }\n $url = implode(\" \",$request_arr);\n $request = array(\n \"method\"=>$method,\n \"url\"=>$url,\n \"protocol\"=>$protocol_arr[0],\n \"protocol_version\"=>$protocol_arr[1],\n ); \n //echo print_r($request).\"<br>\";\n return $request;\n}", "title": "" }, { "docid": "883e409b86bdd9877a30fdad4ca0de98", "score": "0.46256647", "text": "public function validateFile(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "525393be799559f98f77d261c12b4278", "score": "0.46219647", "text": "private function getValidApiRequest()\n {\n return [\n 'id' => '5cc06b9fadccf621f80217d0',\n 'name' => 'Review',\n 'description' => 'Review description',\n 'disabled' => 'false',\n 'allowallpaths' => 'false',\n 'type' => '3',\n 'attribute0_attributeid' => '5cc06b9fadccf621f80217ce',\n 'attribute0_name' => 'String',\n 'attribute0_description' => 'String description',\n 'attribute0_type' => '1',\n 'attribute0_required' => 'true',\n 'attribute0_disabled' => 'false',\n 'attribute0_defaultvalue' => 'Default string',\n 'attribute0_predefinedvalues_total' => '0',\n 'attribute1_attributeid' => '5cc09402adccf621f8021956',\n 'attribute1_name' => 'Int',\n 'attribute1_description' => '',\n 'attribute1_type' => '2',\n 'attribute1_required' => 'true',\n 'attribute1_disabled' => 'false',\n 'attribute1_defaultvalue' => '1000',\n 'attribute1_predefinedvalues_total' => '0',\n 'attribute2_attributeid' => '5cc09402adccf621f8021957',\n 'attribute2_name' => 'Dec',\n 'attribute2_description' => '',\n 'attribute2_type' => '3',\n 'attribute2_required' => 'false',\n 'attribute2_disabled' => 'false',\n 'attribute2_defaultvalue' => '1.1',\n 'attribute2_predefinedvalues_total' => '0',\n 'attribute3_attributeid' => '5cc09402adccf621f8021958',\n 'attribute3_name' => 'Bool',\n 'attribute3_description' => '',\n 'attribute3_type' => '4',\n 'attribute3_required' => 'false',\n 'attribute3_disabled' => 'false',\n 'attribute3_defaultvalue' => 'true',\n 'attribute3_predefinedvalues_total' => '0',\n 'attribute4_attributeid' => '5cc09402adccf621f8021959',\n 'attribute4_name' => 'Date',\n 'attribute4_description' => '',\n 'attribute4_type' => '5',\n 'attribute4_required' => 'false',\n 'attribute4_disabled' => 'false',\n 'attribute4_defaultvalue' => '2019-04-03 00:00:00',\n 'attribute4_predefinedvalues_total' => '0',\n 'attribute5_attributeid' => '5cc09402adccf621f802195a',\n 'attribute5_name' => 'Select',\n 'attribute5_description' => '',\n 'attribute5_type' => '6',\n 'attribute5_required' => 'false',\n 'attribute5_disabled' => 'false',\n 'attribute5_defaultvalue' => 'A',\n 'attribute5_predefinedvalue0' => 'A',\n 'attribute5_predefinedvalue1' => 'B',\n 'attribute5_predefinedvalue2' => 'C',\n 'attribute5_predefinedvalues_total' => '3',\n 'attribute6_attributeid' => '5cc09402adccf621f802195b',\n 'attribute6_name' => 'Array',\n 'attribute6_description' => '',\n 'attribute6_type' => '7',\n 'attribute6_required' => 'false',\n 'attribute6_disabled' => 'false',\n 'attribute6_defaultvalue' => 'a,b,c,d',\n 'attribute6_predefinedvalues_total' => '0',\n 'attributes_total' => '7',\n 'user0_name' => 'user1',\n 'user0_read' => 'true',\n 'user0_write' => 'true',\n 'users_total' => '1',\n 'group0_id' => '55557777bbbbccccddddaaaa',\n 'group0_name' => 'EVERYONE',\n 'group0_read' => 'true',\n 'group0_write' => 'true',\n 'groups_total' => '1',\n 'path0' => '/user1',\n 'paths_total' => '1',\n ];\n }", "title": "" }, { "docid": "af1bcea330d9848b61a87b51f5af0c1c", "score": "0.46183273", "text": "private function loadConf() {\n\t\t$data\t= File::load( \\BASE . $this->file, \\BASE );\n\t\tif ( empty( $data ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( !empty( $this->key ) ) {\n\t\t\t$crypto\t= Crypto::getInstance();\n\t\t\t$data\t= $crypto->decrypt( $data, $this->key );\n\t\t}\n\t\t\n\t\t$params\t= json_decode( utf8_encode( $data ), true, 7 );\n\t\tif ( empty( $params ) ) {\n\t\t\t$params = array();\n\t\t}\n\t\t$this->params = $params;\n\t}", "title": "" }, { "docid": "c6d944ca7c8f47ca825136275e52b170", "score": "0.46182415", "text": "function verify_method($operation,$request){\n\t\tif(isset($this->wsdl) && is_object($this->wsdl)){\n\t\t\tif($this->wsdl->getOperationData($operation)){\n\t\t\t\treturn true;\n\t\t\t}\n\t } elseif(isset($this->operations[$operation])){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
b920438b8c5ed70a7c468bb4ee60401d
constructor BUG : Use of undefined constant XOBJ_DTYPE_STRING
[ { "docid": "fe079cd87fdc840a30157d00f3588f8d", "score": "0.0", "text": "function weblinks_atomfeed()\n{\n\t$this->happy_linux_object();\n\n\t$this->initVar('aid', XOBJ_DTYPE_INT, 0, false);\n\t$this->initVar('lid', XOBJ_DTYPE_INT, 0, false);\n\t$this->initVar('site_title', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('site_url', XOBJ_DTYPE_URL, null, false, 255);\n\t$this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('url', XOBJ_DTYPE_URL, null, false, 255);\n\t$this->initVar('entry_id', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('guid', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('time_modified', XOBJ_DTYPE_INT, 0, false);\n\t$this->initVar('time_issued', XOBJ_DTYPE_INT, 0, false);\n\t$this->initVar('time_created', XOBJ_DTYPE_INT, 0, false);\n\t$this->initVar('author_name', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('author_url', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('author_email', XOBJ_DTYPE_TXTBOX, null, false, 255);\n\t$this->initVar('content', XOBJ_DTYPE_TXTAREA);\n\n}", "title": "" } ]
[ { "docid": "e1f316b69cb8e07eb61ea6ba16773074", "score": "0.6278159", "text": "private function construct0args() {\n parent::__construct(PdfObject::STRING);\n }", "title": "" }, { "docid": "24fc6bea6d184b6d8694ef07004798dd", "score": "0.6071728", "text": "function __construct()\n {\n parent::__construct( self::DATA_TYPE_STRING, ezpI18n::tr( 'kernel/classes/datatypes', 'Amazon S3 Upload Client', 'Datatype name' ),\n array( 'serialize_supported' => true,\n 'object_serialize_map' => array( 'data_text' => 'text' ) ) );\n }", "title": "" }, { "docid": "61b3b7dc70e6881fc6ff4687d64c7905", "score": "0.57830244", "text": "function init()\n\t{\n\t\t$this->setType(\"repobj\");\n\t}", "title": "" }, { "docid": "9719f8f6154602b13b3aa9c61350a3b9", "score": "0.5659406", "text": "function XSDType()\n {\n }", "title": "" }, { "docid": "452ee3d81768641fbb400b66805fcc23", "score": "0.55743104", "text": "function _new_instance(){\n\t\t$x = new XMole();\n\t\t$x->_trim_data = $this->_trim_data;\n\t\t$x->_input_encoding = $this->_input_encoding;\n\t\t$x->_output_encoding = $this->_output_encoding;\n\t\treturn $x;\n\t}", "title": "" }, { "docid": "da23ec9c1b934c334b00d5760a320551", "score": "0.5564746", "text": "public function __construct($TType = NULL) \n {\n parent::__construct('string');\n }", "title": "" }, { "docid": "67f51b14da2e0cd15e08b01cbcf61cc0", "score": "0.5492199", "text": "function prepare_obj(){\n foreach($this->objects as $key=>$val){\n if(is_numeric($key)){\n\tif(is_string($val)) { $key = $val; $val = TRUE;}\n }\n if($val===FALSE) continue;\n if($val===TRUE) $mth = $key;\n else if(is_string($val)) $mth = $val;\n else if(is_array($val)) $mth = def($val,'class',def($val));\n if(is_string($mth)) $this->prep_obj_str($mth,$key,$val);\n }\n }", "title": "" }, { "docid": "14397ff193d7f47ee6df29e80bc51823", "score": "0.53659767", "text": "public function __construct() {\n\t\t$this->object_types = array( 'tms_object' );\n\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "e1f50cd94f86a6d65410de5e17663b73", "score": "0.53597033", "text": "public function __construct(){\n\t\t$this->ocs_content = new EModel(\"ocs_content\");\n\t}", "title": "" }, { "docid": "c41c57b08de1cf56d7a680f4b82a6e3b", "score": "0.5358302", "text": "public function testConstructing()\n {\n $oTag = oxNew('oxTag');\n $this->assertEquals(\"\", $oTag->get());\n\n $oTag = new oxTag(\"test\");\n $this->assertEquals(\"test\", $oTag->get());\n }", "title": "" }, { "docid": "0532a296767f2a78b3a1fad9796f5af5", "score": "0.53435695", "text": "public function __construct()\n {\n $this->str = new Str();\n\n parent::__construct();\n }", "title": "" }, { "docid": "8d4bb6041fd17cd3029dd4857c5aa32b", "score": "0.53407025", "text": "private function _constructor(){\n \n }", "title": "" }, { "docid": "88c4f0afc63c2d75165b579be2b10069", "score": "0.5326907", "text": "public function __construct()\n {\n parent::__construct( self::DATATYPE_STRING, 'ymcDateTime' );\n }", "title": "" }, { "docid": "e3303de25dacf85fab79bbb66b068f35", "score": "0.5318699", "text": "public function __construct() {\n libxml_use_internal_errors(true);\n }", "title": "" }, { "docid": "797e36be4d62d428d122452a696fef73", "score": "0.53132194", "text": "public function __constructor() {\n\n\t}", "title": "" }, { "docid": "10ffac59bfe521b5883934b767481c82", "score": "0.5286404", "text": "function __construct($stdClassResultParcelInfoEx) {\n $this->_seqNo = isset($stdClassResultParcelInfoEx->seqNo) ? $stdClassResultParcelInfoEx->seqNo : null;\n $this->_parcelId = isset($stdClassResultParcelInfoEx->parcelId) ? $stdClassResultParcelInfoEx->parcelId : null;\n $this->_weightMeasured = isset($stdClassResultParcelInfoEx->weightMeasured) ? $stdClassResultParcelInfoEx->weightMeasured : null;\n $this->_weightDeclared = isset($stdClassResultParcelInfoEx->weightDeclared) ? $stdClassResultParcelInfoEx->weightDeclared : null;\n $this->_sizeMeasured = isset($stdClassResultParcelInfoEx->sizeMeasured) ? new Size($stdClassResultParcelInfoEx->sizeMeasured) : null;\n $this->_sizeDeclared = isset($stdClassResultParcelInfoEx->sizeDeclared) ? new Size($stdClassResultParcelInfoEx->sizeDeclared) : null;\n $this->_foreignParcelNumber = isset($stdClassResultParcelInfoEx->foreignParcelNumber) ? $stdClassResultParcelInfoEx->foreignParcelNumber : null;\n $this->_packId = isset($stdClassResultParcelInfoEx->packId) ? $stdClassResultParcelInfoEx->packId : null;\n $this->_foreignParcelNumbersList = isset($stdClassResultParcelInfoEx->foreignParcelNumbersList) ? $stdClassResultParcelInfoEx->foreignParcelNumbersList : null;\n }", "title": "" }, { "docid": "deeab8adcb063d3cddcb799565fc9fd4", "score": "0.5268253", "text": "function __construct(&$xmlArr, $formObj)\n {\n parent::__construct($xmlArr, $formObj);\n $this->readMetaData($xmlArr);\n $this->translate();\n }", "title": "" }, { "docid": "d95065509cc1d0b4a6050f28f4592eed", "score": "0.52517647", "text": "function __constructor(){}", "title": "" }, { "docid": "2360fcaffee8631759376f7cbd9322dd", "score": "0.5234945", "text": "public function _CONSTRUCT()\n {\n \n }", "title": "" }, { "docid": "f140b02c9153328ce629e5c8ba664678", "score": "0.52344066", "text": "public function __CONSTRUCT(){\n }", "title": "" }, { "docid": "514bda6473ef25a0eacc9d714905fd2f", "score": "0.5223872", "text": "public function __CONSTRUCT(){\n }", "title": "" }, { "docid": "ab8b861f44f0a2fd01c15b9c86b96d5c", "score": "0.5208087", "text": "function __construct()\n {\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, \"PclXmlTag::__construct\", \"\");\n $v_result = PCLXML_ERR_NO_ERROR;\n \n $this->name = '';\n $this->att = array();\n $this->childs = array();\n $this->data = ''; \n $this->working_data = array();\n \n // ----- Return\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\n return $v_result;\n }", "title": "" }, { "docid": "4e9409336a7c82e9366f3b954b7284f9", "score": "0.520081", "text": "function __construct(/* ... */){\n $this->reset(14);\n $ar = func_get_args();\n $str = array('title','charset');\n $bool = array('xhtml');\n foreach($ar as $ca){\n if(is_bool($ca)) $this->prop[array_shift($bool)] = $ca;\n else if(is_string($ca)) $this->prop[array_shift($str)] = $ca;\n else if(is_array($ca)) foreach($ca as $key=>$val) $this->set($key,$val);\n else if(is_object($ca)){\n\tif ($ca instanceof opc_fw) $this->imply_fw($ca);\n\telse if($ca instanceof _tools_) $this->imply_tool($ca);\n\telse if($ca instanceof opc_ht2) $this->imply_ht2($ca);\n }\n }\n foreach($this->def as $key=>$val) if(!isset($this->prop[$key])) $this->prop[$key] = $val;\n }", "title": "" }, { "docid": "2d2c8c12827d073693f615abf467f524", "score": "0.513805", "text": "function __construct($arg=null)\n {\n $this->data = $arg;\n $this->type = typeOf($arg);\n }", "title": "" }, { "docid": "c61e916c4668cc283c082c6bb667dad5", "score": "0.5134065", "text": "public function LiteratureReferenceType()\n{\n$com['sim'][0]=[];\n$com['sim'][0]['ext'][0]=['base'=>'xsd:string'];\nreturn $com;\n}", "title": "" }, { "docid": "a8ae7b4235800262ea8f8edf599b1d37", "score": "0.5118503", "text": "protected function construct() {}", "title": "" }, { "docid": "1843db1210d0a4ffc97bbc7a25b1c00e", "score": "0.51159483", "text": "public function __construct() {\n $vars = array_keys(get_xml_vars($this));\n $args = func_get_args();\n for ($i = 0, $l = func_num_args(); $i < $l; $i++) {\n $value = func_get_arg($i);\n if ($value !== null) {\n if (is_string($value))\n $value = self::xmlentities($value); \n $this->$vars[$i] = $value;\n } \n }\n }", "title": "" }, { "docid": "e6b5e362bfde0be3a7bca532798a749f", "score": "0.511144", "text": "public function __construct($_referenceDescription = NULL,$_referenceType = NULL,$_referencePackageNumber = NULL)\n {\n parent::__construct(array('referenceDescription'=>$_referenceDescription,'referenceType'=>$_referenceType,'referencePackageNumber'=>$_referencePackageNumber),false);\n }", "title": "" }, { "docid": "22c67767f4349fdecfb2f247d811c8c6", "score": "0.51097983", "text": "public function testConvert()\n {\n $data = '<?xml version=\"1.0\"?><root><bill id=\"abc-113\"></bill></root>';\n \n $output = new \\FurryBear\\Output\\Strategy\\XmlToObject();\n $obj = $output->convert($data);\n \n $this->assertInternalType('object', $obj);\n $this->assertObjectHasAttribute('bill', $obj);\n $this->assertInstanceOf('\\\\SimpleXMLElement', $obj->bill);\n }", "title": "" }, { "docid": "ef9b405686b459eca5591dc577468f9d", "score": "0.5106019", "text": "function setXtype($xtype=\"\") {\n $this->xtype = $xtype;\n }", "title": "" }, { "docid": "ca2dc6af474e4854483594b7ab937c11", "score": "0.5105512", "text": "public function DocumentationType()\n{\n$com['sim'][0]=[];\n$com['sim'][0]['ext'][0]=['base'=>'xsd:string'];\nreturn $com;\n}", "title": "" }, { "docid": "dca37e1f714a2c0d01ed880f01a5ae8e", "score": "0.5094769", "text": "function __construc()\n {\n\n }", "title": "" }, { "docid": "41eff0f9a2cfa21b8accc65c726703a6", "score": "0.5093138", "text": "function __construct($str_func)\n {\n //--- (YCarbonDioxide constructor)\n parent::__construct($str_func);\n $this->_className = 'CarbonDioxide';\n\n //--- (end of YCarbonDioxide constructor)\n }", "title": "" }, { "docid": "5c064b717d724f023fe659dc249efab8", "score": "0.5089621", "text": "public function __constructor() {\n \n }", "title": "" }, { "docid": "f8350cd6ef4a863001c7df3d6bcd56fc", "score": "0.50893044", "text": "public function __construct($OID, $desc, $convertType, $ips_var){\n $this->OID = $OID;\n $this->desc = $desc;\n $this->convertType = $convertType;\n $this->ips_var = $ips_var;\n }", "title": "" }, { "docid": "d1738d0b084f6d99c7c59bad353a69ec", "score": "0.5075796", "text": "public function __toString(){\n return 'Comm';\n \n }", "title": "" }, { "docid": "a65e1516f411ee77f76075ed20afb65c", "score": "0.50686944", "text": "public function __construct()\n {\n parent::__construct();\n $this->init('oxattribute');\n }", "title": "" }, { "docid": "2a2bd38f0d4ecec86a7b2d78ececfbc0", "score": "0.5067135", "text": "public function _construct()\r\n {\r\n $this->_init('vendorsrma/type', 'type_id');\r\n }", "title": "" }, { "docid": "14efcd0027d5083ae717bf6c3990a330", "score": "0.50636363", "text": "public function __construct($_codigoBaseGeografica = NULL,$_codigoIndicador = NULL,$_codigoMomento = NULL,$_codigoPeriodicidade = NULL,$_codigoPrograma = NULL,$_codigoUnidadeMedidaIndicador = NULL,$_dataApuracao = NULL,$_descricao = NULL,$_exercicio = NULL,$_fonte = NULL,$_formula = NULL,$_identificadorUnico = NULL,$_snApuracaoReferencia = NULL,$_snExclusaoLogica = NULL,$_valorReferencia = NULL)\n\t{\n\t\tQualitativoWsdlClass::__construct(array('codigoBaseGeografica'=>$_codigoBaseGeografica,'codigoIndicador'=>$_codigoIndicador,'codigoMomento'=>$_codigoMomento,'codigoPeriodicidade'=>$_codigoPeriodicidade,'codigoPrograma'=>$_codigoPrograma,'codigoUnidadeMedidaIndicador'=>$_codigoUnidadeMedidaIndicador,'dataApuracao'=>$_dataApuracao,'descricao'=>$_descricao,'exercicio'=>$_exercicio,'fonte'=>$_fonte,'formula'=>$_formula,'identificadorUnico'=>$_identificadorUnico,'snApuracaoReferencia'=>$_snApuracaoReferencia,'snExclusaoLogica'=>$_snExclusaoLogica,'valorReferencia'=>$_valorReferencia));\n\t}", "title": "" }, { "docid": "a3c0e3a0da0b4a5a1722a0a327f9ebe0", "score": "0.5056625", "text": "public function initFromArray($o) {\n parent::initFromArray($o);\n if( isset($o['type']) ) {\n $this->type = $o[\"type\"];\n }\n $this->names = array();\n if( isset($o['names']) ) {\n foreach( $o['names'] as $i => $x ) {\n $this->names[$i] = new \\Org\\Gedcomx\\Common\\TextValue($x);\n }\n }\n if( isset($o['temporalDescription']) ) {\n $this->temporalDescription = new \\Org\\Gedcomx\\Conclusion\\DateInfo($o[\"temporalDescription\"]);\n }\n if( isset($o['latitude']) ) {\n $this->latitude = $o[\"latitude\"];\n }\n if( isset($o['longitude']) ) {\n $this->longitude = $o[\"longitude\"];\n }\n if( isset($o['spatialDescription']) ) {\n $this->spatialDescription = new \\Org\\Gedcomx\\Common\\ResourceReference($o[\"spatialDescription\"]);\n }\n }", "title": "" }, { "docid": "69b06b7690afea93e2ccbc0500b7e2c5", "score": "0.5054074", "text": "public function getClassStringObjectType(): Type;", "title": "" }, { "docid": "09edd0ad9b11673d16a6b84917734468", "score": "0.50463367", "text": "function __construct(string $str_json)\n {\n //--- (generated code: YFileRecord constructor)\n //--- (end of generated code: YFileRecord constructor)\n\n $loadval = json_decode($str_json, true);\n $this->_name = $loadval['name'];\n $this->_size = $loadval['size'];\n $this->_crc = $loadval['crc'];\n }", "title": "" }, { "docid": "ee87eeea2d833889818723753257c5f8", "score": "0.50443137", "text": "public function __construct()\n {\n $this->model = new \\stdClass();\n }", "title": "" }, { "docid": "18d57096c7def3e22c2ef5a1275f52a1", "score": "0.50134844", "text": "function get_object(){\n\t\tswitch($this->table){\n\t\t\tcase \"vspc_images\":\n \t\t\t\t$obj = new image();\n \t\t\t\tbreak;\n\t\t\tcase \"vspc_text\":\n \t\t\t\t$obj = new text();\n \t\t\t\tbreak;\n\t\t\tcase \"vspc_columns\":\n \t\t\t\t$obj = new column();\n \t\t\t\tbreak;\n\t\t\tdefault:\n \t\t\t$obj = false;\n\t\t}\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "0e06cc8041bf3d1b0f426c798acbf808", "score": "0.50021946", "text": "public function initFromArray($o) {\n parent::initFromArray($o);\n if( isset($o['type']) ) {\n $this->type = $o[\"type\"];\n }\n $this->sources = array();\n if( isset($o['sources']) ) {\n foreach( $o['sources'] as $i => $x ) {\n $this->sources[$i] = new \\Org\\Gedcomx\\Source\\SourceReference($x);\n }\n }\n $this->identifiers = array();\n if( isset($o['identifiers']) ) {\n foreach( $o['identifiers'] as $i => $x ) {\n $this->identifiers[$i] = new \\Org\\Gedcomx\\Conclusion\\Identifier($x);\n }\n }\n $this->principalPersons = array();\n if( isset($o['principalPersons']) ) {\n foreach( $o['principalPersons'] as $i => $x ) {\n $this->principalPersons[$i] = new \\Org\\Gedcomx\\Common\\ResourceReference($x);\n }\n }\n if( isset($o['primaryEvent']) ) {\n $this->primaryEvent = new \\Org\\Gedcomx\\Common\\ResourceReference($o[\"primaryEvent\"]);\n }\n if( isset($o['collection']) ) {\n $this->collectionRef = new \\Org\\Gedcomx\\Common\\ResourceReference($o[\"collection\"]);\n }\n if( isset($o['descriptor']) ) {\n $this->descriptorRef = new \\Org\\Gedcomx\\Common\\ResourceReference($o[\"descriptor\"]);\n }\n $this->fields = array();\n if( isset($o['fields']) ) {\n foreach( $o['fields'] as $i => $x ) {\n $this->fields[$i] = new \\Org\\Gedcomx\\Records\\Field($x);\n }\n }\n $this->notes = array();\n if( isset($o['notes']) ) {\n foreach( $o['notes'] as $i => $x ) {\n $this->notes[$i] = new \\Org\\Gedcomx\\Common\\Note($x);\n }\n }\n if( isset($o['attribution']) ) {\n $this->attribution = new \\Org\\Gedcomx\\Common\\Attribution($o[\"attribution\"]);\n }\n }", "title": "" }, { "docid": "91d16dffecbcd16d396699057fc05d3c", "score": "0.4995265", "text": "function __construct(string $str_func)\n {\n //--- (YQuadratureDecoder constructor)\n parent::__construct($str_func);\n $this->_className = 'QuadratureDecoder';\n\n //--- (end of YQuadratureDecoder constructor)\n }", "title": "" }, { "docid": "482c392444dd5ff5a8d275339f3e6f62", "score": "0.4978268", "text": "public function __construct($value)\n {\n $this->type = self::XMLRPC_TYPE_STRING;\n\n // Make sure this value is string and all XML characters are encoded\n $this->value = (string) $value;\n }", "title": "" }, { "docid": "b268265412619ac51b5ceee72f0b8fdc", "score": "0.49762195", "text": "protected function initSplObjects( ){\n \n\t}", "title": "" }, { "docid": "29dce9fe9e8f5ff1a307c84287d87da9", "score": "0.4971771", "text": "public function __construct($_industId = NULL,$_name = NULL,$_legalName = NULL,$_contactInfo = NULL,$_deptDivGrp = NULL,$_tINInfo = NULL,$_establishDt = NULL,$_numEmployees = NULL,$_orgId = NULL,$_corpType = NULL,$_corpStatus = NULL,$_corpStatusDt = NULL,$_message = NULL,$_incorporationDt = NULL,$_charterInfo = NULL,$_agentInfo = NULL,$_mergedName = NULL,$_dBAName = NULL,$_priorName = NULL,$_origDtFiled = NULL,$_recentFilingDt = NULL,$_busType = NULL,$_activeStatusInd = NULL,$_busStatusDesc = NULL,$_forProfitInd = NULL,$_ownerRegistrantInfo = NULL,$_orgType = NULL,$_recordID = NULL,$_pRInd = NULL,$_fileNumber = NULL,$_bIN = NULL,$_incorporationState = NULL,$_significantPRInd = NULL,$_busLicense = NULL,$_registrationDetails = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('IndustId'=>$_industId,'Name'=>$_name,'LegalName'=>$_legalName,'ContactInfo'=>$_contactInfo,'DeptDivGrp'=>$_deptDivGrp,'TINInfo'=>$_tINInfo,'EstablishDt'=>$_establishDt,'NumEmployees'=>$_numEmployees,'OrgId'=>$_orgId,'CorpType'=>$_corpType,'CorpStatus'=>$_corpStatus,'CorpStatusDt'=>$_corpStatusDt,'Message'=>$_message,'IncorporationDt'=>$_incorporationDt,'CharterInfo'=>$_charterInfo,'AgentInfo'=>$_agentInfo,'MergedName'=>$_mergedName,'DBAName'=>$_dBAName,'PriorName'=>$_priorName,'OrigDtFiled'=>$_origDtFiled,'RecentFilingDt'=>$_recentFilingDt,'BusType'=>$_busType,'ActiveStatusInd'=>$_activeStatusInd,'BusStatusDesc'=>$_busStatusDesc,'ForProfitInd'=>$_forProfitInd,'OwnerRegistrantInfo'=>$_ownerRegistrantInfo,'OrgType'=>$_orgType,'RecordID'=>$_recordID,'PRInd'=>$_pRInd,'FileNumber'=>$_fileNumber,'BIN'=>$_bIN,'IncorporationState'=>$_incorporationState,'SignificantPRInd'=>$_significantPRInd,'BusLicense'=>$_busLicense,'RegistrationDetails'=>$_registrationDetails),false);\n }", "title": "" }, { "docid": "0ef41a9150bb3549634168af11d25108", "score": "0.49609363", "text": "function __construct($object)\n{\n\t$this->daten=array();\n\t$this->columnnames=array();\n\t$this->object=$object;\n}", "title": "" }, { "docid": "bce8669cbe5de86e90bcac4ab9a6048d", "score": "0.49596268", "text": "public function __construct(object $src);", "title": "" }, { "docid": "d3a4c079fba2198b27a1ee0e8cc89bd9", "score": "0.49521914", "text": "public function __construct(){\n\t\techo __METHOD__.__LINE__.'<br>';\n\t\t$msgObj = new $$this->msgObj();\n\t\t'HTTP_API';\n\t\t\n\t\t$raw_data = $this->request();\n\t\t#REST_API::parseRequest($raw_data);\n\t\tif(FALSE !== $raw_data){\n\t\t\t$this->raw_data = $raw_data;\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "bf370ba0860c0c2421a1da904e4b5b1a", "score": "0.4951832", "text": "public function __constructor( ){\n\t\t$this->initSplObjects(); \n\t}", "title": "" }, { "docid": "2d8d52981525ce5412093b112f94af1a", "score": "0.495067", "text": "function __construct ($intType)\n\t\t{\n\t\t\tparent::__construct ('ProvisioningRequestType');\n\t\t\t\n\t\t\t$strName = 'Unknown';\n\t\t\t\n\t\t\tswitch ($intType)\n\t\t\t{\n\t\t\t\tcase REQUEST_FULL_SERVICE:\n\t\t\t\t\t$strName = 'Full Service';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_PRESELECTION:\n\t\t\t\t\t$strName = 'Preselection';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_BAR_SOFT:\n\t\t\t\t\t$strName = 'Soft Bar';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_UNBAR_SOFT:\n\t\t\t\t\t$strName = 'Soft Bar Reversal';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_ACTIVATION:\n\t\t\t\t\t$strName = 'Activation';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_DEACTIVATION:\n\t\t\t\t\t$strName = 'Deactivation';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_PRESELECTION_REVERSE:\n\t\t\t\t\t$strName = 'Preselection Reversal';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_FULL_SERVICE_REVERSE:\n\t\t\t\t\t$strName = 'Full Service Reversal';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_BAR_HARD:\n\t\t\t\t\t$strName = 'Hard Bar';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase REQUEST_UNBAR_HARD:\n\t\t\t\t\t$strName = 'Hard Bar Reversal';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase REQUEST_VIRTUAL_PRESELECTION:\n\t\t\t\t\t$strName = 'Virtual Preselection';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->oblintType\t\t= $this->Push (new dataInteger\t('Id',\t\t$intType));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t}", "title": "" }, { "docid": "17ac348dca63f8a7aceea9fa50278269", "score": "0.4946482", "text": "public function __construct($param){\r\n parent::__construct($param);\r\n $this->type = $param['type'];\r\n $this->memory = $param['memory'];\r\n parent::registerProduct($this);\r\n }", "title": "" }, { "docid": "83b5e5979cfe219f119de3c8f71a07e2", "score": "0.49463573", "text": "public function __construct($_reportedDt = NULL,$_orgInfo = NULL,$_actionCode = NULL,$_action = NULL,$_causeCode = NULL,$_agencyCode = NULL,$_crossRefNameAddr = NULL,$_comments = NULL)\n {\n MicrobiltWsdlClass::__construct(array('ReportedDt'=>$_reportedDt,'OrgInfo'=>$_orgInfo,'ActionCode'=>$_actionCode,'Action'=>$_action,'CauseCode'=>$_causeCode,'AgencyCode'=>$_agencyCode,'CrossRefNameAddr'=>$_crossRefNameAddr,'Comments'=>$_comments),false);\n }", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.49457198", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "8ed359ed042e40caa4beaf6d9bd9c9b5", "score": "0.49432632", "text": "public function __construct($_productType = NULL,$_productInfo = NULL,$_decision = NULL,$_variableInfo = NULL,$_pathInfo = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('ProductType'=>$_productType,'ProductInfo'=>$_productInfo,'Decision'=>$_decision,'VariableInfo'=>$_variableInfo,'PathInfo'=>$_pathInfo),false);\n }", "title": "" }, { "docid": "acd9ba11013ef2b4724ef7d1d911b7b0", "score": "0.49431306", "text": "public function __construct()\n {\n parent::__construct();\n\n // Set data types\n $this->data_types = array(\n 'tag_id' => 'numeric',\n 'users_to_mark_id' => 'numeric',\n 'user_id' => 'numeric'\n );\n\n }", "title": "" }, { "docid": "ed0b48de05e7dfd703720acea37a6816", "score": "0.49417955", "text": "public function __construct()\n {\n $this->typeList = array(\n 'helicopter' =>'\\Helicopter',\n 'car' => '\\Car',\n 'battleship' => '\\Battleship'\n );\n }", "title": "" }, { "docid": "448559fbffc0e396deceb75140a732ee", "score": "0.4941524", "text": "function __construct($string)\r\n {\r\n\r\n $obj =json_decode($string);\r\n $result = array('id' =>$obj -> {'id'} ,\r\n 'qtyUnite1' =>$obj -> {'qtyUnite1'} ,\r\n 'qtyUnite2' =>$obj -> {'qtyUnite2'} ,\r\n 'lvlFerme' =>$obj -> {'lvlFerme'} ,\r\n 'lvlScierie' =>$obj -> {'lvlScierie'} ,\r\n 'lvlCaserne' =>$obj -> {'lvlCaserne'} ,\r\n 'lvlArcherie' =>$obj -> {'lvlArcherie'} ,\r\n 'lvlCentreVille' =>$obj -> {'lvlCentreVille'} ,\r\n 'qtyNouriture' =>$obj -> {'qtyNouriture'} ,\r\n 'qtyBois' =>$obj -> {'qtyBois'} ,\r\n 'qtyOr' =>$obj -> {'qtyOr'} );\r\n $this->hydrate( $result);\r\n }", "title": "" }, { "docid": "e6148af87bc7a0ed7995ee37ca5e9c36", "score": "0.49403253", "text": "function __construct() {\n $this->excelOperator=new ExcelOperator();\n $this->arrayCoords=array();\n $this->distancesMatrix=array();\n $this->arrayCoordsSecuence=array();\n $this->stringSecuenceCoords=\"\";\n }", "title": "" }, { "docid": "290eae79cc3537135951498e65885c60", "score": "0.4939981", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('xmlrpc');\n\t\t$this->load->library('xmlrpcs');\n\t\t// $this->xmlrpc->set_debug(TRUE);\n\t}", "title": "" }, { "docid": "5e503cd2950dc7c5aaaadfb9c19d8b93", "score": "0.49250275", "text": "function GenerateObject($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver)\n\t{\n\t\trequire_once (\"../include/configuration.php\");\n\t\trequire_once (\"../include/class.misc.php\");\n\n\n\t\t//added these so that POG would still generate something even if invalid variables are passed\n\t\t//this is so that users see something being generated even if they don't fill in the object fields\n\t\tif ($objectName == null)\n\t\t{\n\t\t\t$objectName = '';\n\t\t}\n\t\tif ($attributeList == null)\n\t\t{\n\t\t\t$attributeList = array();\n\t\t}\n\t\tif ($typeList == null)\n\t\t{\n\t\t\t$attributeList = array();\n\t\t}\n\t\tif ($language == null)\n\t\t{\n\t\t\t$language = '';\n\t\t}\n\t\tif ($wrapper == null)\n\t\t{\n\t\t\t$wrapper = '';\n\t\t}\n\t\tif ($pdoDriver == null)\n\t\t{\n\t\t\t$pdoDriver = '';\n\t\t}\n\n\t\tif (strtoupper($wrapper) == \"PDO\")\n\t\t{\n\t\t\trequire_once \"../object_factory/class.object\".$language.strtolower($wrapper).$pdoDriver.\".php\";\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\tif (strtolower($language) == \"php4\")\n\t\t\t{\n\t\t\t\trequire_once \"../object_factory/class.objectphp4pogmysql.php\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trequire_once \"../object_factory/class.objectphp5pogmysql.php\";\n\t\t\t}\n\t\t}\n\t\t$object = new Object($objectName,$attributeList,$typeList,$pdoDriver);\n\t\t$object->BeginObject();\n\t\t$object->CreateMagicGetterFunction();\n\t\t$object->CreateConstructor();\n\t\t$object->CreateGetFunction();\n\t\t$object->CreateGetListFunction();\n\t\t$object->CreateSaveFunction((in_array(\"HASMANY\", $typeList) || in_array(\"JOIN\", $typeList)));\n\t\t$object->CreateSaveNewFunction((in_array(\"HASMANY\", $typeList) || in_array(\"JOIN\", $typeList)));\n\t\t$object->CreateDeleteFunction((in_array(\"HASMANY\", $typeList) || in_array(\"JOIN\", $typeList)));\n\t\t$object->CreateDeleteListFunction((in_array(\"HASMANY\", $typeList) || in_array(\"JOIN\", $typeList)));\n\n\t\t$i = 0;\n\t\tforeach ($typeList as $type)\n\t\t{\n\t\t\tif ($type == \"HASMANY\")\n\t\t\t{\n\t\t\t\t$object->CreateGetChildrenFunction($attributeList[$i]);\n\t\t\t\t$object->CreateSetChildrenFunction($attributeList[$i]);\n\t\t\t\t$object->CreateAddChildFunction($attributeList[$i]);\n\t\t\t}\n\t\t\telse if ($type == \"BELONGSTO\")\n\t\t\t{\n\t\t\t\t$object->CreateGetParentFunction($attributeList[$i]);\n\t\t\t\t$object->CreateSetParentFunction($attributeList[$i]);\n\t\t\t}\n\t\t\telse if ($type == \"JOIN\")\n\t\t\t{\n\t\t\t\t$object->CreateSetAssociationsFunction($attributeList[$i]);\n\t\t\t\t$object->CreateGetAssociationsFunction($attributeList[$i]);\n\t\t\t\t$object->CreateAddAssociationFunction($attributeList[$i]);\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\t$object->EndObject();\n\t\treturn base64_encode($object->string);\n\t}", "title": "" }, { "docid": "b90292c2829d019f866bcc41189b7334", "score": "0.49212235", "text": "public function xTypeConfig();", "title": "" }, { "docid": "25991ab697cde1d6417955a8eadc8e12", "score": "0.49182", "text": "public function __construct($dataObject, $type)\n {\n\t\t\t\t\n\t\t$this->type = $type;\n\t\t\n\t\t$this->dataObject = $dataObject;\n\t\t\t\n\t\t\n }", "title": "" }, { "docid": "726bec29b5c2471291512b525ad27ab8", "score": "0.49171045", "text": "private function __construct(){\r\n\r\n\t\t}", "title": "" }, { "docid": "2555350fe44e32159eec735031ec6f19", "score": "0.49159682", "text": "final private function __construct() {\n\t\t}", "title": "" }, { "docid": "2f76a41c2d953662ef674de5e2af9945", "score": "0.4913327", "text": "function __construct($charset = 'UTF-8')\n {\n $this->conf = array();\n $this->conf['error'] = '<br /><strong>Error on line %s of '.__FILE__.'</strong>: %s<br />';\n $this->conf['cache_path'] = dirname(__FILE__);\n $this->conf['cache_time'] = 180;\n $this->conf['debug_mode'] = true;\n $this->conf['fetch_mode'] = ONYX_FETCH_ASSOC;\n\n if (!function_exists('xml_parser_create'))\n {\n $this->raiseError((__LINE__-2), ONYX_ERR_NO_PARSER);\n return false;\n }\n\n if ($charset == 'native') {\n $charset = LANG_CHARSET;\n }\n $this->parser = @xml_parser_create($charset);\n if (!is_resource($this->parser))\n {\n $this->raiseError((__LINE__-3), ONYX_ERR_NO_PARSER);\n return false;\n }\n xml_set_object($this->parser, $this);\n xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n @xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, LANG_CHARSET);\n xml_set_element_handler($this->parser, 'tag_open', 'tag_close');\n xml_set_character_data_handler($this->parser, 'cdata');\n }", "title": "" }, { "docid": "4d3b4da22f72b247a5a406ef63de4f8b", "score": "0.4908667", "text": "public function __construct(array $package, array $sourceObj)\n\t{\n\t\tparent::__construct($package, $sourceObj);\n\t}", "title": "" }, { "docid": "08d98c03f4607b1a411831140a27262b", "score": "0.49045047", "text": "abstract function __toString();", "title": "" }, { "docid": "08d98c03f4607b1a411831140a27262b", "score": "0.49045047", "text": "abstract function __toString();", "title": "" }, { "docid": "27ca34f60d41e1eba739aa30ab2b0c65", "score": "0.49004364", "text": "function __toString();", "title": "" }, { "docid": "240ee0bbb2300d5c92268db945aa171d", "score": "0.48987395", "text": "abstract public function __toString();", "title": "" }, { "docid": "240ee0bbb2300d5c92268db945aa171d", "score": "0.48987395", "text": "abstract public function __toString();", "title": "" }, { "docid": "240ee0bbb2300d5c92268db945aa171d", "score": "0.48987395", "text": "abstract public function __toString();", "title": "" }, { "docid": "240ee0bbb2300d5c92268db945aa171d", "score": "0.48987395", "text": "abstract public function __toString();", "title": "" }, { "docid": "240ee0bbb2300d5c92268db945aa171d", "score": "0.48987395", "text": "abstract public function __toString();", "title": "" }, { "docid": "346f9ad9b7221543f44fe576c793680e", "score": "0.4897302", "text": "public function __construct($extSpecialParamsArray)\n {\n $this->specialParamsArray = $extSpecialParamsArray;\n $objectId = $extSpecialParamsArray['object'];\n $dynamicRoleModel = $extSpecialParamsArray['drole'];\n $active = 1;\n\n if ($dynamicRoleModel == '' || $dynamicRoleModel === false) {\n echo \"[not found. exit]\";\n return -1;\n } else {\n echo \"[drole: \" . $dynamicRoleModel . \"]\";\n }\n $this->assemblyID = DynamicAssemblyForObject::findOne([self::$dynamicRoleFieldName => $dynamicRoleModel, self::$objectFieldName => $objectId, self::$activeFieldName => $active])->assembly_id;\n if ($this->assemblyID == '' || $this->assemblyID === false) {\n echo \"[not found. exit]\";\n return -2;\n } else {\n echo \"[assembly: \" . $this->assemblyID . \"]\";\n }\n $extObjectName = RegistryObjectValues::findOne([id => $objectId])->name;\n if ($extObjectName == '' || $extObjectName === false) {\n echo \"[not found. exit]\";\n return;\n } else {\n echo \"[\" . $extObjectName . \"]\";\n }\n $this->specialParamsArray['object_title'] = $extObjectName;\n $assemblyUseModel = new ObjectAssemblyUseModel($extObjectName);\n $sqlProviderAssembly = $assemblyUseModel->getAssemblyUsingFieldsObject($this->assemblyID);\n $this->assemblyFieldsArray = $sqlProviderAssembly->getModels();\n $structureFieldModel = new ObjectStructureModel($extObjectName);\n $this->structureFieldsArray = $structureFieldModel->getDataAnotherObjectsFromTable()->getModels();\n $this->hashIndex = $this->random_gen(6);\n }", "title": "" }, { "docid": "ab74ff4a6ad6edce5c8b4f2e82f613af", "score": "0.48957115", "text": "function __construct ($intType)\n\t\t{\n\t\t\tparent::__construct ('BillingType');\n\t\t\t\n\t\t\t$strName = 'Unknown';\n\t\t\t\n\t\t\tswitch ($intType)\n\t\t\t{\n\t\t\t\tcase BILLING_TYPE_ACCOUNT:\n\t\t\t\t\t$strName = 'Account Billing';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase BILLING_TYPE_CREDIT_CARD:\n\t\t\t\t\t$strName = 'Credit Card Billing';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase BILLING_TYPE_DIRECT_DEBIT:\n\t\t\t\t\t$strName = 'Direct Debit Billing';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->oblintType\t\t= $this->Push (new dataInteger\t('Id',\t\t$intType));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t}", "title": "" }, { "docid": "4fcdce8f60dba3e03d48582cf1f85ed0", "score": "0.4894841", "text": "public function testNewFromEntityFunctionNotInitialised()\n {\n ExS\\Core::newFromEntity('\\stdClass');\n }", "title": "" }, { "docid": "1dd90940b0aee9e4f56e19b7b3f96e3a", "score": "0.48931473", "text": "public function construct() {\r\n\t}", "title": "" }, { "docid": "a1ceb65e2ce15b92ab794762148a45cf", "score": "0.48913607", "text": "function MetaType($t,$len=-1,$fieldobj=false)\r\n\t{\r\n\t\tif (is_object($t)) {\r\n\t\t\t$fieldobj = $t;\r\n\t\t\t$t = $fieldobj->type;\r\n\t\t\t$len = $fieldobj->max_length;\r\n\t\t}\r\n\t\t\r\n\t\t$len = -1; // mysql max_length is not accurate\r\n\t\tswitch (strtoupper($t)) {\r\n\t\tcase 'STRING': \r\n\t\tcase 'CHAR':\r\n\t\tcase 'VARCHAR': \r\n\t\tcase 'TINYBLOB': \r\n\t\tcase 'TINYTEXT': \r\n\t\tcase 'ENUM': \r\n\t\tcase 'SET': \r\n\t\t\tif ($len <= $this->blobSize) return 'C';\r\n\t\t\t\r\n\t\tcase 'TEXT':\r\n\t\tcase 'LONGTEXT': \r\n\t\tcase 'MEDIUMTEXT':\r\n\t\t\treturn 'X';\r\n\t\t\t\r\n\t\t// php_mysql extension always returns 'blob' even if 'text'\r\n\t\t// so we have to check whether binary...\r\n\t\tcase 'IMAGE':\r\n\t\tcase 'LONGBLOB': \r\n\t\tcase 'BLOB':\r\n\t\tcase 'MEDIUMBLOB':\r\n\t\t\treturn !empty($fieldobj->binary) ? 'B' : 'X';\r\n\t\t\t\r\n\t\tcase 'YEAR':\r\n\t\tcase 'DATE': return 'D';\r\n\t\t\r\n\t\tcase 'TIME':\r\n\t\tcase 'DATETIME':\r\n\t\tcase 'TIMESTAMP': return 'T';\r\n\t\t\r\n\t\tcase 'INT': \r\n\t\tcase 'INTEGER':\r\n\t\tcase 'BIGINT':\r\n\t\tcase 'TINYINT':\r\n\t\tcase 'MEDIUMINT':\r\n\t\tcase 'SMALLINT': \r\n\t\t\t\r\n\t\t\tif (!empty($fieldobj->primary_key)) return 'R';\r\n\t\t\telse return 'I';\r\n\t\t\r\n\t\tdefault: return 'N';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "19d37c81d92164abba997eb68017c126", "score": "0.4888645", "text": "function create_object($obj_name=NULL)\n {\n return new CF_Object($this, $obj_name);\n }", "title": "" }, { "docid": "19d37c81d92164abba997eb68017c126", "score": "0.4888645", "text": "function create_object($obj_name=NULL)\n {\n return new CF_Object($this, $obj_name);\n }", "title": "" }, { "docid": "074ae99c94adc87440573bff1003e56d", "score": "0.48843628", "text": "public function __construct(){\n parent::__construct();\n $this->types = 'ZHpaywx';\n }", "title": "" }, { "docid": "77126b33e3be59b3646e2acd164121d8", "score": "0.48839128", "text": "abstract public function ez__construct();", "title": "" }, { "docid": "94027451ed90ca8c8dbb51fdbb00cb92", "score": "0.4878903", "text": "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->fieldTypes = func_get_arg(0);\n $this->name = func_get_arg(1);\n $this->orgId = func_get_arg(2);\n $this->uuid = func_get_arg(3);\n }\n }", "title": "" }, { "docid": "8cf0f1e2117d3299a2d7409aff2a3e32", "score": "0.4877595", "text": "private function __construct()\n\t{}", "title": "" }, { "docid": "701dec9540aba6bfb3c49ce6fe2c6dd2", "score": "0.48740768", "text": "private function __construct(){\n\t }", "title": "" }, { "docid": "64d8e181ccc4ed85a3f0c4f28f796302", "score": "0.4867633", "text": "function __construct(string $str_func)\n {\n //--- (YPwmPowerSource constructor)\n parent::__construct($str_func);\n $this->_className = 'PwmPowerSource';\n\n //--- (end of YPwmPowerSource constructor)\n }", "title": "" }, { "docid": "8b081baeb1c80588ae67d2b27c9978a0", "score": "0.48654658", "text": "function ting_ting_object_convert($context, $type) {\n switch ($type) {\n case 'title_full':\n return $context->title;\n }\n}", "title": "" }, { "docid": "9bbc3fa8f740ba290c3950657b77030f", "score": "0.48634103", "text": "public function __construct($_msgClass = NULL,$_caseId = NULL,$_courtName = NULL,$_judgmentAmt = NULL,$_judgmentDt = NULL,$_courtType = NULL,$_message = NULL)\n {\n MicrobiltWsdlClass::__construct(array('MsgClass'=>$_msgClass,'CaseId'=>$_caseId,'CourtName'=>$_courtName,'JudgmentAmt'=>$_judgmentAmt,'JudgmentDt'=>$_judgmentDt,'CourtType'=>$_courtType,'Message'=>$_message),false);\n }", "title": "" }, { "docid": "97a867d56ce875ccddfcf317eea13928", "score": "0.48628592", "text": "protected static function newModel($obj) {\n\n }", "title": "" }, { "docid": "d977237edbf218789f987be3cd90ce91", "score": "0.486271", "text": "public static function sxable(): string\n {\n return EntitySx::class;\n }", "title": "" }, { "docid": "8172922871456f8837e420480b7834b7", "score": "0.48602846", "text": "private function __construct()\n\t \t{\n\t \t}", "title": "" }, { "docid": "bfd75a9b9b48a91072c1ce590d3562cf", "score": "0.48592982", "text": "public function initFromArray($o) {\n if( isset($o['type']) ) {\n $this->type = $o[\"type\"];\n }\n if( isset($o['gedcomx']) ) {\n $this->gedcomx = new \\Org\\Gedcomx\\Gedcomx($o[\"gedcomx\"]);\n }\n }", "title": "" }, { "docid": "04790446d9e61d713e0e1545cd01b7d5", "score": "0.48575485", "text": "public static abstract function build_object($object);", "title": "" }, { "docid": "98d6fb6194cdbe1cb1ed4be53f219528", "score": "0.48547322", "text": "public function __construct($pObj) {\r\n\t\tparent::__construct($pObj);\r\n\t}", "title": "" }, { "docid": "3df1fdfc892264fa6110b099fabb2d6e", "score": "0.4854639", "text": "function __toString()\n {\n // TODO: Implement __toString() method.\n }", "title": "" }, { "docid": "51497a6a32b99a03817494721e821ece", "score": "0.4854388", "text": "public function __construct() {\n $this->name = null;\n $this->dataType = null;\n $this->firstLength = null;\n $this->secondLength = null;\n $this->allowsNull = false;\n $this->isReadOnly = false;\n $this->referencedTableName = null;\n }", "title": "" } ]
10df38c1b600c6bdec1b222d2a4b3898
Deleta todos os campos
[ { "docid": "247d62138acc2b5598d40df17958672e", "score": "0.0", "text": "public function clean(){\n\t\t$sql = 'DELETE FROM festa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" } ]
[ { "docid": "6d325d876e508c7b80fa65a8f7b43118", "score": "0.6947226", "text": "public function unsetFieldsToClear(): void\n {\n $this->fieldsToClear = [];\n }", "title": "" }, { "docid": "8585912ae5babe5717a00ca03e4fece7", "score": "0.67089105", "text": "function clearFields()\n {\n unset( $this->fields );\n $this->nameArray = array();\n $this->nameNumber = 0;\n $this->idArray = array();\n $this->idNumber = 0;\n $this->fieldNameArray = array();\n $this->posted = false;\n $this->addInitField();\n }", "title": "" }, { "docid": "7ffa92acd6fd39e3fc93967647e73e25", "score": "0.65921", "text": "public function clearData() {\n\t\tforeach($this->fields as $key=>$field) {\n\t\t\t$this->fields[$key]->value=\"\";\n\t\t}\n\t}", "title": "" }, { "docid": "7320942d4ac5917ada252de4eec3ec3b", "score": "0.64880055", "text": "private function clearForm()\n {\n $this->name = \"\";\n $this->email = \"\";\n $this->phone = \"\";\n $this->message = \"\";\n }", "title": "" }, { "docid": "ac59a2502d279f7f3bf0d81e395d5e64", "score": "0.6484055", "text": "public function clearForm()\n {\n $this->name = '';\n $this->price = '';\n $this->detail = '';\n $this->status = 1;\n }", "title": "" }, { "docid": "ceaacc803b2802ffeedf57c59f24038a", "score": "0.6454058", "text": "public function clearConsulta() {\n\t\t$this->codigo = null;\n\t\t$this->codAtendente = null;\n\t\t$this->codMedico = null;\n\t\t$this->codPaciente = null;\n\t\t$this->data = null;\n\t\t$this->hora = null;\n\t\t$this->observacao = null;\n\t\t$this->receita = null;\n\t\t$this->reg_date = null;\n\t}", "title": "" }, { "docid": "d3802d6e00a64644e3ef3ee811b9a700", "score": "0.6421079", "text": "public function getClearedFields();", "title": "" }, { "docid": "303cff6f1dd0cc1d3b03e9674db56287", "score": "0.638868", "text": "public function resetFields()\n {\n $this->name_bk = '';\n $this->judul = '';\n $this->penulis = '';\n $this->tahun = '';\n $this->buku_id = '';\n }", "title": "" }, { "docid": "ac756683eb02e7ccea79b95cc4a9f8f1", "score": "0.63770944", "text": "private function resetInputFields(){\n $this->name = '';\n $this->shortCode = '';\n $this->city_id = '';\n $this->country_id = '';\n }", "title": "" }, { "docid": "4eeccac7c9153a3724a74c62d06ad3c3", "score": "0.6301847", "text": "public function reset()\n {\n foreach ($this->fields as $field) {\n $field->value('');\n $field->error('');\n }\n }", "title": "" }, { "docid": "29f87690b063ebe852f66bc08a4ddf7e", "score": "0.62671834", "text": "public function declutter()\n\t{\n\t\t$fields = $this->fields;\n\t\t$attributes = $this->getAttributes();\n\t\t// Remove any other item attributes\n\t\tforeach($this as $key => $value) {\n\t\t\tif(!in_array($key, $attributes) && !array_key_exists($key, $fields)) {\n\t\t\t\tunset($this->$key);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5b11a5cfc987f35c81b27de238991fb7", "score": "0.6243934", "text": "public function reset()\n {\n unset($this->id);\n unset($this->username);\n unset($this->password);\n unset($this->name);\n unset($this->surname);\n unset($this->email);\n unset($this->active);\n unset($this->last_login);\n unset($this->role_id);\n unset($this->registration_date);\n }", "title": "" }, { "docid": "0813868752e3cd778a454a4def14a7a0", "score": "0.6241434", "text": "public function clean()\n {\n $this->reset([\n 'absence_id',\n 'description',\n 'status',\n 'accion',\n 'absence',\n 'created_at',\n 'updated_at',\n ]);\n\n $this->mount();\n }", "title": "" }, { "docid": "cba055cfe62f0d65fd60a3b547695e59", "score": "0.6165176", "text": "public function clear()\n {\n $this->dudi_id = null;\n $this->nama = null;\n $this->bidang_usaha_id = null;\n $this->alamat_jalan = null;\n $this->rt = null;\n $this->rw = null;\n $this->nama_dusun = null;\n $this->desa_kelurahan = null;\n $this->kode_wilayah = null;\n $this->kode_pos = null;\n $this->lintang = null;\n $this->bujur = null;\n $this->nomor_telepon = null;\n $this->nomor_fax = null;\n $this->email = null;\n $this->website = null;\n $this->npwp = null;\n $this->create_date = null;\n $this->last_update = null;\n $this->soft_delete = null;\n $this->last_sync = null;\n $this->updater_id = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "e909bffe7cb9c40cedb361000c274ece", "score": "0.6156172", "text": "public function clear()\n {\n $this->id = null;\n $this->firstname = null;\n $this->lastname = null;\n $this->username = null;\n $this->password = null;\n $this->isadmin = null;\n $this->email = null;\n $this->mobile = null;\n $this->isoverviewrecipient = null;\n $this->recievereminderemails = null;\n $this->isbandadmin = null;\n $this->iseventeditor = null;\n $this->lastlogin = null;\n $this->passwordchanged = null;\n $this->created = null;\n $this->updated = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "5e602b5923932bb3c472b612b9b700df", "score": "0.6151239", "text": "public function clean() {\n $this -> resetAll();\n }", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.6144267", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.6144267", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.6144267", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.6144267", "text": "public function clean();", "title": "" }, { "docid": "4527f0bae51af1115c0c8c4f71f52940", "score": "0.6135826", "text": "public function campos()\n\t{\n\t\t$campos = array(\n\t\t\t'usuario' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'placeholder' => 'Usuario',\n\t\t\t\t'required' => 'required',\n\t\t\t\t'autofocus' => 'autofocus'\n\t\t\t),\n\t\t\t'nombre' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'placeholder' => 'Nombre',\n\t\t\t\t'required' => 'required',\n\t\t\t\t'autofocus' => 'autofocus'\n\t\t\t),\n\t\t\t'email' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'placeholder' => 'Email'\n\t\t\t),\n\t\t\t'telefono' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'placeholder' => 'Teléfono'\n\t\t\t),\n\t\t\t'pass1' => array(\n\t\t\t\t'type' => 'password',\n\t\t\t\t'placeholder' => 'Contraseña'\n\t\t\t),\n\t\t\t'pass2' => array(\n\t\t\t\t'type' => 'password',\n\t\t\t\t'placeholder' => 'Confirma contraseña'\n\t\t\t),\n\t\t\t'permisos' => array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'multiple' => 'multiple',\n\t\t\t\t'size' => 10,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'4' => 'Reservaciones',\n\t\t\t\t\t'3' => 'Establecimientos',\n\t\t\t\t\t'2' => 'Líderes (completo)',\n\t\t\t\t\t'5' => 'Líderes (limitado)',\n\t\t\t\t\t'1' => 'Usuarios',\n\t\t\t\t\t'6' => 'Reportes'\n\t\t\t\t),\n\t\t\t\t'placeholder' => 'Permisos'\n\t\t\t)\n\t\t);\n\t\t\n\t\t//Agregar nombre del campo\n\t\tforeach($campos as $k => $v) $campos[$k]['name'] = $k;\n\t\treturn $campos;\n\t}", "title": "" }, { "docid": "53e85b5f3cde02beb95b402ebb619a8f", "score": "0.6091096", "text": "public function reset()\n\t{\n\t\t$this->fields = array();\n\t}", "title": "" }, { "docid": "7a5bde5fdc3bb21bf74d35867fff6616", "score": "0.6052209", "text": "function destroyFields()\n {\n Field::deleteBySQL('block_id = ?', array($this->id));\n }", "title": "" }, { "docid": "4f0f9381bd10e770aa9efc6da9c22dd0", "score": "0.6015724", "text": "public function clearAttributes(){\n\n\t\t$this->imagem = null;\n\t\t$this->fonte = null;\n\t\t$this->sexo = null;\n\t\t$this->data_nascimento = null;\n\t\t$this->data_desaparecimento = null;\n\t\t$this->local_desaparecimento = null;\n\t\t$this->idadeDesaparecimento = null;\n\t\t$this->situacao = null;\n\t\t$this->cidade = null;\n\t\t$this->estado = null;\n\t\t$this->nome = null;\n\t\t$this->idade = null;\n\t}", "title": "" }, { "docid": "01679847f0ee3d2172682b63ddfe386a", "score": "0.6001525", "text": "public function reset(){\n foreach( $this->model as $key => $field ){\n $this->model->{$key}->value = null;\n }\n }", "title": "" }, { "docid": "f38b018a48b26ce8f19507506b9520cb", "score": "0.5978365", "text": "public function unsetAllFieldSets() {\n\t\t$this->field_set = [];\n\t}", "title": "" }, { "docid": "677160a38a19d39f81bc5bd003933999", "score": "0.5966513", "text": "public function clear()\n {\n $this->id = null;\n $this->name = null;\n $this->dob = null;\n $this->dod = null;\n $this->isband = null;\n $this->date_formed = null;\n $this->date_ended = null;\n $this->members = null;\n $this->albums = null;\n $this->label_id = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "78ec551d1b064f204c3819c4d65928c6", "score": "0.5961529", "text": "public static function clean() {\n\n\t\tself::$form = NULL;\n\t}", "title": "" }, { "docid": "3de7b283c335d5bd10b41283fa7ce56b", "score": "0.59536517", "text": "function __construct( $valores ) { \n\t\t$this->valores = $valores;//pasamos los valores de cada uno de los campos\n\t\t$this->render( $this->valores );//llamamos a la función render donde se mostrará el formulario DELETE con los campos correspondientes\n\t}", "title": "" }, { "docid": "bbf7a447086daabe389c3fa93f9e4bf9", "score": "0.5920083", "text": "public function setAsClean()\n {\n $this->dirtyFields = [];\n }", "title": "" }, { "docid": "f8bff9e873aa4e2e25c5d08612a65f65", "score": "0.5875854", "text": "public function clear()\n {\n $this->bestandnummer = null;\n $this->mutatiekode = null;\n $this->thesaurusnummer = null;\n $this->thesaurus_itemnummer = null;\n $this->memokode_item = null;\n $this->naam_item_4_posities = null;\n $this->naam_item_15_posities = null;\n $this->naam_item_25_posities = null;\n $this->naam_item_50_posities = null;\n $this->aanvullende_kode_1 = null;\n $this->aanvullende_kode_2 = null;\n $this->aanvullende_kode_3 = null;\n $this->aanvullende_kode_4 = null;\n $this->aanvullende_kode_5 = null;\n $this->aanvullende_kode_6 = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "cfe687381657934156bb9289946082f2", "score": "0.58622396", "text": "private function resetInputFields(){\n $this->user_id = '';\n $this->amount = '';\n $this->date = '';\n $this->type = '';\n $this->description = '';\n }", "title": "" }, { "docid": "e20f77f7b217867b5a29dd8a2cf1caa5", "score": "0.58553725", "text": "protected function deleteFields() {\n foreach ($this->fields as $field_id => $field_definitions) {\n field_delete_field($field_id);\n }\n }", "title": "" }, { "docid": "ec32cac25a55154405ba9fa3f013fa4d", "score": "0.5855003", "text": "public function clear()\n {\n $this->user_id = null;\n $this->user_fname = null;\n $this->user_mname = null;\n $this->user_lname = null;\n $this->user_login = null;\n $this->user_password = null;\n $this->user_email = null;\n $this->user_gender = null;\n $this->user_birth_date = null;\n $this->user_age = null;\n $this->user_phone = null;\n $this->user_company_key = null;\n $this->user_role = null;\n $this->user_status = null;\n $this->user_added_by = null;\n $this->user_date_added = null;\n $this->user_date_lastlogin = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "ad9125437fc1ff0f9fdf8444d952dbf6", "score": "0.5851918", "text": "private function _removeOldFields() {\n\n // campos a serem atualizados\n $fieldsToRemove = [];\n\n // percorre as tabelas novas\n foreach( $this->oldTables as $oldTable ) {\n\n // verifica se ela ainda existe\n $index = array_search( $oldTable, $this->newTables );\n if ( $index !== false ) {\n \n // pega o schema\n $schema = $this->oldSchema[$oldTable];\n\n // percorre os campos\n foreach( $schema as $fieldName => $field ) {\n\n // verifica se eh um campo novo\n if ( $this->_isOldField( $oldTable, $fieldName ) ) {\n $fieldsToRemove[$oldTable][] = $fieldName;\n }\n }\n }\n }\n\n // percorre todos os campos que devem ser adicionados\n foreach ( $fieldsToRemove as $table => $fields ) {\n\n // percorre os campos\n foreach( $fields as $field ) {\n\n // remove o campo\n $this->forge->drop_column( $table, $field );\n }\n }\n }", "title": "" }, { "docid": "a09313fc1903ade8141fb741f95abd7d", "score": "0.5845404", "text": "public function migre() {\n\n // remove tabelas nao mais usadas\n $this->_dropUnusedTables();\n\n // cria as tabelas novas\n $this->_createNewTables();\n\n // adiciona os novos campos\n $this->_addNewFields();\n\n // remove os campos antigos\n $this->_removeOldFields();\n }", "title": "" }, { "docid": "a2940cddb5c5a8974c1614d714fb0318", "score": "0.58420384", "text": "public function clear(){\n $this->paginate = '5';\n $this->fabricante_id = '';\n $this->categoria_id = '';\n $this->page = 1;\n }", "title": "" }, { "docid": "41d9e3fc3061e1bf048027abe72b2a26", "score": "0.5824836", "text": "private function clean()\n {\n $this->permissionsForChecking = array();\n $this->userId = null;\n }", "title": "" }, { "docid": "e7beb7ed5d405839231ad116ca298b96", "score": "0.58061516", "text": "public function deletar(){\n $this->recVariaveis();\n //var_dump($this->Id);\n foreach($this->Id as $IdDeletar){\n $this->deletarClientes($IdDeletar);\n }\n }", "title": "" }, { "docid": "06393f3b74f92a7fb60cbb5b919b4730", "score": "0.5801159", "text": "function _unsetData() {\n\t\tunset($this->title);\n\t\tunset($this->creators);\n\t\tunset($this->subjects);\n\t\tunset($this->abstract);\n\t\tunset($this->publisher);\n\t\tunset($this->contributors);\n\t\tunset($this->datePublished);\n\t\tunset($this->types);\n\t\tunset($this->formats);\n\t\tunset($this->identifier);\n\t\tunset($this->sources);\n\t\tunset($this->language);\n\t\tunset($this->relations);\n\t\tunset($this->galleyURLs);\n\t\tunset($this->suppFileURLs);\n\t\tunset($this->copyright);\n\t}", "title": "" }, { "docid": "d88c4b7b8f3d08e4ff7eca4ecb5e2964", "score": "0.5788189", "text": "private function resetInput()\n {\t\t\n\t\t$this->selected_id = null;\n\t\t$this->clien_nombres = null;\n\t\t$this->clien_direcc = null;\n }", "title": "" }, { "docid": "833450a35eb458167390e79eb0e17ce8", "score": "0.5766894", "text": "protected function clearDelete() {\n $this->deletefrom = '';\n $this->deletewhere = array();\n }", "title": "" }, { "docid": "b5be9064752f986be690b7fa2fb78e03", "score": "0.5765379", "text": "public function eliminalista()\n {\n DB::table('lppros')->where('lp', $this->idlista)->delete();\n DB::table('lpclies')->where('lp', $this->idlista)->delete();\n Lp::where('id', $this->idlista)->delete();\n\n\n session()->flash('listaope', '¡SE ELIMINO CORRECTAMENTE LA LISTA!');\n $this->idlista = \"\";\n $this->accion = \"\";\n }", "title": "" }, { "docid": "8d37a55a9e77fb3ba11d9ddf33f9c1b1", "score": "0.5761203", "text": "public function clear()\n {\n $this->id = null;\n $this->main_customer_id = null;\n $this->first_name = null;\n $this->last_name = null;\n $this->email = null;\n $this->address1 = null;\n $this->address2 = null;\n $this->address3 = null;\n $this->city = null;\n $this->zip_code = null;\n $this->country_id = null;\n $this->login = null;\n $this->password = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "3690a465f032f2214a5357de4c83b76e", "score": "0.57540214", "text": "public function removeHiddenFields()\n {\n if (!empty($this->hidden)) {\n foreach ($this->hidden as $field) {\n unset($this->record->$field);\n }\n }\n }", "title": "" }, { "docid": "a35fe3c3f5fb9966964ad673908b388b", "score": "0.5730001", "text": "public function clean(){\n\t\t$sql = 'DELETE FROM editoria';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "eb3ba5cd0d5afa33dd080dc9888c955b", "score": "0.57244146", "text": "public function reset()\r\n\t{\r\n\t foreach ($this->_scheme as $oField)\r\n\t {\r\n\t $oField->value = '';\r\n\t }\r\n\t}", "title": "" }, { "docid": "7b96d8e40998e04b41370070f6294207", "score": "0.57135093", "text": "function clearFormElements()\n{\n $_POST[\"fname\"] = \"\";\n $_POST[\"lname\"] = \"\";\n $_POST[\"email\"] = \"\";\n $_POST[\"password\"] = \"\";\n}", "title": "" }, { "docid": "4d6b66cd5cb824dd6a234fbe7a7b51c6", "score": "0.57133263", "text": "private function resetInputFields()\n {\n $this->form = \\array_fill_keys(\\array_keys($this->form), '');\n }", "title": "" }, { "docid": "29ab5d10ea1ba03d2cbc28221dbb796c", "score": "0.5691695", "text": "function storefront_child_remove_unwanted_form_fields($fields) {\n unset( $fields ['company'] );\n unset( $fields ['country'] );\n return $fields;\n}", "title": "" }, { "docid": "7dfe2a343245096f6d1e151eabfdccb5", "score": "0.5690312", "text": "public function clear(){\r\n\t\t\t$class_name = get_class($this);\r\n\t\t\t$vars = get_class_vars($class_name);\r\n\t\t\t\r\n\t\t\tforeach($vars as $attr => $value)\r\n\t\t\t\t$this->$attr = null;\r\n\t\t\t\r\n\t\t\t$this->loaded = false;\r\n\t\t\t$this->valid = false;\r\n\t\t}", "title": "" }, { "docid": "958fae5813438b9143036a829f8143e7", "score": "0.56814605", "text": "private function resetInputFields(){\n $this->name = '';\n $this->config = '[]';\n $this->survey_id = '';\n $this->enabled = FALSE;\n $this->public = '';\n $this->responseLimit = '';\n $this->aviableFrom = date('Y-m-d H:i:s', time());\n $this->aviableTo = date('Y-m-d H:i:s', time());\n }", "title": "" }, { "docid": "db7da730aa604b7fb1fc679dcb3d289c", "score": "0.5681335", "text": "private function resetInputFields(){\n $this->reset('files');\n $this->reset('inputs');\n }", "title": "" }, { "docid": "41244d763ea9d732d32e7f2c31adf298", "score": "0.5679552", "text": "private static function resetValues() {\n\n\t\tself::$NAME = null;\n\t\tself::$TITLE = null;\n\t\tself::$NAVIGATIONCAPTION = null;\n\t\tself::$SHORTDESCRIPTION = null;\n\t\tself::$DESCRIPTION = null;\n\t\tself::$COMPANY = null;\n\t\tself::$CONTACTPERSON = null;\n\t\tself::$CONTACTPERSONJOBTITLE = null;\n\t\tself::$ADDRESS = null;\n\t\tself::$PHONE = null;\n\t\tself::$EMAIL = null;\n\t}", "title": "" }, { "docid": "70f845a17a07c91cbd2d0ca432822b69", "score": "0.5663802", "text": "public function clearAttributes ()\n {\n\n $this->attributes = null;\n $this->attributes = array();\n\n }", "title": "" }, { "docid": "4dfc5352c5cfd51b1e9f172b04b6f1e5", "score": "0.56563365", "text": "private function resetInput()\n {\n $this->selected_id=null; \n $this->buscar=''; \n }", "title": "" }, { "docid": "8b7143373cc9e8c8176810d733d83680", "score": "0.56548244", "text": "function emptyInfo()\n {\n\n $this->setIdestadocuenta(\"\");\n $this->setIdtipoestadocuenta(\"\");\n $this->setIdtipofechacorteestadocuenta(\"\");\n $this->setFechacorteestadocuenta(\"\");\n $this->setDiasvencimientosolicitudestadoencuesta(\"\");\n $this->setCodigoestado(\"\");\n }", "title": "" }, { "docid": "aa05c982083c3b24c1a4e37dc5e821de", "score": "0.56414074", "text": "public function clear()\n {\n $this->id = null;\n $this->short_name = null;\n $this->name = null;\n $this->description = null;\n $this->description_isLoaded = false;\n $this->cursus_id = null;\n $this->responsable_id = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "a7343f28ddeb636ec66fc30615400497", "score": "0.5641209", "text": "public function clearFields(): self\n {\n $this->fields = [];\n\n return $this;\n }", "title": "" }, { "docid": "51e3e41b011396f89e63672cc8c3de8b", "score": "0.56317264", "text": "public function removeFields(Request $request){ \n $categroy = Dcategory::find($request->id);\n Auth::user()->owner->fields()->detach($categroy);\n}", "title": "" }, { "docid": "cea50d9b1e58306bbbf3ba65d2bc987a", "score": "0.560554", "text": "function desasignar()\n {\n $this->nombreCompleto = null;\n $this->directorio = null;\n $this->nombre = null;\n $this->tamano = null;\n $this->extension = null;\n $this->fechaModificacion = null;\n $this->tipo = null;\n $this->contenido = null;\n $this->fp = false;\n $this->permiso = null;\n }", "title": "" }, { "docid": "1c2d287737ae240ba3b665d23e7b6df0", "score": "0.5601536", "text": "private function resetInputFields(){\n $this->title = '';\n $this->body = '';\n $this->post_id = '';\n $this->url = '';\n }", "title": "" }, { "docid": "30a8521e1840a030ba2f293fcaf0b35b", "score": "0.5592629", "text": "public function clear()\n {\n $this->columns = array();\n }", "title": "" }, { "docid": "609d87e74df8cf04d27eb6feb374ebda", "score": "0.5578865", "text": "function campos_editables()\n {\n $campos = array(\n 'item',\n 'id_interno',\n 'abreviatura',\n 'padre_id',\n 'filtro',\n 'descripcion',\n 'slug',\n 'item_largo',\n 'item_corto',\n 'item_grupo',\n );\n \n return $campos;\n \n }", "title": "" }, { "docid": "c9ecbf8d9e53423e749903a9b3097b80", "score": "0.5569016", "text": "public function clearCache() {\n\t\t\t$keys = array_keys($this->fields);\n\t\t\tforeach ($keys as $key) {\n\t\t\t\tunset($this->fields[$key]);\n\t\t\t}\n\t\t\t$this->fields = array();\n\t\t}", "title": "" }, { "docid": "53aea330334bad587e2a90a8c05a31d3", "score": "0.5564487", "text": "public function fields()\n {\n $fields = parent::fields();\n unset($fields['security']);\n return $fields;\n }", "title": "" }, { "docid": "b6e5a58ef92a5a6053adcb35559743ae", "score": "0.55327916", "text": "public function reset()\n {\n $this->values[self::FIRSTNAME] = null;\n $this->values[self::MIDDLENAME] = null;\n $this->values[self::LASTNAME] = null;\n $this->values[self::PHONE] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::CHANNEL] = null;\n }", "title": "" }, { "docid": "0b7dadd050bebb594c8febf6f3955737", "score": "0.552843", "text": "public function cleanUp(): void\n {\n $this->setting = null;\n $this->value = null;\n $this->user = null;\n }", "title": "" }, { "docid": "a07e311a386f69e223ef70f21bd496c1", "score": "0.5524352", "text": "public function clear(){\n \t$this->id = false;\n\t\t$this->data = array();\n\t\t$this->validationErrors = array();\n\t\treturn $this->data;\n }", "title": "" }, { "docid": "854e2aaa43ccda8cf1b50e9df472efa5", "score": "0.5501856", "text": "function LimparCampos() {\n \n }", "title": "" }, { "docid": "54e904ac76cbbc77ccdace8bf95b3aef", "score": "0.5500765", "text": "function removeField()\n\t{\n\t\t$mainframe\t=& JFactory::getApplication();\n\t\t\n \t\t$ids\t= JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\t$count\t= count($ids);\n\t\t\n\t\tforeach( $ids as $id )\n\t\t{\n\t\t\t$table\t=& JTable::getInstance( 'profiles', 'CommunityTable' );\n\t\t\t$table->load( $id );\n\n\t\t\tif(!$table->delete( $id ))\n\t\t\t{\n\t\t\t\t// If there are any error when deleting, we just stop and redirect user with error.\n\t\t\t\t$message\t= JText::_('CC THERE WAS A PROBLEM WHILE REMOVING THE FIELD');\n\t\t\t\t$mainframe->redirect( 'index.php?option=com_community&task=profile' , $message);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t$cache = & JFactory::getCache('com_content');\n\t\t$cache->clean();\n\t\t$message\t= JText::_( $count . ' Field(s) successfully removed.');\n \t\t$mainframe->redirect( 'index.php?option=com_community&view=profiles' , $message );\n\t}", "title": "" }, { "docid": "ce8a448314d22d4e2defb5e7a3be4302", "score": "0.5497346", "text": "protected function unsetAllFieldsExcept($fields = array())\n { \n $unsetFields = array_diff(array_keys($this->getWidgetSchema()->getFields()), $fields);\n\t\n\tforeach($unsetFields as $value)\n\t{\n\t unset($this[$value]);\n\t} \n }", "title": "" }, { "docid": "15efdf054d7f1bd248611bf34e053875", "score": "0.5492288", "text": "public function clearProperties();", "title": "" }, { "docid": "b862b6912826fabb9f10fd87870190dc", "score": "0.5490534", "text": "public static function clearAllFieldMetas($formid){\n\n $form_fields = SSF_FormField::listFields($formid);\n\n foreach ($form_fields as $form_field){\n\n SSF_FormField::clearFieldMetas($form_field);\n\n }\n\n }", "title": "" }, { "docid": "7ca288f651e926a055c2d4fef1329b14", "score": "0.5487018", "text": "public function populateFields(){\n if(count($this->submittedData)<1) return;\n array_map(function(FormField &$field){\n if(isset($this->submittedData[$field->getName()])){\n $raw = $this->submittedData[$field->getName()];\n\n $sanitized = $field->sanitize($raw);\n $field->setValue($sanitized);\n }else{\n // Unset value (see: checkboxes where value only sent when checkbox was checked\n if($field->getType() == FormField::TYPE_CHECKBOX){\n $field->setValue(null);\n }\n\n }\n },\n $this->getFields());\n }", "title": "" }, { "docid": "3147ba5423331cb9ddee826d3c64e67e", "score": "0.54814607", "text": "public function clearJ006tLugarSeguros()\n\t{\n\t\t$this->collJ006tLugarSeguros = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "f37caa461864e025cee4ac4931f59fd6", "score": "0.5481194", "text": "function clean()\n\t{\n\t}", "title": "" }, { "docid": "68683d30d7cac641f24f850cabaa03f0", "score": "0.5480481", "text": "private function removerDicionarioDados() \n {\n\n $this->execute('delete from configuracoes.db_sysarqcamp where codcam in(1009327)');\n $this->execute('delete from configuracoes.db_syscampo where codcam in(1009327)'); \n }", "title": "" }, { "docid": "386cc27f29ceecc7e04d94b653b05fde", "score": "0.5478597", "text": "public function liberar()\n\t\t{\n\t\t\t$this->where = '';\n\t\t\t$this->select = '';\n\t\t\t$this->set = '';\n\t\t\t$this->values = '';\n\t\t\t$this->mensaje = FALSE;\n\t\t\t$this->limit = '';\n\t\t\t$this->orderBy='';\n\t\t\t$this->rows = array();\n\t\t\t$this->type='';\n\t\t\t$this->join='';\n\t\t}", "title": "" }, { "docid": "0a52b40c4bfe7adfef698ee2109651a4", "score": "0.5473801", "text": "public function clearValidation()\n {\n foreach ($this->formFields as $formField) {\n $error = $formField->clearValidation();\n }\n }", "title": "" }, { "docid": "58a4151cccb9b3fe5a02bf6c9cdcd5fd", "score": "0.54717326", "text": "private function ClearOptions()\n {\n $sql = Access::SqlBuilder();\n $tblOptions = RadioOption::Schema()->Table();\n $where = $sql->Equals($tblOptions->Field('RadioField'), $sql->Value($this->radio->GetID()));\n RadioOption::Schema()->Delete($where);\n }", "title": "" }, { "docid": "cc384793e7bebd06a6db1255e69b7acc", "score": "0.54656863", "text": "public function clearC002tInformeForenses()\n\t{\n\t\t$this->collC002tInformeForenses = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "da246a103bcd57d6040b759e5a011d3a", "score": "0.5463665", "text": "protected function clean()\n {\n\n }", "title": "" }, { "docid": "2ba008d4010e6884b204f5e977086c09", "score": "0.5461979", "text": "public function clean(){\n\t\t$sql = 'DELETE FROM turno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "6df6d7a054ee910ab549be13938e5d69", "score": "0.5461874", "text": "public function clear($fieldName);", "title": "" }, { "docid": "de47120e27f827f76b5c1f9d3c7f4e4c", "score": "0.5461637", "text": "public function clearEmptySteps()\n {\n foreach ($this as $field) {\n if ($field instanceof UserFormsStepField && count($field->getChildren() ?? []) === 0) {\n $this->remove($field);\n }\n }\n }", "title": "" }, { "docid": "96c993ffb15bef1d4f309e3e0bd3f871", "score": "0.5460838", "text": "public function removeAll( )\n {\n\n $this->delete( '' );\n\n }", "title": "" }, { "docid": "1b8756fdf80e708743e49f5a0f4c1e96", "score": "0.5452006", "text": "public static function clearFieldsCache()\n\t{\n\t\tself::$fieldCache = null;\n\t\tself::$fieldsCache = null;\n\t}", "title": "" }, { "docid": "fbcd80a27fb616422dbcad920cd553ea", "score": "0.5449617", "text": "function clearAttributes();", "title": "" }, { "docid": "5b604a602e3f3d1fed294254c7431cbd", "score": "0.5445141", "text": "function getViewFormFields() {\n $fields = parent::getViewFormFields();\n unset($fields['id_expediente']);\n return $fields;\n }", "title": "" }, { "docid": "b01de20bb0b9329f62f627c3bac4a54b", "score": "0.54425764", "text": "public function reset() {\n $this->values[self::UID] = null;\n $this->values[self::NAME] = null;\n }", "title": "" }, { "docid": "e43dc8f9f0bc4f091d6d088536eb34b1", "score": "0.54409283", "text": "function reset(){\n\t\t$this->__columns = array();\n\t\t$this->__actions = array();\n\t}", "title": "" }, { "docid": "9678a7681c10e4ae8df5c729ff983f4a", "score": "0.54405886", "text": "public function clear(){\n\t\t$this->label = '';\n\t\t$this->ref = null;\n\t}", "title": "" }, { "docid": "76e9b146bce6fbb9431524f977433059", "score": "0.54374635", "text": "protected function clearUpdate() {\n $this->updateset = array();\n $this->updatetable = '';\n $this->updatewhere = array();\n $this->updatespecials = array();\n }", "title": "" }, { "docid": "a5428b5ccd1f7847025c26d2a86d5c5a", "score": "0.5435698", "text": "public function clear()\n {\n $this->id = null;\n $this->username = null;\n $this->algorithm = null;\n $this->salt = null;\n $this->password = null;\n $this->created_at = null;\n $this->last_login = null;\n $this->is_active = null;\n $this->is_super_admin = null;\n $this->is_sudoer = null;\n $this->time_sudoer = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "df554381ed605c5d8139ed1ec9849ddd", "score": "0.54309297", "text": "public function Clear()\n\t{\n\t\t$this->items = array();\n\t\t$this->Save();\n\t}", "title": "" }, { "docid": "75331aab2c5bb5379ced2278bc5b5bd6", "score": "0.54307497", "text": "public function clear()\n {\n if (null !== $this->aChallanRelatedByAccomodationchallanid) {\n $this->aChallanRelatedByAccomodationchallanid->removeParticipantRelatedByAccomodationchallanid($this);\n }\n if (null !== $this->aAmbassador) {\n $this->aAmbassador->removeParticipant($this);\n }\n if (null !== $this->aChallanRelatedByRegistrationchallanid) {\n $this->aChallanRelatedByRegistrationchallanid->removeParticipantRelatedByRegistrationchallanid($this);\n }\n $this->participantid = null;\n $this->cnic = null;\n $this->registrationchallanid = null;\n $this->accomodationchallanid = null;\n $this->firstname = null;\n $this->lastname = null;\n $this->gender = null;\n $this->address = null;\n $this->phoneno = null;\n $this->nustregno = null;\n $this->ambassadorid = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "52557f4e23658bc0fb456915c0de4957", "score": "0.54301846", "text": "public function setFieldsToClear(?array $fieldsToClear): void\n {\n $this->fieldsToClear['value'] = $fieldsToClear;\n }", "title": "" }, { "docid": "61921a762b0311ca0c6fa06be2f17673", "score": "0.54289705", "text": "function clearAllFieldErrors(){\n\t\t// Clear errors\n\t\t$fields = $this->getInputFields();\n\t\tif ($fields != null)\n\t\t\tforeach($fields as $key => $val){\n\t\t\t$this->setFieldError($val, '');\n\t\t}\n\t\t$this->setErrorMessage('');\n\t}", "title": "" }, { "docid": "8b494ae62a86ba668f05bd01be864921", "score": "0.54274523", "text": "function clear()\r\n\t{\r\n\t\t$this->dbConnection->execute(\"DELETE FROM dataset_model WHERE datasetName ='\".$this->setName.\"'\");\r\n\t}", "title": "" }, { "docid": "bcb8b378ff8fac0b8b2d1f47d679f14b", "score": "0.5419863", "text": "public function reset()\n {\n $this->values[self::USERID] = null;\n $this->values[self::CREATORID] = null;\n $this->values[self::ROOMID] = null;\n $this->values[self::ROOMTYPE] = null;\n $this->values[self::USERNICKNAME] = null;\n $this->values[self::USERAVATARURL] = null;\n $this->values[self::USERLEVEL] = null;\n $this->values[self::USERRATE] = null;\n }", "title": "" } ]
c4a8cb0a9e01346e66da9565eb39c179
Google Analytics sync (Traditional)
[ { "docid": "05701ac8e20a7a6754b390a65ae7dc69", "score": "0.64190704", "text": "protected function insertSyncGaCode($con) {\n\t \n\t\t$anonymizeIp = '';\n\t\tif ($this->conf['anonymized'] == 1) {\n\t\t\t$anonymizeIp = '_gat._anonymizeIp();';\n\t\t}\n\t\t\n\t\t$trackpageload = '';\n\t\tif ($this->conf['trackpageload'] == 1) {\n\t\t\t$trackpageload = 'pageTracker._trackPageLoadTime();';\n\t\t}\n\n\t\t/* Remove _gaq. and _gat. if set\n\t\t * also remove configs without underscore (e.g. account) */\n\t\t$gaConf = array();\n\t\tforeach ($this->conf as $param => $val) {\n\t\t\t$param = htmlspecialchars($param);\n\t\t\tif (is_array($val)) {\n\t\t\t\tforeach ($val as $paramTwo => $valTwo) {\n\t\t\t\t\t$paramTwo = htmlspecialchars($paramTwo);\n\t\t\t\t\t$valTwo = htmlspecialchars($valTwo);\n\t\t\t\t\tif (substr($paramTwo, 0, 1) == '_') {\n\t\t\t\t\t\t$gaConf[$paramTwo] = $valTwo;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$val = htmlspecialchars($val);\n\t\t\t\tif (substr($param, 0, 1) == '_') {\n\t\t\t\t\t$gaConf[$param] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$options = '';\n\t\tforeach ($gaConf as $param => $val) {\n\t\t\tif ($val != 'true' && $val != 'false' && $val != '1' && $val != '0' && strpos($val, ',') === FALSE) {\n\t\t\t\t$val = '\"'.$val.'\"';\n\t\t\t}\n\t\t\t$val = str_replace('&amp;', '&', $val);\n\t\t\t$options .= 'pageTracker.'.$param.'('.$val.');'.chr(10);\n\t\t}\n\n\t\t$gaSyncBeforeContent = chr(10).'<script type=\"text/javascript\">\n/* <![CDATA[ */\n var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n document.write(\"\\<script src=\\'\" + gaJsHost + \"google-analytics.com/ga.js\\' type=\\'text/javascript\\'>\\<\\/script>\" );\n/* ]]> */\n</script>\n<script type=\"text/javascript\">\n/* <![CDATA[ */\n try{\n var pageTracker = _gat._getTracker(\"'.$this->conf['account'].'\");\n '.$anonymizeIp.'\n '.$options.'\n pageTracker._initData();\n } catch(err) {}\n/* ]]> */\n</script>';\n\n\t\t$gaSyncAfterContent = '<script type=\"text/javascript\">\n/* <![CDATA[ */\n try{\n pageTracker._trackPageview();\n '.$trackpageload.'\n } catch(err) {}\n/* ]]> */\n</script>';\n\n\t\t$con = $this->insertTrackerCode($con, $gaSyncBeforeContent, 'bodyBegin');\n\t\t$content = $this->insertTrackerCode($con, $gaSyncAfterContent, 'bodyEnd');\n\t\treturn $content;\n\t}", "title": "" } ]
[ { "docid": "0a8065b8c3d570d0cb6a97049bbcaa55", "score": "0.7016845", "text": "public function trackGoogleAnalytics(){\n $bot_details = $this->get_bot_details();\n if($bot_details[\"model\"]!=\"Spider\"){\n return;\n }\n\n if(preg_match('/(UA|YT|MO)-\\d+-\\d{1,3}$/', get_option(\"google_analytics_property_id\"))==false){\n return;\n }\n\n $core_payload_template = array (\n 'v' => '1',\n 't' => 'pageview',\n 'dl' => ($_SERVER[\"HTTPS\"] == \"on\" ? \"https\" : \"http\").'://'.$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"],\n 'ul' => substr($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"],0,2),\n 'de' => 'UTF-8',\n 'dt' => wp_get_document_title(),\n 'cid' => $bot_details[\"ga_client_id\"],\n 'uid' => $bot_details[\"ga_user_id\"],\n 'tid' => get_option(\"google_analytics_property_id\"),\n 'ds' => 'wp-seo-ga',\n 'a' => rand(100000,9999999),\n 'z' => rand(100000,9999999),\n 'cd1' => $bot_details[\"name\"],\n 'cd2' => $bot_details[\"model\"],\n 'cd3' => $bot_details[\"type\"],\n 'cd4' => $bot_details[\"user_agent\"],\n 'cd5' => '200',\n 'cd6' => $bot_details[\"ga_client_id\"],\n 'cd7' => ip2long($bot_details[\"ip_address\"]),\n 'cd8' => round(memory_get_peak_usage() / 1024 / 1024, 0),\n 'cd9' => timer_stop(),\n 'cd10' => get_num_queries(),\n 'cd11' => $bot_details[\"name\"],\n 'cd12' => $bot_details[\"model\"],\n 'cd13' => $bot_details[\"type\"],\n 'cd14' => ($_SERVER[\"HTTPS\"] == \"on\" ? \"https\" : \"http\"),\n 'cd15' => $_SERVER[\"SERVER_PROTOCOL\"],\n 'cd16' => $bot_details[\"ip_reverse_domain\"]\n );\n\n if(is_404()){\n $core_payload_template[\"cd5\"]= '404';\n }\n $this->send_ga_hit($core_payload_template);\n }", "title": "" }, { "docid": "dfe4e3a582fbb0bfc5b895749f473286", "score": "0.6606314", "text": "function delicious_google_analytics_tracking_code(){\n\tglobal $smof_data;\n\n\tif ($smof_data['analytics_enabled'] === '1') { \n\n\t\twp_enqueue_script('google-analytics', get_template_directory_uri() . '/js/google-analytics.js', array('jquery'), '1.0', false );\t\n\t\twp_localize_script( 'google-analytics', \"ga\", array( 'ga_id' => $smof_data['ga_id']) );\t\t\n\n\t}\n}", "title": "" }, { "docid": "88aaa10b759cdf2dbcea3e8377e48753", "score": "0.6552537", "text": "public function send_analytics()\n {\n if ($this->get_option('ua') == static::YES && $this->get_option('ua_code') && is_checkout()) {\n $retailcrm_analytics = WC_Retailcrm_Google_Analytics::getInstance($this->settings);\n echo $retailcrm_analytics->send_analytics();\n } else {\n echo '';\n }\n }", "title": "" }, { "docid": "fe3aa9973720a03dbc56e743ab724912", "score": "0.6446197", "text": "function GoogleAnalytics()\n\t{\tinclude(CITDOC_ROOT . '/google/analytics.html');\n\t}", "title": "" }, { "docid": "d3a37943b1cbb8a1646690b21feef41b", "score": "0.6426475", "text": "function add_google_analytics()\n{\n?>\n<script type=\"text/javascript\">\n/* <![CDATA[ */\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-XXXXX-X']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n/* ]]> */\n</script>\n<?php\n}", "title": "" }, { "docid": "9d2c1a3ee7afcc98d471478676929563", "score": "0.6391866", "text": "function add_google_analytics() {\n $options = get_option('pands_script_plugin_options');\n ?>\n <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '<?php echo $options['google_analytics_number']; ?>']);\n _gaq.push(['_trackPageview']);\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n </script>\n <?php\n\n }", "title": "" }, { "docid": "8fac96a6d1dddab8c295dfce6b44d5cc", "score": "0.634534", "text": "public function analyticsAction()\n\t{\n\t\t$analytics = $this->_helper->hooks->getOption( 'option_analytics' );\n\t\t\n\t\ttry{\n\t\t\t$ga = new My_Google_Analytics(\n\t\t\t\t$analytics['g_mail'], // email\n\t\t\t\t$this->_helper->hooks->getDecrypt( $analytics['g_password'] ) // passsword\n\t\t\t);\n\t\t\t// profileID\n\t\t\t$ga->setProfile( 'ga:'.$analytics['ga_profile_id'] ); \n\t\t\t\n\t\t\t// date range\n\t\t\t$ga->setDateRange(\n\t\t\t\tdate('Y-m-d',strtotime( '-30 days' )) , \n\t\t\t\tdate('Y-m-d',strtotime('now')) \n\t\t\t);\n\t\t\t\n\t\t\t// visit graph\n\t\t\t$visitsgraph = $ga->getReportArray(\n\t\t\t\tarray(\n\t\t\t\t\t'dimensions' => urlencode('ga:date'),\n\t\t\t\t\t'metrics' => urlencode('ga:visits')\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t// referrer\n\t\t\t$referrers = $ga->getReportArray(\n\t\t\t\tarray(\n\t\t\t\t\t'dimensions' => urlencode('ga:city'),\n\t\t\t\t\t'metrics' => urlencode('ga:visits'),\n\t\t\t\t\t'sort' => urlencode('-ga:visits'),\n\t\t\t\t\t'max-results' => 5\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$this->_helper->json(array(\n\t\t\t\t'visits' => $visitsgraph, \n\t\t\t\t'referrers' => $referrers\n\t\t\t));\n\t\t\t\n\t\t} catch(exception $e){\n\t\t\t$this->_helper->json( array( 'exception' => $e->getMessage()) );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "12678fde4a2858d6e6d6e679bf2bbdf4", "score": "0.6313364", "text": "function roots_google_analytics() { ?>\n<script>\n\t(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=\n\tfunction(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;\n\te=o.createElement(i);r=o.getElementsByTagName(i)[0];\n\te.src='//www.google-analytics.com/analytics.js';\n\tr.parentNode.insertBefore(e,r)}(window,document,'script','ga'));\n\tga('create','<?php echo GOOGLE_ANALYTICS_ID; ?>');ga('send','pageview');\n</script>\n\n<?php }", "title": "" }, { "docid": "474726fb4439a6ced9e9dab700d18796", "score": "0.63038296", "text": "function google_analytics($trackingID='UA-67108612-2') {\r\n\t$html = '\t\r\n\t<!-- Google Analytics - Global site tag (gtag.js) -->\r\n\t<script async src=\"https://www.googletagmanager.com/gtag/js?id='.$trackingID.'\"></script>\r\n\t<script>\r\n\t window.dataLayer = window.dataLayer || [];\r\n\t function gtag(){dataLayer.push(arguments);}\r\n\t gtag(\"js\", new Date());\r\n\r\n\t gtag(\"config\", \"'.$trackingID.'\")\r\n\t</script>\r\n\t';\r\n\techo $html;\r\n}", "title": "" }, { "docid": "04b4b9eab0b073b4f4f9455759b4b9d8", "score": "0.62583584", "text": "function cpro_ga_resync() {\r\n\r\n\tif ( class_exists( 'CP_V2_GA' ) ) {\r\n\r\n\t\t$ga_option = get_option( 'cp_ga_analytics_data' );\r\n\r\n\t\tif ( ! ( ! is_array( $ga_option ) && false !== $ga_option ) ) {\r\n\t\t\t$obj = new CP_V2_GA();\r\n\t\t\t$obj->resync_ga_data_cron();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "6ece8bdfbcbc15e6b069e16ee0858f83", "score": "0.6229086", "text": "function google_analytics() { ?>\n\n <script>\n (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=\n function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;\n e=o.createElement(i);r=o.getElementsByTagName(i)[0];\n e.src='//www.google-analytics.com/analytics.js';\n r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));\n ga('create','<?php echo GOOGLE_ANALYTICS_ID; ?>');ga('send','pageview');\n </script>\n\n<?php }", "title": "" }, { "docid": "fc2f6adcad069f626ecebf90d3990fb9", "score": "0.6201716", "text": "public static function pdmx_google_analytics_code( ) {\n\t\tif ( get_option( 'pdmx_google_analytics_id' ) ): ?>\n\t\t\t<!-- Google Analytics -->\n\t\t\t<script>\n\t\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t\t})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\n\t\t\t\tga('create', '<?php echo get_option( 'pdmx_google_analytics_id' ); ?>', 'auto');\n\t\t\t\tga('send', 'pageview');\n\t\t\t</script>\n\t\t\t<!-- END Google Analytics -->\n\t\t<?php endif;\n\t}", "title": "" }, { "docid": "a0a974c484663888fcc1fcd972b1798f", "score": "0.60889304", "text": "function trackPageView() {\n // $GET is non decode get parameter\n $GET = array();\n $get_params = preg_split(\"/&/\", $_SERVER['QUERY_STRING']);\n foreach($get_params as $param) {\n list($key, $val) = preg_split(\"/=/\", $param);\n $GET[$key] = $val;\n }\n\n $domainName = isset($_SERVER[\"SERVER_NAME\"]) ? urlencode($_SERVER[\"SERVER_NAME\"]) : '';\n\n // Get the referrer from the utmr parameter, this is the referrer to the\n // page that contains the tracking pixel, not the referrer for tracking\n // pixel.\n $documentReferer = isset($GET[\"utmr\"]) ? $GET[\"utmr\"] : '';\n if(empty($documentReferer) && $documentReferer !== \"0\") {\n $documentReferer = \"-\";\n }\n $documentPath = isset($GET[\"utmp\"]) ? $GET[\"utmp\"] : '';\n $pageTitle = isset($GET[\"utmdt\"]) ? $GET[\"utmdt\"] : '';\n $utmt = isset($GET[\"utmt\"]) ? $GET[\"utmt\"] : '';\n\n $utme = isset($GET[\"utme\"]) ? $GET[\"utme\"] : '';\n\n $account = $GET[\"utmac\"];\n\n $visitorId = getVisitorId();\n\n $utmGifLocation = \"http://www.google-analytics.com/__utm.gif\";\n\n // Construct the gif hit url.\n $utmUrl = \"{$utmGifLocation}?utmwv=\" . VERSION .\n \"&utmn=\" . getRandomNumber() .\n \"&utmhn={$domainName}\" .\n \"&utmr={$documentReferer}\" .\n \"&utmp={$documentPath}\" .\n \"&utmac={$account}\" .\n \"&utmcc=__utma%3D999.999.999.999.999.1%3B\" .\n \"&utmvid={$visitorId}\" .\n \"&utmip=\" . getIP($_SERVER[\"REMOTE_ADDR\"]);\n\n if(!empty($utme)) $utmUrl .= \"&utme={$utme}\";\n if(!empty($pageTitle)) $utmUrl .= \"&utmdt={$pageTitle}\";\n\n sendRequestToGoogleAnalytics($utmUrl);\n\n // If the debug parameter is on, add a header to the response that contains\n // the url that was used to contact Google Analytics.\n if (!empty($_GET[\"utmdebug\"])) {\n header(\"X-GA-MOBILE-URL:\" . $utmUrl);\n }\n // Finally write the gif data to the response.\n writeGifData();\n}", "title": "" }, { "docid": "4bbedf5e11c8ce3c0611025297c63ce1", "score": "0.6080655", "text": "static function Track($accountNumber)\r\n\t{\r\n\t\t// URL to download Google Analytics API JavaScripts. Note that there is a http and a https version.\r\n\t\t$url = (isset($_SERVER['HTTPS'])?'https://ssl.':'http://www.') . 'google-analytics.com/ga.js';\r\n\t\t// Add those scripts.\r\n\t\tClientScript::AddSource($url, false);\r\n\t\t// The code to report this use of the page to Google servers.\r\n\t\tClientScript::RaceQueue(WebPage::That(), '_gat', \"pageTracker = _gat._getTracker('$accountNumber');pageTracker._trackPageview();\");\r\n\t\t// Report back to Google servers every time tokens are changed too.\r\n\t\tURL::SetTracker(new RaceClientEvent('pageTracker', 'pageTracker._trackPageview', URL::Tokens));\r\n\t}", "title": "" }, { "docid": "a7c2e81662925e360cc664223d92a697", "score": "0.6080533", "text": "public static function save()\n\t{\n\t\tConfigManager::save('GoogleAnalytics', self::load(), 'config');\n\t}", "title": "" }, { "docid": "25b7e6e895cc14f8513a984ca8f1389a", "score": "0.6073703", "text": "public function initialize_analytics()\n {\n if ($this->get_option('ua') && $this->get_option('ua_code')) {\n $retailcrm_analytics = WC_Retailcrm_Google_Analytics::getInstance($this->settings);\n echo $retailcrm_analytics->initialize_analytics();\n } else {\n echo '';\n }\n }", "title": "" }, { "docid": "eead24d1d9c59ac0a98b21aab3e4b45d", "score": "0.60703754", "text": "private function setAnalyticsArray()\n {\n try {\n $results = $this->getAnalyticsData();\n } catch (apiServiceException $e) {\n // Error from the API.\n echo '<p class=\"errorMessage\">There was an API error : ' . $e->getCode() . ' : ' . $e->getMessage() . '</p>' . PHP_EOL;\n $this->errorMsg .= 'There was an API error : ' . $e->getCode() . ' : ' . $e->getMessage() . PHP_EOL;\n } catch (Exception $e) {\n echo '<p class=\"errorMessage\">There was a general error : ' . $e->getMessage() . '</p>' . PHP_EOL;\n $this->errorMsg .= 'There was a general error : ' . $e->getMessage() . PHP_EOL;\n }\n\n if (!empty($results) && count($results->getRows()) > 0) {\n /**\n * $rows[0] string The value from ga:deviceCategory (desktop, mobile or tablet)\n * $rows[1] string The value from ga:channelGrouping (We only need Paid Search or Display)\n * $rows[2] string The value from ga:isTrueViewVideoAd (Yes or No)\n * $rows[3] integer The value from ga:users The Unique Visits\n * $rows[4] integer The value from ga:sessions The Visits\n * $rows[5] integer The value from ga:bouces The Bounces\n */\n $rows = $results->getRows();\n $numRows = count($rows);\n // loop through all the rows of the multi dimensional array\n for ($i = 0; $i < $numRows; $i++) {\n // set \"Unique Visits\", \"Visits\" and \"Bounces\"\n $this->getVisitsAndBounces($rows[$i]);\n }\n // Add up all the Unique Visits, Visits and Bounces\n $this->setTotalVisitsAndBounces();\n }\n // There are no Google Analytics data\n else {\n echo '<p class=\"errorMessage\">No Google Analytics results found for account: <span class=\"accountName\">' . $this->accountName . '</span></p>' . PHP_EOL;\n $this->warningMsg .= 'No Google Analytics results found for account: ' . $this->accountName . PHP_EOL;\n }\n }", "title": "" }, { "docid": "5b70184769a431f8efd15ae57b6482fc", "score": "0.6015246", "text": "function sendRequestToGoogleAnalytics($utmUrl) {\n $options = array(\n \"http\" => array(\n \"method\" => \"GET\",\n \"user_agent\" => $_SERVER[\"HTTP_USER_AGENT\"],\n \"header\" => (\"Accepts-Language: \" . $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]))\n );\n if (!empty($_GET[\"utmdebug\"])) {\n $data = file_get_contents(\n $utmUrl, false, stream_context_create($options));\n } else {\n $data = @file_get_contents(\n $utmUrl, false, stream_context_create($options));\n }\n}", "title": "" }, { "docid": "f17e429a2fcae65c1a737754b42087b2", "score": "0.6002661", "text": "function ga_tracking_code($class)\n{\n\n // no indentation on purpose\n ?>\n<!-- Start WooCommerce Google Analytics Pro -->\n <?php do_action('wc_google_analytics_pro_before_tracking_code');?>\n<script>\n\n <?php echo $class->ga_function_name; ?>( 'create', '<?php echo esc_js($class->get_tracking_id()); ?>', 'auto' );\n <?php echo $class->ga_function_name; ?>( 'set', 'forceSSL', true );\n<?php if ('yes' === $class->settings['track_user_id'] && is_user_logged_in()): ?>\n <?php echo $class->ga_function_name; ?>( 'set', 'userId', '<?php echo esc_js(get_current_user_id()) ?>' );\n<?php endif;?>\n<?php if ('yes' === $class->settings['anonymize_ip']): ?>\n <?php echo $class->ga_function_name; ?>( 'set', 'anonymizeIp', true );\n<?php endif;?>\n<?php if ('yes' === $class->settings['enable_displayfeatures']): ?>\n <?php echo $class->ga_function_name; ?>( 'require', 'displayfeatures' );\n<?php endif;?>\n <?php echo $class->ga_function_name; ?>( 'require', 'ec' );\n</script>\n <?php do_action('wc_google_analytics_pro_after_tracking_code');?>\n<!-- end WooCommerce Google Analytics Pro -->\n <?php\n}", "title": "" }, { "docid": "e7afdc468c5095e756877bdf9c8eb167", "score": "0.5987596", "text": "function googleTrackingCode() {\n\t$trackingID = ls_option('google_analytics_tracking_id');\n\tif($trackingID):\n ?>\n <script>\n\t (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\n\t ga('create', '<?= $trackingID; ?>', 'auto');\n\t ga('send', 'pageview');\n\t</script>\n <?php\n endif;\n}", "title": "" }, { "docid": "aabbe964e8f2fd10d8c4e11a76c3632d", "score": "0.5976039", "text": "function analytics() {\n\n\t$option = get_option('osi-analytics');\n\n\tif ($option['enable'] == \"true\") {\n?>\n<script type=\"text/javascript\">\n\t\t\tvar _gaq = _gaq || [];\n\t\t\t_gaq.push(['_setAccount', '<?php analytics_code(); ?>']);\n\t\t\t_gaq.push(['_trackPageview']);\n\t\t\t(function() {\n\t\t\t\tvar ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n\t\t\t\tga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n\t\t\t\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n\t\t\t})();\n\t\t</script>\n<?php\n\t}\n}", "title": "" }, { "docid": "3448fe07d1e0a775202f52cb2c6e9037", "score": "0.5942769", "text": "private function globalTracks(){\n\n $toTrack = array(\n 'Visitor' => (empty($_SERVER['REMOTE_HOST'])) ? $_SERVER['REMOTE_ADDR'] : $_SERVER['REMOTE_HOST'],\n 'Agent' => $_SERVER['HTTP_USER_AGENT'],\n 'Time' => $_SERVER['REQUEST_TIME'],\n 'Query' => $_SERVER['QUERY_STRING']\n );\n\n $this->type( \"global\" )\n ->item( \"global\" )\n ->meta( \"impressions\", $toTrack)\n ->track();\n }", "title": "" }, { "docid": "e84f2f05b60072d5f6c24ddf9cba4526", "score": "0.59412825", "text": "public function send()\n {\n $cookie = $this->getCookie();\n preg_match('/_ga=[A-Za-z0-9.]{12,}[;]{0,1}/', $cookie->getFieldValue(), $matches);\n\n // Get the cid from the cookie\n if (empty($matches)) {\n // Default uuid, if Google Analytics is setup on the website then this should never have to be used\n $cid = '62028545.1404101234';\n } else {\n $gaCookie = explode('.', $matches[0]);\n $cid = $gaCookie[2] . '.' . $gaCookie[3];\n }\n\n // Google Analytics Measurement Protocol Params\n $gaParams = array(\n 'v' => '1', // Version of measurement protocol\n 'tid' => $this->getTId(), // Tracking ID\n 'cid' => $cid, // Customer/User ID\n 't' => 'event', // Type\n 'ec' => 'TestCategory', // Category\n 'ea' => 'TestAction6', // Action\n// 'el' => 'TestLabel', // Label\n// 'ev' => '1' // Value\n );\n\n // Send to Google Analytics via Post\n $config = array(\n 'adapter' => 'Zend\\Http\\Client\\Adapter\\Curl',\n 'curloptions' => array(CURLOPT_FOLLOWLOCATION => true),\n );\n $client = new Client('http://www.google-analytics.com/collect', $config);\n $client->setMethod('POST');\n $client->setRawBody(http_build_query($gaParams));\n $client->setHeaders(array('User-Agent'=>$this->getUserAgent())); // Set to appropriate user_agent_string\n $client->send();\n die('sent');\n }", "title": "" }, { "docid": "4a4bc5981fe671abff2bd61a333868bf", "score": "0.59337115", "text": "public function createGaJsFile(Varien_Event_Observer $observer)\n { \n \t $isGoogleAnalyticsActive = Mage::getStoreConfig('google/analytics/active'); \n if($isGoogleAnalyticsActive != 0 || $isGoogleAnalyticsActive != ''){\n \t $trackingElements = unserialize(Mage::getStoreConfig('gaevent_options/messages/allowed_methods'));\n \t $trackingElementsSize = count($trackingElements);\n $trackingElementType = $trackingElements['method'];\n $flag =0;\n $urlFlag = 0;\n $idFlag = 0;\n $clsnameFlag = 0;\n $tempArray = array();\n foreach ($trackingElementType as $key => $value) { //array creation for json encode\n switch ($value) {\n case 'URL':\n if($trackingElements['uic'][$flag] != ''){\n $tempArray['URL'][$urlFlag]['name'] = $trackingElements['uic'][$flag];\n $tempArray['URL'][$urlFlag]['action'] = $trackingElements['action'][$flag];\n $tempArray['URL'][$urlFlag++]['label'] = $trackingElements['label'][$flag];\n }\n break;\n case 'ID':\n $tempArray['ID'][$idFlag]['name'] = $trackingElements['uic'][$flag];\n $tempArray['ID'][$idFlag]['action'] = $trackingElements['action'][$flag];\n $tempArray['ID'][$idFlag++]['label'] = $trackingElements['label'][$flag];\n break; \n case 'Classname':\n $tempArray['Classname'][$clsnameFlag]['name'] = $trackingElements['uic'][$flag];\n $tempArray['Classname'][$clsnameFlag]['action'] = $trackingElements['action'][$flag];\n $tempArray['Classname'][$clsnameFlag++]['label'] = $trackingElements['label'][$flag]; \n break;\n }\n $flag ++;\n }\n if(count($tempArray) != 0){\n $jsonData = json_encode($tempArray);\n $jsonData = \"var gaJsonString = \".$jsonData;\n \t$path = Mage::getBaseDir('media') . DS . 'gaevent' . DS;\n if (!file_exists($path)) { //create folder if not exist\n mkdir($path, 0777, TRUE);\n }\n $filePath = $path . 'gaevent.js';\n file_put_contents($filePath, $jsonData);\n }else{\n $jsonData = 'var gaJsonString = \"No Data\"';\n $path = Mage::getBaseDir('media') . DS . 'gaevent' . DS;\n if (!file_exists($path)) { //create folder if not exist\n mkdir($path, 0777, TRUE);\n }\n $filePath = $path . 'gaevent.js';\n file_put_contents($filePath, $jsonData);\n }\n }\n }", "title": "" }, { "docid": "900017b1a03cb6e29101cf94d4bc168f", "score": "0.59263253", "text": "function mdframework_google_analytics() {\n\t$gacustom = of_get_option('google_analytics_custom_code');\n\techo '<script>'.$gacustom.'</script>';\n}", "title": "" }, { "docid": "4497462ba5b9bfdae51e6b87a6bf3b8d", "score": "0.5920105", "text": "function add_blog_google_analytics() {\n $GAID = get_option(SHORT_NAME . '_gaID');\n if ($GAID and $GAID != ''):\n echo <<<HTML\n<script type=\"text/javascript\">\n\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '$GAID']);\n _gaq.push(['_trackPageview']);\n \n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n\n</script>\nHTML;\n endif;\n}", "title": "" }, { "docid": "435888d5f8f52c41c08ef3a60744a7b9", "score": "0.58744466", "text": "function cp_google_analytics_code() {\n\tglobal $cp_options;\n\n\tif ( ! empty( $cp_options->google_analytics ) ) {\n\t\techo stripslashes( $cp_options->google_analytics );\n\t}\n\n}", "title": "" }, { "docid": "6765cab5349df294f3a061a67aadd664", "score": "0.58227724", "text": "public function toString() {\n $xhtml = array();\n $xhtml[] = '<script type=\"text/javascript\">';\n $xhtml[] = \"var _gaq = _gaq || [];\";\n \n \n foreach (self::$_trackerOptionsByIds as $trackerId => $options) {\n switch($trackerId)\n {\n case \"accounts\":\n $count=0;\n foreach ($options as $account)\n { \n $instanceName=\"\";\n if($count>=1)\n {\n $instanceName = 'tracker' . $count.'.';\n }\n $xhtml[] = \"_gaq.push(['{$instanceName}_setAccount', '\" . $account . \"']);\";\n $xhtml[] = \"_gaq.push(['{$instanceName}_trackPageview']);\";\n $count++;\n }\n break;\n case 'options':\n default :\n foreach ($options as $optionName => $optionArgs) {\n if(in_array($optionArgs,array('true','false')))\n {\n $optionValue = $optionArgs;\n }\n else\n {\n $optionValue = \"'{$optionArgs}'\";\n }\n $xhtml[] = \"_gaq.push(['_\". $optionName . \"', \" . $optionValue . \"]);\";\n }\n break;\n }\n \n }\n \n \n// foreach (self::$_trackerOptionsByIds as $trackerId => $options) {\n// // add options\n// foreach ($options as $optionName => $optionArgs) {\n// $xhtml[] = \"_gaq.push(['tracker\" . $count . '.' . $optionName . \"', '\" . $optionArgs . \"']);\";\n// }\n// // init tracker\n// $xhtml[] = \"_gaq.push(['tracker\" . $count . \"._setAccount', '\" . $trackerId . \"']);\";\n// $xhtml[] = \"_gaq.push(['tracker\" . $count . \"._trackPageview']);\";\n// $count++;\n// }\n \n \n $xhtml[] = \"(function() {\";\n $xhtml[] = \"var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\";\n $xhtml[] = \"ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\";\n $xhtml[] = \"var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\";\n $xhtml[] = \"})();\";\n $xhtml[] = '</script>';\n return implode(\"\\n\", $xhtml);\n }", "title": "" }, { "docid": "26a34bd2e73eae0cc667e39ef0df19ac", "score": "0.581746", "text": "public static function enter_pdmx_google_analytics_id() {\n\t\tif ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) )\n\t\t\treturn false;\n\n\t\tupdate_option( 'pdmx_google_analytics_id', $_POST['pdmx-google-analytics-id'] );\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f9cdf761b58ff547ee7c112ae81b5dda", "score": "0.58137393", "text": "private function generateGATrackingCode() {\n # string setAccount => UA-XXXX-Y\n # string setDomainName\n # string setCookiePath\n # bool enhancedLinkAttribution\n # string trackPageview\n\n # [[+ga_options]]\n $ga_options = array();\n\n # create a GA tracker\n $GAtracker = '';\n\n if ($this->config['enhancedLinkAttribution']) $GAtracker .= \"['_require','inpage_linkid',p],\";\n $GAtracker .= \"['_setAccount','\".$this->config['setAccount'].\"'],\";\n $GAtracker .= empty($this->config['trackPageview']) ? \"['_trackPageview']\" : \"['_trackPageview', '\".$this->config['trackPageview'].\"']\";\n if (!empty($this->config['setDomainName'])) $GAtracker .= \",['_setDomainName','\".$this->config['setDomainName'].\"']\";\n if (!empty($this->config['setCookiePath'])) $GAtracker .= \",['_setCookiePath','\".$this->config['setCookiePath'].\"']\";\n\n $ga_options['ga_options'] = $GAtracker;\n return $this->getChunk('googleAnalyticsTpl',$ga_options);\n }", "title": "" }, { "docid": "e509a528261a0d809a785322fb99bf16", "score": "0.58112115", "text": "function google_analytics() {\n if (!WP_DEBUG && get_theme_mod('google_analytics')) { ?>\n <script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n ga('create', '<?php echo get_theme_mod('google_analytics'); ?>', 'auto');\n ga('send', 'pageview');\n </script><?php\n }\n}", "title": "" }, { "docid": "daab9fc04b842f7e03ba3cfc8a63eb37", "score": "0.5798356", "text": "public function getAnalytics();", "title": "" }, { "docid": "96f64d0751695a2705148fdc3bc77e0c", "score": "0.5798144", "text": "function add_googleanalytics() {\n}", "title": "" }, { "docid": "1c70b40e13a3ecacbc88274c724bd2e2", "score": "0.5784463", "text": "public function sendAnalyticsToMongoBase()\r\n {\r\n\t\t\r\n\t// Get current timestamp\r\n\t\t$ts = time();\r\n\t\t\r\n\t// Add timestamp to document\r\n\t\t$newDoc = $this->analyticsValues;\r\n\t\t$newDoc['timestamp'] = $ts;\r\n\t\t\r\n\t// Calculate hash with timestamp\r\n\t\t$temporalHash = md5(serialize($newDoc));\r\n\t\t$newDoc['unique_th'] = $temporalHash;\r\n\t\t\r\n\t// Write document \r\n\t\ttry\r\n\t\t{\r\n\t\t\t$this->WZMongo->insertDoc($newDoc, $temporalHash);\r\n\t\t}\r\n\t\tcatch (AlyException $e){throw $e;}\r\n\t\tcatch (Exception $e) {throw $e;}\r\n }", "title": "" }, { "docid": "bea4c4e8fdd44d46bf9e5419310090ed", "score": "0.5718703", "text": "public function storeAnalyticsDaily()\n {\n $start_date = \\Carbon\\Carbon::yesterday();\n $end_date = \\Carbon\\Carbon::yesterday();\n $period = Period::create($start_date, $end_date);\n \n $metrics = 'ga:pageviews,ga:adsenseRevenue,ga:adsensePageImpressions';\n $others = ['dimensions' => 'ga:pagePath'];\n $analyticsData = Analytics::performQuery($period, $metrics, $others);\n $rows = $analyticsData->rows;\n //$rows = [['/pages/1/article-slug-1', '85', '1.10'], ['/pages/2/article-slug-2', '110', '2.5'], ['/categories/2/something', '10', '0.0']];\n\n foreach($rows as $row) {\n if(explode('/', $row[0])[1] == \"pages\") { \n GoogleAnalytics::create([\n 'page_id' => explode('/', $row[0])[2], \n 'start_date' => $start_date,\n 'page_views' => $row[1], \n 'adsense_revenue' => $row[2]\n ]);\n }\n }\n\n return ['status' => 'success'];\n }", "title": "" }, { "docid": "6122781256bf40a372ea60e568b22bc8", "score": "0.5704339", "text": "function dt_theme_get_tracking_code() {\n\n\t\t\t$tracking_code = dttheme_option('integration', 'tracking-code');\n\n\t\t\tif( empty( $tracking_code ) ) return;\n\n\t\t\t$enable_code = dttheme_option('integration', 'enable-tracking-code');\n\t\t\tif( strpos( get_option( 'analytics-code' ), 'UA-' ) === false && isset( $enable_code ) ) {\n\t\t\t\t// if we only get passed the UA-id create the script for the user ( Universal Tracking Code )\n\n\t\t\t\t$temp = trim( $tracking_code );\n\n\t\t\t\tupdate_option( 'analytics-code', \"<!-- Global site tag (gtag.js) - Google Analytics -->\n<script async src='https://www.googletagmanager.com/gtag/js?id=\".$temp.\"'></script>\n<script>\nwindow.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', '\".$temp.\"', { 'anonymize_ip': true });\n</script>\n\" );\n\t\t\t}\n\n\t\t\tadd_action( 'wp_footer', array( $this, 'dt_theme_print_tracking_code' ), 100 );\n\t\t}", "title": "" }, { "docid": "7d47ac7f8964acebc4ce5de1428e4573", "score": "0.5686511", "text": "function setGoogleAnalyticsTrackingId($id)\n\t {\n\t\t$this->googleAnalyticsTrackingId = $id;\n\t }", "title": "" }, { "docid": "e35258ea4d72d06afe625d0522d2feac", "score": "0.5682944", "text": "function google_analytics_api_admin() {\n\t$form = array();\n\t$gapi = google_analytics_api_gapi();\n\t\n\tif ($gapi) {\n\t\t$form['login_status'] = array(\n\t '#value' => '<p>' . t('Currently you have granted access to a Google Analytics account. Please choose the profile below that contains statistics for this site.') . '</p>',\n\t '#weight' => -10,\n\t );\n\t}\n\telse {\n\t\t$form['logout_status'] = array(\n\t '#value' => '<p>' . t('In order for you to access your Google Analytics account through Drupal, you need to grant access to your account. This gives Drupal permission to contact the Google Analytics server and download statistics about your site.') . '</p>',\n\t '#weight' => -10,\n\t );\n\t}\n\t\n\t$form['client_id'] = array(\n\t\t'#type' => 'textfield',\n\t\t'#title' => t('Client ID'),\n\t\t'#default_value' => variable_get('google_analytics_api_client_id', ''),\n\t\t'#size' => 30,\n\t\t'#description' => t('Client ID created for the app in the access tab of the ') . l('Google API Console', 'http://code.google.com/apis/console', array('attributes' => array('target' => '_blank'))),\n\t\t'#weight' => -9,\n\t);\n\n\t$form['client_secret'] = array(\n\t\t'#type' => 'textfield',\n\t\t'#title' => t('Client Secret'),\n\t\t'#default_value' => variable_get('google_analytics_api_client_secret', ''),\n\t\t'#size' => 30,\n\t\t'#description' => t('Client Secret created for the app in the Google API Console'),\n\t\t'#weight' => -8,\n\t);\n\t\n\tif ($gapi) {\n \t$form['profile_id'] = array(\n\t '#type' => 'select',\n\t '#title' => t('Profile'),\n\t '#options' => google_analytics_api_admin_account_data_options(),\n\t '#default_value' => variable_get('google_analytics_api_profile_id', 0),\n\t '#description' => t(\"Choose your website's profile.\"),\n\t '#required' => TRUE,\n\t '#weight' => -2,\n\t );\n\t $form['logout'] = array(\n\t '#type' => 'submit',\n\t '#value' => t('Revoke access'),\n\t '#weight' => 0,\n\t );\n\t $form['save'] = array(\n\t '#type' => 'submit',\n\t '#value' => t('Save configuration'),\n\t '#weight' => 3,\n\t );\n\t }\n else {\n $form['auth'] = array(\n '#type' => 'submit',\n '#value' => t('Grant access to a Google account'),\n );\n }\n\n return $form;\n}", "title": "" }, { "docid": "eee1060661ae5c6864089f07f281e59b", "score": "0.5674048", "text": "private function generateUATrackingCode() {\n # string webPropertyID\n # bool isLocalhost\n # string cookieDomain => auto||none||domain.tld - default = auto\n # string cookiePath\n # bool forceSSL\n # bool enhancedLinkAttribution\n # bool anonymizeIP\n # string pagePath\n # bool displayfeatures\n\n # [[+ua_options]]\n $ua_options = array();\n\n # create a UA tracker\n # ga('create', 'UA-XXXXX-X', 'auto');\n # ga('create', 'UA-XXXXX-X', 'domain.tld');\n # ga('create', 'UA-XXXXX-X', 'auto||none||domain.tld');\n # ga('create', 'UA-XXXXX-X', {'cookieDomain': 'none', 'cookiePath': '/path/'});\n $UAtracker = '';\n\n if (empty($this->config['cookieDomain']) && !$this->config['isLocalhost']) {\n $this->config['cookieDomain'] = 'auto';\n } else if ($this->config['isLocalhost']) {\n $this->config['cookieDomain'] = 'none';\n }\n\n if (!empty($this->config['cookiePath'])) {\n $cookieProps = \"{'cookieDomain':'\".$this->config['cookieDomain'].\"','cookiePath':'\".$this->config['cookiePath'].\"'}\";\n } else {\n $cookieProps = \"'\".$this->config['cookieDomain'].\"'\";\n }\n\n $UAtracker .= \"ga('create','\".$this->config['webPropertyID'].\"',\".$cookieProps.\");\";\n unset($cookieProps);\n $UAtracker .= empty($this->config['pagePath']) ? \"ga('send','pageview');\" : \"ga('send','pageview','\".$this->config['pagePath'].\"');\";\n\n if ($this->config['forceSSL']) $UAtracker.= \"ga('set','forceSSL',true);\";\n if ($this->config['enhancedLinkAttribution']) $UAtracker.= \"ga('require','linkid','linkid.js');\";\n if ($this->config['anonymizeIP']) $UAtracker.= \"ga('set','anonymizeIp',true);\";\n if ($this->config['displayfeatures']) $UAtracker.= \"ga('require','displayfeatures');\";\n\n $ua_options['ua_options'] = $UAtracker;\n return $this->getChunk('universalAnalyticsTpl',$ua_options);\n }", "title": "" }, { "docid": "4428724d01e307acc4346c3b1de0b0c0", "score": "0.5671234", "text": "function print_ga($key = \"\") {\n global $mtt_google_analytics_account;\n\n if (empty($mtt_google_analytics_account)) {\n return \"\";\n }\n\n return \"<!-- Start Google analytics -->\n<script src=\\\"http://www.google-analytics-foo.com/urchin.js\\\" type=\\\"text/javascript\\\">\n</script>\n<script type=\\\"text/javascript\\\">\n_uacct = \\\"$mtt_google_analytics_account\\\";\nurchinTracker($key);\n</script>\n<!-- End Google analytics -->\";\n}", "title": "" }, { "docid": "d69f4a04c38e96d521a2e235c80ef681", "score": "0.566989", "text": "function getGoogleAnalyticsTrackingId()\n\t {\n\t\treturn $this->googleAnalyticsTrackingId;\n\t }", "title": "" }, { "docid": "6b4b455175e7aba67f34d5da75fd69ad", "score": "0.5664223", "text": "function google_analytics_code() {\n if ( defined( 'GOOGLE_ANALYTICS_CODE' ) && !empty( GOOGLE_ANALYTICS_CODE ) ): ?>\n <script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '<?php echo GOOGLE_ANALYTICS_CODE; ?>', 'auto');\n ga('send', 'pageview');\n\n </script>\n <?php endif; ?>\n<?php\n}", "title": "" }, { "docid": "7c3a37a2f312df0b9e486bbc3149fa56", "score": "0.56532127", "text": "function fth_analytics_ga_init()\n{\n $ga_id = \\Fatherly\\Config\\FatherlyConfig::config()->get('ga_id');\n $output = \"\n <script>\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n var ga_id = '{$ga_id}';\n ga('create', ga_id, 'auto');\n </script>\n \";\n echo $output;\n}", "title": "" }, { "docid": "4d07cd03a3f0d5b6ed2918f1f4cf4e80", "score": "0.5649546", "text": "function trackTranItem() {\n // $GET is non decode get parameter\n $GET = array();\n $get_params = preg_split(\"/&/\", $_SERVER['QUERY_STRING']);\n foreach($get_params as $param) {\n list($key, $val) = preg_split(\"/=/\", $param);\n $GET[$key] = $val;\n }\n\n $domainName = isset($_SERVER[\"SERVER_NAME\"]) ? urlencode($_SERVER[\"SERVER_NAME\"]) : '';\n $account = $GET[\"utmac\"];\n\n $utmtid = isset($GET[\"utmtid\"]) ? $GET[\"utmtid\"] : ''; // order ID\n $utmt = isset($GET[\"utmt\"]) ? $GET[\"utmt\"] : ''; // tran or item\n\n $utmGifLocation = \"http://www.google-analytics.com/__utm.gif\";\n $utmUrl = \"{$utmGifLocation}?utmwv=\" . VERSION .\n \"&utmn=\" . getRandomNumber() .\n \"&utmvid=\" . getVisitorId() .\n \"&utmcc=__utma%3D999.999.999.999.999.1%3B\" .\n \"&utmhn={$domainName}\" .\n \"&utmt={$utmt}\" .\n \"&utmtid={$utmtid}\" .\n \"&utmac={$account}\";\n\n if('tran' === $utmt) {\n $utmUrl .= \"&utmtst={$GET[\"utmtst\"]}\". // affiliation store\n \"&utmtto={$GET[\"utmtto\"]}\". // total price\n \"&utmttx={$GET[\"utmttx\"]}\". // tax\n \"&utmtsp={$GET[\"utmtsp\"]}\". // shipping\n \"&utmtci={$GET[\"utmtci\"]}\". // city\n \"&utmtrg={$GET[\"utmtrg\"]}\". // state\n \"&utmtco={$GET[\"utmtco\"]}\"; // country\n } else if('item' === $utmt) {\n $utmUrl .= \"&utmipc={$GET[\"utmipc\"]}\". // SKU code\n \"&utmipn={$GET[\"utmipn\"]}\". // Product name\n \"&utmiva={$GET[\"utmiva\"]}\". // Product category\n \"&utmipr={$GET[\"utmipr\"]}\". // Product price\n \"&utmiqt={$GET[\"utmiqt\"]}\"; // Purchase quantity\n }\n\n sendRequestToGoogleAnalytics($utmUrl);\n\n // If the debug parameter is on, add a header to the response that contains\n // the url that was used to contact Google Analytics.\n if (!empty($_GET[\"utmdebug\"])) {\n header(\"X-GA-MOBILE-URL:\" . $utmUrl);\n }\n // Finally write the gif data to the response.\n writeGifData();\n}", "title": "" }, { "docid": "6fc5f9533180b336edeea4c5f9c30d20", "score": "0.5584804", "text": "function embed_google_social_analytics(){\n?>\n<script type=\"text/javascript\"><!--\n// Facebook\nif(typeof _gaq != 'undefined' && typeof FB !='undefined'){\n\t// like\n\tFB.Event.subscribe('edge.create', function(targetUrl) {\n\t _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);\n\t});\n\t// unlike\n\tFB.Event.subscribe('edge.remove', function(targetUrl) {\n\t _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);\n\t});\n\t// send\n\tFB.Event.subscribe('message.send', function(targetUrl) {\n\t _gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);\n\t});\n}\n\n// Twitter\nif(typeof _gaq != 'undefined' && typeof twtter !='undefined'){\n\tfunction extractParamFromUri(uri, paramName) {\n\t if (!uri) {\n\t return;\n\t }\n\t var uri = uri.split('#')[0]; // Remove anchor.\n\t var parts = uri.split('?'); // Check for query params.\n\t if (parts.length == 1) {\n\t return;\n\t }\n\t var query = decodeURI(parts[1]);\n\t \n\t // Find url param.\n\t paramName += '=';\n\t var params = query.split('&');\n\t for (var i = 0, param; param = params[i]; ++i) {\n\t if (param.indexOf(paramName) === 0) {\n\t return unescape(param.split('=')[1]);\n\t }\n\t }\n\t}\n\ttwttr.events.bind('tweet', function(event) {\n\t if (event) {\n\t var targetUrl;\n\t if (event.target && event.target.nodeName == 'IFRAME') {\n\t targetUrl = extractParamFromUri(event.target.src, 'url');\n\t }\n\t _gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);\n\t }\n\t});\n}\n\n//--></script>\n<?php\n}", "title": "" }, { "docid": "fe460adf782f60b77e584b7633400b87", "score": "0.55467325", "text": "function sweetapple_print_analytics( $profile_id = null )\n{\n if( getenv(\"HTTP_APPLICATION_ENVIRONMENT\") != \"production\") return;\n\n if( !$profile_id ) {\n $options = get_option('sweetapple_theme_options');\n if($options['google_analytics_id']){\n $profile_id = $options['google_analytics_id'];\n }\n }\n\n if( !empty($profile_id) ) :\n?>\n<script type=\"text/javascript\">\n//<![CDATA[\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '<?php echo $profile_id; ?>']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n//]]>\n</script>\n<?php\n endif;\n}", "title": "" }, { "docid": "30c106affa461741da5fde117d97c1ab", "score": "0.554656", "text": "function google_analytics_api_admin_submit($form, &$form_state) {\n\t$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\n\tcache_clear_all('bw:ga_reports_data', 'cache', true);\n\tcache_clear_all('bw:ga_reports_totals', 'cache', true);\n\tswitch ($op) {\n\t case t('Grant access to a Google account'):\n\t\t\tvariable_set('google_analytics_api_client_id', $form_state['values']['client_id']);\n\t\t\tvariable_set('google_analytics_api_client_secret', $form_state['values']['client_secret']);\n\t\t google_analytics_api_authenticate($form_state['values']['client_id']);\n\t\t\tbreak;\n\t\tcase t('Save configuration'):\n\t variable_set('google_analytics_api_profile_id', intval($form_state['values']['profile_id']));\n\t drupal_set_message(t('Settings have been saved successfully.'));\n\t break;\n\t case t('Revoke access'):\n\t drupal_set_message(t('You have revoked access to your Google account.'));\n\t\t google_analytics_api_logout();\n\t break;\n\t}\n}", "title": "" }, { "docid": "381e231c1a23e18b893cac158b1abff6", "score": "0.54653245", "text": "function pc_display_tag_analytics( $id ) {\n\t\n\techo '<script async src=\"https://www.googletagmanager.com/gtag/js?id='.$id.'\"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);} gtag(\"js\", new Date());gtag(\"config\", \"'.$id.'\");</script>';\n\n}", "title": "" }, { "docid": "d9fc8d4a25869b24d07f098e75ce529f", "score": "0.5462783", "text": "function fth_analytics_gtm_init()\n{\n $gtm_container_id = Fatherly\\Config\\FatherlyConfig::config()->get('gtm_container_id');\n $output = \"\n <script>(function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({\n 'gtm.start': new Date().getTime(), event: 'gtm.js', isScrollUser: document.cookie.indexOf('scroll0=') > 0 \n });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src =\n 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', '$gtm_container_id');</script>\n \n \";\n echo $output;\n}", "title": "" }, { "docid": "3525270d655c1b84782cac5d10c3ef71", "score": "0.5443588", "text": "public function enableDisableGaevent(Varien_Event_Observer $observer){\n $isGoogleAnalyticsActive = Mage::getStoreConfig('google/analytics/active');\n if($isGoogleAnalyticsActive == 0 || $isGoogleAnalyticsActive == ''){\n Mage::getModel('core/config')->saveConfig('gaevent_options/messages/enable', 0); \n } \n }", "title": "" }, { "docid": "b19b7b58d5742e13dd5446342babec77", "score": "0.54307395", "text": "function ssga_header_hook() {\n\tif (get_option('ssga_options')['tracking_id']) :\n\t ?>\n\t <script>\n\t\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t\t})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\n\t\t\t\tga('create', '<?php echo get_option('ssga_options')['tracking_id']; ?>', 'auto');\n\t\t\t\tga('send', 'pageview');\n\t\t\t</script>\n\t <?php\n endif;\n}", "title": "" }, { "docid": "63091ee37b9bf9e15064efd76d157088", "score": "0.5417979", "text": "public function analytics()\n {\n return new Google_Service_Analytics( $this->client );\n }", "title": "" }, { "docid": "f3a74e024a3e52eabcf8c1a2b3f8cf44", "score": "0.54062647", "text": "function nc_download_external_all() {\n nc_download_external( array(\n array (\n 'url' => 'https://ssl.google-analytics.com/ga.js',\n 'filename' => 'ga.js',\n ),\n ) );\n}", "title": "" }, { "docid": "975170b679662f0c19dd105bcaa711c9", "score": "0.5392593", "text": "public function toString()\n {\n // Si le trackerId est renseigné et que c'est une chaine\n if (!empty($this->_trackerId) && is_string($this->_trackerId)) {\n\n $html = array();\n $html[] = '<script type=\"text/javascript\">';\n $html[] = 'var _gaq = _gaq || [];';\n\n // init tracker\n $html[] = \"_gaq.push(['_setAccount', '\" . $this->_trackerId . \"']);\";\n\n // add options\n foreach ($this->_trackerOptions as $key => $value) {\n // build tracker func call\n $optionName = '_' . $key;\n\n if (!empty($value)) {\n $option = is_numeric($value) ? $value : '' . addslashes($value) . '';\n\n // add options\n $html[] = \"_gaq.push(['\" . $optionName . \"', '\" . $option . \"']);\";\n } else {\n $html[] = \"_gaq.push(['\" . $optionName . \"']);\";\n }\n }\n\n // on test si on ne track pas deja une page (évite les double\n // comptage dans les stats)\n if ((!key_exists('trackPageview', $this->_trackerOptions)\n || $this->_trackerOptions['trackPageview'] == '')\n ) {\n // on track la page courante\n $html[] = \"_gaq.push(['trackPageview']);\";\n }\n\n $html[] = \"(function() {\";\n $html[] = \"var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\";\n $html[] = \"ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'\";\n $html[] = \"var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\";\n $html[] = \"})();\";\n $html[] = \"</script>\";\n\n return implode(\"\\n\", $html);\n }\n return '';\n }", "title": "" }, { "docid": "b0ff7cc8af0c9c939cd691c284d4ea66", "score": "0.5367705", "text": "function syncsite() {\n // added in 0.6.1.1\n // Modified 2008-03-17 by Ralph for improved cachePath handling\n include_once(\"./manager/processors/cache_sync.class.processor.php\");\n $sync = new synccache();\n $sync->setCachepath(\"assets/cache/\");\n $sync->setReport(false);\n $sync->emptyCache();\n }", "title": "" }, { "docid": "22432f7bd0891d7ab4c462cdbd64440a", "score": "0.5364494", "text": "function local_ganalytics_before_standard_html_head() : string {\n global $OUTPUT;\n\n // Get the config info, get out if missing, is admin user.\n $config = get_config('local_ganalytics');\n if (empty($config->propertyid) || is_siteadmin()) {\n return '';\n }\n\n if (empty($config->template)) {\n $config->template = 'analyticsjs';\n }\n\n // Collect up the dimensions and metrics we want to push over\n // to Google Analytics for this page request.\n $context = new stdClass();\n $context->propertyid = $config->propertyid;\n\n // Possible for up to 20 custom dimensions for std UA accounts\n // and likewise for custom metrics. Configs tell us how many\n // of each to anticipate.\n if (!empty($config->dimensioncount)) {\n $context->dimensions = array();\n for ($index = 1; $index <= $config->dimensioncount; $index++) {\n $classname = \"local_ganalytics\\dimension\\custom_dimension_{$index}\";\n if (class_exists($classname)) {\n $context->dimensions[] = [ 'index' => $index, 'value' => $classname::get_dimension_value() ];\n }\n }\n }\n if (!empty($config->metriccount)) {\n $context->metrics = array();\n for ($index = 1; $index <= $config->metriccount; $index++) {\n $classname = \"local_ganalytics\\metric\\custom_metric_{$index}\";\n if (class_exists($classname)) {\n $context->metrics[] = [ 'index' => $index, 'value' => $classname::get_metric_value() ];\n }\n }\n }\n\n // Render and return the <script> element we want in the page's\n // head element.\n return $OUTPUT->render_from_template(\"local_ganalytics/{$config->template}\", $context) . \"\\n\";\n\n}", "title": "" }, { "docid": "eb7c9b425636c0117414d9a86062fd21", "score": "0.53554255", "text": "function dangopress_insert_analytics_snippets()\n{\n /* Do not track administrator */\n if (current_user_can('manage_options'))\n return;\n\n $options = get_option('dangopress_options');\n\n if (!empty($options['google_webid'])) {\n?>\n\n<!-- Google Analytics -->\n<script type=\"text/javascript\">\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\n ga('create', '<?php echo $options['google_webid']; ?>', 'auto');\n ga('send', 'pageview');\n</script>\n\n<?php\n }\n\n if (!empty($options['bing_webmaster_user'])) {\n?>\n\n<!-- Bing Webmaster authentication -->\n<meta name=\"msvalidate.01\" content=\"<?php echo $options['bing_webmaster_user']; ?>\" />\n\n<?php\n }\n\n if (!empty($options['bdtj_siteid'])) {\n?>\n\n<!-- Baidu Tongji -->\n<script>\nvar _hmt = _hmt || [];\n(function() {\n var hm = document.createElement(\"script\");\n hm.src = \"//hm.baidu.com/hm.js?<?php echo $options['bdtj_siteid']; ?>\";\n var s = document.getElementsByTagName(\"script\")[0]; s.parentNode.insertBefore(hm, s);\n})();\n</script>\n\n<?php\n }\n}", "title": "" }, { "docid": "d407b368d23b8daa1c5edf265bee0281", "score": "0.53299797", "text": "function initializeAnalytics()\n {\n // Use the developers console and download your service account\n // credentials in JSON format. Place them in this directory or\n // change the key file location if necessary.\n // $KEY_FILE_LOCATION = __DIR__ . '/to-spirit-285312-d3dc642e39bf.json';\n $KEY_FILE_LOCATION = __DIR__ . '/' . $this->jsonFile;\n\n // Create and configure a new client object.\n $client = new Google_Client();\n $client->setApplicationName(\"Hello Analytics Reporting\");\n/////////////////\n //error code:\n try {\n $client->setAuthConfig($KEY_FILE_LOCATION);\n } catch (Throwable $e) { \n return( $this->errors($e->getMessage()) );\n }\n //error code^^^\n///////////////\n $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']);\n $analytics = new Google_Service_Analytics($client);\n\n return $analytics;\n }", "title": "" }, { "docid": "0bb5c2adc409c1f33a1aa3022be11dfa", "score": "0.5320965", "text": "function analytics()\n\t{\n\t\treturn $this->_analytics();\n\t}", "title": "" }, { "docid": "6490b9643754d1535408047f8e3e1a11", "score": "0.5315831", "text": "function google_analytics_TR($trackingID) { \r\n\t// Google Analytics - Tradicional\r\n\t$html = '\r\n\t<!-- GOOGLE ANILYTICS -->\r\n\t<script>\r\n\t\t(function(i,s,o,g,r,a,m){i[\\'GoogleAnalyticsObject\\']=r;i[r]=i[r]||function(){\r\n\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\n\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\r\n\t\t})(window,document,\\'script\\',\\'//www.google-analytics.com/analytics.js\\',\\'ga\\');\r\n\r\n\t\tga(\\'create\\', \\''.$trackingID.'\\', \\'auto\\');\r\n\t\tga(\\'send\\', \\'pageview\\');\r\n\t</script>\t\t\r\n\t';\r\n\treturn $html;\r\n}", "title": "" }, { "docid": "fe3e6b1ca9c90dfc77605a754192e5d4", "score": "0.53073853", "text": "private function initializeAnalytics() {\n\t // Use the developers console and download your service account\n\t // credentials in JSON format. Place them in this directory or\n\t // change the key file location if necessary.\n\t $KEY_FILE_LOCATION = __DIR__ . '/../core/service-account-credentials.json';\n\n\t // Create and configure a new client object.\n\t $client = new Google_Client();\n\t $client->setApplicationName(\"Project\");\n\t $client->setAuthConfig($KEY_FILE_LOCATION);\n\t $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']);\n\t $analytics = new Google_Service_Analytics($client);\n\n\t return $analytics;\n\n\t}", "title": "" }, { "docid": "caff8bed9c15078e7340ba0cd88dc9a3", "score": "0.5307381", "text": "public protected function build(){\n\t\t\n\t\tself::addPush(array(\"_setAccount\", self::getAccountId()));\n\t\tself::addPush(array(\"_trackPageview\"));\n\t\t\n\t\t$items = self::getPushItems();\n\t\t\n\t\t$script[] = \"<script type=\\\"text/javascript\\\">\";\n\t\t$script[] = \"var _gaq = _gaq || [];\";\n\t\t$script[] = \"(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\\nga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\\nvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\\n})();\";\n\t\t$script[] = implode(\"\\n\", $items);\n\t\t$script[] = \"</script>\";\n\t\t\n\t\treturn implode(\"\\n\", $script);\n\t}", "title": "" }, { "docid": "0bd1f026c87bd716755be7f0489e1f0e", "score": "0.53019744", "text": "function analytics_activation() {\n\n\t$option = array('enable' => 'false', 'code' => '');\n\tadd_option('osi-analytics', $option);\n}", "title": "" }, { "docid": "36e31d1579b761b63a785ce730418b02", "score": "0.5300385", "text": "public function action_update_check()\n\t{\n\t \tUpdate::add( 'GoogleAnalytics', '7e57a660-3bd1-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "title": "" }, { "docid": "441c1f6f8d9c4c1f8f5cbd556c7435b1", "score": "0.5294449", "text": "static public function setAnalytics($analyticsType = null, $analyticsId = null)\n\t{\n\t\t$doc = Factory::getDocument();\n\t\t$bodyScript = '';\n\n\t\tif (!$analyticsType)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$analyticsId)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch ($analyticsType)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\t// Universal Google Universal Analytics - loaded in head\n\t\t\t\t$headScript = \"\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . $analyticsId . \"', 'auto');\n ga('send', 'pageview');\n \";\n\t\t\t\t$doc->addScriptDeclaration($headScript);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// Google Tag Manager - party loaded in head\n\t\t\t\t$headScript = \"\n <!-- Google Tag Manager -->\n (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','\" . $analyticsId . \"');\n <!-- End Google Tag Manager -->\n\n \";\n\t\t\t\t$doc->addScriptDeclaration($headScript);\n\n\t\t\t\t// Google Tag Manager - partly loaded directly after body\n\t\t\t\t$bodyScript = \"<!-- Google Tag Manager -->\n<noscript><iframe src=\\\"//www.googletagmanager.com/ns.html?id=\" . $analyticsId . \"\\\" height=\\\"0\\\" width=\\\"0\\\" style=\\\"display:none;visibility:hidden\\\"></iframe></noscript>\n<!-- End Google Tag Manager -->\n\";\n\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t// Mixpanel.com - loaded in head\n\t\t\t\t$headScript = \"\n<!-- start Mixpanel -->(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(\\\".\\\");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;\\\"undefined\\\"!==typeof d?c=b[d]=[]:d=\\\"mixpanel\\\";c.people=c.people||[];c.toString=function(b){var a=\\\"mixpanel\\\";\\\"mixpanel\\\"!==d&&(a+=\\\".\\\"+d);b||(a+=\\\" (stub)\\\");return a};c.people.toString=function(){return c.toString(1)+\\\".people (stub)\\\"};i=\\\"disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user\\\".split(\\\" \\\");\nfor(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement(\\\"script\\\");a.type=\\\"text/javascript\\\";a.async=!0;a.src=\\\"undefined\\\"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:\\\"file:\\\"===e.location.protocol&&\\\"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js\\\".match(/^\\/\\//)?\\\"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js\\\":\\\"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js\\\";f=e.getElementsByTagName(\\\"script\\\")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);\nmixpanel.init(\\\"\" . $analyticsId . \"\\\");<!-- end Mixpanel -->\n \";\n\t\t\t\t$doc->addScriptDeclaration($headScript);\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $bodyScript;\n\t}", "title": "" }, { "docid": "9af94450eb67d11267737fb84a16710c", "score": "0.5294236", "text": "public static function getGoogleAnalyticsInstance()\n\t{\n\t\t// get session token and table id\n\t\t$sessionToken = BackendModel::getModuleSetting('analytics', 'session_token', null);\n\t\t$tableId = BackendModel::getModuleSetting('analytics', 'table_id', null);\n\n\t\t// require the GoogleAnalytics class\n\t\trequire_once 'external/google_analytics.php';\n\n\t\t// get and return an instance\n\t\treturn new GoogleAnalytics($sessionToken, $tableId);\n\t}", "title": "" }, { "docid": "ed88f4bf371957bba35fa65b533bb1d5", "score": "0.52658856", "text": "public function trackRedirect()\n {\n $db = new MySql();\n $db->insertClick($this->id, $this->vendor);\n }", "title": "" }, { "docid": "a98b2fab84e61a98c65107dbbfd3b1ec", "score": "0.52467364", "text": "private function tracking_enabled()\n {\n }", "title": "" }, { "docid": "95c1a73438b5aa700f5ae1aff93fedc6", "score": "0.5244919", "text": "public function __construct(){\r\n\t\t$this->GA_account = ''; //Google Analytics account ID\r\n\t\t$this->GA_campaign = ''; //Google Analytics campaign name\r\n\t}", "title": "" }, { "docid": "b1ba5e499378c81891bbcda6039dcd9e", "score": "0.5238643", "text": "public function GoogleAnalyticsEnabled()\n {\n if (Director::isDev()) {\n return false;\n }\n if ($this->owner->GoogleAnalyticsCode) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b52795dc11743a62950427cbd881b77e", "score": "0.52113134", "text": "private function RefreshAndStoreAndUseNewCredentials()\n {\n $gaTokenParameters = array(\n 'refresh_token' => $this->gaRefreshToken,\n 'client_id' => $this->gaClientId,\n 'client_secret' => $this->gaClientSecret,\n 'grant_type' => 'refresh_token'\n );\n\n $httpClient = new HttpClient();\n $responseJson = $httpClient->POST($this->gaTokenURLBase,$gaTokenParameters);\n $responseArray = json_decode($responseJson, TRUE); \n\n $this->gaAccessToken = $responseArray['access_token'];\n $this->gaTokenExpiryDate = date('d-m-Y H:i:s', strtotime('+'.$responseArray['expires_in'].' seconds'));\n\n $this->SaveCredentials();\n unset($httpClient);\n }", "title": "" }, { "docid": "ea0d79309ddc81ff569c184c88cb7a1a", "score": "0.5190294", "text": "function add_ga_link_footer() {\n $code = get_option('ga_tracking_code');\n if ($code) {\n echo \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n ga('create', '$code', 'auto');\n ga('send', 'pageview'); \n </script>\";\n }\n }", "title": "" }, { "docid": "f3f99c66061a73619af74d8ef10a4bf1", "score": "0.5171785", "text": "function register_settings() {\r\n //décalaration du champ pour récupérer l'UA du compte Google Analytics. Il faut le mettre en liste blanche pour que WP l'enregistre en base.\r\n register_setting('LAMANU_GoogleAnalytics', 'google_analytics');\r\n}", "title": "" }, { "docid": "0d22363fe2cdf4728427c8efef00b8c7", "score": "0.51716864", "text": "function bb_analytics()\n{\n\tif (!current_user_can('edit_posts'))\n\t{\n\t\t//generate_GA_call();\n\t\t//generate_YS_call();\n\t}\n}", "title": "" }, { "docid": "ef98c5d7e9f3876f91ed3662d2900bc9", "score": "0.51712084", "text": "public function actionAnalytics($id)\r\n {\r\n\r\n // Analytics Report\r\n $report = Analytics::report();\r\n\r\n // Set params\r\n $report->app($id)->report('performance')->prepare()->performAsCSV();\r\n\r\n }", "title": "" }, { "docid": "aab70fe5410a20a5805de439e46d1522", "score": "0.5161334", "text": "function get_Analytics_ID()\r\n{\r\n\tif(!isset($_COOKIE['_ga'])) {\r\n\t\treturn \"n/a\";\r\n\t}\r\n\telse {\t\r\n\t\t$temp = filter_var_array(explode(\".\",preg_replace(\"/[^0-9\\.]/\",\"\",$_COOKIE['_ga'])),FILTER_VALIDATE_INT);\r\n\t\treturn $temp[2].\".\".$temp[3];\r\n\t}\r\n}", "title": "" }, { "docid": "7aee3f7cba6e8c0c8bfef79fa9628187", "score": "0.5139689", "text": "function google_tag_manager_code() {?>\n <?php if ( defined( 'GOOGLE_TAG_MANAGER_CODE' ) && !empty( GOOGLE_TAG_MANAGER_CODE )) { ?>\n <script type=\"text/javascript\">\n window.dataLayer = window.dataLayer || [];\n dataLayer.push({\n \t 'gaProfileId': '<?php echo GOOGLE_TAG_MANAGER_CODE ?>'\n });\n </script>\n <!-- Google Tag Manager -->\n <noscript><iframe src=\"//www.googletagmanager.com/ns.html?id=GTM-KJP9LC\"\n height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>\n <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer','GTM-KJP9LC');</script>\n <!-- End Google Tag Manager -->\n <?php } ?>\n<?php\n}", "title": "" }, { "docid": "7b4cb7e66150c580f74be609df4bb6ed", "score": "0.5138281", "text": "function gaGenUUID() {\r\n $cid = rand(1000000000,2147483647).'.'.$time;\r\n $ga = \"GA1.2.\".$cid;\r\n setcookie('_ga', $ga, $time+63115200, '/', \"sofaworks.co.uk\",false,false);\r\n return $cid;\r\n}", "title": "" }, { "docid": "66275a66e711a7d8461c1f8246c60882", "score": "0.5132208", "text": "public function setAnalytics($code);", "title": "" }, { "docid": "f06af0bb57fcba17a7b489cb8a39784d", "score": "0.5129258", "text": "function ga_rewrite() {\n\t\n if (!isset($_COOKIE['ga_rewrite']) && !isset($_GET[\"_ga\"])) {\t\n\t\t$domain = $_SERVER['HTTP_HOST'];\n\n\t\tif (!isset($_COOKIE['_ga'])) {\n\t\t\t$random = str_pad(mt_rand(1,9999999),7,'0',STR_PAD_LEFT);\n\t\t\t$timestamp = time();\n\t\t\t$ga = \"GA1.2.\" . $random . \".\" . $timestamp;\n\t\t}\n\t\t\n\t\telseif (isset($_COOKIE['_ga'])) {\n $ga = $_COOKIE['_ga'];\n }\n\t\t\n\t\tsetcookie('_ga', $ga, time() + 63113904, '/', '.'.$domain);\n\t\tsetcookie('ga_rewrite', $ga, time() + 604800, '/', '.'.$domain);\t\n } \n }", "title": "" }, { "docid": "e34c15523ca9100e15bff932fd76139f", "score": "0.5120687", "text": "function end_tracking()\n\t{\n\t\tif ($_SERVER['HTTP_ORIGIN'])\n\t\t\theader('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);\n\t\telse\n\t\t\theader('Access-Control-Allow-Origin: *');\n\t\t$this->p['standalone'] = true;\n\t\t\n\t\t\n\t\tif (!$_GET['ts'])\n\t\t\treturn;\n\t\t\t\n\t\tif ($_GET['sid'] != session_id()) {\n\t\t\tsession_destroy();\n\t\t\tsession_id($_GET['sid']);\n\t\t\tsession_start();\n\t\t\tZend_Debug::dump($_SESSION);\n\t\t}\n\t\t\n\t\t$u = new Model_Auth;\n\t\t\n\t\t$user = $u->getUserId();\n\t\tif (!$user)\n\t\t\treturn;\n\t\t\n\t\t$w = new Model_Website;\n\t\t$website_id = $w->getIDbyURL($_SERVER['HTTP_REFERER']);\n\t\tif (!$website_id)\n\t\t\treturn;\n\t\t\n\t\t$data = array(\n\t\t\t\t\t\t'USER_ID' => $user,\n\t\t\t\t\t\t'WEBSITE_ID' => $website_id,\n\t\t\t\t\t\t'FULL_URL' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t\t'VIEW_STARTED_AT' => rawurldecode($_GET['ts'])\n\t\t\t\t\t);\n\t\techo 'wtfd';\n\t\t$t = new Model_Tracking();\n\t\t$t->update($data);\n\t}", "title": "" }, { "docid": "e232f24ec4951660c98c02fa38fd95dc", "score": "0.51184446", "text": "protected function saveVisit()\n\t{\n\t\t$this->setFakeRequest();\n\t\t$process = new Piwik_KSVisitorImport_Tracker();\n\t\t$process->setForceIp($this->clientIP);\n\t\t$process->setForceDateTime($this->timestampToUse);\n\t\t$process->main();\n\t\tunset($process);\n\t}", "title": "" }, { "docid": "6dfa9886abda56de49ddbacb97ca7cba", "score": "0.5093712", "text": "function analytics_settings() {\n\n\t?>\n\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\"><br /></div><h2>Google Analytics Settings</h2>\n\n\t<?php\n\n\tif (!current_user_can('manage_options')) {\n\t\twp_die('You do not have permission to access this page.');\n\t}\n\n\t$option = get_option('osi-analytics');\n\t$option = is_array($option) ? $option : array('enable' => 'true', 'code' => '');\n\n\tif (isset($_POST['osi-analytics-submit'])) {\n\n\t\tforeach ($option as $key => $value) {\n\n\t\t\tif (isset($_POST['osi-analytics-'.$key]) && $_POST['osi-analytics-'.$key] != $value)\n\t\t\t\t$option[$key] = $_POST['osi-analytics-'.$key];\n\t\t}\n\n\t\tif (update_option('osi-analytics', $option))\n\t\t\techo '<div class=\"updated\"><p><strong>Settings Updated</strong></p></div>';\n\t\telse\n\t\t\techo '<div class=\"alert\"><p><strong>Failed to Update Settings</strong></p></div>';\n\t}\n\n\t$checked_true = ($option['enable'] == \"true\") ? 'checked=\"checked\"' : '';\n\t$checked_false = ($option['enable'] == \"false\") ? 'checked=\"checked\"' : '';\n\t\n\t?>\n\t\t<form method=\"post\" action=\"\">\n\t\t\t<p>Use Google Analytics on this site?</p>\n\t\t\t<p>\n\t\t\t\t<input name=\"osi-analytics-enable\" type=\"radio\" value=\"true\" id=\"osi-analytics-true\" <?php echo $checked_true; ?>>\n\t\t\t\t<label for=\"osi-analytics-true\">Enable </label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input name=\"osi-analytics-enable\" type=\"radio\" value=\"false\" id=\"osi-analytics-false\" <?php echo $checked_false; ?>>\n\t\t\t\t<label for=\"osi-analytics-false\">Disable </label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"osi-analytics-code\">User Account Code: </label>\n\t\t\t\t<input name=\"osi-analytics-code\" type=\"text\" value=\"<?php echo $option['code']; ?>\">\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input name=\"osi-analytics-submit\" type=\"submit\" value=\"Save Changes\" class=\"button-primary\">\n\t\t\t</p>\n\t\t</form>\n\t<?php\n\n}", "title": "" }, { "docid": "326745bc3b27f4d2943ee78909065749", "score": "0.5092627", "text": "function visitor_data() {\n global $wpdb;\n if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {\n //check ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n //to check ip is pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n //get browser data\n $browser = $_SERVER['HTTP_USER_AGENT'];\n //get the current uri\n $uri = $_SERVER['REQUEST_URI'];\n $table_name = $wpdb->prefix . 'track';\n $now = date(\"Y-m-d h:m:s\");\n $data = array( 'time' => $now, 'ip' => $ip, 'browser' => $browser, 'url' => $uri);\n $format = array('%s','%s','%s', '%s');\n //write data to track table\n $wpdb->insert($table_name,$data,$format);\n $my_id = $wpdb->insert_id;\n}", "title": "" }, { "docid": "b1b886e54ad6dc7616ffbb5caa7ef99c", "score": "0.50903183", "text": "public function do_video_analytics() {\n\t\twp_enqueue_script( 'video-analytics', plugins_url( '/video-analytics.js', __FILE__ ), array( 'jquery' ) );\n\t}", "title": "" }, { "docid": "c793f041bf8b34eb788771af385def38", "score": "0.5087768", "text": "public function html() {\n ?>\n <!-- Global Site Tag (gtag.js) - Google Analytics -->\n <script async src=\"https://www.googletagmanager.com/gtag/js?id=<?=strval($this->tracking_id)?>\"></script>\n <script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', '<?=strval($this->tracking_id)?>');\n </script>\n <?php\n }", "title": "" }, { "docid": "c6f6c8a2b9ee249ccab5e677b6cbf382", "score": "0.5078167", "text": "function google_analytics_tracking_code(){\n\n if (!preg_match(\"#http:\\/\\/(test|dev|local)(.*?)#\",get_site_url())) {\n $options = get_option('syrup_settings');\n if (!empty($options['syrup_settings_scripts'])) {\n echo $options['syrup_settings_scripts'];\n }\n } else {\n echo '<!-- ' . get_site_url() . ' is not production so NO analytics here -->'.\"\\n\"; }\n}", "title": "" }, { "docid": "d4926f345ba35c0591fc5331bd1adc26", "score": "0.50686425", "text": "public function getGaService() {\n if (empty($this->analytics)) {\n // Create and configure a new client object.\n $this->client = new \\Google_Client();\n $this->client->setApplicationName(\"GA Referral Spam Filters\");\n $this->analytics = new \\Google_Service_Analytics($this->client);\n\n // Read the generated p12 key.\n $key = file_get_contents(self::$key_file_location);\n $cred = new \\Google_Auth_AssertionCredentials(\n self::$service_account_email,\n array(\\Google_Service_Analytics::ANALYTICS_EDIT),\n $key\n );\n $this->client->setAssertionCredentials($cred);\n if($this->client->getAuth()->isAccessTokenExpired()) {\n $this->client->getAuth()->refreshTokenWithAssertion($cred);\n }\n }\n\n return $this->analytics;\n }", "title": "" }, { "docid": "217e6ee91772b78b8c04944bcc9562e5", "score": "0.50465053", "text": "public function sync() {\n\t}", "title": "" }, { "docid": "7be1995b24ba86f50ac7d89339aac97d", "score": "0.5040112", "text": "function trackVisit ()\r\n {\r\n // attention\r\n // on peut utiliser des variables globales\r\n // mais il faut prévenir PHP\r\n // https://www.php.net/manual/fr/reserved.variables.server.php\r\n $uri = $_SERVER[\"REQUEST_URI\"];\r\n $userAgent = $_SERVER[\"HTTP_USER_AGENT\"];\r\n $ip = $_SERVER[\"REMOTE_ADDR\"];\r\n $referer = $_SERVER[\"HTTP_REFERER\"] ?? \"\";\r\n\r\n $today = date(\"Y-m-d\");\r\n $now = date(\"Y-m-d H:i:s\");\r\n\r\n // SECURITE: on ne stocke pas les mots de passe...\r\n $tabRequest = $_REQUEST;\r\n if (isset($tabRequest[\"password\"]))\r\n {\r\n $tabRequest[\"password\"] = mb_strlen($tabRequest[\"password\"]);\r\n }\r\n $code = json_encode($tabRequest); // TODO: SECURITY\r\n\r\n // https://www.php.net/manual/fr/function.hrtime.php\r\n // https://www.php.net/manual/fr/function.memory-get-peak-usage.php\r\n // en micro secondes\r\n $requestTime = intval((microtime(true) - Site::Get(\"timeStart\")));\r\n // en ko\r\n $requestMemory = intval(memory_get_peak_usage() / 1024);\r\n\r\n // sauvegarder dans un fichier CSV\r\n Site::Get(\"Model\")->insertLine(\"Visit\", [\r\n \"creationDate\" => $now,\r\n \"uri\" => $uri,\r\n \"code\" => $code,\r\n \"userAgent\" => $userAgent, \r\n \"referer\" => $referer, \r\n \"ip\" => $ip,\r\n \"requestTime\" => $requestTime,\r\n \"requestMemory\" => $requestMemory, \r\n ]);\r\n }", "title": "" }, { "docid": "0684149affac648008fa05090737207c", "score": "0.5027113", "text": "public function sync()\r\n\t{\r\n\t}", "title": "" }, { "docid": "ad14989e18dca9b47ed3e8bf14a23420", "score": "0.502561", "text": "public function tracking_script() {\n wp_enqueue_script('wpmet_edd_aff_cookie', \\Wpmet_Essential::instance()->get_url() . \"assets/js/jquery.cookie.min.js\", [], \\Wpmet_Essential::instance()->get_version(), true );\n wp_enqueue_script('wpmet_edd_aff_tracking', \\Wpmet_Essential::instance()->get_url() . \"assets/js/tracking.js\", [], \\Wpmet_Essential::instance()->get_version(), true ); // it has a little customization (may be!).\n }", "title": "" }, { "docid": "9106d65f06bd6b2768a53669127099b9", "score": "0.5022249", "text": "public function sync(): void;", "title": "" }, { "docid": "46ade003c4430371a4b51928d10d89c6", "score": "0.50177544", "text": "public function searchGoogleAnalytics($html)\n {\n $errors = [];\n\n // Don't run this if we already found an indication of google analytics.\n if(!$this->googleAnalyticsFound) {\n $crawler = new Crawler($html);\n $crawler->filter('script')->each(function($node) {\n $content = $node->text();\n $src = $node->attr('src');\n if(strpos($src, 'UA-') !== false) {\n $this->googleAnalyticsFound = TRUE;\n }\n\n if(strpos($content, 'UA-') !== false) {\n $this->googleAnalyticsFound = TRUE;\n }\n });\n\n if ($this->googleAnalyticsFound) {\n $errors['global']['facebook'] = TRUE;\n return $errors;\n }\n }\n\n return NULL;\n }", "title": "" }, { "docid": "4cbed61c96e4ccd21daae8616c793a73", "score": "0.5012873", "text": "function LAMANU_scripts() {\r\n //initialisation du script Tarte au citron\r\n echo '<script type=\"text/javascript\" src=\"' . plugin_dir_url(__FILE__) . 'js/tarteaucitron/tarteaucitron.js\"></script>\r\n\r\n <script type=\"text/javascript\">\r\n tarteaucitron.init({\r\n \"hashtag\": \"#tarteaucitron\",\r\n \"highPrivacy\": false,\r\n \"orientation\": \"bottom\",\r\n \"adblocker\": false,\r\n \"showAlertSmall\": true,\r\n \"cookieslist\": true,\r\n \"removeCredit\": false\r\n });\r\n tarteaucitron.user.analyticsUa = \\'' . get_option('google_analytics', 'UA-00000000-0') . '\\';\r\n tarteaucitron.user.analyticsMore = function () { /* add here your optionnal ga.push() */\r\n};\r\n </script>\r\n <script type=\"text/javascript\" src=\"'.plugin_dir_url( __FILE__ ).'js/googleAnalytics.js\"></script>';\r\n}", "title": "" }, { "docid": "b4012a75a333153c4336bd7554be4ec6", "score": "0.5004679", "text": "public function ToTransactionAsyncJs() {\n return \"_gaq.push(['_addTrans', '{$this->id}', '{$this->affiliation}', '{$this->revenue}', '{$this->tax}', '{$this->shipping}', '{$this->city}', '{$this->state}', '{$this->country}']);\";\n }", "title": "" }, { "docid": "50c304e45aa345a71b601b956e779e37", "score": "0.50046426", "text": "function ipress_analytics_shortcode( $atts ) {\n\n\t$defaults = [ 'code' => '' ];\n\t$atts = shortcode_atts( $defaults, $atts, 'ipress_analytics' );\n\n\t// No code?\n\tif ( empty( $atts['code'] ) ) { return; }\n\t\n\t// Start data\n\tob_start();\n?>\n\t<!-- Google Analytics -->\n\t<script>\n\t\twindow.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;\n\t\tga('create', <?php echo $atts['code']; ?>, 'auto');\n\t\tga('send', 'pageview');\n\t</script>\n\t<script async src='https://www.google-analytics.com/analytics.js'></script>\n\t<!-- End Google Analytics -->\n<?php\n\n\t// Store data\n\t$output = ob_get_clean();\n\n\treturn apply_filters( 'ipress_analytics_shortcode', $output, $atts );\n}", "title": "" }, { "docid": "00a4797421e454999d061a5ca717d5f1", "score": "0.50035304", "text": "function analytics_without_cookies_enqueue_script() {\n\n\t/**\n\t * Track logged in users?.\n\t *\n\t * @since 1.0.0\n\t */\n\tif ( apply_filters( 'analytics_without_cookies_ignore_logged_in_users', true ) ) {\n\t\tif ( is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/**\n\t * Add your own Google Analytics tracking code via this filter.\n\t *\n\t * @since 1.0.0\n\t */\n\t$tracking_id = apply_filters( 'analytics_without_cookies_tracking_id', '' );\n\n\tif ( ! empty( $tracking_id ) ) {\n\t\t/*\n\t\t * Fingerprintjs2 1.5.1 - Modern & flexible browser fingerprint library v2\n\t\t * https://github.com/Valve/fingerprintjs2\n\t\t * Copyright (c) 2015 Valentin Vasilyev ([email protected])\n\t\t * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.\n\t\t*/\n\t\twp_enqueue_script(\n\t\t\t'fingerprint2',\n\t\t\tplugins_url( 'js/fingerprint2.min.js', __FILE__ ),\n\t\t\tarray(),\n\t\t\t'1.5.1',\n\t\t\ttrue\n\t\t);\n\n\t\t/**\n\t\t * Anonymize IP?\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\t$anonymize_ip = apply_filters( 'analytics_without_cookies_anonymize_ip', true );\n\t\t$anonymize_ip = $anonymize_ip ? \"ga('set', 'anonymizeIp', true);\" : '';\n\n\t\t$script = sprintf(\n\t\t\t\"var fp = new Fingerprint2();fp.get(function(result) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '%s', {'storage': 'none','clientId': result});%sga('send', 'pageview');});\",\n\t\t\tesc_js( $tracking_id ),\n\t\t\t$anonymize_ip\n\t\t);\n\n\t\twp_add_inline_script( 'fingerprint2', $script );\n\t}\n}", "title": "" }, { "docid": "ccd1ee133bf217cd579c7dedf7a4550b", "score": "0.500352", "text": "function update_options() {\n global $wpdb;\n\n if (!isset($_POST['ssga_submit']))\n return false;\n\n check_admin_referer('nonce_ssga');\n\n $input_id = array();\n $input_id['tracking_id'] = isset($_POST['tracking_id']) ? $_POST['tracking_id'] : '';\n\n if (!$this->isAnalytics($input_id['tracking_id']) && $input_id['tracking_id'] != '') {\n \tflash( 'status', '<code>' . $input_id['tracking_id'] . '</code> is not a valid tracking ID.', 'error');\n \treturn wp_redirect('options-general.php?page=ssga-settings');\n }\n\n if (get_option('ssga_options')['tracking_id'] == $input_id['tracking_id']) {\n \tflash( 'status', 'Settings Updated.' );\n \treturn wp_redirect('options-general.php?page=ssga-settings');\n\t }\n\n\t if (update_option('ssga_options', $input_id)) {\n \tflash( 'status', 'Settings Updated.' );\n } else {\n \tflash( 'status', 'Settings failed to update.', 'error' );\n }\n\n wp_redirect('options-general.php?page=ssga-settings');\n }", "title": "" }, { "docid": "6927ad2fcb638747384773a5b2f640d0", "score": "0.4980744", "text": "public function getGoogleAnalytics()\n {\n // Use the developers console and download your service account\n // credentials in JSON format. Place them in this directory or\n // change the key file location if necessary.\n $KEY_FILE_LOCATION = __DIR__ . '/../../../../../data/ganalytics/ga-user.json';\n\n // Create and configure a new client object.\n $client = new \\Google_Client();\n $client->setApplicationName(\"Analytics Reporting\");\n $client->setAuthConfig($KEY_FILE_LOCATION);\n $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']);\n $analytics = new \\Google_Service_AnalyticsReporting($client);\n\n return $analytics;\n }", "title": "" } ]